# HG changeset patch
# User Chris Cannam
# Date 1527175190 -3600
# Node ID e63cc95876cb3094243529c21456b144e7247763
# Parent 1b6ffed298a2825bc55ac84bb3aa7d1ce2bd09f2
Alternative build mechanism for Windows, with base as a library and a single script to run full builds
diff -r 1b6ffed298a2 -r e63cc95876cb .appveyor.yml
--- a/.appveyor.yml Fri May 18 13:49:23 2018 +0100
+++ b/.appveyor.yml Thu May 24 16:19:50 2018 +0100
@@ -12,14 +12,7 @@
- ps: '"[hostsecurity]" | Out-File -Encoding "ASCII" -Append $env:USERPROFILE\mercurial.ini'
- 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'
-before_build:
- - set QTDIR=C:\Qt\5.10\msvc2017_64
- - set PATH=%PATH%;%QTDIR%\bin;C:\Program Files (x86)\SMLNJ\bin
- - repoint install
- - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
- - qmake -r -tp vc sonic-visualiser.pro
- - 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
+build_script:
+ - deploy\win64\complete-build.bat
-build:
- project: sonic-visualiser.sln
diff -r 1b6ffed298a2 -r e63cc95876cb .hgignore
--- a/.hgignore Fri May 18 13:49:23 2018 +0100
+++ b/.hgignore Thu May 24 16:19:50 2018 +0100
@@ -50,3 +50,5 @@
*.msi
*.user
glob:.repoint-*.bin
+build_win32
+build_win64
diff -r 1b6ffed298a2 -r e63cc95876cb base.pri
--- a/base.pri Fri May 18 13:49:23 2018 +0100
+++ b/base.pri Thu May 24 16:19:50 2018 +0100
@@ -33,37 +33,3 @@
CONFIG += qt thread warn_on stl rtti exceptions c++11
-include(bq-files.pri)
-include(vamp-plugin-sdk-files.pri)
-include(svcore/files.pri)
-include(capnp-regen.pri)
-
-DATAQUAY_SOURCES=$$fromfile(dataquay/lib.pro, SOURCES)
-DATAQUAY_HEADERS=$$fromfile(dataquay/lib.pro, HEADERS)
-
-CHECKER_SOURCES=$$fromfile(checker/checker.pri, SOURCES)
-CHECKER_HEADERS=$$fromfile(checker/checker.pri, HEADERS)
-
-CLIENT_HEADERS=$$fromfile(piper-cpp/vamp-client/qt/test.pro, HEADERS)
-
-for (file, BQ_SOURCES) { SOURCES += $$file }
-for (file, BQ_HEADERS) { HEADERS += $$file }
-
-for (file, VAMP_SOURCES) { SOURCES += $$file }
-for (file, VAMP_HEADERS) { HEADERS += $$file }
-
-for (file, DATAQUAY_SOURCES) { SOURCES += $$sprintf("dataquay/%1", $$file) }
-for (file, DATAQUAY_HEADERS) { HEADERS += $$sprintf("dataquay/%1", $$file) }
-
-for (file, CHECKER_SOURCES) { SOURCES += $$sprintf("checker/%1", $$file) }
-for (file, CHECKER_HEADERS) { HEADERS += $$sprintf("checker/%1", $$file) }
-
-for (file, SVCORE_SOURCES) { SOURCES += $$sprintf("svcore/%1", $$file) }
-for (file, SVCORE_HEADERS) { HEADERS += $$sprintf("svcore/%1", $$file) }
-
-for (file, CLIENT_HEADERS) {
- HEADERS += $$sprintf("piper-cpp/vamp-client/qt/%1", $$file)
-}
-
-SOURCES += piper-cpp/vamp-capnp/piper-capnp.cpp
-
diff -r 1b6ffed298a2 -r e63cc95876cb base.pro
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/base.pro Thu May 24 16:19:50 2018 +0100
@@ -0,0 +1,56 @@
+
+TEMPLATE = lib
+
+exists(config.pri) {
+ include(config.pri)
+}
+
+!exists(config.pri) {
+ include(noconfig.pri)
+}
+
+include(base.pri)
+
+CONFIG += staticlib
+QT += network xml
+QT -= gui
+
+TARGET = base
+
+OBJECTS_DIR = o
+MOC_DIR = o
+
+include(bq-files.pri)
+include(vamp-plugin-sdk-files.pri)
+include(svcore/files.pri)
+include(capnp-regen.pri)
+
+DATAQUAY_SOURCES=$$fromfile(dataquay/lib.pro, SOURCES)
+DATAQUAY_HEADERS=$$fromfile(dataquay/lib.pro, HEADERS)
+
+CHECKER_SOURCES=$$fromfile(checker/checker.pri, SOURCES)
+CHECKER_HEADERS=$$fromfile(checker/checker.pri, HEADERS)
+
+CLIENT_HEADERS=$$fromfile(piper-cpp/vamp-client/qt/test.pro, HEADERS)
+
+for (file, BQ_SOURCES) { SOURCES += $$file }
+for (file, BQ_HEADERS) { HEADERS += $$file }
+
+for (file, VAMP_SOURCES) { SOURCES += $$file }
+for (file, VAMP_HEADERS) { HEADERS += $$file }
+
+for (file, DATAQUAY_SOURCES) { SOURCES += $$sprintf("dataquay/%1", $$file) }
+for (file, DATAQUAY_HEADERS) { HEADERS += $$sprintf("dataquay/%1", $$file) }
+
+for (file, CHECKER_SOURCES) { SOURCES += $$sprintf("checker/%1", $$file) }
+for (file, CHECKER_HEADERS) { HEADERS += $$sprintf("checker/%1", $$file) }
+
+for (file, SVCORE_SOURCES) { SOURCES += $$sprintf("svcore/%1", $$file) }
+for (file, SVCORE_HEADERS) { HEADERS += $$sprintf("svcore/%1", $$file) }
+
+for (file, CLIENT_HEADERS) {
+ HEADERS += $$sprintf("piper-cpp/vamp-client/qt/%1", $$file)
+}
+
+SOURCES += piper-cpp/vamp-capnp/piper-capnp.cpp
+
diff -r 1b6ffed298a2 -r e63cc95876cb deploy/win32/build.cmd
--- a/deploy/win32/build.cmd Fri May 18 13:49:23 2018 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@ECHO OFF
-SET WIXPATH="C:\Program Files (x86)\WiX Toolset v3.11\bin"
-IF NOT EXIST %WIXPATH% (
- SET WIXPATH="C:\Program Files\WiX Toolset v3.11\bin"
-)
-DEL sonic-visualiser.msi
-%WIXPATH%\candle.exe -v sonic-visualiser.wxs
-%WIXPATH%\light.exe -b ..\..\..\build-sonic-visualiser-Desktop_Qt_5_10_1_MinGW_32bit-Release -ext WixUIExtension -ext WixUtilExtension -v sonic-visualiser.wixobj
-PAUSE
-DEL sonic-visualiser.wixobj
-DEL sonic-visualiser.wixpdb
diff -r 1b6ffed298a2 -r e63cc95876cb deploy/win32/sonic-visualiser.wxs
--- a/deploy/win32/sonic-visualiser.wxs Fri May 18 13:49:23 2018 +0100
+++ b/deploy/win32/sonic-visualiser.wxs Thu May 24 16:19:50 2018 +0100
@@ -35,7 +35,7 @@
+ Source="..\deploy\win32\README-Vamp.txt"/>
@@ -72,20 +72,20 @@
+ Source="..\COPYING"/>
+ Source="..\README.md"/>
+ Source="..\CHANGELOG"/>
+ Source="..\icons/sv-winicon.ico"/>
-
+
-
+
-
-
-
+
+
+
diff -r 1b6ffed298a2 -r e63cc95876cb deploy/win64/build.cmd
--- a/deploy/win64/build.cmd Fri May 18 13:49:23 2018 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@ECHO OFF
-SET WIXPATH="C:\Program Files (x86)\WiX Toolset v3.11\bin"
-IF NOT EXIST %WIXPATH% (
- SET WIXPATH="C:\Program Files\WiX Toolset v3.11\bin"
-)
-DEL sonic-visualiser.msi
-%WIXPATH%\candle.exe -v sonic-visualiser.wxs
-%WIXPATH%\light.exe -b ..\..\..\build-sonic-visualiser-Desktop_Qt_5_10_1_MSVC2017_64bit-Release -ext WixUIExtension -v sonic-visualiser.wixobj
-PAUSE
-DEL sonic-visualiser.wixobj
-DEL sonic-visualiser.wixpdb
diff -r 1b6ffed298a2 -r e63cc95876cb deploy/win64/complete-build.bat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/complete-build.bat Thu May 24 16:19:50 2018 +0100
@@ -0,0 +1,102 @@
+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
diff -r 1b6ffed298a2 -r e63cc95876cb deploy/win64/sonic-visualiser.wxs
--- a/deploy/win64/sonic-visualiser.wxs Fri May 18 13:49:23 2018 +0100
+++ b/deploy/win64/sonic-visualiser.wxs Thu May 24 16:19:50 2018 +0100
@@ -40,7 +40,7 @@
+ Source="..\deploy\win64\README-Vamp.txt"/>
@@ -77,20 +77,20 @@
+ Source="..\COPYING"/>
+ Source="..\README.md"/>
+ Source="..\CHANGELOG"/>
+ Source="..\icons\sv-winicon.ico"/>
@@ -210,19 +210,19 @@
+ Source="..\build_win32\release\piper-vamp-simple-server.exe"/>
+ Source="..\build_win32\release\libgcc_s_dw2-1.dll"/>
+ Source="..\build_win32\release\libstdc++-6.dll"/>
+ Source="..\build_win32\release\libwinpthread-1.dll"/>
+ Source="..\build_win32\release\vamp-plugin-load-checker.exe"/>
@@ -253,7 +253,7 @@
+ Source="..\deploy\win64\README-Vamp32.txt"/>
@@ -303,13 +303,13 @@
-
+
-
+
-
-
+
+
diff -r 1b6ffed298a2 -r e63cc95876cb noconfig.pri
--- a/noconfig.pri Fri May 18 13:49:23 2018 +0100
+++ b/noconfig.pri Thu May 24 16:19:50 2018 +0100
@@ -30,6 +30,7 @@
# these.
LIBS += \
+ -lbase \
-lbz2 \
-lrubberband \
-lfftw3 \
@@ -56,9 +57,9 @@
# This config is currently used for 32-bit Windows builds.
- INCLUDEPATH += sv-dependency-builds/win32-mingw/include
+ INCLUDEPATH += $$PWD/sv-dependency-builds/win32-mingw/include
- LIBS += -Lrelease -Lsv-dependency-builds/win32-mingw/lib -L../sonic-visualiser/sv-dependency-builds/win32-mingw/lib
+ LIBS += -Lrelease -L$$PWD/sv-dependency-builds/win32-mingw/lib
DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
@@ -78,7 +79,7 @@
# we want to do 32-bit builds with MSVC as well, then we'll
# need to add a way to distinguish the two.
- INCLUDEPATH += sv-dependency-builds/win64-msvc/include
+ INCLUDEPATH += $$PWD/sv-dependency-builds/win64-msvc/include
## This seems to be intruding even when we're supposed to be release
# CONFIG(debug) {
@@ -88,7 +89,7 @@
# }
CONFIG(release) {
LIBS += -Lrelease \
- -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib
+ -L$$PWD/sv-dependency-builds/win64-msvc/lib
}
DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
@@ -113,8 +114,8 @@
# All Mac builds are 64-bit these days.
- INCLUDEPATH += sv-dependency-builds/osx/include
- LIBS += -Lsv-dependency-builds/osx/lib
+ INCLUDEPATH += $$PWD/sv-dependency-builds/osx/include
+ LIBS += -L$$PWD/sv-dependency-builds/osx/lib
QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math
diff -r 1b6ffed298a2 -r e63cc95876cb sonic-visualiser.pro
--- a/sonic-visualiser.pro Fri May 18 13:49:23 2018 +0100
+++ b/sonic-visualiser.pro Thu May 24 16:19:50 2018 +0100
@@ -1,6 +1,9 @@
TEMPLATE = subdirs
+SUBDIRS += \
+ sub_base
+
# We build the tests on every platform, though at the time of
# writing they are only automatically run on non-Windows platforms
# (because of the difficulty of getting them running nicely in the
@@ -16,6 +19,8 @@
sub_convert \
sub_sv
+sub_base.file = base.pro
+
sub_test_svcore_base.file = test-svcore-base.pro
sub_test_svcore_data_fileio.file = test-svcore-data-fileio.pro
sub_test_svcore_data_model.file = test-svcore-data-model.pro