Modernize Util.wixext build
Rob Mensching committed
Oct 4, 2022 at 05:29 UTC
d76532b128e4e187fd9ac5e1d018638dcf8876ec
4 files changed
+36
-6
src/ext/Util/be/utilbe.v3.ncrunchproject
new
+5
@@ -0,0 +1,5 @@
1
+<ProjectConfiguration>
2
+ <Settings>
3
+ <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
4
+ </Settings>
5
+</ProjectConfiguration>
\ No newline at end of file
src/ext/Util/util.cmd
+24
-1
@@ -2,20 +2,43 @@
2
@pushd %~dp0
3
4
@set _C=Debug
5
+@set _L=%~dp0..\..\..\build\logs
6
+
7
:parse_args
8
@if /i "%1"=="release" set _C=Release
9
+@if /i "%1"=="inc" set _INC=1
10
+@if /i "%1"=="clean" set _CLEAN=1
11
@if not "%1"=="" shift & goto parse_args
12
13
+@set _B=%~dp0..\..\..\build\Util.wixext\%_C%
14
+
15
+:: Clean
16
+
17
+@if "%_INC%"=="" call :clean
18
+@if NOT "%_CLEAN%"=="" goto :end
19
+
20
@echo Building ext\Util %_C% using %_N%
21
22
:: Build
23
msbuild -Restore -p:Configuration=%_C% || exit /b
24
25
:: Test
15
-dotnet test -c %_C% --no-build test\WixToolsetTest.Util || exit /b
26
+dotnet test ^
27
+ %_B%\net6.0\WixToolsetTest.Util.dll ^
28
+ --nologo -l "trx;LogFileName=%_L%\TestResults\util.wixext.trx" || exit /b
29
30
:: Pack
31
msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true wixext\WixToolset.Util.wixext.csproj || exit /b
32
33
+@goto :end
34
+
35
+:clean
36
+@rd /s/q "..\..\build\Util.wixext" 2> nul
37
+@del "..\..\build\artifacts\WixToolset.Util.wixext.*.nupkg" 2> nul
38
+@del "%_L%\TestResults\util.wixext.trx" 2> nul
39
+@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.util.wixext" 2> nul
40
+@exit /b
41
+
42
+:end
43
@popd
44
@endlocal
src/ext/Util/wixext/WixToolset.Util.wixext.csproj
+6
-5
@@ -11,11 +11,12 @@
11
</PropertyGroup>
12
13
<ItemGroup>
14
- <EmbeddedResource Include="$(OutputPath)..\util.wixlib" />
15
- </ItemGroup>
16
-
17
- <ItemGroup Condition=" '$(NCrunch)'=='' ">
18
- <ProjectReference Include="..\wixlib\util.wixproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
14
+ <ProjectReference Include="..\wixlib\util.wixproj"
15
+ OutputItemType="EmbeddedResource"
16
+ ReferenceOutputAssembly="false"
17
+ SkipGetTargetFrameworkProperties="true"
18
+ />
19
+ <EmbeddedResource Include="$(OutputPath)..\util.wixlib" Condition=" '$(NCrunch)'=='1' " />
20
</ItemGroup>
21
22
<ItemGroup>
src/testresultfilelist.txt
+1
@@ -8,5 +8,6 @@ build/logs/TestResults/WixToolsetTest.Bal.trx
8
build/logs/TestResults/WixToolsetTest.BurnE2E.trx
9
build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx
10
build/logs/TestResults/WixToolsetTest.ManagedHost.trx
11
+build/logs/TestResults/util.wixext.trx
12
build/logs/TestResults/WixToolsetTest.MsiE2E.trx
13
build/logs/TestResults/WixToolsetTest.WixE2ETests.trx
\ No newline at end of file