diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/dutil.nuspec | 10 | ||||
-rw-r--r-- | src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj | 3 | ||||
-rw-r--r-- | src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp | 72 | ||||
-rw-r--r-- | src/libs/dutil/test/DUtilUnitTest/LocStringsUtilTests.cpp (renamed from src/libs/dutil/test/DUtilUnitTest/LocUtilTests.cpp) | 60 | ||||
-rw-r--r-- | src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec | 10 |
5 files changed, 87 insertions, 68 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/dutil.nuspec b/src/libs/dutil/WixToolset.DUtil/dutil.nuspec index a87da122..5c4634e4 100644 --- a/src/libs/dutil/WixToolset.DUtil/dutil.nuspec +++ b/src/libs/dutil/WixToolset.DUtil/dutil.nuspec | |||
@@ -6,17 +6,19 @@ | |||
6 | <title>$title$</title> | 6 | <title>$title$</title> |
7 | <description>$description$</description> | 7 | <description>$description$</description> |
8 | <authors>$authors$</authors> | 8 | <authors>$authors$</authors> |
9 | <icon>wix.png</icon> | 9 | <icon>icon.png</icon> |
10 | <license type="expression">MS-RL</license> | 10 | <license type="file">OSMFEULA.txt</license> |
11 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | 11 | <requireLicenseAcceptance>true</requireLicenseAcceptance> |
12 | <tags>$packageTags$</tags> | ||
12 | <copyright>$copyright$</copyright> | 13 | <copyright>$copyright$</copyright> |
13 | <projectUrl>$projectUrl$</projectUrl> | 14 | <projectUrl>$projectUrl$</projectUrl> |
14 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | 15 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> |
15 | </metadata> | 16 | </metadata> |
16 | 17 | ||
17 | <files> | 18 | <files> |
19 | <file src="$eulaTxt$" /> | ||
20 | <file src="$iconPng$" /> | ||
18 | <file src="$projectFolder$\build\$id$.props" target="build\" /> | 21 | <file src="$projectFolder$\build\$id$.props" target="build\" /> |
19 | <file src="$projectFolder$\..\..\..\internal\images\wix.png" /> | ||
20 | <file src="$projectFolder$\inc\*" target="build\native\include" /> | 22 | <file src="$projectFolder$\inc\*" target="build\native\include" /> |
21 | <file src="..\..\v143\x64\dutil.lib" target="build\native\v14\x64" /> | 23 | <file src="..\..\v143\x64\dutil.lib" target="build\native\v14\x64" /> |
22 | <file src="..\..\v143\x86\dutil.lib" target="build\native\v14\x86" /> | 24 | <file src="..\..\v143\x86\dutil.lib" target="build\native\v14\x86" /> |
diff --git a/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj b/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj index 94826b8f..fccb73c4 100644 --- a/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj +++ b/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj | |||
@@ -55,7 +55,8 @@ | |||
55 | <ClCompile Include="FileUtilTest.cpp" /> | 55 | <ClCompile Include="FileUtilTest.cpp" /> |
56 | <ClCompile Include="GuidUtilTest.cpp" /> | 56 | <ClCompile Include="GuidUtilTest.cpp" /> |
57 | <ClCompile Include="IniUtilTest.cpp" /> | 57 | <ClCompile Include="IniUtilTest.cpp" /> |
58 | <ClCompile Include="LocUtilTests.cpp" /> | 58 | <ClCompile Include="LocControlsUtilTests.cpp" /> |
59 | <ClCompile Include="LocStringsUtilTests.cpp" /> | ||
59 | <ClCompile Include="MemUtilTest.cpp" /> | 60 | <ClCompile Include="MemUtilTest.cpp" /> |
60 | <ClCompile Include="MonUtilTest.cpp" /> | 61 | <ClCompile Include="MonUtilTest.cpp" /> |
61 | <ClCompile Include="PathUtilTest.cpp" /> | 62 | <ClCompile Include="PathUtilTest.cpp" /> |
diff --git a/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp b/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp new file mode 100644 index 00000000..a558c0c5 --- /dev/null +++ b/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp | |||
@@ -0,0 +1,72 @@ | |||
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 | #include "precomp.h" | ||
4 | |||
5 | using namespace System; | ||
6 | using namespace Xunit; | ||
7 | using namespace WixInternal::TestSupport; | ||
8 | |||
9 | namespace DutilTests | ||
10 | { | ||
11 | public ref class LocControlsUtil | ||
12 | { | ||
13 | public: | ||
14 | [Fact] | ||
15 | void CanLoadControlsWxl() | ||
16 | { | ||
17 | HRESULT hr = S_OK; | ||
18 | WIX_LOCALIZATION* pLoc = NULL; | ||
19 | LOC_CONTROL* pLocControl = NULL; | ||
20 | |||
21 | DutilInitialize(&DutilTestTraceError); | ||
22 | |||
23 | try | ||
24 | { | ||
25 | hr = XmlInitialize(); | ||
26 | NativeAssert::Succeeded(hr, "Failed to initialize Xml."); | ||
27 | |||
28 | pin_ptr<const wchar_t> wxlFilePath = PtrToStringChars(TestData::Get("TestData", "LocUtilTests", "controls.wxl")); | ||
29 | hr = LocLoadFromFile(wxlFilePath, &pLoc); | ||
30 | NativeAssert::Succeeded(hr, "Failed to parse controls.wxl: {0}", wxlFilePath); | ||
31 | |||
32 | Assert::Equal(3ul, pLoc->cLocControls); | ||
33 | |||
34 | hr = LocGetControl(pLoc, L"Control1", &pLocControl); | ||
35 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control1' from: {0}", wxlFilePath); | ||
36 | NativeAssert::StringEqual(L"Control1", pLocControl->wzControl); | ||
37 | NativeAssert::Equal(1, pLocControl->nX); | ||
38 | NativeAssert::Equal(2, pLocControl->nY); | ||
39 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nWidth); | ||
40 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nHeight); | ||
41 | NativeAssert::StringEqual(L"This is control #1", pLocControl->wzText); | ||
42 | |||
43 | hr = LocGetControl(pLoc, L"Control2", &pLocControl); | ||
44 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control2' from: {0}", wxlFilePath); | ||
45 | NativeAssert::StringEqual(L"Control2", pLocControl->wzControl); | ||
46 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nX); | ||
47 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nY); | ||
48 | NativeAssert::Equal(50, pLocControl->nWidth); | ||
49 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nHeight); | ||
50 | NativeAssert::StringEqual(L"This is control #2", pLocControl->wzText); | ||
51 | |||
52 | hr = LocGetControl(pLoc, L"Control3", &pLocControl); | ||
53 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control3' from: {0}", wxlFilePath); | ||
54 | NativeAssert::StringEqual(L"Control3", pLocControl->wzControl); | ||
55 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nX); | ||
56 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nY); | ||
57 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nWidth); | ||
58 | NativeAssert::Equal(150, pLocControl->nHeight); | ||
59 | NativeAssert::StringEqual(L"", pLocControl->wzText); | ||
60 | } | ||
61 | finally | ||
62 | { | ||
63 | if (pLoc) | ||
64 | { | ||
65 | LocFree(pLoc); | ||
66 | } | ||
67 | |||
68 | DutilUninitialize(); | ||
69 | } | ||
70 | } | ||
71 | }; | ||
72 | } | ||
diff --git a/src/libs/dutil/test/DUtilUnitTest/LocUtilTests.cpp b/src/libs/dutil/test/DUtilUnitTest/LocStringsUtilTests.cpp index 0376a340..1bfc4bb4 100644 --- a/src/libs/dutil/test/DUtilUnitTest/LocUtilTests.cpp +++ b/src/libs/dutil/test/DUtilUnitTest/LocStringsUtilTests.cpp | |||
@@ -8,7 +8,7 @@ using namespace WixInternal::TestSupport; | |||
8 | 8 | ||
9 | namespace DutilTests | 9 | namespace DutilTests |
10 | { | 10 | { |
11 | public ref class LocUtil | 11 | public ref class LocStringsUtil |
12 | { | 12 | { |
13 | public: | 13 | public: |
14 | [Fact] | 14 | [Fact] |
@@ -89,63 +89,5 @@ namespace DutilTests | |||
89 | DutilUninitialize(); | 89 | DutilUninitialize(); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | |||
93 | [Fact] | ||
94 | void CanLoadControlsWxl() | ||
95 | { | ||
96 | HRESULT hr = S_OK; | ||
97 | WIX_LOCALIZATION* pLoc = NULL; | ||
98 | LOC_CONTROL* pLocControl = NULL; | ||
99 | |||
100 | DutilInitialize(&DutilTestTraceError); | ||
101 | |||
102 | try | ||
103 | { | ||
104 | hr = XmlInitialize(); | ||
105 | NativeAssert::Succeeded(hr, "Failed to initialize Xml."); | ||
106 | |||
107 | pin_ptr<const wchar_t> wxlFilePath = PtrToStringChars(TestData::Get("TestData", "LocUtilTests", "controls.wxl")); | ||
108 | hr = LocLoadFromFile(wxlFilePath, &pLoc); | ||
109 | NativeAssert::Succeeded(hr, "Failed to parse controls.wxl: {0}", wxlFilePath); | ||
110 | |||
111 | Assert::Equal(3ul, pLoc->cLocControls); | ||
112 | |||
113 | hr = LocGetControl(pLoc, L"Control1", &pLocControl); | ||
114 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control1' from: {0}", wxlFilePath); | ||
115 | NativeAssert::StringEqual(L"Control1", pLocControl->wzControl); | ||
116 | NativeAssert::Equal(1, pLocControl->nX); | ||
117 | NativeAssert::Equal(2, pLocControl->nY); | ||
118 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nWidth); | ||
119 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nHeight); | ||
120 | NativeAssert::StringEqual(L"This is control #1", pLocControl->wzText); | ||
121 | |||
122 | hr = LocGetControl(pLoc, L"Control2", &pLocControl); | ||
123 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control2' from: {0}", wxlFilePath); | ||
124 | NativeAssert::StringEqual(L"Control2", pLocControl->wzControl); | ||
125 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nX); | ||
126 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nY); | ||
127 | NativeAssert::Equal(50, pLocControl->nWidth); | ||
128 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nHeight); | ||
129 | NativeAssert::StringEqual(L"This is control #2", pLocControl->wzText); | ||
130 | |||
131 | hr = LocGetControl(pLoc, L"Control3", &pLocControl); | ||
132 | NativeAssert::Succeeded(hr, "Failed to get loc control 'Control3' from: {0}", wxlFilePath); | ||
133 | NativeAssert::StringEqual(L"Control3", pLocControl->wzControl); | ||
134 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nX); | ||
135 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nY); | ||
136 | NativeAssert::Equal(LOC_CONTROL_NOT_SET, pLocControl->nWidth); | ||
137 | NativeAssert::Equal(150, pLocControl->nHeight); | ||
138 | NativeAssert::StringEqual(L"", pLocControl->wzText); | ||
139 | } | ||
140 | finally | ||
141 | { | ||
142 | if (pLoc) | ||
143 | { | ||
144 | LocFree(pLoc); | ||
145 | } | ||
146 | |||
147 | DutilUninitialize(); | ||
148 | } | ||
149 | } | ||
150 | }; | 92 | }; |
151 | } | 93 | } |
diff --git a/src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec b/src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec index 704dedc2..827a946d 100644 --- a/src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec +++ b/src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec | |||
@@ -6,9 +6,10 @@ | |||
6 | <title>$title$</title> | 6 | <title>$title$</title> |
7 | <description>$description$</description> | 7 | <description>$description$</description> |
8 | <authors>$authors$</authors> | 8 | <authors>$authors$</authors> |
9 | <icon>wix.png</icon> | 9 | <icon>icon.png</icon> |
10 | <license type="expression">MS-RL</license> | 10 | <license type="file">OSMFEULA.txt</license> |
11 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | 11 | <requireLicenseAcceptance>true</requireLicenseAcceptance> |
12 | <tags>$packageTags$</tags> | ||
12 | <copyright>$copyright$</copyright> | 13 | <copyright>$copyright$</copyright> |
13 | <projectUrl>$projectUrl$</projectUrl> | 14 | <projectUrl>$projectUrl$</projectUrl> |
14 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | 15 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> |
@@ -18,8 +19,9 @@ | |||
18 | </metadata> | 19 | </metadata> |
19 | 20 | ||
20 | <files> | 21 | <files> |
22 | <file src="$eulaTxt$" /> | ||
23 | <file src="$iconPng$" /> | ||
21 | <file src="$projectFolder$\build\$id$.props" target="build\" /> | 24 | <file src="$projectFolder$\build\$id$.props" target="build\" /> |
22 | <file src="$projectFolder$\..\..\..\internal\images\wix.png" /> | ||
23 | <file src="$projectFolder$\inc\*" target="build\native\include" /> | 25 | <file src="$projectFolder$\inc\*" target="build\native\include" /> |
24 | <file src="..\..\v143\x64\wcautil.lib" target="build\native\v14\x64" /> | 26 | <file src="..\..\v143\x64\wcautil.lib" target="build\native\v14\x64" /> |
25 | <file src="..\..\v143\x86\wcautil.lib" target="build\native\v14\x86" /> | 27 | <file src="..\..\v143\x86\wcautil.lib" target="build\native\v14\x86" /> |