diff options
Diffstat (limited to 'src/test')
46 files changed, 0 insertions, 776 deletions
diff --git a/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe b/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe deleted file mode 100644 index 2a4f423f..00000000 --- a/src/test/WixToolsetTest.Util/TestData/.Data/burn.exe +++ /dev/null | |||
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 deleted file mode 100644 index f50a5386..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.en-us.wxl +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="BundleName">~TestBundle</String> | ||
7 | |||
8 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs deleted file mode 100644 index 7fef0725..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <BootstrapperApplication> | ||
4 | <BootstrapperApplicationDll SourceFile="fakeba.dll" /> | ||
5 | </BootstrapperApplication> | ||
6 | |||
7 | <util:RegistrySearchRef Id="RegistrySearchId" /> | ||
8 | <util:RegistrySearchRef Id="RegistrySearchId64" /> | ||
9 | <util:ProductSearchRef Id="ProductSearchId" /> | ||
10 | <util:FileSearchRef Id="FileSearchId" /> | ||
11 | <util:WindowsFeatureSearchRef Id="DetectSHA2SupportId" /> | ||
12 | |||
13 | <Chain> | ||
14 | <MsiPackage SourceFile="test.msi"> | ||
15 | <MsiProperty Name="TEST" Value="1" /> | ||
16 | </MsiPackage> | ||
17 | </Chain> | ||
18 | </Bundle> | ||
19 | |||
20 | <Fragment> | ||
21 | <util:RegistrySearch | ||
22 | Id="RegistrySearchId" | ||
23 | Variable="RegistrySearchVariable" | ||
24 | Root="HKLM" | ||
25 | Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" | ||
26 | Value="Release" | ||
27 | Result="value" /> | ||
28 | </Fragment> | ||
29 | |||
30 | <Fragment> | ||
31 | <util:RegistrySearch | ||
32 | Id="RegistrySearchId64" | ||
33 | Variable="RegistrySearchVariable64" | ||
34 | Root="HKLM" | ||
35 | Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" | ||
36 | Value="Release" | ||
37 | Result="value" | ||
38 | Bitness="always64" /> | ||
39 | </Fragment> | ||
40 | |||
41 | <Fragment> | ||
42 | <util:ProductSearch Id="ProductSearchId" Variable="ProductSearchVariable" UpgradeCode="738D02BF-E231-4370-8209-E9FD4E1BE2A1" Condition="1 & 2 < 3" Result="version" /> | ||
43 | </Fragment> | ||
44 | |||
45 | <Fragment> | ||
46 | <util:FileSearch Id="FileSearchId" Variable="FileSearchVariable" Path="%windir%\System32\mscoree.dll" Result="exists" /> | ||
47 | </Fragment> | ||
48 | |||
49 | <Fragment> | ||
50 | <util:WindowsFeatureSearch Id="DetectSHA2SupportId" Variable="IsSHA2Supported" Feature="sha2CodeSigning" /> | ||
51 | </Fragment> | ||
52 | </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 deleted file mode 100644 index 0e461ba8..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/Shared.dll +++ /dev/null | |||
@@ -1 +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 deleted file mode 100644 index 8b986220..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/MsiPackage/test.txt +++ /dev/null | |||
@@ -1 +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 deleted file mode 100644 index 970efdf0..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/fakeba.dll +++ /dev/null | |||
@@ -1 +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 deleted file mode 100644 index 0722d60e..00000000 --- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/data/test.msi +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs b/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs deleted file mode 100644 index 8e054256..00000000 --- a/src/test/WixToolsetTest.Util/TestData/CloseApplication/Package.wxs +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <ComponentGroupRef Id="ProductComponents" /> | ||
7 | </Feature> | ||
8 | |||
9 | <util:CloseApplication Id="CloseMyApp" CloseMessage="yes" Property="MYAPPISRUNNING" Target="explorer.exe" /> | ||
10 | </Package> | ||
11 | |||
12 | <Fragment> | ||
13 | <StandardDirectory Id="ProgramFilesFolder"> | ||
14 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
15 | </StandardDirectory> | ||
16 | </Fragment> | ||
17 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs deleted file mode 100644 index e27b3c43..00000000 --- a/src/test/WixToolsetTest.Util/TestData/CloseApplication/PackageComponents.wxs +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Source="example.txt" /> | ||
6 | </Component> | ||
7 | </ComponentGroup> | ||
8 | </Fragment> | ||
9 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt b/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/CloseApplication/example.txt +++ /dev/null | |||
@@ -1 +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 deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs b/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs deleted file mode 100644 index daae573a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/EventManifest/Package.wxs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <ComponentGroupRef Id="ProductComponents" /> | ||
7 | </Feature> | ||
8 | </Package> | ||
9 | |||
10 | <Fragment> | ||
11 | <StandardDirectory Id="ProgramFilesFolder"> | ||
12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
13 | </StandardDirectory> | ||
14 | </Fragment> | ||
15 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs deleted file mode 100644 index 2ec8ce82..00000000 --- a/src/test/WixToolsetTest.Util/TestData/EventManifest/PackageComponents.wxs +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Id="Manifest.dll" Source="example.txt"> | ||
6 | <util:EventManifest MessageFile="[Manifest.dll]" ResourceFile="[Manifest.dll]" /> | ||
7 | </File> | ||
8 | </Component> | ||
9 | </ComponentGroup> | ||
10 | </Fragment> | ||
11 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt b/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/EventManifest/example.txt +++ /dev/null | |||
@@ -1 +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 deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.ico b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.ico deleted file mode 100644 index 53134de7..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.ico +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs deleted file mode 100644 index daae573a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/Package.wxs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <ComponentGroupRef Id="ProductComponents" /> | ||
7 | </Feature> | ||
8 | </Package> | ||
9 | |||
10 | <Fragment> | ||
11 | <StandardDirectory Id="ProgramFilesFolder"> | ||
12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
13 | </StandardDirectory> | ||
14 | </Fragment> | ||
15 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs deleted file mode 100644 index 2a1b4347..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/PackageComponents.wxs +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Id="Package.ico" Source="Package.ico" /> | ||
6 | <util:InternetShortcut Type="link" Name="WiX Toolset (link)" Target="https://wixtoolset.org" IconFile="[#Package.ico]" /> | ||
7 | <util:InternetShortcut Type="url" Name="WiX Toolset (url)" Target="https://wixtoolset.org" IconFile="[#Package.ico]" /> | ||
8 | </Component> | ||
9 | </ComponentGroup> | ||
10 | </Fragment> | ||
11 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt b/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcut/example.txt +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | This is example.txt. \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Module.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Module.wxs deleted file mode 100644 index 1355d42e..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Module.wxs +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Module Language="1033" Version="1.0.0.0" Id="InternetShortcutModule" Guid="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <SummaryInformation Manufacturer="Example Corporation" /> | ||
4 | |||
5 | <ComponentGroupRef Id="ProductComponents" /> | ||
6 | </Module> | ||
7 | |||
8 | <Fragment> | ||
9 | <StandardDirectory Id="ProgramFilesFolder"> | ||
10 | <Directory Id="INSTALLFOLDER" Name="MergeModule" /> | ||
11 | </StandardDirectory> | ||
12 | </Fragment> | ||
13 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/ModuleComponents.wxs b/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/ModuleComponents.wxs deleted file mode 100644 index 2a1b4347..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/ModuleComponents.wxs +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Id="Package.ico" Source="Package.ico" /> | ||
6 | <util:InternetShortcut Type="link" Name="WiX Toolset (link)" Target="https://wixtoolset.org" IconFile="[#Package.ico]" /> | ||
7 | <util:InternetShortcut Type="url" Name="WiX Toolset (url)" Target="https://wixtoolset.org" IconFile="[#Package.ico]" /> | ||
8 | </Component> | ||
9 | </ComponentGroup> | ||
10 | </Fragment> | ||
11 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Package.ico b/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Package.ico deleted file mode 100644 index 53134de7..00000000 --- a/src/test/WixToolsetTest.Util/TestData/InternetShortcutModule/Package.ico +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs b/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs deleted file mode 100644 index daae573a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/PermissionEx/Package.wxs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <ComponentGroupRef Id="ProductComponents" /> | ||
7 | </Feature> | ||
8 | </Package> | ||
9 | |||
10 | <Fragment> | ||
11 | <StandardDirectory Id="ProgramFilesFolder"> | ||
12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
13 | </StandardDirectory> | ||
14 | </Fragment> | ||
15 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs deleted file mode 100644 index 0634d7d4..00000000 --- a/src/test/WixToolsetTest.Util/TestData/PermissionEx/PackageComponents.wxs +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Source="example.txt"> | ||
6 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
7 | </File> | ||
8 | <CreateFolder> | ||
9 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
10 | </CreateFolder> | ||
11 | <ServiceInstall Name="testsvc" Type="ownProcess" Start="disabled" ErrorControl="normal"> | ||
12 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
13 | </ServiceInstall> | ||
14 | <RegistryKey Id="ExampleRegistryKey" ForceCreateOnInstall="yes" Root="HKLM" Key="TestRegistryKey"> | ||
15 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
16 | </RegistryKey> | ||
17 | <RegistryValue Root="HKLM" Key="TestRegistryValueKey" Value="abc"> | ||
18 | <util:PermissionEx User="Everyone" GenericAll="yes" /> | ||
19 | </RegistryValue> | ||
20 | </Component> | ||
21 | </ComponentGroup> | ||
22 | </Fragment> | ||
23 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt b/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/PermissionEx/example.txt +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | This is example.txt. \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs b/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs deleted file mode 100644 index abf0dbb4..00000000 --- a/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <util:BroadcastEnvironmentChange /> | ||
6 | <util:CheckRebootRequired /> | ||
7 | <util:QueryWindowsDriverInfo /> | ||
8 | <util:QueryWindowsSuiteInfo /> | ||
9 | |||
10 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
11 | <ComponentGroupRef Id="ProductComponents" /> | ||
12 | </Feature> | ||
13 | </Package> | ||
14 | |||
15 | <Fragment><util:BroadcastSettingChange /> | ||
16 | |||
17 | |||
18 | |||
19 | <StandardDirectory Id="ProgramFilesFolder"> | ||
20 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
21 | </StandardDirectory> | ||
22 | </Fragment> | ||
23 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs deleted file mode 100644 index e27b3c43..00000000 --- a/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Source="example.txt" /> | ||
6 | </Component> | ||
7 | </ComponentGroup> | ||
8 | </Fragment> | ||
9 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/example.txt b/src/test/WixToolsetTest.Util/TestData/Queries/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/Queries/example.txt +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | This is example.txt. \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/Module.wxs b/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/Module.wxs deleted file mode 100644 index 2c2be584..00000000 --- a/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/Module.wxs +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Module Language="1033" Version="1.0.0.0" Id="InternetShortcutModule" Guid="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <SummaryInformation Manufacturer="Example Corporation" /> | ||
4 | |||
5 | <ComponentGroupRef Id="ModuleComponents" /> | ||
6 | </Module> | ||
7 | |||
8 | <Fragment> | ||
9 | <StandardDirectory Id="ProgramFilesFolder"> | ||
10 | <Directory Id="INSTALLFOLDER" Name="MergeModule" /> | ||
11 | </StandardDirectory> | ||
12 | </Fragment> | ||
13 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/ModuleComponents.wxs b/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/ModuleComponents.wxs deleted file mode 100644 index 236d9df0..00000000 --- a/src/test/WixToolsetTest.Util/TestData/RemoveFolderEx/ModuleComponents.wxs +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ModuleComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Source="ModuleComponents.wxs" /> | ||
6 | <util:RemoveFolderEx On="both" Property="RemoveProp" /> | ||
7 | </Component> | ||
8 | </ComponentGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/Module.wxs b/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/Module.wxs deleted file mode 100644 index 32b246f4..00000000 --- a/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/Module.wxs +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Module Language="1033" Version="1.0.0.0" Id="InternetShortcutModule" Guid="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <SummaryInformation Manufacturer="Example Corporation" /> | ||
4 | |||
5 | <ComponentGroupRef Id="ModuleComponents" /> | ||
6 | </Module> | ||
7 | |||
8 | <Fragment> | ||
9 | <StandardDirectory Id="ProgramFilesFolder"> | ||
10 | <Directory Id="INSTALLFOLDER" Name="MergeModule" /> | ||
11 | </StandardDirectory> | ||
12 | </Fragment> | ||
13 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/ModuleComponents.wxs b/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/ModuleComponents.wxs deleted file mode 100644 index 0a0c8cb6..00000000 --- a/src/test/WixToolsetTest.Util/TestData/RemoveRegistryKeyEx/ModuleComponents.wxs +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <ComponentGroup Id="ModuleComponents" Directory="INSTALLFOLDER"> | ||
4 | <Component> | ||
5 | <File Source="ModuleComponents.wxs" /> | ||
6 | <util:RemoveRegistryKey Root="HKLM" Key="SOFTWARE\Example" On="install" /> | ||
7 | </Component> | ||
8 | </ComponentGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs deleted file mode 100644 index daae573a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/Package.wxs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <ComponentGroupRef Id="ProductComponents" /> | ||
7 | </Feature> | ||
8 | </Package> | ||
9 | |||
10 | <Fragment> | ||
11 | <StandardDirectory Id="ProgramFilesFolder"> | ||
12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
13 | </StandardDirectory> | ||
14 | </Fragment> | ||
15 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs deleted file mode 100644 index 7cedbb30..00000000 --- a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/PackageComponents.wxs +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Fragment> | ||
3 | <util:User Id="Everyone" Name="Everyone" /> | ||
4 | |||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
6 | <Component> | ||
7 | <File Source="example.txt" /> | ||
8 | <util:FileShare Id="ExampleFileShare" Description="An example file share" Name="example"> | ||
9 | <util:FileSharePermission User="Everyone" Read="yes" /> | ||
10 | </util:FileShare> | ||
11 | </Component> | ||
12 | </ComponentGroup> | ||
13 | </Fragment> | ||
14 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt b/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/UsingFileShare/example.txt +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | This is example.txt. \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.en-us.wxl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <!-- | ||
2 | This file contains the declaration of all the localizable strings. | ||
3 | --> | ||
4 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
5 | |||
6 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
7 | <String Id="FeatureTitle">MsiPackage</String> | ||
8 | |||
9 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.wxs b/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.wxs deleted file mode 100644 index a2002634..00000000 --- a/src/test/WixToolsetTest.Util/TestData/XmlConfig/Package.wxs +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
4 | |||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
6 | <Component Id="Del" Directory="INSTALLFOLDER" Guid="3613414c-11f5-40fa-a1f1-a0ba722a6895"> | ||
7 | <util:XmlConfig Id="DelElement" File="[INSTALLFOLDER]my.xml" Action="delete" Node="element" VerifyPath="xxx" ElementPath="//root/sub" On="install" Sequence="1" /> | ||
8 | </Component> | ||
9 | </Feature> | ||
10 | </Package> | ||
11 | |||
12 | <Fragment> | ||
13 | <StandardDirectory Id="ProgramFilesFolder"> | ||
14 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
15 | </StandardDirectory> | ||
16 | </Fragment> | ||
17 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/Module.wxs b/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/Module.wxs deleted file mode 100644 index 29e8555b..00000000 --- a/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/Module.wxs +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
2 | <Module Id="XmlConfigModule" Language="1033" Version="1.0.0.0" Guid="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
3 | |||
4 | <Component Id="Parent" Directory="INSTALLFOLDER"> | ||
5 | <File Id="my.xml" Source="my.xml" /> | ||
6 | <util:XmlConfig Id="AddElement" File="[my.xml]" Action="create" Node="element" VerifyPath="xxx" ElementPath="//root/sub" On="install" Sequence="1" /> | ||
7 | </Component> | ||
8 | |||
9 | <Component Id="Child" Directory="INSTALLFOLDER" Guid="4613414c-11f5-40fa-a1f1-a0ba722a6895"> | ||
10 | <util:XmlConfig Id="ChildElement" File="[my.xml]" VerifyPath="xxx" ElementId="AddElement" Sequence="1" /> | ||
11 | </Component> | ||
12 | </Module> | ||
13 | |||
14 | <Fragment> | ||
15 | <StandardDirectory Id="ProgramFilesFolder"> | ||
16 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
17 | </StandardDirectory> | ||
18 | </Fragment> | ||
19 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/my.xml b/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/my.xml deleted file mode 100644 index bad25217..00000000 --- a/src/test/WixToolsetTest.Util/TestData/XmlConfigModule/my.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | This is my.xml file. | ||
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs deleted file mode 100644 index 883f9794..00000000 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ /dev/null | |||
@@ -1,317 +0,0 @@ | |||
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 | namespace WixToolsetTest.Util | ||
4 | { | ||
5 | using System.IO; | ||
6 | using System.Linq; | ||
7 | using WixBuildTools.TestSupport; | ||
8 | using WixToolset.Core.TestPackage; | ||
9 | using WixToolset.Data; | ||
10 | using WixToolset.Data.Symbols; | ||
11 | using WixToolset.Util; | ||
12 | using Xunit; | ||
13 | |||
14 | public class UtilExtensionFixture | ||
15 | { | ||
16 | [Fact] | ||
17 | public void CanBuildUsingFileShare() | ||
18 | { | ||
19 | var folder = TestData.Get(@"TestData\UsingFileShare"); | ||
20 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
21 | |||
22 | var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); | ||
23 | WixAssert.CompareLineByLine(new[] | ||
24 | { | ||
25 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
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 | WixAssert.CompareLineByLine(new[] | ||
45 | { | ||
46 | "Binary:Wix4UtilCA_X64\t[Binary data]", | ||
47 | "CustomAction:Wix4ConfigureSmbInstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbInstall\t", | ||
48 | "CustomAction:Wix4ConfigureSmbUninstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbUninstall\t", | ||
49 | "CustomAction:Wix4CreateSmb_X64\t11265\tWix4UtilCA_X64\tCreateSmb\t", | ||
50 | "CustomAction:Wix4CreateSmbRollback_X64\t11585\tWix4UtilCA_X64\tDropSmb\t", | ||
51 | "CustomAction:Wix4DropSmb_X64\t11265\tWix4UtilCA_X64\tDropSmb\t", | ||
52 | "CustomAction:Wix4DropSmbRollback_X64\t11585\tWix4UtilCA_X64\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(BuildARM64, "Binary", "CustomAction", "Wix4CloseApplication"); | ||
65 | WixAssert.CompareLineByLine(new[] | ||
66 | { | ||
67 | "Binary:Wix4UtilCA_A64\t[Binary data]", | ||
68 | "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t", | ||
69 | "CustomAction:Wix4CloseApplications_A64\t1\tWix4UtilCA_A64\tWixCloseApplications\t", | ||
70 | "CustomAction:Wix4CloseApplicationsDeferred_A64\t3073\tWix4UtilCA_A64\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 CanBuildInternetShortcutInProduct() | ||
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 | WixAssert.CompareLineByLine(new[] | ||
83 | { | ||
84 | "Binary:Wix4UtilCA_X64\t[Binary data]", | ||
85 | "CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64\tWixCreateInternetShortcuts\t", | ||
86 | "CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64\tWixRollbackInternetShortcuts\t", | ||
87 | "CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64\tWixSchedInternetShortcuts\t", | ||
88 | "RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER\t2", | ||
89 | "RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER\t2", | ||
90 | "Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico]\t0", | ||
91 | "Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico]\t0", | ||
92 | }, results.OrderBy(s => s).ToArray()); | ||
93 | } | ||
94 | |||
95 | [Fact] | ||
96 | public void CanBuildInternetShortcutInMergeModule() | ||
97 | { | ||
98 | var folder = TestData.Get(@"TestData\InternetShortcutModule"); | ||
99 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm"); | ||
100 | |||
101 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut"); | ||
102 | WixAssert.CompareLineByLine(new[] | ||
103 | { | ||
104 | "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]", | ||
105 | "CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixCreateInternetShortcuts\t", | ||
106 | "CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRollbackInternetShortcuts\t", | ||
107 | "CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixSchedInternetShortcuts\t", | ||
108 | "RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2", | ||
109 | "RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2", | ||
110 | "Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0", | ||
111 | "Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0", | ||
112 | }, results.OrderBy(s => s).ToArray()); | ||
113 | } | ||
114 | |||
115 | [Fact] | ||
116 | public void CanBuildWithPermissionEx() | ||
117 | { | ||
118 | var folder = TestData.Get(@"TestData\PermissionEx"); | ||
119 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
120 | |||
121 | var results = build.BuildAndQuery(BuildX64, "Wix4SecureObject"); | ||
122 | WixAssert.CompareLineByLine(new[] | ||
123 | { | ||
124 | "Wix4SecureObject:ExampleRegistryKey\tRegistry\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
125 | "Wix4SecureObject:filF5_pLhBuF5b4N9XEo52g_hUM5Lo\tFile\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
126 | "Wix4SecureObject:INSTALLFOLDER\tCreateFolder\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
127 | "Wix4SecureObject:regL6DnQ9yJpDJH5OdcVji4YXsdX2c\tRegistry\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
128 | "Wix4SecureObject:testsvc\tServiceInstall\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
129 | }, results.OrderBy(s => s).ToArray()); | ||
130 | } | ||
131 | |||
132 | [Fact] | ||
133 | public void CanBuildRemoveRegistryKeyExInMergeModule() | ||
134 | { | ||
135 | var folder = TestData.Get(@"TestData", "RemoveRegistryKeyEx"); | ||
136 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm"); | ||
137 | |||
138 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveRegistry", "Wix4RemoveRegistryKeyEx"); | ||
139 | WixAssert.CompareLineByLine(new[] | ||
140 | { | ||
141 | "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]", | ||
142 | "CustomAction:Wix4RemoveRegistryKeysEx_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t65\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRemoveRegistryKeysEx\t", | ||
143 | "Wix4RemoveRegistryKeyEx:rrxfcDhR4HhE3v3rYiQcNtQjyahQNg.047730A5_30FE_4A62_A520_DA9381B8226A\tfilh4juyUVjoUcWWtcQmd5L07FoON4.047730A5_30FE_4A62_A520_DA9381B8226A\t2\tSOFTWARE\\Example\t1\t", | ||
144 | }, results.OrderBy(s => s).ToArray()); | ||
145 | } | ||
146 | |||
147 | [Fact] | ||
148 | public void CanBuildRemoveFolderExInMergeModule() | ||
149 | { | ||
150 | var folder = TestData.Get(@"TestData\RemoveFolderEx"); | ||
151 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm"); | ||
152 | |||
153 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4RemoveFolderEx"); | ||
154 | WixAssert.CompareLineByLine(new[] | ||
155 | { | ||
156 | "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]", | ||
157 | "CustomAction:Wix4RemoveFoldersEx_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t65\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRemoveFoldersEx\t", | ||
158 | "Wix4RemoveFolderEx:wrf5qCm1SE.zp8djrlk78l1IYFXsEw.047730A5_30FE_4A62_A520_DA9381B8226A\tfilh4juyUVjoUcWWtcQmd5L07FoON4.047730A5_30FE_4A62_A520_DA9381B8226A\tRemoveProp.047730A5_30FE_4A62_A520_DA9381B8226A\t3\t", | ||
159 | }, results.OrderBy(s => s).ToArray()); | ||
160 | } | ||
161 | |||
162 | [Fact] | ||
163 | public void CanBuildWithEventManifest() | ||
164 | { | ||
165 | var folder = TestData.Get(@"TestData\EventManifest"); | ||
166 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
167 | |||
168 | var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile"); | ||
169 | WixAssert.CompareLineByLine(new[] | ||
170 | { | ||
171 | "Binary:Wix4UtilCA_A64\t[Binary data]", | ||
172 | "CustomAction:Wix4ConfigureEventManifestRegister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestRegister\t", | ||
173 | "CustomAction:Wix4ConfigureEventManifestUnregister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestUnregister\t", | ||
174 | "CustomAction:Wix4ExecXmlFile_A64\t11265\tWix4UtilCA_A64\tExecXmlFile\t", | ||
175 | "CustomAction:Wix4ExecXmlFileRollback_A64\t11521\tWix4UtilCA_A64\tExecXmlFileRollback\t", | ||
176 | "CustomAction:Wix4RegisterEventManifest_A64\t3073\tWix4UtilCA_A64\tWixQuietExec\t", | ||
177 | "CustomAction:Wix4RollbackRegisterEventManifest_A64\t3393\tWix4UtilCA_A64\tWixQuietExec\t", | ||
178 | "CustomAction:Wix4RollbackUnregisterEventManifest_A64\t3329\tWix4UtilCA_A64\tWixQuietExec\t", | ||
179 | "CustomAction:Wix4SchedXmlFile_A64\t1\tWix4UtilCA_A64\tSchedXmlFile\t", | ||
180 | "CustomAction:Wix4UnregisterEventManifest_A64\t3137\tWix4UtilCA_A64\tWixQuietExec\t", | ||
181 | "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]", | ||
182 | "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
183 | "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
184 | }, results.OrderBy(s => s).ToArray()); | ||
185 | } | ||
186 | |||
187 | [Fact] | ||
188 | public void CanBuildWithQueries() | ||
189 | { | ||
190 | var folder = TestData.Get(@"TestData\Queries"); | ||
191 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
192 | |||
193 | var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction"); | ||
194 | WixAssert.CompareLineByLine(new[] | ||
195 | { | ||
196 | "Binary:Wix4UtilCA_A64\t[Binary data]", | ||
197 | "CustomAction:Wix4BroadcastEnvironmentChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastEnvironmentChange\t", | ||
198 | "CustomAction:Wix4BroadcastSettingChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastSettingChange\t", | ||
199 | "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t", | ||
200 | "CustomAction:Wix4QueryOsDriverInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsDriverInfo\t", | ||
201 | "CustomAction:Wix4QueryOsInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsInfo\t", | ||
202 | }, results.OrderBy(s => s).ToArray()); | ||
203 | } | ||
204 | |||
205 | [Fact] | ||
206 | public void CanBuildWithXmlConfig() | ||
207 | { | ||
208 | var folder = TestData.Get(@"TestData", "XmlConfig"); | ||
209 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
210 | |||
211 | var results = build.BuildAndQuery(BuildX64, "Wix4XmlConfig"); | ||
212 | WixAssert.CompareLineByLine(new[] | ||
213 | { | ||
214 | "Wix4XmlConfig:DelElement\t[INSTALLFOLDER]my.xml\t\t//root/sub\txxx\t\t\t289\tDel\t1", | ||
215 | }, results.OrderBy(s => s).ToArray()); | ||
216 | } | ||
217 | |||
218 | [Fact] | ||
219 | public void CanBuildModuleWithXmlConfig() | ||
220 | { | ||
221 | var folder = TestData.Get(@"TestData", "XmlConfigModule"); | ||
222 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
223 | |||
224 | var results = build.BuildAndQuery(BuildX64, "Wix4XmlConfig"); | ||
225 | WixAssert.CompareLineByLine(new[] | ||
226 | { | ||
227 | "Wix4XmlConfig:AddElement.047730A5_30FE_4A62_A520_DA9381B8226A\t[my.xml.047730A5_30FE_4A62_A520_DA9381B8226A]\t\t//root/sub\txxx\t\t\t273\tParent.047730A5_30FE_4A62_A520_DA9381B8226A\t1", | ||
228 | "Wix4XmlConfig:ChildElement.047730A5_30FE_4A62_A520_DA9381B8226A\t[my.xml.047730A5_30FE_4A62_A520_DA9381B8226A]\tAddElement.047730A5_30FE_4A62_A520_DA9381B8226A\t\txxx\t\t\t0\tChild.047730A5_30FE_4A62_A520_DA9381B8226A\t1", | ||
229 | }, results.OrderBy(s => s).ToArray()); | ||
230 | } | ||
231 | |||
232 | [Fact] | ||
233 | public void CanBuildBundleWithSearches() | ||
234 | { | ||
235 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
236 | var folder = TestData.Get(@"TestData\BundleWithSearches"); | ||
237 | var rootFolder = TestData.Get(); | ||
238 | var wixext = Path.Combine(rootFolder, "WixToolset.Util.wixext.dll"); | ||
239 | |||
240 | using (var fs = new DisposableFileSystem()) | ||
241 | { | ||
242 | var baseFolder = fs.GetFolder(); | ||
243 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
244 | var bundlePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
245 | var baFolderPath = Path.Combine(baseFolder, "ba"); | ||
246 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
247 | |||
248 | var result = WixRunner.Execute(new[] | ||
249 | { | ||
250 | "build", | ||
251 | Path.Combine(folder, "Bundle.wxs"), | ||
252 | "-ext", wixext, | ||
253 | "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), | ||
254 | "-bindpath", Path.Combine(folder, "data"), | ||
255 | "-intermediateFolder", intermediateFolder, | ||
256 | "-o", bundlePath | ||
257 | }); | ||
258 | |||
259 | result.AssertSuccess(); | ||
260 | |||
261 | Assert.True(File.Exists(bundlePath)); | ||
262 | #if TODO | ||
263 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
264 | #endif | ||
265 | |||
266 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
267 | extractResult.AssertSuccess(); | ||
268 | |||
269 | var bundleExtensionDatas = extractResult.SelectBundleExtensionDataNodes("/be:BundleExtensionData/be:BundleExtension[@Id='Wix4UtilBundleExtension_X86']"); | ||
270 | Assert.Equal(1, bundleExtensionDatas.Count); | ||
271 | Assert.Equal("<BundleExtension Id='Wix4UtilBundleExtension_X86'>" + | ||
272 | "<WixWindowsFeatureSearch Id='DetectSHA2SupportId' Type='sha2CodeSigning' />" + | ||
273 | "</BundleExtension>", bundleExtensionDatas[0].GetTestXml()); | ||
274 | |||
275 | var utilSearches = extractResult.SelectManifestNodes("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]"); | ||
276 | Assert.Equal(5, utilSearches.Count); | ||
277 | Assert.Equal("<ExtensionSearch Id='DetectSHA2SupportId' Variable='IsSHA2Supported' " + | ||
278 | "ExtensionId='Wix4UtilBundleExtension_X86' />", utilSearches[0].GetTestXml()); | ||
279 | Assert.Equal("<FileSearch Id='FileSearchId' Variable='FileSearchVariable' " + | ||
280 | $@"Path='%windir%\System32\mscoree.dll' Type='exists' />", utilSearches[1].GetTestXml()); | ||
281 | Assert.Equal("<MsiProductSearch Id='ProductSearchId' Variable='ProductSearchVariable' Condition='1 & 2 < 3' " + | ||
282 | "UpgradeCode='{738D02BF-E231-4370-8209-E9FD4E1BE2A1}' Type='version' />", utilSearches[2].GetTestXml()); | ||
283 | Assert.Equal("<RegistrySearch Id='RegistrySearchId' Variable='RegistrySearchVariable' " + | ||
284 | @"Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' VariableType='string' />", utilSearches[3].GetTestXml()); | ||
285 | Assert.Equal("<RegistrySearch Id='RegistrySearchId64' Variable='RegistrySearchVariable64' " + | ||
286 | @"Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' Win64='yes' VariableType='string' />", utilSearches[4].GetTestXml()); | ||
287 | } | ||
288 | } | ||
289 | |||
290 | private static void Build(string[] args) | ||
291 | { | ||
292 | var result = WixRunner.Execute(args); | ||
293 | result.AssertSuccess(); | ||
294 | } | ||
295 | |||
296 | private static void BuildX64(string[] args) | ||
297 | { | ||
298 | var newArgs = args.ToList(); | ||
299 | newArgs.Add("-platform"); | ||
300 | newArgs.Add("x64"); | ||
301 | newArgs.Add("-sw1072"); | ||
302 | |||
303 | var result = WixRunner.Execute(newArgs.ToArray()); | ||
304 | result.AssertSuccess(); | ||
305 | } | ||
306 | |||
307 | private static void BuildARM64(string[] args) | ||
308 | { | ||
309 | var newArgs = args.ToList(); | ||
310 | newArgs.Add("-platform"); | ||
311 | newArgs.Add("arm64"); | ||
312 | |||
313 | var result = WixRunner.Execute(newArgs.ToArray()); | ||
314 | result.AssertSuccess(); | ||
315 | } | ||
316 | } | ||
317 | } | ||
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj deleted file mode 100644 index e77ecbed..00000000 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
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. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>netcoreapp3.1</TargetFramework> | ||
7 | <IsPackable>false</IsPackable> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <PropertyGroup> | ||
11 | <NoWarn>NU1701</NoWarn> | ||
12 | </PropertyGroup> | ||
13 | |||
14 | <ItemGroup> | ||
15 | <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" /> | ||
16 | </ItemGroup> | ||
17 | |||
18 | <ItemGroup> | ||
19 | <ProjectReference Include="..\..\wixext\WixToolset.Util.wixext.csproj" /> | ||
20 | </ItemGroup> | ||
21 | |||
22 | <ItemGroup> | ||
23 | <PackageReference Include="WixToolset.Core" Version="4.0.*" /> | ||
24 | <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" /> | ||
25 | <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" /> | ||
26 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" /> | ||
27 | </ItemGroup> | ||
28 | |||
29 | <ItemGroup> | ||
30 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" /> | ||
31 | </ItemGroup> | ||
32 | |||
33 | <ItemGroup> | ||
34 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" /> | ||
35 | <PackageReference Include="xunit" Version="2.4.1" /> | ||
36 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> | ||
37 | </ItemGroup> | ||
38 | </Project> | ||
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject deleted file mode 100644 index 7b5b2139..00000000 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | <ProjectConfiguration> | ||
2 | <Settings> | ||
3 | <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace> | ||
4 | </Settings> | ||
5 | </ProjectConfiguration> \ No newline at end of file | ||