fix installer build. at this point the process is not at all robust..it mainly just works for me.

This commit is contained in:
walker0643 2018-02-06 20:08:37 -05:00
parent 541fb2afc5
commit d5544dc6d1
3 changed files with 43 additions and 25 deletions

View File

@ -0,0 +1,35 @@
@echo off
set WIX_ROOT=C:\Program Files (x86)\WiX Toolset v3.11
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
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 winbuild_env.bat
echo - also set other environmental overrides necessary for your build environment
echo - run clean_build_windows.bat to build Barrier and verify that it succeeds
echo - re-run this script to create the installation package
goto done
:failed
echo Build failed
:done
set WIX_ROOT=
cd /d %savedir%
set savedir=

View File

@ -2,7 +2,7 @@
<Include> <Include>
<?define Name="Barrier" ?> <?define Name="Barrier" ?>
<?define Version="@BARRIER_VERSION@" ?> <?define Version="@BARRIER_VERSION@" ?>
<?define QtVersion="5.9.3" ?> <!-- TODO: Configure this externally //--> <?define QtVersion="5.6.3" ?> <!-- TODO: Configure this externally //-->
<?define Author="Debauchee Open Source Group" ?> <?define Author="Debauchee Open Source Group" ?>
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?> <?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
<?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?> <?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?>
@ -11,19 +11,19 @@
<?define ProgramFilesFolder="ProgramFiles64Folder" ?> <?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?define PlatformSimpleName="64-bit" ?> <?define PlatformSimpleName="64-bit" ?>
<?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?> <?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>
<?define QtPath="C:\Qt\$(var.QtVersion)\msvc2015_64" ?> <?define QtPath="E:\Qt\$(var.QtVersion)\msvc2015_64" ?>
<?else ?> <?else ?>
<?define ProgramFilesFolder="ProgramFilesFolder" ?> <?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?define PlatformSimpleName="32-bit" ?> <?define PlatformSimpleName="32-bit" ?>
<?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?> <?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
<?define QtPath="C:\Qt\$(var.QtVersion)\msvc2015" ?> <?define QtPath="E:\Qt\$(var.QtVersion)\msvc2015" ?>
<?endif ?> <?endif ?>
<?define QtBinPath="$(var.QtPath)\bin" ?> <?define QtBinPath="$(var.QtPath)\bin" ?>
<?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?> <?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?>
<?define OpenSSLPath="$(var.ExtPath)\openssl\windows\$(var.Platform)" ?> <?define OpenSSLPath="$(var.ExtPath)\openssl\windows\$(var.Platform)" ?>
<?define OpenSSLBinPath="$(var.OpenSSLPath)\bin" ?> <?define OpenSSLBinPath="$(var.OpenSSLPath)\bin" ?>
<?if $(var.Configuration) = "Debug" ?> <?if $(var.Configuration) = "Debug" ?>
<?define DebugCRT="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_DebugCRT_$(var.Platform).msm" ?> <?define DebugCRT="$(env.ProgramFiles)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.11.25325\Merge Modules\Microsoft_VC141_DebugCRT_$(var.Platform).msm" ?>
<?endif ?> <?endif ?>
<?define CRT="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_CRT_$(var.Platform).msm" ?> <?define CRT="$(env.ProgramFiles)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.11.25325\MergeModules\Microsoft_VC141_CRT_$(var.Platform).msm" ?>
</Include> </Include>

21
dist/wix/Product.wxs vendored
View File

@ -12,8 +12,6 @@
</Upgrade> </Upgrade>
<Feature Id="ProductFeature" Title="$(var.Name)"> <Feature Id="ProductFeature" Title="$(var.Name)">
<ComponentGroupRef Id="ProductComponents"/> <ComponentGroupRef Id="ProductComponents"/>
<ComponentGroupRef Id="OpenSSLComponents"/>
<ComponentGroupRef Id="ProductQtPluginComponents"/>
<MergeRef Id="CRT"/> <MergeRef Id="CRT"/>
<?if $(var.Configuration) = "Debug" ?> <?if $(var.Configuration) = "Debug" ?>
<MergeRef Id="DebugCRT"/> <MergeRef Id="DebugCRT"/>
@ -79,6 +77,8 @@
<File Source="$(var.BinPath)/synwinhk.dll"/> <File Source="$(var.BinPath)/synwinhk.dll"/>
<File Source="$(var.OpenSSLBinPath)/libeay32.dll"/> <File Source="$(var.OpenSSLBinPath)/libeay32.dll"/>
<File Source="$(var.OpenSSLBinPath)/ssleay32.dll"/> <File Source="$(var.OpenSSLBinPath)/ssleay32.dll"/>
<File Source="$(var.OpenSSLBinPath)/openssl.exe"/>
<File Source="$(var.ResPath)/openssl/barrier.conf"/>
</Component> </Component>
<Component Guid="BAC8149B-6287-45BF-9C27-43D71ED40214" Id="Gui"> <Component Guid="BAC8149B-6287-45BF-9C27-43D71ED40214" Id="Gui">
<File Id="GuiProgram" KeyPath="yes" Source="$(var.BinPath)/barrier.exe"> <File Id="GuiProgram" KeyPath="yes" Source="$(var.BinPath)/barrier.exe">
@ -106,22 +106,5 @@
<?endif ?> <?endif ?>
</Component> </Component>
</ComponentGroup> </ComponentGroup>
<ComponentGroup Directory="PlatformsDir" Id="ProductQtPluginComponents">
<Component Guid="684EFA14-856B-440E-A5E6-E90E04E36B41" Id="QtPlatformPlugin">
<?if $(var.Configuration) = "Debug" ?>
<File Source="$(var.QtPlatformPath)\qwindowsd.dll"/>
<?else ?>
<File Source="$(var.QtPlatformPath)\qwindows.dll"/>
<?endif ?>
</Component>
</ComponentGroup>
<ComponentGroup Directory="OpenSSLDir" Id="OpenSSLComponents">
<Component Guid="92648F77-65A6-4B16-AC59-A1F37BD341B1" Id="OpenSSL">
<File Id="OpenSSLDll1" Source="$(var.OpenSSLBinPath)/libeay32.dll"/>
<File Id="OpenSSLDll2" Source="$(var.OpenSSLBinPath)/ssleay32.dll"/>
<File Source="$(var.OpenSSLBinPath)/openssl.exe"/>
<File Source="$(var.ResPath)/openssl/barrier.conf"/>
</Component>
</ComponentGroup>
</Fragment> </Fragment>
</Wix> </Wix>