#!/bin/bash
#
-SYNTAX="make_dmg.sh <environment> <builddir> <type> <disk> <apple-id> <apple-password>"
+SYNTAX="make_dmg.sh <environment> <builddir> <type> <apple-id> <apple-password>"
# where <type> is universal or thin
-# <disk> is yes or no
#
-# e.g. make_dmg.sh /Users/carl/osx-environment /Users/carl/cdist universal yes foo@bar.net opensesame
+# e.g. make_dmg.sh /Users/carl/osx-environment /Users/carl/cdist universal foo@bar.net opensesame
# Don't set -e here as egrep (used a few times) returns 1 if no matches
# were found.
ENV=$1
ROOT=$2
TYPE=$3
-DISK=$4
-APPLE_ID=$5
-APPLE_PASSWORD=$6
+APPLE_ID=$4
+APPLE_PASSWORD=$5
if [ "$TYPE" != "universal" -a "$TYPE" != "thin" ]; then
echo $SYNTAX
exit 1
fi
-if [ "$DISK" != "yes" -a "$DISK" != "no" ]; then
- echo $SYNTAX
- echo "where <disk> is yes or no"
- exit 1
-fi
-
# This is our work area for making up the .dmgs
mkdir -p build/platform/osx
cd build/platform/osx
copy_lib_root libswresample "$dest"
copy_lib_root liblwext4 "$dest"
copy_lib_root libblockdev "$dest"
+ copy_lib_root libleqm_nrt "$dest"
copy $ROOT src/dcpomatic/build/src/lib/libdcpomatic2.dylib "$dest"
copy $ROOT src/dcpomatic/build/src/wx/libdcpomatic2-wx.dylib "$dest"
copy_lib_env libboost_system "$dest"
cp $prefix/src/dcpomatic/graphics/osx/dcpomatic2_batch.icns "$dest"
cp $prefix/src/dcpomatic/graphics/osx/dcpomatic2_playlist.icns "$dest"
cp $prefix/src/dcpomatic/graphics/osx/dcpomatic2_disk.icns "$dest"
- cp $prefix/src/dcpomatic/graphics/osx/preferences/colour_conversions.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/dcpomatic2_combiner.icns "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/defaults.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/defaults@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/kdm_email.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/kdm_email@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/email.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/email@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/servers.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/servers@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/tms.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/tms@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/keys.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/keys@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/cover_sheet.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/cover_sheet@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/notifications.png "$dest"
- cp $prefix/src/dcpomatic/graphics/osx/preferences/locations.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/notifications@2x.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/sound.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/sound@2x.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/identifiers.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/identifiers@2x.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/general.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/general@2x.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/advanced.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/advanced@2x.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/locations.png "$dest"
+ cp $prefix/src/dcpomatic/graphics/osx/preferences/locations@2x.png "$dest"
cp $prefix/src/dcpomatic/fonts/LiberationSans-Regular.ttf "$dest"
cp $prefix/src/dcpomatic/fonts/LiberationSans-Italic.ttf "$dest"
cp $prefix/src/dcpomatic/fonts/LiberationSans-Bold.ttf "$dest"
cp $prefix/src/dcpomatic/graphics/snap.png "$dest"
cp $prefix/src/dcpomatic/graphics/sequence.png "$dest"
cp $prefix/src/dcpomatic/graphics/me.jpg "$dest"
+ cp $prefix/src/dcpomatic/graphics/link.png "$dest"
cp -r $prefix/share/libdcp/xsd "$dest"
+ cp -r $prefix/share/libdcp/tags "$dest"
# i18n: DCP-o-matic .mo files
for lang in de_DE es_ES fr_FR it_IT sv_SE nl_NL ru_RU pl_PL da_DK pt_PT pt_BR sk_SK cs_CZ uk_UA zh_CN tr_TR; do
N=0
while [ 1 ]; do
echo "Checking up on $id"
+ set +e
status=$(xcrun altool --notarization-info $id -u $APPLE_ID -p $APPLE_PASSWORD --output-format xml)
+ set -e
summary=$(echo "$status" | grep -C1 "<key>Status</key>" | tail -n 1 | sed -e "s/ .//g")
echo "Got $summary"
if [ "$summary" == "<string>invalid</string>" ]; then
relink_relative "${rl[@]}"
make_dmg "$appdir" "" "DCP-o-matic Playlist Editor" com.dcpomatic.playlist
-if [ "$DISK" == "yes" ]; then
+# DCP-o-matic Combiner
+setup "DCP-o-matic 2 Combiner.app"
+copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_combiner "$approot/MacOS"
+copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
+cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_combiner.Info.plist "$approot/Info.plist"
+rl=("$approot/MacOS/dcpomatic2_combiner" "$approot/Frameworks/"*.dylib)
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic Combiner" com.dcpomatic.combiner
# DCP-o-matic Disk Writer .app
setup "DCP-o-matic 2 Disk Writer.app"
copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_disk "$approot/MacOS"
+copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_disk.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_disk" "$approot/Frameworks/"*.dylib)
relink_relative "${rl[@]}"
<key>DYLD_LIBRARY_PATH</key>
<string><![CDATA[/Library/Application Support/com.dcpomatic]]></string>
</dict>
- <key>KeepAlive</key>
- <true/>
- <key>RunAtLoad</key>
- <true/>
- <key>Debug</key>
- <true/>
<key>StandardOutPath</key>
- <string>/Users/carl/damon.out.log</string>
+ <string>/var/log/dcpomatic_disk_writer_out.log</string>
<key>StandardErrorPath</key>
- <string>/Users/carl/damon.err.log</string>
+ <string>/var/log/dcpomatic_disk_writer_err.log</string>
+ <key>LaunchEvents</key>
+ <dict>
+ <key>com.apple.notifyd.matching</key>
+ <dict>
+ <key>com.dcpomatic.disk.writer.start</key>
+ <dict>
+ <key>Notification</key>
+ <string>com.dcpomatic.disk.writer.start</string>
+ </dict>
+ </dict>
+ </dict>
</dict>
</plist>
EOF
mkdir $pkgbase/scripts
cat > $pkgbase/scripts/postinstall <<EOF
#!/bin/sh
+/bin/launchctl unload "/Library/LaunchDaemons/com.dcpomatic.disk.writer.plist"
/bin/launchctl load "/Library/LaunchDaemons/com.dcpomatic.disk.writer.plist"
exit 0
EOF
make_dmg "$appdir" "DCP-o-matic Disk Writer.pkg" "DCP-o-matic Disk Writer" com.dcpomatic.disk
-fi
-