2018-01-29 01:32:11 +03:00
|
|
|
@echo off
|
|
|
|
|
2018-02-08 00:33:48 +03:00
|
|
|
REM defaults - override them by creating a winbuild_env.bat file
|
2018-01-29 01:32:11 +03:00
|
|
|
set B_BUILD_TYPE=Debug
|
2018-02-10 21:44:33 +03:00
|
|
|
set B_QT_ROOT=C:\Qt
|
|
|
|
set B_QT_VER=5.6.3
|
|
|
|
set B_QT_MSVC=msvc2015_64
|
2018-01-29 01:32:11 +03:00
|
|
|
set B_BONJOUR=C:\Program Files\Bonjour SDK
|
|
|
|
|
|
|
|
set savedir=%cd%
|
|
|
|
cd /d %~dp0
|
|
|
|
|
|
|
|
if exist winbuild_env.bat call winbuild_env.bat
|
|
|
|
|
2018-02-10 21:44:33 +03:00
|
|
|
REM needed by cmake to set bonjour include dir
|
|
|
|
set BONJOUR_SDK_HOME=%B_BONJOUR%
|
|
|
|
|
|
|
|
REM full path to Qt stuff we need
|
|
|
|
set B_QT_FULLPATH=%B_QT_ROOT%\%B_QT_VER%\%B_QT_MSVC%
|
|
|
|
|
2018-02-23 22:02:38 +03:00
|
|
|
echo Bonjour: %BONJOUR_SDK_HOME%
|
|
|
|
echo Qt: %B_QT_FULLPATH%
|
|
|
|
|
2018-01-29 01:32:11 +03:00
|
|
|
rmdir /q /s build
|
|
|
|
mkdir build
|
2018-02-07 01:13:35 +03:00
|
|
|
if ERRORLEVEL 1 goto failed
|
2018-01-29 01:32:11 +03:00
|
|
|
cd build
|
2018-02-10 21:44:33 +03:00
|
|
|
cmake -G "Visual Studio 15 2017 Win64" -D CMAKE_BUILD_TYPE=%B_BUILD_TYPE% -D CMAKE_PREFIX_PATH="%B_QT_FULLPATH%" -D DNSSD_LIB="%B_BONJOUR%\Lib\x64\dnssd.lib" -D QT_VERSION=%B_QT_VER% ..
|
2018-01-29 01:32:11 +03:00
|
|
|
if ERRORLEVEL 1 goto failed
|
|
|
|
echo @msbuild barrier.sln /p:Platform="x64" /p:Configuration=%B_BUILD_TYPE% /m > make.bat
|
|
|
|
call make.bat
|
|
|
|
if ERRORLEVEL 1 goto failed
|
|
|
|
if exist bin\Debug (
|
2018-02-10 21:44:33 +03:00
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Cored.dll bin\Debug\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Guid.dll bin\Debug\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Networkd.dll bin\Debug\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Widgetsd.dll bin\Debug\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Cored.dll bin\Debug\ > NUL
|
2018-01-29 01:32:11 +03:00
|
|
|
copy ..\ext\openssl\windows\x64\bin\* bin\Debug\ > NUL
|
|
|
|
copy ..\res\openssl\barrier.conf bin\Debug\ > NUL
|
|
|
|
) else if exist bin\Release (
|
2018-02-10 21:44:33 +03:00
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Core.dll bin\Release\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Gui.dll bin\Release\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Network.dll bin\Release\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Widgets.dll bin\Release\ > NUL
|
|
|
|
copy %B_QT_FULLPATH%\bin\Qt5Core.dll bin\Release\ > NUL
|
2018-01-29 01:32:11 +03:00
|
|
|
copy ..\ext\openssl\windows\x64\bin\* bin\Release\ > NUL
|
|
|
|
copy ..\res\openssl\barrier.conf bin\Release\ > NUL
|
2018-02-11 00:46:50 +03:00
|
|
|
mkdir bin\Release\platforms
|
|
|
|
copy %B_QT_FULLPATH%\plugins\platforms\qwindows.dll bin\Release\platforms\ > NUL
|
2018-01-29 01:32:11 +03:00
|
|
|
) else (
|
|
|
|
echo Remember to copy supporting binaries and confiuration files!
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Build completed successfully
|
|
|
|
goto done
|
|
|
|
|
|
|
|
:failed
|
|
|
|
echo Build failed
|
|
|
|
|
|
|
|
:done
|
2018-02-08 00:33:48 +03:00
|
|
|
cd /d %savedir%
|
|
|
|
|
2018-01-29 01:32:11 +03:00
|
|
|
set B_BUILD_TYPE=
|
|
|
|
set B_QT_ROOT=
|
2018-02-10 21:44:33 +03:00
|
|
|
set B_QT_VER=
|
|
|
|
set B_QT_MSVC=
|
2018-01-29 01:32:11 +03:00
|
|
|
set B_BONJOUR=
|
2018-02-10 21:44:33 +03:00
|
|
|
set BONJOUR_SDK_HOME=
|
|
|
|
set B_QT_FULLPATH=
|
2018-02-07 01:13:35 +03:00
|
|
|
set savedir=
|