• 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: Strange behaviour with defaults read in install script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour with defaults read in install script


  • Subject: Re: Strange behaviour with defaults read in install script
  • From: Iceberg-Dev <email@hidden>
  • Date: Wed, 11 Mar 2009 00:36:46 +0100


On Mar 10, 2009, at 11:27 AM, Glover,David wrote:

Hi, thanks for all the useful info.

I've got a distribution package which contains a number of localized packages - I'm trying to find out how I can determine the current language of the machine, and select the corresponding localized package for install by default.

I haven't been able to find a decent way of doing this with javascript in my .dist file, so I'm looking into using 'system.defaults....'

It would be great if there was an easier way of getting this info! :o)

Stupid idea: ------------

When this kind of question happens on the Cocoa mailing-list, the usual answer is that you should not try to figure out what the current language is but let the OS find it.

The idea behind this is to rely on the *.lproj folder.

In your case, you may consider writing a quick Cocoa app that has one *.lproj folder per localization. Use the NSBundle APIs to get the path to your package - [NSBundle pathForResource: ofType:] and then open it with NSWorkspace.

If you need a distribution script, as long as you're not using a flat package, you would be able to change the contents of the distribution script without too much effort.


Of course, this would only work with a manual installation.

Other idea:
-----------

Use an Installer plugin to find the info and save it to a file that you can later use to change the choices state.
_______________________________________________
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: 
 >Strange behaviour with defaults read in install script (From: "Glover,David" <email@hidden>)
 >Re: Strange behaviour with defaults read in install script (From: Karl Kuehn <email@hidden>)
 >RE: Strange behaviour with defaults read in install script (From: "Glover,David" <email@hidden>)
 >Re: Strange behaviour with defaults read in install script (From: Bill Coderre <email@hidden>)
 >Re: Strange behaviour with defaults read in install script (From: Nigel Kersten <email@hidden>)
 >RE: Strange behaviour with defaults read in install script (From: "Glover,David" <email@hidden>)

  • Prev by Date: Re: Any recommended resources for learning Mac packaging?
  • Next by Date: Re: Any recommended resources for learning Mac packaging?
  • Previous by thread: RE: Strange behaviour with defaults read in install script
  • Next by thread: Any recommended resources for learning Mac packaging?
  • Index(es):
    • Date
    • Thread