• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Testing for downgrade in Distribution Scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing for downgrade in Distribution Scripts


  • Subject: Re: Testing for downgrade in Distribution Scripts
  • From: Bill Coderre <email@hidden>
  • Date: Thu, 21 Sep 2006 09:14:45 -0700

On Sep 21, 2006, at 7:18 AM, Sean P. Kane wrote:
Can you show me an example of the _javascript_ you use for this? Also, How do you make sure they are only installing on the Startup Disk?

This option in the distribution enforces the root volume only.
<options rootVolumeOnly = "true" />

Here's a script snippet that returns true if QuickTime version is < 7.1.3.
<script>
    function NeedsQuickTime()
    {
        var path = "/System/Library/Frameworks/QuickTime.framework";
var bundle = system.files.bundleAtPath(path);
if (bundle == null) return true;
var installedVersion = bundle.CFBundleShortVersionString;
if (installedVersion == null) return true;
return ((system.compareVersions(installedVersion,"7.1.3") &lt; 0));
    }
</script>

It also returns true if QuickTime is not installed (which would be very unfortunate for Mac OS X) or if the QuickTime.framework didn't have a property called CFBundleShortVersionString in its Info.plist.

Here's a choice using that code:
<choice id="QuickTime"
title="QuickTime"
enabled = 'isNotDowngrade()'
selected = 'isNotDowngrade() &amp;&amp; NeedsQuickTime()'
visible="false"
>
        <pkg-ref id='com.apple.pkg.QuickTime713' />
</choice>

I marked it as not visible because I didn't want the user to have an option to turn it off.

This stuff is documented in the following URL on your drive, assuming Developer.mpkg is installed:
file:///Developer/ADC Reference Library/releasenotes/DeveloperTools/Installer.htm
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Testing for downgrade in Distribution Scripts (From: "Sean P. Kane" <email@hidden>)

  • Prev by Date: RE: Distribution Scripts in Network Installs
  • Next by Date: Server startup installation issues!
  • Previous by thread: Re: Testing for downgrade in Distribution Scripts
  • Next by thread: Re: Testing for downgrade in Distribution Scripts
  • Index(es):
    • Date
    • Thread