home *** CD-ROM | disk | FTP | other *** search
/ Nikon Picture Project 1.7 / Nikon PictureProject - Disc 1.iso / mac / Installers / QuickTime / QuickTime71.pkg / Contents / QuickTime.dist < prev    next >
Encoding:
Extensible Markup Language  |  2006-05-05  |  4.0 KB  |  156 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <installer-gui-script minSpecVersion='1'>
  3.  
  4. <!-- Automatically generated by update2dist -->
  5.  
  6.     <!-- Installer meta-data -->
  7.     <choices-outline>
  8.         <line choice='manual'/>
  9.     </choices-outline>
  10.  
  11.     <title>QuickTime</title>
  12.     <choice id='manual' title="QuickTime">
  13.         <pkg-ref id='manual' auth='Root' onConclusion='RequireRestart'>.</pkg-ref>
  14.     </choice>
  15.     <choice id='manual' title='MANUAL_TITLE'/>
  16.     <choice id='manual' versStr='SU_VERS' />
  17.        <welcome file="Welcome.rtf"/>
  18.     <readme  file="ReadMe.rtfd"/>
  19.     <license file="License.rtf" auto='true'/>
  20.     
  21.     <options    customize = 'never'
  22.     />
  23.     
  24.     <background file="background.tif" scaling="none" alignment="bottomleft"></background>
  25.     <!-- Software Update meta-data -->
  26.     <choices-outline ui='SoftwareUpdate'>
  27.         <line choice='su'/>
  28.     </choices-outline>
  29.  
  30.     <choice id='su' suDisabledGroupID='QuickTime'>
  31.         <pkg-ref id='auto' onConclusion='RequireRestart'>QuickTime71.pkg</pkg-ref>
  32.     </choice>
  33.     <choice id='su' visible='VisibleCheck()' />
  34.     <choice id='su' title='SU_TITLE' versStr='SU_VERSION' />
  35.     <choice id='su' description='SU_DESCRIPTION' description-mime-type='text/html' />
  36.     
  37.  
  38.     <installation-check script="InstallationCheck()" />    
  39.     <volume-check script="VolumeCheck()" />    
  40.     <options hostArchitectures='ppc,i386'/>
  41.  
  42.     <script>
  43.     function InstallationCheck()
  44.     {
  45.         // note: my.target isn't defined under installation-check
  46.         if (true)
  47.             return true;
  48.  
  49.         if (my.result)
  50.         {
  51.             //my.result.message = 'message';    // XXX
  52.             my.result.type = 'Fatal';
  53.         }
  54.         return false;
  55.     }
  56.  
  57.     function VolumeCheck()
  58.     {
  59.         
  60.         if(my.target.mountpoint != '/'){
  61.             my.result.message = system.localizedString('BOOT_VOLUME_ERR');
  62.             my.result.type = 'Fatal';
  63.             return false;
  64.         }
  65.         if (newerQuickTimePresent()) {
  66.             my.result.type = 'Fatal';
  67.             my.result.message = system.localizedStringWithFormat('isDowngrade');
  68.             return false;            
  69.         }
  70.         if (!noAppleTier3Language()) {
  71.             my.result.type = 'Fatal';
  72.             my.result.message = system.localizedStringWithFormat('volumeHasTier3');
  73.             return false;            
  74.         }
  75.         return true;
  76.     }
  77.  
  78.  
  79.     function VisibleCheck()
  80.     {
  81.         return(noAppleTier3Language() && notAlreadyInstalled());
  82.     }
  83.  
  84.  
  85.  
  86. function noAppleTier3Language()
  87. {
  88.  
  89.     var path = my.target.mountpoint + "/var/db/.AppleTier3Language";
  90.     if (!system.files.fileExistsAtPath(path))
  91.         return true;
  92.     
  93.     return false;
  94. }
  95.  
  96. function newerQuickTimePresent()
  97. {
  98.     var path = my.target.mountpoint + "/System/Library/Frameworks/QuickTime.framework";
  99.     var bundle = system.files.bundleAtPath(path);
  100.     var version = BundleGetCompositeVersion5(bundle);
  101.     if (version && (system.compareVersions(version, "7.1.0.999999999.999999999") < 1)) {
  102.         return false;
  103.     }
  104.     return true;
  105. }
  106. function notAlreadyInstalled()
  107. {
  108.     var path = my.target.mountpoint + "/System/Library/Frameworks/QuickTime.framework";
  109.     var bundle = system.files.bundleAtPath(path);
  110.     var version = BundleGetCompositeVersion5(bundle);
  111.     if (version && (system.compareVersions(version, "7.1.0.0.0") < 1)) {
  112.         return true;
  113.     }
  114.     return false;
  115. }
  116.     
  117.     </script>
  118.  
  119.     <!-- Common include -->
  120.     <script>
  121.     function _PadVersionString(version, tupleCount)
  122.     {
  123.         if (version == null)
  124.             version = "0";
  125.         var components = version.split(".");
  126.         if (components.length > tupleCount)
  127.             components = components.slice(0, tupleCount);
  128.         else
  129.             for (; components.length<tupleCount; )
  130.                 components.push("0");
  131.         return components.join(".");
  132.     }
  133.  
  134.     function BundleGetCompositeVersion5(bundle)
  135.     {
  136.         if (bundle == null)
  137.             return null;
  138.         var shortVers = bundle.CFBundleShortVersionString;
  139.         shortVers = _PadVersionString(shortVers, 3);
  140.         var sourceVers = bundle.SourceVersion;
  141.         sourceVers = _PadVersionString(sourceVers, 1);
  142.         var buildVers = bundle.BuildVersion;
  143.         buildVers = _PadVersionString(buildVers, 1);
  144.         var fiveTupleVers = shortVers + "." + sourceVers + "." + buildVers;
  145.         return fiveTupleVers;
  146.     }
  147.  
  148.     </script>
  149.     
  150.     
  151.  
  152.  
  153.     <pkg-ref id='auto' installKBytes='132328' version='7.1.0.1330000.438'/>
  154.     <pkg-ref id='manual' installKBytes='132328' version='7.1.0.1330000.438'/>
  155. </installer-gui-script>
  156.