-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.bat
More file actions
71 lines (59 loc) · 1.78 KB
/
Copy pathbuild.bat
File metadata and controls
71 lines (59 loc) · 1.78 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
@echo off
setlocal EnableDelayedExpansion
:: Initialize the MSVC environment first
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
echo OpenArc Studio Build (Windows)
echo ==============================
echo.
REM --- Check bun ---
where bun >nul 2>nul
if %errorlevel% neq 0 (
echo [X] bun is not installed. See https://bun.sh
exit /b 1
)
for /f "tokens=*" %%a in ('bun --version 2^>nul') do set BUN_VER=%%a
echo [OK] bun %BUN_VER%
REM --- Check rust ---
where rustc >nul 2>nul
if %errorlevel% neq 0 (
echo [X] Rust is not installed. See https://rustup.rs
exit /b 1
)
for /f "tokens=*" %%a in ('rustc --version 2^>nul') do set RUSTC_VER=%%a
echo [OK] %RUSTC_VER%
REM --- Check MSVC linker ---
where link >nul 2>nul
if %errorlevel% neq 0 (
echo [!] MSVC link.exe not found in PATH
echo Install Visual Studio Build Tools with "Desktop development with C++"
echo and run this script from a Developer Command Prompt for VS.
exit /b 1
)
echo [OK] link.exe (MSVC)
REM --- Check WebView2 (optional, just a warning) ---
reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] WebView2 Runtime
) else (
echo [!] WebView2 Runtime not detected — the app may not run without it
echo Download from: https://developer.microsoft.com/microsoft-edge/webview2/
)
echo.
echo Installing frontend dependencies...
call bun install
if %errorlevel% neq 0 (
echo [X] bun install failed
exit /b 1
)
echo.
echo Building release bundles...
call bun run tauri build
if %errorlevel% neq 0 (
echo [X] Build failed
exit /b 1
)
echo.
echo [OK] Build complete
echo Artifacts are in src-tauri\target\release\bundle\
echo.
endlocal