diff options
13 files changed, 162 insertions, 0 deletions
diff --git a/src/samples/WixToolset.Templates/WixToolset.Templates.csproj b/src/samples/WixToolset.Templates/WixToolset.Templates.csproj new file mode 100644 index 00000000..00b6c6d3 --- /dev/null +++ b/src/samples/WixToolset.Templates/WixToolset.Templates.csproj | |||
@@ -0,0 +1,20 @@ | |||
1 | <Project Sdk="Microsoft.NET.Sdk"> | ||
2 | <PropertyGroup> | ||
3 | <PackageType>Template</PackageType> | ||
4 | <Title>WixToolset Templates</Title> | ||
5 | <Description>Project and item template for the WiX Toolset.</Description> | ||
6 | |||
7 | <TargetFramework>netstandard2.0</TargetFramework> | ||
8 | <IncludeBuildOutput>false</IncludeBuildOutput> | ||
9 | <NoWarn>$(NoWarn);NU5128</NoWarn> | ||
10 | |||
11 | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
12 | <IncludeContentInPack>true</IncludeContentInPack> | ||
13 | <ContentTargetFolders>content</ContentTargetFolders> | ||
14 | </PropertyGroup> | ||
15 | |||
16 | <ItemGroup> | ||
17 | <Compile Remove="**" /> | ||
18 | <Content Include="templates\**" /> | ||
19 | </ItemGroup> | ||
20 | </Project> | ||
diff --git a/src/samples/WixToolset.Templates/templates/FragmentItem/.template.config/template.json b/src/samples/WixToolset.Templates/templates/FragmentItem/.template.config/template.json new file mode 100644 index 00000000..2bd67b11 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/FragmentItem/.template.config/template.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "$schema": "http://json.schemastore.org/template", | ||
3 | "identity": "WixToolset.Templates.FragmentItem", | ||
4 | "name": "WiX Toolset Fragment", | ||
5 | "shortName": "fragment", | ||
6 | "author": "WiX Toolset Team", | ||
7 | "classifications": ["WixToolset", "Code"], | ||
8 | "tags": { | ||
9 | "language": "WiX", | ||
10 | "type": "item" | ||
11 | }, | ||
12 | "sourceName": "$safeprojectname$", | ||
13 | "defaultName": "Fragment" | ||
14 | } | ||
diff --git a/src/samples/WixToolset.Templates/templates/FragmentItem/Fragment.wxs b/src/samples/WixToolset.Templates/templates/FragmentItem/Fragment.wxs new file mode 100644 index 00000000..12e1bfc3 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/FragmentItem/Fragment.wxs | |||
@@ -0,0 +1,4 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Fragment> | ||
3 | </Fragment> | ||
4 | </Wix> | ||
diff --git a/src/samples/WixToolset.Templates/templates/LibraryProject/$safeprojectname$.wixproj b/src/samples/WixToolset.Templates/templates/LibraryProject/$safeprojectname$.wixproj new file mode 100644 index 00000000..c3536151 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/LibraryProject/$safeprojectname$.wixproj | |||
@@ -0,0 +1,5 @@ | |||
1 | <Project Sdk="WixToolset.Sdk/4.0.0"> | ||
2 | <PropertyGroup> | ||
3 | <OutputType>Library</OutputType> | ||
4 | </PropertyGroup> | ||
5 | </Project> | ||
diff --git a/src/samples/WixToolset.Templates/templates/LibraryProject/.template.config/template.json b/src/samples/WixToolset.Templates/templates/LibraryProject/.template.config/template.json new file mode 100644 index 00000000..ddfa82e9 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/LibraryProject/.template.config/template.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "$schema": "http://json.schemastore.org/template", | ||
3 | "identity": "WixToolset.Templates.LibraryProject", | ||
4 | "name": "WiX Toolset Library", | ||
5 | "shortName": "wixlib", | ||
6 | "author": "WiX Toolset Team", | ||
7 | "classifications": ["WixToolset", "Library"], | ||
8 | "tags": { | ||
9 | "language": "WiX", | ||
10 | "type": "project" | ||
11 | }, | ||
12 | "sourceName": "$safeprojectname$", | ||
13 | "defaultName": "Library" | ||
14 | } | ||
diff --git a/src/samples/WixToolset.Templates/templates/LibraryProject/Fragment.wxs b/src/samples/WixToolset.Templates/templates/LibraryProject/Fragment.wxs new file mode 100644 index 00000000..12e1bfc3 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/LibraryProject/Fragment.wxs | |||
@@ -0,0 +1,4 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Fragment> | ||
3 | </Fragment> | ||
4 | </Wix> | ||
diff --git a/src/samples/WixToolset.Templates/templates/ModuleProject/$safeprojectname$.wixproj b/src/samples/WixToolset.Templates/templates/ModuleProject/$safeprojectname$.wixproj new file mode 100644 index 00000000..cc813aab --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/ModuleProject/$safeprojectname$.wixproj | |||
@@ -0,0 +1,5 @@ | |||
1 | <Project Sdk="WixToolset.Sdk/4.0.0"> | ||
2 | <PropertyGroup> | ||
3 | <OutputType>Module</OutputType> | ||
4 | </PropertyGroup> | ||
5 | </Project> | ||
diff --git a/src/samples/WixToolset.Templates/templates/ModuleProject/.template.config/template.json b/src/samples/WixToolset.Templates/templates/ModuleProject/.template.config/template.json new file mode 100644 index 00000000..2be72f83 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/ModuleProject/.template.config/template.json | |||
@@ -0,0 +1,26 @@ | |||
1 | { | ||
2 | "$schema": "http://json.schemastore.org/template", | ||
3 | "identity": "WixToolset.Templates.ModuleProject", | ||
4 | "name": "WiX Toolset Module", | ||
5 | "shortName": "msm", | ||
6 | "author": "WiX Toolset Team", | ||
7 | "classifications": ["WixToolset", "Module"], | ||
8 | "tags": { | ||
9 | "language": "WiX", | ||
10 | "type": "project" | ||
11 | }, | ||
12 | "symbols": { | ||
13 | "company": { | ||
14 | "type": "parameter", | ||
15 | "defaultValue": "Your Company Name", | ||
16 | "replaces": "$company$" | ||
17 | }, | ||
18 | "version": { | ||
19 | "type": "parameter", | ||
20 | "defaultValue": "0.0.1", | ||
21 | "replaces": "$version$" | ||
22 | } | ||
23 | }, | ||
24 | "sourceName": "$safeprojectname$", | ||
25 | "defaultName": "Module" | ||
26 | } | ||
diff --git a/src/samples/WixToolset.Templates/templates/ModuleProject/Module.wxs b/src/samples/WixToolset.Templates/templates/ModuleProject/Module.wxs new file mode 100644 index 00000000..592c844d --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/ModuleProject/Module.wxs | |||
@@ -0,0 +1,8 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Module Id="$safeprojectname$" Guid="PUT-GUID-HERE" Manufacturer="$company$" Language="0" Version="$version$"> | ||
3 | <Component Guid='PUT-GUID-HERE' Directory='TARGETDIR'> | ||
4 | <!-- TODO: Install something more useful than this source code file itself --> | ||
5 | <File Source="Module.wxs" /> | ||
6 | </Component> | ||
7 | </Module> | ||
8 | </Wix> | ||
diff --git a/src/samples/WixToolset.Templates/templates/PackageProject/$safeprojectname$.wixproj b/src/samples/WixToolset.Templates/templates/PackageProject/$safeprojectname$.wixproj new file mode 100644 index 00000000..17640703 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/PackageProject/$safeprojectname$.wixproj | |||
@@ -0,0 +1,2 @@ | |||
1 | <Project Sdk="WixToolset.Sdk/4.0.0"> | ||
2 | </Project> | ||
diff --git a/src/samples/WixToolset.Templates/templates/PackageProject/.template.config/template.json b/src/samples/WixToolset.Templates/templates/PackageProject/.template.config/template.json new file mode 100644 index 00000000..d12f3109 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/PackageProject/.template.config/template.json | |||
@@ -0,0 +1,26 @@ | |||
1 | { | ||
2 | "$schema": "http://json.schemastore.org/template", | ||
3 | "identity": "WixToolset.Templates.PackageProject", | ||
4 | "name": "WiX Toolset Package", | ||
5 | "shortName": "msi", | ||
6 | "author": "WiX Toolset Team", | ||
7 | "classifications": ["WixToolset", "Package"], | ||
8 | "tags": { | ||
9 | "language": "WiX", | ||
10 | "type": "project" | ||
11 | }, | ||
12 | "symbols": { | ||
13 | "company": { | ||
14 | "type": "parameter", | ||
15 | "defaultValue": "Your Company Name", | ||
16 | "replaces": "$company$" | ||
17 | }, | ||
18 | "version": { | ||
19 | "type": "parameter", | ||
20 | "defaultValue": "0.0.1", | ||
21 | "replaces": "$version$" | ||
22 | } | ||
23 | }, | ||
24 | "sourceName": "$safeprojectname$", | ||
25 | "defaultName": "Package" | ||
26 | } | ||
diff --git a/src/samples/WixToolset.Templates/templates/PackageProject/Package.wxs b/src/samples/WixToolset.Templates/templates/PackageProject/Package.wxs new file mode 100644 index 00000000..ac69e549 --- /dev/null +++ b/src/samples/WixToolset.Templates/templates/PackageProject/Package.wxs | |||
@@ -0,0 +1,24 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="$safeprojectname$" Manufacturer="$company$" Version="$version$" UpgradeCode="PUT-GUID-HERE"> | ||
3 | <MajorUpgrade DowngradeError="A newer version of [ProductName] is already installed" /> | ||
4 | |||
5 | <Feature Id="Main"> | ||
6 | <ComponentGroupRef Id="Components" /> | ||
7 | </Feature> | ||
8 | </Package> | ||
9 | |||
10 | <Fragment> | ||
11 | <ComponentGroup Id="Components" Directory="INSTALLFOLDER"> | ||
12 | <Component> | ||
13 | <!-- TODO: Install something more useful than this source code file itself --> | ||
14 | <File Source="Package.wxs" /> | ||
15 | </Component> | ||
16 | </ComponentGroup> | ||
17 | </Fragment> | ||
18 | |||
19 | <Fragment> | ||
20 | <StandardDirectory Id="ProgramFiles6432Folder"> | ||
21 | <Directory Id="INSTALLFOLDER" Name="!(Property.Manufacturer) !(Property.ProductName)" /> | ||
22 | </StandardDirectory> | ||
23 | </Fragment> | ||
24 | </Wix> | ||
diff --git a/src/samples/samples.sln b/src/samples/samples.sln index 7e2d0762..fab825cf 100644 --- a/src/samples/samples.sln +++ b/src/samples/samples.sln | |||
@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.30711.63 | |||
5 | MinimumVisualStudioVersion = 15.0.26124.0 | 5 | MinimumVisualStudioVersion = 15.0.26124.0 |
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" | 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" |
7 | EndProject | 7 | EndProject |
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}" | ||
9 | EndProject | ||
8 | Global | 10 | Global |
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
10 | Debug|Any CPU = Debug|Any CPU | 12 | Debug|Any CPU = Debug|Any CPU |
@@ -20,6 +22,14 @@ Global | |||
20 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32 | 22 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32 |
21 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32 | 23 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32 |
22 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32 | 24 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32 |
25 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
26 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
27 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
28 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|x86.Build.0 = Debug|Any CPU | ||
29 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
30 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
31 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU | ||
32 | {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU | ||
23 | EndGlobalSection | 33 | EndGlobalSection |
24 | GlobalSection(SolutionProperties) = preSolution | 34 | GlobalSection(SolutionProperties) = preSolution |
25 | HideSolutionNode = FALSE | 35 | HideSolutionNode = FALSE |