diff options
author | Bob Arnson <bob@joyofsetup.com> | 2019-10-23 21:25:57 -0400 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2019-10-23 21:36:29 -0400 |
commit | da8727b126a3dc358c9d265c6e183b151ed8ec44 (patch) | |
tree | 47935c153385429aacbcf1aa171d0c6af37ae57c /src | |
parent | c9546f882bde36d5b525f82280a1e09f81c08845 (diff) | |
download | wix-da8727b126a3dc358c9d265c6e183b151ed8ec44.tar.gz wix-da8727b126a3dc358c9d265c6e183b151ed8ec44.tar.bz2 wix-da8727b126a3dc358c9d265c6e183b151ed8ec44.zip |
Use strongly-typed tuple creation...
...especially for tuples shared with WixToolset.Data.
Add bundle tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/FindLocalWix.props | 2 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/.Data/burn.exe | bin | 0 -> 463360 bytes | |||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.en-us.wxl | 10 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs | 35 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/Shared.dll | 1 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/test.txt | 1 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/fakeba.dll | 1 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/test.msi | bin | 0 -> 32768 bytes | |||
-rw-r--r-- | src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | 67 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | 7 | ||||
-rw-r--r-- | src/wixext/UtilCompiler.cs | 104 | ||||
-rw-r--r-- | src/wixlib/packages.config | 2 | ||||
-rw-r--r-- | src/wixlib/util.wixproj | 4 |
13 files changed, 159 insertions, 75 deletions
diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index a784e352..1666e4fe 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props | |||
@@ -3,6 +3,6 @@ | |||
3 | 3 | ||
4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath> | 6 | <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') And Exists('$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath> |
7 | </PropertyGroup> | 7 | </PropertyGroup> |
8 | </Project> | 8 | </Project> |
diff --git a/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe b/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe new file mode 100644 index 00000000..2a4f423f --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.en-us.wxl new file mode 100644 index 00000000..bc1dee83 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.en-us.wxl | |||
@@ -0,0 +1,10 @@ | |||
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="BundleName">~TestBundle</String> | ||
9 | |||
10 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs new file mode 100644 index 00000000..cafd4255 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs | |||
@@ -0,0 +1,35 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
3 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
4 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
5 | <BootstrapperApplication SourceFile="fakeba.dll" /> | ||
6 | |||
7 | <util:RegistrySearchRef Id="RegistrySearchId" /> | ||
8 | <util:ProductSearchRef Id="ProductSearchId" /> | ||
9 | <util:FileSearchRef Id="FileSearchId" /> | ||
10 | |||
11 | <Chain> | ||
12 | <MsiPackage SourceFile="test.msi"> | ||
13 | <MsiProperty Name="TEST" Value="1" /> | ||
14 | </MsiPackage> | ||
15 | </Chain> | ||
16 | </Bundle> | ||
17 | |||
18 | <Fragment> | ||
19 | <util:RegistrySearch | ||
20 | Id="RegistrySearchId" | ||
21 | Variable="RegistrySearchVariable" | ||
22 | Root="HKLM" | ||
23 | Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" | ||
24 | Value="Release" | ||
25 | Result="value" /> | ||
26 | </Fragment> | ||
27 | |||
28 | <Fragment> | ||
29 | <util:ProductSearch Id="ProductSearchId" Variable="ProductSearchVariable" UpgradeCode="738D02BF-E231-4370-8209-E9FD4E1BE2A1" Condition="1 & 2 < 3" Result="version" /> | ||
30 | </Fragment> | ||
31 | |||
32 | <Fragment> | ||
33 | <util:FileSearch Id="FileSearchId" Variable="FileSearchVariable" Path="%windir%\System32\mscoree.dll" Result="exists" /> | ||
34 | </Fragment> | ||
35 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/Shared.dll b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/Shared.dll new file mode 100644 index 00000000..0e461ba8 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/Shared.dll | |||
@@ -0,0 +1 @@ | |||
This is Shared.dll. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/test.txt b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/test.txt new file mode 100644 index 00000000..8b986220 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/test.txt | |||
@@ -0,0 +1 @@ | |||
This is test.txt \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/fakeba.dll b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/fakeba.dll new file mode 100644 index 00000000..970efdf0 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/fakeba.dll | |||
@@ -0,0 +1 @@ | |||
This is a fakeba.dll \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/test.msi b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/test.msi new file mode 100644 index 00000000..0722d60e --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/test.msi | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs index 74cf9769..f2f06af8 100644 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
@@ -2,9 +2,12 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.Util | 3 | namespace WixToolsetTest.Util |
4 | { | 4 | { |
5 | using System.IO; | ||
5 | using System.Linq; | 6 | using System.Linq; |
6 | using WixBuildTools.TestSupport; | 7 | using WixBuildTools.TestSupport; |
7 | using WixToolset.Core.TestPackage; | 8 | using WixToolset.Core.TestPackage; |
9 | using WixToolset.Data; | ||
10 | using WixToolset.Data.Tuples; | ||
8 | using WixToolset.Util; | 11 | using WixToolset.Util; |
9 | using Xunit; | 12 | using Xunit; |
10 | 13 | ||
@@ -24,6 +27,70 @@ namespace WixToolsetTest.Util | |||
24 | }, results.OrderBy(s => s).ToArray()); | 27 | }, results.OrderBy(s => s).ToArray()); |
25 | } | 28 | } |
26 | 29 | ||
30 | [Fact] | ||
31 | public void CanBuildBundleWithSearches() | ||
32 | { | ||
33 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
34 | var folder = TestData.Get(@"TestData\BundleWithSearches"); | ||
35 | var rootFolder = TestData.Get(); | ||
36 | var wixext = Path.Combine(rootFolder, "WixToolset.Util.wixext.dll"); | ||
37 | |||
38 | using (var fs = new DisposableFileSystem()) | ||
39 | { | ||
40 | var baseFolder = fs.GetFolder(); | ||
41 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
42 | |||
43 | var result = WixRunner.Execute(new[] | ||
44 | { | ||
45 | "build", | ||
46 | Path.Combine(folder, "Bundle.wxs"), | ||
47 | "-ext", wixext, | ||
48 | "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), | ||
49 | "-bindpath", Path.Combine(folder, "data"), | ||
50 | "-intermediateFolder", intermediateFolder, | ||
51 | "-burnStub", burnStubPath, | ||
52 | "-o", Path.Combine(baseFolder, @"bin\test.exe") | ||
53 | }); | ||
54 | |||
55 | result.AssertSuccess(); | ||
56 | |||
57 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.exe"))); | ||
58 | #if TODO | ||
59 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
60 | #endif | ||
61 | |||
62 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); | ||
63 | var section = intermediate.Sections.Single(); | ||
64 | |||
65 | var searchTuples = section.Tuples.OfType<WixSearchTuple>().OrderBy(t => t.Id.Id).ToList(); | ||
66 | Assert.Equal(3, searchTuples.Count); | ||
67 | Assert.Equal("FileSearchId", searchTuples[0].Id.Id); | ||
68 | Assert.Equal("FileSearchVariable", searchTuples[0].Variable); | ||
69 | Assert.Equal("ProductSearchId", searchTuples[1].Id.Id); | ||
70 | Assert.Equal("ProductSearchVariable", searchTuples[1].Variable); | ||
71 | Assert.Equal("1 & 2 < 3", searchTuples[1].Condition); | ||
72 | Assert.Equal("RegistrySearchId", searchTuples[2].Id.Id); | ||
73 | Assert.Equal("RegistrySearchVariable", searchTuples[2].Variable); | ||
74 | |||
75 | var fileSearchTuple = section.Tuples.OfType<WixFileSearchTuple>().Single(); | ||
76 | Assert.Equal("FileSearchId", fileSearchTuple.Id.Id); | ||
77 | Assert.Equal(@"%windir%\System32\mscoree.dll", fileSearchTuple.Path); | ||
78 | Assert.Equal(WixFileSearchAttributes.Default | WixFileSearchAttributes.WantExists, fileSearchTuple.Attributes); | ||
79 | |||
80 | var productSearchTuple = section.Tuples.OfType<WixProductSearchTuple>().Single(); | ||
81 | Assert.Equal("ProductSearchId", productSearchTuple.Id.Id); | ||
82 | Assert.Equal("{738D02BF-E231-4370-8209-E9FD4E1BE2A1}", productSearchTuple.Guid); | ||
83 | Assert.Equal(WixProductSearchAttributes.Version | WixProductSearchAttributes.UpgradeCode, productSearchTuple.Attributes); | ||
84 | |||
85 | var registrySearchTuple = section.Tuples.OfType<WixRegistrySearchTuple>().Single(); | ||
86 | Assert.Equal("RegistrySearchId", registrySearchTuple.Id.Id); | ||
87 | Assert.Equal(RegistryRootType.LocalMachine, registrySearchTuple.Root); | ||
88 | Assert.Equal(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full", registrySearchTuple.Key); | ||
89 | Assert.Equal("Release", registrySearchTuple.Value); | ||
90 | Assert.Equal(WixRegistrySearchAttributes.WantValue | WixRegistrySearchAttributes.Raw, registrySearchTuple.Attributes); | ||
91 | } | ||
92 | } | ||
93 | |||
27 | private static void Build(string[] args) | 94 | private static void Build(string[] args) |
28 | { | 95 | { |
29 | var result = WixRunner.Execute(args) | 96 | var result = WixRunner.Execute(args) |
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj index 294844ac..6cf001a2 100644 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | |||
@@ -12,6 +12,13 @@ | |||
12 | </PropertyGroup> | 12 | </PropertyGroup> |
13 | 13 | ||
14 | <ItemGroup> | 14 | <ItemGroup> |
15 | <Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" /> | ||
16 | <Content Include="TestData\BundleWithSearches\data\fakeba.dll" CopyToOutputDirectory="PreserveNewest" /> | ||
17 | <Content Include="TestData\BundleWithSearches\data\MsiPackage\Shared.dll" CopyToOutputDirectory="PreserveNewest" /> | ||
18 | <Content Include="TestData\BundleWithSearches\data\MsiPackage\test.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
19 | <Content Include="TestData\BundleWithSearches\data\test.msi" CopyToOutputDirectory="PreserveNewest" /> | ||
20 | <Content Include="TestData\BundleWithSearches\Bundle.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
21 | <Content Include="TestData\BundleWithSearches\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
15 | <Content Include="TestData\UsingFileShare\example.txt" CopyToOutputDirectory="PreserveNewest" /> | 22 | <Content Include="TestData\UsingFileShare\example.txt" CopyToOutputDirectory="PreserveNewest" /> |
16 | <Content Include="TestData\UsingFileShare\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\UsingFileShare\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
17 | <Content Include="TestData\UsingFileShare\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\UsingFileShare\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index cc51733a..19f4af06 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs | |||
@@ -34,55 +34,12 @@ namespace WixToolset.Util | |||
34 | internal const int UserDontCreateUser = 0x00000200; | 34 | internal const int UserDontCreateUser = 0x00000200; |
35 | internal const int UserNonVital = 0x00000400; | 35 | internal const int UserNonVital = 0x00000400; |
36 | 36 | ||
37 | [Flags] | ||
38 | internal enum WixFileSearchAttributes | ||
39 | { | ||
40 | Default = 0x001, | ||
41 | MinVersionInclusive = 0x002, | ||
42 | MaxVersionInclusive = 0x004, | ||
43 | MinSizeInclusive = 0x008, | ||
44 | MaxSizeInclusive = 0x010, | ||
45 | MinDateInclusive = 0x020, | ||
46 | MaxDateInclusive = 0x040, | ||
47 | WantVersion = 0x080, | ||
48 | WantExists = 0x100, | ||
49 | IsDirectory = 0x200, | ||
50 | } | ||
51 | |||
52 | internal enum WixRegistrySearchFormat | 37 | internal enum WixRegistrySearchFormat |
53 | { | 38 | { |
54 | Raw, | 39 | Raw, |
55 | Compatible, | 40 | Compatible, |
56 | } | 41 | } |
57 | 42 | ||
58 | [Flags] | ||
59 | internal enum WixRegistrySearchAttributes | ||
60 | { | ||
61 | Raw = 0x01, | ||
62 | Compatible = 0x02, | ||
63 | ExpandEnvironmentVariables = 0x04, | ||
64 | WantValue = 0x08, | ||
65 | WantExists = 0x10, | ||
66 | Win64 = 0x20, | ||
67 | } | ||
68 | |||
69 | internal enum WixComponentSearchAttributes | ||
70 | { | ||
71 | KeyPath = 0x1, | ||
72 | State = 0x2, | ||
73 | WantDirectory = 0x4, | ||
74 | } | ||
75 | |||
76 | [Flags] | ||
77 | internal enum WixProductSearchAttributes | ||
78 | { | ||
79 | Version = 0x01, | ||
80 | Language = 0x02, | ||
81 | State = 0x04, | ||
82 | Assignment = 0x08, | ||
83 | UpgradeCode = 0x10, | ||
84 | } | ||
85 | |||
86 | internal enum WixRestartResourceAttributes | 43 | internal enum WixRestartResourceAttributes |
87 | { | 44 | { |
88 | Filename = 1, | 45 | Filename = 1, |
@@ -505,10 +462,12 @@ namespace WixToolset.Util | |||
505 | break; | 462 | break; |
506 | } | 463 | } |
507 | 464 | ||
508 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixComponentSearch", id); | 465 | section.Tuples.Add(new WixComponentSearchTuple(sourceLineNumbers, id) |
509 | row.Set(1, guid); | 466 | { |
510 | row.Set(2, productCode); | 467 | Guid = guid, |
511 | row.Set(3, (int)attributes); | 468 | ProductCode = productCode, |
469 | Attributes = attributes, | ||
470 | }); | ||
512 | } | 471 | } |
513 | } | 472 | } |
514 | 473 | ||
@@ -1087,16 +1046,11 @@ namespace WixToolset.Util | |||
1087 | /// <param name="attributes"></param> | 1046 | /// <param name="attributes"></param> |
1088 | private void CreateWixFileSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string path, WixFileSearchAttributes attributes) | 1047 | private void CreateWixFileSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string path, WixFileSearchAttributes attributes) |
1089 | { | 1048 | { |
1090 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixFileSearch", id); | 1049 | section.Tuples.Add(new WixFileSearchTuple(sourceLineNumbers, id) |
1091 | row.Set(1, path); | 1050 | { |
1092 | //row.Set(2, minVersion; | 1051 | Path = path, |
1093 | //row.Set(3, maxVersion; | 1052 | Attributes = attributes, |
1094 | //row.Set(4, minSize; | 1053 | }); |
1095 | //row.Set(5, maxSize; | ||
1096 | //row.Set(6, minDate; | ||
1097 | //row.Set(7, maxDate; | ||
1098 | //row.Set(8, languages; | ||
1099 | row.Set(9, (int)attributes); | ||
1100 | } | 1054 | } |
1101 | 1055 | ||
1102 | /// <summary> | 1056 | /// <summary> |
@@ -1108,9 +1062,11 @@ namespace WixToolset.Util | |||
1108 | /// <param name="condition">A condition to test before evaluating the search.</param> | 1062 | /// <param name="condition">A condition to test before evaluating the search.</param> |
1109 | private void CreateWixSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string variable, string condition) | 1063 | private void CreateWixSearchRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string variable, string condition) |
1110 | { | 1064 | { |
1111 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixSearch", id); | 1065 | section.Tuples.Add(new WixSearchTuple(sourceLineNumbers, id) |
1112 | row.Set(1, variable); | 1066 | { |
1113 | row.Set(2, condition); | 1067 | Variable = variable, |
1068 | Condition = condition, | ||
1069 | }); | ||
1114 | } | 1070 | } |
1115 | 1071 | ||
1116 | /// <summary> | 1072 | /// <summary> |
@@ -1122,9 +1078,11 @@ namespace WixToolset.Util | |||
1122 | /// <param name="attributes">Further details about the relation between id and parentId.</param> | 1078 | /// <param name="attributes">Further details about the relation between id and parentId.</param> |
1123 | private void CreateWixSearchRelationRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes) | 1079 | private void CreateWixSearchRelationRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes) |
1124 | { | 1080 | { |
1125 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixSearchRelation", id); | 1081 | section.Tuples.Add(new WixSearchRelationTuple(sourceLineNumbers, id) |
1126 | row.Set(1, parentId); | 1082 | { |
1127 | row.Set(2, attributes); | 1083 | ParentSearchRef = parentId, |
1084 | Attributes = attributes, | ||
1085 | }); | ||
1128 | } | 1086 | } |
1129 | 1087 | ||
1130 | /// <summary> | 1088 | /// <summary> |
@@ -2680,9 +2638,11 @@ namespace WixToolset.Util | |||
2680 | attributes |= WixProductSearchAttributes.UpgradeCode; | 2638 | attributes |= WixProductSearchAttributes.UpgradeCode; |
2681 | } | 2639 | } |
2682 | 2640 | ||
2683 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixProductSearch", id); | 2641 | section.Tuples.Add(new WixProductSearchTuple(sourceLineNumbers, id) |
2684 | row.Set(1, productCode ?? upgradeCode); | 2642 | { |
2685 | row.Set(2, (int)attributes); | 2643 | Guid = productCode ?? upgradeCode, |
2644 | Attributes = attributes, | ||
2645 | }); | ||
2686 | } | 2646 | } |
2687 | } | 2647 | } |
2688 | 2648 | ||
@@ -2836,11 +2796,13 @@ namespace WixToolset.Util | |||
2836 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); | 2796 | this.CreateWixSearchRelationRow(section, sourceLineNumbers, id, after, 2); |
2837 | } | 2797 | } |
2838 | 2798 | ||
2839 | var row = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "WixRegistrySearch", id); | 2799 | section.Tuples.Add(new WixRegistrySearchTuple(sourceLineNumbers, id) |
2840 | row.Set(1, (int)root); | 2800 | { |
2841 | row.Set(2, key); | 2801 | Root = (RegistryRootType)root, |
2842 | row.Set(3, value); | 2802 | Key = key, |
2843 | row.Set(4, (int)attributes); | 2803 | Value = value, |
2804 | Attributes = attributes, | ||
2805 | }); | ||
2844 | } | 2806 | } |
2845 | } | 2807 | } |
2846 | 2808 | ||
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 251c740a..ba4482d2 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> |
4 | <package id="WixToolset.MSBuild" version="4.0.0-build-0043" developmentDependency="true" targetFramework="net40" /> | 4 | <package id="WixToolset.MSBuild" version="4.0.0-build-0048" developmentDependency="true" targetFramework="net40" /> |
5 | </packages> \ No newline at end of file | 5 | </packages> \ No newline at end of file |
diff --git a/src/wixlib/util.wixproj b/src/wixlib/util.wixproj index 3af40366..cc68d92c 100644 --- a/src/wixlib/util.wixproj +++ b/src/wixlib/util.wixproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- 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 | <!-- 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. --> |
3 | <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> | 3 | <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> |
4 | <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props')" /> | 4 | <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0048\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0048\build\WixToolset.MSBuild.props')" /> |
5 | <Import Project="..\FindLocalWix.props" /> | 5 | <Import Project="..\FindLocalWix.props" /> |
6 | <PropertyGroup> | 6 | <PropertyGroup> |
7 | <ProjectGuid>{1ACFFEFD-505A-41A5-ACBF-A02B7B473AA2}</ProjectGuid> | 7 | <ProjectGuid>{1ACFFEFD-505A-41A5-ACBF-A02B7B473AA2}</ProjectGuid> |
@@ -46,7 +46,7 @@ | |||
46 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 46 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
47 | </PropertyGroup> | 47 | </PropertyGroup> |
48 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 48 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
49 | <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props'))" /> | 49 | <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0048\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0048\build\WixToolset.MSBuild.props'))" /> |
50 | </Target> | 50 | </Target> |
51 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> | 51 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> |
52 | </Project> | 52 | </Project> |