mirror of
https://github.com/naruxde/revpicommander.git
synced 2025-11-08 16:43:53 +01:00
Update Makefile and requirements.txt for build and clean ui files
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
recursive-include data *
|
||||
recursive-include src/revpicommander *.py *.qm
|
||||
global-exclude *.pyc
|
||||
recursive-include ui_dev *
|
||||
include LICENSE.txt
|
||||
include Makefile
|
||||
include MANIFEST.in
|
||||
include README.md
|
||||
include requirements.txt
|
||||
include setup.iss
|
||||
include setup.py
|
||||
include stdeb.cfg
|
||||
include translate.pro
|
||||
|
||||
83
Makefile
83
Makefile
@@ -1,38 +1,91 @@
|
||||
SHELL := bash
|
||||
MAKEFLAGS = --no-print-directory --no-builtin-rules
|
||||
.DEFAULT_GOAL = all
|
||||
|
||||
# Variables
|
||||
PACKAGE = revpicommander
|
||||
|
||||
# If virtualenv exists, use it. If not, use PATH to find
|
||||
SYSTEM_PYTHON = $(or $(shell which python3), $(shell which python))
|
||||
PYTHON = $(or $(wildcard venv/bin/python), $(SYSTEM_PYTHON))
|
||||
SYSTEM_PYUIC5 = $(shell which pyuic5)
|
||||
PYUIC5 = $(or $(wildcard venv/bin/pyuic5), $(SYSTEM_PYUIC5))
|
||||
SYSTEM_PYRCC5 = $(shell which pyrcc5)
|
||||
PYRCC5 = $(or $(wildcard venv/bin/pyrcc5), $(SYSTEM_PYRCC5))
|
||||
SYSTEM_PYLUP5 = $(shell which pylupdate5)
|
||||
PYLUP5 = $(or $(wildcard venv/bin/pylupdate5), $(SYSTEM_PYLUP5))
|
||||
|
||||
all: build_ui build_rc build
|
||||
|
||||
.PHONY: all
|
||||
|
||||
## Compile Qt UI files to python code
|
||||
build_ui:
|
||||
cd ui_dev && for ui_file in *.ui; do \
|
||||
file_name=$${ui_file%.ui}; \
|
||||
pyuic5 $${ui_file} -o ../src/revpicommander/ui/$${file_name}_ui.py -x --from-imports; \
|
||||
$(PYUIC5) $${ui_file} -o ../src/$(PACKAGE)/ui/$${file_name}_ui.py -x --from-imports; \
|
||||
echo $${file_name}; \
|
||||
done
|
||||
|
||||
build_rc:
|
||||
cd ui_dev && for rc_file in *.qrc; do \
|
||||
file_name=$${rc_file%.qrc}; \
|
||||
pyrcc5 $${rc_file} -o ../src/revpicommander/ui/$${file_name}_rc.py; \
|
||||
$(PYRCC5) $${rc_file} -o ../src/$(PACKAGE)/ui/$${file_name}_rc.py; \
|
||||
echo $${file_name}; \
|
||||
done
|
||||
|
||||
update_translation:
|
||||
pylupdate5 translate.pro
|
||||
$(PYLUP5) translate.pro
|
||||
|
||||
installer_mac:
|
||||
pyinstaller -n "RevPi Commander" \
|
||||
--add-data="src/revpicommander/locale:locale" \
|
||||
--add-data="data/revpicommander.icns:." \
|
||||
--icon=data/revpicommander.icns \
|
||||
.PHONY: build_ui build_rc update_translation
|
||||
|
||||
## Environment
|
||||
venv:
|
||||
rm -rf venv
|
||||
$(SYSTEM_PYTHON) -m venv venv
|
||||
|
||||
deps:
|
||||
$(PYTHON) -m pip install --upgrade pip -r requirements.txt
|
||||
|
||||
.PHONY: venv deps
|
||||
|
||||
## Build, install
|
||||
build:
|
||||
$(PYTHON) -m setup sdist
|
||||
$(PYTHON) -m setup bdist_wheel
|
||||
|
||||
install:
|
||||
$(PYTHON) -m pip install dist/$(PACKAGE)-*.whl
|
||||
|
||||
.PHONY: build install
|
||||
|
||||
## PyInstaller
|
||||
installer_mac: all
|
||||
$(PYTHON) -m PyInstaller -n "RevPi Commander" \
|
||||
--add-data="src/$(PACKAGE)/locale:locale" \
|
||||
--add-data="data/$(PACKAGE).icns:." \
|
||||
--icon=data/$(PACKAGE).icns \
|
||||
--noconfirm \
|
||||
--clean \
|
||||
--onedir \
|
||||
--windowed \
|
||||
src/revpicommander/__main__.py
|
||||
src/$(PACKAGE)/__main__.py
|
||||
|
||||
installer_win:
|
||||
pyinstaller -n "RevPi Commander" \
|
||||
--add-data="src\\revpicommander\\locale;.\\locale" \
|
||||
--add-data="data\\revpicommander.ico;." \
|
||||
--icon=data\\revpicommander.ico \
|
||||
installer_win: all
|
||||
$(PYTHON) -m PyInstaller -n "RevPi Commander" \
|
||||
--add-data="src\\$(PACKAGE)\\locale;.\\locale" \
|
||||
--add-data="data\\$(PACKAGE).ico;." \
|
||||
--icon=data\\$(PACKAGE).ico \
|
||||
--noconfirm \
|
||||
--clean \
|
||||
--onedir \
|
||||
--windowed \
|
||||
src/revpicommander\__main__.py
|
||||
src/$(PACKAGE)\__main__.py
|
||||
|
||||
.PHONY: installer_mac installer_win
|
||||
|
||||
## Clean
|
||||
clean:
|
||||
rm -rf build dist src/*.egg-info src/$(PACKAGE)/ui/[^__]*.py *.spec
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Pyinstaller
|
||||
PyQt5>=5.14.1
|
||||
revpimodio2>=2.5.6
|
||||
zeroconf>=0.24.4
|
||||
@@ -1693,147 +1693,147 @@ applicable law.
|
||||
<translation type="unfinished">SPS &start</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="63"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="67"/>
|
||||
<source>PLC s&top</source>
|
||||
<translation type="unfinished">SPS s&top</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="70"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="78"/>
|
||||
<source>PLC restart</source>
|
||||
<translation type="unfinished">SPS Neustart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="77"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="89"/>
|
||||
<source>PLC &logs</source>
|
||||
<translation type="unfinished">SPS &Logdateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="86"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="102"/>
|
||||
<source>Status:</source>
|
||||
<translation type="unfinished">Status:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="117"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="133"/>
|
||||
<source>PLC watch &mode</source>
|
||||
<translation type="unfinished">SPS &Monitor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="137"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="157"/>
|
||||
<source>&File</source>
|
||||
<translation type="unfinished">&Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="148"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="168"/>
|
||||
<source>&Help</source>
|
||||
<translation type="unfinished">&Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="156"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="176"/>
|
||||
<source>&PLC</source>
|
||||
<translation type="unfinished">S&PS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="170"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="190"/>
|
||||
<source>&Connections</source>
|
||||
<translation type="unfinished">&Verbindungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="185"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="205"/>
|
||||
<source>&Connections...</source>
|
||||
<translation type="unfinished">&Verbindungen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="193"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="213"/>
|
||||
<source>&Search Revolution Pi...</source>
|
||||
<translation type="unfinished">&Suche Revolution Pi...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="201"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="221"/>
|
||||
<source>&Quit</source>
|
||||
<translation type="unfinished">&Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="206"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="226"/>
|
||||
<source>Visit &webpage...</source>
|
||||
<translation type="unfinished">&Webseite besuchen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="216"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="236"/>
|
||||
<source>PLC &logs...</source>
|
||||
<translation type="unfinished">SPS &Logdateien...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="224"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="244"/>
|
||||
<source>PLC &options...</source>
|
||||
<translation type="unfinished">SPS &Optionen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="232"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="252"/>
|
||||
<source>PLC progra&m...</source>
|
||||
<translation type="unfinished">SPS Progra&mm...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="240"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="260"/>
|
||||
<source>PLC de&veloper...</source>
|
||||
<translation type="unfinished">SPS Ent&wickler...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="248"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="268"/>
|
||||
<source>piCtory configuraiton...</source>
|
||||
<translation type="unfinished">piCtory Konfiguration...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="253"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="273"/>
|
||||
<source>&Disconnect</source>
|
||||
<translation type="unfinished">&Trennen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="261"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="281"/>
|
||||
<source>Reset driver...</source>
|
||||
<translation type="unfinished">Treiber zurücksetzen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="266"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="286"/>
|
||||
<source>RevPi si&mulator...</source>
|
||||
<translation type="unfinished">RevPi Si&mulator...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="188"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="208"/>
|
||||
<source>Ctrl+N</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="196"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="216"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="211"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="231"/>
|
||||
<source>&Info...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="219"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="239"/>
|
||||
<source>Ctrl+L</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="227"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="247"/>
|
||||
<source>Ctrl+O</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="235"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="255"/>
|
||||
<source>Ctrl+P</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="243"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="263"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="256"/>
|
||||
<location filename="../../../ui_dev/revpicommander.ui" line="276"/>
|
||||
<source>Ctrl+X</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user