diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-02 23:03:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-02 23:03:08 +0100 |
| commit | a0856e3fbef17f24073b01cb96be6bbcb229ecbc (patch) | |
| tree | 13fd6191f2c4d82943cbcfa1f34688552cfc1f8e | |
| parent | e6d086fff404d9fe5ac080f9e75334eeb315c1da (diff) | |
| parent | 42866530db49e0faf367ad28a55c658be60951bf (diff) | |
Merge master.
63 files changed, 399 insertions, 229 deletions
@@ -1,3 +1,31 @@ +2013-05-31 Carl Hetherington <cth@carlh.net> + + * Version 0.94beta1 released. + +2013-05-31 Carl Hetherington <cth@carlh.net> + + * Fix ridiculous 100-frame limit on trim + in the GUI. + +2013-05-30 Carl Hetherington <cth@carlh.net> + + * Preserve the folder to put new films in + across openings of the new film dialog + (#143). + + * Various tweaks to video preview; number + frames from 1 (not 0), fix update of frame + on stop. + + * Fix missing shortcut to GUI encode server + on Linux (#151). + + * Fix incorrect frame display on setting a new + content video (#147). + + * Fix problems with mistaken re-use of video + MXFs after trims have changed. + 2013-05-20 Carl Hetherington <cth@carlh.net> * Version 0.93 released. diff --git a/NOTES b/NOTES deleted file mode 100644 index 245017e0d..000000000 --- a/NOTES +++ /dev/null @@ -1,4 +0,0 @@ - -... perhaps generate the CPL hash on the fly -Make check of hashes optional; recovery in general -Fix multi-reel or remove it
\ No newline at end of file @@ -21,26 +21,26 @@ def build(env, target): env.command('./waf') - if target.platform == 'linux': + if target.platform == 'linux' or target.platform == 'osx': env.command('./waf install') def package(env, target, version): if target.platform == 'windows': - shutil.copyfile('build/windows/installer.%s.nsi' % target.bits, 'build/windows/installer2.%s.nsi' % target.bits) - env.command('sed -i "s~%%resources%%~%s/windows~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) - env.command('sed -i "s~%%deps%%~%s~g" build/windows/installer2.%s.nsi' % (env.windows_prefix, target.bits)) - env.command('sed -i "s~%%binaries%%~%s/build~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) - env.command('sed -i "s~%%bits%%~32~g" build/windows/installer2.%s.nsi' % target.bits) - env.command('makensis build/windows/installer2.%s.nsi' % target.bits) - return os.path.abspath(glob.glob('build/windows/*%s*.exe' % target.bits)[0]) + shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits) + env.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) + env.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (env.windows_prefix, target.bits)) + env.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) + env.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits) + env.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits) + return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0]) elif target.platform == 'linux': if target.bits == 32: cpu = 'i386' else: cpu = 'amd64' - shutil.copyfile('builds/control-%s-%d' % (target.version, target.bits), 'debian/control') + shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control') env.command('./waf dist') f = open('debian/files', 'w') print >>f,'dcpomatic_%s-1_%s.deb video extra' % (version, cpu) @@ -62,6 +62,9 @@ def package(env, target, version): debs.append(os.path.abspath(p)) return debs + elif target.platform == 'osx': + env.command('bash platform/osx/make_dmg.sh') + return os.path.abspath(glob.glob('build/platform/osx/DVD-o-matic*.dmg')[0]) def make_pot(env): env.command('./waf pot') diff --git a/ffmpeg-versions b/ffmpeg-versions deleted file mode 100644 index caf166c99..000000000 --- a/ffmpeg-versions +++ /dev/null @@ -1 +0,0 @@ -6912e7a008acd1464a63b0a00779a3de81b9a8ab 0.64 diff --git a/build-all-ffmpeg b/hacks/build-all-ffmpeg index a3d197c28..a3d197c28 100755 --- a/build-all-ffmpeg +++ b/hacks/build-all-ffmpeg diff --git a/optimise/8proc.log b/hacks/optimise/8proc.log index edc40d97a..edc40d97a 100644 --- a/optimise/8proc.log +++ b/hacks/optimise/8proc.log diff --git a/optimise/analog b/hacks/optimise/analog index 174300810..174300810 100755 --- a/optimise/analog +++ b/hacks/optimise/analog diff --git a/optimise/plotlog b/hacks/optimise/plotlog index 55b6fb871..55b6fb871 100755 --- a/optimise/plotlog +++ b/hacks/optimise/plotlog diff --git a/splitchapters b/hacks/splitchapters index 1e5cff084..1e5cff084 100755 --- a/splitchapters +++ b/hacks/splitchapters diff --git a/icons/256x256/dvdomatic.png b/icons/256x256/dvdomatic.png Binary files differnew file mode 100644 index 000000000..ea02e12c0 --- /dev/null +++ b/icons/256x256/dvdomatic.png diff --git a/icons/512x512/dvdomatic.png b/icons/512x512/dvdomatic.png Binary files differnew file mode 100644 index 000000000..65b5012de --- /dev/null +++ b/icons/512x512/dvdomatic.png diff --git a/icons/dvdomatic.icns b/icons/dvdomatic.icns Binary files differnew file mode 100644 index 000000000..ef1208ea8 --- /dev/null +++ b/icons/dvdomatic.icns diff --git a/icons/dvdomatic.iconset/icon_128x128.png b/icons/dvdomatic.iconset/icon_128x128.png Binary files differnew file mode 100644 index 000000000..9936b39af --- /dev/null +++ b/icons/dvdomatic.iconset/icon_128x128.png diff --git a/icons/dvdomatic.iconset/icon_128x128@2x.png b/icons/dvdomatic.iconset/icon_128x128@2x.png Binary files differnew file mode 100644 index 000000000..9936b39af --- /dev/null +++ b/icons/dvdomatic.iconset/icon_128x128@2x.png diff --git a/icons/dvdomatic.iconset/icon_16x16.png b/icons/dvdomatic.iconset/icon_16x16.png Binary files differnew file mode 100644 index 000000000..3c5a10f2d --- /dev/null +++ b/icons/dvdomatic.iconset/icon_16x16.png diff --git a/icons/dvdomatic.iconset/icon_16x16@2x.png b/icons/dvdomatic.iconset/icon_16x16@2x.png Binary files differnew file mode 100644 index 000000000..3c5a10f2d --- /dev/null +++ b/icons/dvdomatic.iconset/icon_16x16@2x.png diff --git a/icons/dvdomatic.iconset/icon_256x256.png b/icons/dvdomatic.iconset/icon_256x256.png Binary files differnew file mode 100644 index 000000000..ea02e12c0 --- /dev/null +++ b/icons/dvdomatic.iconset/icon_256x256.png diff --git a/icons/dvdomatic.iconset/icon_256x256@2x.png b/icons/dvdomatic.iconset/icon_256x256@2x.png Binary files differnew file mode 100644 index 000000000..ea02e12c0 --- /dev/null +++ b/icons/dvdomatic.iconset/icon_256x256@2x.png diff --git a/icons/dvdomatic.iconset/icon_32x32.png b/icons/dvdomatic.iconset/icon_32x32.png Binary files differnew file mode 100644 index 000000000..8cecf08f8 --- /dev/null +++ b/icons/dvdomatic.iconset/icon_32x32.png diff --git a/icons/dvdomatic.iconset/icon_32x32@2x.png b/icons/dvdomatic.iconset/icon_32x32@2x.png Binary files differnew file mode 100644 index 000000000..8cecf08f8 --- /dev/null +++ b/icons/dvdomatic.iconset/icon_32x32@2x.png diff --git a/icons/dvdomatic.iconset/icon_512x512.png b/icons/dvdomatic.iconset/icon_512x512.png Binary files differnew file mode 100644 index 000000000..65b5012de --- /dev/null +++ b/icons/dvdomatic.iconset/icon_512x512.png diff --git a/icons/dvdomatic.iconset/icon_512x512@2x.png b/icons/dvdomatic.iconset/icon_512x512@2x.png Binary files differnew file mode 100644 index 000000000..65b5012de --- /dev/null +++ b/icons/dvdomatic.iconset/icon_512x512@2x.png diff --git a/icons/make.sh b/icons/make.sh new file mode 100755 index 000000000..36129d625 --- /dev/null +++ b/icons/make.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +width=$1 +height=$2 +output=$3 + +inkscape -z -e $output -w $width -h $height -D finish-trace.svg diff --git a/icons/make_icns.sh b/icons/make_icns.sh new file mode 100755 index 000000000..983379ea4 --- /dev/null +++ b/icons/make_icns.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +iconutil --convert icns --output dvdomatic.icns dvdomatic.iconset/ + diff --git a/builds/control-12.04-32 b/platform/linux/control-12.04-32 index dc104958a..dc104958a 100644 --- a/builds/control-12.04-32 +++ b/platform/linux/control-12.04-32 diff --git a/builds/control-12.04-64 b/platform/linux/control-12.04-64 index 09c636e4a..09c636e4a 100644 --- a/builds/control-12.04-64 +++ b/platform/linux/control-12.04-64 diff --git a/builds/control-12.10-32 b/platform/linux/control-12.10-32 index 1330b3e5f..1330b3e5f 100644 --- a/builds/control-12.10-32 +++ b/platform/linux/control-12.10-32 diff --git a/builds/control-12.10-64 b/platform/linux/control-12.10-64 index ea1c491ed..ea1c491ed 100644 --- a/builds/control-12.10-64 +++ b/platform/linux/control-12.10-64 diff --git a/platform/linux/dvdomatic.desktop.in b/platform/linux/dvdomatic.desktop.in new file mode 100644 index 000000000..65067eb3b --- /dev/null +++ b/platform/linux/dvdomatic.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Exec=@PREFIX@/bin/dvdomatic +Name=DVD-o-matic +Icon=dvdomatic +Comment=DCP generator +Categories=AudioVideo;Video diff --git a/dvdomatic_batch.desktop.in b/platform/linux/dvdomatic_batch.desktop.in index 8150fe849..8150fe849 100644 --- a/dvdomatic_batch.desktop.in +++ b/platform/linux/dvdomatic_batch.desktop.in diff --git a/platform/linux/servomatic.desktop.in b/platform/linux/servomatic.desktop.in new file mode 100644 index 000000000..572b4c64c --- /dev/null +++ b/platform/linux/servomatic.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Exec=@PREFIX@/bin/servomatic_gui +Name=DVD-o-matic Encode Server +Icon=dvdomatic +Comment=DCP generator +Categories=AudioVideo;Video diff --git a/platform/linux/wscript b/platform/linux/wscript new file mode 100644 index 000000000..1d9054b32 --- /dev/null +++ b/platform/linux/wscript @@ -0,0 +1,19 @@ +def build(bld): + d = { 'PREFIX' : '${PREFIX' } + + obj = bld(features = 'subst') + obj.source = 'dvdomatic.desktop.in' + obj.target = 'dvdomatic.desktop' + obj.dict = d + + obj = bld(features = 'subst') + obj.source = 'dvdomatic_batch.desktop.in' + obj.target = 'dvdomatic_batch.desktop' + obj.dict = d + + obj = bld(features = 'subst') + obj.source = 'servomatic.desktop.in' + obj.target = 'servomatic.desktop' + obj.dict = d + + bld.install_files('${PREFIX}/share/applications', ['dvdomatic.desktop', 'dvdomatic_batch.desktop', 'servomatic.desktop']) diff --git a/platform/osx/Info.plist.in b/platform/osx/Info.plist.in new file mode 100644 index 000000000..c904d91dd --- /dev/null +++ b/platform/osx/Info.plist.in @@ -0,0 +1,35 @@ +<?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>dvdomatic</string> + <key>CFBundleGetInfoString</key> + <string>DCP generator</string> + <key>CFBundleIconFile</key> + <string>DVD-o-matic.icns</string> + <key>CFBundleIdentifier</key> + <string>net.carlh.dvdomatic</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>DVD-o-matic</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>LSUIElement</key> + <string>0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> + @ENV@ +</dict> +</plist> diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh new file mode 100644 index 000000000..d9e36c390 --- /dev/null +++ b/platform/osx/make_dmg.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +version=`cat wscript | egrep ^VERSION | awk '{print $3}' | sed -e "s/'//g"` + +# DMG size in megabytes +DMG_SIZE=256 +WORK=build/platform/osx +ENV=/Users/carl/Environments/osx/10.8 +DEPS=/Users/carl/cdist + +appdir="DVD-o-matic.app" +approot=$appdir/Contents +libs=$approot/lib +macos=$approot/MacOS +resources=$approot/Resources + +rm -rf $WORK/$appdir +mkdir -p $WORK/$macos +mkdir -p $WORK/$libs +mkdir -p $WORK/$resources + +cp build/src/tools/dvdomatic $WORK/$macos/ +cp build/src/lib/libdvdomatic.dylib $WORK/$libs/ +cp build/src/wx/libdvdomatic-wx.dylib $WORK/$libs/ +cp $DEPS/lib/libdcp.dylib $WORK/$libs/ +cp $DEPS/lib/libasdcp-libdcp.dylib $WORK/$libs/ +cp $DEPS/lib/libkumu-libdcp.dylib $WORK/$libs/ +cp $DEPS/lib/libopenjpeg*.dylib $WORK/$libs/ +cp $DEPS/lib/libavformat*.dylib $WORK/$libs/ +cp $DEPS/lib/libavfilter*.dylib $WORK/$libs/ +cp $DEPS/lib/libavutil*.dylib $WORK/$libs/ +cp $DEPS/lib/libavcodec*.dylib $WORK/$libs/ +cp $DEPS/lib/libswscale*.dylib $WORK/$libs/ +cp $DEPS/lib/libpostproc*.dylib $WORK/$libs/ +cp $DEPS/lib/libswresample*.dylib $WORK/$libs/ +cp $ENV/lib/libboost_system.dylib $WORK/$libs/ +cp $ENV/lib/libboost_filesystem.dylib $WORK/$libs/ +cp $ENV/lib/libboost_thread.dylib $WORK/$libs/ +cp $ENV/lib/libboost_date_time.dylib $WORK/$libs/ +cp $ENV/lib/libssl*.dylib $WORK/$libs/ +cp $ENV/lib/libcrypto*.dylib $WORK/$libs/ +cp $ENV/lib/libxml++-2.6*.dylib $WORK/$libs/ +cp $ENV/lib/libxml2*.dylib $WORK/$libs/ +cp $ENV/lib/libglibmm-2.4*.dylib $WORK/$libs/ +cp $ENV/lib/libgobject*.dylib $WORK/$libs/ +cp $ENV/lib/libgthread*.dylib $WORK/$libs/ +cp $ENV/lib/libgmodule*.dylib $WORK/$libs/ +cp $ENV/lib/libsigc*.dylib $WORK/$libs/ +cp $ENV/lib/libglib-2*.dylib $WORK/$libs/ +cp $ENV/lib/libintl*.dylib $WORK/$libs/ +cp $ENV/lib/libsndfile*.dylib $WORK/$libs/ +cp $ENV/lib/libMagick++*.dylib $WORK/$libs/ +cp $ENV/lib/libMagickCore*.dylib $WORK/$libs/ +cp $ENV/lib/libMagickWand*.dylib $WORK/$libs/ +cp $ENV/lib/libssh*.dylib $WORK/$libs/ +cp $ENV/lib/libwx*.dylib $WORK/$libs/ +cp $ENV/lib/libfontconfig*.dylib $WORK/$libs/ +cp $ENV/lib/libfreetype*.dylib $WORK/$libs/ +cp $ENV/lib/libexpat*.dylib $WORK/$libs/ + +for obj in $WORK/$macos/dvdomatic $WORK/$libs/*.dylib; do + deps=`otool -L $obj | awk '{print $1}' | egrep "(/Users/carl|libboost|libssh)"` + changes="" + for dep in $deps; do + base=`basename $dep` + changes="$changes -change $dep @executable_path/../lib/$base" + done + if test "x$changes" != "x"; then + install_name_tool $changes $obj + fi +done + + +cp build/platform/osx/Info.plist $WORK/$approot +cp icons/dvdomatic.icns $WORK/$resources/DVD-o-matic.icns + +tmp_dmg=$WORK/dvdomatic_tmp.dmg +dmg="$WORK/DVD-o-matic $version.dmg" +vol_name=DVD-o-matic-$version + +mkdir -p $WORK/$vol_name + +rm -f $tmp_dmg "$dmg" +hdiutil create -megabytes $DMG_SIZE $tmp_dmg +device=$(hdid -nomount $tmp_dmg | grep Apple_HFS | cut -f 1 -d ' ') +newfs_hfs -v ${vol_name} $device +mount -t hfs "$device" $WORK/$vol_name + +cp -r $WORK/$appdir $WORK/$vol_name + +echo ' + tell application "Finder" + tell disk "'$vol_name'" + open + 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, 800, 440} + set theViewOptions to the icon view options of container window + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 64 + make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} + set position of item "DVD-o-matic.app" of container window to {90, 100} + set position of item "Applications" of container window to {310, 100} + close + open + update without registering applications + delay 5 + eject + end tell + end tell +' | osascript + +chmod -Rf go-w $WORK/mnt +sync + +umount $device +hdiutil eject $device +hdiutil convert -format UDZO $tmp_dmg -imagekey zlib-level=9 -o "$dmg" +sips -i $WORK/$resources/DVD-o-matic.icns +DeRez -only icns $WORK/$resources/DVD-o-matic.icns > $WORK/$resources/DVD-o-matic.rsrc +Rez -append $WORK/$resources/DVD-o-matic.rsrc -o "$dmg" +SetFile -a C "$dmg" + diff --git a/platform/osx/waf b/platform/osx/waf new file mode 100755 index 000000000..7423eb973 --- /dev/null +++ b/platform/osx/waf @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +ENV=/Users/carl/Environments/osx/10.8 +DEPS=/Users/carl/cdist + +export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig:$ENV/lib/pkgconfig +export LINKFLAGS="-L$ENV/lib" +export CXXFLAGS="-I$ENV/include" +export PATH=$PATH:$ENV/bin +./waf $* + diff --git a/platform/osx/wscript b/platform/osx/wscript new file mode 100644 index 000000000..d79c95bb5 --- /dev/null +++ b/platform/osx/wscript @@ -0,0 +1,2 @@ +def build(bld): + bld.new_task_gen(features='subst', source='Info.plist.in', target='Info.plist', version=bld.env.VERSION) diff --git a/windows/.gtkrc-2.0 b/platform/windows/.gtkrc-2.0 index 0ea1d69c9..0ea1d69c9 100755 --- a/windows/.gtkrc-2.0 +++ b/platform/windows/.gtkrc-2.0 diff --git a/windows/installer.nsi.32.in b/platform/windows/installer.nsi.32.in index a7867c618..664904767 100644 --- a/windows/installer.nsi.32.in +++ b/platform/windows/installer.nsi.32.in @@ -11,7 +11,7 @@ outFile "DCP-o-matic @version@ 32-bit Installer.exe" InstallDir "$PROGRAMFILES\DCP-o-matic" !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "../../COPYING" +!insertmacro MUI_PAGE_LICENSE "../../../COPYING" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH @@ -28,9 +28,9 @@ Section "install" "Installation info" SetOutPath "$INSTDIR\bin" File "%deps%/bin/asdcp-libdcp.dll" -File "%deps%/bin/avcodec-54.dll" +File "%deps%/bin/avcodec-55.dll" File "%deps%/bin/avfilter-3.dll" -File "%deps%/bin/avformat-54.dll" +File "%deps%/bin/avformat-55.dll" File "%deps%/bin/avutil-52.dll" File "%deps%/bin/dcp.dll" File "%deps%/bin/libintl-8.dll" diff --git a/windows/installer.nsi.64.in b/platform/windows/installer.nsi.64.in index 34b7fe8f6..fd1237727 100644 --- a/windows/installer.nsi.64.in +++ b/platform/windows/installer.nsi.64.in @@ -13,7 +13,7 @@ outFile "DCP-o-matic @version@ 64-bit Installer.exe" InstallDir "$PROGRAMFILES\DCP-o-matic" !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "../../COPYING" +!insertmacro MUI_PAGE_LICENSE "../../../COPYING" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH @@ -38,9 +38,9 @@ ${EndIf} SetOutPath "$INSTDIR\bin" File "%deps%/bin/asdcp-libdcp.dll" -File "%deps%/bin/avcodec-54.dll" +File "%deps%/bin/avcodec-55.dll" File "%deps%/bin/avfilter-3.dll" -File "%deps%/bin/avformat-54.dll" +File "%deps%/bin/avformat-55.dll" File "%deps%/bin/avutil-52.dll" File "%deps%/bin/dcp.dll" File "%deps%/bin/libintl-8.dll" diff --git a/windows/wscript b/platform/windows/wscript index 585cebef1..585cebef1 100644 --- a/windows/wscript +++ b/platform/windows/wscript diff --git a/run/dvdomatic-osx b/run/dvdomatic-osx new file mode 100755 index 000000000..ac42c3186 --- /dev/null +++ b/run/dvdomatic-osx @@ -0,0 +1,15 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:build/src/lib:build/src:/Users/carl/Environments/osx/10.8/lib +if [ "$1" == "--debug" ]; then + shift + gdb --args build/src/tools/dvdomatic "$*" +elif [ "$1" == "--valgrind" ]; then + shift + valgrind --tool="memcheck" build/src/tools/dvdomatic $* +elif [ "$1" == "--i18n" ]; then + shift + LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 build/src/tools/dvdomatic "$*" +else + build/src/tools/dvdomatic "$*" +fi diff --git a/run/makedcp-osx b/run/makedcp-osx new file mode 100755 index 000000000..1b95ecc5d --- /dev/null +++ b/run/makedcp-osx @@ -0,0 +1,15 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:build/src/lib:build/src:/Users/carl/Environments/osx/10.8/lib +if [ "$1" == "--debug" ]; then + shift + gdb --args build/src/tools/makedcp "$@" +elif [ "$1" == "--memcheck" ]; then + shift + valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/src/tools/makedcp "$@" +elif [ "$1" == "--massif" ]; then + shift + valgrind --tool="massif" build/src/tools/makedcp "$@" +else + build/src/tools/makedcp "$@" +fi diff --git a/src/lib/config.cc b/src/lib/config.cc index 978428b02..6fbd34d05 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -189,6 +189,8 @@ Config::file (bool old) const { boost::filesystem::path p; p /= g_get_user_config_dir (); + boost::system::error_code ec; + boost::filesystem::create_directory (p, ec); if (old) { p /= ".dvdomatic"; } else { diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 67587a564..1d000b62b 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -31,7 +31,6 @@ #include <stdint.h> #include <boost/lexical_cast.hpp> extern "C" { -#include <tiffio.h> #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libswscale/swscale.h> diff --git a/src/lib/film.cc b/src/lib/film.cc index ef29d35fd..57e3791a2 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -170,6 +170,10 @@ Film::video_state_identifier () const << "_" << j2k_bandwidth() << "_" << lexical_cast<int> (colour_lut()); + if (trim_type() == ENCODE) { + s << "_" << trim_start() << "_" << trim_end(); + } + if (ab()) { pair<string, string> fa = Filter::ffmpeg_strings (Config::instance()->reference_filters()); s << "ab_" << Config::instance()->reference_scaler()->id() << "_" << fa.first << "_" << fa.second; diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc index 7ec2466c5..472480de3 100644 --- a/src/lib/filter_graph.cc +++ b/src/lib/filter_graph.cc @@ -154,6 +154,7 @@ FilterGraph::process (AVFrame* frame) } images.push_back (shared_ptr<Image> (new SimpleImage (_frame))); + av_frame_unref (_frame); } return images; diff --git a/src/lib/image.cc b/src/lib/image.cc index a12c61b3e..f0a38f4e9 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -68,7 +68,7 @@ Image::lines (int n) const throw PixelFormatError (N_("lines()"), _pixel_format); } - return size().height / pow(2, d->log2_chroma_h); + return size().height / pow(2.0f, d->log2_chroma_h); } /** @return Number of components */ @@ -407,13 +407,13 @@ Image::bytes_per_pixel (int c) const bpp[0] = floor ((d->comp[0].depth_minus1 + 1 + 7) / 8); if (d->nb_components > 1) { - bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if (d->nb_components > 2) { - bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if (d->nb_components > 3) { - bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if ((d->flags & PIX_FMT_PLANAR) == 0) { diff --git a/src/lib/subtitle.cc b/src/lib/subtitle.cc index eafccd9b5..2815fccd8 100644 --- a/src/lib/subtitle.cc +++ b/src/lib/subtitle.cc @@ -110,13 +110,13 @@ Subtitle::Subtitle (Position p, shared_ptr<Image> i) * in the coordinate space of the source. * @param subtitle_scale scaling factor to apply to the subtitle image. */ -Rect +dvdomatic::Rect subtitle_transformed_area ( float target_x_scale, float target_y_scale, - Rect sub_area, int subtitle_offset, float subtitle_scale + dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale ) { - Rect tx; + dvdomatic::Rect tx; sub_area.y += subtitle_offset; @@ -145,8 +145,8 @@ subtitle_transformed_area ( } /** @return area that this subtitle takes up, in the original uncropped source's coordinate space */ -Rect +dvdomatic::Rect Subtitle::area () const { - return Rect (_position.x, _position.y, _image->size().width, _image->size().height); + return dvdomatic::Rect (_position.x, _position.y, _image->size().width, _image->size().height); } diff --git a/src/lib/subtitle.h b/src/lib/subtitle.h index 52bd35923..c3929d676 100644 --- a/src/lib/subtitle.h +++ b/src/lib/subtitle.h @@ -48,17 +48,17 @@ public: return _image; } - Rect area () const; + dvdomatic::Rect area () const; private: Position _position; boost::shared_ptr<Image> _image; }; -Rect +dvdomatic::Rect subtitle_transformed_area ( float target_x_scale, float target_y_scale, - Rect sub_area, int subtitle_offset, float subtitle_scale + dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale ); /** A Subtitle class with details of the time over which it should be shown */ diff --git a/src/lib/util.h b/src/lib/util.h index 65859309d..be70eb259 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -45,6 +45,8 @@ extern "C" { #define TIMING(...) #endif +#undef check + /** The maximum number of audio channels that we can cope with */ #define MAX_AUDIO_CHANNELS 6 diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 18a128a5d..84dee81d1 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -39,6 +39,7 @@ using boost::optional; VideoContent::VideoContent (shared_ptr<const Film> f, Time s, ContentVideoFrame len) : Content (f, s) , _video_length (len) + , _video_frame_rate (0) , _ratio (0) { @@ -47,6 +48,7 @@ VideoContent::VideoContent (shared_ptr<const Film> f, Time s, ContentVideoFrame VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p) : Content (f, p) , _video_length (0) + , _video_frame_rate (0) , _ratio (0) { diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 8d3de53ff..ebd647861 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -23,6 +23,9 @@ #ifdef __WXMSW__ #include <shellapi.h> #endif +#ifdef __WXOSX__ +#include <ApplicationServices/ApplicationServices.h> +#endif #include <wx/aboutdlg.h> #include <wx/stdpaths.h> #include <wx/cmdline.h> @@ -142,13 +145,10 @@ enum { ID_file_open, ID_file_save, ID_file_properties, - ID_file_quit, - ID_edit_preferences, ID_jobs_make_dcp, ID_jobs_send_dcp_to_tms, ID_jobs_show_dcp, ID_jobs_analyse_audio, - ID_help_about }; void @@ -161,11 +161,17 @@ setup_menu (wxMenuBar* m) add_item (file, _("&Save"), ID_file_save, NEEDS_FILM); file->AppendSeparator (); add_item (file, _("&Properties..."), ID_file_properties, NEEDS_FILM); +#ifndef __WXOSX__ file->AppendSeparator (); - add_item (file, _("&Quit"), ID_file_quit, ALWAYS); +#endif + add_item (file, _("&Exit"), wxID_EXIT, ALWAYS); +#ifdef __WXOSX__ + add_item (file, _("&Preferences..."), wxID_PREFERENCES, ALWAYS); +#else wxMenu* edit = new wxMenu; - add_item (edit, _("&Preferences..."), ID_edit_preferences, ALWAYS); + add_item (edit, _("&Preferences..."), wxID_PREFERENCES, ALWAYS); +#endif jobs_menu = new wxMenu; add_item (jobs_menu, _("&Make DCP"), ID_jobs_make_dcp, NEEDS_FILM); @@ -175,10 +181,16 @@ setup_menu (wxMenuBar* m) add_item (jobs_menu, _("&Analyse audio"), ID_jobs_analyse_audio, NEEDS_FILM); wxMenu* help = new wxMenu; - add_item (help, _("About"), ID_help_about, ALWAYS); +#ifdef __WXOSX__ + add_item (help, _("About DVD-o-matic"), wxID_ABOUT, ALWAYS); +#else + add_item (help, _("About"), wxID_ABOUT, ALWAYS); +#endif m->Append (file, _("&File")); +#ifndef __WXOSX__ m->Append (edit, _("&Edit")); +#endif m->Append (jobs_menu, _("&Jobs")); m->Append (help, _("&Help")); } @@ -204,13 +216,13 @@ public: Connect (ID_file_open, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_open)); Connect (ID_file_save, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_save)); Connect (ID_file_properties, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_properties)); - Connect (ID_file_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_quit)); - Connect (ID_edit_preferences, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::edit_preferences)); + Connect (wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_exit)); + Connect (wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::edit_preferences)); Connect (ID_jobs_make_dcp, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_make_dcp)); Connect (ID_jobs_send_dcp_to_tms, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_send_dcp_to_tms)); Connect (ID_jobs_show_dcp, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_show_dcp)); Connect (ID_jobs_analyse_audio, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_analyse_audio)); - Connect (ID_help_about, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::help_about)); + Connect (wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::help_about)); Connect (wxID_ANY, wxEVT_MENU_OPEN, wxMenuEventHandler (Frame::menu_opened)); @@ -342,7 +354,7 @@ private: d->Destroy (); } - void file_quit (wxCommandEvent &) + void file_exit (wxCommandEvent &) { maybe_save_then_delete_film (); Close (true); @@ -450,6 +462,12 @@ class App : public wxApp #ifdef DCPOMATIC_POSIX unsetenv ("UBUNTU_MENUPROXY"); +#endif + +#ifdef __WXOSX__ + ProcessSerialNumber serial; + GetCurrentProcess (&serial); + TransformProcessType (&serial, kProcessTransformToForegroundApplication); #endif wxInitAllImageHandlers (); diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index 152e063c1..d3a353154 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -102,8 +102,11 @@ public: wxBitmap bitmap (wxString::Format (wxT ("%s/taskbar_icon.png"), POSIX_ICON_PREFIX), wxBITMAP_TYPE_PNG); wxIcon icon; icon.CopyFromBitmap (bitmap); -#endif +#endif +#ifndef __WXOSX__ + /* XXX: fix this for OS X */ SetIcon (icon, std_to_wx ("DCP-o-matic encode server")); +#endif Connect (ID_status, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::status)); Connect (ID_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::quit)); diff --git a/src/tools/wscript b/src/tools/wscript index cddd07b7d..38d986f25 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -20,7 +20,7 @@ def build(bld): obj.use = ['libdcpomatic', 'libdcpomatic-wx'] obj.source = '%s.cc' % t if bld.env.TARGET_WINDOWS: - obj.source += ' ../../windows/dcpomatic.rc' + obj.source += ' ../../platform/windows/dcpomatic.rc' obj.target = t i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic', bld) diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index 46c64c9bf..fb02fea7b 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -43,7 +43,9 @@ AudioPlot::AudioPlot (wxWindow* parent) , _gain (0) , _smoothing (max_smoothing / 2) { +#ifndef __WXOSX__ SetDoubleBuffered (true); +#endif for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) { _channel_visible[i] = false; diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 3efd7857a..0b13b9c88 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -18,7 +18,7 @@ */ /** @file src/config_dialog.cc - * @brief A dialogue to edit DCP-o-matic configuration. + * @brief A dialogue to edit DVD-o-matic configuration. */ #include <iostream> @@ -43,7 +43,7 @@ using namespace std; using boost::bind; ConfigDialog::ConfigDialog (wxWindow* parent) - : wxDialog (parent, wxID_ANY, _("DCP-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) + : wxDialog (parent, wxID_ANY, _("DVD-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); _notebook = new wxNotebook (this, wxID_ANY); @@ -95,7 +95,7 @@ ConfigDialog::make_misc_panel () table->Add (_language, 1, wxEXPAND); table->AddSpacer (0); - wxStaticText* restart = add_label_to_sizer (table, _misc_panel, _("(restart DCP-o-matic to see language changes)")); + wxStaticText* restart = add_label_to_sizer (table, _misc_panel, _("(restart DVD-o-matic to see language changes)")); wxFont font = restart->GetFont(); font.SetStyle (wxFONTSTYLE_ITALIC); font.SetPointSize (font.GetPointSize() - 1); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 26f99db11..e1471d94e 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -1,5 +1,3 @@ -/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ - /* Copyright (C) 2012 Carl Hetherington <cth@carlh.net> @@ -65,7 +63,10 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p) , _display_frame_x (0) , _got_frame (false) { +#ifndef __WXOSX__ _panel->SetDoubleBuffered (true); +#endif + #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9 _panel->SetBackgroundStyle (wxBG_STYLE_PAINT); #endif @@ -196,9 +197,6 @@ FilmViewer::timer (wxTimerEvent &) return; } - _panel->Refresh (); - _panel->Update (); - get_frame (); if (_film->length()) { @@ -207,6 +205,9 @@ FilmViewer::timer (wxTimerEvent &) _slider->SetValue (new_slider_position); } } + + _panel->Refresh (); + _panel->Update (); } @@ -365,7 +366,8 @@ FilmViewer::process_video (shared_ptr<const Image> image, bool, Time t) _got_frame = true; double const fps = _film->dcp_video_frame_rate (); - _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps / TIME_HZ)))); + /* Count frame number from 1 ... not sure if this is the best idea */ + _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps / TIME_HZ)) + 1)); double w = static_cast<double>(t) / TIME_HZ; int const h = (w / 3600); diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc index 90c2d727e..737b07fbb 100644 --- a/src/wx/new_film_dialog.cc +++ b/src/wx/new_film_dialog.cc @@ -29,6 +29,8 @@ using namespace std; using namespace boost; +string NewFilmDialog::_directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())); + NewFilmDialog::NewFilmDialog (wxWindow* parent) : wxDialog (parent, wxID_ANY, _("New Film")) { @@ -49,7 +51,7 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent) #else _folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST); #endif - _folder->SetPath (std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())))); + _folder->SetPath (std_to_wx (_directory)); table->Add (_folder, 1, wxEXPAND); wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); @@ -61,6 +63,11 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent) overall_sizer->SetSizeHints (this); } +NewFilmDialog::~NewFilmDialog () +{ + _directory = wx_to_std (_folder->GetPath ()); +} + string NewFilmDialog::get_path () const { diff --git a/src/wx/new_film_dialog.h b/src/wx/new_film_dialog.h index 3d1253ecc..715f71f51 100644 --- a/src/wx/new_film_dialog.h +++ b/src/wx/new_film_dialog.h @@ -26,6 +26,7 @@ class NewFilmDialog : public wxDialog { public: NewFilmDialog (wxWindow *); + ~NewFilmDialog (); std::string get_path () const; @@ -35,5 +36,6 @@ private: DirPickerCtrl* _folder; #else wxDirPickerCtrl* _folder; -#endif +#endif + static std::string _directory; }; diff --git a/test/wscript b/test/wscript index 61c391663..2fbbdacbf 100644 --- a/test/wscript +++ b/test/wscript @@ -1,9 +1,13 @@ def configure(conf): + boost_test_suffix='' + if conf.env.TARGET_WINDOWS: + boost_test_suffix='-mt' + conf.check_cxx(fragment = """ #define BOOST_TEST_MODULE Config test\n #include <boost/test/unit_test.hpp>\n int main() {} - """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework-mt', uselib_store = 'BOOST_TEST') + """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST') def build(bld): obj = bld(features = 'cxx cxxprogram') diff --git a/version-test.py b/version-test.py deleted file mode 100644 index 47b4159fc..000000000 --- a/version-test.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/python - -import version - -a = version.Version("0.51") -assert(a.major == 0) -assert(a.minor == 51) -assert(a.pre == False) -assert(a.beta == None) -assert(str(a) == "0.51") - -a.bump_and_to_pre() -assert(a.major == 0) -assert(a.minor == 52) -assert(a.pre == True) -assert(a.beta == None) -assert(str(a) == "0.52pre") - -a.bump() -assert(a.major == 0) -assert(a.minor == 53) -assert(a.pre == False) -assert(a.beta == None) -assert(str(a) == "0.53") - -a.to_pre() -a.bump_beta() -assert(a.major == 0) -assert(a.minor == 53) -assert(a.pre == False) -assert(a.beta == 1) -assert(str(a) == "0.53beta1") - -a.bump_beta() -assert(a.major == 0) -assert(a.minor == 53) -assert(a.pre == False) -assert(a.beta == 2) -assert(str(a) == "0.53beta2") - -a.to_release() -assert(a.major == 0) -assert(a.minor == 53) -assert(a.pre == False) -assert(a.beta == None) -assert(str(a) == "0.53") - -b = version.Version("1.42beta1") -assert(b.major == 1) -assert(b.minor == 42) -assert(b.pre == False) -assert(b.beta == 1) diff --git a/version.py b/version.py deleted file mode 100644 index 5b16352e1..000000000 --- a/version.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/python - -import os -import sys -import datetime -import shutil -import copy - -class Version: - def __init__(self, s): - self.pre = False - self.beta = None - - if s.startswith("'"): - s = s[1:] - if s.endswith("'"): - s = s[0:-1] - - if s.endswith('pre'): - s = s[0:-3] - self.pre = True - - b = s.find("beta") - if b != -1: - self.beta = int(s[b+4:]) - s = s[0:b] - - p = s.split('.') - self.major = int(p[0]) - self.minor = int(p[1]) - - def bump(self): - self.minor += 1 - self.pre = False - self.beta = None - - def to_pre(self): - self.pre = True - self.beta = None - - def bump_and_to_pre(self): - self.bump() - self.pre = True - self.beta = None - - def to_release(self): - self.pre = False - self.beta = None - - def bump_beta(self): - if self.pre: - self.pre = False - self.beta = 1 - elif self.beta is not None: - self.beta += 1 - elif self.beta is None: - self.beta = 1 - - def __str__(self): - s = '%d.%02d' % (self.major, self.minor) - if self.beta is not None: - s += 'beta%d' % self.beta - elif self.pre: - s += 'pre' - - return s - -def rewrite_wscript(method): - f = open('wscript', 'rw') - o = open('wscript.tmp', 'w') - version = None - while 1: - l = f.readline() - if l == '': - break - - s = l.split() - if len(s) == 3 and s[0] == "VERSION": - version = Version(s[2]) - method(version) - print "Writing %s" % version - print >>o,"VERSION = '%s'" % version - else: - print >>o,l, - f.close() - o.close() - - os.rename('wscript.tmp', 'wscript') - return version - -def append_to_changelog(version): - f = open('ChangeLog', 'r') - c = f.read() - f.close() - - f = open('ChangeLog', 'w') - now = datetime.datetime.now() - f.write('%d-%02d-%02d Carl Hetherington <cth@carlh.net>\n\n\t* Version %s released.\n\n' % (now.year, now.month, now.day, version)) - f.write(c) @@ -9,12 +9,13 @@ def options(opt): opt.load('compiler_cxx') opt.load('winres') - opt.add_option('--enable-debug', action='store_true', default = False, help = 'build with debugging information and without optimisation') - opt.add_option('--disable-gui', action='store_true', default = False, help = 'disable building of GUI tools') - opt.add_option('--target-windows', action='store_true', default = False, help = 'set up to do a cross-compile to Windows') - opt.add_option('--static', action='store_true', default = False, help = 'build statically, and link statically to libdcp and FFmpeg') - opt.add_option('--magickpp-config', action='store', default='Magick++-config', help = 'path to Magick++-config') - opt.add_option('--wx-config', action='store', default='wx-config', help = 'path to wx-config') + opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation') + opt.add_option('--disable-gui', action='store_true', default=False, help='disable building of GUI tools') + opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows') + opt.add_option('--static', action='store_true', default=False, help='build statically, and link statically to libdcp and FFmpeg') + opt.add_option('--magickpp-config', action='store', default='Magick++-config', help='path to Magick++-config') + opt.add_option('--wx-config', action='store', default='wx-config', help='path to wx-config') + opt.add_option('--osx', action='store_true', default=False, help='build on OS X') def configure(conf): conf.load('compiler_cxx') @@ -51,6 +52,8 @@ def configure(conf): conf.env.DISABLE_GUI = conf.options.disable_gui conf.env.STATIC = conf.options.static conf.env.VERSION = VERSION + conf.env.TARGET_OSX = conf.options.osx + conf.env.TARGET_LINUX = not conf.options.target_windows and not conf.options.osx if conf.options.enable_debug: conf.env.append_value('CXXFLAGS', ['-g', '-DDCPOMATIC_DEBUG']) @@ -192,21 +195,11 @@ def build(bld): bld.recurse('src') bld.recurse('test') if bld.env.TARGET_WINDOWS: - bld.recurse('windows') - - d = { 'PREFIX' : '${PREFIX' } - - obj = bld(features = 'subst') - obj.source = 'dcpomatic.desktop.in' - obj.target = 'dcpomatic.desktop' - obj.dict = d - - obj = bld(features = 'subst') - obj.source = 'dcpomatic_batch.desktop.in' - obj.target = 'dcpomatic_batch.desktop' - obj.dict = d - - bld.install_files('${PREFIX}/share/applications', ['dcpomatic.desktop', 'dcpomatic_batch.desktop']) + bld.recurse('platform/windows') + if bld.env.TARGET_LINUX: + bld.recurse('platform/linux') + if bld.env.TARGET_OSX: + bld.recurse('platform/osx') for r in ['22x22', '32x32', '48x48', '64x64', '128x128']: bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic.png' % r) |
