-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-windows.bat
More file actions
74 lines (68 loc) · 1.71 KB
/
build-windows.bat
File metadata and controls
74 lines (68 loc) · 1.71 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
@echo off
chcp 65001 >nul
:: Change to the directory where this script is located
cd /d "%~dp0"
echo ========================================
echo HyperSampler - Windows Build Script
echo ========================================
echo.
:: Check if Node.js is installed
echo Checking prerequisites...
where node >nul 2>nul
if %errorlevel% neq 0 (
echo.
echo [ERROR] Node.js is not installed!
echo.
echo Please install Node.js from: https://nodejs.org/
echo Download the LTS version and run the installer.
echo.
echo Opening download page...
start https://nodejs.org/
echo.
pause
exit /b 1
)
:: Display Node.js version
for /f "tokens=*" %%i in ('node -v') do set NODE_VERSION=%%i
echo [OK] Node.js %NODE_VERSION% detected
echo.
echo Step 1/3: Installing dependencies...
call npm install
if %errorlevel% neq 0 (
echo.
echo [ERROR] Failed to install dependencies
echo Please check your internet connection and try again.
pause
exit /b %errorlevel%
)
echo.
echo Step 2/3: Building web application...
call npm run build
if %errorlevel% neq 0 (
echo.
echo [ERROR] Failed to build application
pause
exit /b %errorlevel%
)
echo.
echo Step 3/3: Building Windows executable...
call npm run electron:build
if %errorlevel% neq 0 (
echo.
echo [ERROR] Failed to build executable
pause
exit /b %errorlevel%
)
echo.
echo ========================================
echo Build completed successfully!
echo ========================================
echo.
echo Output files:
echo - Portable: dist-electron\win-unpacked\HyperSampler.exe
echo - Installer: dist-electron\HyperSampler Setup 1.0.0.exe
echo.
echo Opening output folder...
start "" "dist-electron"
echo.
pause