More build notes

This commit is contained in:
Piotr Dobrowolski 2018-09-02 13:43:37 +02:00
parent e302b796ae
commit 9a426f25bb
3 changed files with 48 additions and 2 deletions

View File

@ -5,6 +5,12 @@ PY_FILES = $(wildcard *.py) $(wildcard gui/*.py)
UI_COMPILED = $(UI_FILES:.ui=.py)
TS_COMPILED = $(TS_FILES:.ts=.qm)
ifeq (, $(shell which python3))
PY ?= python
else
PY ?= python3
endif
%.py: %.ui
pyuic5 $< > $@
@ -18,10 +24,13 @@ clean:
rm $(TS_COMPILED)
run: all
python3 luftdaten-tool.py
$(PY) luftdaten-tool.py
dist: all
python3 -m PyInstaller luftdaten-tool.spec
$(PY) -m PyInstaller luftdaten-tool.spec
deps:
$(PY) -m pip install -U -r requirements.txt
i18n-update:
@for f in $(TS_FILES) ; do \

View File

@ -7,17 +7,35 @@ Binary builds
Our main target is having working prebuilt binaries for users to simply
download and run, to avoid all the setup below.
### Linux
Currently Linux builds require *Python 3.6* (but 3.7 seems to work fine as
well), GNU make and Qt Linguist tools. Following packages should suffice on
Ubuntu:
sudo apt install qttools5-dev-tools python3.6 make
Then, to install python dependencies and build the binary use:
make deps dist
### Windows
Currently Windows builds require *Python 3.6* installed system-wide and added to
`%PATH%`.
To install python and cygwin dependencies and build everything use
`windows-build.bat` batch script.
### MacOS
Currently MacOS builds require *Python 3.6* and Qt SDK installed (just the "Qt >
5... > macOS" part in installer) with following added to $PATH:
export PATH="$HOME/Qt/5.11.1/clang_64/bin:$PATH"
Then just install dependencies and build everything using:
make deps dist
Development
-----------

19
windows-build.bat Normal file
View File

@ -0,0 +1,19 @@
if not exist build mkdir build
rem Download cygwin installer
if not exist build\cygwin-x86.exe powershell -Command "Invoke-WebRequest https://cygwin.com/setup-x86.exe -OutFile build\cygwin-x86.exe"
rem Install required Cygwin packages
if not exist build\cygwin build\cygwin-x86.exe --site http://cygwin.mirror.constant.com ^
--no-shortcuts ^
--no-desktop ^
--quiet-mode ^
--root "%cd%\build\cygwin" ^
--arch x86 ^
--local-package-dir "%cd%\build\cygwin-packages" ^
--verbose ^
--prune-install ^
--no-admin ^
--packages qt5-linguist-tools,make
build\cygwin\bin\bash.exe --login -i -c "ln -s `which lrelease-qt5` /usr/bin/lrelease ; cd \"%cd%\" && make deps dist"