VirtualBox

Changeset 42987 in vbox


Ignore:
Timestamp:
Aug 25, 2012 1:36:58 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80319
Message:

Installer/darwin: drop checkforrunningvm in favor of a one-liner. That should work on Leopard too. Dropped the InstallationCheck in VBoxKEXTs which does the same as the javascript in distribution.dist already did and may cause later install errors with generic message (probably because we didn't ship InstallationCheck.strings, but whatever).

Location:
trunk/src/VBox/Installer/darwin
Files:
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/darwin/Makefile.kmk

    r42983 r42987  
    207207                $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
    208208        $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG)                                    $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/background.tif
    209         $(INSTALL) -m 0766 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/checkforrunningvms               $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/checkforrunningvms
    210209        $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
    211210                $(MKDIR) -p \
     
    313312                $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist
    314313        @# Copy the resources.
    315         $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/InstallationCheck                     $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
    316314        $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight                            $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
    317315        @# Build the package.
  • trunk/src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist

    r42742 r42987  
    99            <key>BundleHasStrictIdentifier</key>            <false/>
    1010            <key>BundleOverwriteAction</key>                <string>upgrade</string>
    11             <key>BundlePreInstallScriptPath</key>           <string>InstallationCheck</string>
    1211       </dict>
    1312       <dict>
  • trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist

    r42986 r42987  
    2424       try
    2525       {
    26          test = system.sysctl('hw.machine');
    27          system.log("Hardware architecture detected: " + test);
    28          result = !(test == 'i386' || test == 'x86_64');
    29        } catch (e) { system.log(e); }
     26           test = system.sysctl('hw.machine');
     27           system.log("Hardware architecture detected: " + test);
     28           result = (test == 'i386' || test == 'x86_64');
     29       } catch (e) { system.log(e); result = false; }
    3030
    31        if(result)
     31       if (!result)
    3232       {
    33          my.result.type = 'Fatal';
    34          my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
    35          my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
    36          return result;
     33           my.result.type = 'Fatal';
     34           my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
     35           my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
     36           return result;
    3737       }
    3838
    39        isLeopard = false;
    4039       try
    4140       {
    42          test = system.version['ProductVersion'];
    43          system.log("OS version detected: " + test);
    44          result = !(system.compareVersions(test, '10.5') >= 0);
    45          isLeopard = !!(system.compareVersions(test, '10.6') < 0);
    46        } catch (e) { system.log(e); }
     41           test = system.version['ProductVersion'];
     42           system.log("OS version detected: " + test);
     43           result = (system.compareVersions(test, '10.5') >= 0);
     44       } catch (e) { system.log(e); result = false; }
    4745
    48        if(result)
     46       if (!result)
    4947       {
    50          my.result.type = 'Fatal';
    51          my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
    52          my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
    53          return result;
     48           my.result.type = 'Fatal';
     49           my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
     50           my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
     51           return result;
    5452       }
    5553
    56        system.log("isLeopard: " + isLeopard);
    57        if (!isLeopard)
     54       try
    5855       {
    59          try
    60          {
    61            rcScript = system.run('checkforrunningvms');
    62            result = !!(rcScript == '1');
    63            system.log("checkforrunningvms returned: " + rcScript);
    64          } catch (e) { system.log(e); }
     56           /* Embedded scripts are not available here. So, just do a command
     57              line checking for running VMs instead. */
     58           rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBoxVM.*startvm|VBoxNetDHCP" | /usr/bin/grep -qv grep');
     59           result = (rcScript != 0);
     60           system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
     61       } catch (e) { system.log(e); result = false; }
    6562
    66          if(result)
    67          {
     63       if (!result)
     64       {
    6865           my.result.type = 'Fatal';
    6966           my.result.title = system.localizedString('RUNNING_VMS_TLE');
    7067           my.result.message = system.localizedString('RUNNING_VMS_MSG');
    71          }
     68           return result;
    7269       }
     70
     71       system.log("result:" + result);
    7372       return result;
    7473    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette