comparison deploy/win32/build.bat @ 680:21e03596dd93

Towards Win32 deployment
author Chris Cannam
date Fri, 07 Dec 2018 13:41:32 +0000
parents cb4f7c3c01dd
children 9e31ab5d9394
comparison
equal deleted inserted replaced
677:0329bbd4b57c 680:21e03596dd93
1 rem Run this from within the top-level project dir: deploy\win32\build.bat 1 rem Run this from within the top-level project dir: deploy\win32\build.bat
2 rem To build from clean, delete the folder build_win32 2 rem To build from clean, delete the folder build_win32
3 3
4 set STARTPWD=%CD% 4 set STARTPWD=%CD%
5 5
6 set QTDIR=C:\Qt\5.11.2\mingw53_32 6 set QTDIR=C:\Qt\5.12.0\msvc2017
7 if not exist %QTDIR% ( 7 if not exist %QTDIR% (
8 @ echo Could not find 32-bit Qt 8 @ echo Could not find 32-bit Qt using MSVC
9 @ exit /b 2 9 @ exit /b 2
10 ) 10 )
11
12 if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
13 @ echo "Could not find MSVC vars batch file"
14 @ exit /b 2
15 )
16
17 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
11 18
12 set ORIGINALPATH=%PATH% 19 set ORIGINALPATH=%PATH%
13 set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw530_32\bin 20 set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw530_32\bin
14 21
15 cd %STARTPWD% 22 cd %STARTPWD%
16 23
24 if not exist easyhg-kdiff3 (
25 hg clone https://code.soundsoftware.ac.uk/hg/easyhg-kdiff3
26 )
27 set KDIFFDIR=%STARTPWD%\easyhg-kdiff3\kdiff3\src-QT4
28
17 mkdir build_win32 29 mkdir build_win32
18 cd build_win32 30 cd build_win32
19 31
20 qmake -spec win32-g++ -r ..\easyhg.pro 32 qmake -spec win32-msvc -r -tp vc ..\easyhg.pro
21 if %errorlevel% neq 0 exit /b %errorlevel% 33 if %errorlevel% neq 0 exit /b %errorlevel%
22 34
23 mingw32-make 35 msbuild EasyMercurial.vcxproj /t:Build /p:Configuration=Release
36 if %errorlevel% neq 0 exit /b %errorlevel%
37
38 cd %KDIFFDIR%
39
40 mkdir build_win32
41 cd build_win32
42
43 qmake -spec win32-msvc -r -tp vc ..\kdiff3.pro
44 if %errorlevel% neq 0 exit /b %errorlevel%
45
46 msbuild kdiff3.vcxproj /t:Build /p:Configuration=Release
47 if %errorlevel% neq 0 exit /b %errorlevel%
48
49 cd %STARTPWD%\build_win32
50
51 copy %KDIFFDIR%\build_win32\release\kdiff3.exe .\release
52
53 copy %QTDIR%\bin\Qt5Core.dll .\release
54 copy %QTDIR%\bin\Qt5Gui.dll .\release
55 copy %QTDIR%\bin\Qt5Widgets.dll .\release
56 copy %QTDIR%\bin\Qt5Network.dll .\release
57 copy %QTDIR%\bin\Qt5PrintSupport.dll .\release
58 copy %QTDIR%\plugins\platforms\qminimal.dll .\release
59 copy %QTDIR%\plugins\platforms\qwindows.dll .\release
60 copy %QTDIR%\plugins\styles\qwindowsvistastyle.dll .\release
61
62 cd %STARTPWD%
63
64 if not exist mercurial-4.8.0-x86.msi (
65 C:\ProgramData\chocolatey\bin\wget https://bitbucket.org/tortoisehg/files/downloads/mercurial-4.8.0-x86.msi
66 )
67 if %errorlevel% neq 0 exit /b %errorlevel%
68
69 if not exist mercurial-4.8.0-x86 (
70 msiexec /a mercurial-4.8.0-x86.msi /qn TARGETDIR=%STARTPWD%\mercurial-4.8.0-x86
71 )
24 if %errorlevel% neq 0 exit /b %errorlevel% 72 if %errorlevel% neq 0 exit /b %errorlevel%
25 73
26 set PATH=%ORIGINALPATH% 74 set PATH=%ORIGINALPATH%