Add dmg building on MacOS, move build-related stuff to deploy/

This commit is contained in:
2018-09-04 09:00:31 +02:00
parent e4a6983ed9
commit 68a264f9ba
8 changed files with 221 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ PY_FILES = $(wildcard *.py) $(wildcard gui/*.py)
UI_COMPILED = $(UI_FILES:.ui=.py)
TS_COMPILED = $(TS_FILES:.ts=.qm)
# python3.6 on Windows is only available as python.exe
ifeq (, $(shell which python3))
PY ?= python
else
@@ -26,13 +27,26 @@ clean:
run: all
$(PY) luftdaten-tool.py
dist: all
$(PY) -m PyInstaller -y luftdaten-tool.spec
# Updates all translation files in i18n/ directory
i18n-update: $(UI_COMPILED)
@for f in $(TS_FILES) ; do \
pylupdate5 $(PY_FILES) -ts $$f -verbose; \
done
deps:
$(PY) -m pip install -U -r requirements.txt
i18n-update:
@for f in $(TS_FILES) ; do \
pylupdate5 *.py gui/*.py -ts $$f -verbose; \
done
# Here go platform-specific buildsteps
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
PLATFORM_DEPS := assets/logo.icns
assets/logo.icns: assets/logo.png
deploy/mkicns $<
endif
dist: all $(PLATFORM_DEPS)
$(PY) -m PyInstaller -y luftdaten-tool.spec
dmg: dist
dmgbuild -s deploy/dmgbuild_settings.py -D app=dist/Luftdaten.info\ Flashing\ Tool.app "Luftdaten.info Flashing Tool" dist/luftdaten-tool.dmg