Files
revpicommander/make.bat
Sven Sager 9202aedf7f Adjustments for creating installations on various operating systems
Add code signing options for macOS.
Adjust make.bat to create venv to use PyInstaller.
Preparing script for Linux to use in /usr/bin.
2023-01-16 17:02:48 +01:00

40 lines
900 B
Batchfile

@echo off
set PACKAGE=revpicommander
set APP_NAME=RevPi Commander
if "%1" == "venv" goto venv
if "%1" == "installer" goto installer
if "%1" == "clean" goto clean
echo Make script for "%APP_NAME%" on Windows
echo.
echo Need action:
echo venv Create / update your virtual environment for build process
echo installer Build this application with PyInstaller
echo clean Clean up your environment after build process
goto end
:venv
python -m venv venv
venv\\Scripts\\pip.exe install --upgrade -r requirements.txt
goto end
:installer
venv\\Scripts\\pyinstaller -n "%APP_NAME%" ^
--add-data="src\%PACKAGE%\locale;.\%PACKAGE%\locale" ^
--add-data="data\%PACKAGE%.ico;." ^
--icon=data\\%PACKAGE%.ico ^
--noconfirm ^
--clean ^
--onedir ^
--windowed ^
src\\%PACKAGE%\\__main__.py
goto end
:clean
rmdir /S /Q build dist
rmdir /S /Q src\%PACKAGE%.egg-info
del *.spec
:end