changeset 1839:fdcd956b5d32

Further tidying, and error handling, for Windows build scripting
author Chris Cannam
date Tue, 05 Jun 2018 13:32:28 +0100
parents da678ff18fb0
children 8d78c9ac5835 9f26f92bf89f
files .appveyor.yml deploy/win32/sonic-visualiser.wxs deploy/win64/build-32.bat deploy/win64/build-64.bat deploy/win64/build-and-package.bat deploy/win64/complete-build.bat deploy/win64/sonic-visualiser.wxs noconfig.pri
diffstat 8 files changed, 162 insertions(+), 107 deletions(-) [+]
line wrap: on
line diff
--- a/.appveyor.yml	Thu May 24 17:30:02 2018 +0100
+++ b/.appveyor.yml	Tue Jun 05 13:32:28 2018 +0100
@@ -13,6 +13,6 @@
   - ps: '"code.soundsoftware.ac.uk = code.soundsoftware.ac.uk:fingerprints=sha256:64:75:f6:47:15:de:b4:51:ea:96:e2:f4:8a:f5:53:a5:11:c8:dd:82:73:5d:bd:54:18:cb:c8:9d:10:37:28:85" | Out-File -Encoding "ASCII" -Append $env:USERPROFILE\mercurial.ini'
 
 build_script:
-  - deploy\win64\complete-build.bat
+  - deploy\win64\build-and-package.bat
 
   
--- a/deploy/win32/sonic-visualiser.wxs	Thu May 24 17:30:02 2018 +0100
+++ b/deploy/win32/sonic-visualiser.wxs	Tue Jun 05 13:32:28 2018 +0100
@@ -39,7 +39,7 @@
           </Component>
         </Directory>
         <Directory Id="APPLICATIONFOLDER" Name="Sonic Visualiser">
-          
+
           <Component
               Id="MainExecutable"
               Guid="2C02DFB7-3CDF-4F73-B9D1-846326EE417D">
@@ -92,6 +92,8 @@
               Id="SVFileAssociation"
               Guid="DC6B3DD1-46DE-47FC-90FB-D8ACD5D1A88A">
             
+            <CreateFolder/>
+
             <ProgId 
                 Id='SonicVisualiser.svfile' 
                 Description='Sonic Visualiser project file'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-32.bat	Tue Jun 05 13:32:28 2018 +0100
@@ -0,0 +1,46 @@
+rem  Run this from within the top-level SV dir: deploy\win64\build-32.bat
+rem  To build from clean, delete the folder build_win32
+
+set STARTPWD=%CD%
+
+set QTDIR=C:\Qt\5.10.1\mingw53_32
+if not exist %QTDIR% (
+@   echo Could not find 32-bit Qt
+@   exit /b
+)
+
+set ORIGINALPATH=%PATH%
+set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw530_32\bin
+
+cd %STARTPWD%
+
+call .\repoint install
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+sv-dependency-builds\win32-mingw\bin\capnp -Isv-dependency-builds/win32-mingw/include compile --src-prefix=piper/capnp -osv-dependency-builds/win32-mingw/bin/capnpc-c++:piper-cpp/vamp-capnp piper/capnp/piper.capnp
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+mkdir build_win32
+cd build_win32
+
+qmake -r ..\sonic-visualiser.pro
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+jom
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+copy .\checker\release\vamp-plugin-load-checker.exe .\release
+
+copy %QTDIR%\bin\Qt5Core.dll .\release
+copy %QTDIR%\bin\Qt5Gui.dll .\release
+copy %QTDIR%\bin\Qt5Widgets.dll .\release
+copy %QTDIR%\bin\Qt5Network.dll .\release
+copy %QTDIR%\bin\Qt5Xml.dll .\release
+copy %QTDIR%\bin\Qt5Svg.dll .\release
+copy %QTDIR%\bin\libgcc_s_dw2-1.dll .\release
+copy %QTDIR%\bin\"libstdc++-6.dll" .\release
+copy %QTDIR%\bin\libwinpthread-1.dll .\release
+copy %QTDIR%\plugins\platforms\qminimal.dll .\release
+copy %QTDIR%\plugins\platforms\qwindows.dll .\release
+
+set PATH=%ORIGINALPATH%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-64.bat	Tue Jun 05 13:32:28 2018 +0100
@@ -0,0 +1,53 @@
+rem  Run this from within the top-level SV dir: deploy\win64\build-64.bat
+rem  To build from clean, delete the folder build_win64 first
+
+echo on
+
+set STARTPWD=%CD%
+
+set QTDIR=C:\Qt\5.10.1\msvc2017_64
+if not exist %QTDIR% (
+@   echo Could not find 64-bit Qt
+@   exit /b
+)
+
+if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+@   echo "Could not find MSVC vars batch file"
+@   exit /b
+)
+
+call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
+
+set ORIGINALPATH=%PATH%
+set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin
+
+cd %STARTPWD%
+
+call .\repoint install
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+sv-dependency-builds\win64-msvc\bin\capnp -Isv-dependency-builds/win64-msvc/include compile --src-prefix=piper/capnp -osv-dependency-builds/win64-msvc/bin/capnpc-c++:piper-cpp/vamp-capnp piper/capnp/piper.capnp
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+mkdir build_win64
+cd build_win64
+
+qmake -r -tp vc ..\sonic-visualiser.pro
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+msbuild sonic-visualiser.sln /t:Build /p:Configuration=Release
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+copy .\checker\release\vamp-plugin-load-checker.exe .\release
+
+copy %QTDIR%\bin\Qt5Core.dll .\release
+copy %QTDIR%\bin\Qt5Gui.dll .\release
+copy %QTDIR%\bin\Qt5Widgets.dll .\release
+copy %QTDIR%\bin\Qt5Network.dll .\release
+copy %QTDIR%\bin\Qt5Xml.dll .\release
+copy %QTDIR%\bin\Qt5Svg.dll .\release
+copy %QTDIR%\plugins\platforms\qminimal.dll .\release
+copy %QTDIR%\plugins\platforms\qwindows.dll .\release
+copy ..\sv-dependency-builds\win64-msvc\lib\libsndfile-1.dll .\release
+
+set PATH=%ORIGINALPATH%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-and-package.bat	Tue Jun 05 13:32:28 2018 +0100
@@ -0,0 +1,52 @@
+rem  Run this from within the top-level SV dir: deploy\win64\build-and-package.bat
+
+set STARTPWD=%CD%
+
+if not exist "C:\Program Files (x86)\SMLNJ\bin" (
+@   echo Could not find SML/NJ, required for Repoint
+@   exit /b
+)
+
+if not exist "C:\Program Files (x86)\WiX Toolset v3.11\bin" (
+@   echo Could not find WiX Toolset
+@   exit /b
+)
+
+@echo Rebuilding 32-bit
+
+cd %STARTPWD%
+rem del /q /s build_win32
+call .\deploy\win64\build-32.bat
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+@echo Rebuilding 64-bit
+
+cd %STARTPWD%
+rem del /q /s build_win64
+call .\deploy\win64\build-64.bat
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin"
+
+@echo Packaging 32-bit
+
+cd %STARTPWD%\build_win32
+del sonic-visualiser.msi
+candle -v ..\deploy\win32\sonic-visualiser.wxs
+light -b . -ext WixUIExtension -ext WixUtilExtension -v sonic-visualiser.wixobj
+if %errorlevel% neq 0 exit /b %errorlevel%
+del sonic-visualiser.wixobj
+del sonic-visualiser.wixpdb
+
+@echo Packaging 64-bit
+
+cd %STARTPWD%\build_win64
+del sonic-visualiser.msi
+candle -v ..\deploy\win64\sonic-visualiser.wxs
+light -b . -ext WixUIExtension -ext WixUtilExtension -v sonic-visualiser.wixobj
+if %errorlevel% neq 0 exit /b %errorlevel%
+del sonic-visualiser.wixobj
+del sonic-visualiser.wixpdb
+
+@echo Done
+
--- a/deploy/win64/complete-build.bat	Thu May 24 17:30:02 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-rem  Run this from within the top-level SV dir: deploy\win64\complete-build.bat
-rem  To build from clean, delete the folders build_win32 and build_win64 first
-
-set STARTPWD=%CD%
-
-if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
-@   echo "Could not find MSVC vars batch file"
-@   exit /b
-)
-
-set QTDIR32=C:\Qt\5.10.1\mingw53_32
-set QTDIR64=C:\Qt\5.10.1\msvc2017_64
-if not exist %QTDIR32% (
-@   echo Could not find 32-bit Qt
-@   exit /b
-)
-if not exist %QTDIR64% (
-@   echo Could not find 64-bit Qt
-@   exit /b
-)
-
-if not exist "C:\Program Files (x86)\SMLNJ\bin" (
-@   echo Could not find SML/NJ, required for Repoint
-@   exit /b
-)
-
-if not exist "C:\Program Files (x86)\WiX Toolset v3.11\bin" (
-@   echo Could not find WiX Toolset
-@   exit /b
-)
-
-call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
-
-set NONQTPATH=%PATH%;"C:\Program Files (x86)\SMLNJ\bin";"C:\Program Files (x86)\WiX Toolset v3.11\bin"
-
-cd %STARTPWD%
-
-call .\repoint install
-
-set QTDIR=%QTDIR32%
-set PATH=%NONQTPATH%;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw530_32\bin
-
-sv-dependency-builds\win32-mingw\bin\capnp -Isv-dependency-builds/win32-mingw/include compile --src-prefix=piper/capnp -osv-dependency-builds/win32-mingw/bin/capnpc-c++:piper-cpp/vamp-capnp piper/capnp/piper.capnp
-
-mkdir build_win32
-cd build_win32
-
-qmake -r ..\sonic-visualiser.pro
-
-jom
-
-copy .\checker\release\vamp-plugin-load-checker.exe .\release
-
-copy %QTDIR%\bin\Qt5Core.dll .\release
-copy %QTDIR%\bin\Qt5Gui.dll .\release
-copy %QTDIR%\bin\Qt5Widgets.dll .\release
-copy %QTDIR%\bin\Qt5Network.dll .\release
-copy %QTDIR%\bin\Qt5Xml.dll .\release
-copy %QTDIR%\bin\Qt5Svg.dll .\release
-copy %QTDIR%\bin\libgcc_s_dw2-1.dll .\release
-copy %QTDIR%\bin\"libstdc++-6.dll" .\release
-copy %QTDIR%\bin\libwinpthread-1.dll .\release
-copy %QTDIR%\plugins\platforms\qminimal.dll .\release
-copy %QTDIR%\plugins\platforms\qwindows.dll .\release
-
-del sonic-visualiser.msi
-candle -v ..\deploy\win32\sonic-visualiser.wxs
-light -b . -ext WixUIExtension -ext WixUtilExtension -v sonic-visualiser.wixobj
-del sonic-visualiser.wixobj
-del sonic-visualiser.wixpdb
-
-cd %STARTPWD%
-
-set QTDIR=%QTDIR64%
-set PATH=%NONQTPATH%;%QTDIR%\bin
-
-sv-dependency-builds\win64-msvc\bin\capnp -Isv-dependency-builds/win64-msvc/include compile --src-prefix=piper/capnp -osv-dependency-builds/win64-msvc/bin/capnpc-c++:piper-cpp/vamp-capnp piper/capnp/piper.capnp
-
-mkdir build_win64
-cd build_win64
-
-qmake -r -tp vc ..\sonic-visualiser.pro
-
-msbuild sonic-visualiser.sln /t:Build /p:Configuration=Release
-
-copy .\checker\release\vamp-plugin-load-checker.exe .\release
-
-copy %QTDIR%\bin\Qt5Core.dll .\release
-copy %QTDIR%\bin\Qt5Gui.dll .\release
-copy %QTDIR%\bin\Qt5Widgets.dll .\release
-copy %QTDIR%\bin\Qt5Network.dll .\release
-copy %QTDIR%\bin\Qt5Xml.dll .\release
-copy %QTDIR%\bin\Qt5Svg.dll .\release
-copy %QTDIR%\plugins\platforms\qminimal.dll .\release
-copy %QTDIR%\plugins\platforms\qwindows.dll .\release
-copy ..\sv-dependency-builds\win64-msvc\lib\libsndfile-1.dll .\release
-
-del sonic-visualiser.msi
-candle -v ..\deploy\win64\sonic-visualiser.wxs
-light -b . -ext WixUIExtension -ext WixUtilExtension -v sonic-visualiser.wixobj
-del sonic-visualiser.wixobj
-del sonic-visualiser.wixpdb
--- a/deploy/win64/sonic-visualiser.wxs	Thu May 24 17:30:02 2018 +0100
+++ b/deploy/win64/sonic-visualiser.wxs	Tue Jun 05 13:32:28 2018 +0100
@@ -45,6 +45,7 @@
         </Directory>
 
         <Directory Id="APPLICATIONFOLDER" Name="Sonic Visualiser">
+
           <Component Win64="yes"
               Id="MainExecutable"
               Guid="65E1EBDF-4C8F-47B8-BCD6-981667F5946D">
@@ -97,6 +98,8 @@
 	      Id="SVFileAssociation"
 	      Guid="F07C5CC1-0209-4C1A-8D52-C40B50A2B964">
             
+            <CreateFolder/>
+
             <ProgId 
                 Id='SonicVisualiser.svfile' 
                 Description='Sonic Visualiser project file'
@@ -204,7 +207,7 @@
 		  Name="piper-vamp-simple-server.exe"
 		  Source="release\piper-vamp-simple-server.exe"/>
 	    </Component>
-            <Component
+            <Component Win64="yes"
                 Id="Piper32"
                 Guid="F27A00A8-DD03-45B0-A13C-8CD8CC6F7386">
 	      <File
@@ -232,7 +235,7 @@
 		  Name="vamp-plugin-load-checker.exe"
 		  Source="release\vamp-plugin-load-checker.exe"/>
 	    </Component>
-            <Component
+            <Component Win64="yes"
                 Id="Checker32"
                 Guid="4F3FDFEC-23BD-4F2F-9B8F-9C8387FDEC21">
 	      <File
--- a/noconfig.pri	Thu May 24 17:30:02 2018 +0100
+++ b/noconfig.pri	Tue Jun 05 13:32:28 2018 +0100
@@ -94,7 +94,8 @@
 
     DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
 
-    QMAKE_CXXFLAGS_RELEASE += -fp:fast
+    QMAKE_CXXFLAGS_RELEASE += -fp:fast -gl
+    QMAKE_LFLAGS_RELEASE += -ltcg
 
     # No Ogg/FLAC support in the sndfile build on this platform yet
     LIBS -= -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile