Mercurial > hg > sonic-annotator
comparison deploy/win/build-64-static.bat @ 394:885960538dd4
Build a static-ish binary
author | Chris Cannam |
---|---|
date | Tue, 09 Jun 2020 16:59:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
393:b081441c7970 | 394:885960538dd4 |
---|---|
1 | |
2 rem Using Qt Base module thus: | |
3 rem .\configure -static -static-runtime -release -platform win32-msvc -no-opengl -no-angle -nomake examples -prefix C:\Qt\5.14.1-static | |
4 | |
5 set QTDIR=C:\Qt\5.14.1-static-msvc2015 | |
6 if not exist %QTDIR% ( | |
7 @ echo Could not find 64-bit Qt in %QTDIR% | |
8 @ exit /b 2 | |
9 ) | |
10 | |
11 rem Not 2019! Its APIs are too new for use in our static build | |
12 rem set vcvarsall="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" | |
13 set vcvarsall="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" | |
14 | |
15 if not exist %vcvarsall% ( | |
16 @ echo "Could not find MSVC vars batch file" | |
17 @ exit /b 2 | |
18 ) | |
19 | |
20 set SMLNJDIR=C:\Program Files (x86)\SMLNJ | |
21 if not exist "%SMLNJDIR%\bin" ( | |
22 @ echo Could not find SML/NJ, required for Repoint | |
23 @ exit /b 2 | |
24 ) | |
25 | |
26 call %vcvarsall% amd64 | |
27 if %errorlevel% neq 0 exit /b %errorlevel% | |
28 | |
29 set ORIGINALPATH=%PATH% | |
30 set PATH=%PATH%;%SMLNJDIR%\bin;%QTDIR%\bin | |
31 set NAME=Open Source Developer, Christopher Cannam | |
32 | |
33 set ARG=%1 | |
34 shift | |
35 if "%ARG%" == "sign" ( | |
36 @ echo NOTE: sign option specified, will attempt to codesign exe and msi | |
37 @ echo NOTE: starting by codesigning an unrelated executable, so we know | |
38 @ echo NOTE: whether it'll work before doing the entire build | |
39 copy "%SMLNJDIR%\bin\.run\run.x86-win32.exe" signtest.exe | |
40 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a signtest.exe | |
41 if errorlevel 1 exit /b %errorlevel% | |
42 signtool verify /pa signtest.exe | |
43 if errorlevel 1 exit /b %errorlevel% | |
44 del signtest.exe | |
45 @ echo NOTE: success | |
46 ) else ( | |
47 @ echo NOTE: sign option not specified, will not codesign anything | |
48 ) | |
49 | |
50 cd %STARTPWD% | |
51 | |
52 call .\repoint install | |
53 if %errorlevel% neq 0 exit /b %errorlevel% | |
54 | |
55 mkdir build_win64_static | |
56 cd build_win64_static | |
57 | |
58 qmake -spec win32-msvc -r -tp vc ..\sonic-annotator.pro | |
59 if %errorlevel% neq 0 exit /b %errorlevel% | |
60 | |
61 mkdir o | |
62 | |
63 msbuild sonic-annotator.sln /t:Build /p:Configuration=Release | |
64 if %errorlevel% neq 0 exit /b %errorlevel% | |
65 | |
66 rem Sadly this static build is not totally static | |
67 copy ..\sv-dependency-builds\win64-msvc\lib\libsndfile-1.dll .\release | |
68 | |
69 .\release\test-svcore-base | |
70 .\release\test-svcore-system | |
71 | |
72 .\release\sonic-annotator -v | |
73 | |
74 set PATH=%ORIGINALPATH% | |
75 cd %STARTPWD% |