-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
126 lines (115 loc) · 3.29 KB
/
build.bat
File metadata and controls
126 lines (115 loc) · 3.29 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@echo off
REM Build script for TauriAge Windows installers (MSI + Setup EXE)
REM Run as: build.bat from project root
setlocal enabledelayedexpansion
echo.
echo ===============================================
echo TauriAge Windows Installer Builder
echo ===============================================
echo.
REM Check prerequisites
echo Checking Prerequisites...
echo.
REM Check Node.js
where /q node
if %errorlevel% neq 0 (
echo X Node.js not found. Install from https://nodejs.org/
exit /b 1
)
for /f "tokens=*" %%i in ('node --version') do set NODE_VERSION=%%i
echo [OK] Node.js found: %NODE_VERSION%
REM Check npm
where /q npm
if %errorlevel% neq 0 (
echo X npm not found
exit /b 1
)
for /f "tokens=*" %%i in ('npm --version') do set NPM_VERSION=%%i
echo [OK] npm found: %NPM_VERSION%
REM Check Rust
where /q rustc
if %errorlevel% neq 0 (
echo X Rust not found. Install from https://rustup.rs/
exit /b 1
)
for /f "tokens=*" %%i in ('rustc --version') do set RUST_VERSION=%%i
echo [OK] Rust found: %RUST_VERSION%
REM Check Cargo
where /q cargo
if %errorlevel% neq 0 (
echo X Cargo not found
exit /b 1
)
for /f "tokens=*" %%i in ('cargo --version') do set CARGO_VERSION=%%i
echo [OK] Cargo found: %CARGO_VERSION%
echo.
echo ===============================================
echo Installing Dependencies
echo ===============================================
echo.
call npm install
if %errorlevel% neq 0 (
echo X Failed to install dependencies
exit /b 1
)
echo [OK] Dependencies installed
echo.
echo ===============================================
echo Building Frontend
echo ===============================================
echo.
call npm run build
if %errorlevel% neq 0 (
echo X Failed to build frontend
exit /b 1
)
echo [OK] Frontend built successfully
echo.
echo ===============================================
echo Building Tauri Application and Installers
echo ===============================================
echo.
echo This may take 5-30 minutes depending on your system...
echo.
call npm run tauri build
if %errorlevel% neq 0 (
echo X Tauri build failed
exit /b 1
)
echo [OK] Tauri build completed
echo.
echo ===============================================
echo Build Summary
echo ===============================================
echo.
echo Installer files location:
echo %cd%\src-tauri\target\release\bundle\
echo.
echo Files created:
if exist "src-tauri\target\release\bundle\msi\*.msi" (
echo [OK] MSI installer (Windows Installer)
echo src-tauri\target\release\bundle\msi\
) else (
echo [!] MSI installer not found
)
if exist "src-tauri\target\release\bundle\nsis\*.exe" (
echo [OK] Setup EXE (NSIS)
echo src-tauri\target\release\bundle\nsis\
) else (
echo [!] Setup EXE not found
)
echo.
echo To test the installers:
echo - MSI: msiexec /i ^<msi_file^>
echo - EXE: ^<exe_file^>
echo.
echo Next steps:
echo 1. Test the installers on a clean Windows system
echo 2. Verify application functions correctly after installation
echo 3. Test uninstall process
echo 4. Sign installers with code certificate (optional)
echo 5. Upload to distribution platform
echo.
echo [OK] Build completed successfully!
echo.
pause