Merge pull request #287 from noisyshape/windows-installer-fix

Windows installer fix
This commit is contained in:
Adrian Lucrèce Céleste 2019-04-21 12:24:55 -04:00 committed by GitHub
commit 2f86911c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 13 deletions

View File

@ -403,6 +403,7 @@ endif()
# Windows installer
#
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set (BARRIER_WIX_VERSION "${BARRIER_VERSION_MAJOR}.${BARRIER_VERSION_MINOR}.${BARRIER_VERSION_PATCH}")
message (STATUS "Configuring the wix installer")
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/wix ${CMAKE_BINARY_DIR}/installer-wix)
message (STATUS "Configuring the inno installer")

View File

@ -1,25 +1,24 @@
@echo off
set WIX_ROOT=C:\Program Files (x86)\WiX Toolset v3.11
set INNO_ROOT=C:\Program Files (x86)\Inno Setup 5
set savedir=%cd%
cd /d %~dp0
if not exist build\bin\Release goto buildproject
cd build\installer
if ERRORLEVEL 1 goto buildproject
echo Building 64-bit Windows installer...
"%WIX_ROOT%\bin\candle.exe" -nologo -arch x64 -dConfiguration=Release -dPlatform=x64 -ext WixUtilExtension -ext WixFirewallExtension Product.wxs -o Barrier.wixobj
if ERRORLEVEL 1 goto failed
"%WIX_ROOT%\bin\light.exe" -nologo -ext WixUtilExtension -ext WixFirewallExtension -ext WixUIExtension Barrier.wixobj -o bin\Barrier.msi
cd build\installer-inno
if ERRORLEVEL 1 goto buildproject
"%INNO_ROOT%\ISCC.exe" /Qp barrier.iss
if ERRORLEVEL 1 goto failed
echo Build completed successfully
goto done
:buildproject
echo To build a 64-bit Windows installer:
echo - set Q_BUILD_TYPE=Release in build_env.bat
echo - set B_BUILD_TYPE=Release in build_env.bat
echo - also set other environmental overrides necessary for your build environment
echo - run clean_build.bat to build Barrier and verify that it succeeds
echo - re-run this script to create the installation package
@ -29,7 +28,7 @@ goto done
echo Build failed
:done
set WIX_ROOT=
set INNO_ROOT=
cd /d %savedir%
set savedir=

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<?define Name="Barrier" ?>
<?define Version="@BARRIER_VERSION@" ?>
<?define Version="@BARRIER_WIX_VERSION@" ?>
<?define QtVersion="@QT_VERSION@" ?>
<?define Author="Debauchee Open Source Group" ?>
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
@ -11,12 +11,12 @@
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?define PlatformSimpleName="64-bit" ?>
<?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>
<?define QtPath="E:\Qt\$(var.QtVersion)\msvc2015_64" ?>
<?define QtPath="@CMAKE_PREFIX_PATH@" ?>
<?else ?>
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?define PlatformSimpleName="32-bit" ?>
<?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
<?define QtPath="E:\Qt\$(var.QtVersion)\msvc2015" ?>
<?define QtPath="@CMAKE_PREFIX_PATH@" ?>
<?endif ?>
<?define QtBinPath="$(var.QtPath)\bin" ?>
<?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?>

View File

@ -31,7 +31,6 @@
<Property Id="ARPPRODUCTICON" Value="barrier.ico"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
</Condition>
<CustomAction ExeCommand="" FileKey="GuiProgram" Id="StartGui" Return="asyncNoWait"/>
<UI>
<Publish Control="Finish" Dialog="ExitDialog" Event="DoAction" Value="StartGui">NOT Installed</Publish>