PackageMaker

Gesamt Übersicht allen installierten Packete
pkgutil --pkgs
Liste allen installierten Files in einem PKG
pkgutil --files com.apple.pkg.update.security.2008.002
PKG convertieren
pkgutil --expand ISG_Skype.pkg ISG_EXPAND_Skype.pkg
pkgutil --flatten ISG_EXPAND_Skype.pkg ISG_Skype.pkg
Variablen
$0 = Script path ("current" path") 
$1 = Package path 
$2 = Target location 
$3 = Target volume
Ein pkg aus der command line erstelen (pkgbuild)
pkgbuild --component /Applications/TextWrangler.app ~/Desktop/TextWrangler.pkg
pkgbuild --install-location /Applications/ --component /Volumes/volx/Apps_de/Google\ Chrome.app ~/Desktop/pkg/Google_Chrome_47.0.2526.73.pkg
Ein weiteres, etwas komplexeres Beispiel
pkgbuild --root /Applications/GRAPHISOFT/ArchiCAD\ 19 --version 19.0.0 \
--install-location /Applications/GRAPHISOFT/ArchiCAD\ 19 \
--scripts "/Users/sysadmin/Desktop/ArchiCAD_19/Script/postinstall.sh" \
--identifier "ch.ethz.arch.isg.ArchiCAD_19.pkg" ~sysadmin/Desktop/ISG_ArchiCAD_19.pkg
 Ein distribution File aus mehreren pkg’s erstellen
productbuild --synthesize --package ISG_VectorWorks_2016.pkg --package netnemetschekvectorworks.pkg --package netnemetschekvectorworks2016.pkg --package vectorworks.pkg --package vectorworksql.pkg Distribution

 

cat Distribution 
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
    <pkg-ref id="ch.ethz.arch.isg.ISG__VectorWorks_2016.plist"/>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.pkg"/>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.2016.pkg"/>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.Vectorworks.pkg"/>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.VectorWorksQL.pkg"/>
    <options customize="never" require-scripts="false"/>
    <choices-outline>
        <line choice="default">
            <line choice="ch.ethz.arch.isg.ISG__VectorWorks_2016.plist"/>
            <line choice="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.pkg"/>
            <line choice="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.2016.pkg"/>
            <line choice="ch.ethz.arch.isg.isgvectorworks2016.Vectorworks.pkg"/>
            <line choice="ch.ethz.arch.isg.isgvectorworks2016.VectorWorksQL.pkg"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="ch.ethz.arch.isg.ISG__VectorWorks_2016.plist" visible="false">
        <pkg-ref id="ch.ethz.arch.isg.ISG__VectorWorks_2016.plist"/>
    </choice>
    <pkg-ref id="ch.ethz.arch.isg.ISG__VectorWorks_2016.plist" version="21.0.3" onConclusion="none">ISG_VectorWorks_2016.pkg</pkg-ref>
    <choice id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.pkg" visible="false">
        <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.pkg"/>
    </choice>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.pkg" version="21.0.3" onConclusion="none">netnemetschekvectorworks.pkg</pkg-ref>
    <choice id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.2016.pkg" visible="false">
        <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.2016.pkg"/>
    </choice>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.net.nemetschek.vectorworks.2016.pkg" version="21.0.3" onConclusion="none">netnemetschekvectorworks2016.pkg</pkg-ref>
    <choice id="ch.ethz.arch.isg.isgvectorworks2016.Vectorworks.pkg" visible="false">
        <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.Vectorworks.pkg"/>
    </choice>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.Vectorworks.pkg" version="21.0.3" onConclusion="none">vectorworks.pkg</pkg-ref>
    <choice id="ch.ethz.arch.isg.isgvectorworks2016.VectorWorksQL.pkg" visible="false">
        <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.VectorWorksQL.pkg"/>
    </choice>
    <pkg-ref id="ch.ethz.arch.isg.isgvectorworks2016.VectorWorksQL.pkg" version="21.0.3" onConclusion="none">vectorworksql.pkg</pkg-ref>
</installer-gui-script>

 

productbuild --distribution Distribution ISG_VectorWorks_2016_21.0.3.pkg
productbuild: Wrote product to ISG_VectorWorks_2016_21.0.3.pkg

 

Software deinstallieren (Java 8 von Oracle)
#!/bin/sh
# From http://www.java.com/en/download/help/mac_uninstall_java.xml
  rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
  pkgutil --forget com.oracle.jre

 

3. Februar 2016 2785 webadmin  OS X  
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

+ = Verify Human or Spambot ?