| 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 | :: Clean |
| 14 | |
| 15 | @if "%_INC%"=="" call :clean |
| 16 | @if NOT "%_CLEAN%"=="" goto :end |
| 17 | |
| 18 | @echo Building setup %_C% |
| 19 | |
| 20 | :: Build |
| 21 | msbuild -Restore MetadataTask\MetadataTask.csproj -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\setup_task.binlog || exit /b |
| 22 | |
| 23 | msbuild -Restore setup.sln -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\setup_build.binlog || exit /b |
| 24 | |
| 25 | :: Publish |
| 26 | |
| 27 | |
| 28 | :: Test |
| 29 | |
| 30 | |
| 31 | :: Pack |
| 32 | |
| 33 | |
| 34 | @goto :end |
| 35 | |
| 36 | :clean |
| 37 | @rd /s/q "..\..\build\setup" 2> nul |
| 38 | @del "..\..\build\artifacts\wix-cli-x64.*" 2> nul |
| 39 | @del "..\..\build\artifacts\WixAdditionalTools.*" 2> nul |
| 40 | @del "..\..\build\logs\pdbs\%_C%\wix-cli-x64.*" 2> nul |
| 41 | @del "..\..\build\logs\pdbs\%_C%\WixAdditionalTools.*" 2> nul |
| 42 | @exit /b |
| 43 | |
| 44 | :end |
| 45 | @popd |
| 46 | @endlocal |