comparison deploy/win32/build-and-package.bat @ 685:9e31ab5d9394

Further toward packaging
author Chris Cannam
date Fri, 07 Dec 2018 17:39:12 +0000
parents
children c80a1dac9fda
comparison
equal deleted inserted replaced
684:6bfca8973f79 685:9e31ab5d9394
1 rem Run this from within the top-level project dir: deploy\win32\build.bat
2
3 set STARTPWD=%CD%
4
5 if not exist "C:\Program Files (x86)\WiX Toolset v3.11\bin" (
6 @ echo Could not find WiX Toolset
7 @ exit /b 2
8 )
9
10 if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x64\Microsoft.VC141.CRT" (
11 @ echo Could not find Windows CRT directory %CRTDIR%
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 CRTDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x64\Microsoft.VC141.CRT
18 set NAME=Open Source Developer, Christopher Cannam
19
20 set ARG=%1
21 shift
22 if "%ARG%" == "sign" (
23 @ echo NOTE: sign option specified, will attempt to codesign exe and msi
24 ) else (
25 @ echo NOTE: sign option not specified, will not codesign anything
26 )
27
28 cd %STARTPWD%
29 rem del /q /s build_win32
30 call .\deploy\win32\build.bat
31 if %errorlevel% neq 0 exit /b %errorlevel%
32
33 if not exist mercurial-4.8.0-x86.msi (
34 C:\ProgramData\chocolatey\bin\wget https://bitbucket.org/tortoisehg/files/downloads/mercurial-4.8.0-x86.msi
35 )
36 if %errorlevel% neq 0 exit /b %errorlevel%
37
38 if not exist mercurial-4.8.0-x86 (
39 msiexec /a mercurial-4.8.0-x86.msi /qn TARGETDIR=%STARTPWD%\mercurial-4.8.0-x86
40 )
41 if %errorlevel% neq 0 exit /b %errorlevel%
42
43 set HGDIR=%STARTPWD%\mercurial-4.8.0-x86
44
45 cd build_win32\release
46
47 copy "%CRTDIR%\concrt140.DLL" .
48 copy "%CRTDIR%\msvcp140.DLL" .
49 copy "%CRTDIR%\vccorlib140.DLL" .
50 copy "%CRTDIR%\vcruntime140.DLL" .
51
52 copy "%HGDIR%\PFiles\Mercurial\hg.exe" .
53 copy "%HGDIR%\PFiles\Mercurial\python27.dll" .
54
55 mkdir lib
56 copy "%HGDIR%\PFiles\Mercurial\lib\*" .\lib\
57
58 copy "%HGDIR%\windows\system32\msvcm90.dll" .
59 copy "%HGDIR%\windows\system32\msvcp90.dll" .
60 copy "%HGDIR%\windows\system32\msvcr90.dll" .
61
62 if "%ARG%" == "sign" (
63 @echo Signing components
64 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 *.dll *.exe lib\*
65 signtool verify /pa sonic-visualiser.msi
66 )
67
68 rem Todo: the rest