@joebigelow / wix-1 / commits / 3b870b54

Create setup segment and WixAdditionalTools bundle

The setup segment is scheduled after building the shipping WiX files to use and include the current build's tooling. The WixAdditionalTools bundle currently only contains the ThmViewer package but may include additional tools in the future. At this time, the primary purpose is to produce a shipping MSI and bundle from the WiX v4 build process and dogfood the rest of the tooling. Closes 4919

Rob Mensching committed Aug 6, 2022 at 15:38 UTC 3b870b5493458ec6b2febc7dd7a154688a36152f
14 files changed +184 -12
src/Directory.wixproj.props new
+9
@@ -0,0 +1,9 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project>
5 + <PropertyGroup>
6 + <!-- TODO: changing the .wixpdb folder does not actually work until issue #6857 is resolved -->
7 + <PdbOutputDir>$(PdbsFolder)</PdbOutputDir>
8 + </PropertyGroup>
9 +</Project>
src/Directory.wixproj.targets new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project>
5 + <Target Name="_SetWixVersion"
6 + DependsOnTargets="__SetPropertiesFromGit"
7 + AfterTargets="_CreateProjectDefineConstants">
8 + <PropertyGroup>
9 + <DefineConstants>
10 + $(DefineConstants);
11 + SetupVersion=$(FileVersion);
12 + SetupMajorMinorVersion=$(GitBaseVersionMajor).$(GitBaseVersionMinor);
13 + </DefineConstants>
14 + </PropertyGroup>
15 + </Target>
16 +</Project>
src/build_all.cmd
+5
@@ -54,6 +54,11 @@ call tools\tools.cmd %_C% || exit /b
54 call ext\ext.cmd %_C% || exit /b
55
56
57 +:: setup
58 +
59 +call setup\setup.cmd %_C% || exit /b
60 +
61 +
62 :: integration tests
63
64 call test\test.cmd %_C% || exit /b
src/setup/Directory.Build.props new
+14
@@ -0,0 +1,14 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project>
5 + <PropertyGroup>
6 + <SegmentName>setup</SegmentName>
7 + </PropertyGroup>
8 +
9 + <Import Project="..\Directory.Build.props" />
10 +
11 + <PropertyGroup>
12 + <PublishRoot>$(OutputPath)publish\</PublishRoot>
13 + </PropertyGroup>
14 +</Project>
src/setup/ThmViewerPackage/ThmViewerPackage.wixproj new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 + <ItemGroup>
4 + <LinkerBindInputPaths Include="$(RootBuildFolder)tools\$(Configuration)\x86" />
5 + </ItemGroup>
6 +
7 + <ItemGroup>
8 + <PackageReference Include="GitInfo" PrivateAssets="All" />
9 + </ItemGroup>
10 +
11 +</Project>
src/setup/ThmViewerPackage/ThmViewerPackage.wxs renamed
+3 -2
@@ -2,7 +2,7 @@
2 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Package Name="WiX Toolset Theme Viewer" Manufacturer="WiX Toolset" Language="1033" Version="!(bind.fileVersion.ThmViewerFile)" UpgradeCode="59c4b122-5167-445b-8fc4-09dcd4eced89">
4 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
5 - <MediaTemplate EmbedCab="yes" />
5 + <MediaTemplate />
6
7 <Feature Id="Main">
8 <ComponentGroupRef Id="Components" />
@@ -14,13 +14,14 @@
14 <Component>
15 <File Id="ThmViewerFile" Source="thmviewer.exe" />
16 <Shortcut Name="!(bind.property.ProductName)" Directory="ShortcutFolder" Advertise="yes" />
17 + <RemoveFolder Directory="ShortcutFolder" On="uninstall" />
18 </Component>
19 </ComponentGroup>
20 </Fragment>
21
22 <Fragment>
23 <StandardDirectory Id="ProgramFilesFolder">
23 - <Directory Id="INSTALLFOLDER" Name="WiX Toolset v4.0" />
24 + <Directory Id="INSTALLFOLDER" Name="WiX Toolset v$(SetupMajorMinorVersion)" />
25 </StandardDirectory>
26 <StandardDirectory Id="ProgramMenuFolder">
27 <Directory Id="ShortcutFolder" Name="WiX Toolset" />
src/setup/WixAdditionalTools/WixAdditionalTools.wixproj new
+17
@@ -0,0 +1,17 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 + <PropertyGroup>
4 + <OutputType>Bundle</OutputType>
5 + <OutputPath>$(PackageOutputPath)</OutputPath>
6 + </PropertyGroup>
7 +
8 + <ItemGroup>
9 + <ProjectReference Include="..\ThmViewerPackage\ThmViewerPackage.wixproj" />
10 + </ItemGroup>
11 +
12 + <ItemGroup>
13 + <PackageReference Include="WixToolset.Bal.wixext" />
14 + <PackageReference Include="GitInfo" PrivateAssets="All" />
15 + </ItemGroup>
16 +
17 +</Project>
src/setup/WixAdditionalTools/WixAdditionalTools.wxl new
+12
@@ -0,0 +1,12 @@
1 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2 +
3 +<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl">
4 + <String Id="Company" Overridable="yes">.NET Foundation</String>
5 + <String Id="Copyright" Overridable="yes">Copyright (c) .NET Foundation and contributors. All rights reserved.</String>
6 + <String Id="Name" Overridable="yes">WiX Toolset Additional Tools</String>
7 + <String Id="Regid" Overridable="yes">wixtoolset.org</String>
8 + <String Id="AboutUrl" Overridable="yes">https://wixtoolset.org/</String>
9 + <String Id="LicenseUrl" Overridable="yes">https://wixtoolset.org/about/license/</String>
10 + <String Id="SupportUrl" Overridable="yes">https://wixtoolset.org/documentation/</String>
11 + <String Id="UpdateUrl" Overridable="yes">https://wixtoolset.org/releases/feed/v$(SetupMajorMinorVersion)</String>
12 +</WixLocalization>
src/setup/WixAdditionalTools/WixAdditionalTools.wxs new
+27
@@ -0,0 +1,27 @@
1 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2 +
3 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
4 + xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
5 + <Bundle Name="!(loc.Name)" Version="$(SetupVersion)" UpgradeCode="fc48131d-214a-439b-9a31-ef2ea5c69ea5"
6 + AboutUrl="!(loc.AboutUrl)" HelpUrl="!(loc.SupportUrl)" UpdateUrl="!(loc.UpdateUrl)">
7 + <BootstrapperApplication>
8 + <bal:WixStandardBootstrapperApplication
9 + LicenseUrl="!(loc.LicenseUrl)"
10 + Theme="hyperlinkLicense"
11 + ShowVersion="true"
12 + LogoFile="wix-logo-sq.png" />
13 + </BootstrapperApplication>
14 +
15 + <SetVariable Variable="InstallFolder" Value="[ProgramFilesFolder]WiX Toolset v$(SetupMajorMinorVersion)\" />
16 + <!-- TODO: bring back SoftwareTag when #6854 fixed -->
17 + <!-- <SoftwareTag Regid="!(loc.Regid)" InstallPath="[InstallFolder]" /> -->
18 +
19 + <Update Location="!(loc.UpdateUrl)" />
20 +
21 + <Chain>
22 + <MsiPackage SourceFile="ThmViewerPackage.msi">
23 + <MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
24 + </MsiPackage>
25 + </Chain>
26 + </Bundle>
27 +</Wix>
src/setup/WixAdditionalTools/wix-logo-sq.png
Binary files /dev/null and b/src/setup/WixAdditionalTools/wix-logo-sq.png differ
src/setup/setup.cmd new
+41
@@ -0,0 +1,41 @@
1 +@setlocal
2 +@pushd %~dp0
3 +
4 +@set _C=Debug
5 +@set _L=%~dp0..\..\build\logs
6 +
7 +:parse_args
8 +@if /i "%1"=="release" set _C=Release
9 +@if /i "%1"=="inc" set _INCREMENTAL=1
10 +@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
11 +@if not "%1"=="" shift & goto parse_args
12 +
13 +:: Clean
14 +@if NOT "%_INCREMENTAL%"=="" call :clean
15 +@if NOT "%_CLEAN%"=="" goto :end
16 +
17 +@echo Building setup %_C%
18 +
19 +:: Build
20 +msbuild -Restore setup.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\setup_build.binlog || exit /b
21 +
22 +:: Publish
23 +
24 +
25 +:: Test
26 +
27 +
28 +:: Pack
29 +
30 +
31 +@goto :end
32 +
33 +:clean
34 +@rd /s/q "..\..\build\setup" 2> nul
35 +@del "..\..\build\artifacts\WixAdditionalTools.*" 2> nul
36 +@del "..\..\build\logs\pdbs\%_C%\WixAdditionalTools.*" 2> nul
37 +@exit /b
38 +
39 +:end
40 +@popd
41 +@endlocal
src/setup/setup.sln new
+28
@@ -0,0 +1,28 @@
1 +
2 +Microsoft Visual Studio Solution File, Format Version 12.00
3 +# Visual Studio Version 16
4 +VisualStudioVersion = 16.0.30114.105
5 +MinimumVisualStudioVersion = 10.0.40219.1
6 +Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "ThmViewerPackage", "ThmViewerPackage\ThmViewerPackage.wixproj", "{F8C12838-DEC5-4CA5-97A8-DFE2247564C5}"
7 +EndProject
8 +Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "WixAdditionalTools", "WixAdditionalTools\WixAdditionalTools.wixproj", "{59FF3AD3-339A-4048-9F0B-504EE74BC4AF}"
9 +EndProject
10 +Global
11 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 + Debug|Any CPU = Debug|Any CPU
13 + Release|Any CPU = Release|Any CPU
14 + EndGlobalSection
15 + GlobalSection(SolutionProperties) = preSolution
16 + HideSolutionNode = FALSE
17 + EndGlobalSection
18 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
19 + {F8C12838-DEC5-4CA5-97A8-DFE2247564C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 + {F8C12838-DEC5-4CA5-97A8-DFE2247564C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 + {F8C12838-DEC5-4CA5-97A8-DFE2247564C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 + {F8C12838-DEC5-4CA5-97A8-DFE2247564C5}.Release|Any CPU.Build.0 = Release|Any CPU
23 + {59FF3AD3-339A-4048-9F0B-504EE74BC4AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24 + {59FF3AD3-339A-4048-9F0B-504EE74BC4AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
25 + {59FF3AD3-339A-4048-9F0B-504EE74BC4AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
26 + {59FF3AD3-339A-4048-9F0B-504EE74BC4AF}.Release|Any CPU.Build.0 = Release|Any CPU
27 + EndGlobalSection
28 +EndGlobal
src/tools/ThmViewerPackage/ThmViewerPackage.wixproj deleted
-10
@@ -1,10 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<Project Sdk="WixToolset.Sdk">
3 - <PropertyGroup>
4 - <OutputPath>$(PackageOutputPath)</OutputPath>
5 - </PropertyGroup>
6 -
7 - <ItemGroup>
8 - <ProjectReference Include="..\thmviewer\thmviewer.vcxproj" />
9 - </ItemGroup>
10 -</Project>
src/tools/tools.sln
+1
@@ -29,6 +29,7 @@ Global
29 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|x86.ActiveCfg = Debug|Win32
30 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|x86.Build.0 = Debug|Win32
31 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32
32 + {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.Build.0 = Release|Win32
33 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32
34 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32
35 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU