3 # we assume this script is <ardour-src>/tools/x-win/package.sh
4 pushd "`/usr/bin/dirname \"$0\"`" > /dev/null; this_script_dir="`pwd`"; popd > /dev/null
7 . ../define_versions.sh
9 cd $this_script_dir/../..
11 test -f gtk2_ardour/wscript || exit 1
13 # Defaults (overridden by environment)
14 : ${XARCH=i686} # or x86_64
15 : ${ROOT=/home/ardour}
18 : ${SRCCACHE=/var/tmp/winsrc} # source-code tgz cache
20 # TODO: grep from build/config.log instead
21 while [ $# -gt 0 ] ; do
32 # see also wscript, video_tool_paths.cc, bundle_env_mingw.cc
33 # registry keys based on this are used there
36 PROGRAM_VERSION=${major_version}
38 LOWERCASE_DIRNAME=ardour${major_version}
39 STATEFILE_SUFFIX=ardour # see filename_extensions.cc
41 if test -n "$MIXBUS"; then
47 PRODUCT_ID=${PROGRAM_NAME}${PROGRAM_VERSION}
48 PRODUCT_EXE=${PRODUCT_NAME}.exe
49 PRODUCT_ICON=${PRODUCT_NAME}.ico
51 ###############################################################################
53 echo "Packaging $PRODUCT_ID"
55 if test "$XARCH" = "x86_64" -o "$XARCH" = "amd64"; then
56 echo "Target: 64bit Windows (x86_64)"
57 XPREFIX=x86_64-w64-mingw32
60 echo "Target: 32 Windows (i686)"
61 XPREFIX=i686-w64-mingw32
65 : ${PREFIX=${ROOT}/win-stack-$WARCH}
68 if [ "$(id -u)" = "0" ]; then
69 apt-get -y install nsis curl
74 echo "--- Downloading.. $2"
75 test -f ${SRCCACHE}/$1 || curl -k -L -o ${SRCCACHE}/$1 $2
78 ################################################################################
81 ARDOURVERSION=${release_version}
83 if ! test -f build/gtk2_ardour/ardour-${ARDOURVERSION}.exe; then
84 echo "*** Please compile ardour-${ARDOURVERSION}.exe first."
88 echo " === bundle to $DESTDIR"
92 ################################################################################
94 if test -z "$DESTDIR"; then
96 trap 'rm -rf $DESTDIR' exit SIGINT SIGTERM
99 echo " === bundle to $DESTDIR"
101 ALIBDIR=$DESTDIR/lib/${LOWERCASE_DIRNAME}
104 mkdir -p $DESTDIR/bin
105 mkdir -p $DESTDIR/share/
106 mkdir -p $ALIBDIR/surfaces
107 mkdir -p $ALIBDIR/backends
108 mkdir -p $ALIBDIR/panners
109 mkdir -p $ALIBDIR/vamp
110 mkdir -p $ALIBDIR/suil
112 cp build/libs/gtkmm2ext/gtkmm2ext-*.dll $DESTDIR/bin/
113 cp build/libs/midi++2/midipp-*.dll $DESTDIR/bin/
114 cp build/libs/evoral/evoral-*.dll $DESTDIR/bin/
115 cp build/libs/ardour/ardour-*.dll $DESTDIR/bin/
116 cp build/libs/timecode/timecode.dll $DESTDIR/bin/
117 cp build/libs/qm-dsp/qmdsp-*.dll $DESTDIR/bin/
118 cp build/libs/canvas/canvas-*.dll $DESTDIR/bin/
119 cp build/libs/pbd/pbd-*.dll $DESTDIR/bin/
120 cp build/libs/ptformat/ptformat-*.dll $DESTDIR/bin/
121 cp build/libs/audiographer/audiographer-*.dll $DESTDIR/bin/
122 cp build/libs/fst/ardour-vst-scanner.exe $DESTDIR/bin/ || true
123 cp `ls -t build/gtk2_ardour/ardour-*.exe | head -n1` $DESTDIR/bin/${PRODUCT_EXE}
125 mkdir -p $DESTDIR/lib/gtk-2.0/engines
126 cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR/lib/gtk-2.0/engines/libclearlooks.la
128 cp $PREFIX/bin/*dll $DESTDIR/bin/
129 cp $PREFIX/lib/*dll $DESTDIR/bin/
130 # special case libportaudio (wasapi), old stack has no wasapi and hence no .xp
131 cp $PREFIX/bin/libportaudio-2.xp $DESTDIR/bin/ || cp $PREFIX/bin/libportaudio-2.dll $DESTDIR/bin/libportaudio-2.xp
132 rm -rf $DESTDIR/bin/libjack*.dll
134 cp `find build/libs/surfaces/ -iname "*.dll"` $ALIBDIR/surfaces/
135 cp `find build/libs/backends/ -iname "*.dll"` $ALIBDIR/backends/
136 cp `find build/libs/panners/ -iname "*.dll"` $ALIBDIR/panners/
138 cp -r build/libs/LV2 $ALIBDIR/
139 cp -r build/libs/vamp-plugins/*ardourvampplugins*.dll $ALIBDIR/vamp/libardourvampplugins.dll
140 cp $PREFIX/lib/suil-*/*.dll $ALIBDIR/suil/ || true
142 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
143 if test -d $PREFIX/lib/lv2/lv2core.lv2 ; then
144 cp -R $PREFIX/lib/lv2/lv2core.lv2 $ALIBDIR/LV2/
147 mv $ALIBDIR/surfaces/ardourcp*.dll $DESTDIR/bin/
149 # TODO use -static-libgcc -static-libstdc++ -- but for .exe files only
150 if update-alternatives --query ${XPREFIX}-gcc | grep Value: | grep -q win32; then
151 cp /usr/lib/gcc/${XPREFIX}/*-win32/libgcc_s_*.dll $DESTDIR/bin/
152 cp /usr/lib/gcc/${XPREFIX}/*-win32/libstdc++-6.dll $DESTDIR/bin/
153 elif update-alternatives --query ${XPREFIX}-gcc | grep Value: | grep -q posix; then
154 cp /usr/lib/gcc/${XPREFIX}/*-posix/libgcc_s_*.dll $DESTDIR/bin/
155 cp /usr/lib/gcc/${XPREFIX}/*-posix/libstdc++-6.dll $DESTDIR/bin/
157 cp /usr/lib/gcc/${XPREFIX}/*/libgcc_s_sjlj-1.dll $DESTDIR/bin/
158 cp /usr/lib/gcc/${XPREFIX}/*/libstdc++-6.dll $DESTDIR/bin/
160 #Ubuntu's 14.04's mingw needs this one for the std libs above
161 if test -f /usr/${XPREFIX}/lib/libwinpthread-1.dll; then
162 cp /usr/${XPREFIX}/lib/libwinpthread-1.dll $DESTDIR/bin/
165 cp -r $PREFIX/share/${LOWERCASE_DIRNAME} $DESTDIR/share/
166 cp -r $PREFIX/share/locale $DESTDIR/share/
167 cp -r $PREFIX/etc/${LOWERCASE_DIRNAME}/* $DESTDIR/share/${LOWERCASE_DIRNAME}/
169 cp COPYING $DESTDIR/share/
170 cp gtk2_ardour/icons/${PRODUCT_ICON} $DESTDIR/share/
171 cp gtk2_ardour/icons/ardour_bug.ico $DESTDIR/share/
173 # replace default cursor with square version (sans hotspot file)
174 cp gtk2_ardour/icons/cursor_square/* $DESTDIR/share/${LOWERCASE_DIRNAME}/icons/
176 # clean build-dir after depoyment
177 echo " === bundle completed, cleaning up"
182 ################################################################################
184 if test -z "$NOVIDEOTOOLS"; then
185 echo " === Including video-tools"
186 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
187 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
189 rsync -a -q --partial \
190 rsync://ardour.org/video-tools/harvid_win-${HARVID_VERSION}.tar.xz \
191 "${SRCCACHE}/harvid_win-${HARVID_VERSION}.tar.xz"
193 rsync -a -q --partial \
194 rsync://ardour.org/video-tools/xjadeo_win-${XJADEO_VERSION}.tar.xz \
195 "${SRCCACHE}/xjadeo_win-${XJADEO_VERSION}.tar.xz"
198 tar -xf "${SRCCACHE}/harvid_win-${HARVID_VERSION}.tar.xz" -C "$DESTDIR/video/"
199 tar -xf "${SRCCACHE}/xjadeo_win-${XJADEO_VERSION}.tar.xz" -C "$DESTDIR/video/"
202 du -sh $DESTDIR/video
206 ################################################################################
207 ### include static gdb - re-zipped binaries from
208 ### http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/gdb-7.6.1-1/gdb-7.6.1-1-mingw32-bin.tar.lzma
209 ### http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/x86_64-4.9.1-release-win32-sjlj-rt_v3-rev1.7z
210 if ! grep " using ./waf configure" build/config.log | grep -q -- "--optimize"; then
211 download gdb-static-win3264.tar.xz http://robin.linuxaudio.org/gdb-static-win3264.tar.xz
213 tar xf gdb-static-win3264.tar.xz
216 echo " === Creating debug.bat"
217 cp -r ${SRCCACHE}/gdb_$WARCH $DESTDIR/gdb
218 cat > $DESTDIR/debug.bat << EOF
220 START ..\\gdb\\bin\\gdb.exe -iex "set logging overwrite on" -iex "set height 0" -iex "set logging on %UserProfile%\\${PRODUCT_NAME}-debug.log" -iex "target exec ${PRODUCT_EXE}" -iex "run"
222 OUTFILE="${TMPDIR}/${PRODUCT_NAME}-${ARDOURVERSION}-dbg-${WARCH}-Setup.exe"
223 VERSIONINFO="Debug Version."
225 OUTFILE="${TMPDIR}/${PRODUCT_NAME}-${ARDOURVERSION}-${WARCH}-Setup.exe"
226 VERSIONINFO="Optimized Version."
229 ################################################################################
230 ### Mixbus plugins, etc
231 if test x$WITH_X42_LV2 != x ; then
232 mkdir -p $ALIBDIR/LV2
234 echo "Adding x42 Plugins"
236 METERS_VERSION=$(curl -s -S http://x42-plugins.com/x42/win/x42-meters.latest.txt)
237 rsync -a -q --partial \
238 rsync://x42-plugins.com/x42/win/x42-meters-lv2-${WARCH}-${METERS_VERSION}.zip \
239 "${SRCCACHE}/x42-meters-lv2-${WARCH}-${METERS_VERSION}.zip"
240 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/x42-meters-lv2-${WARCH}-${METERS_VERSION}.zip"
242 EQ_VERSION=$(curl -s -S http://x42-plugins.com/x42/win/x42-eq.latest.txt)
243 rsync -a -q --partial \
244 rsync://x42-plugins.com/x42/win/x42-eq-lv2-${WARCH}-${EQ_VERSION}.zip \
245 "${SRCCACHE}/x42-eq-lv2-${WARCH}-${EQ_VERSION}.zip"
246 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/x42-eq-lv2-${WARCH}-${EQ_VERSION}.zip"
248 SETBFREE_VERSION=$(curl -s -S http://x42-plugins.com/x42/win/setBfree.latest.txt)
249 rsync -a -q --partial \
250 rsync://x42-plugins.com/x42/win/setBfree-lv2-${WARCH}-${SETBFREE_VERSION}.zip \
251 "${SRCCACHE}/setBfree-lv2-${WARCH}-${SETBFREE_VERSION}.zip"
252 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/setBfree-lv2-${WARCH}-${SETBFREE_VERSION}.zip"
254 MIDIFILTER_VERSION=$(curl -s -S http://x42-plugins.com/x42/win/x42-midifilter.latest.txt)
255 rsync -a -q --partial \
256 rsync://x42-plugins.com/x42/win/x42-midifilter-lv2-${WARCH}-${MIDIFILTER_VERSION}.zip \
257 "${SRCCACHE}/x42-midifilter-lv2-${WARCH}-${MIDIFILTER_VERSION}.zip"
258 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/x42-midifilter-lv2-${WARCH}-${MIDIFILTER_VERSION}.zip"
261 if test x$WITH_HARRISON_LV2 != x ; then
262 mkdir -p $ALIBDIR/LV2
264 echo "Including Harrison LV2s"
266 curl -s -S --fail -# \
267 -z "${SRCCACHE}/harrison_lv2s.${WARCH}.zip" \
268 -o "${SRCCACHE}/harrison_lv2s.${WARCH}.zip" \
269 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_lv2s.${WARCH}.zip"
270 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/harrison_lv2s.${WARCH}.zip"
273 if test -n "$MIXBUS"; then
274 echo "Deploying Harrison Mixbus Channelstrip"
276 mkdir -p $ALIBDIR/ladspa/strip
277 curl -s -S --fail -# \
278 -z "${SRCCACHE}/harrison_channelstrip.${WARCH}.dll" \
279 -o "${SRCCACHE}/harrison_channelstrip.${WARCH}.dll" \
280 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_channelstrip.${WARCH}.dll"
282 cp "${SRCCACHE}/harrison_channelstrip.${WARCH}.dll" \
283 "$ALIBDIR/ladspa/strip/harrison_channelstrip.dll"
286 ( cd $DESTDIR ; find . ) > ${TMPDIR}/file_list.txt
288 ################################################################################
289 echo " === Preparing Windows Installer"
290 NSISFILE=$DESTDIR/a3.nsis
292 if test "$WARCH" = "w64"; then
297 # TODO we should only add this for 32bit on 64bit windows!
301 if test -n "$QUICKZIP" ; then
302 cat > $NSISFILE << EOF
306 cat > $NSISFILE << EOF
307 SetCompressor /SOLID lzma
308 SetCompressorDictSize 32
312 cat >> $NSISFILE << EOF
313 !addincludedir "${this_script_dir}\\nsis"
315 !include FileAssociation.nsh
318 Name "${PROGRAM_NAME}${PROGRAM_VERSION}"
320 RequestExecutionLevel admin
321 InstallDir "\$${PGF}\\${PRODUCT_ID}"
322 InstallDirRegKey HKLM "Software\\${PROGRAM_NAME}\\${PRODUCT_ID}\\$WARCH" "Install_Dir"
323 !define MUI_ICON "share\\${PRODUCT_ICON}"
327 if test -n "$MIXBUS"; then
329 # TODO: proper welcome/finish text.
330 cat >> $NSISFILE << EOF
331 !define MUI_FINISHPAGE_TITLE "Welcome to Harrison Mixbus"
332 !define MUI_FINISHPAGE_TEXT "Thanks for your purchase of Mixbus!\$\\r\$\\nYou will find the Mixbus application in the Start Menu (or the All Apps panel for Windows 8) \$\\r\$\\nClick the link below to view the Mixbus manual, and learn ways to get involved with the Mixbus community."
333 !define MUI_FINISHPAGE_LINK "Mixbus Manual"
334 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.harrisonconsoles.com/mixbus/mixbus3-live-manual"
335 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
340 cat >> $NSISFILE << EOF
341 !define MUI_FINISHPAGE_TITLE "Welcome to Ardour"
342 !define MUI_FINISHPAGE_TEXT "This windows versions or 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."
343 !define MUI_FINISHPAGE_LINK "Ardour on Windows"
344 !define MUI_FINISHPAGE_LINK_LOCATION "http://ardour.org/windows.html"
345 #this would run as admin - see http://forums.winamp.com/showthread.php?t=353366
346 #!define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\${PRODUCT_EXE}"
347 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
352 cat >> $NSISFILE << EOF
353 !define MUI_ABORTWARNING
354 !insertmacro MUI_PAGE_LICENSE "share\\COPYING"
355 !insertmacro MUI_PAGE_COMPONENTS
356 !insertmacro MUI_PAGE_DIRECTORY
357 !insertmacro MUI_PAGE_INSTFILES
358 !insertmacro MUI_PAGE_FINISH
359 !insertmacro MUI_UNPAGE_CONFIRM
360 !insertmacro MUI_UNPAGE_INSTFILES
361 !insertmacro MUI_LANGUAGE "English"
363 Section "${PROGRAM_NAME}${PROGRAM_VERSION} (required)" SecMainProg
369 File /nonfatal debug.bat
370 File /nonfatal /r gdb
371 WriteRegStr HKLM "Software\\${PROGRAM_NAME}\\v${PROGRAM_VERSION}\\$WARCH" "Install_Dir" "\$INSTDIR"
372 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "DisplayName" "${PROGRAM_NAME}${PROGRAM_VERSION}"
373 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "UninstallString" '"\$INSTDIR\\uninstall.exe"'
374 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "NoModify" 1
375 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "NoRepair" 1
376 WriteUninstaller "\$INSTDIR\uninstall.exe"
377 CreateShortCut "\$INSTDIR\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk" "\$INSTDIR\\bin\\${PRODUCT_EXE}" "" "\$INSTDIR\\bin\\${PRODUCT_EXE}" 0
378 \${registerExtension} "\$INSTDIR\\bin\\${STATEFILE_SUFFIX}" ".${PRODUCT_NAME}" "${PROGRAM_NAME} Session"
381 Section "WASAPI sound driver" SecWASAPI
385 if test -z "$NOVIDEOTOOLS"; then
387 cat >> $NSISFILE << EOF
388 Section "Videotimeline Tools" SecVideo
389 WriteRegStr HKLM "Software\\${PROGRAM_NAME}\\v${PROGRAM_VERSION}\\video" "Install_Dir" "\$INSTDIR\\video"
397 cat >> $NSISFILE << EOF
398 Section "Start Menu Shortcuts" SecMenu
399 SetShellVarContext all
400 CreateDirectory "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}"
401 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk" "\$INSTDIR\\bin\\${PRODUCT_EXE}" "" "\$INSTDIR\\bin\\${PRODUCT_EXE}" 0
404 if test -f "$DESTDIR/debug.bat"; then
405 cat >> $NSISFILE << EOF
406 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\${PROGRAM_NAME}${PROGRAM_VERSION} GDB.lnk" "\$INSTDIR\\debug.bat" "" "\$INSTDIR\\share\\ardour_bug.ico" 0
410 if test -z "$NOVIDEOTOOLS"; then
411 cat >> $NSISFILE << EOF
412 IfFileExists "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0 +2
413 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\Video Monitor.lnk" "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" "" "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0
417 cat >> $NSISFILE << EOF
418 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0
420 LangString DESC_SecMainProg \${LANG_ENGLISH} "${PROGRAM_NAME} ${ARDOURVERSION}\$\\r\$\\n${VERSIONINFO}\$\\r\$\\n${ARDOURDATE}"
421 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."
424 if test -z "$NOVIDEOTOOLS"; then
425 cat >> $NSISFILE << EOF
426 LangString DESC_SecVideo \${LANG_ENGLISH} "Video Tools\$\\r\$\\nxjadeo-${XJADEO_VERSION}\$\\r\$\\nharvid-${HARVID_VERSION}"
430 cat >> $NSISFILE << EOF
431 LangString DESC_SecMenu \${LANG_ENGLISH} "Create Start-Menu Shortcuts (recommended)."
432 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
433 !insertmacro MUI_DESCRIPTION_TEXT \${SecMainProg} \$(DESC_SecMainProg)
434 !insertmacro MUI_DESCRIPTION_TEXT \${SecWASAPI} \$(DESC_SecWASAPI)
437 if test -z "$NOVIDEOTOOLS"; then
438 cat >> $NSISFILE << EOF
439 !insertmacro MUI_DESCRIPTION_TEXT \${SecVideo} \$(DESC_SecVideo)
443 cat >> $NSISFILE << EOF
444 !insertmacro MUI_DESCRIPTION_TEXT \${SecMenu} \$(DESC_SecMenu)
445 !insertmacro MUI_FUNCTION_DESCRIPTION_END
447 SetShellVarContext all
448 DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}"
449 DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}"
450 DeleteRegKey HKLM "Software\\${PROGRAM_NAME}\\v${PROGRAM_VERSION}"
451 RMDir /r "\$INSTDIR\\bin"
452 RMDir /r "\$INSTDIR\\lib"
453 RMDir /r "\$INSTDIR\\share"
454 RMDir /r "\$INSTDIR\\gdb"
455 RMDir /r "\$INSTDIR\\video"
456 Delete "\$INSTDIR\\debug.bat"
457 Delete "\$INSTDIR\\uninstall.exe"
458 Delete "\$INSTDIR\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk"
460 Delete "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\*.*"
461 RMDir "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}"
462 \${unregisterExtension} ".${STATEFILE_SUFFIX}" "${PROGRAM_NAME} Session"
468 ReadRegStr \$R0 HKLM \
469 "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" \
473 MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
474 "${PROGRAM_NAME} is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
480 ExecWait '\$R0 _?=\$INSTDIR'
481 IfErrors uninstall_error
483 ReadRegStr \$R1 HKLM \
484 "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" \
486 StrCmp \$R1 "" 0 done
488 Delete "\$INSTDIR\\uninstall.exe"
494 MessageBox MB_OK|MB_ICONEXCLAMATION \
495 "Uninstaller did not complete successfully. Continue at your own risk..." \
500 \${If} \${AtMostWinXP}
501 SectionSetFlags \${SecWASAPI} \${SF_RO}
503 SectionSetFlags \${SecWASAPI} \${SF_SELECTED}
508 Function .onInstSuccess
510 \${If} \${AtMostWinXP}
514 SectionGetFlags \${SecWASAPI} \$R0
516 IntOp \$R0 \$R0 & \${SF_SELECTED}
517 IntCmp \$R0 \${SF_SELECTED} pa_with_wasapi pa_no_wasapi
520 ; VISTA .. 9, libportaudio with WASAPI is good.
521 Delete "\$INSTDIR\\bin\\libportaudio-2.xp"
524 ; Windows XP lacks support for WASAPI, Windows10 on some system has issues
525 ; http://tracker.ardour.org/view.php?id=6507
527 Delete "\$INSTDIR\\bin\\libportaudio-2.dll"
528 Rename "\$INSTDIR\\bin\\libportaudio-2.xp" "\$INSTDIR\\bin\\libportaudio-2.dll"
536 echo " === OutFile: $OUTFILE"
538 if test -n "$QUICKZIP" ; then
539 echo " === Building Windows Installer (fast zip)"
541 echo " === Building Windows Installer (lzma compression takes ages)"
543 time makensis -V2 $NSISFILE