Files
orisys-sdk/build.bat
T
2025-12-22 15:02:01 +08:00

66 lines
1.6 KiB
Batchfile

@echo off
REM Build script for Windows
REM Creates executable and optionally installer
echo ========================================
echo Building Orisys Sensor Demo
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
pause
exit /b 1
)
REM Install/upgrade PyInstaller if needed
echo Installing/upgrading PyInstaller...
pip install --upgrade PyInstaller
echo.
echo Building executable...
echo.
REM Build using spec file
pyinstaller camera_gui.spec
if errorlevel 1 (
echo.
echo ERROR: Build failed!
pause
exit /b 1
)
echo.
echo ========================================
echo Build successful!
echo Executable: dist\camera_gui.exe
echo ========================================
echo.
REM Ask if user wants to create installer
set /p CREATE_INSTALLER="Create installer? (y/n): "
if /i "%CREATE_INSTALLER%"=="y" (
echo.
echo Creating installer...
echo Please ensure Inno Setup Compiler is installed.
echo Opening Inno Setup script...
REM Try to find Inno Setup Compiler
if exist "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" (
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" build_installer.iss
) else if exist "C:\Program Files\Inno Setup 6\ISCC.exe" (
"C:\Program Files\Inno Setup 6\ISCC.exe" build_installer.iss
) else (
echo Inno Setup Compiler not found in default locations.
echo Please compile build_installer.iss manually using Inno Setup Compiler.
)
)
echo.
echo Done!
pause