diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-12-01 23:02:05 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-12-01 23:02:05 -0600 |
| commit | 5d0434843c6f307a46fa95139c1e754221cc13af (patch) | |
| tree | 559f1714b14c08fa09449b62770c9107fae968c3 /src/TestData/Templates | |
| parent | 86456524fe4640053616f6fc18311159e6fafea5 (diff) | |
| download | wix-5d0434843c6f307a46fa95139c1e754221cc13af.tar.gz wix-5d0434843c6f307a46fa95139c1e754221cc13af.tar.bz2 wix-5d0434843c6f307a46fa95139c1e754221cc13af.zip | |
Add MSI transaction tests.
Diffstat (limited to 'src/TestData/Templates')
| -rw-r--r-- | src/TestData/Templates/Package.wxs | 52 | ||||
| -rw-r--r-- | src/TestData/Templates/PackageFail.wxs | 55 |
2 files changed, 107 insertions, 0 deletions
diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs new file mode 100644 index 00000000..813e03d0 --- /dev/null +++ b/src/TestData/Templates/Package.wxs | |||
| @@ -0,0 +1,52 @@ | |||
| 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 | |||
| 4 | |||
| 5 | <?ifndef Version?> | ||
| 6 | <?define Version = 1.0.0.0?> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 10 | <Package Name="~$(var.TestGroupName) - $(var.PackageName)" Language="1033" Version="$(var.Version)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)" Compressed="yes"> | ||
| 11 | |||
| 12 | |||
| 13 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | ||
| 14 | <MediaTemplate EmbedCab="yes" /> | ||
| 15 | |||
| 16 | <Property Id="MsiLogging" Value="voicewarmup" /> | ||
| 17 | <PropertyRef Id="TestVersion" /> | ||
| 18 | |||
| 19 | <Feature Id="Complete" Level="1"> | ||
| 20 | <ComponentRef Id="FileComponent" /> | ||
| 21 | <ComponentRef Id="RegistryComponent" /> | ||
| 22 | </Feature> | ||
| 23 | </Package> | ||
| 24 | |||
| 25 | <Fragment> | ||
| 26 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| 27 | <Directory Id="ProgramFilesFolder"> | ||
| 28 | <Directory Id="WixDir" Name="~Test WiX"> | ||
| 29 | <Directory Id="TestDir" Name="$(var.TestGroupName)"> | ||
| 30 | <Directory Id="INSTALLFOLDER" Name="$(var.PackageName)" /> | ||
| 31 | </Directory> | ||
| 32 | </Directory> | ||
| 33 | </Directory> | ||
| 34 | </Directory> | ||
| 35 | </Fragment> | ||
| 36 | |||
| 37 | <Fragment> | ||
| 38 | <Component Id="FileComponent" Directory="INSTALLFOLDER"> | ||
| 39 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 40 | </Component> | ||
| 41 | </Fragment> | ||
| 42 | |||
| 43 | <Fragment> | ||
| 44 | <Component Id="RegistryComponent" Directory="INSTALLFOLDER"> | ||
| 45 | <RegistryValue Root="HKLM" Key="Software\WiX\Tests\$(var.TestGroupName)" Name="$(var.PackageName)" Value="!(bind.Property.TestVersion)" Type="string" /> | ||
| 46 | </Component> | ||
| 47 | </Fragment> | ||
| 48 | |||
| 49 | <Fragment> | ||
| 50 | <Property Id="TestVersion" Value="$(var.Version)" /> | ||
| 51 | </Fragment> | ||
| 52 | </Wix> | ||
diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs new file mode 100644 index 00000000..8754d3f6 --- /dev/null +++ b/src/TestData/Templates/PackageFail.wxs | |||
| @@ -0,0 +1,55 @@ | |||
| 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 | |||
| 4 | |||
| 5 | <?ifndef Version?> | ||
| 6 | <?define Version = 1.0.0.0?> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 10 | <Package Name="~$(var.TestGroupName) - $(var.PackageName)" Language="1033" Version="$(var.Version)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)" Compressed="yes"> | ||
| 11 | |||
| 12 | |||
| 13 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | ||
| 14 | <MediaTemplate EmbedCab="yes" /> | ||
| 15 | |||
| 16 | <Property Id="MsiLogging" Value="voicewarmup" /> | ||
| 17 | <PropertyRef Id="TestVersion" /> | ||
| 18 | |||
| 19 | <Feature Id="Complete" Level="1"> | ||
| 20 | <ComponentRef Id="FileComponent" /> | ||
| 21 | <ComponentRef Id="RegistryComponent" /> | ||
| 22 | </Feature> | ||
| 23 | |||
| 24 | <util:FailWhenDeferred /> | ||
| 25 | <Property Id="WIXFAILWHENDEFERRED" Value="1" /> | ||
| 26 | </Package> | ||
| 27 | |||
| 28 | <Fragment> | ||
| 29 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| 30 | <Directory Id="ProgramFilesFolder"> | ||
| 31 | <Directory Id="WixDir" Name="~Test WiX"> | ||
| 32 | <Directory Id="TestDir" Name="$(var.TestGroupName)"> | ||
| 33 | <Directory Id="INSTALLFOLDER" Name="$(var.PackageName)" /> | ||
| 34 | </Directory> | ||
| 35 | </Directory> | ||
| 36 | </Directory> | ||
| 37 | </Directory> | ||
| 38 | </Fragment> | ||
| 39 | |||
| 40 | <Fragment> | ||
| 41 | <Component Id="FileComponent" Directory="INSTALLFOLDER"> | ||
| 42 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 43 | </Component> | ||
| 44 | </Fragment> | ||
| 45 | |||
| 46 | <Fragment> | ||
| 47 | <Component Id="RegistryComponent" Directory="INSTALLFOLDER"> | ||
| 48 | <RegistryValue Root="HKLM" Key="Software\WiX\Tests\$(var.TestGroupName)" Name="$(var.PackageName)" Value="!(bind.Property.TestVersion)" Type="string" /> | ||
| 49 | </Component> | ||
| 50 | </Fragment> | ||
| 51 | |||
| 52 | <Fragment> | ||
| 53 | <Property Id="TestVersion" Value="$(var.Version)" /> | ||
| 54 | </Fragment> | ||
| 55 | </Wix> | ||
