-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathBuild_win-x64.bat
34 lines (28 loc) · 1.19 KB
/
Build_win-x64.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo off
dotnet restore WinForms\WinForms.csproj --locked-mode
if %ERRORLEVEL% neq 0 (
echo Restore failed with error code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
dotnet clean -maxCpuCount WinForms\WinForms.csproj
if %ERRORLEVEL% neq 0 (
echo Cleaning failed with error code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
dotnet publish -maxCpuCount WinForms\WinForms.csproj /p:DebugType=None /p:DebugSymbols=False /p:Configuration=Release /p:Platform=x64 /p:EnableCompressionInSingleFile=true /p:CopyOutputSymbolsToPublishDirectory=false /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false /p:SelfContained=true /p:PublishSingleFile=true /p:PublishReadyToRun=true /p:TargetFramework=net8.0-windows /p:RuntimeIdentifier=win-x64 /p:PublishDir=%CD%\bin
if %ERRORLEVEL% neq 0 (
echo Publishing failed with error code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
move bin\Drill.exe bin\Drill_win-x64.exe
if %ERRORLEVEL% neq 0 (
echo Moving file failed with error code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
dir bin\Drill_win-x64.exe
if %ERRORLEVEL% neq 0 (
echo Directory listing failed with error code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
echo Script completed successfully.
exit /b 0