Skip to content
Snippets Groups Projects
Commit f466c847 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] #817 add "make appimage" command in Makefile to build AppImage

parent abe28646
No related branches found
No related tags found
2 merge requests!787Release 0.53.1,!784Appimage
.PHONY: docs tests check check-format mypy pylint format build deploy deploy_test
.SILENT: deploy deploy_test # do not echo commands with password
# bash required to use source command
SHELL := /bin/bash
# run tests
tests:
python3 gen_resources.py
......@@ -39,6 +42,11 @@ build:
python3 setup.py sdist bdist_wheel
twine check dist/*
appimage:
cd ci/appimage && wget -qc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
cd ci/appimage && wget -qc https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/linuxdeploy-plugin-python-x86_64.AppImage && chmod u+x linuxdeploy-plugin-python-x86_64.AppImage
cd ci/appimage && source config.env && ./build.sh
# upload on PyPi repository
deploy:
twine upload dist/* --username ${PYPI_LOGIN} --password ${PYPI_PASSWORD}
......
#!/bin/bash
./linuxdeploy-x86_64.AppImage --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
version=0.53.0
# linuxdeploy python plugin
export PYTHON_SOURCE=https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
export PIP_REQUIREMENTS=$(pwd)/../../dist/sakia-${version}-py3-none-any.whl
# linuxdeploy appimage plugin
export OUTPUT=Sakia_x86_64-${version}.AppImage
[Desktop Entry]
Version=1.0
Name=Sakia
Name[fr]=Sakia
Comment=Duniter Ğ1 Libre Currency Client
Comment[fr]=Client pour la Monnaie Libre Duniter Ğ1
GenericName=Sakia client
GenericName[fr]=Client Sakia
Exec=sakia
Terminal=false
Type=Application
Icon=sakia
Categories=Utility;
StartupNotify=true
GenericName[fr_FR]=Client Sakia
Comment[fr_FR]=Client pour la Monnaie Libre Duniter Ğ1
MimeType=x-scheme-handler/duniter;
ci/appimage/sakia.png

51.5 KiB

#!/bin/bash
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# Call the entry point
${APPDIR}/usr/bin/python3.6 -s ${APPDIR}/usr/python/lib/python3.6/site-packages/sakia/main.py "$@"
......@@ -10,7 +10,8 @@ if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9A-Za-z]*$ ]]; then
sed -i "s/#define MyAppVerStr .*/#define MyAppVerStr \"$1\"/g" ci/appveyor/sakia.iss
sed -i "s/Version: .*/Version: $1/g" ci/travis/debian/DEBIAN/control
sed -i "s/Version=.*/Version=$1/g" res/linux/usr/share/applications/sakia.desktop
git commit src/sakia/__init__.py ci/appveyor/sakia.iss ci/travis/debian/DEBIAN/control res/linux/usr/share/applications/sakia.desktop -m "$1"
sed -i "s/version=.*/version=$1/g" ci/appimage/config.env
git commit src/sakia/__init__.py ci/appveyor/sakia.iss ci/travis/debian/DEBIAN/control res/linux/usr/share/applications/sakia.desktop ci/appimage/config.env -m "$1"
git tag "$1" -a -m "$1"
else
echo "Wrong version format"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment