-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_release.bat
More file actions
80 lines (71 loc) · 2.7 KB
/
Copy pathbuild_release.bat
File metadata and controls
80 lines (71 loc) · 2.7 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
@echo off
setlocal enabledelayedexpansion
REM Define project root
set "PROJECT_ROOT=%CD%"
set "DIST_DIR=%PROJECT_ROOT%\dist\windows"
set "BUILD_DIR=%PROJECT_ROOT%\build\windows"
echo ========================================
echo Steps IDE Windows Build Script
echo ========================================
echo.
echo [1/3] Cleaning previous builds...
if exist "%DIST_DIR%" rmdir /s /q "%DIST_DIR%"
if exist "%BUILD_DIR%" rmdir /s /q "%BUILD_DIR%"
if exist "*.spec" del /q "*.spec"
echo [2/3] Installing build dependencies...
pip install pyinstaller PyQt6-WebEngine pywinpty
echo [3/4] Building Steps IDE...
REM Create the executable
REM --noconsole: Don't show a terminal window
REM --name: Name of the executable
REM --add-data: Include the Quick Reference file
REM --hidden-import: Ensure all needed modules are found (PyQt6-WebEngine might need this)
REM --clean: Clean PyInstaller cache
REM --noconfirm: Don't ask to overwrite
pyinstaller --name="StepsIDE" ^
--windowed ^
--noconsole ^
--clean ^
--noconfirm ^
--distpath "%DIST_DIR%" ^
--workpath "%BUILD_DIR%" ^
--add-data "src\steps\stdlib;steps\stdlib" ^
--add-data "docs\QUICK-REFERENCE.md;docs" ^
--add-data "images;images" ^
--hidden-import "PyQt6.QtWebEngineCore" ^
--hidden-import "PyQt6.QtWebEngineWidgets" ^
--hidden-import "winpty" ^
--hidden-import "serial" ^
src\steps_ide\main.py
echo.
echo [4/4] Building Steps Interpreter...
pyinstaller --name="steps" ^
--onefile ^
--console ^
--clean ^
--noconfirm ^
--distpath "%DIST_DIR%" ^
--workpath "%BUILD_DIR%" ^
--paths "src" ^
--add-data "src\steps\stdlib;steps\stdlib" ^
--hidden-import "steps_repl" ^
--hidden-import "steps_repl.repl" ^
--hidden-import "steps_repl.commands" ^
--hidden-import "steps_repl.environment" ^
--hidden-import "serial" ^
src\steps\main.py
echo.
echo ========================================
echo Build complete!
echo ========================================
echo Executable is located at: dist\windows\StepsIDE\StepsIDE.exe
echo (using directory mode for faster startup)
echo.
REM Optional: Create a simple run script in dist for convenience
if not exist "%DIST_DIR%\StepsIDE" mkdir "%DIST_DIR%\StepsIDE"
echo @echo off > "%DIST_DIR%\StepsIDE\run.bat"
echo cd /d "%%~dp0" >> "%DIST_DIR%\StepsIDE\run.bat"
echo start "" "StepsIDE.exe" >> "%DIST_DIR%\StepsIDE\run.bat"
echo Ready to test!
echo.
endlocal