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