changeset 1264:65b8c009a9f2 msvc2015_64

MSVC build fixes, and show 32/64-bit in About
author Chris Cannam
date Tue, 18 Oct 2016 15:59:42 +0100
parents 852a3c16dcf3
children 1698dd941cbe
files .hgsubstate bq.pro main/MainWindow.cpp platform-dataquay.pri sv.pro
diffstat 5 files changed, 44 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Tue Sep 20 09:28:03 2016 +0100
+++ b/.hgsubstate	Tue Oct 18 15:59:42 2016 +0100
@@ -1,11 +1,11 @@
 fd86e70e00ae923479609a7e53d6481c09a76791 bqaudioio
 6b0cbfca8fb7cf64f89b0a0026b63bc212b156af bqresample
-126afd8e6a38eec4a201d63af28e271b6edb74cb bqvec
-9f62684e1911c4184e7b97ba3a0673cb0464f3a2 checker
+68f8e88d6d76fc4ca074166cb80979ccbfc2b6c9 bqvec
+92e72014d9798a7339cfb09d6f2d877d8bf7fd65 checker
 896aefe629c85b05ae0880ec93a396b9e3a5a304 dataquay
 68ae618c6b0e442d08a71d39217784a08f2a8de3 icons/scalable
-1e4f338ae482429a7ab9bdd0825242042354152f sv-dependency-builds
-1682dd81d0ef222d05861236e1fd47a5b4683890 svapp
-fef49844b3f8184b64e289352b3eca7b6642a8df svcore
-0d04b1cdb9f9c98403af5bdd87352379de52a7d9 svgui
+d530e058a1c16a5707141f2de305e6891874759e sv-dependency-builds
+85c83499be3c01398d4ea0deda5d991795c3a722 svapp
+6b847a59d9084070198008fcccadbc2476591b81 svcore
+0edfed2c8482ee9c1390f579f5fa61c0c0f6d6c3 svgui
 9a2998401bbe0a7b9e3233eeca5004542bc0014d vamp-plugin-sdk
--- a/bq.pro	Tue Sep 20 09:28:03 2016 +0100
+++ b/bq.pro	Tue Oct 18 15:59:42 2016 +0100
@@ -6,8 +6,10 @@
     LIBS += -Lsv-dependency-builds/win32-mingw/lib
 }
 win32-msvc* {
-    INCLUDEPATH += sv-dependency-builds/win32-msvc/include
-    LIBS += -Lsv-dependency-builds/win32-msvc/lib
+    # We actually expect MSVC to be used only for 64-bit builds,
+    # though the qmake spec is still called win32-msvc*
+    INCLUDEPATH += sv-dependency-builds/win64-msvc/include
+    LIBS += -Lrelease -Lsv-dependency-builds/win64-msvc/lib
 }
 mac* {
     INCLUDEPATH += sv-dependency-builds/osx/include
@@ -23,14 +25,24 @@
     CONFIG += release
     DEFINES += NDEBUG BUILD_RELEASE NO_TIMING
 
-    DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_LIBSAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_RUBBERBAND HAVE_DATAQUAY HAVE_LIBLO HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO
+    linux* {
+        DEFINES += HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_LIBSAMPLERATE HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO
+        LIBS += -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -lz
+    }
 
-    LIBS += -lbz2 -lrubberband -lvamp-hostsdk -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -lz -lsord-0 -lserd-0 -llo
-
-    win* {
+    win32-g++ {
+        DEFINES += HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_LIBSAMPLERATE HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO
+        LIBS += -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -lz
         DEFINES += USE_OWN_ALIGNED_MALLOC _USE_MATH_DEFINES
         LIBS += -lwinmm -lws2_32
     }
+    win32-msvc* {
+        DEFINES += HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_LIBSAMPLERATE HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO
+        LIBS += -lfftw3 -lfftw3f -lportaudio
+        DEFINES += USE_OWN_ALIGNED_MALLOC _USE_MATH_DEFINES
+        LIBS += -lwinmm -lws2_32
+    }
+
     macx* {
         DEFINES += HAVE_COREAUDIO MALLOC_IS_ALIGNED
         LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices -framework Accelerate
--- a/main/MainWindow.cpp	Tue Sep 20 09:28:03 2016 +0100
+++ b/main/MainWindow.cpp	Tue Oct 18 15:59:42 2016 +0100
@@ -1180,7 +1180,9 @@
 // Avoid warnings/errors with -Wextra because we aren't explicitly
 // handling all layer types (-Wall is OK with this because of the
 // default but the stricter level insists)
+#ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wswitch-enum"
+#endif
             
             switch (type) {
                     
@@ -4578,9 +4580,10 @@
 
     aboutText += tr("<h3>About Sonic Visualiser</h3>");
     aboutText += tr("<p>Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation.<br><a href=\"http://www.sonicvisualiser.org/\">http://www.sonicvisualiser.org/</a></p>");
-    aboutText += tr("<p><small>%1 : %2 configuration</small></p>")
+    aboutText += tr("<p><small>%1 : %2 configuration, %3-bit build</small></p>")
         .arg(version)
-        .arg(debug ? tr("Debug") : tr("Release"));
+        .arg(debug ? tr("Debug") : tr("Release"))
+        .arg(sizeof(void *) * 8);
 
     aboutText += "<small>";
 
@@ -4679,7 +4682,7 @@
 #endif
 
     aboutText += 
-        "<p><small>Sonic Visualiser Copyright &copy; 2005&ndash;2015 Chris Cannam and "
+        "<p><small>Sonic Visualiser Copyright &copy; 2005&ndash;2016 Chris Cannam and "
         "Queen Mary, University of London.</small></p>"
         "<p><small>This program is free software; you can redistribute it and/or "
         "modify it under the terms of the GNU General Public License as "
--- a/platform-dataquay.pri	Tue Sep 20 09:28:03 2016 +0100
+++ b/platform-dataquay.pri	Tue Oct 18 15:59:42 2016 +0100
@@ -18,8 +18,10 @@
     LIBS += -L../../sv-dependency-builds/win32-mingw/lib
 }
 win32-msvc* {
-    INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include
-    LIBS += -L../../sv-dependency-builds/win32-msvc/lib
+    # We actually expect MSVC to be used only for 64-bit builds,
+    # though the qmake spec is still called win32-msvc*
+    INCLUDEPATH += ../sv-dependency-builds/win64-msvc/include
+    LIBS += -L../../sv-dependency-builds/win64-msvc/lib
 }
 mac* {
     INCLUDEPATH += ../sv-dependency-builds/osx/include
--- a/sv.pro	Tue Sep 20 09:28:03 2016 +0100
+++ b/sv.pro	Tue Oct 18 15:59:42 2016 +0100
@@ -8,8 +8,10 @@
     LIBS += -Lrelease -Lsv-dependency-builds/win32-mingw/lib
 }
 win32-msvc* {
-    INCLUDEPATH += sv-dependency-builds/win32-msvc/include
-    LIBS += -Lrelease -Lsv-dependency-builds/win32-msvc/lib
+    # We actually expect MSVC to be used only for 64-bit builds,
+    # though the qmake spec is still called win32-msvc*
+    INCLUDEPATH += sv-dependency-builds/win64-msvc/include
+    LIBS += -Lrelease -Lsv-dependency-builds/win64-msvc/lib
 }
 mac* {
     INCLUDEPATH += sv-dependency-builds/osx/include
@@ -30,9 +32,14 @@
     LIBS += -lbz2 -lrubberband -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -lz -lsord-0 -lserd-0 -llo
 
     win* {
-        DEFINES += _USE_MATH_DEFINES
+        DEFINES += NOMINMAX _USE_MATH_DEFINES
+        DEFINES -= HAVE_LIBLO
         LIBS += -lwinmm -lws2_32
     }
+    win32-msvc* {
+        LIBS -= -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -lsord-0 -lserd-0 -llo
+        LIBS += -lsord -lserd -ladvapi32
+    }
     macx* {
         DEFINES += HAVE_COREAUDIO
         LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices -framework Accelerate