From dcd74b319bc453d9fe1ebaf715cc8de56ef71660 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Fri, 18 Nov 2022 21:33:11 +0100 Subject: [PATCH] added initial recipe for appimage --- AppImageBuilder.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++ create_AppImage.bash | 3 ++ 2 files changed, 82 insertions(+) create mode 100644 AppImageBuilder.yml create mode 100644 create_AppImage.bash diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml new file mode 100644 index 0000000..b236cfb --- /dev/null +++ b/AppImageBuilder.yml @@ -0,0 +1,79 @@ +version: 1 +script: + # Remove any previous build + - rm -rf $TARGET_APPDIR | true + # Make usr and icons dirs + - mkdir -p $TARGET_APPDIR/usr/src + - mkdir -p $TARGET_APPDIR/usr/bin + # Copy the python application code into the AppDir + - cp -r bin/evaluate.py $TARGET_APPDIR/usr/bin/ + - cp -r src/* $TARGET_APPDIR/usr/src/ + # Install application dependencies + #- python3 -m pip install --ignore-installed --prefix=/usr --root=$TARGET_APPDIR -r ./requirements.txt + + +AppDir: + app_info: + id: pkm.vogel.nmreval + name: NMReval + icon: utilities-terminal + version: 0.1.0 + # Set the python executable as entry point + exec: usr/bin/python3 + # Set the application main script path as argument. Use '$@' to forward CLI parameters + exec_args: "$APPDIR/usr/bin/evaluate.py $@" + + apt: + arch: amd64 + allow_unauthenticated: true + sources: + - sourceline: 'deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrin non-free' + + include: + - dash + - python3 + - python3-pkg-resources + - python3-pyqt5 + - python3-numpy + - python3-matplotlib + - python3-scipy + - python3-bsddb3 + - python3-h5py + - python3-pyqtgraph + - python3-tk + exclude: + - usr/share/man + - usr/share/doc + + runtime: + version: "continuous" + env: + PATH: '${APPDIR}/usr/bin:${PATH}' + # Set python home + # See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME + PYTHONHOME: '${APPDIR}/usr' + # Path to the site-packages dir or other modules dirs + # See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH + PYTHONPATH: '${APPDIR}/usr/lib/python3.9/site-packages:${APPDIR}/usr' + + test: + fedora: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + arch: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun + +AppImage: + update-information: 'NMReval-*.AppImage.zsync' + sign-key: None + arch: x86_64 diff --git a/create_AppImage.bash b/create_AppImage.bash new file mode 100644 index 0000000..8118ccc --- /dev/null +++ b/create_AppImage.bash @@ -0,0 +1,3 @@ +wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage +chmod +x appimage-builder-1.1.0-x86_64.AppImage +./appimage-builder-1.1.0-x86_64.AppImage