diff options
Diffstat (limited to 'src')
6 files changed, 118 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 76f57676..b5e1ec3d 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | |||
| @@ -206,6 +206,47 @@ namespace WixToolsetTest.CoreIntegration | |||
| 206 | } | 206 | } |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | [Fact(Skip = "Currently fails")] | ||
| 210 | public void CanBuildDialogsInInstallUISequence() | ||
| 211 | { | ||
| 212 | var folder = TestData.Get(@"TestData\DialogsInInstallUISequence"); | ||
| 213 | |||
| 214 | using (var fs = new DisposableFileSystem()) | ||
| 215 | { | ||
| 216 | var baseFolder = fs.GetFolder(); | ||
| 217 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 218 | |||
| 219 | var result = WixRunner.Execute(new[] | ||
| 220 | { | ||
| 221 | "build", | ||
| 222 | Path.Combine(folder, "Package.wxs"), | ||
| 223 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 224 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 225 | "-bindpath", Path.Combine(folder, "data"), | ||
| 226 | "-intermediateFolder", intermediateFolder, | ||
| 227 | "-o", Path.Combine(baseFolder, @"bin\test.msi") | ||
| 228 | }); | ||
| 229 | |||
| 230 | result.AssertSuccess(); | ||
| 231 | |||
| 232 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi"))); | ||
| 233 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
| 234 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\MsiPackage\test.txt"))); | ||
| 235 | |||
| 236 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); | ||
| 237 | var section = intermediate.Sections.Single(); | ||
| 238 | |||
| 239 | var textStyle = section.Tuples.OfType<TextStyleTuple>().Single(); | ||
| 240 | Assert.Equal("Tahoma", textStyle.FaceName); | ||
| 241 | Assert.Equal(8, textStyle.Size); | ||
| 242 | |||
| 243 | var installUIActions = section.Tuples.OfType<WixActionTuple>() | ||
| 244 | .Where(t => t.SequenceTable == SequenceTable.InstallUISequence) | ||
| 245 | .ToList(); | ||
| 246 | Assert.Equal(10, installUIActions.Count); | ||
| 247 | } | ||
| 248 | } | ||
| 249 | |||
| 209 | [Fact] | 250 | [Fact] |
| 210 | public void CanLoadPdbGeneratedByBuild() | 251 | public void CanLoadPdbGeneratedByBuild() |
| 211 | { | 252 | { |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl new file mode 100644 index 00000000..77d46861 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This file contains the declaration of all the localizable strings. | ||
| 5 | --> | ||
| 6 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
| 7 | |||
| 8 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
| 9 | <String Id="FeatureTitle">MsiPackage</String> | ||
| 10 | <String Id="CustomFontName"><!-- NameComment -->Tahoma</String> | ||
| 11 | <String Id="CustomFontSize"><!-- SizeComment -->8</String> | ||
| 12 | |||
| 13 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs new file mode 100644 index 00000000..6da3dcbe --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Product Id="*" Name="MsiPackage" Codepage="1252" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 4 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
| 5 | |||
| 6 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
| 7 | <MediaTemplate /> | ||
| 8 | |||
| 9 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
| 10 | <ComponentGroupRef Id="ProductComponents" /> | ||
| 11 | </Feature> | ||
| 12 | </Product> | ||
| 13 | |||
| 14 | <Fragment> | ||
| 15 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| 16 | <Directory Id="ProgramFilesFolder"> | ||
| 17 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
| 18 | </Directory> | ||
| 19 | </Directory> | ||
| 20 | </Fragment> | ||
| 21 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs new file mode 100644 index 00000000..724c46ed --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <UI Id="CustomDialog"> | ||
| 5 | <!-- TODO: compiler can't handle loc strings for number fields --> | ||
| 6 | <TextStyle Id="CustomFont" FaceName="!(loc.CustomFontName)" Size="!(loc.CustomFontSize)" /> | ||
| 7 | <Dialog Id="FirstDialog" Width="100" Height="100"> | ||
| 8 | <Control Id="Title" Type="Text" X="0" Y="0" Width="90" Height="13" TabSkip="no" Text="FirstDialogTitle" /> | ||
| 9 | </Dialog> | ||
| 10 | <Dialog Id="SecondDialog" Width="100" Height="100"> | ||
| 11 | <Control Id="Title" Type="Text" X="0" Y="0" Width="90" Height="13" TabSkip="no" Text="SecondDialogTitle" /> | ||
| 12 | </Dialog> | ||
| 13 | |||
| 14 | <InstallUISequence> | ||
| 15 | <!-- TODO: overriding this currently causes a duplicate symbol error --> | ||
| 16 | <Show Dialog="SecondDialog" Before="FirstDialog" Overridable="yes">NOT Installed</Show> | ||
| 17 | </InstallUISequence> | ||
| 18 | </UI> | ||
| 19 | </Fragment> | ||
| 20 | <Fragment> | ||
| 21 | <UI Id="CustomUI"> | ||
| 22 | <DialogRef Id="FirstDialog" /> | ||
| 23 | <DialogRef Id="SecondDialog" /> | ||
| 24 | |||
| 25 | <Publish Dialog="FirstDialog" Control="Next" Event="NewDialog" Value="SecondDialog">Installed AND PATCH</Publish> | ||
| 26 | |||
| 27 | <InstallUISequence> | ||
| 28 | <Show Dialog="FirstDialog" Before="SecondDialog">Installed AND PATCH</Show> | ||
| 29 | <Show Dialog="SecondDialog" Before="ExecuteAction">NOT Installed</Show> | ||
| 30 | </InstallUISequence> | ||
| 31 | </UI> | ||
| 32 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
| 33 | <Component> | ||
| 34 | <File Source="test.txt" /> | ||
| 35 | </Component> | ||
| 36 | </ComponentGroup> | ||
| 37 | </Fragment> | ||
| 38 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt new file mode 100644 index 00000000..cd0db0e1 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt | |||
| @@ -0,0 +1 @@ | |||
| This is test.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 53c5ceea..7365f140 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -13,6 +13,10 @@ | |||
| 13 | </PropertyGroup> | 13 | </PropertyGroup> |
| 14 | 14 | ||
| 15 | <ItemGroup> | 15 | <ItemGroup> |
| 16 | <Content Include="TestData\DialogsInInstallUISequence\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
| 17 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 18 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 19 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 16 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 20 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
| 17 | <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 21 | <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
| 18 | <Content Include="TestData\SimpleModule\Module.wxs" CopyToOutputDirectory="PreserveNewest" /> | 22 | <Content Include="TestData\SimpleModule\Module.wxs" CopyToOutputDirectory="PreserveNewest" /> |
