annotate deploy/win32/build.bat @ 733:7942b7633505

Further to adding Plink component
author Chris Cannam
date Mon, 17 Dec 2018 18:48:31 +0000
parents 66284838b373
children
rev   line source
Chris@676 1 rem Run this from within the top-level project dir: deploy\win32\build.bat
Chris@676 2 rem To build from clean, delete the folder build_win32
Chris@676 3
Chris@676 4 set STARTPWD=%CD%
Chris@676 5
Chris@680 6 set QTDIR=C:\Qt\5.12.0\msvc2017
Chris@676 7 if not exist %QTDIR% (
Chris@680 8 @ echo Could not find 32-bit Qt using MSVC
Chris@676 9 @ exit /b 2
Chris@676 10 )
Chris@676 11
Chris@680 12 if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
Chris@680 13 @ echo "Could not find MSVC vars batch file"
Chris@680 14 @ exit /b 2
Chris@680 15 )
Chris@680 16
Chris@680 17 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
Chris@680 18
Chris@676 19 set ORIGINALPATH=%PATH%
Chris@692 20 set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin
Chris@676 21
Chris@676 22 cd %STARTPWD%
Chris@676 23
Chris@680 24 if not exist easyhg-kdiff3 (
Chris@680 25 hg clone https://code.soundsoftware.ac.uk/hg/easyhg-kdiff3
Chris@680 26 )
Chris@680 27 set KDIFFDIR=%STARTPWD%\easyhg-kdiff3\kdiff3\src-QT4
Chris@680 28
Chris@732 29 if not exist TortoiseSVN (
Chris@733 30 rem NB the "svn" command is actually installed as part of TortoiseSVN, but
Chris@733 31 rem only if you specifically check the "command-line programs" option when
Chris@733 32 rem installing it. We rebuild TortoisePlink rather than using the one already
Chris@733 33 rem installed, because that is probably 64-bit and we want a 32-bit one
Chris@732 34 svn co http://svn.osdn.net/svnroot/tortoisesvn/trunk TortoiseSVN
Chris@732 35 )
Chris@732 36 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@732 37 set TSVNDIR=%STARTPWD%\TortoiseSVN
Chris@732 38 set TPLINKDIR=%TSVNDIR%\ext\TortoisePlink
Chris@732 39
Chris@676 40 mkdir build_win32
Chris@676 41 cd build_win32
Chris@676 42
Chris@680 43 qmake -spec win32-msvc -r -tp vc ..\easyhg.pro
Chris@676 44 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@676 45
Chris@680 46 msbuild EasyMercurial.vcxproj /t:Build /p:Configuration=Release
Chris@680 47 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@680 48
Chris@680 49 cd %KDIFFDIR%
Chris@680 50
Chris@680 51 mkdir build_win32
Chris@680 52 cd build_win32
Chris@680 53
Chris@680 54 qmake -spec win32-msvc -r -tp vc ..\kdiff3.pro
Chris@680 55 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@680 56
Chris@680 57 msbuild kdiff3.vcxproj /t:Build /p:Configuration=Release
Chris@680 58 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@680 59
Chris@732 60 cd %TPLINKDIR%\windows\TPlink
Chris@732 61
Chris@732 62 msbuild TortoisePlink.vcxproj /t:Build /p:Configuration=Release
Chris@732 63 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@732 64
Chris@680 65 cd %STARTPWD%\build_win32
Chris@680 66
Chris@680 67 copy %KDIFFDIR%\build_win32\release\kdiff3.exe .\release
Chris@732 68 copy %TSVNDIR%\bin\release\bin\TortoisePlink.exe .\release
Chris@680 69
Chris@680 70 copy %QTDIR%\bin\Qt5Core.dll .\release
Chris@680 71 copy %QTDIR%\bin\Qt5Gui.dll .\release
Chris@680 72 copy %QTDIR%\bin\Qt5Widgets.dll .\release
Chris@680 73 copy %QTDIR%\bin\Qt5Network.dll .\release
Chris@680 74 copy %QTDIR%\bin\Qt5PrintSupport.dll .\release
Chris@680 75 copy %QTDIR%\plugins\platforms\qminimal.dll .\release
Chris@680 76 copy %QTDIR%\plugins\platforms\qwindows.dll .\release
Chris@680 77 copy %QTDIR%\plugins\styles\qwindowsvistastyle.dll .\release
Chris@680 78
Chris@680 79 cd %STARTPWD%
Chris@680 80
Chris@676 81 set PATH=%ORIGINALPATH%