main
cmd 78 lines 3.06 KB
Raw
1 @setlocal
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\wix\%_C%
14
15 :: Clean
16
17 @if "%_INC%"=="" call :clean
18 @if NOT "%_CLEAN%"=="" goto :end
19
20 @echo Building wix %_C%
21
22 :: Restore
23 msbuild -t:Restore wix.sln -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\wix_restore.binlog || exit /b
24
25
26 :: Build
27 msbuild wixnative\wixnative_t.proj -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\wixnative_build.binlog || exit /b
28
29 msbuild wix.sln -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\wix_build.binlog || exit /b
30
31 msbuild publish_t.proj -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\wix_publish.binlog || exit /b
32
33 msbuild -t:Publish -p:Configuration=%_C% -tl -nologo -warnaserror WixToolset.Sdk\WixToolset.Sdk.csproj -bl:%_L%\wix_sdk_publish.binlog || exit /b
34
35 :: TODO - used by MsbuildFixture.ReportsInnerExceptionForUnexpectedExceptions test
36 :: msbuild -t:Publish -Restore -p:Configuration=%_C% -p:TargetFramework=net472 -p:RuntimeIdentifier=linux-x86 -p:PublishDir=%_P%WixToolset.Sdk\broken\net472\ wix\wix.csproj || exit /b
37
38
39 :: Test
40 dotnet test ^
41 %_B%\test\WixToolsetTest.Converters\net6.0\WixToolsetTest.Converters.dll ^
42 %_B%\test\WixToolsetTest.Converters.Symbolizer\net472\WixToolsetTest.Converters.Symbolizer.dll ^
43 %_B%\test\WixToolsetTest.Core\net6.0\WixToolsetTest.Core.dll ^
44 %_B%\test\WixToolsetTest.Core.Native\net6.0\win-x64\WixToolsetTest.Core.Native.dll ^
45 %_B%\test\WixToolsetTest.CoreIntegration\net6.0\WixToolsetTest.CoreIntegration.dll ^
46 %_B%\test\WixToolsetTest.BuildTasks\net472\WixToolsetTest.BuildTasks.dll ^
47 %_B%\test\WixToolsetTest.Sdk\net472\WixToolsetTest.Sdk.dll ^
48 --nologo -l "trx;LogFileName=%_L%\TestResults\wix.trx" || exit /b
49
50
51 :: Pack
52 msbuild pack_t.proj -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\wix_pack.binlog || exit /b
53
54 @goto :end
55
56 :clean
57 @rd /s/q "..\..\build\wix" 2> nul
58 @del "..\..\build\artifacts\wix.*.nupkg" 2> nul
59 @del "..\..\build\artifacts\WixToolset.BuildTasks.*.nupkg" 2> nul
60 @del "..\..\build\artifacts\WixToolset.Converters.*.nupkg" 2> nul
61 @del "..\..\build\artifacts\WixToolset.Core.*.nupkg" 2> nul
62 @del "..\..\build\artifacts\WixToolset.Sdk.*.nupkg" 2> nul
63 @del "%_L%\TestResults\wix.trx" 2> nul
64 @rd /s/q "%USERPROFILE%\.nuget\packages\wix" 2> nul
65 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.buildtasks" 2> nul
66 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.converters" 2> nul
67 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.converters.symbolizer" 2> nul
68 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.core" 2> nul
69 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.core.burn" 2> nul
70 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.core.native" 2> nul
71 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.core.windowsinstaller" 2> nul
72 @rd /s/q "%USERPROFILE%\.nuget\packages\wixinternal.core.testpackage" 2> nul
73 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.sdk" 2> nul
74 @exit /b
75
76 :end
77 @popd
78 @endlocal