Mercurial > hg > easyhg
diff 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 |
line wrap: on
line diff
--- a/deploy/win32/build.bat Thu Dec 06 13:54:34 2018 +0000 +++ b/deploy/win32/build.bat Fri Dec 07 13:41:32 2018 +0000 @@ -3,24 +3,72 @@ set STARTPWD=%CD% -set QTDIR=C:\Qt\5.11.2\mingw53_32 +set QTDIR=C:\Qt\5.12.0\msvc2017 if not exist %QTDIR% ( -@ echo Could not find 32-bit Qt +@ echo Could not find 32-bit Qt using MSVC @ exit /b 2 ) +if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" ( +@ echo "Could not find MSVC vars batch file" +@ exit /b 2 +) + +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 + set ORIGINALPATH=%PATH% set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw530_32\bin cd %STARTPWD% +if not exist easyhg-kdiff3 ( + hg clone https://code.soundsoftware.ac.uk/hg/easyhg-kdiff3 +) +set KDIFFDIR=%STARTPWD%\easyhg-kdiff3\kdiff3\src-QT4 + mkdir build_win32 cd build_win32 -qmake -spec win32-g++ -r ..\easyhg.pro +qmake -spec win32-msvc -r -tp vc ..\easyhg.pro if %errorlevel% neq 0 exit /b %errorlevel% -mingw32-make +msbuild EasyMercurial.vcxproj /t:Build /p:Configuration=Release +if %errorlevel% neq 0 exit /b %errorlevel% + +cd %KDIFFDIR% + +mkdir build_win32 +cd build_win32 + +qmake -spec win32-msvc -r -tp vc ..\kdiff3.pro +if %errorlevel% neq 0 exit /b %errorlevel% + +msbuild kdiff3.vcxproj /t:Build /p:Configuration=Release +if %errorlevel% neq 0 exit /b %errorlevel% + +cd %STARTPWD%\build_win32 + +copy %KDIFFDIR%\build_win32\release\kdiff3.exe .\release + +copy %QTDIR%\bin\Qt5Core.dll .\release +copy %QTDIR%\bin\Qt5Gui.dll .\release +copy %QTDIR%\bin\Qt5Widgets.dll .\release +copy %QTDIR%\bin\Qt5Network.dll .\release +copy %QTDIR%\bin\Qt5PrintSupport.dll .\release +copy %QTDIR%\plugins\platforms\qminimal.dll .\release +copy %QTDIR%\plugins\platforms\qwindows.dll .\release +copy %QTDIR%\plugins\styles\qwindowsvistastyle.dll .\release + +cd %STARTPWD% + +if not exist mercurial-4.8.0-x86.msi ( + C:\ProgramData\chocolatey\bin\wget https://bitbucket.org/tortoisehg/files/downloads/mercurial-4.8.0-x86.msi +) +if %errorlevel% neq 0 exit /b %errorlevel% + +if not exist mercurial-4.8.0-x86 ( + msiexec /a mercurial-4.8.0-x86.msi /qn TARGETDIR=%STARTPWD%\mercurial-4.8.0-x86 +) if %errorlevel% neq 0 exit /b %errorlevel% set PATH=%ORIGINALPATH%