Chris@546
|
1 rem Run this from within the top-level Tony dir: deploy\win64\build-and-package.bat
|
Chris@546
|
2
|
Chris@546
|
3 set STARTPWD=%CD%
|
Chris@546
|
4
|
Chris@546
|
5 if not exist "C:\Program Files (x86)\SMLNJ\bin" (
|
Chris@546
|
6 @ echo Could not find SML/NJ, required for Repoint
|
Chris@546
|
7 @ exit /b 2
|
Chris@546
|
8 )
|
Chris@546
|
9
|
Chris@546
|
10 if not exist "C:\Program Files (x86)\WiX Toolset v3.11\bin" (
|
Chris@546
|
11 @ echo Could not find WiX Toolset
|
Chris@546
|
12 @ exit /b 2
|
Chris@546
|
13 )
|
Chris@546
|
14
|
Chris@687
|
15 powershell -NoProfile -ExecutionPolicy Bypass -Command "& 'deploy\win64\generate-wxs.ps1'"
|
Chris@687
|
16 if errorlevel 1 exit /b %errorlevel%
|
Chris@687
|
17
|
Chris@546
|
18 set ORIGINALPATH=%PATH%
|
Chris@546
|
19 set PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
|
Chris@546
|
20 set NAME=Open Source Developer, Christopher Cannam
|
Chris@546
|
21
|
Chris@546
|
22 set ARG=%1
|
Chris@546
|
23 shift
|
Chris@546
|
24 if "%ARG%" == "sign" (
|
Chris@546
|
25 @ echo NOTE: sign option specified, will attempt to codesign exe and msi
|
Chris@546
|
26 @ echo NOTE: starting by codesigning an unrelated executable, so we know
|
Chris@546
|
27 @ echo NOTE: whether it'll work before doing the entire build
|
Chris@546
|
28 copy sv-dependency-builds\win64-msvc\bin\capnp.exe signtest.exe
|
Chris@655
|
29 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a signtest.exe
|
Chris@546
|
30 if errorlevel 1 exit /b %errorlevel%
|
Chris@546
|
31 signtool verify /pa signtest.exe
|
Chris@546
|
32 if errorlevel 1 exit /b %errorlevel%
|
Chris@546
|
33 del signtest.exe
|
Chris@546
|
34 @ echo NOTE: success
|
Chris@546
|
35 ) else (
|
Chris@546
|
36 @ echo NOTE: sign option not specified, will not codesign anything
|
Chris@546
|
37 )
|
Chris@546
|
38
|
Chris@653
|
39 @echo(
|
Chris@631
|
40 @echo Rebuilding
|
Chris@546
|
41
|
Chris@546
|
42 cd %STARTPWD%
|
Chris@554
|
43 del /q /s build_win64
|
Chris@546
|
44 call .\deploy\win64\build-64.bat
|
Chris@546
|
45 if %errorlevel% neq 0 exit /b %errorlevel%
|
Chris@546
|
46
|
Chris@546
|
47 if "%ARG%" == "sign" (
|
Chris@546
|
48 @echo Signing 64-bit executables and libraries
|
Chris@655
|
49 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a build_win32\release\*.exe build_win64\release\*.dll
|
Chris@546
|
50 )
|
Chris@546
|
51
|
Chris@546
|
52 set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin"
|
Chris@546
|
53
|
Chris@631
|
54 @echo Packaging
|
Chris@546
|
55
|
Chris@546
|
56 cd %STARTPWD%\build_win64
|
Chris@546
|
57 del tony.msi
|
Chris@546
|
58 candle -v ..\deploy\win64\tony.wxs
|
Chris@546
|
59 light -b . -ext WixUIExtension -ext WixUtilExtension -v tony.wixobj
|
Chris@546
|
60 if %errorlevel% neq 0 exit /b %errorlevel%
|
Chris@546
|
61 del tony.wixobj
|
Chris@546
|
62 del tony.wixpdb
|
Chris@546
|
63
|
Chris@546
|
64 if "%ARG%" == "sign" (
|
Chris@546
|
65 @echo Signing 64-bit package
|
Chris@655
|
66 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a tony.msi
|
Chris@546
|
67 signtool verify /pa tony.msi
|
Chris@546
|
68 )
|
Chris@546
|
69
|
Chris@546
|
70 set PATH=%ORIGINALPATH%
|
Chris@546
|
71
|
Chris@644
|
72 cd %STARTPWD%
|
Chris@546
|
73 @echo Done
|
Chris@546
|
74
|