-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.bat
More file actions
43 lines (34 loc) · 892 Bytes
/
compile.bat
File metadata and controls
43 lines (34 loc) · 892 Bytes
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
35
36
37
38
39
40
41
42
43
@echo off
cls
echo --- ImgConverter Compiler ---
echo.
echo [1] Cleaning project...
dotnet clean -c Release
if %errorlevel% neq 0 (
echo.
echo !!! ERROR: Failed to clean the project. Check your .csproj file.
goto end
)
echo.
echo [2] Publishing to a single EXE file...
echo (This may take a moment)
echo.
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
if %errorlevel% neq 0 (
echo.
echo !!! ERROR: Publish failed. Make sure the .NET SDK is installed correctly.
goto end
)
echo.
echo --- BUILD SUCCEEDED ---
echo.
set "output_folder=%cd%\bin\Release\net8.0-windows\win-x64\publish"
echo The final ImageConverter.exe is located at:
echo %output_folder%
echo.
echo Opening the folder for you...
explorer "%output_folder%"
:end
echo.
echo Press any key to exit...
pause > nul