Add dmg building on MacOS, move build-related stuff to deploy/
This commit is contained in:
26
Makefile
26
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user