-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
69 lines (59 loc) · 1.6 KB
/
build.bat
File metadata and controls
69 lines (59 loc) · 1.6 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
REM Build script for Always On Top Manager
REM This script compiles the application into a single executable
echo ========================================
echo Always On Top Manager - Build Script
echo ========================================
echo.
REM Check if .NET SDK is installed
dotnet --version >nul 2>&1
if errorlevel 1 (
echo ERROR: .NET SDK not found!
echo Please install .NET 8.0 SDK from: https://dotnet.microsoft.com/download
echo.
pause
exit /b 1
)
echo [1/4] Checking .NET SDK version...
dotnet --version
echo.
echo [2/4] Restoring NuGet packages...
dotnet restore
if errorlevel 1 (
echo ERROR: Failed to restore packages
pause
exit /b 1
)
echo.
echo [3/4] Building Release configuration...
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
if errorlevel 1 (
echo ERROR: Build failed
pause
exit /b 1
)
echo.
echo [4/4] Locating output...
set OUTPUT_PATH=bin\Release\net8.0-windows\win-x64\publish\AlwaysOnTop.exe
if exist "%OUTPUT_PATH%" (
echo ========================================
echo BUILD SUCCESSFUL!
echo ========================================
echo.
echo Executable location:
echo %cd%\%OUTPUT_PATH%
echo.
REM Get file size
for %%I in ("%OUTPUT_PATH%") do set SIZE=%%~zI
set /a SIZE_MB=%SIZE% / 1048576
echo File size: %SIZE_MB% MB
echo.
echo Opening output folder...
explorer /select,"%OUTPUT_PATH%"
) else (
echo ERROR: Output file not found at expected location
echo Expected: %OUTPUT_PATH%
)
echo.
echo Press any key to exit...
pause >nul