diff options
Diffstat (limited to 'src/ext/Bal/bal.cmd')
-rw-r--r-- | src/ext/Bal/bal.cmd | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index f3028d58..eebef70f 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd | |||
@@ -3,35 +3,56 @@ | |||
3 | 3 | ||
4 | @set _C=Debug | 4 | @set _C=Debug |
5 | @set _L=%~dp0..\..\..\build\logs | 5 | @set _L=%~dp0..\..\..\build\logs |
6 | |||
6 | :parse_args | 7 | :parse_args |
7 | @if /i "%1"=="release" set _C=Release | 8 | @if /i "%1"=="release" set _C=Release |
9 | @if /i "%1"=="inc" set _INC=1 | ||
10 | @if /i "%1"=="clean" set _CLEAN=1 | ||
8 | @if not "%1"=="" shift & goto parse_args | 11 | @if not "%1"=="" shift & goto parse_args |
9 | 12 | ||
13 | @set _B=%~dp0..\..\..\build\Bal.wixext\%_C% | ||
14 | |||
15 | :: Clean | ||
16 | |||
17 | @if "%_INC%"=="" call :clean | ||
18 | @if NOT "%_CLEAN%"=="" goto :end | ||
19 | |||
10 | @echo Building ext\Bal %_C% using %_N% | 20 | @echo Building ext\Bal %_C% using %_N% |
11 | 21 | ||
12 | :: Restore | 22 | :: Restore |
13 | nuget restore dnchost\packages.config || exit /b | 23 | nuget restore dnchost\packages.config || exit /b |
14 | msbuild -t:Restore -p:Configuration=%_C% || exit /b | ||
15 | 24 | ||
16 | :: Build | 25 | :: Build |
17 | msbuild -p:Configuration=%_C%;Platform=x86 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | 26 | msbuild -Restore -p:Configuration=%_C% -bl:%_L%\ext_bal_build.binlog || exit /b |
18 | msbuild -p:Configuration=%_C%;Platform=x64 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | ||
19 | msbuild -p:Configuration=%_C%;Platform=ARM64 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | ||
20 | |||
21 | msbuild -p:Configuration=%_C% -bl:%_L%\bal_build.binlog || exit /b | ||
22 | |||
23 | dotnet test test\WixToolsetTest.Dnc.HostGenerator -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Dnc.HostGenerator.trx" || exit /b | ||
24 | 27 | ||
25 | msbuild -Restore -p:Configuration=%_C% test\examples\examples.proj -bl:%_L%\bal_examples_build.binlog || exit /b | 28 | msbuild -Restore -p:Configuration=%_C% test\examples\examples.proj -m -bl:%_L%\bal_examples_build.binlog || exit /b |
26 | 29 | ||
27 | :: Test | 30 | :: Test |
28 | dotnet test test\WixToolsetTest.Bal -c %_C% --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Bal.trx" || exit /b | 31 | dotnet test ^ |
29 | dotnet test test\WixToolsetTest.ManagedHost -c %_C% --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.ManagedHost.trx" || exit /b | 32 | %_B%\net6.0\WixToolsetTest.Dnc.HostGenerator.dll ^ |
33 | %_B%\net6.0\WixToolsetTest.Bal.dll ^ | ||
34 | %_B%\net6.0\WixToolsetTest.ManagedHost.dll ^ | ||
35 | --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b | ||
30 | 36 | ||
31 | :: Pack | 37 | :: Pack |
32 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true wixext\WixToolset.Bal.wixext.csproj || exit /b | 38 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true wixext\WixToolset.Bal.wixext.csproj || exit /b |
33 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj || exit /b | 39 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj || exit /b |
34 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true WixToolset.Mba.Host\WixToolset.Mba.Host.csproj || exit /b | 40 | msbuild -t:Pack -p:Configuration=%_C% -p:NoBuild=true WixToolset.Mba.Host\WixToolset.Mba.Host.csproj || exit /b |
35 | 41 | ||
42 | @goto :end | ||
43 | |||
44 | :clean | ||
45 | @rd /s/q "..\..\..\build\Bal.wixext" 2> nul | ||
46 | @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul | ||
47 | @del "..\..\..\build\artifacts\WixToolset.Dnc.HostGenerator.*.nupkg" 2> nul | ||
48 | @del "..\..\..\build\artifacts\WixToolset.Mba.Host.*.nupkg" 2> nul | ||
49 | @del "%_L%\ext_bal_build.binlog" 2> nul | ||
50 | @del "%_L%\TestResults\bal.wixext.trx" 2> nul | ||
51 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul | ||
52 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.dnc.hostgenerator" 2> nul | ||
53 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.mba.host" 2> nul | ||
54 | @exit /b | ||
55 | |||
56 | :end | ||
36 | @popd | 57 | @popd |
37 | @endlocal | 58 | @endlocal |