AFP548 Changing the world one server at a time.

Struggling with InstallerChoice XML stuff

Home › Forums › Software › InstaDMG › Struggling with InstallerChoice XML stuff

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #374157
    jdyck
    Participant

    Here’s hoping someone can point out what I’m missing…

    I’m trying to move to the InstaDMG package building system, after experimenting for quite some time with the PKG Image product. However, I’m greatly struggling with the InstallerChoices setup and starting to feel a bit stupid. I’ve followed the instructions to a T (I think), even going through them from start to finish several times… But for some reason my selections are not getting applied…

    Possibly relevant info:
    • Runnin on MacBook with Mac OS X 10.5.5
    • I have a retail 10.5 install CD in the drive
    • I have an external HD plugged in with a blank volume called Test to target

    First, I get the list of the default choices with the following command:

    sudo installer -showChoicesXML -pkg /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg -target /Volumes/Test > ~/Desktop/OSInstall_default.xml

    This gives me a nice XML list of all the possible choices and details about those choices. I then used the the following command from Patrick’s original instructions to filter it to an easier to read list…

    grep -A 1 choiceIdentifier ~/Desktop/OSInstall_default.xml > ~/Desktop/OSInstall_choiceIdentifiers.txt

    Then I went through and worked through which I wanted to enable/disable, using the ‘each entry = 1 click’ concept, I used Smultron to create this file, which looks like:

    <array>
    	<string>AdditionalFonts</string>
    	<string>Japanese</string>
    	<string>German</string>
    	<string>Spanish</string>
    	<string>Italian</string>
    	<string>Dutch</string>
    	<string>Danish</string>
    	<string>Finnish</string>
    	<string>Korean</string>
    	<string>Norwegian</string>
    	<string>Russian</string>
    	<string>Swedish</string>
    	<string>BrazilianPortuguese</string>
    	<string>SimplifiedChinese</string>
    	<string>TraditionalChinese</string>
    	<string>Portuguese</string>
    	<string>Polish</string>
    	<string>X11</string>
    </array>

    If I’m understanding the process properly, I’ve turned off Asian languages, Additional fonts, X11, and all extra languages except for French, which I need.

    However, when I try to apply this to see the results, using the following command…

    sudo installer -showChoicesAfterApplyingChangesXML ~/Desktop/LeopardChoices.xml -pkg /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg -target /Volumes/Test > ~/Desktop/OSinstall_afterChoice.xml

    I am definitely not getting the results I expect, in fact, I can’t see any results at all. Nothing gets enabled or disabled, as shown below:

    Additional Fonts:

    <dict>
    		<key>childItems</key>
    		<array/>
    		<key>choiceDescription</key>
    		<string>Installs additional fonts with support for Chinese, Korean, Arabic, Hebrew, Thai, Cyrillic, Devanagari, Gujarati, Punjabi, Tibetan, Armenian, Cherokee and Inuktitut.</string>
    		<key>choiceIdentifier</key>
    		<string>AdditionalFonts</string>
    		<key>choiceIsEnabled</key>
    		<true/>
    		<key>choiceIsSelected</key>
    		<integer>1</integer>
    		<key>choiceIsVisible</key>
    		<true/>
    		<key>choiceSizeInKilobytes</key>
    		<integer>144818</integer>
    		<key>choiceTitle</key>
    		<string>Additional Fonts</string>
    		<key>pathsOfActivePackagesInChoice</key>
    		<array>
    			<string>file://localhost/Volumes/Mac OS X Install DVD/System/Installation/Packages/AdditionalFonts.pkg</string>
    		</array>
    	</dict>

    Spanish (shows same for all other languages):

    <dict>
    		<key>childItems</key>
    		<array/>
    		<key>choiceDescription</key>
    		<string>This package contains all of the necessary files to run Mac OS X in Spanish.</string>
    		<key>choiceIdentifier</key>
    		<string>Spanish</string>
    		<key>choiceIsEnabled</key>
    		<true/>
    		<key>choiceIsSelected</key>
    		<integer>1</integer>
    		<key>choiceIsVisible</key>
    		<true/>
    		<key>choiceSizeInKilobytes</key>
    		<integer>117878</integer>
    		<key>choiceTitle</key>
    		<string>Spanish</string>
    		<key>pathsOfActivePackagesInChoice</key>
    		<array>
    			<string>file://localhost/Volumes/Mac OS X Install DVD/System/Installation/Packages/Spanish.pkg</string>
    		</array>
    	</dict>

    X11:

    <dict>
    		<key>childItems</key>
    		<array/>
    		<key>choiceDescription</key>
    		<string>X11 windowing system for UNIX environments</string>
    		<key>choiceIdentifier</key>
    		<string>X11</string>
    		<key>choiceIsEnabled</key>
    		<true/>
    		<key>choiceIsSelected</key>
    		<integer>1</integer>
    		<key>choiceIsVisible</key>
    		<true/>
    		<key>choiceSizeInKilobytes</key>
    		<integer>119918</integer>
    		<key>choiceTitle</key>
    		<string>X11</string>
    		<key>pathsOfActivePackagesInChoice</key>
    		<array>
    			<string>file://localhost/Volumes/Mac OS X Install DVD/System/Installation/Packages/X11User.pkg</string>
    		</array>
    	</dict>

    And so on. I’ve tried creating the choices file in Pico, only disabling one item, all to no avail. Any ideas?

    #374160
    Patrick Fergus
    Participant

    Your choices file works for me. What happens if you give full paths to your LeopardChoices.xml file? My quick tests show that installer pukes if it can’t process/find the XML file, but maybe you’ve hit a scenario I don’t see.

    Also, since it looks like you’re disabling X11, additional fonts, and every language except French, this will be more compact for your InstallerChoices:

    <array>
    	<string>AdditionalFonts</string>
    	<string>LanguageTranslations</string>
    	<string>French</string>
    	<string>X11</string>
    </array>

    – Patrick

    #374161
    jdyck
    Participant

    Thanks for double checking Patrick! I tried again and still no go, then clued into the problem… line endings… Swapped to Unix LF and it was good. Not sure why my Pico attempt didn’t work though.

    Anyway, looks like I’m good to go

    Thanks for the time.

    Jeff

    #374238
    thisgarryhas2rs
    Participant

    What did you use/do to convert it UNIX line feed? I tried nano and pico and all that and it still isn’t working for me.

    #374239
    jdyck
    Participant

    I was using the free editor Smultron, and it has both a menu command to change (Text -> Line Endings -> UNIX-Mac OS X (LF)) and an application preference to configure how you want to save by default (Preferences -> Open & Save -> Line Endings).

    Not sure why Pico didn’t work for either of us though, as I was sure it used unix line feeds.

    I can say once you get the first one figured out and working the second one is a lot easier 🙂

    Hope that helps

    #374242
    thisgarryhas2rs
    Participant

    It is still not seeing the InstallerChoices.xml… I’m assuming it’s suppose to be in the folder where instadmg.bash is contained like the other versions…. I’m using the same file that works in 1.4b1 but when I put it into the 1.4b4 it stops working…

    #374243
    jdyck
    Participant

    I haven’t used the earlier versions, but my understanding is that with this version you put the InstallerChoices.xml file into the /InstallerFiles/BaseOS folder, with the OS Installer dmg. Or, if you’re working with something like MS Office, you can put an InstallerChoices.xml file in the numbered folder with the Office Installer.

    #374244
    thisgarryhas2rs
    Participant

    Ha! There it is. I guess the README file in the InstallerChoices folder wasn’t updated. It still says to put it in the same directory as the instadmg script but the instaDMG PDF says otherwise and I missed it. Thanks Jeff.

    Onward ho! To more images!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.