- This topic has 8 replies, 7 voices, and was last updated 15 years, 10 months ago by
knowmad.
-
AuthorPosts
-
November 6, 2007 at 7:34 pm #370446
thegooch49
ParticipantFirst, thanks for this tool! I really love the concept, and I think this will be a big leap forward on how our imaging will work moving forward. I had one discovery, and one question. The discovery was minor, but I thought I would pass it on. I created a base image, and an edited bash file for the install. Trying to install a 10.5 image from a machine booted from 10.4 does NOT work. While booted off of 10.4, it does not like the main OSInstall.mpkg file for 10.5. Just wanted to pass this along to save time if someone was trying.
Now for the question. Running this script ‘out of the box’ installs everything on the installer DVD. All the languages, print drivers, etc. Is there any way to trim this down? Is it just a matter of opening the OSInstall.mpkg, and deleting packages that install the languages? Can I just find ‘japanese.pkg’ and delete it?
Thanks for the product, and the help!
November 13, 2007 at 12:35 am #370506ptb
ParticipantI too was wondering how to disable portions of an install without opening the package in PackageMaker and mucking around where I probably shouldn’t. In Mac OS X 10.5 Leopard, the man page for the command line ‘installer’ has an option ‘-showChoicesXML’, ‘-applyChoiceChangesXML’, and ‘-showChoicesAfterApplyingChangesXML’. That said, I’ve been able to get the output of showChoicesXML, but haven’t been able to use applyChoiceChangesXML to apply those changes.
I did find this [url]http://www.jaharmi.com/2007/11/05/leopard_installer_utility_and_install_choice_cha[/url] but haven’t been able to make any headway yet. Ideas?
– Peter
November 25, 2007 at 4:44 pm #370594johnemac
ParticipantIn the same boat. I can generate an xml file with showChoicesXML
installer -pkg OSInstall.mpkg -target /Volumes/MyVolume/ -showChoicesXML > ~/Desktop/mychoices.xmlI’m confused as to how to actually disable something in the XML file. There are choiceIsEnabled and choiceIsSelected. I tried changing choiceIsEnabled to “False” and choiceIsSelected to “0.” When I read the file back in with
installer -pkg OSInstall.mpkg -showChoicesAfterApplyingChangesXML mychoices.xmlI got the error:
installer: choices file ‘mychoices.xml’ either could not be found or was malformed.As a work around I am installing individual packages. I can do this with installer but haven’t tried to change the instaDMG script yet.
installer -pkg BaseSystem.pkg -tgt /Volumes/MyVolume/I am also running the OSinstall.pkg because it contains the postinstall scripts. As far as I know OSInstall.pkg doesn’t contain any files but will run the sethidden program and whatever else is in the postinstall_actions folder.
I find that I have to run a different bless after this install
sudo bless -verbose -folder “/Volumes/VolumeName/System/Library/CoreServices” -bootinfo -bootefiBy the way dealing with packages in Leopard is not as easy as it was. I read this post [url]http://www.macosxhints.com/article.php?story=20071026083746346[/url] to find out how to look at the packages since “show package contents” is no longer available. Using xar and Flat Package Editor and Pacifist are the workarounds.
Getting showChoicesXML to work on OSInstall.mpkg would be better.
November 27, 2007 at 10:15 pm #370629Anders Blomdell
ParticipantThis works for me:
[code]
AdditionalSpeechVoices
AsianLanguagesSupport
MediaFiles
Mail
AddressBook
Automator
DVDPlayer
iTunes
Java
Safari
iChat
OxfordDictionaries
PrinterDriversGroup
AdditionalFonts
[/code]But to install a small system, i feel that this small script is even simpler:
[code]
#!/bin/sh
VOL=’/Volumes/Mac OS X Upgrade DVD/System/Installation/Packages’
PKGS=”BaseSystem Essentials BootCamp BSD AdditionalEssentials MigrationAssistant iCal X11User OSInstall”for pkg in $PKGS ; do
echo $pkg ‘->’ $1
installer -pkg “${VOL}/${pkg}.pkg” -target $1
done
bless -verbose -folder “$1/System/Library/CoreServices” -bootinfo -bootefi
[/code]November 28, 2007 at 5:59 am #370634johnemac
ParticipantThanks for the reply Anders and the clever script to install a small system.
Could I ask you how you generated the xml file? It doesn’t look anything like what I got using the -showChoicesXML flag in installer. I assume that the xml file will exclude everything in the list?
November 28, 2007 at 9:55 am #370636Anders Blomdell
ParticipantI made a small python script that printed all [b]choiceIdentifier[/b] and their associated flags, and then made the file by hand, but since I failed to disable all language support I gave up that path and decided to manually install all needed packages by a simple script instead (NB [b]iCal[/b] is needed, otherwise [b]Finder[/b] panics :().
November 28, 2007 at 10:54 pm #370640rmleonard
Participant[QUOTE][u]Quote by: Anders+Blomdell[/u][p]This works for me:
[code]
AdditionalSpeechVoices
AsianLanguagesSupport
MediaFiles
Mail
AddressBook
Automator
DVDPlayer
iTunes
Java
Safari
iChat
OxfordDictionaries
PrinterDriversGroup
AdditionalFonts
[/code]But to install a small system, i feel that this small script is even simpler:
[code]
#!/bin/sh
VOL=’/Volumes/Mac OS X Upgrade DVD/System/Installation/Packages’
PKGS=”BaseSystem Essentials BootCamp BSD AdditionalEssentials MigrationAssistant iCal X11User OSInstall”for pkg in $PKGS ; do
echo $pkg ‘->’ $1
installer -pkg “${VOL}/${pkg}.pkg” -target $1
done
bless -verbose -folder “$1/System/Library/CoreServices” -bootinfo -bootefi
[/code]
[/p][/QUOTE]okay – I tried this ->
sudo installer -verbose -showChoicesAfterApplyingChangesXML ./inputs.xml -pkg /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Installation/Packages/Bundled\ Software.mpkg/where inputs.xml looks like this ->
[code]
OmniOutliner
[/code]the output was this ->
installer: choices file ‘./inputs.xml’ either could not be found or was malformed.I used pico to create the xml file – the file is bereft of any headers other than the array line
Thoughts?
June 5, 2009 at 6:42 pm #376405nkoval
ParticipantI had some issues finding out what exactly goes into the contents of this file and how to create it. As a result, I figured I’d share them with the community.
The easiest way I found to create it was to use the Property List Editor. It is part of the Apple Developer Tools. Once the Dev. Tools are installed, you can find it in /Developer/Applications/Utilities. There are other ways to make an XML file, this one is just my personal preference (mainly because my typing is atrocious so coding by hand for me is usually a big no-no.)
Open the Property List Editor and make a new file. Change the type of the root from a dictionary to an array and then add the names of the “choiceIdentifiers” as string items in the array. Keep hitting add child as needed to add more items to the array. Save the file as an XML property list and replace the .plist extension with a .xml extension. If I look at my file, which I called OSInstallChoices.xml, this is what I see:
[code]
[/code]
PrinterDriversGroup
HP_Printer_Drivers
AdditionalFonts
LanguageTranslations
Keep in mind this choices list simply a list of check boxes to click in the “Customize” screen of the installer application. This .xml file tells the installer to click the check box for the PrinterDriversGroup, then the HP_Printer_Drivers, next the AdditionalFonts and finally LanguageTranslations. The result of this, since all the check boxes are enabled in the default install, is to disable the PrinterDriversGroup, which turns off the drivers for all the printers. Then it clicks the HP_Printer_Drivers, which re-enables only the HP Printer Drivers. Clicking AdditionalFonts and LanguageTranslations disables both of them.
June 9, 2009 at 6:36 pm #376417knowmad
Participant[QUOTE][u]Quote by: thegooch49[/u][p]
Now for the question. Running this script ‘out of the box’ installs everything on the installer DVD. All the languages, print drivers, etc. Is there any way to trim this down? Is it just a matter of opening the OSInstall.mpkg, and deleting packages that install the languages? Can I just find ‘japanese.pkg’ and delete it?
[/p][/QUOTE]
In the setup you downloaded is a section called ‘installer choices’
It has good information on how to use them, set them up, etc…
There are several threads in this forum that explain it further.
Basically the installer choices file lets you choose what will and will not be installed for any package that has choices.There is even a newer way to handle it that seems to override settings within the installer.
Go forth and read…. sorry for the lack of links. -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed