# HG changeset patch # User Chris Cannam # Date 1591892372 -3600 # Node ID 1f7260245c6dd40b898444666547e34438032556 # Parent be148fce452b47521e71925a42a7a4dd3d4999ed Towards a 32-bit Windows build diff -r be148fce452b -r 1f7260245c6d .hgignore --- a/.hgignore Mon May 18 14:24:57 2020 +0100 +++ b/.hgignore Thu Jun 11 17:19:32 2020 +0100 @@ -37,6 +37,7 @@ out/*_COPYING.txt out/*.exe build_win64 +build_win32 *.orig out/.something-to-sign out/.signed @@ -56,3 +57,4 @@ *.vcproj *.sln signtest.exe +*.bak diff -r be148fce452b -r 1f7260245c6d deploy/win32/build-32.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/win32/build-32.bat Thu Jun 11 17:19:32 2020 +0100 @@ -0,0 +1,131 @@ +rem Run this from within the top-level SV dir: deploy\win32\build-32.bat +rem To build from clean, delete the folder build_win32 first + +echo on + +set STARTPWD=%CD% + +rem Using Qt Base module thus (in MSVC 2015 developer prompt with x86 vars set): +rem .\configure -static -static-runtime -release -platform win32-msvc -no-opengl -no-angle -nomake examples -prefix C:\Qt\5.14.1-static-32bit +rem nmake +rem nmake install +rem +rem Note you also need the Qt SVG module, in which: +rem c:\qt\5.14.1-static-32bit\bin\qmake.exe qtsvg.pro -r -spec win32-msvc +rem nmake +rem nmake install + +set QTDIR=C:\Qt\5.14.1-static-msvc2015-32bit +if not exist %QTDIR% ( +@ echo Could not find 32-bit Qt in %QTDIR% +@ exit /b 2 +) + +rem Not 2019! Its APIs are too new for use in our static build +rem set vcvarsall="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" +set vcvarsall="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" + +if not exist %vcvarsall% ( +@ echo "Could not find MSVC vars batch file" +@ exit /b 2 +) + +set SMLNJDIR=C:\Program Files (x86)\SMLNJ +if not exist "%SMLNJDIR%\bin" ( +@ echo Could not find SML/NJ, required for Repoint +@ exit /b 2 +) + +call %vcvarsall% x86 +if %errorlevel% neq 0 exit /b %errorlevel% + +set ORIGINALPATH=%PATH% +set PATH=%PATH%;%SMLNJDIR%\bin;%QTDIR%\bin +set NAME=Open Source Developer, Christopher Cannam + +set ARG=%1 +shift +if "%ARG%" == "sign" ( +@ echo NOTE: sign option specified, will attempt to codesign exe and msi +@ echo NOTE: starting by codesigning an unrelated executable, so we know +@ echo NOTE: whether it'll work before doing the entire build +copy "%SMLNJDIR%\bin\.run\run.x86-win32.exe" signtest.exe +signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a signtest.exe +if errorlevel 1 exit /b %errorlevel% +signtool verify /pa signtest.exe +if errorlevel 1 exit /b %errorlevel% +del signtest.exe +@ echo NOTE: success +) else ( +@ echo NOTE: sign option not specified, will not codesign anything +) + +cd %STARTPWD% + +call .\repoint install +if %errorlevel% neq 0 exit /b %errorlevel% + +rem This is the same as in the 64-bit build +PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'deploy\win64\copy-metadata.ps1' " +if %errorlevel% neq 0 exit /b %errorlevel% + +rem So is this +call .\deploy\win64\generate-qrc installer.qrc +if %errorlevel% neq 0 exit /b %errorlevel% + +mkdir build_win32 +cd build_win32 + +qmake -spec win32-msvc -r -tp vc ..\get-version.pro +if %errorlevel% neq 0 exit /b %errorlevel% + +qmake -spec win32-msvc -r -tp vc ..\plugins.pro +if %errorlevel% neq 0 exit /b %errorlevel% + +mkdir o + +msbuild get-version.vcxproj /t:Build /p:Configuration=Release +if %errorlevel% neq 0 exit /b %errorlevel% +copy release\out\get-version.exe ..\out\ + +msbuild plugins.sln /t:Build /p:Configuration=Release +if %errorlevel% neq 0 exit /b %errorlevel% +copy release\out\*.dll ..\out\ + +if "%ARG%" == "sign" ( +@echo Signing plugins and version helper +signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a ..\out\*.dll ..\out\*.exe +signtool verify /pa ..\out\*.dll ..\out\*.exe +if %errorlevel% neq 0 exit /b %errorlevel% +) + +%QTDIR%\bin\rcc ..\installer.qrc -o o\qrc_installer.cpp +if %errorlevel% neq 0 exit /b %errorlevel% + +qmake -spec win32-msvc -r -tp vc ..\installer.pro +if %errorlevel% neq 0 exit /b %errorlevel% + +msbuild "Vamp Plugin Pack Installer.vcxproj" /t:Build /p:Configuration=Release +if %errorlevel% neq 0 exit /b %errorlevel% + +rem copy %QTDIR%\bin\Qt5Core.dll .\release +rem copy %QTDIR%\bin\Qt5Gui.dll .\release +rem copy %QTDIR%\bin\Qt5Widgets.dll .\release +rem copy %QTDIR%\bin\Qt5Network.dll .\release +rem copy %QTDIR%\bin\Qt5Xml.dll .\release +rem copy %QTDIR%\bin\Qt5Svg.dll .\release +rem copy %QTDIR%\bin\Qt5Test.dll .\release +rem copy %QTDIR%\plugins\platforms\qminimal.dll .\release +rem copy %QTDIR%\plugins\platforms\qwindows.dll .\release +rem copy %QTDIR%\plugins\styles\qwindowsvistastyle.dll .\release + +if "%ARG%" == "sign" ( +@echo Signing application +signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a release\*.exe release\*.dll +signtool verify /pa "release\Vamp Plugin Pack Installer.exe" +if %errorlevel% neq 0 exit /b %errorlevel% +) + +cd .. + +set PATH=%ORIGINALPATH% diff -r be148fce452b -r 1f7260245c6d noconfig.pri --- a/noconfig.pri Mon May 18 14:24:57 2020 +0100 +++ b/noconfig.pri Thu Jun 11 17:19:32 2020 +0100 @@ -9,8 +9,6 @@ win32-msvc* { - # This config is actually used only for 64-bit Windows builds. - DEPLOYDIR = $$PWD/deploy/win64 INCLUDEPATH += /Libraries/boost_1_69_0 $$PWD/../boost_1_69_0/ $$PWD/sv-dependency-builds/win64-msvc/include diff -r be148fce452b -r 1f7260245c6d plugins.pro --- a/plugins.pro Mon May 18 14:24:57 2020 +0100 +++ b/plugins.pro Thu Jun 11 17:19:32 2020 +0100 @@ -23,8 +23,7 @@ sub_tempogram \ sub_tipic \ sub_tuning_difference \ - sub_ua \ - sub_vampy + sub_ua sub_sdk.file = vamp-plugin-sdk.pro