|
1 | 1 | @echo off
|
2 | 2 |
|
3 |
| -REM Metalinker Copyright (C) 2024 Aptivi |
4 |
| -REM |
5 |
| -REM This file is part of Metalinker |
6 |
| -REM |
7 |
| -REM Metalinker is free software: you can redistribute it and/or modify |
8 |
| -REM it under the terms of the GNU General Public License as published by |
9 |
| -REM the Free Software Foundation, either version 3 of the License, or |
10 |
| -REM (at your option) any later version. |
11 |
| -REM |
12 |
| -REM Metalinker is distributed in the hope that it will be useful, |
13 |
| -REM but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
| -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
| -REM GNU General Public License for more details. |
16 |
| -REM |
17 |
| -REM You should have received a copy of the GNU General Public License |
18 |
| -REM along with this program. If not, see <https://www.gnu.org/licenses/>. |
19 |
| - |
20 | 3 | REM This script builds and packs the artifacts. Use when you have VS installed.
|
21 | 4 | set releaseconfig=%1
|
22 | 5 | if "%releaseconfig%" == "" set releaseconfig=Release
|
23 | 6 |
|
| 7 | +set buildoptions=%* |
| 8 | +call set buildoptions=%%buildoptions:*%1=%% |
| 9 | +if "%buildoptions%" == "*=" set buildoptions= |
| 10 | + |
24 | 11 | :download
|
25 | 12 | echo Downloading packages...
|
26 |
| -"%ProgramFiles%\dotnet\dotnet.exe" restore "..\Metalinker.sln" -p:Configuration=%releaseconfig% |
| 13 | +"%ProgramFiles%\dotnet\dotnet.exe" restore "..\Metalinker.sln" -p:Configuration=%releaseconfig% %buildoptions% |
27 | 14 | if %errorlevel% == 0 goto :build
|
28 | 15 | echo There was an error trying to download packages (%errorlevel%).
|
29 | 16 | goto :finished
|
30 | 17 |
|
31 | 18 | :build
|
32 | 19 | echo Building Metalinker...
|
33 |
| -"%ProgramFiles%\dotnet\dotnet.exe" build "..\Metalinker.sln" -p:Configuration=%releaseconfig% |
| 20 | +"%ProgramFiles%\dotnet\dotnet.exe" build "..\Metalinker.sln" -p:Configuration=%releaseconfig% %buildoptions% |
34 | 21 | if %errorlevel% == 0 goto :success
|
35 | 22 | echo There was an error trying to build (%errorlevel%).
|
36 | 23 | goto :finished
|
|
0 commit comments