Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

macos - Mac installer CLI, how to install a subset of packages

I have an installer that is build using a tool called Packages (http://s.sudre.free.fr/Software/Packages/about.html). It has multiple sub components (the .app and a few audio plugins):

installer -pkginfo -pkg myinstaller.pkg

shows:

myapp
MyStandalone
AU
VST3

Is there a way of using the installer to only install a subset of the components rather than all?

It seems -applyChoiceChangesXML is the way. But I don't know how to use it.

From -showChoicesXML it returns the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
    <dict>
        <key>childItems</key>
        <array>
            <dict>
                <key>childItems</key>
                <array/>
                <key>choiceDescription</key>
                <string>Standalone App</string>
                <key>choiceIdentifier</key>
                <string>installer_choice_1</string>
                <key>choiceIsEnabled</key>
                <true/>
                <key>choiceIsSelected</key>
                <integer>1</integer>
                <key>choiceIsVisible</key>
                <true/>
                <key>choiceSizeInKilobytes</key>
                <integer>457609</integer>
                <key>choiceTitle</key>
                <string>Orpheus</string>
                <key>pathsOfActivePackagesInChoice</key>
                <array>
                    <string>file://localhost/Users/username/path/myinstaller.pkg#mystandalone.pkg</string>
                </array>
            </dict>
            <dict>
                <key>childItems</key>
                <array/>
                <key>choiceDescription</key>
                <string>Pluto AU plugin</string>
                <key>choiceIdentifier</key>
                <string>installer_choice_2</string>
                <key>choiceIsEnabled</key>
                <true/>
                <key>choiceIsSelected</key>
                <integer>1</integer>
                <key>choiceIsVisible</key>
                <true/>
                <key>choiceSizeInKilobytes</key>
                <integer>8831</integer>
                <key>choiceTitle</key>
                <string>AU</string>
                <key>pathsOfActivePackagesInChoice</key>
                <array>
                    <string>file://localhost/Users/username/path/myinstaller.pkg#AU.pkg</string>
                </array>
            </dict>
            <dict>
                <key>childItems</key>
                <array/>
                <key>choiceDescription</key>
                <string>Pluto VST3 plugin</string>
                <key>choiceIdentifier</key>
                <string>installer_choice_3</string>
                <key>choiceIsEnabled</key>
                <true/>
                <key>choiceIsSelected</key>
                <integer>1</integer>
                <key>choiceIsVisible</key>
                <true/>
                <key>choiceSizeInKilobytes</key>
                <integer>9002</integer>
                <key>choiceTitle</key>
                <string>VST3</string>
                <key>pathsOfActivePackagesInChoice</key>
                <array>
                    <string>file://localhost/Users/username/path/myinstaller.pkg#VST3.pkg</string>
                </array>
            </dict>
        </array>
        <key>choiceIdentifier</key>
        <string>__ROOT_CHOICE_IDENT_DISTRIBUTION_TITLE</string>
        <key>choiceIsEnabled</key>
        <true/>
        <key>choiceIsSelected</key>
        <integer>1</integer>
        <key>choiceIsVisible</key>
        <true/>
        <key>choiceSizeInKilobytes</key>
        <integer>0</integer>
        <key>choiceTitle</key>
        <string>myapp</string>
        <key>pathsOfActivePackagesInChoice</key>
        <array/>
    </dict>
</array>
</plist>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...