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@546
|
15 set ORIGINALPATH=%PATH%
|
Chris@546
|
16 set PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
|
Chris@546
|
17 set NAME=Open Source Developer, Christopher Cannam
|
Chris@546
|
18
|
Chris@546
|
19 set ARG=%1
|
Chris@546
|
20 shift
|
Chris@546
|
21 if "%ARG%" == "sign" (
|
Chris@546
|
22 @ echo NOTE: sign option specified, will attempt to codesign exe and msi
|
Chris@546
|
23 @ echo NOTE: starting by codesigning an unrelated executable, so we know
|
Chris@546
|
24 @ echo NOTE: whether it'll work before doing the entire build
|
Chris@546
|
25 copy sv-dependency-builds\win64-msvc\bin\capnp.exe signtest.exe
|
Chris@546
|
26 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 signtest.exe
|
Chris@546
|
27 if errorlevel 1 exit /b %errorlevel%
|
Chris@546
|
28 signtool verify /pa signtest.exe
|
Chris@546
|
29 if errorlevel 1 exit /b %errorlevel%
|
Chris@546
|
30 del signtest.exe
|
Chris@546
|
31 @ echo NOTE: success
|
Chris@546
|
32 ) else (
|
Chris@546
|
33 @ echo NOTE: sign option not specified, will not codesign anything
|
Chris@546
|
34 )
|
Chris@546
|
35
|
Chris@546
|
36 @echo ""
|
Chris@631
|
37 @echo Rebuilding
|
Chris@546
|
38
|
Chris@546
|
39 cd %STARTPWD%
|
Chris@554
|
40 del /q /s build_win64
|
Chris@546
|
41 call .\deploy\win64\build-64.bat
|
Chris@546
|
42 if %errorlevel% neq 0 exit /b %errorlevel%
|
Chris@546
|
43
|
Chris@546
|
44 if "%ARG%" == "sign" (
|
Chris@546
|
45 @echo Signing 64-bit executables and libraries
|
Chris@546
|
46 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 build_win32\release\*.exe build_win64\release\*.dll
|
Chris@546
|
47 )
|
Chris@546
|
48
|
Chris@546
|
49 set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin"
|
Chris@546
|
50
|
Chris@631
|
51 @echo Packaging
|
Chris@546
|
52
|
Chris@546
|
53 cd %STARTPWD%\build_win64
|
Chris@546
|
54 del tony.msi
|
Chris@546
|
55 candle -v ..\deploy\win64\tony.wxs
|
Chris@546
|
56 light -b . -ext WixUIExtension -ext WixUtilExtension -v tony.wixobj
|
Chris@546
|
57 if %errorlevel% neq 0 exit /b %errorlevel%
|
Chris@546
|
58 del tony.wixobj
|
Chris@546
|
59 del tony.wixpdb
|
Chris@546
|
60
|
Chris@546
|
61 if "%ARG%" == "sign" (
|
Chris@546
|
62 @echo Signing 64-bit package
|
Chris@546
|
63 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 tony.msi
|
Chris@546
|
64 signtool verify /pa tony.msi
|
Chris@546
|
65 )
|
Chris@546
|
66
|
Chris@546
|
67 set PATH=%ORIGINALPATH%
|
Chris@546
|
68
|
Chris@546
|
69 @echo Done
|
Chris@546
|
70
|