2014-10-21 14:16:10 -04:00
#!/bin/bash
2015-01-04 20:15:19 -05:00
# we assume this script is <ardour-src>/tools/x-win/package.sh
2014-10-21 14:16:10 -04:00
pushd " `/usr/bin/dirname \" $0 \"` " > /dev/null; this_script_dir = "`pwd`" ; popd > /dev/null
2015-03-10 06:34:37 -04:00
cd $this_script_dir
. ../define_versions.sh
2014-10-21 14:16:10 -04:00
cd $this_script_dir /../..
2015-03-10 06:34:37 -04:00
2014-10-21 14:16:10 -04:00
test -f gtk2_ardour/wscript || exit 1
2015-01-04 20:15:19 -05:00
# Defaults (overridden by environment)
2014-10-21 14:16:10 -04:00
: ${ XARCH =i686 } # or x86_64
: ${ ROOT =/home/ardour }
: ${ MAKEFLAGS =-j4 }
: ${ TMPDIR =/var/tmp }
2015-12-07 10:16:58 -05:00
: ${ SRCCACHE =/var/tmp/winsrc } # source-code tgz cache
2016-09-15 07:05:31 -04:00
2016-04-07 16:27:03 -04:00
: ${ HARRISONCHANNELSTRIP =harrison_channelstrip }
2016-09-15 07:05:31 -04:00
: ${ HARRISONLV2 =harrison_lv2s-n }
2020-08-03 11:04:26 -04:00
: ${ HARRISONDSPURL =https : //rsrc.harrisonconsoles.com/plugins/releases/public }
2014-10-21 14:16:10 -04:00
2016-05-16 08:42:19 -04:00
# see also wscript, video_tool_paths.cc, bundle_env_mingw.cc
# registry keys based on this are used there
PROGRAM_NAME = Ardour
PROGRAM_KEY = Ardour
PROGRAM_VERSION = ${ major_version }
2017-02-25 14:03:03 -05:00
PRODUCT_NAME = Ardour
2016-05-16 08:42:19 -04:00
PRODUCT_VERSION = ${ major_version }
2024-07-23 20:02:54 -04:00
WITH_HARRISON_LV2 = 1
WITH_HARRISON_VBM =
2020-06-11 16:25:52 -04:00
WITH_COMMERCIAL_X42_LV2 =
WITH_GRATIS_X42_LV2 =
2024-04-28 11:54:20 -04:00
WITH_GMSYNTH = 1
2024-05-02 21:52:57 -04:00
WITH_HARVID = 1
WITH_XJADEO = 1
2024-07-23 20:02:54 -04:00
X42PLUGINS = "x42-autotune x42-midifilter x42-stereoroute setBfree x42-avldrums x42-limiter x42-tuner"
2016-08-02 07:46:41 -04:00
2015-01-04 21:05:01 -05:00
# TODO: grep from build/config.log instead
while [ $# -gt 0 ] ; do
echo " arg = $1 "
case $1 in
--mixbus)
MIXBUS = 1
2015-11-17 06:19:18 -05:00
WITH_HARRISON_LV2 = 1 ;
2020-06-11 16:25:52 -04:00
WITH_COMMERCIAL_X42_LV2 = 1
WITH_GRATIS_X42_LV2 = 1
2016-05-16 08:42:19 -04:00
PROGRAM_NAME = Mixbus
PROGRAM_KEY = Mixbus
2017-02-25 14:03:03 -05:00
PRODUCT_NAME = Mixbus
2024-06-06 09:25:50 -04:00
MANUAL_URL = "https://rsrc.harrisonconsoles.com/mixbus/mixbus-live-manual/"
2016-05-16 08:42:19 -04:00
shift ; ;
2024-04-28 11:54:20 -04:00
--livetrax)
LIVETRAX = 1 ;
2024-05-02 21:52:57 -04:00
WITH_XJADEO =
2024-04-28 11:54:20 -04:00
WITH_HARRISON_LV2 = "" ;
WITH_GMSYNTH = "" ;
PROGRAM_NAME = LiveTrax
PROGRAM_KEY = LiveTrax
PRODUCT_NAME = LiveTrax
2024-06-06 09:25:50 -04:00
MANUAL_URL = "https://rsrc.harrisonconsoles.com/livetrax/livetrax-live-manual/"
2024-04-28 11:54:20 -04:00
shift ; ;
2024-07-23 20:02:54 -04:00
--vbm)
VBM = 1
WITH_HARRISON_LV2 = 1 ;
WITH_HARRISON_VBM = 1 ;
WITH_COMMERCIAL_X42_LV2 = 1
WITH_GRATIS_X42_LV2 = 1
WITH_GMSYNTH = "" ;
PRODUCT_NAME = MixbusVBM
PROGRAM_KEY = MixbusVBM
PROGRAM_NAME = MixbusVBM-${ PROGRAM_VERSION }
PROGRAM_VERSION = ""
MANUAL_NAME = " mixbusvbm- ${ major_version } -live-manual "
X42PLUGINS = " $X42PLUGINS x42-testsignal x42-nodelay "
shift ; ;
2016-04-07 16:27:03 -04:00
--chanstrip) HARRISONCHANNELSTRIP = $2 ; shift; shift ; ;
2015-01-04 21:05:01 -05:00
esac
done
2015-01-04 20:15:19 -05:00
2015-03-23 15:46:59 -04:00
LOWERCASE_DIRNAME = ardour${ major_version }
2015-01-05 13:22:19 -05:00
STATEFILE_SUFFIX = ardour # see filename_extensions.cc
2015-01-04 21:05:01 -05:00
2015-01-04 20:15:19 -05:00
# derived variables
2015-08-08 18:41:00 -04:00
PRODUCT_ID = ${ PROGRAM_NAME } ${ PROGRAM_VERSION }
2015-01-04 20:15:19 -05:00
PRODUCT_EXE = ${ PRODUCT_NAME } .exe
PRODUCT_ICON = ${ PRODUCT_NAME } .ico
###############################################################################
2015-03-10 06:34:37 -04:00
echo " Packaging $PRODUCT_ID "
2014-10-21 14:16:10 -04:00
if test " $XARCH " = "x86_64" -o " $XARCH " = "amd64" ; then
echo "Target: 64bit Windows (x86_64)"
XPREFIX = x86_64-w64-mingw32
WARCH = w64
else
echo "Target: 32 Windows (i686)"
XPREFIX = i686-w64-mingw32
WARCH = w32
fi
: ${ PREFIX = ${ ROOT } /win-stack- $WARCH }
2015-12-07 10:16:58 -05:00
export SRCCACHE
2014-10-21 14:16:10 -04:00
if [ " $( id -u) " = "0" ] ; then
2023-07-27 11:57:35 -04:00
apt-get -y install nsis curl wget ca-certificates rsync zip unzip
2014-10-21 14:16:10 -04:00
fi
function download {
echo " --- Downloading.. $2 "
2015-12-07 10:16:58 -05:00
test -f ${ SRCCACHE } /$1 || curl -k -L -o ${ SRCCACHE } /$1 $2
2014-10-21 14:16:10 -04:00
}
################################################################################
set -e
2015-04-03 15:17:04 -04:00
ARDOURVERSION = ${ release_version }
2014-10-21 14:16:10 -04:00
ARDOURDATE = $( date -R)
2015-04-03 15:17:04 -04:00
if ! test -f build/gtk2_ardour/ardour-${ ARDOURVERSION } .exe; then
echo " *** Please compile ardour- ${ ARDOURVERSION } .exe first. "
2014-10-21 14:16:10 -04:00
exit 1
fi
2015-03-11 21:36:01 -04:00
echo " === bundle to $DESTDIR "
2014-10-21 14:16:10 -04:00
./waf install
################################################################################
if test -z " $DESTDIR " ; then
DESTDIR = ` mktemp -d`
trap 'rm -rf $DESTDIR' exit SIGINT SIGTERM
2019-06-04 10:30:25 -04:00
rm -rf $DESTDIR
2014-10-21 14:16:10 -04:00
fi
echo " === bundle to $DESTDIR "
2015-01-05 13:22:19 -05:00
ALIBDIR = $DESTDIR /lib/${ LOWERCASE_DIRNAME }
2014-10-21 14:16:10 -04:00
mkdir -p $DESTDIR /bin
mkdir -p $DESTDIR /share/
mkdir -p $ALIBDIR /surfaces
mkdir -p $ALIBDIR /backends
mkdir -p $ALIBDIR /panners
mkdir -p $ALIBDIR /vamp
2015-02-12 11:35:39 -05:00
mkdir -p $ALIBDIR /suil
2014-10-21 14:16:10 -04:00
2023-12-13 00:45:00 -05:00
# cp $PREFIX/lib/ardour*/*-*.dll $DESTDIR/bin/
2014-10-21 14:16:10 -04:00
cp build/libs/gtkmm2ext/gtkmm2ext-*.dll $DESTDIR /bin/
cp build/libs/midi++2/midipp-*.dll $DESTDIR /bin/
cp build/libs/evoral/evoral-*.dll $DESTDIR /bin/
cp build/libs/ardour/ardour-*.dll $DESTDIR /bin/
2017-09-25 11:12:32 -04:00
cp build/libs/temporal/temporal-*.dll $DESTDIR /bin/
2023-06-26 09:07:47 -04:00
cp build/libs/aaf/aaf-*.dll $DESTDIR /bin/
2014-10-21 14:16:10 -04:00
cp build/libs/canvas/canvas-*.dll $DESTDIR /bin/
2017-07-17 15:02:38 -04:00
cp build/libs/widgets/widgets-*.dll $DESTDIR /bin/
cp build/libs/waveview/waveview-*.dll $DESTDIR /bin/
2014-10-21 14:16:10 -04:00
cp build/libs/pbd/pbd-*.dll $DESTDIR /bin/
2023-12-13 00:45:00 -05:00
cp build/libs/tk/ztk/ztk-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ydk/ydk-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ytk/ytk-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ytkmm/ytkmm-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ydkmm/ydkmm-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ztkmm/ztkmm-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/ydk-pixbuf/ydk-pixbuf-*.dll $DESTDIR /bin/ || true
cp build/libs/tk/suil/suil-*.dll $DESTDIR /bin/ || true
2022-11-19 13:31:39 -05:00
cp build/libs/ctrl-interface/midi_surface/ardour*.dll $DESTDIR /bin/
cp build/libs/ctrl-interface/control_protocol/ardour*.dll $DESTDIR /bin/
2015-08-05 19:02:13 -04:00
cp build/libs/ptformat/ptformat-*.dll $DESTDIR /bin/
2014-10-21 14:16:10 -04:00
cp build/libs/audiographer/audiographer-*.dll $DESTDIR /bin/
cp build/libs/fst/ardour-vst-scanner.exe $DESTDIR /bin/ || true
2020-09-18 12:54:45 -04:00
cp build/libs/fst/ardour-vst3-scanner.exe $DESTDIR /bin/ || true
2016-10-14 12:33:16 -04:00
cp build/session_utils/*-*.exe $DESTDIR /bin/ || true
2021-05-13 15:32:59 -04:00
cp build/luasession/ardour*-lua.exe $DESTDIR /bin/ || true
2015-01-04 20:15:19 -05:00
cp ` ls -t build/gtk2_ardour/ardour-*.exe | head -n1` $DESTDIR /bin/${ PRODUCT_EXE }
2014-10-21 14:16:10 -04:00
mkdir -p $DESTDIR /lib/gtk-2.0/engines
cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR /lib/gtk-2.0/engines/libclearlooks.la
2020-09-28 23:48:25 -04:00
cp $PREFIX /bin/*.dll $DESTDIR /bin/
cp $PREFIX /bin/*.yes $DESTDIR /bin/ || true
cp $PREFIX /lib/*.dll $DESTDIR /bin/
2015-08-04 01:36:35 -04:00
# special case libportaudio (wasapi), old stack has no wasapi and hence no .xp
cp $PREFIX /bin/libportaudio-2.xp $DESTDIR /bin/ || cp $PREFIX /bin/libportaudio-2.dll $DESTDIR /bin/libportaudio-2.xp
2021-02-11 03:57:51 -05:00
# prefer system-wide DLL
2014-10-21 14:16:10 -04:00
rm -rf $DESTDIR /bin/libjack*.dll
2021-02-11 03:57:51 -05:00
# Also for these (even though M$ recommends to bundle these [1],
# there is no single set that works on all target systems, particularly
# since some plugins also rely on it.
# [1] https://docs.microsoft.com/en-us/windows/win32/debug/calling-the-dbghelp-library
rm -rf $DESTDIR /bin/dbghelp*.dll
rm -rf $DESTDIR /bin/dbgcore*.dll
2014-10-21 14:16:10 -04:00
cp ` find build/libs/surfaces/ -iname "*.dll" ` $ALIBDIR /surfaces/
cp ` find build/libs/backends/ -iname "*.dll" ` $ALIBDIR /backends/
cp ` find build/libs/panners/ -iname "*.dll" ` $ALIBDIR /panners/
2024-04-28 11:54:20 -04:00
cp -r build/libs/LV2 $ALIBDIR / || true
2014-10-21 14:16:10 -04:00
cp -r build/libs/vamp-plugins/*ardourvampplugins*.dll $ALIBDIR /vamp/libardourvampplugins.dll
2019-09-02 08:35:23 -04:00
cp -r build/libs/vamp-pyin/*ardourvamppyin*.dll $ALIBDIR /vamp/libardourvamppyin.dll
2023-12-13 00:45:00 -05:00
if test -d build/libs/tk/suil/; then
cp build/libs/tk/suil/suil_win_in_gtk2.dll $ALIBDIR /suil/
else
cp $PREFIX /lib/suil-*/*.dll $ALIBDIR /suil/ || true
fi
2014-10-21 14:16:10 -04:00
2020-10-22 07:43:10 -04:00
# lv2 core, classifications
for file in $PREFIX /lib/lv2/*.lv2; do
BN = $( basename $file )
2020-10-23 10:10:52 -04:00
mkdir -p $ALIBDIR /LV2/$BN
2020-10-23 13:51:52 -04:00
cp $PREFIX /lib/lv2/${ BN } /*.ttl $ALIBDIR /LV2/${ BN } /
2020-10-22 07:43:10 -04:00
done
2014-10-21 14:16:10 -04:00
# TODO use -static-libgcc -static-libstdc++ -- but for .exe files only
if update-alternatives --query ${ XPREFIX } -gcc | grep Value: | grep -q win32; then
cp /usr/lib/gcc/${ XPREFIX } /*-win32/libgcc_s_*.dll $DESTDIR /bin/
cp /usr/lib/gcc/${ XPREFIX } /*-win32/libstdc++-6.dll $DESTDIR /bin/
elif update-alternatives --query ${ XPREFIX } -gcc | grep Value: | grep -q posix; then
cp /usr/lib/gcc/${ XPREFIX } /*-posix/libgcc_s_*.dll $DESTDIR /bin/
cp /usr/lib/gcc/${ XPREFIX } /*-posix/libstdc++-6.dll $DESTDIR /bin/
else
cp /usr/lib/gcc/${ XPREFIX } /*/libgcc_s_sjlj-1.dll $DESTDIR /bin/
cp /usr/lib/gcc/${ XPREFIX } /*/libstdc++-6.dll $DESTDIR /bin/
fi
#Ubuntu's 14.04's mingw needs this one for the std libs above
if test -f /usr/${ XPREFIX } /lib/libwinpthread-1.dll; then
cp /usr/${ XPREFIX } /lib/libwinpthread-1.dll $DESTDIR /bin/
fi
2015-01-05 13:22:19 -05:00
cp -r $PREFIX /share/${ LOWERCASE_DIRNAME } $DESTDIR /share/
2015-03-11 21:36:01 -04:00
cp -r $PREFIX /share/locale $DESTDIR /share/
2015-01-05 13:22:19 -05:00
cp -r $PREFIX /etc/${ LOWERCASE_DIRNAME } /* $DESTDIR /share/${ LOWERCASE_DIRNAME } /
2014-10-21 14:16:10 -04:00
cp COPYING $DESTDIR /share/
2015-01-04 20:15:19 -05:00
cp gtk2_ardour/icons/${ PRODUCT_ICON } $DESTDIR /share/
2017-02-26 08:25:55 -05:00
cp gtk2_ardour/icons/ArdourBug.ico $DESTDIR /share/
2014-10-21 14:16:10 -04:00
2014-11-18 16:08:51 -05:00
# replace default cursor with square version (sans hotspot file)
2015-01-05 13:22:19 -05:00
cp gtk2_ardour/icons/cursor_square/* $DESTDIR /share/${ LOWERCASE_DIRNAME } /icons/
2014-11-18 16:08:51 -05:00
2014-10-21 14:16:10 -04:00
# clean build-dir after depoyment
2015-03-11 21:36:01 -04:00
echo " === bundle completed, cleaning up"
2014-10-21 14:16:10 -04:00
./waf uninstall
2024-04-28 11:54:20 -04:00
find $DESTDIR -name "*.dll.a" -print0 | xargs -0 -r rm
2014-10-21 14:16:10 -04:00
echo " === complete"
du -sh $DESTDIR
2014-12-23 21:56:54 -05:00
################################################################################
### get video tools
2024-05-02 21:52:57 -04:00
if test -n " $WITH_HARVID " ; then
echo " === Including harvid"
2014-12-23 21:56:54 -05:00
HARVID_VERSION = $( curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
2014-12-24 08:33:48 -05:00
rsync -a -q --partial \
2018-11-30 18:56:20 -05:00
rsync://ardour.org/video-tools/harvid_${ WARCH } -${ HARVID_VERSION } .tar.xz \
" ${ SRCCACHE } /harvid_ ${ WARCH } - ${ HARVID_VERSION } .tar.xz "
2014-12-23 21:56:54 -05:00
2024-05-02 21:52:57 -04:00
mkdir -p $DESTDIR /video
tar -xf " ${ SRCCACHE } /harvid_ ${ WARCH } - ${ HARVID_VERSION } .tar.xz " -C " $DESTDIR /video/ "
fi
if test -n " $WITH_XJADEO " ; then
echo " === Including video-monitor"
XJADEO_VERSION = $( curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
2014-12-24 08:33:48 -05:00
rsync -a -q --partial \
2018-11-30 21:13:59 -05:00
rsync://ardour.org/video-tools/xjadeo_${ WARCH } -${ XJADEO_VERSION } .tar.xz \
2018-11-30 21:21:45 -05:00
" ${ SRCCACHE } /xjadeo_ ${ WARCH } - ${ XJADEO_VERSION } .tar.xz "
2014-12-23 21:56:54 -05:00
2024-05-02 21:52:57 -04:00
mkdir -p $DESTDIR /video
2018-11-30 18:56:20 -05:00
tar -xf " ${ SRCCACHE } /xjadeo_ ${ WARCH } - ${ XJADEO_VERSION } .tar.xz " -C " $DESTDIR /video/ "
2014-12-23 21:56:54 -05:00
fi
2014-10-21 14:16:10 -04:00
################################################################################
2023-03-24 14:07:30 -04:00
BUILDTYPE = ""
VERSIONINFO = "Optimized Version."
if [ " $DEBUG " = "T" ] ; then
BUILDTYPE = "-dbg"
PACKAGE_GDB = 1
VERSIONINFO = "Debug Build."
fi
if [ " $FREEBI " = "T" ] ; then
BUILDTYPE = "-demo"
VERSIONINFO = "Optimized Demo Version."
fi
if [ " $DEBUG $FREEBI " = "TT" ] ; then
BUILDTYPE = "-demo-dbg"
2020-03-08 18:34:20 -04:00
PACKAGE_GDB = 1
2023-03-24 14:07:30 -04:00
VERSIONINFO = "Demo Version."
2020-03-08 18:34:20 -04:00
fi
2023-03-24 14:07:30 -04:00
OUTFILE = " ${ TMPDIR } / ${ PRODUCT_NAME } - ${ ARDOURVERSION } ${ BUILDTYPE } - ${ WARCH } -Setup.exe "
2020-03-08 18:34:20 -04:00
if test -n " $PACKAGE_GDB " ; then
2024-01-28 21:49:54 -05:00
# re-packaged from https://packages.msys2.org/package/mingw-w64-x86_64-gdb
download gdb12-win64.tar.xz http://ardour.org/files/gdb/gdb12-win64.tar.xz
2015-12-07 10:16:58 -05:00
cd ${ SRCCACHE }
2024-01-28 21:49:54 -05:00
tar xf gdb12-win64.tar.xz
2014-10-21 14:16:10 -04:00
cd - > /dev/null
2015-01-04 20:15:19 -05:00
echo " === Creating debug.bat"
2024-01-28 22:56:22 -05:00
cp -r ${ SRCCACHE } /gdb12 $DESTDIR /gdb12
2015-01-04 20:15:19 -05:00
cat > $DESTDIR /debug.bat << EOF
2024-01-28 21:49:54 -05:00
set PYTHONPATH = %~dp0\g db12\p ython3.10
2024-10-08 07:03:49 -04:00
set PATH = %~dp0\g db12\; %PATH%
2014-10-21 14:16:10 -04:00
cd bin
2024-01-28 21:49:54 -05:00
..\\ gdb12\\ gdb.exe -ex "set logging overwrite on" -ex "set height 0" -ex " set logging file %UserProfile%\\ ${ PRODUCT_NAME } -debug.log " -ex "set logging enabled on" -ex " target exec ${ PRODUCT_EXE } " -ex "run"
2014-10-21 14:16:10 -04:00
EOF
fi
2015-02-25 18:55:55 -05:00
################################################################################
### Mixbus plugins, etc
2024-05-23 09:53:38 -04:00
if test x$WITH_GMSYNTH != x ; then
2017-01-30 10:42:50 -05:00
mkdir -p $ALIBDIR /LV2
echo "Adding General MIDI Synth LV2"
for proj in x42-gmsynth; do
X42_VERSION = $( curl -s -S http://x42-plugins.com/x42/win/${ proj } .latest.txt)
rsync -a -q --partial \
rsync://x42-plugins.com/x42/win/${ proj } -lv2-${ WARCH } -${ X42_VERSION } .zip \
" ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
unzip -q -d " $ALIBDIR /LV2/ " " ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
done
fi
2020-06-11 16:25:52 -04:00
if test x$WITH_COMMERCIAL_X42_LV2 != x ; then
2015-02-25 18:55:55 -05:00
mkdir -p $ALIBDIR /LV2
2015-07-02 05:20:10 -04:00
2020-06-11 16:25:52 -04:00
echo "Adding commercial x42 Plugins"
2015-07-02 05:20:10 -04:00
2020-06-11 16:25:52 -04:00
for proj in x42-meters x42-eq x42-whirl; do
X42_VERSION = $( curl -s -S http://x42-plugins.com/x42/win/${ proj } .latest.txt)
rsync -a -q --partial \
rsync://x42-plugins.com/x42/win/${ proj } -lv2-${ WARCH } -${ X42_VERSION } .zip \
" ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
unzip -q -d " $ALIBDIR /LV2/ " " ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
done
fi
if test x$WITH_GRATIS_X42_LV2 != x ; then
mkdir -p $ALIBDIR /LV2
echo "Adding gratis x42 Plugins"
2024-07-23 20:02:54 -04:00
for proj in $X42PLUGINS ; do
if test -n " $VBM " ; then
if test " $proj " = "setBfree" ; then
continue
fi
if test " $proj " = "x42-avldrums" ; then
continue
fi
fi
2016-06-06 14:19:47 -04:00
X42_VERSION = $( curl -s -S http://x42-plugins.com/x42/win/${ proj } .latest.txt)
rsync -a -q --partial \
rsync://x42-plugins.com/x42/win/${ proj } -lv2-${ WARCH } -${ X42_VERSION } .zip \
" ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
unzip -q -d " $ALIBDIR /LV2/ " " ${ SRCCACHE } / ${ proj } -lv2- ${ WARCH } - ${ X42_VERSION } .zip "
done
2015-07-02 05:20:10 -04:00
fi
2015-11-17 06:19:18 -05:00
if test x$WITH_HARRISON_LV2 != x ; then
2020-09-09 19:30:25 -04:00
mkdir -p $DESTDIR /LV2
2015-07-02 05:20:10 -04:00
echo "Including Harrison LV2s"
curl -s -S --fail -# \
2016-09-15 07:05:31 -04:00
-z " ${ SRCCACHE } / ${ HARRISONLV2 } . ${ WARCH } .zip " \
-o " ${ SRCCACHE } / ${ HARRISONLV2 } . ${ WARCH } .zip " \
2016-09-22 18:47:33 -04:00
" ${ HARRISONDSPURL } / ${ HARRISONLV2 } . ${ WARCH } .zip "
2020-09-09 19:30:25 -04:00
unzip -q -d " $DESTDIR /LV2/ " " ${ SRCCACHE } / ${ HARRISONLV2 } . ${ WARCH } .zip "
2015-07-02 05:20:10 -04:00
fi
2024-07-23 20:02:54 -04:00
if test x$WITH_HARRISON_VBM != x ; then
mkdir -p $DESTDIR /LV2
echo "Including Harrison VBM Channelstrip LV2"
curl -s -S --fail -# \
-z " ${ SRCCACHE } /harrison_vbm. ${ WARCH } .zip " \
-o " ${ SRCCACHE } /harrison_vbm. ${ WARCH } .zip " \
" ${ HARRISONDSPURL } /harrison_vbm. ${ WARCH } .zip "
unzip -q -d " $DESTDIR /LV2/ " " ${ SRCCACHE } /harrison_vbm. ${ WARCH } .zip "
# use mingw-11 gcc-12's libstdc++-6.dll (channelstrip compat)
cp -v " ${ SRCCACHE } /libstdc++-6.dll " $DESTDIR /bin/
fi
2015-07-02 05:20:10 -04:00
if test -n " $MIXBUS " ; then
echo "Deploying Harrison Mixbus Channelstrip"
mkdir -p $ALIBDIR /ladspa/strip
curl -s -S --fail -# \
2016-04-07 16:27:03 -04:00
-z " ${ SRCCACHE } / ${ HARRISONCHANNELSTRIP } . ${ WARCH } .dll " \
-o " ${ SRCCACHE } / ${ HARRISONCHANNELSTRIP } . ${ WARCH } .dll " \
2016-09-22 18:47:33 -04:00
" ${ HARRISONDSPURL } / ${ HARRISONCHANNELSTRIP } . ${ WARCH } .dll "
2015-02-25 18:55:55 -05:00
2016-04-07 16:27:03 -04:00
cp " ${ SRCCACHE } / ${ HARRISONCHANNELSTRIP } . ${ WARCH } .dll " \
" $ALIBDIR /ladspa/strip/ ${ HARRISONCHANNELSTRIP } .dll "
2016-05-23 10:46:08 -04:00
echo "Deploying Harrison Vamp Plugins"
mkdir -p $ALIBDIR /vamp
curl -s -S --fail -# \
-z " ${ SRCCACHE } /harrison_vamp. ${ WARCH } .dll " \
-o " ${ SRCCACHE } /harrison_vamp. ${ WARCH } .dll " \
2016-09-22 18:47:33 -04:00
" ${ HARRISONDSPURL } /harrison_vamp. ${ WARCH } .dll "
2016-05-23 10:46:08 -04:00
cp " ${ SRCCACHE } /harrison_vamp. ${ WARCH } .dll " \
" $ALIBDIR /vamp/harrison_vamp.dll "
2022-01-17 13:50:34 -05:00
# Mixbus Bundled Media Content
curl -s -S --fail -# \
-z " ${ SRCCACHE } /MixbusBundledMedia.zip " \
-o " ${ SRCCACHE } /MixbusBundledMedia.zip " \
2022-09-08 11:02:18 -04:00
"http://builder.harrisonconsoles.com/pub/share/MixbusBundledMedia.zip"
2022-01-17 13:50:34 -05:00
if test -f " ${ SRCCACHE } /MixbusBundledMedia.zip " ; then
echo "Adding Mixbus Bundled Content"
2022-02-28 22:14:20 -05:00
rm -f $DESTDIR /share/${ LOWERCASE_DIRNAME } /media/*.*
2022-10-04 14:39:14 -04:00
unzip -q -o -d " $DESTDIR /share/ ${ LOWERCASE_DIRNAME } /media/ " " ${ SRCCACHE } /MixbusBundledMedia.zip "
2022-01-17 13:50:34 -05:00
fi
2024-07-23 20:02:54 -04:00
elif test -z " $LIVETRAX " -a -z " $VBM " ; then
2024-01-29 12:56:50 -05:00
echo "Fetching Ardour bundled media"
2022-10-04 13:01:54 -04:00
curl -s -S --fail -# \
-z " ${ SRCCACHE } /ArdourBundledMedia.zip " \
-o " ${ SRCCACHE } /ArdourBundledMedia.zip " \
2022-10-11 09:24:17 -04:00
"http://stuff.ardour.org/loops/ArdourBundledMedia.zip"
2022-10-04 13:01:54 -04:00
if test -f " ${ SRCCACHE } /ArdourBundledMedia.zip " ; then
echo "Adding Ardour Bundled Content"
rm -f $DESTDIR /share/${ LOWERCASE_DIRNAME } /media/*.*
2022-10-04 14:39:14 -04:00
unzip -q -o -d " $DESTDIR /share/ ${ LOWERCASE_DIRNAME } /media/ " " ${ SRCCACHE } /ArdourBundledMedia.zip "
2022-10-04 13:01:54 -04:00
fi
2015-02-25 18:55:55 -05:00
fi
2016-09-15 07:11:43 -04:00
################################################################################
if test x$DEMO_SESSION_URL != x ; then
2022-02-28 22:14:20 -05:00
mkdir -p $DESTDIR /share/${ LOWERCASE_DIRNAME } /sessions
2016-09-15 07:11:43 -04:00
DEMO_SESSIONS = $( curl -s -S --fail $DEMO_SESSION_URL /index.txt)
for demo in $DEMO_SESSIONS ; do
2022-02-28 22:14:20 -05:00
curl -s -S --fail -# -o $DESTDIR /share/${ LOWERCASE_DIRNAME } /sessions/$demo $DEMO_SESSION_URL /$demo
2016-09-15 07:11:43 -04:00
done
fi
################################################################################
2015-08-10 12:55:51 -04:00
( cd $DESTDIR ; find . ) > ${ TMPDIR } /file_list.txt
2014-10-21 14:16:10 -04:00
################################################################################
echo " === Preparing Windows Installer"
NSISFILE = $DESTDIR /a3.nsis
if test " $WARCH " = "w64" ; then
PGF = PROGRAMFILES64
2015-04-23 18:00:47 -04:00
SFX =
2014-10-21 14:16:10 -04:00
else
PGF = PROGRAMFILES
2015-04-23 18:00:47 -04:00
# TODO we should only add this for 32bit on 64bit windows!
SFX = " (x86)"
2014-10-21 14:16:10 -04:00
fi
2014-10-22 17:58:57 -04:00
if test -n " $QUICKZIP " ; then
cat > $NSISFILE << EOF
SetCompressor zlib
EOF
2024-01-29 12:56:50 -05:00
elif test -n " $PACKAGE_GDB " ; then
# debug version is > 2.2 GB and causes issues with SOLID lzma
cat > $NSISFILE << EOF
SetCompressor lzma
EOF
2014-10-22 17:58:57 -04:00
else
cat > $NSISFILE << EOF
2014-10-21 14:16:10 -04:00
SetCompressor /SOLID lzma
SetCompressorDictSize 32
2014-10-22 17:58:57 -04:00
EOF
fi
2014-10-21 14:16:10 -04:00
2014-10-22 17:58:57 -04:00
cat >> $NSISFILE << EOF
2015-01-05 10:00:04 -05:00
!addincludedir " ${ this_script_dir } \\nsis "
2014-10-21 14:16:10 -04:00
!include MUI2.nsh
2015-01-05 10:00:04 -05:00
!include FileAssociation.nsh
2015-08-04 01:36:35 -04:00
!include WinVer.nsh
2015-01-05 10:00:04 -05:00
2015-01-04 20:15:19 -05:00
Name " ${ PROGRAM_NAME } ${ PROGRAM_VERSION } "
2014-10-21 14:16:10 -04:00
OutFile " ${ OUTFILE } "
RequestExecutionLevel admin
2015-01-04 20:15:19 -05:00
InstallDir " \$ ${ PGF } \\ ${ PRODUCT_ID } "
2016-05-16 08:42:19 -04:00
InstallDirRegKey HKLM " Software\\ ${ PRODUCT_NAME } \\ ${ PRODUCT_ID } \\ $WARCH " "Install_Dir"
2015-01-04 20:15:19 -05:00
!define MUI_ICON " share\\ ${ PRODUCT_ICON } "
2021-02-08 11:36:21 -05:00
!define MUI_UNICON " share\\ ${ PRODUCT_ICON } "
2015-01-04 20:15:19 -05:00
EOF
2014-10-21 14:16:10 -04:00
2024-07-23 20:02:54 -04:00
if test -n " $MIXBUS " -o -n " $LIVETRAX " -o -n " $VBM " ; then
2015-01-04 21:05:01 -05:00
# TODO: proper welcome/finish text.
cat >> $NSISFILE << EOF
2022-03-11 13:12:12 -05:00
!define MUI_FINISHPAGE_TITLE " Welcome to Harrison ${ PROGRAM_NAME } "
!define MUI_FINISHPAGE_TEXT " Thanks for your purchase of ${ PROGRAM_NAME } !\$\\r\$\\nYou will find the ${ PROGRAM_NAME } application in the Start Menu (or the All Apps panel for Windows 8) \$\\r\$\\nClick the link below to view the ${ PROGRAM_NAME } manual, and learn ways to get involved with the Mixbus community. "
!define MUI_FINISHPAGE_LINK " ${ PROGRAM_NAME } Manual "
2024-06-06 09:25:50 -04:00
!define MUI_FINISHPAGE_LINK_LOCATION " ${ MANUAL_URL } "
2015-01-04 21:05:01 -05:00
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
EOF
else
cat >> $NSISFILE << EOF
2014-10-21 14:16:10 -04:00
!define MUI_FINISHPAGE_TITLE "Welcome to Ardour"
2020-11-17 13:32:19 -05:00
!define MUI_FINISHPAGE_TEXT "This Windows version of Ardour is provided as-is.\$\\r\$\\nThe Ardour community currently has no expertise in supporting Windows users, and there are no developers focusing on Windows-specific issues either.\$\\r\$\\nIf you like Ardour, please consider helping out."
2016-09-15 07:48:45 -04:00
!define MUI_FINISHPAGE_LINK "Ardour Manual"
!define MUI_FINISHPAGE_LINK_LOCATION "http://manual.ardour.org/"
2014-10-21 14:16:10 -04:00
#this would run as admin - see http://forums.winamp.com/showthread.php?t=353366
2015-01-04 20:15:19 -05:00
#!define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\${PRODUCT_EXE}"
2014-10-21 14:16:10 -04:00
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
2015-01-04 20:15:19 -05:00
EOF
2014-10-21 14:16:10 -04:00
2015-01-04 21:05:01 -05:00
fi
2015-01-04 20:15:19 -05:00
cat >> $NSISFILE << EOF
2014-10-21 14:16:10 -04:00
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_LICENSE "share\\COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
2015-01-04 20:15:19 -05:00
Section " ${ PROGRAM_NAME } ${ PROGRAM_VERSION } (required) " SecMainProg
2014-10-21 14:16:10 -04:00
SectionIn RO
SetOutPath \$ INSTDIR
File /r bin
File /r lib
File /r share
2015-01-04 20:15:19 -05:00
File /nonfatal debug.bat
2024-01-28 21:49:54 -05:00
File /nonfatal /r gdb12
2016-05-16 08:42:19 -04:00
WriteRegStr HKLM " Software\\ ${ PROGRAM_KEY } \\v ${ major_version } \\ $WARCH " "Install_Dir" "\$INSTDIR"
2015-04-23 15:09:48 -04:00
WriteRegStr HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " "DisplayName" " ${ PROGRAM_NAME } ${ PROGRAM_VERSION } "
WriteRegStr HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " "UninstallString" '"\$INSTDIR\\uninstall.exe"'
WriteRegDWORD HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " "NoModify" 1
WriteRegDWORD HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " "NoRepair" 1
2014-10-21 14:16:10 -04:00
WriteUninstaller "\$INSTDIR\uninstall.exe"
2015-01-04 20:15:19 -05:00
CreateShortCut " \$INSTDIR\\ ${ PROGRAM_NAME } ${ PROGRAM_VERSION } .lnk " " \$INSTDIR\\bin\\ ${ PRODUCT_EXE } " "" " \$INSTDIR\\bin\\ ${ PRODUCT_EXE } " 0
2015-01-05 13:22:19 -05:00
\$ { registerExtension} " \$INSTDIR\\bin\\ ${ STATEFILE_SUFFIX } " " . ${ PRODUCT_NAME } " " ${ PROGRAM_NAME } Session "
2014-10-21 14:16:10 -04:00
SectionEnd
2014-12-23 21:56:54 -05:00
EOF
2024-05-02 21:52:57 -04:00
if test -n " $WITH_HARVID $WITH_XJADEO " ; then
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
2024-05-02 21:52:57 -04:00
Section "A/V Tools (required)" SecVideo
2016-05-16 08:42:19 -04:00
WriteRegStr HKLM " Software\\ ${ PROGRAM_KEY } \\v ${ major_version } \\video " "Install_Dir" "\$INSTDIR\\video"
2020-05-15 09:15:23 -04:00
SectionIn RO
2014-12-23 21:56:54 -05:00
SetOutPath \$ INSTDIR
File /r video
SectionEnd
EOF
fi
2020-09-09 19:30:25 -04:00
if test x$WITH_HARRISON_LV2 != x ; then
2024-07-23 20:02:54 -04:00
if [ -n " $MIXBUS " ] || [ -n " $VBM " ] ; then
2020-09-09 19:30:25 -04:00
cat >> $NSISFILE << EOF
2020-09-18 15:44:34 -04:00
Section "Harrison XT plugins (required)" SecXT
2020-09-09 19:30:25 -04:00
SectionIn RO
2020-09-18 15:44:34 -04:00
SetOutPath \$ INSTDIR\\ lib\\ ${ LOWERCASE_DIRNAME } \\ LV2
File LV2\\ .harrison_version.txt
File /r LV2\\ *.lv2
2020-09-09 19:30:25 -04:00
SectionEnd
EOF
else
cat >> $NSISFILE << EOF
2021-06-01 15:09:12 -04:00
Section "Harrison XT plugins and ACE plugin GUIs" SecXT
2020-09-18 15:44:34 -04:00
SetOutPath \$ INSTDIR\\ lib\\ ${ LOWERCASE_DIRNAME } \\ LV2
File LV2\\ .harrison_version.txt
File /r LV2\\ *.lv2
2020-09-09 19:30:25 -04:00
SectionEnd
EOF
fi
fi
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
2020-06-09 11:27:13 -04:00
Section "WASAPI sound driver" SecWASAPI
SectionEnd
2014-10-21 14:16:10 -04:00
Section "Start Menu Shortcuts" SecMenu
SetShellVarContext all
2020-09-16 16:48:26 -04:00
SetOutPath \$ INSTDIR
2015-04-23 18:00:47 -04:00
CreateDirectory " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } "
CreateShortCut " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } \\ ${ PROGRAM_NAME } ${ PROGRAM_VERSION } .lnk " " \$INSTDIR\\bin\\ ${ PRODUCT_EXE } " "" " \$INSTDIR\\bin\\ ${ PRODUCT_EXE } " 0
2014-10-21 14:16:10 -04:00
EOF
2015-01-04 20:15:19 -05:00
if test -f " $DESTDIR /debug.bat " ; then
2014-10-21 14:16:10 -04:00
cat >> $NSISFILE << EOF
2017-02-26 08:25:55 -05:00
CreateShortCut " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } \\ ${ PROGRAM_NAME } ${ PROGRAM_VERSION } GDB.lnk " "\$INSTDIR\\debug.bat" "" "\$INSTDIR\\share\\ArdourBug.ico" 0
2014-12-24 08:33:48 -05:00
EOF
fi
2024-05-02 21:52:57 -04:00
if test -n " $WITH_XJADEO " ; then
2014-12-24 08:33:48 -05:00
cat >> $NSISFILE << EOF
2015-01-04 20:15:19 -05:00
IfFileExists "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0 +2
2015-04-23 18:00:47 -04:00
CreateShortCut " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } \\Video Monitor.lnk " "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" "" "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0
2014-10-21 14:16:10 -04:00
EOF
fi
cat >> $NSISFILE << EOF
2015-04-23 18:00:47 -04:00
CreateShortCut " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } \\Uninstall.lnk " "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0
2014-10-21 14:16:10 -04:00
SectionEnd
2015-01-04 20:15:19 -05:00
LangString DESC_SecMainProg \$ { LANG_ENGLISH} " ${ PROGRAM_NAME } ${ ARDOURVERSION } \$\\r\$\\n ${ VERSIONINFO } \$\\r\$\\n ${ ARDOURDATE } "
2015-08-13 00:50:03 -04:00
LangString DESC_SecWASAPI \$ { LANG_ENGLISH} "WASAPI Audio Driver\$\\r\$\\nOnly works on Vista or later. Windows 10 Users may currently also experience issues if this is installed."
2014-12-23 21:56:54 -05:00
EOF
2024-05-02 21:52:57 -04:00
if test -n " $WITH_XJADEO " -a -n " $WITH_HARVID " ; then
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
LangString DESC_SecVideo \$ { LANG_ENGLISH} " Video Tools\$\\r\$\\nxjadeo- ${ XJADEO_VERSION } \$\\r\$\\nharvid- ${ HARVID_VERSION } "
EOF
2024-05-02 21:52:57 -04:00
elif test -n " $WITH_HAVID " ; then
cat >> $NSISFILE << EOF
LangString DESC_SecVideo \$ { LANG_ENGLISH} " Video Tools\$\\r\$\\nharvid- ${ HARVID_VERSION } "
EOF
elif test -n " $WITH_XJADEO " ; then
cat >> $NSISFILE << EOF
LangString DESC_SecVideo \$ { LANG_ENGLISH} " Video Tools\$\\r\$\\nxjadeo- ${ XJADEO_VERSION } "
EOF
2014-12-23 21:56:54 -05:00
fi
2024-05-02 21:52:57 -04:00
2020-09-09 19:30:25 -04:00
if test x$WITH_HARRISON_LV2 != x ; then
cat >> $NSISFILE << EOF
LangString DESC_SecXT \$ { LANG_ENGLISH} "These are proprietary additions, but the DSP is not license encumbered. XT-plugin GUIs are commercial, the additional a-*/ACE plugin GUIs are free."
EOF
fi
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
2014-10-21 14:16:10 -04:00
LangString DESC_SecMenu \$ { LANG_ENGLISH} "Create Start-Menu Shortcuts (recommended)."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
2015-01-04 20:15:19 -05:00
!insertmacro MUI_DESCRIPTION_TEXT \$ { SecMainProg} \$ ( DESC_SecMainProg)
2015-08-13 00:50:03 -04:00
!insertmacro MUI_DESCRIPTION_TEXT \$ { SecWASAPI} \$ ( DESC_SecWASAPI)
2014-12-23 21:56:54 -05:00
EOF
2024-05-02 21:52:57 -04:00
if test -n " $WITH_XJADEO $WITH_HARVID " ; then
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
!insertmacro MUI_DESCRIPTION_TEXT \$ { SecVideo} \$ ( DESC_SecVideo)
EOF
fi
2020-09-09 19:30:25 -04:00
if test x$WITH_HARRISON_LV2 != x ; then
cat >> $NSISFILE << EOF
!insertmacro MUI_DESCRIPTION_TEXT \$ { SecXT} \$ ( DESC_SecXT)
EOF
fi
2014-12-23 21:56:54 -05:00
cat >> $NSISFILE << EOF
2014-10-21 14:16:10 -04:00
!insertmacro MUI_DESCRIPTION_TEXT \$ { SecMenu} \$ ( DESC_SecMenu)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Section "Uninstall"
SetShellVarContext all
2015-04-23 15:09:48 -04:00
DeleteRegKey HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } "
2015-01-04 20:15:19 -05:00
DeleteRegKey HKLM " Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } "
2016-05-16 08:42:19 -04:00
DeleteRegKey HKLM " Software\\ ${ PROGRAM_KEY } \\v ${ major_version } "
2014-10-21 14:16:10 -04:00
RMDir /r "\$INSTDIR\\bin"
RMDir /r "\$INSTDIR\\lib"
RMDir /r "\$INSTDIR\\share"
2024-01-28 21:49:54 -05:00
RMDir /r "\$INSTDIR\\gdb12"
2014-12-23 21:56:54 -05:00
RMDir /r "\$INSTDIR\\video"
2015-01-04 20:15:19 -05:00
Delete "\$INSTDIR\\debug.bat"
2014-10-21 14:16:10 -04:00
Delete "\$INSTDIR\\uninstall.exe"
2015-01-04 20:15:19 -05:00
Delete " \$INSTDIR\\ ${ PROGRAM_NAME } ${ PROGRAM_VERSION } .lnk "
2014-10-21 14:16:10 -04:00
RMDir "\$INSTDIR"
2015-04-23 18:00:47 -04:00
Delete " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } \\*.* "
RMDir " \$SMPROGRAMS\\ ${ PRODUCT_ID } ${ SFX } "
2015-01-05 13:22:19 -05:00
\$ { unregisterExtension} " . ${ STATEFILE_SUFFIX } " " ${ PROGRAM_NAME } Session "
2014-10-21 14:16:10 -04:00
SectionEnd
2015-08-13 00:50:03 -04:00
Function .onInit
ReadRegStr \$ R0 HKLM \
" Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " \
"UninstallString"
StrCmp \$ R0 "" done
2020-06-19 15:32:52 -04:00
IfSilent silentuninst
2015-08-13 00:50:03 -04:00
MessageBox MB_OKCANCEL| MB_ICONEXCLAMATION \
" ${ PROGRAM_NAME } is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade. " \
IDOK uninst
Abort
2020-06-19 15:32:52 -04:00
silentuninst:
ExecWait '\$R0 /S _?=\$INSTDIR'
ReadRegStr \$ R1 HKLM \
" Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " \
"UninstallString"
StrCmp \$ R1 "" 0 done
Delete "\$INSTDIR\\uninstall.exe"
RMDir "\$INSTDIR"
goto done
2015-08-13 00:50:03 -04:00
uninst:
ClearErrors
ExecWait '\$R0 _?=\$INSTDIR'
IfErrors uninstall_error
ReadRegStr \$ R1 HKLM \
" Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ ${ PRODUCT_ID } - ${ WARCH } " \
"UninstallString"
StrCmp \$ R1 "" 0 done
Delete "\$INSTDIR\\uninstall.exe"
RMDir "\$INSTDIR"
goto done
uninstall_error:
MessageBox MB_OK| MB_ICONEXCLAMATION \
"Uninstaller did not complete successfully. Continue at your own risk..." \
IDOK done
done :
\$ { If} \$ { AtMostWinXP}
SectionSetFlags \$ { SecWASAPI} \$ { SF_RO}
\$ { Else}
2017-04-24 15:08:32 -04:00
SectionSetFlags \$ { SecWASAPI} 0
2015-08-13 00:50:03 -04:00
\$ { EndIf}
FunctionEnd
Function .onInstSuccess
\$ { If} \$ { AtMostWinXP}
goto pa_no_wasapi
\$ { EndIf}
SectionGetFlags \$ { SecWASAPI} \$ R0
IntOp \$ R0 \$ R0 & \$ { SF_SELECTED}
IntCmp \$ R0 \$ { SF_SELECTED} pa_with_wasapi pa_no_wasapi
pa_with_wasapi:
; VISTA .. 9, libportaudio with WASAPI is good.
Delete "\$INSTDIR\\bin\\libportaudio-2.xp"
goto endportaudio
; Windows XP lacks support for WASAPI, Windows10 on some system has issues
; http://tracker.ardour.org/view.php?id= 6507
pa_no_wasapi:
Delete "\$INSTDIR\\bin\\libportaudio-2.dll"
Rename "\$INSTDIR\\bin\\libportaudio-2.xp" "\$INSTDIR\\bin\\libportaudio-2.dll"
endportaudio:
FunctionEnd
2014-10-21 14:16:10 -04:00
EOF
rm -f ${ OUTFILE }
echo " === OutFile: $OUTFILE "
2014-10-22 17:58:57 -04:00
if test -n " $QUICKZIP " ; then
echo " === Building Windows Installer (fast zip)"
else
2014-10-21 14:16:10 -04:00
echo " === Building Windows Installer (lzma compression takes ages)"
2014-10-22 17:58:57 -04:00
fi
time makensis -V2 $NSISFILE
2014-10-21 14:16:10 -04:00
rm -rf $DESTDIR
2015-01-10 13:39:45 -05:00
ls -lgGh " $OUTFILE "