aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs13
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs28
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed/Expected.wxs2
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/Expected.wxs21
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.cabbin0 -> 137 bytes
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.msibin0 -> 32768 bytes
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj3
7 files changed, 66 insertions, 1 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
index 26e1f399..3b193a4a 100644
--- a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
@@ -4663,6 +4663,11 @@ namespace WixToolset.Core.WindowsInstaller
4663 { 4663 {
4664 customAction.Win64 = Wix.YesNoType.yes; 4664 customAction.Win64 = Wix.YesNoType.yes;
4665 } 4665 }
4666 else if (MsiInterop.MsidbCustomActionTypeVBScript == (type & MsiInterop.MsidbCustomActionTypeVBScript) ||
4667 MsiInterop.MsidbCustomActionTypeJScript == (type & MsiInterop.MsidbCustomActionTypeJScript))
4668 {
4669 customAction.Win64 = Wix.YesNoType.no;
4670 }
4666 4671
4667 switch (type & MsiInterop.MsidbCustomActionTypeExecuteBits) 4672 switch (type & MsiInterop.MsidbCustomActionTypeExecuteBits)
4668 { 4673 {
@@ -4903,6 +4908,10 @@ namespace WixToolset.Core.WindowsInstaller
4903 { 4908 {
4904 component.Win64 = Wix.YesNoType.yes; 4909 component.Win64 = Wix.YesNoType.yes;
4905 } 4910 }
4911 else
4912 {
4913 component.Win64 = Wix.YesNoType.no;
4914 }
4906 4915
4907 if (MsiInterop.MsidbComponentAttributesDisableRegistryReflection == (attributes & MsiInterop.MsidbComponentAttributesDisableRegistryReflection)) 4916 if (MsiInterop.MsidbComponentAttributesDisableRegistryReflection == (attributes & MsiInterop.MsidbComponentAttributesDisableRegistryReflection))
4908 { 4917 {
@@ -7810,6 +7819,10 @@ namespace WixToolset.Core.WindowsInstaller
7810 registrySearch.Win64 = Wix.YesNoType.yes; 7819 registrySearch.Win64 = Wix.YesNoType.yes;
7811 type &= ~MsiInterop.MsidbLocatorType64bit; 7820 type &= ~MsiInterop.MsidbLocatorType64bit;
7812 } 7821 }
7822 else
7823 {
7824 registrySearch.Win64 = Wix.YesNoType.no;
7825 }
7813 7826
7814 switch (type) 7827 switch (type)
7815 { 7828 {
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
index 66ce98c0..3a9781df 100644
--- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
@@ -37,5 +37,33 @@ namespace WixToolsetTest.CoreIntegration
37 Assert.Equal(expected, actualFormatted); 37 Assert.Equal(expected, actualFormatted);
38 } 38 }
39 } 39 }
40
41 [Fact]
42 public void CanDecompile64BitSingleFileCompressed()
43 {
44 var folder = TestData.Get(@"TestData\DecompileSingleFileCompressed64");
45
46 using (var fs = new DisposableFileSystem())
47 {
48 var intermediateFolder = fs.GetFolder();
49 var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs");
50
51 var result = WixRunner.Execute(new[]
52 {
53 "decompile",
54 Path.Combine(folder, "example.msi"),
55 "-intermediateFolder", intermediateFolder,
56 "-o", outputPath
57 });
58
59 result.AssertSuccess();
60
61 var actual = File.ReadAllText(outputPath);
62 var actualFormatted = XDocument.Parse(actual, LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
63 var expected = XDocument.Load(Path.Combine(folder, "Expected.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
64
65 Assert.Equal(expected, actualFormatted);
66 }
67 }
40 } 68 }
41} 69}
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed/Expected.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed/Expected.wxs
index b2bb6050..fd6f81ca 100644
--- a/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed/Expected.wxs
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed/Expected.wxs
@@ -5,7 +5,7 @@
5 <Directory Id="TARGETDIR" Name="SourceDir"> 5 <Directory Id="TARGETDIR" Name="SourceDir">
6 <Directory Id="ProgramFilesFolder"> 6 <Directory Id="ProgramFilesFolder">
7 <Directory Id="INSTALLFOLDER" Name="MsiPackage" ShortName="oekcr5lq"> 7 <Directory Id="INSTALLFOLDER" Name="MsiPackage" ShortName="oekcr5lq">
8 <Component Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Guid="{E597A58A-03CB-50D8-93E3-DABA263F233A}"> 8 <Component Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Guid="{E597A58A-03CB-50D8-93E3-DABA263F233A}" Win64="no">
9 <File Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Name="test.txt" KeyPath="yes" Source="SourceDir\File\filcV1yrx0x8wJWj4qMzcH21jwkPko" /> 9 <File Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Name="test.txt" KeyPath="yes" Source="SourceDir\File\filcV1yrx0x8wJWj4qMzcH21jwkPko" />
10 </Component> 10 </Component>
11 </Directory> 11 </Directory>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/Expected.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/Expected.wxs
new file mode 100644
index 00000000..b7f5ad07
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/Expected.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="{C51B773A-B3BE-4F29-A8A9-549AAF7FF6EC}" Codepage="65001" Language="1033" Manufacturer="Example Corporation" Name="MsiPackage" UpgradeCode="{047730A5-30FE-4A62-A520-DA9381B8226A}" Version="1.0.0.0">
4 <Package Compressed="yes" Description="MsiPackage" InstallerVersion="500" Languages="1033" Manufacturer="Example Corporation" Platform="x64" />
5 <Directory Id="TARGETDIR" Name="SourceDir">
6 <Directory Id="ProgramFiles64Folder">
7 <Directory Id="INSTALLFOLDER" Name="MsiPackage" ShortName="oekcr5lq">
8 <Component Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Guid="{E597A58A-03CB-50D8-93E3-DABA263F233A}" Win64="yes">
9 <File Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" Name="test.txt" KeyPath="yes" Source="SourceDir\File\filcV1yrx0x8wJWj4qMzcH21jwkPko" />
10 </Component>
11 </Directory>
12 </Directory>
13 </Directory>
14 <Feature Id="ProductFeature" Level="1" Title="MsiPackage">
15 <ComponentRef Id="filcV1yrx0x8wJWj4qMzcH21jwkPko" />
16 </Feature>
17 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
18 <Media Id="1" Cabinet="example.cab" />
19 <Property Id="ALLUSERS" Value="1" />
20 </Product>
21</Wix> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.cab b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.cab
new file mode 100644
index 00000000..125eeb2c
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.cab
Binary files differ
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.msi b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.msi
new file mode 100644
index 00000000..762b136c
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DecompileSingleFileCompressed64/example.msi
Binary files differ
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
index 7f1337e0..9cea0f4c 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
@@ -23,6 +23,9 @@
23 <Content Include="TestData\DecompileSingleFileCompressed\example.cab" CopyToOutputDirectory="PreserveNewest" /> 23 <Content Include="TestData\DecompileSingleFileCompressed\example.cab" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\DecompileSingleFileCompressed\example.msi" CopyToOutputDirectory="PreserveNewest" /> 24 <Content Include="TestData\DecompileSingleFileCompressed\example.msi" CopyToOutputDirectory="PreserveNewest" />
25 <Content Include="TestData\DecompileSingleFileCompressed\Expected.wxs" CopyToOutputDirectory="PreserveNewest" /> 25 <Content Include="TestData\DecompileSingleFileCompressed\Expected.wxs" CopyToOutputDirectory="PreserveNewest" />
26 <Content Include="TestData\DecompileSingleFileCompressed64\example.cab" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\DecompileSingleFileCompressed64\example.msi" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\DecompileSingleFileCompressed64\Expected.wxs" CopyToOutputDirectory="PreserveNewest" />
26 <Content Include="TestData\ExampleExtension\data\example.txt" CopyToOutputDirectory="PreserveNewest" /> 29 <Content Include="TestData\ExampleExtension\data\example.txt" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\ExampleExtension\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> 30 <Content Include="TestData\ExampleExtension\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\ExampleExtension\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> 31 <Content Include="TestData\ExampleExtension\Package.wxs" CopyToOutputDirectory="PreserveNewest" />