diff options
| author | paulomorgado <470455+paulomorgado@users.noreply.github.com> | 2020-05-25 13:13:25 +0100 |
|---|---|---|
| committer | Paulo Morgado <470455+paulomorgado@users.noreply.github.com> | 2020-05-26 08:41:41 +0100 |
| commit | 0b9fd5ae84460d943e685b9821473f356a66bd3b (patch) | |
| tree | 404f93e6308fb896f1d1cd06d9988c2e4f96acde /src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName | |
| parent | 2480d0ad4bf4f0dd841697d6d607bb35a0fd8161 (diff) | |
| download | wix-0b9fd5ae84460d943e685b9821473f356a66bd3b.tar.gz wix-0b9fd5ae84460d943e685b9821473f356a66bd3b.tar.bz2 wix-0b9fd5ae84460d943e685b9821473f356a66bd3b.zip | |
Allow more than one harvested file and files differing by extension
add component and directory for more disambiguation
Fix HarvestFile Ouput
added unit tests
Diffstat (limited to 'src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName')
4 files changed, 85 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/HeatFileMultpleFilesSameFileName.wixproj b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/HeatFileMultpleFilesSameFileName.wixproj new file mode 100644 index 00000000..860fc2dd --- /dev/null +++ b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/HeatFileMultpleFilesSameFileName.wixproj | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | </PropertyGroup> | ||
| 7 | |||
| 8 | <PropertyGroup> | ||
| 9 | <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid> | ||
| 10 | </PropertyGroup> | ||
| 11 | |||
| 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
| 13 | <PlatformName>$(Platform)</PlatformName> | ||
| 14 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 15 | <DefineConstants>Debug</DefineConstants> | ||
| 16 | </PropertyGroup> | ||
| 17 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
| 18 | <PlatformName>$(Platform)</PlatformName> | ||
| 19 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 20 | </PropertyGroup> | ||
| 21 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
| 22 | <PlatformName>$(Platform)</PlatformName> | ||
| 23 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 24 | <DefineConstants>Debug</DefineConstants> | ||
| 25 | </PropertyGroup> | ||
| 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
| 27 | <PlatformName>$(Platform)</PlatformName> | ||
| 28 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 29 | </PropertyGroup> | ||
| 30 | |||
| 31 | <ItemGroup> | ||
| 32 | <Compile Include="Package.wxs" /> | ||
| 33 | </ItemGroup> | ||
| 34 | |||
| 35 | <ItemGroup> | ||
| 36 | <BindInputPaths Include="." /> | ||
| 37 | </ItemGroup> | ||
| 38 | |||
| 39 | <PropertyGroup> | ||
| 40 | <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds> | ||
| 41 | </PropertyGroup> | ||
| 42 | |||
| 43 | <ItemGroup> | ||
| 44 | <HarvestFile Include="MyProgram.txt"> | ||
| 45 | <ComponentGroupName>TxtProductComponents</ComponentGroupName> | ||
| 46 | <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> | ||
| 47 | <SuppressRootDirectory>true</SuppressRootDirectory> | ||
| 48 | </HarvestFile> | ||
| 49 | <HarvestFile Include="MyProgram.json"> | ||
| 50 | <ComponentGroupName>JsonProductComponents</ComponentGroupName> | ||
| 51 | <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> | ||
| 52 | <SuppressRootDirectory>true</SuppressRootDirectory> | ||
| 53 | </HarvestFile> | ||
| 54 | </ItemGroup> | ||
| 55 | |||
| 56 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 57 | <Import Project="$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets') " /> | ||
| 58 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 59 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 60 | </Target> | ||
| 61 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.json b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.json new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.json | |||
| @@ -0,0 +1 @@ | |||
| \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.txt b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.txt new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/MyProgram.txt | |||
| @@ -0,0 +1 @@ | |||
| \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/Package.wxs b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/Package.wxs new file mode 100644 index 00000000..884da274 --- /dev/null +++ b/src/test/WixToolsetTest.BuildTasks/TestData/HeatFileMultpleFilesSameFileName/Package.wxs | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 4 | <Product Id="*" Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 5 | <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> | ||
| 6 | |||
| 7 | <MediaTemplate /> | ||
| 8 | |||
| 9 | <Feature Id="ProductFeature" Title="HeatFileFeature"> | ||
| 10 | <ComponentGroupRef Id="TxtProductComponents" /> | ||
| 11 | <ComponentGroupRef Id="JsonProductComponents" /> | ||
| 12 | </Feature> | ||
| 13 | </Product> | ||
| 14 | |||
| 15 | <Fragment> | ||
| 16 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| 17 | <Directory Id="ProgramFilesFolder"> | ||
| 18 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
| 19 | </Directory> | ||
| 20 | </Directory> | ||
| 21 | </Fragment> | ||
| 22 | </Wix> | ||
