Changeset 42987 in vbox
- Timestamp:
- Aug 25, 2012 1:36:58 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 80319
- Location:
- trunk/src/VBox/Installer/darwin
- Files:
-
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/darwin/Makefile.kmk
r42983 r42987 207 207 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings 208 208 $(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/checkforrunningvms210 209 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \ 211 210 $(MKDIR) -p \ … … 313 312 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist 314 313 @# Copy the resources. 315 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/InstallationCheck $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/316 314 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/ 317 315 @# Build the package. -
trunk/src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist
r42742 r42987 9 9 <key>BundleHasStrictIdentifier</key> <false/> 10 10 <key>BundleOverwriteAction</key> <string>upgrade</string> 11 <key>BundlePreInstallScriptPath</key> <string>InstallationCheck</string>12 11 </dict> 13 12 <dict> -
trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
r42986 r42987 24 24 try 25 25 { 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; } 30 30 31 if (result)31 if (!result) 32 32 { 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; 37 37 } 38 38 39 isLeopard = false;40 39 try 41 40 { 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; } 47 45 48 if (result)46 if (!result) 49 47 { 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; 54 52 } 55 53 56 system.log("isLeopard: " + isLeopard); 57 if (!isLeopard) 54 try 58 55 { 59 try60 {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; } 65 62 66 if(result)67 63 if (!result) 64 { 68 65 my.result.type = 'Fatal'; 69 66 my.result.title = system.localizedString('RUNNING_VMS_TLE'); 70 67 my.result.message = system.localizedString('RUNNING_VMS_MSG'); 71 }68 return result; 72 69 } 70 71 system.log("result:" + result); 73 72 return result; 74 73 }
Note:
See TracChangeset
for help on using the changeset viewer.