-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
54 lines (47 loc) · 1.28 KB
/
build.bat
File metadata and controls
54 lines (47 loc) · 1.28 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
@echo off
title DJI RC Emulator — PyInstaller Build
echo ============================================
echo DJI RC Emulator — Build Script
echo ============================================
echo.
:: Activate venv if present
if exist ".venv\Scripts\activate.bat" (
echo Activating virtual environment...
call .venv\Scripts\activate.bat
)
:: Install/update dependencies
echo Installing dependencies...
pip install -r requirements.txt --quiet
if errorlevel 1 (
echo Warning: Some dependencies may not have installed correctly.
)
:: Check PyInstaller is installed
pyinstaller --version >nul 2>&1
if errorlevel 1 (
echo PyInstaller not found. Installing...
pip install pyinstaller>=6.0
if errorlevel 1 (
echo Failed to install PyInstaller.
pause
exit /b 1
)
)
echo.
echo Running PyInstaller...
echo.
pyinstaller DJI_RC_Emulator.spec --noconfirm
if errorlevel 1 (
echo.
echo ============================================
echo BUILD FAILED — Check output above
echo ============================================
pause
exit /b 1
)
echo.
echo ============================================
echo BUILD COMPLETE
echo Output: dist\DJI RC Emulator\DJI RC Emulator.exe
echo ============================================
echo.
pause