Skip to content

Commit 4e66c91

Browse files
authored
Merge pull request #502 from GameTechDev/bug/installer-build-clean-up
Library and merge module build cleanup
2 parents e37b073 + 05eca9d commit 4e66c91

File tree

3 files changed

+42
-13
lines changed

3 files changed

+42
-13
lines changed

IntelPresentMon/PMInstaller/PMInstaller.wixproj

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
</LinkerAdditionalOptions>
3131
<SuppressIces>ICE60</SuppressIces>
3232
</PropertyGroup>
33+
<PropertyGroup>
34+
<DefineConstants>$(DefineConstants);PM.ServiceDirId=service_folder</DefineConstants>
35+
</PropertyGroup>
3336
<ItemGroup>
3437
<Compile Include="CefBinaries.wxs" />
3538
<Compile Include="CefResources.wxs" />
@@ -50,7 +53,7 @@
5053
<WixExtension Include="WixUtilExtension">
5154
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
5255
<Name>WixUtilExtension</Name>
53-
</WixExtension>
56+
</WixExtension>
5457
</ItemGroup>
5558
<ItemGroup>
5659
<ProjectReference Include="..\..\Provider\Provider.vcxproj">
@@ -93,6 +96,14 @@
9396
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
9497
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
9598
</ProjectReference>
99+
<ProjectReference Include="..\PMInstallerLib\PMInstallerLib.wixproj">
100+
<Name>PMInstallerLib</Name>
101+
<Project>{6478f2f6-92ad-4b1c-a13e-c8cea9125152}</Project>
102+
<Private>True</Private>
103+
<DoNotHarvest>True</DoNotHarvest>
104+
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
105+
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
106+
</ProjectReference>
96107
<ProjectReference Include="..\PresentMonAPI2Loader\PresentMonAPI2Loader.vcxproj">
97108
<Name>PresentMonAPI2Loader</Name>
98109
<Project>{8f86d067-2437-46fc-8f82-4d7155ceced7}</Project>
@@ -118,15 +129,27 @@
118129
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
119130
</ProjectReference>
120131
</ItemGroup>
121-
<ItemGroup>
122-
<WixLibrary Include="..\PMInstallerLib\bin\PMService.wixlib" />
123-
</ItemGroup>
124132
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
125133
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
126134
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
127135
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
128136
</Target>
129-
<!--
137+
138+
<Target Name="AddReferencedWixLibs" BeforeTargets="Link">
139+
<!-- Build the wixlib first -->
140+
<MSBuild Projects="..\PMInstallerLib\PMInstallerLib.wixproj"
141+
Targets="Build"
142+
Properties="Configuration=$(Configuration);Platform=$(Platform)" />
143+
<ItemGroup>
144+
<WixLibrary Include="$(SolutionDir)build\$(Configuration)\PMInstallerLib.wixlib"
145+
Condition="Exists('$(SolutionDir)build\$(Configuration)\PMInstallerLib.wixlib')" />
146+
</ItemGroup>
147+
<Message Text="@@ Linking wixlibs: @(WixLibrary)" Importance="High" />
148+
<Error Condition="'@(WixLibrary)' == ''"
149+
Text="No wixlib found under $(SolutionDir)build\$(Configuration)\ (or ...\en-us\). Build produced nothing." />
150+
</Target>
151+
152+
<!--
130153
To modify your build process, add your task inside one of the targets below and uncomment it.
131154
Other similar extension points exist, see Wix.targets.
132155
<Target Name="BeforeBuild">

IntelPresentMon/PMInstallerLib/PMInstallerLib.wixproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<!-- WiX 3.x library output -->
44
<OutputType>Library</OutputType>
5-
<OutputName>PMService</OutputName>
6-
<IntermediateOutputPath>obj\</IntermediateOutputPath>
7-
<OutputPath>bin\</OutputPath>
5+
<OutputName>PMInstallerLib</OutputName>
6+
<IntermediateOutputPath>$(SolutionDir)build\obj\$(MSBuildProjectName)-$(Platform)-$(Configuration)</IntermediateOutputPath>
7+
<OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
88
<!-- Point these at YOUR WiX 3.x install -->
99
<WixToolPath>$(WIX)bin\</WixToolPath>
1010
<WixTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

IntelPresentMon/ServiceMergeModule/ServiceMergeModule.wixproj

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Build a MERGE MODULE -->
44
<OutputType>Module</OutputType>
55
<OutputName>PresentMonSharedService</OutputName>
6-
<IntermediateOutputPath>obj\</IntermediateOutputPath>
6+
<IntermediateOutputPath>$(SolutionDir)build\obj\$(MSBuildProjectName)-$(Platform)-$(Configuration)</IntermediateOutputPath>
77
<OutputPath>$(SolutionDir)build\$(Configuration)\en-us\</OutputPath>
88
<!-- Point to your WiX 3.11 install -->
99
<WixToolPath>$(WIX)bin\</WixToolPath>
@@ -16,12 +16,18 @@
1616
<!-- The module authoring file -->
1717
<Compile Include="ServiceMergeModule.wxs" />
1818
<!-- Link your existing wixlib so we get ComponentGroup Id='service_files' -->
19-
<WixLibrary Include="PMService">
20-
<HintPath>..\PMInstallerLib\bin\PMService.wixlib</HintPath>
21-
<Name>PMService</Name>
22-
</WixLibrary>
2319
<!-- Add extensions only if your wixlib uses them -->
2420
<!-- <WixExtension Include="WixUtilExtension" /> -->
2521
</ItemGroup>
22+
<ItemGroup>
23+
<ProjectReference Include="..\PMInstallerLib\PMInstallerLib.wixproj">
24+
<Name>PMInstallerLib</Name>
25+
<Project>{6478f2f6-92ad-4b1c-a13e-c8cea9125152}</Project>
26+
<Private>True</Private>
27+
<DoNotHarvest>True</DoNotHarvest>
28+
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
29+
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
30+
</ProjectReference>
31+
</ItemGroup>
2632
<Import Project="$(WixTargetsPath)" />
2733
</Project>

0 commit comments

Comments
 (0)