changeset 328:e16e4cda23b9

Update build system to follow current SV
author Chris Cannam
date Mon, 11 Jun 2018 19:29:14 +0100
parents 0e866ef12d87
children 0e8d2eb2eca7
files .hgignore base.pri base.pro deploy/win64/build-32.bat deploy/win64/build-64.bat noconfig.pri repoint-lock.json repoint-project.json sonic-annotator.pro test-svcore-system.pro
diffstat 10 files changed, 199 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri May 18 13:48:00 2018 +0100
+++ b/.hgignore	Mon Jun 11 19:29:14 2018 +0100
@@ -25,3 +25,5 @@
 sv-dependency-builds
 glob:.repoint-*.bin
 glob:.repoint-*.bin
+build_win32
+build_win64
--- a/base.pri	Fri May 18 13:48:00 2018 +0100
+++ b/base.pri	Mon Jun 11 19:29:14 2018 +0100
@@ -6,6 +6,7 @@
 	bqfft \
 	bqresample \
 	piper-cpp \
+        checker \
 	dataquay \
 	dataquay/dataquay \
 	svcore \
@@ -28,23 +29,4 @@
 DEFINES += NO_HIT_COUNTS
 
 CONFIG += qt thread warn_on stl rtti exceptions c++11
-
-include(bq-files.pri)
-include(vamp-plugin-sdk-files.pri)
-include(svcore/files.pri)
-
-DATAQUAY_SOURCES=$$fromfile(dataquay/lib.pro, SOURCES)
-DATAQUAY_HEADERS=$$fromfile(dataquay/lib.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, SVCORE_SOURCES)   { SOURCES += $$sprintf("svcore/%1", $$file) }
-for (file, SVCORE_HEADERS)   { HEADERS += $$sprintf("svcore/%1", $$file) }
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base.pro	Mon Jun 11 19:29:14 2018 +0100
@@ -0,0 +1,40 @@
+
+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)
+
+DATAQUAY_SOURCES=$$fromfile(dataquay/lib.pro, SOURCES)
+DATAQUAY_HEADERS=$$fromfile(dataquay/lib.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, SVCORE_SOURCES)   { SOURCES += $$sprintf("svcore/%1", $$file) }
+for (file, SVCORE_HEADERS)   { HEADERS += $$sprintf("svcore/%1", $$file) }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-32.bat	Mon Jun 11 19:29:14 2018 +0100
@@ -0,0 +1,43 @@
+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.11.0\mingw53_32
+if not exist %QTDIR% (
+@   echo Could not find 32-bit Qt
+@   exit /b 2
+)
+
+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%
+
+mkdir build_win32
+cd build_win32
+
+qmake -spec win32-g++ -r ..\sonic-annotator.pro
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+mingw32-make
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+copy %QTDIR%\bin\Qt5Core.dll .\release
+copy %QTDIR%\bin\Qt5Network.dll .\release
+copy %QTDIR%\bin\Qt5Xml.dll .\release
+copy %QTDIR%\bin\Qt5Test.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
+
+.\release\test-svcore-base
+.\release\test-svcore-system
+.\release\test-svcore-data-fileio
+
+set PATH=%ORIGINALPATH%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-64.bat	Mon Jun 11 19:29:14 2018 +0100
@@ -0,0 +1,50 @@
+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.11.0\msvc2017_64
+if not exist %QTDIR% (
+@   echo Could not find 64-bit Qt
+@   exit /b 2
+)
+
+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 2
+)
+
+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%
+
+mkdir build_win64
+cd build_win64
+
+qmake -spec win32-msvc -r -tp vc ..\sonic-annotator.pro
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+msbuild sonic-annotator.sln /t:Build /p:Configuration=Release
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+copy %QTDIR%\bin\Qt5Core.dll .\release
+copy %QTDIR%\bin\Qt5Network.dll .\release
+copy %QTDIR%\bin\Qt5Xml.dll .\release
+copy %QTDIR%\bin\Qt5Test.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
+
+.\release\test-svcore-base
+.\release\test-svcore-system
+.\release\test-svcore-data-fileio
+
+set PATH=%ORIGINALPATH%
--- a/noconfig.pri	Fri May 18 13:48:00 2018 +0100
+++ b/noconfig.pri	Mon Jun 11 19:29:14 2018 +0100
@@ -23,6 +23,7 @@
 # these.
 
 LIBS += \
+        -lbase \
         -lbz2 \
 	-lrubberband \
 	-lfftw3 \
@@ -45,11 +46,11 @@
 
     # 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-annotator/sv-dependency-builds/win32-mingw/lib
+    LIBS += -Lrelease -L$$PWD/sv-dependency-builds/win32-mingw/lib
 
-    DEFINES += NOMINMAX _USE_MATH_DEFINES USE_OWN_ALIGNED_MALLOC CAPNP_LITE
+    DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
 
     QMAKE_CXXFLAGS_RELEASE += -ffast-math
     
@@ -63,16 +64,17 @@
     # 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
 
     CONFIG(release) {
         LIBS += -Lrelease \
-            -L../sonic-annotator/sv-dependency-builds/win64-msvc/lib
+            -L$$PWD/sv-dependency-builds/win64-msvc/lib
     }
 
-    DEFINES += NOMINMAX _USE_MATH_DEFINES USE_OWN_ALIGNED_MALLOC
+    DEFINES += NOMINMAX _USE_MATH_DEFINES
 
-    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
@@ -88,12 +90,12 @@
 
     # 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 -L$$PWD
 
-    QMAKE_CXXFLAGS_RELEASE += -ffast-math
+    QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math
 
-    DEFINES += MALLOC_IS_ALIGNED HAVE_VDSP
+    DEFINES += HAVE_VDSP
     LIBS += \
         -framework CoreAudio \
 	-framework CoreMidi \
--- a/repoint-lock.json	Fri May 18 13:48:00 2018 +0100
+++ b/repoint-lock.json	Mon Jun 11 19:29:14 2018 +0100
@@ -1,10 +1,13 @@
 {
   "libraries": {
     "vamp-plugin-sdk": {
-      "pin": "328cb056da44"
+      "pin": "da86fb0bccb3"
     },
     "svcore": {
-      "pin": "7d9b537b6a1e"
+      "pin": "7459f4c4d7c3"
+    },
+    "checker": {
+      "pin": "3ccc384c0161"
     },
     "piper-cpp": {
       "pin": "28a0ee2cc737a7b50ac62d5996191cd589c047c2"
--- a/repoint-project.json	Fri May 18 13:48:00 2018 +0100
+++ b/repoint-project.json	Mon Jun 11 19:29:14 2018 +0100
@@ -18,6 +18,11 @@
             "vcs": "hg",
 	    "service": "soundsoftware"
         },
+        "checker": {
+            "vcs": "hg",
+	    "service": "soundsoftware",
+	    "repository": "vamp-plugin-load-checker"
+        },
         "piper-cpp": {
             "vcs": "git",
 	    "service": "github",
--- a/sonic-annotator.pro	Fri May 18 13:48:00 2018 +0100
+++ b/sonic-annotator.pro	Mon Jun 11 19:29:14 2018 +0100
@@ -1,16 +1,23 @@
 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
 # IDE without causing great confusion if a test fails).
 SUBDIRS += \
         sub_test_svcore_base \
+        sub_test_svcore_system \
         sub_test_svcore_data_fileio
 
 SUBDIRS += sub_runner
 
+sub_base.file = base.pro
+
 sub_test_svcore_base.file = test-svcore-base.pro
+sub_test_svcore_system.file = test-svcore-system.pro
 sub_test_svcore_data_fileio.file = test-svcore-data-fileio.pro
 
 sub_runner.file = runner.pro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-svcore-system.pro	Mon Jun 11 19:29:14 2018 +0100
@@ -0,0 +1,33 @@
+
+TEMPLATE = app
+
+exists(config.pri) {
+    include(config.pri)
+}
+
+!exists(config.pri) {
+    include(noconfig.pri)
+}
+
+include(base.pri)
+
+CONFIG += console
+QT += network xml testlib
+QT -= gui
+
+win32-x-g++:QMAKE_LFLAGS += -Wl,-subsystem,console
+macx*: CONFIG -= app_bundle
+
+TARGET = test-svcore-system
+
+OBJECTS_DIR = o
+MOC_DIR = o
+
+include(svcore/system/test/files.pri)
+
+for (file, TEST_SOURCES) { SOURCES += $$sprintf("svcore/system/test/%1", $$file) }
+for (file, TEST_HEADERS) { HEADERS += $$sprintf("svcore/system/test/%1", $$file) }
+
+!win32* {
+    QMAKE_POST_LINK = ./$${TARGET}
+}