summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-03-16 00:44:31 +0100
committerCarl Hetherington <cth@carlh.net>2020-04-06 15:57:14 +0200
commita1f7bf2d9e5610075fbd898cdf52f4f8373741f2 (patch)
tree5539cea37bebe3347408b9404ac3d9aa5cd5fe1b /platform
parentadddda49c17e87198253d9c900dcef0f5fb2e175 (diff)
Add disk writer tool.
Diffstat (limited to 'platform')
-rw-r--r--platform/osx/dcpomatic2_disk.Info.plist.in36
-rw-r--r--platform/osx/make_dmg.sh177
-rw-r--r--platform/osx/set_paths.sh12
-rw-r--r--platform/osx/wscript1
-rw-r--r--platform/windows/copy_deps.sh56
-rw-r--r--platform/windows/dcpomatic2_disk_debug.bat1
-rw-r--r--platform/windows/dcpomatic2_disk_writer.exe.manifest12
-rw-r--r--platform/windows/dcpomatic_disk.rc2
-rw-r--r--platform/windows/dcpomatic_disk_writer.rc2
-rw-r--r--platform/windows/set_paths.bat2
-rw-r--r--platform/windows/wscript74
11 files changed, 326 insertions, 49 deletions
diff --git a/platform/osx/dcpomatic2_disk.Info.plist.in b/platform/osx/dcpomatic2_disk.Info.plist.in
new file mode 100644
index 000000000..177146894
--- /dev/null
+++ b/platform/osx/dcpomatic2_disk.Info.plist.in
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>dcpomatic2_disk</string>
+ <key>CFBundleGetInfoString</key>
+ <string>DCP-o-matic 2 Disk Writer</string>
+ <key>CFBundleIconFile</key>
+ <string>dcpomatic2_disk.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.dcpomatic.disk</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>DCP-o-matic 2 Disk Writer</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersions</key>
+ <string>@VERSION@</string>
+ <key>CFBundleSignature</key>
+ <string>DOMC</string>
+ <key>CFBundleVersion</key>
+ <string>@VERSION@</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
+ <key>LSUIElement</key>
+ <string>0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh
index 867200aa7..9099e5453 100644
--- a/platform/osx/make_dmg.sh
+++ b/platform/osx/make_dmg.sh
@@ -122,6 +122,8 @@ function copy_libs {
copy_lib_root libswscale "$dest"
copy_lib_root libpostproc "$dest"
copy_lib_root libswresample "$dest"
+ copy_lib_root liblwext4 "$dest"
+ copy_lib_root libblockdev "$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"
@@ -187,6 +189,7 @@ function copy_resources {
cp $prefix/src/dcpomatic/graphics/osx/dcpomatic2_player.icns "$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/preferences/defaults.png "$dest"
cp $prefix/src/dcpomatic/graphics/osx/preferences/kdm_email.png "$dest"
@@ -227,7 +230,7 @@ function copy_resources {
}
# param $1 list of things that link to other things
-function relink {
+function relink_relative {
to_relink=`echo $to_relink | sed -e "s/\+//g"`
local linkers=("$@")
@@ -250,25 +253,61 @@ function relink {
done
}
+# param $1 directory things should be relinked into
+# $2 list of things that link to other things
+function relink_absolute {
+ to_relink=`echo $to_relink | sed -e "s/\+//g"`
+ target=$1
+ shift
+ local linkers=("$@")
+
+ for obj in "${linkers[@]}"; do
+ deps=`otool -L "$obj" | awk '{print $1}' | egrep "($to_relink)" | egrep "($ENV|$ROOT|boost|libicu)"`
+ for dep in $deps; do
+ base=`basename $dep`
+ install_name_tool -change "$dep" "$target"/$base -id `basename "$obj"` "$obj"
+ done
+ done
+}
+
+function sign {
+ codesign --deep --force --verify --verbose --options runtime --sign "Developer ID Application: Carl Hetherington (R82DXSR997)" "$1"
+ if [ "$?" != "0" ]; then
+ echo "Failed to sign $1"
+ exit 1
+ fi
+}
+
+
# @param #1 .app directory
-# @param #2 full name e.g. DCP-o-matic Batch Converter
-# @param #3 bundle id e.g. com.dcpomatic.batch
+# @param #2 .pkg or ""
+# @param #3 full name e.g. DCP-o-matic Batch Converter
+# @param #4 bundle id e.g. com.dcpomatic.batch
function make_dmg {
local appdir="$1"
- local full_name="$2"
- local bundle_id="$3"
+ local pkg="$2"
+ local full_name="$3"
+ local bundle_id="$4"
tmp_dmg=dcpomatic_tmp.dmg
dmg="$full_name $version.dmg"
vol_name=DCP-o-matic-$version
- codesign --deep --force --verify --verbose --options runtime --sign "Developer ID Application: Carl Hetherington (R82DXSR997)" "$appdir"
- if [ "$?" != "0" ]; then
- echo "Failed to sign .app"
- exit 1
+ sign "$appdir"
+
+ if [ "$pkg" != "" ]; then
+ productsign --sign "Developer ID Installer: Carl Hetherington (R82DXSR997)" "$pkg" "signed_temp.pkg"
+ if [ "$?" != "0" ]; then
+ echo "Failed to sign .pkg"
+ exit 1
+ fi
+ mv signed_temp.pkg "$pkg"
fi
mkdir -p $vol_name
cp -a "$appdir" $vol_name
+ if [ "$pkg" != "" ]; then
+ cp -a "$pkg" $vol_name
+ fi
ln -s /Applications "$vol_name/Applications"
cat<<EOF > "$vol_name/READ ME.txt"
Welcome to DCP-o-matic! The first time you run the program there may be
@@ -285,6 +324,22 @@ DCP-o-matic Anwendungen ab, bei weiteren Programmstarts wird sie nicht
mehr auftreten.
EOF
+ if [ "$pkg" != "" ]; then
+ cat<<EOF > "$vol_name/READ ME.txt"
+
+To run this software successfully you must install $pkg before running
+the .app
+EOF
+ fi
+
+ if [ "$pkg" != "" ]; then
+ cat<<EOF > "$vol_name/READ ME.de_DE.txt"
+
+To run this software successfully you must install $pkg before running
+the .app
+EOF
+
+ fi
rm -f $tmp_dmg "$dmg"
hdiutil create -srcfolder $vol_name -volname $vol_name -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size $DMG_SIZE $tmp_dmg
attach=$(hdiutil attach -readwrite -noverify -noautoopen $tmp_dmg)
@@ -298,7 +353,9 @@ EOF
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
- set the bounds of container window to {400, 200, 940, 300}
+ set the bounds of container window to {400, 200, 1160, 600}
+ set the bounds of container window to {400, 200, 1160, 600}
+ set the bounds of container window to {400, 200, 1160, 600}
set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 64
@@ -306,6 +363,7 @@ EOF
set position of item "Applications" of container window to {265, 80}
set position of item "READ ME.txt" of container window to {430, 80}
set position of item "READ ME.de_DE.txt" of container window to {595, 80}
+ set position of item "DCP-o-matic Disk Writer.pkg" of container window to {90, 255}
close
open
update without registering applications
@@ -395,8 +453,8 @@ copy $ROOT bin/ffprobe "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2" "$approot/MacOS/dcpomatic2_cli" "$approot/MacOS/dcpomatic2_create" "$approot/MacOS/ffprobe" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic" com.dcpomatic
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic" com.dcpomatic
# DCP-o-matic KDM Creator
setup "DCP-o-matic 2 KDM Creator.app"
@@ -405,8 +463,8 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_kdm_cli "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_kdm.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_kdm" "$approot/MacOS/dcpomatic2_kdm_cli" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic KDM Creator" com.dcpomatic.kdm
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic KDM Creator" com.dcpomatic.kdm
# DCP-o-matic Encode Server
setup "DCP-o-matic 2 Encode Server.app"
@@ -415,8 +473,8 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_server_cli "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_server.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_server" "$approot/MacOS/dcpomatic2_server_cli" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic Encode Server" com.dcpomatic.server
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic Encode Server" com.dcpomatic.server
# DCP-o-matic Batch Converter
setup "DCP-o-matic 2 Batch converter.app"
@@ -424,8 +482,8 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_batch "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_batch.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_batch" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic Batch Converter" com.dcpomatic.batch
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic Batch Converter" com.dcpomatic.batch
# DCP-o-matic Player
setup "DCP-o-matic 2 Player.app"
@@ -433,8 +491,8 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_player "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_player.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_player" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic Player" com.dcpomatic.player
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic Player" com.dcpomatic.player
# DCP-o-matic Playlist Editor
setup "DCP-o-matic 2 Playlist Editor.app"
@@ -442,5 +500,80 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_playlist "$approot/MacOS"
copy $ROOT src/openssl/apps/openssl "$approot/MacOS"
cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_playlist.Info.plist "$approot/Info.plist"
rl=("$approot/MacOS/dcpomatic2_playlist" "$approot/Frameworks/"*.dylib)
-relink "${rl[@]}"
-make_dmg "$appdir" "DCP-o-matic Playlist Editor" com.dcpomatic.playlist
+relink_relative "${rl[@]}"
+make_dmg "$appdir" "" "DCP-o-matic Playlist Editor" com.dcpomatic.playlist
+
+# 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"
+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[@]}"
+
+# DCP-o-matic Disk Writer daemon .pkg
+
+pkgbase=tmp-disk-writer
+rm -rf $pkgbase
+mkdir $pkgbase
+pkgbin=$pkgbase/bin
+pkgroot=$pkgbase/root
+
+mkdir -p $pkgroot/Library/LaunchDaemons
+cat > $pkgroot/Library/LaunchDaemons/com.dcpomatic.disk.writer.plist <<EOF
+<?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">
+<dict>
+ <key>Label</key>
+ <string>com.dcpomatic.disk.writer</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/Library/Application Support/com.dcpomatic/dcpomatic2_disk_writer</string>
+ </array>
+ <key>EnvironmentVariables</key>
+ <dict>
+ <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>
+ <key>StandardErrorPath</key>
+ <string>/Users/carl/damon.err.log</string>
+</dict>
+</plist>
+EOF
+
+# Get the binaries together in $pkgbin then move them to the
+# place with spaces in the filename to avoid some of the pain of escaping
+
+mkdir $pkgbin
+copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_disk_writer "$pkgbin"
+copy_libs "$pkgbin"
+
+rl=("$pkgbin/dcpomatic2_disk_writer" "$pkgbin/"*.dylib)
+relink_absolute "/Library/Application Support/com.dcpomatic" "${rl[@]}"
+
+mkdir $pkgbase/scripts
+cat > $pkgbase/scripts/postinstall <<EOF
+#!/bin/sh
+/bin/launchctl load "/Library/LaunchDaemons/com.dcpomatic.disk.writer.plist"
+exit 0
+EOF
+chmod gou+x $pkgbase/scripts/postinstall
+
+find "$pkgbin" -iname "*.dylib" -print0 | while IFS= read -r -d '' f; do
+ sign "$f"
+done
+sign "$pkgbin/dcpomatic2_disk_writer"
+
+mkdir -p "$pkgroot/Library/Application Support/com.dcpomatic"
+mv $pkgbin/* "$pkgroot/Library/Application Support/com.dcpomatic/"
+pkgbuild --root $pkgroot --identifier com.dcpomatic.disk.writer --scripts $pkgbase/scripts "DCP-o-matic Disk Writer.pkg"
+
+make_dmg "$appdir" "DCP-o-matic Disk Writer.pkg" "DCP-o-matic Disk Writer" com.dcpomatic.disk
diff --git a/platform/osx/set_paths.sh b/platform/osx/set_paths.sh
new file mode 100644
index 000000000..f5e1bd80f
--- /dev/null
+++ b/platform/osx/set_paths.sh
@@ -0,0 +1,12 @@
+base=$HOME/dcpomatic
+env=$HOME/osx-environment
+sdk=$HOME/SDK
+
+export CPPFLAGS= LDFLAGS="-L$base/lib -L$env/lib -isysroot $sdk/MacOSX10.9.sdk -arch x86_64"
+export LINKFLAGS="-L$base/lib -L$env/lib -isysroot $sdk/MacOSX10.9.sdk -arch x86_64"
+export MACOSX_DEPLOYMENT_TARGET=10.9
+export CXXFLAGS="-I$base/include -I$env/include -isysroot $sdk/MacOSX10.9.sdk -arch x86_64"
+export CFLAGS="-I$base/include -I$env/include -isysroot $sdk/MacOSX10.9.sdk -arch x86_64"
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$base/lib:$env/64/lib
+export PATH=$env/64/bin:$PATH
+export PKG_CONFIG_PATH=$env/64/lib/pkgconfig:$base/lib/pkgconfig
diff --git a/platform/osx/wscript b/platform/osx/wscript
index c1db9256b..da20065f5 100644
--- a/platform/osx/wscript
+++ b/platform/osx/wscript
@@ -5,3 +5,4 @@ def build(bld):
obj = bld(features='subst', source='dcpomatic2_batch.Info.plist.in', target='dcpomatic2_batch.Info.plist', version=bld.env.VERSION)
obj = bld(features='subst', source='dcpomatic2_player.Info.plist.in', target='dcpomatic2_player.Info.plist', version=bld.env.VERSION)
obj = bld(features='subst', source='dcpomatic2_playlist.Info.plist.in', target='dcpomatic2_playlist.Info.plist', version=bld.env.VERSION)
+ obj = bld(features='subst', source='dcpomatic2_disk.Info.plist.in', target='dcpomatic2_disk.Info.plist', version=bld.env.VERSION)
diff --git a/platform/windows/copy_deps.sh b/platform/windows/copy_deps.sh
new file mode 100644
index 000000000..5cb6a013a
--- /dev/null
+++ b/platform/windows/copy_deps.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+MXE=/opt/mxe/usr/x86_64-w64-mingw32.shared/bin
+
+dir=$1
+if [ "$dir" == "" ]; then
+ echo "Syntax: $0 <dir>"
+ exit 1
+fi
+
+cp $MXE/libgcc_s_seh-1.dll $dir
+cp $MXE/libstdc++-6.dll $dir
+cp $MXE/libboost*.dll $dir
+cp $MXE/libglibmm*.dll $dir
+cp $MXE/libcrypto*.dll $dir
+cp $MXE/libwinpthread*.dll $dir
+cp $MXE/wxbase*.dll $dir
+cp $MXE/wxmsw*.dll $dir
+cp $MXE/libcurl*.dll $dir
+cp $MXE/libxml*.dll $dir
+cp $MXE/libjpeg*.dll $dir
+cp $MXE/zlib*.dll $dir
+cp $MXE/libpng*.dll $dir
+cp $MXE/libtiff*.dll $dir
+cp $MXE/libssh*.dll $dir
+cp $MXE/libidn*.dll $dir
+cp $MXE/liblzma*.dll $dir
+cp $MXE/libiconv*.dll $dir
+cp $MXE/libxslt*.dll $dir
+cp $MXE/libltdl*.dll $dir
+cp $MXE/libintl*.dll $dir
+cp $MXE/libunistring*.dll $dir
+cp $MXE/libwebp*.dll $dir
+cp $MXE/libgcrypt*.dll $dir
+cp $MXE/libdl*.dll $dir
+cp $MXE/libgpg*.dll $dir
+cp $MXE/libcairo*.dll $dir
+cp $MXE/libfontconfig*.dll $dir
+cp $MXE/libglib*.dll $dir
+cp $MXE/icu*.dll $dir
+cp $MXE/libnettle*.dll $dir
+cp $MXE/libpango*.dll $dir
+cp $MXE/libsamplerate*.dll $dir
+cp $MXE/libzip*.dll $dir
+cp $MXE/libgmodule*.dll $dir
+cp $MXE/libgobject*.dll $dir
+cp $MXE/libsigc*.dll $dir
+cp $MXE/libpcre*.dll $dir
+cp $MXE/libx264*.dll $dir
+cp $MXE/libbz2*.dll $dir
+cp $MXE/libexpat*.dll $dir
+cp $MXE/libfreetype*.dll $dir
+cp $MXE/libffi*.dll $dir
+cp $MXE/libharfbuzz*.dll $dir
+cp $MXE/libpixman*.dll $dir
+cp $MXE/libnanomsg*.dll $dir
diff --git a/platform/windows/dcpomatic2_disk_debug.bat b/platform/windows/dcpomatic2_disk_debug.bat
new file mode 100644
index 000000000..f89a06add
--- /dev/null
+++ b/platform/windows/dcpomatic2_disk_debug.bat
@@ -0,0 +1 @@
+gdb.exe -x gdb_script dcpomatic2_disk.exe > %HOMEPATH%/Documents/dcpomatic_debug_log.txt
diff --git a/platform/windows/dcpomatic2_disk_writer.exe.manifest b/platform/windows/dcpomatic2_disk_writer.exe.manifest
new file mode 100644
index 000000000..7d922a0db
--- /dev/null
+++ b/platform/windows/dcpomatic2_disk_writer.exe.manifest
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="dcpomatic2_disk_writer" type="win32"/>
+ <description>DCP-o-matic Disk Writer</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/platform/windows/dcpomatic_disk.rc b/platform/windows/dcpomatic_disk.rc
new file mode 100644
index 000000000..e10e89e2f
--- /dev/null
+++ b/platform/windows/dcpomatic_disk.rc
@@ -0,0 +1,2 @@
+id ICON "../../graphics/windows/dcpomatic2_disk.ico"
+#include "wx-3.0/wx/msw/wx.rc"
diff --git a/platform/windows/dcpomatic_disk_writer.rc b/platform/windows/dcpomatic_disk_writer.rc
new file mode 100644
index 000000000..70138ed12
--- /dev/null
+++ b/platform/windows/dcpomatic_disk_writer.rc
@@ -0,0 +1,2 @@
+#include "winuser.h"
+1 RT_MANIFEST "dcpomatic2_disk_writer.exe.manifest"
diff --git a/platform/windows/set_paths.bat b/platform/windows/set_paths.bat
new file mode 100644
index 000000000..3a023fdd7
--- /dev/null
+++ b/platform/windows/set_paths.bat
@@ -0,0 +1,2 @@
+set DCPOMATIC=z:
+set PATH=%PATH%;%DCPOMATIC%\lib;%DCPOMATIC%\bin;%DCPOMATIC%\src\dcpomatic\build\src\lib;%DCPOMATIC%\src\dcpomatic\build\src\wx
diff --git a/platform/windows/wscript b/platform/windows/wscript
index db19c750e..77f9bd0cc 100644
--- a/platform/windows/wscript
+++ b/platform/windows/wscript
@@ -1,7 +1,7 @@
from __future__ import print_function
import os
-def write_installer(bits, windows_version, dcpomatic_version, debug, variant):
+def write_installer(bits, windows_version, dcpomatic_version, debug, variant, disk):
try:
os.makedirs('build/platform/windows')
except:
@@ -75,11 +75,10 @@ File "%static_deps%/bin/libintl-8.dll"
File "%static_deps%/bin/libboost_chrono-mt.dll"
File "%static_deps%/bin/libboost_filesystem-mt.dll"
File "%static_deps%/bin/libboost_system-mt.dll"
-File "%static_deps%/bin/libboost_thread_win32-mt.dll"
+File "%static_deps%/bin/libboost_thread-mt.dll"
File "%static_deps%/bin/libboost_date_time-mt.dll"
File "%static_deps%/bin/libboost_locale-mt.dll"
File "%static_deps%/bin/libboost_regex-mt.dll"
-File "%static_deps%/bin/libeay32.dll"
""", file=f)
if bits == 32:
@@ -129,15 +128,14 @@ File "%static_deps%/bin/libxslt-1.dll"
File "%static_deps%/bin/libffi-6.dll"
File "%static_deps%/bin/openssl.exe"
File "%static_deps%/bin/libcurl-4.dll"
-File "%static_deps%/bin/ssleay32.dll"
-File "%static_deps%/bin/libzip-4.dll"
+File "%static_deps%/bin/libzip.dll"
File "%static_deps%/bin/libcairomm-1.0-1.dll"
File "%static_deps%/bin/libpangomm-1.4-1.dll"
File "%static_deps%/bin/libsamplerate-0.dll"
-File "%static_deps%/bin/libnettle-6.dll"
-File "%static_deps%/bin/icuuc56.dll"
-File "%static_deps%/bin/icudt56.dll"
-File "%static_deps%/bin/icuin56.dll"
+File "%static_deps%/bin/libnettle-7.dll"
+File "%static_deps%/bin/icuuc65.dll"
+File "%static_deps%/bin/icudt65.dll"
+File "%static_deps%/bin/icuin65.dll"
File "%static_deps%/bin/liblzma-5.dll"
File "%static_deps%/bin/libpcre-1.dll"
File "%static_deps%/bin/libharfbuzz-0.dll"
@@ -146,26 +144,29 @@ File "%static_deps%/bin/liblcms2-2.dll"
File "%static_deps%/bin/libwinpthread-1.dll"
File "%static_deps%/bin/libgnutls-30.dll"
File "%static_deps%/bin/libgmp-10.dll"
-File "%static_deps%/bin/libhogweed-4.dll"
+File "%static_deps%/bin/libhogweed-5.dll"
File "%static_deps%/bin/libidn2-0.dll"
File "%static_deps%/bin/libunistring-2.dll"
File "%static_deps%/bin/libssh2-1.dll"
File "%static_deps%/bin/libgcrypt-20.dll"
-""", file=f)
-
- if bits == 32:
- print('File "%static_deps%/bin/libgpg-error-0.dll"', file=f)
- else:
- print('File "%static_deps%/bin/libgpg-error6-0.dll"', file=f)
-
- print("""
+File "%static_deps%/bin/libgpg-error-0.dll"
File "%static_deps%/bin/libpangoft2-1.0-0.dll"
-File "%static_deps%/bin/libx264-152.dll"
-
+File "%static_deps%/bin/libx264-155.dll"
+File "%static_deps%/bin/libwebp-7.dll"
+File "%static_deps%/bin/libcrypto-1_1-x64.dll"
+File "%static_deps%/bin/libltdl-7.dll"
+File "%static_deps%/bin/libdl.dll"
File "%cdist_deps%/bin/asdcp-carl.dll"
File "%cdist_deps%/bin/kumu-carl.dll"
""", file=f)
+ if disk:
+ print("""
+File "%static_deps%/bin/libnanomsg.dll"
+File "%cdist_deps%/lib/libblockdev.dll"
+File "%cdist_deps%/lib/liblwext4.dll"
+ """, file=f)
+
if windows_version == 'xp':
print("""
File "%cdist_deps%/bin/avcodec-57.dll"
@@ -208,6 +209,8 @@ File "%cdist_deps%/src/openssl/apps/openssl.exe"
print('File "%resources%/dcpomatic2_batch_debug.bat"', file=f)
print('File "%resources%/dcpomatic2_kdm_debug.bat"', file=f)
print('File "%resources%/dcpomatic2_player_debug.bat"', file=f)
+ if disk:
+ print('File "%resources%/dcpomatic2_disk_debug.bat"', file=f)
print('File "%mingw%/bin/gdb.exe"', file=f)
else:
print('File "%binaries%/src/wx/dcpomatic2-wx.dll"', file=f)
@@ -338,6 +341,13 @@ File "%binaries%/src/tools/dcpomatic2_kdm.exe"
File "%binaries%/src/tools/dcpomatic2_kdm_cli.exe"
""", file=f)
+ if disk:
+ print("""
+File "%binaries%/src/tools/dcpomatic2_disk.exe"
+File "%binaries%/src/tools/dcpomatic2_disk_writer.exe"
+File "%resources%/dcpomatic2_disk_writer.exe.manifest"
+ """, file=f)
+
print("""
File "%binaries%/src/tools/dcpomatic2_player.exe"
File "%binaries%/src/tools/dcpomatic2_playlist.exe"
@@ -348,6 +358,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Batch Converter debug.lnk" "$INSTDIR\\bin\\dcpomatic2_batch_debug.bat" ""', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 KDM Creator debug.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm_debug.bat" ""', file=f)
+ if disk:
+ print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Disk Writer debug.lnk" "$INSTDIR\\bin\\dcpomatic2_disk_debug.bat" ""', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\Uninstall DCP-o-matic 2 debug.lnk" "$INSTDIR\\Uninstall.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Player debug.lnk" "$INSTDIR\\bin\\dcpomatic2_player_debug.bat" ""', file=f)
print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug" "DisplayName" "DCP-o-matic 2 debug (remove only)"', file=f)
@@ -357,6 +369,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Batch Converter.lnk" "$INSTDIR\\bin\\dcpomatic2_batch.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 KDM Creator.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm.exe"', file=f)
+ if disk:
+ print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Disk Writer.lnk" "$INSTDIR\\bin\\dcpomatic2_disk.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\Uninstall DCP-o-matic 2.lnk" "$INSTDIR\\Uninstall.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Player.lnk" "$INSTDIR\\bin\\dcpomatic2_player.exe"', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Playlist Editor.lnk" "$INSTDIR\\bin\\dcpomatic2_playlist.exe"', file=f)
@@ -372,6 +386,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat" ""', file=f)
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Batch Converter debug.lnk" "$INSTDIR\\bin\\dcpomatic2_batch_debug.bat" ""', file=f)
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 KDM Creator debug.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm_debug.bat" ""', file=f)
+ if disk:
+ print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer debug.lnk" "$INSTDIR\\bin\\dcpomatic2_disk_debug.bat" ""', file=f)
else:
print('Section "DCP-o-matic 2 desktop shortcuts" SEC_MASTER_DESKTOP', file=f)
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Player.lnk" "$INSTDIR\\bin\\dcpomatic2_player.exe"', file=f)
@@ -379,6 +395,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe" ""', file=f)
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Batch Converter.lnk" "$INSTDIR\\bin\\dcpomatic2_batch.exe"', file=f)
print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 KDM Creator.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm.exe"', file=f)
+ if disk:
+ print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer.lnk" "$INSTDIR\\bin\\dcpomatic2_disk.exe"', file=f)
print("SectionEnd", file=f)
@@ -396,7 +414,7 @@ SectionEnd
print("""
Section "Encode server desktop shortcuts" SEC_SERVER_DESKTOP
-CreateShortCut "$DESKTOP\\DCP-o-matic 2 encode server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" ""
+CreateShortCut "$DESKTOP\\DCP-o-matic 2 Encode Server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" ""
SectionEnd
""", file=f)
@@ -407,8 +425,8 @@ SectionEnd
else:
print('LangString DESC_SEC_MASTER ${LANG_ENGLISH} "DCP-o-matic 2"', file=f)
print('LangString DESC_SEC_MASTER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 desktop shortcuts"', file=f)
- print('LangString DESC_SEC_SERVER ${LANG_ENGLISH} "DCP-o-matic 2 encode server"', file=f)
- print('LangString DESC_SEC_SERVER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 encode server desktop shortcuts"', file=f)
+ print('LangString DESC_SEC_SERVER ${LANG_ENGLISH} "DCP-o-matic 2 Encode Server"', file=f)
+ print('LangString DESC_SEC_SERVER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 Encode Server desktop shortcuts"', file=f)
print("""
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@@ -436,6 +454,7 @@ RMDir "$INSTDIR"
Delete "$DESKTOP\\DCP-o-matic 2 debug.lnk"
Delete "$DESKTOP\\DCP-o-matic 2 Batch Converter debug.lnk"
Delete "$DESKTOP\\DCP-o-matic 2 KDM Creator debug.lnk"
+Delete "$DESKTOP\\DCP-o-matic 2 Disk Writer debug.lnk"
Delete "$SMPROGRAMS\\DCP-o-matic 2 debug\\*.*"
RmDir "$SMPROGRAMS\\DCP-o-matic 2 debug"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2 debug"
@@ -451,6 +470,7 @@ Delete "$DESKTOP\\DCP-o-matic 2.lnk"
Delete "$DESKTOP\\DCP-o-matic 2 Batch Converter.lnk"
Delete "$DESKTOP\\DCP-o-matic 2 Encode Server.lnk"
Delete "$DESKTOP\\DCP-o-matic 2 KDM creator.lnk"
+Delete "$DESKTOP\\DCP-o-matic 2 Disk Writer.lnk"
Delete "$SMPROGRAMS\\DCP-o-matic 2\\*.*"
RmDir "$SMPROGRAMS\\DCP-o-matic 2"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2"
@@ -460,7 +480,7 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U
def build(bld):
- write_installer(32, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
- write_installer(64, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
- write_installer(32, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
- write_installer(64, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
+ write_installer(32, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+ write_installer(64, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+ write_installer(32, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+ write_installer(64, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)