changeset 2576:1799e90689b5

Avoid WinRT dependency when packaging for Win7
author Chris Cannam
date Tue, 21 Jul 2020 14:03:23 +0100
parents 32c3e8dfd11d
children 0d35663085d0 7334a94a1ab8
files base.pro deploy/win64/sonic-visualiser.wxs.in noconfig.pri repoint-lock.json sonic-visualiser.pro sv.pro
diffstat 6 files changed, 48 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/base.pro	Fri Jun 26 09:46:17 2020 +0100
+++ b/base.pro	Tue Jul 21 14:03:23 2020 +0100
@@ -52,6 +52,10 @@
 for (file, SVCORE_SOURCES)   { SOURCES += $$sprintf("svcore/%1", $$file) }
 for (file, SVCORE_HEADERS)   { HEADERS += $$sprintf("svcore/%1", $$file) }
              
+win32-msvc* {
+    SOURCES -= svcore/system/os-other.cpp
+}
+
 for (file, CLIENT_HEADERS) {
     HEADERS += $$sprintf("piper-vamp-cpp/vamp-client/qt/%1",  $$file)
 }
--- a/deploy/win64/sonic-visualiser.wxs.in	Fri Jun 26 09:46:17 2020 +0100
+++ b/deploy/win64/sonic-visualiser.wxs.in	Tue Jul 21 14:03:23 2020 +0100
@@ -174,6 +174,30 @@
           </Component>
 
           <Component Win64="yes"
+                     Id="OSWin10"
+                     Transitive="yes"
+                     Guid="7b9ce14e-62ba-446e-ad45-9642b3bc4188">
+            <Condition>VersionNT64 &gt;= 603</Condition>
+            <File
+                Id="os_win10"
+                Name="os.dll"
+                Source="release\os.dll"
+                KeyPath="yes"/>
+          </Component>
+
+          <Component Win64="yes"
+                     Id="OSOther"
+                     Transitive="yes"
+                     Guid="4419cc33-2a69-437e-8466-98f9104d01e9">
+            <Condition>NOT (VersionNT64 &gt;= 603)</Condition>
+            <File
+                Id="os_other"
+                Name="os.dll"
+                Source="release\os_other.dll"
+                KeyPath="yes"/>
+          </Component>
+
+          <Component Win64="yes"
                Id="VCRuntime"
                Guid="251D9513-BBD2-47CF-BE78-EF79446F7683">
 
@@ -349,6 +373,8 @@
       <ComponentRef Id="SVFileAssociation"/>
       <ComponentRef Id="Sndfile"/>
       <ComponentRef Id="OpenSSL"/>
+      <ComponentRef Id="OSWin10"/>
+      <ComponentRef Id="OSOther"/>
       <ComponentRef Id="Qt5"/>
       <ComponentRef Id="VCRuntime"/>
       <ComponentRef Id="Qt5PlatformPlugins"/>
--- a/noconfig.pri	Fri Jun 26 09:46:17 2020 +0100
+++ b/noconfig.pri	Tue Jul 21 14:03:23 2020 +0100
@@ -120,9 +120,7 @@
     DEFINES -= HAVE_LIBLO
     LIBS -= -llo
 
-##!!! WindowsApp seems to be win10-specific! can I avoid this?
-    
-    LIBS += -lWindowsApp -lmfplat -lmfreadwrite -lmfuuid -lpropsys -ladvapi32 -lwinmm -lws2_32
+    LIBS += -lmfplat -lmfreadwrite -lmfuuid -lpropsys -ladvapi32 -lwinmm -lws2_32
 }
 
 macx* {
--- a/repoint-lock.json	Fri Jun 26 09:46:17 2020 +0100
+++ b/repoint-lock.json	Tue Jul 21 14:03:23 2020 +0100
@@ -4,10 +4,10 @@
       "pin": "0e32c328b02a"
     },
     "svcore": {
-      "pin": "5671836cdac7"
+      "pin": "bdab3a921d5d"
     },
     "svgui": {
-      "pin": "fe9a643b83bf"
+      "pin": "cbbb411da977"
     },
     "svapp": {
       "pin": "7bded7599874"
--- a/sonic-visualiser.pro	Fri Jun 26 09:46:17 2020 +0100
+++ b/sonic-visualiser.pro	Tue Jul 21 14:03:23 2020 +0100
@@ -4,6 +4,12 @@
 SUBDIRS += \
         sub_base
 
+win32-msvc* {
+    SUBDIRS += \
+        sub_os_other \
+        sub_os_win10
+}
+
 # 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
@@ -19,9 +25,12 @@
 	sub_server \
         sub_convert \
 	sub_sv
+        
+sub_base.file = base.pro
 
-sub_base.file = base.pro
-        
+sub_os_other.file = os-other.pro
+sub_os_win10.file = os-win10.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
--- a/sv.pro	Fri Jun 26 09:46:17 2020 +0100
+++ b/sv.pro	Tue Jul 21 14:03:23 2020 +0100
@@ -80,6 +80,10 @@
         main/SVSplash.cpp \
         main/PreferencesDialog.cpp 
 
+win32-msvc* {
+    LIBS += -los
+}
+
 macx* {
     QMAKE_POST_LINK += cp checker/vamp-plugin-load-checker . && deploy/osx/deploy.sh $$shell_quote(Sonic Visualiser)
 }