Updated installer package, made QT path configurable, added redist to msi

This commit is contained in:
Jamie Newbon 2019-10-24 13:49:50 +01:00
parent 5e74fcbdc7
commit 9d514ef876
5 changed files with 51 additions and 41 deletions

View File

@ -377,8 +377,9 @@ endif()
#
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
message (STATUS "Configuring the v1 installer")
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/wix ${CMAKE_BINARY_DIR}/installer)
generate_versionfile()
set(QT_PATH $ENV{CMAKE_PREFIX_PATH})
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/wix ${CMAKE_BINARY_DIR}/installer)
endif()
#

View File

@ -2,7 +2,6 @@
<Include>
<?define Name="Synergy" ?>
<?define Version="@SYNERGY_VERSION@" ?>
<?define QtVersion="5.9.5" ?> <!-- TODO: Configure this externally //-->
<?define Author="Symless Ltd" ?>
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
<?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?>
@ -11,12 +10,12 @@
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?define PlatformSimpleName="64-bit" ?>
<?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>
<?define QtPath="C:\Qt\Qt$(var.QtVersion)\$(var.QtVersion)\msvc2015_64" ?>
<?define QtPath="@QT_PATH@" ?>
<?else ?>
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?define PlatformSimpleName="32-bit" ?>
<?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
<?define QtPath="C:\Qt\Qt$(var.QtVersion)\$(var.QtVersion)\msvc2015" ?>
<?define QtPath="@QT_PATH@" ?>
<?endif ?>
<?define QtBinPath="$(var.QtPath)\bin" ?>
<?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?>

View File

@ -15,6 +15,7 @@
<ComponentGroupRef Id="OpenSSLComponents"/>
<ComponentGroupRef Id="ProductQtPluginComponents"/>
<ComponentRef Id="RegistryEntries"/>
<MergeRef Id="VC_Redist"/>
</Feature>
<DirectoryRef Id="TARGETDIR">
<Component Guid="7CF3564D-1F8E-4D3D-9781-E1EE22D5BD67" Id="RegistryEntries">
@ -36,6 +37,11 @@
<!-- Windows 8 and later only -->
<Condition><![CDATA[Installed OR (VersionNT >= 602)]]></Condition>
</Component>
<?if $(var.Platform) = x64 ?>
<Merge Id="VC_Redist" SourceFile="$(env.ProgramFiles)\Common Files\Merge Modules\Microsoft_VC140_CRT_x64.msm" DiskId="1" Language="0"/>
<?else ?>
<Merge Id="VC_Redist" SourceFile="$(env.ProgramFiles)\Common Files\Merge Modules\Microsoft_VC140_CRT_x86.msm" DiskId="1" Language="0"/>
<?endif ?>
</DirectoryRef>
<Icon Id="synergy.ico" SourceFile="$(var.ResPath)/synergy.ico"/>
<WixVariable Id="WixUIBannerBmp" Value="$(var.ResPath)\banner.bmp"/>

20
dist/wix/Synergy.sln vendored
View File

@ -1,27 +1,29 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29411.108
MinimumVisualStudioVersion = 10.0.40219.1
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Synergy", "Synergy.wixproj", "{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Debug|x64 = Debug|x64
Release|x86 = Release|x86
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x64.ActiveCfg = Debug|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x86.ActiveCfg = Debug|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x86.Build.0 = Debug|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x64.ActiveCfg = Debug|x64
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x64.Build.0 = Debug|x64
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x64.ActiveCfg = Release|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x86.ActiveCfg = Release|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x86.Build.0 = Release|x86
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x64.ActiveCfg = Release|x64
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E0AA1C9-0F14-4FE4-8F18-430484EFBACE}
EndGlobalSection
EndGlobal

View File

@ -1,31 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>{d4ba9f39-6a35-4c8f-9cb2-67fcbe5cab17}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Synergy</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>wix\obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="WixFirewallExtension">
<HintPath>$(WixExtDir)\WixFirewallExtension.dll</HintPath>
<Name>WixFirewallExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<Compile Include="Product.wxs"/>
<Content Include="Include.wxi"/>
</ItemGroup>
<Import Project="$(WixTargetsPath)"/>
<PropertyGroup>
<ProductVersion>3.11</ProductVersion>
<ProjectGuid>{d4ba9f39-6a35-4c8f-9cb2-67fcbe5cab17}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Synergy</OutputName>
<OutputType>Package</OutputType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>wix\obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(SolutionDir)/Product.wxs" />
<Content Include="$(SolutionDir)/Include.wxi" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<WixExtension Include="WixFirewallExtension">
<HintPath>C:\Program Files (x86)\WiX Toolset v3.11\bin\WixFirewallExtension.dll</HintPath>
<Name>WixFirewallExtension</Name>
</WixExtension>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
</Project>