diff options
author | Bob Arnson <bob@joyofsetup.com> | 2020-03-05 19:48:12 -0500 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2020-03-09 12:16:09 -0400 |
commit | e9d10933bedb8215ec50ca85db272d6647426b31 (patch) | |
tree | 262cbaf190de5d5461941c79923bef8cf4cf7ad1 /src/test | |
parent | 7533ca33de2b8125e9f9ecb3b28a247acca85f83 (diff) | |
download | wix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.gz wix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.bz2 wix-e9d10933bedb8215ec50ca85db272d6647426b31.zip |
Version extension ids.
Partial fix for wixtoolset/issues#5933.
Diffstat (limited to 'src/test')
18 files changed, 326 insertions, 5 deletions
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl | |||
@@ -0,0 +1,11 @@ | |||
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 | |||
11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs new file mode 100644 index 00000000..688ce39d --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs | |||
@@ -0,0 +1,24 @@ | |||
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 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
5 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
6 | |||
7 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
8 | <MediaTemplate /> | ||
9 | |||
10 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
11 | <ComponentGroupRef Id="ProductComponents" /> | ||
12 | </Feature> | ||
13 | |||
14 | <util:CloseApplication Id="CloseMyApp" CloseMessage="yes" Property="MYAPPISRUNNING" Target="explorer.exe" /> | ||
15 | </Product> | ||
16 | |||
17 | <Fragment> | ||
18 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
19 | <Directory Id="ProgramFilesFolder"> | ||
20 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
21 | </Directory> | ||
22 | </Directory> | ||
23 | </Fragment> | ||
24 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs new file mode 100644 index 00000000..4f9e6a9d --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs | |||
@@ -0,0 +1,11 @@ | |||
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 | <Fragment> | ||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
6 | <Component> | ||
7 | <File Source="example.txt" /> | ||
8 | </Component> | ||
9 | </ComponentGroup> | ||
10 | </Fragment> | ||
11 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt b/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.en-us.wxl | |||
@@ -0,0 +1,11 @@ | |||
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 | |||
11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs b/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs new file mode 100644 index 00000000..fc1018ae --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs | |||
@@ -0,0 +1,22 @@ | |||
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 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
5 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
6 | |||
7 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
8 | <MediaTemplate /> | ||
9 | |||
10 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
11 | <ComponentGroupRef Id="ProductComponents" /> | ||
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> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs new file mode 100644 index 00000000..75af3f59 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs | |||
@@ -0,0 +1,13 @@ | |||
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 | <Fragment> | ||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
6 | <Component> | ||
7 | <File Id="Manifest.dll" Source="example.txt"> | ||
8 | <util:EventManifest MessageFile="[Manifest.dll]" ResourceFile="[Manifest.dll]" /> | ||
9 | </File> | ||
10 | </Component> | ||
11 | </ComponentGroup> | ||
12 | </Fragment> | ||
13 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt b/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.en-us.wxl | |||
@@ -0,0 +1,11 @@ | |||
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 | |||
11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs new file mode 100644 index 00000000..fc1018ae --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs | |||
@@ -0,0 +1,22 @@ | |||
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 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
5 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
6 | |||
7 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
8 | <MediaTemplate /> | ||
9 | |||
10 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
11 | <ComponentGroupRef Id="ProductComponents" /> | ||
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> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs new file mode 100644 index 00000000..23b172f8 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs | |||
@@ -0,0 +1,12 @@ | |||
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 | <Fragment> | ||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
6 | <Component> | ||
7 | <File Source="example.txt" /> | ||
8 | <util:InternetShortcut Id="wixshortcut" Name="WiX Toolset" Target="https://wixtoolset.org" /> | ||
9 | </Component> | ||
10 | </ComponentGroup> | ||
11 | </Fragment> | ||
12 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl | |||
@@ -0,0 +1,11 @@ | |||
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 | |||
11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs new file mode 100644 index 00000000..fc1018ae --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs | |||
@@ -0,0 +1,22 @@ | |||
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 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
5 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
6 | |||
7 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
8 | <MediaTemplate /> | ||
9 | |||
10 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
11 | <ComponentGroupRef Id="ProductComponents" /> | ||
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> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs new file mode 100644 index 00000000..22438a2b --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs | |||
@@ -0,0 +1,14 @@ | |||
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 | <Fragment> | ||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
6 | <Component> | ||
7 | <File Source="example.txt" /> | ||
8 | <CreateFolder> | ||
9 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
10 | </CreateFolder> | ||
11 | </Component> | ||
12 | </ComponentGroup> | ||
13 | </Fragment> | ||
14 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt b/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs index f2f06af8..750098d6 100644 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
@@ -19,11 +19,118 @@ namespace WixToolsetTest.Util | |||
19 | var folder = TestData.Get(@"TestData\UsingFileShare"); | 19 | var folder = TestData.Get(@"TestData\UsingFileShare"); |
20 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | 20 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); |
21 | 21 | ||
22 | var results = build.BuildAndQuery(Build, "FileShare", "FileSharePermissions"); | 22 | var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); |
23 | Assert.Equal(new[] | 23 | Assert.Equal(new[] |
24 | { | 24 | { |
25 | "FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER\t\t", | 25 | "Binary:Wix4UtilCA_X86\t[Binary data]", |
26 | "FileSharePermissions:ExampleFileShare\tEveryone\t1", | 26 | "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t", |
27 | "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t", | ||
28 | "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t", | ||
29 | "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t", | ||
30 | "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t", | ||
31 | "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t", | ||
32 | "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER", | ||
33 | "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1", | ||
34 | }, results.OrderBy(s => s).ToArray()); | ||
35 | } | ||
36 | |||
37 | [Fact] | ||
38 | public void CanBuildUsingFileShareX64() | ||
39 | { | ||
40 | var folder = TestData.Get(@"TestData\UsingFileShare"); | ||
41 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
42 | |||
43 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); | ||
44 | Assert.Equal(new[] | ||
45 | { | ||
46 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
47 | "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t", | ||
48 | "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t", | ||
49 | "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t", | ||
50 | "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t", | ||
51 | "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t", | ||
52 | "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t", | ||
53 | "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER", | ||
54 | "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1", | ||
55 | }, results.OrderBy(s => s).ToArray()); | ||
56 | } | ||
57 | |||
58 | [Fact] | ||
59 | public void CanBuildCloseApplication() | ||
60 | { | ||
61 | var folder = TestData.Get(@"TestData\CloseApplication"); | ||
62 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
63 | |||
64 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4CloseApplication"); | ||
65 | Assert.Equal(new[] | ||
66 | { | ||
67 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
68 | "CustomAction:Wix4CheckRebootRequired_X86\t65\tWix4UtilCA_X86\tWixCheckRebootRequired\t", | ||
69 | "CustomAction:Wix4CloseApplications_X86\t1\tWix4UtilCA_X86\tWixCloseApplications\t", | ||
70 | "CustomAction:Wix4CloseApplicationsDeferred_X86\t3073\tWix4UtilCA_X86\tWixCloseApplicationsDeferred\t", | ||
71 | "Wix4CloseApplication:CloseMyApp\texplorer.exe\t\t\t3\t\tMYAPPISRUNNING\t\t", | ||
72 | }, results.OrderBy(s => s).ToArray()); | ||
73 | } | ||
74 | |||
75 | [Fact] | ||
76 | public void CanBuildInternetShortcut() | ||
77 | { | ||
78 | var folder = TestData.Get(@"TestData\InternetShortcut"); | ||
79 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
80 | |||
81 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut"); | ||
82 | Assert.Equal(new[] | ||
83 | { | ||
84 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
85 | "CustomAction:Wix4CreateInternetShortcuts_X86\t3073\tWix4UtilCA_X86\tWixCreateInternetShortcuts\t", | ||
86 | "CustomAction:Wix4RollbackInternetShortcuts_X86\t3329\tWix4UtilCA_X86\tWixRollbackInternetShortcuts\t", | ||
87 | "CustomAction:Wix4SchedInternetShortcuts_X86\t1\tWix4UtilCA_X86\tWixSchedInternetShortcuts\t", | ||
88 | "RemoveFile:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tvtpzs3bw.lnk|WiX Toolset.lnk\tINSTALLFOLDER\t2", | ||
89 | "Wix4InternetShortcut:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tINSTALLFOLDER\tWiX Toolset.lnk\thttps://wixtoolset.org\t0\t\t0", | ||
90 | }, results.OrderBy(s => s).ToArray()); | ||
91 | } | ||
92 | |||
93 | [Fact] | ||
94 | public void CanBuildWithPermissionEx() | ||
95 | { | ||
96 | var folder = TestData.Get(@"TestData\PermissionEx"); | ||
97 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
98 | |||
99 | var results = build.BuildAndQuery(BuildX64, "Binary", "CreateFolder", "CustomAction", "Wix4SecureObject"); | ||
100 | Assert.Equal(new[] | ||
101 | { | ||
102 | "Binary:Wix4UtilCA_X64\t[Binary data]", | ||
103 | "CreateFolder:INSTALLFOLDER\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
104 | "CustomAction:Wix4ExecSecureObjects_X64\t11265\tWix4UtilCA_X64\tExecSecureObjects\t", | ||
105 | "CustomAction:Wix4ExecSecureObjectsRollback_X64\t11521\tWix4UtilCA_X64\tExecSecureObjectsRollback\t", | ||
106 | "CustomAction:Wix4SchedSecureObjects_X64\t1\tWix4UtilCA_X64\tSchedSecureObjects\t", | ||
107 | "CustomAction:Wix4SchedSecureObjectsRollback_X64\t1\tWix4UtilCA_X64\tSchedSecureObjectsRollback\t", | ||
108 | "Wix4SecureObject:INSTALLFOLDER\tCreateFolder\t\tEveryone\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
109 | }, results.OrderBy(s => s).ToArray()); | ||
110 | } | ||
111 | |||
112 | [Fact] | ||
113 | public void CanBuildWithEventManifest() | ||
114 | { | ||
115 | var folder = TestData.Get(@"TestData\EventManifest"); | ||
116 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
117 | |||
118 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile"); | ||
119 | Assert.Equal(new[] | ||
120 | { | ||
121 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
122 | "CustomAction:Wix4ConfigureEventManifestRegister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestRegister\t", | ||
123 | "CustomAction:Wix4ConfigureEventManifestUnregister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestUnregister\t", | ||
124 | "CustomAction:Wix4ExecXmlFile_X86\t11265\tWix4UtilCA_X86\tExecXmlFile\t", | ||
125 | "CustomAction:Wix4ExecXmlFileRollback_X86\t11521\tWix4UtilCA_X86\tExecXmlFileRollback\t", | ||
126 | "CustomAction:Wix4RegisterEventManifest_X86\t3073\tWix4UtilCA_X86\tCAQuietExec\t", | ||
127 | "CustomAction:Wix4RollbackRegisterEventManifest_X86\t3393\tWix4UtilCA_X86\tCAQuietExec\t", | ||
128 | "CustomAction:Wix4RollbackUnregisterEventManifest_X86\t3329\tWix4UtilCA_X86\tCAQuietExec\t", | ||
129 | "CustomAction:Wix4SchedXmlFile_X86\t1\tWix4UtilCA_X86\tSchedXmlFile\t", | ||
130 | "CustomAction:Wix4UnregisterEventManifest_X86\t3137\tWix4UtilCA_X86\tCAQuietExec\t", | ||
131 | "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]", | ||
132 | "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
133 | "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
27 | }, results.OrderBy(s => s).ToArray()); | 134 | }, results.OrderBy(s => s).ToArray()); |
28 | } | 135 | } |
29 | 136 | ||
@@ -93,8 +200,18 @@ namespace WixToolsetTest.Util | |||
93 | 200 | ||
94 | private static void Build(string[] args) | 201 | private static void Build(string[] args) |
95 | { | 202 | { |
96 | var result = WixRunner.Execute(args) | 203 | var result = WixRunner.Execute(args); |
97 | .AssertSuccess(); | 204 | result.AssertSuccess(); |
205 | } | ||
206 | |||
207 | private static void BuildX64(string[] args) | ||
208 | { | ||
209 | var newArgs = args.ToList(); | ||
210 | newArgs.Add("-platform"); | ||
211 | newArgs.Add("x64"); | ||
212 | |||
213 | var result = WixRunner.Execute(newArgs.ToArray()); | ||
214 | result.AssertSuccess(); | ||
98 | } | 215 | } |
99 | } | 216 | } |
100 | } | 217 | } |
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj index 6cf001a2..1635287d 100644 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | |||
@@ -23,6 +23,22 @@ | |||
23 | <Content Include="TestData\UsingFileShare\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\UsingFileShare\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
24 | <Content Include="TestData\UsingFileShare\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\UsingFileShare\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
25 | <Content Include="TestData\UsingFileShare\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\UsingFileShare\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
26 | <Content Include="TestData\CloseApplication\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
27 | <Content Include="TestData\CloseApplication\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
28 | <Content Include="TestData\CloseApplication\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
29 | <Content Include="TestData\CloseApplication\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
30 | <Content Include="TestData\InternetShortcut\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
31 | <Content Include="TestData\InternetShortcut\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
32 | <Content Include="TestData\InternetShortcut\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
33 | <Content Include="TestData\InternetShortcut\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
34 | <Content Include="TestData\PermissionEx\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
35 | <Content Include="TestData\PermissionEx\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
36 | <Content Include="TestData\PermissionEx\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
37 | <Content Include="TestData\PermissionEx\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
38 | <Content Include="TestData\EventManifest\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
39 | <Content Include="TestData\EventManifest\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
40 | <Content Include="TestData\EventManifest\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
41 | <Content Include="TestData\EventManifest\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
26 | </ItemGroup> | 42 | </ItemGroup> |
27 | 43 | ||
28 | <ItemGroup> | 44 | <ItemGroup> |