-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
83 lines (76 loc) · 2.14 KB
/
build.bat
File metadata and controls
83 lines (76 loc) · 2.14 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@echo off
chcp 65001 > nul
echo ============================================
echo DKST RetroProxy - Windows Build Script
echo ============================================
echo.
REM Check Go
echo [1/3] Checking Go installation...
where go >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Go is not installed or not in PATH.
echo Please install Go from: https://go.dev/dl/
echo After installation, restart this script.
pause
exit /b 1
)
for /f "tokens=3" %%i in ('go version') do set GO_VERSION=%%i
echo Found Go %GO_VERSION%
REM Check Node.js
echo [2/3] Checking Node.js installation...
where node >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Node.js is not installed or not in PATH.
echo Please install Node.js from: https://nodejs.org/
echo After installation, restart this script.
pause
exit /b 1
)
for /f "tokens=1" %%i in ('node --version') do set NODE_VERSION=%%i
echo Found Node.js %NODE_VERSION%
REM Check Wails CLI
echo [3/3] Checking Wails CLI installation...
where wails >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Wails CLI not found. Installing...
go install github.com/wailsapp/wails/v2/cmd/wails@latest
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to install Wails CLI.
pause
exit /b 1
)
echo Wails CLI installed successfully.
) else (
for /f "tokens=3" %%i in ('wails version') do set WAILS_VERSION=%%i
echo Found Wails CLI
)
echo.
echo ============================================
echo All dependencies satisfied. Building...
echo ============================================
echo.
REM Install frontend dependencies
echo Installing frontend dependencies...
cd frontend
call npm install
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to install frontend dependencies.
cd ..
pause
exit /b 1
)
cd ..
REM Build the application
echo Building application...
wails build
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Build failed.
pause
exit /b 1
)
echo.
echo ============================================
echo Build completed successfully!
echo Output: build\bin\RetroProxy.exe
echo ============================================
pause