-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_windows.bat
More file actions
77 lines (68 loc) · 1.74 KB
/
build_windows.bat
File metadata and controls
77 lines (68 loc) · 1.74 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
@echo off
REM Build script for SketchBridge on Windows
REM
REM Prerequisites:
REM - Python 3.10 or later
REM - pip install pyinstaller
REM - All SketchBridge dependencies installed
REM
REM Usage:
REM build_windows.bat
REM
REM Output:
REM dist/SketchBridge/SketchBridge.exe
echo ============================================
echo Building SketchBridge for Windows
echo ============================================
echo.
REM Check if Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not in PATH
exit /b 1
)
REM Check if PyInstaller is available
python -c "import PyInstaller" >nul 2>&1
if errorlevel 1 (
echo PyInstaller not found. Installing...
pip install pyinstaller
if errorlevel 1 (
echo ERROR: Failed to install PyInstaller
exit /b 1
)
)
REM Install/update dependencies
echo.
echo Installing dependencies...
pip install -e . >nul 2>&1
if errorlevel 1 (
echo WARNING: Could not install package in editable mode
)
REM Clean previous builds
echo.
echo Cleaning previous builds...
if exist "build" rmdir /s /q "build"
if exist "dist\SketchBridge" rmdir /s /q "dist\SketchBridge"
REM Run PyInstaller
echo.
echo Running PyInstaller...
pyinstaller sketch_bridge.spec --noconfirm
if errorlevel 1 (
echo.
echo ERROR: Build failed!
exit /b 1
)
echo.
echo ============================================
echo Build complete!
echo ============================================
echo.
echo Output: dist\SketchBridge\SketchBridge.exe
echo.
echo To distribute, copy the entire dist\SketchBridge folder.
echo.
REM Optionally run the built application
set /p RUN="Run SketchBridge now? (y/n): "
if /i "%RUN%"=="y" (
start "" "dist\SketchBridge\SketchBridge.exe"
)