From f30fe8775c5f73815de460e06544f503cfc8fae2 Mon Sep 17 00:00:00 2001 From: walker0643 <> Date: Sat, 10 Feb 2018 13:44:33 -0500 Subject: [PATCH] configure qt version automatically in installer script --- clean_build.bat | 40 ++++++++++++++++++++++++---------------- dist/wix/Include.wxi.in | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/clean_build.bat b/clean_build.bat index e48168de..406ba993 100644 --- a/clean_build.bat +++ b/clean_build.bat @@ -2,40 +2,45 @@ REM defaults - override them by creating a winbuild_env.bat file set B_BUILD_TYPE=Debug -set B_QT_ROOT=C:\Qt\5.6.3\msvc2015_64 +set B_QT_ROOT=C:\Qt +set B_QT_VER=5.6.3 +set B_QT_MSVC=msvc2015_64 set B_BONJOUR=C:\Program Files\Bonjour SDK -REM needed by cmake to set bonjour include dir -set BONJOUR_SDK_HOME=%B_BONJOUR% - set savedir=%cd% cd /d %~dp0 if exist winbuild_env.bat call winbuild_env.bat +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% + rmdir /q /s build mkdir build if ERRORLEVEL 1 goto failed cd build -cmake -G "Visual Studio 15 2017 Win64" -D CMAKE_BUILD_TYPE=%B_BUILD_TYPE% -D CMAKE_PREFIX_PATH="%B_QT_ROOT%" -D DNSSD_LIB="%B_BONJOUR%\Lib\x64\dnssd.lib" .. +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% .. 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 ( - copy %B_QT_ROOT%\bin\Qt5Cored.dll bin\Debug\ > NUL - copy %B_QT_ROOT%\bin\Qt5Guid.dll bin\Debug\ > NUL - copy %B_QT_ROOT%\bin\Qt5Networkd.dll bin\Debug\ > NUL - copy %B_QT_ROOT%\bin\Qt5Widgetsd.dll bin\Debug\ > NUL - copy %B_QT_ROOT%\bin\Qt5Cored.dll bin\Debug\ > NUL + 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 copy ..\ext\openssl\windows\x64\bin\* bin\Debug\ > NUL copy ..\res\openssl\barrier.conf bin\Debug\ > NUL ) else if exist bin\Release ( - copy %B_QT_ROOT%\bin\Qt5Core.dll bin\Release\ > NUL - copy %B_QT_ROOT%\bin\Qt5Gui.dll bin\Release\ > NUL - copy %B_QT_ROOT%\bin\Qt5Network.dll bin\Release\ > NUL - copy %B_QT_ROOT%\bin\Qt5Widgets.dll bin\Release\ > NUL - copy %B_QT_ROOT%\bin\Qt5Core.dll bin\Release\ > NUL + 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 copy ..\ext\openssl\windows\x64\bin\* bin\Release\ > NUL copy ..\res\openssl\barrier.conf bin\Release\ > NUL ) else ( @@ -51,8 +56,11 @@ echo Build failed :done cd /d %savedir% -set BONJOUR_SDK_HOME= set B_BUILD_TYPE= set B_QT_ROOT= +set B_QT_VER= +set B_QT_MSVC= set B_BONJOUR= +set BONJOUR_SDK_HOME= +set B_QT_FULLPATH= set savedir= diff --git a/dist/wix/Include.wxi.in b/dist/wix/Include.wxi.in index 5915991c..652d203a 100644 --- a/dist/wix/Include.wxi.in +++ b/dist/wix/Include.wxi.in @@ -2,7 +2,7 @@ - +