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 : ${HARRISONCHANNELSTRIP=harrison_channelstrip}
21 : ${HARRISONLV2=harrison_lv2s-n}
23 # see also wscript, video_tool_paths.cc, bundle_env_mingw.cc
24 # registry keys based on this are used there
27 PROGRAM_VERSION=${major_version}
30 PRODUCT_VERSION=${major_version}
35 # TODO: grep from build/config.log instead
36 while [ $# -gt 0 ] ; do
51 PRODUCT_NAME=mixbus32c
53 PROGRAM_NAME=Mixbus32C-${PROGRAM_VERSION}
56 --chanstrip) HARRISONCHANNELSTRIP=$2 ; shift; shift ;;
61 LOWERCASE_DIRNAME=ardour${major_version}
62 STATEFILE_SUFFIX=ardour # see filename_extensions.cc
66 PRODUCT_ID=${PROGRAM_NAME}${PROGRAM_VERSION}
67 PRODUCT_EXE=${PRODUCT_NAME}.exe
68 PRODUCT_ICON=${PRODUCT_NAME}.ico
70 ###############################################################################
72 echo "Packaging $PRODUCT_ID"
74 if test "$XARCH" = "x86_64" -o "$XARCH" = "amd64"; then
75 echo "Target: 64bit Windows (x86_64)"
76 XPREFIX=x86_64-w64-mingw32
79 echo "Target: 32 Windows (i686)"
80 XPREFIX=i686-w64-mingw32
84 : ${PREFIX=${ROOT}/win-stack-$WARCH}
87 if [ "$(id -u)" = "0" ]; then
88 apt-get -y install nsis curl
93 echo "--- Downloading.. $2"
94 test -f ${SRCCACHE}/$1 || curl -k -L -o ${SRCCACHE}/$1 $2
97 ################################################################################
100 ARDOURVERSION=${release_version}
101 ARDOURDATE=$(date -R)
102 if ! test -f build/gtk2_ardour/ardour-${ARDOURVERSION}.exe; then
103 echo "*** Please compile ardour-${ARDOURVERSION}.exe first."
107 echo " === bundle to $DESTDIR"
111 ################################################################################
113 if test -z "$DESTDIR"; then
115 trap 'rm -rf $DESTDIR' exit SIGINT SIGTERM
118 echo " === bundle to $DESTDIR"
120 ALIBDIR=$DESTDIR/lib/${LOWERCASE_DIRNAME}
123 mkdir -p $DESTDIR/bin
124 mkdir -p $DESTDIR/share/
125 mkdir -p $ALIBDIR/surfaces
126 mkdir -p $ALIBDIR/backends
127 mkdir -p $ALIBDIR/panners
128 mkdir -p $ALIBDIR/vamp
129 mkdir -p $ALIBDIR/suil
131 cp build/libs/gtkmm2ext/gtkmm2ext-*.dll $DESTDIR/bin/
132 cp build/libs/midi++2/midipp-*.dll $DESTDIR/bin/
133 cp build/libs/evoral/evoral-*.dll $DESTDIR/bin/
134 cp build/libs/ardour/ardour-*.dll $DESTDIR/bin/
135 cp build/libs/timecode/timecode.dll $DESTDIR/bin/
136 cp build/libs/qm-dsp/qmdsp-*.dll $DESTDIR/bin/
137 cp build/libs/canvas/canvas-*.dll $DESTDIR/bin/
138 cp build/libs/pbd/pbd-*.dll $DESTDIR/bin/
139 cp build/libs/ptformat/ptformat-*.dll $DESTDIR/bin/
140 cp build/libs/audiographer/audiographer-*.dll $DESTDIR/bin/
141 cp build/libs/fst/ardour-vst-scanner.exe $DESTDIR/bin/ || true
142 cp `ls -t build/gtk2_ardour/ardour-*.exe | head -n1` $DESTDIR/bin/${PRODUCT_EXE}
144 mkdir -p $DESTDIR/lib/gtk-2.0/engines
145 cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR/lib/gtk-2.0/engines/libclearlooks.la
147 cp $PREFIX/bin/*dll $DESTDIR/bin/
148 cp $PREFIX/lib/*dll $DESTDIR/bin/
149 # special case libportaudio (wasapi), old stack has no wasapi and hence no .xp
150 cp $PREFIX/bin/libportaudio-2.xp $DESTDIR/bin/ || cp $PREFIX/bin/libportaudio-2.dll $DESTDIR/bin/libportaudio-2.xp
151 rm -rf $DESTDIR/bin/libjack*.dll
153 cp `find build/libs/surfaces/ -iname "*.dll"` $ALIBDIR/surfaces/
154 cp `find build/libs/backends/ -iname "*.dll"` $ALIBDIR/backends/
155 cp `find build/libs/panners/ -iname "*.dll"` $ALIBDIR/panners/
157 cp -r build/libs/LV2 $ALIBDIR/
158 cp -r build/libs/vamp-plugins/*ardourvampplugins*.dll $ALIBDIR/vamp/libardourvampplugins.dll
159 cp $PREFIX/lib/suil-*/*.dll $ALIBDIR/suil/ || true
161 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
162 if test -d $PREFIX/lib/lv2/lv2core.lv2 ; then
163 cp -R $PREFIX/lib/lv2/lv2core.lv2 $ALIBDIR/LV2/
166 mv $ALIBDIR/surfaces/ardourcp*.dll $DESTDIR/bin/
168 # TODO use -static-libgcc -static-libstdc++ -- but for .exe files only
169 if update-alternatives --query ${XPREFIX}-gcc | grep Value: | grep -q win32; then
170 cp /usr/lib/gcc/${XPREFIX}/*-win32/libgcc_s_*.dll $DESTDIR/bin/
171 cp /usr/lib/gcc/${XPREFIX}/*-win32/libstdc++-6.dll $DESTDIR/bin/
172 elif update-alternatives --query ${XPREFIX}-gcc | grep Value: | grep -q posix; then
173 cp /usr/lib/gcc/${XPREFIX}/*-posix/libgcc_s_*.dll $DESTDIR/bin/
174 cp /usr/lib/gcc/${XPREFIX}/*-posix/libstdc++-6.dll $DESTDIR/bin/
176 cp /usr/lib/gcc/${XPREFIX}/*/libgcc_s_sjlj-1.dll $DESTDIR/bin/
177 cp /usr/lib/gcc/${XPREFIX}/*/libstdc++-6.dll $DESTDIR/bin/
179 #Ubuntu's 14.04's mingw needs this one for the std libs above
180 if test -f /usr/${XPREFIX}/lib/libwinpthread-1.dll; then
181 cp /usr/${XPREFIX}/lib/libwinpthread-1.dll $DESTDIR/bin/
184 cp -r $PREFIX/share/${LOWERCASE_DIRNAME} $DESTDIR/share/
185 cp -r $PREFIX/share/locale $DESTDIR/share/
186 cp -r $PREFIX/etc/${LOWERCASE_DIRNAME}/* $DESTDIR/share/${LOWERCASE_DIRNAME}/
188 cp COPYING $DESTDIR/share/
189 cp gtk2_ardour/icons/${PRODUCT_ICON} $DESTDIR/share/
190 cp gtk2_ardour/icons/ardour_bug.ico $DESTDIR/share/
192 # replace default cursor with square version (sans hotspot file)
193 cp gtk2_ardour/icons/cursor_square/* $DESTDIR/share/${LOWERCASE_DIRNAME}/icons/
195 # clean build-dir after depoyment
196 echo " === bundle completed, cleaning up"
201 ################################################################################
203 if test -z "$NOVIDEOTOOLS"; then
204 echo " === Including video-tools"
205 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
206 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
208 rsync -a -q --partial \
209 rsync://ardour.org/video-tools/harvid_win-${HARVID_VERSION}.tar.xz \
210 "${SRCCACHE}/harvid_win-${HARVID_VERSION}.tar.xz"
212 rsync -a -q --partial \
213 rsync://ardour.org/video-tools/xjadeo_win-${XJADEO_VERSION}.tar.xz \
214 "${SRCCACHE}/xjadeo_win-${XJADEO_VERSION}.tar.xz"
217 tar -xf "${SRCCACHE}/harvid_win-${HARVID_VERSION}.tar.xz" -C "$DESTDIR/video/"
218 tar -xf "${SRCCACHE}/xjadeo_win-${XJADEO_VERSION}.tar.xz" -C "$DESTDIR/video/"
221 du -sh $DESTDIR/video
225 ################################################################################
226 ### include static gdb - re-zipped binaries from
227 ### http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/gdb-7.6.1-1/gdb-7.6.1-1-mingw32-bin.tar.lzma
228 ### 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
229 if ! grep " using ./waf configure" build/config.log | grep -q -- "--optimize"; then
230 download gdb-static-win3264.tar.xz http://robin.linuxaudio.org/gdb-static-win3264.tar.xz
232 tar xf gdb-static-win3264.tar.xz
235 echo " === Creating debug.bat"
236 cp -r ${SRCCACHE}/gdb_$WARCH $DESTDIR/gdb
237 cat > $DESTDIR/debug.bat << EOF
239 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"
241 OUTFILE="${TMPDIR}/${PRODUCT_NAME}-${ARDOURVERSION}-dbg-${WARCH}-Setup.exe"
242 VERSIONINFO="Debug Version."
244 OUTFILE="${TMPDIR}/${PRODUCT_NAME}-${ARDOURVERSION}-${WARCH}-Setup.exe"
245 VERSIONINFO="Optimized Version."
248 ################################################################################
249 ### Mixbus plugins, etc
250 if test x$WITH_X42_LV2 != x ; then
251 mkdir -p $ALIBDIR/LV2
253 echo "Adding x42 Plugins"
255 for proj in x42-meters x42-midifilter x42-midimap x42-stereoroute x42-eq setBfree; do
256 X42_VERSION=$(curl -s -S http://x42-plugins.com/x42/win/${proj}.latest.txt)
257 rsync -a -q --partial \
258 rsync://x42-plugins.com/x42/win/${proj}-lv2-${WARCH}-${X42_VERSION}.zip \
259 "${SRCCACHE}/${proj}-lv2-${WARCH}-${X42_VERSION}.zip"
260 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/${proj}-lv2-${WARCH}-${X42_VERSION}.zip"
264 if test x$WITH_HARRISON_LV2 != x ; then
265 mkdir -p $ALIBDIR/LV2
267 echo "Including Harrison LV2s"
269 curl -s -S --fail -# \
270 -z "${SRCCACHE}/${HARRISONLV2}.${WARCH}.zip" \
271 -o "${SRCCACHE}/${HARRISONLV2}.${WARCH}.zip" \
272 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONLV2}.${WARCH}.zip"
273 unzip -q -d "$ALIBDIR/LV2/" "${SRCCACHE}/${HARRISONLV2}.${WARCH}.zip"
276 if test -n "$MIXBUS"; then
277 echo "Deploying Harrison Mixbus Channelstrip"
279 mkdir -p $ALIBDIR/ladspa/strip
280 curl -s -S --fail -# \
281 -z "${SRCCACHE}/${HARRISONCHANNELSTRIP}.${WARCH}.dll" \
282 -o "${SRCCACHE}/${HARRISONCHANNELSTRIP}.${WARCH}.dll" \
283 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONCHANNELSTRIP}.${WARCH}.dll"
285 cp "${SRCCACHE}/${HARRISONCHANNELSTRIP}.${WARCH}.dll" \
286 "$ALIBDIR/ladspa/strip/${HARRISONCHANNELSTRIP}.dll"
288 echo "Deploying Harrison Vamp Plugins"
289 mkdir -p $ALIBDIR/vamp
290 curl -s -S --fail -# \
291 -z "${SRCCACHE}/harrison_vamp.${WARCH}.dll" \
292 -o "${SRCCACHE}/harrison_vamp.${WARCH}.dll" \
293 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_vamp.${WARCH}.dll"
295 cp "${SRCCACHE}/harrison_vamp.${WARCH}.dll" \
296 "$ALIBDIR/vamp/harrison_vamp.dll"
299 ################################################################################
301 if test x$DEMO_SESSION_URL != x ; then
302 mkdir -p $Shared/sessions
303 DEMO_SESSIONS=$(curl -s -S --fail $DEMO_SESSION_URL/index.txt)
304 for demo in $DEMO_SESSIONS; do
305 curl -s -S --fail -# -o $Shared/sessions/$demo $DEMO_SESSION_URL/$demo
309 ################################################################################
311 ( cd $DESTDIR ; find . ) > ${TMPDIR}/file_list.txt
313 ################################################################################
314 echo " === Preparing Windows Installer"
315 NSISFILE=$DESTDIR/a3.nsis
317 if test "$WARCH" = "w64"; then
322 # TODO we should only add this for 32bit on 64bit windows!
326 if test -n "$QUICKZIP" ; then
327 cat > $NSISFILE << EOF
331 cat > $NSISFILE << EOF
332 SetCompressor /SOLID lzma
333 SetCompressorDictSize 32
337 cat >> $NSISFILE << EOF
338 !addincludedir "${this_script_dir}\\nsis"
340 !include FileAssociation.nsh
343 Name "${PROGRAM_NAME}${PROGRAM_VERSION}"
345 RequestExecutionLevel admin
346 InstallDir "\$${PGF}\\${PRODUCT_ID}"
347 InstallDirRegKey HKLM "Software\\${PRODUCT_NAME}\\${PRODUCT_ID}\\$WARCH" "Install_Dir"
348 !define MUI_ICON "share\\${PRODUCT_ICON}"
352 if test -n "$MIXBUS"; then
354 # TODO: proper welcome/finish text.
355 cat >> $NSISFILE << EOF
356 !define MUI_FINISHPAGE_TITLE "Welcome to Harrison Mixbus"
357 !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."
358 !define MUI_FINISHPAGE_LINK "Mixbus Manual"
359 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.harrisonconsoles.com/mixbus/mixbus3-live-manual"
360 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
365 cat >> $NSISFILE << EOF
366 !define MUI_FINISHPAGE_TITLE "Welcome to Ardour"
367 !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."
368 !define MUI_FINISHPAGE_LINK "Ardour on Windows"
369 !define MUI_FINISHPAGE_LINK_LOCATION "http://ardour.org/windows.html"
370 #this would run as admin - see http://forums.winamp.com/showthread.php?t=353366
371 #!define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\${PRODUCT_EXE}"
372 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
377 cat >> $NSISFILE << EOF
378 !define MUI_ABORTWARNING
379 !insertmacro MUI_PAGE_LICENSE "share\\COPYING"
380 !insertmacro MUI_PAGE_COMPONENTS
381 !insertmacro MUI_PAGE_DIRECTORY
382 !insertmacro MUI_PAGE_INSTFILES
383 !insertmacro MUI_PAGE_FINISH
384 !insertmacro MUI_UNPAGE_CONFIRM
385 !insertmacro MUI_UNPAGE_INSTFILES
386 !insertmacro MUI_LANGUAGE "English"
388 Section "${PROGRAM_NAME}${PROGRAM_VERSION} (required)" SecMainProg
394 File /nonfatal debug.bat
395 File /nonfatal /r gdb
396 WriteRegStr HKLM "Software\\${PROGRAM_KEY}\\v${major_version}\\$WARCH" "Install_Dir" "\$INSTDIR"
397 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "DisplayName" "${PROGRAM_NAME}${PROGRAM_VERSION}"
398 WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "UninstallString" '"\$INSTDIR\\uninstall.exe"'
399 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "NoModify" 1
400 WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" "NoRepair" 1
401 WriteUninstaller "\$INSTDIR\uninstall.exe"
402 CreateShortCut "\$INSTDIR\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk" "\$INSTDIR\\bin\\${PRODUCT_EXE}" "" "\$INSTDIR\\bin\\${PRODUCT_EXE}" 0
403 \${registerExtension} "\$INSTDIR\\bin\\${STATEFILE_SUFFIX}" ".${PRODUCT_NAME}" "${PROGRAM_NAME} Session"
406 Section "WASAPI sound driver" SecWASAPI
410 if test -z "$NOVIDEOTOOLS"; then
412 cat >> $NSISFILE << EOF
413 Section "Videotimeline Tools" SecVideo
414 WriteRegStr HKLM "Software\\${PROGRAM_KEY}\\v${major_version}\\video" "Install_Dir" "\$INSTDIR\\video"
422 cat >> $NSISFILE << EOF
423 Section "Start Menu Shortcuts" SecMenu
424 SetShellVarContext all
425 CreateDirectory "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}"
426 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk" "\$INSTDIR\\bin\\${PRODUCT_EXE}" "" "\$INSTDIR\\bin\\${PRODUCT_EXE}" 0
429 if test -f "$DESTDIR/debug.bat"; then
430 cat >> $NSISFILE << EOF
431 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\${PROGRAM_NAME}${PROGRAM_VERSION} GDB.lnk" "\$INSTDIR\\debug.bat" "" "\$INSTDIR\\share\\ardour_bug.ico" 0
435 if test -z "$NOVIDEOTOOLS"; then
436 cat >> $NSISFILE << EOF
437 IfFileExists "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0 +2
438 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\Video Monitor.lnk" "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" "" "\$INSTDIR\\video\\xjadeo\\xjadeo.exe" 0
442 cat >> $NSISFILE << EOF
443 CreateShortCut "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0
445 LangString DESC_SecMainProg \${LANG_ENGLISH} "${PROGRAM_NAME} ${ARDOURVERSION}\$\\r\$\\n${VERSIONINFO}\$\\r\$\\n${ARDOURDATE}"
446 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."
449 if test -z "$NOVIDEOTOOLS"; then
450 cat >> $NSISFILE << EOF
451 LangString DESC_SecVideo \${LANG_ENGLISH} "Video Tools\$\\r\$\\nxjadeo-${XJADEO_VERSION}\$\\r\$\\nharvid-${HARVID_VERSION}"
455 cat >> $NSISFILE << EOF
456 LangString DESC_SecMenu \${LANG_ENGLISH} "Create Start-Menu Shortcuts (recommended)."
457 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
458 !insertmacro MUI_DESCRIPTION_TEXT \${SecMainProg} \$(DESC_SecMainProg)
459 !insertmacro MUI_DESCRIPTION_TEXT \${SecWASAPI} \$(DESC_SecWASAPI)
462 if test -z "$NOVIDEOTOOLS"; then
463 cat >> $NSISFILE << EOF
464 !insertmacro MUI_DESCRIPTION_TEXT \${SecVideo} \$(DESC_SecVideo)
468 cat >> $NSISFILE << EOF
469 !insertmacro MUI_DESCRIPTION_TEXT \${SecMenu} \$(DESC_SecMenu)
470 !insertmacro MUI_FUNCTION_DESCRIPTION_END
472 SetShellVarContext all
473 DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}"
474 DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}"
475 DeleteRegKey HKLM "Software\\${PROGRAM_KEY}\\v${major_version}"
476 RMDir /r "\$INSTDIR\\bin"
477 RMDir /r "\$INSTDIR\\lib"
478 RMDir /r "\$INSTDIR\\share"
479 RMDir /r "\$INSTDIR\\gdb"
480 RMDir /r "\$INSTDIR\\video"
481 Delete "\$INSTDIR\\debug.bat"
482 Delete "\$INSTDIR\\uninstall.exe"
483 Delete "\$INSTDIR\\${PROGRAM_NAME}${PROGRAM_VERSION}.lnk"
485 Delete "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}\\*.*"
486 RMDir "\$SMPROGRAMS\\${PRODUCT_ID}${SFX}"
487 \${unregisterExtension} ".${STATEFILE_SUFFIX}" "${PROGRAM_NAME} Session"
493 ReadRegStr \$R0 HKLM \
494 "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" \
498 MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
499 "${PROGRAM_NAME} is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
505 ExecWait '\$R0 _?=\$INSTDIR'
506 IfErrors uninstall_error
508 ReadRegStr \$R1 HKLM \
509 "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" \
511 StrCmp \$R1 "" 0 done
513 Delete "\$INSTDIR\\uninstall.exe"
519 MessageBox MB_OK|MB_ICONEXCLAMATION \
520 "Uninstaller did not complete successfully. Continue at your own risk..." \
525 \${If} \${AtMostWinXP}
526 SectionSetFlags \${SecWASAPI} \${SF_RO}
528 SectionSetFlags \${SecWASAPI} \${SF_SELECTED}
533 Function .onInstSuccess
535 \${If} \${AtMostWinXP}
539 SectionGetFlags \${SecWASAPI} \$R0
541 IntOp \$R0 \$R0 & \${SF_SELECTED}
542 IntCmp \$R0 \${SF_SELECTED} pa_with_wasapi pa_no_wasapi
545 ; VISTA .. 9, libportaudio with WASAPI is good.
546 Delete "\$INSTDIR\\bin\\libportaudio-2.xp"
549 ; Windows XP lacks support for WASAPI, Windows10 on some system has issues
550 ; http://tracker.ardour.org/view.php?id=6507
552 Delete "\$INSTDIR\\bin\\libportaudio-2.dll"
553 Rename "\$INSTDIR\\bin\\libportaudio-2.xp" "\$INSTDIR\\bin\\libportaudio-2.dll"
561 echo " === OutFile: $OUTFILE"
563 if test -n "$QUICKZIP" ; then
564 echo " === Building Windows Installer (fast zip)"
566 echo " === Building Windows Installer (lzma compression takes ages)"
568 time makensis -V2 $NSISFILE