Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <installer-gui-script minSpecVersion="1">
- <options customize="never" hostArchitectures="ppc,i386" rootVolumeOnly="true"/>
- <title>SU_TITLE</title>
- <script>
- </script>
- <installation-check script="InstallationCheck()"/>
- <script>
- function InstallationCheck(prefix) {
- my.result.message = system.localizedString('ERROR_0');
- if (!PlistCheck0("/") || !Not1("/") || !LogicalAnd3("/") || !FileCheck6("/")) {
- my.result.type = 'Fatal';
- return false;
- }
- return true;
- }
- function PlistCheck0(prefix) {
- if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_1');
- var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
- if (!plist) {
- return false;
- }
- var plistKeyValue = plist['ProductVersion'];
- if (!plistKeyValue) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.7.5') < 0) {
- return false;
- }
- return true;
- }
- function Not1(prefix) {
- if (!(PlistCheck2(prefix))) {
- return true;
- }
- return false;
- }
- function PlistCheck2(prefix) {
- if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_2');
- var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
- if (!plist) {
- return false;
- }
- var plistKeyValue = plist['ProductVersion'];
- if (!plistKeyValue) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.8') < 0) {
- return false;
- }
- if (system.compareVersions(plistKeyValue, '10.8.3') >= 0) {
- return false;
- }
- return true;
- }
- function LogicalAnd3(prefix) {
- if (BundleCheck4(prefix) && BundleCheck5(prefix)) {
- return true;
- }
- return false;
- }
- function BundleCheck4(prefix) {
- if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_3');
- var bundle = system.files.bundleAtPath(prefix + '/Applications/iPhoto.app');
- if (!bundle) {
- return false;
- }
- var bundleKeyValue = bundle['CFBundleShortVersionString'];
- if (!bundleKeyValue) {
- return false;
- }
- if (system.compareVersions(bundleKeyValue, '9.1.0') < 0) {
- return false;
- }
- return true;
- }
- function BundleCheck5(prefix) {
- if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_4');
- var bundle = system.files.bundleAtPath(prefix + '/Applications/iPhoto.app');
- if (!bundle) {
- return false;
- }
- var bundleKeyValue = bundle['CFBundleShortVersionString'];
- if (!bundleKeyValue) {
- return false;
- }
- if (system.compareVersions(bundleKeyValue, '9.4.3.0') > 0) {
- return false;
- }
- return true;
- }
- function FileCheck6(prefix) {
- if (typeof(my.result) != 'undefined') my.result.message = system.localizedString('ERROR_5');
- if (system.files.fileExistsAtPath(prefix + '/Applications/iPhoto.app/Contents/_MASReceipt/receipt') == 0) {
- return true;
- }
- return false;
- }
- </script>
- <license file="License.rtf"/>
- <welcome file="SUDescription.html"/>
- <background file="background.tiff" alignment="bottomleft" scaling="none"/>
- <choices-outline>
- <line choice="manual"/>
- </choices-outline>
- <choice id="manual" title="SU_TITLE">
- <pkg-ref id="iPhotoUpdate" auth="Root" active="LogicalAnd3(my.target.mountpoint)">#iPhoto9.4.3Update.pkg</pkg-ref>
- <pkg-ref id="iPhotoContentUpdate" auth="Root" active="LogicalAnd3(my.target.mountpoint)">#iPhoto9.4.3ContentUpdate.pkg</pkg-ref>
- </choice>
- <pkg-ref id='iPhotoContentUpdate' installKBytes='180046' version='9.4.3.0.1.1263389684'/>
- <pkg-ref id='iPhotoUpdate' installKBytes='595086' version='9.4.3.0.1.1263389684'/>
- <pkg-ref id='iPhotoContentUpdate' installKBytes='180046' version='9.4.3.0.1.1263389684'/>
- <pkg-ref id='iPhotoUpdate' installKBytes='595086' version='9.4.3.0.1.1263389684'/>
- </installer-gui-script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement