From 1f81ca0a514e15f47114b8103040156253f07804 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Sun, 20 Nov 2022 15:50:10 +0100 Subject: [PATCH] added libatlas3-base for weird fitting bug added gnome-accessibility-themes for build environemnt of AppImage (fixes T232) --- .gitignore | 1 + AppDir/usr/src/nmreval/io/merge_agr.py | 48 -------------------------- AppImageBuilder.yml | 22 +++++++----- create_AppImage.bash | 9 +++-- 4 files changed, 22 insertions(+), 58 deletions(-) delete mode 100755 AppDir/usr/src/nmreval/io/merge_agr.py diff --git a/.gitignore b/.gitignore index 6d0d3ad..2af73c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__ +appimage-build AppDir *.AppImage NMReval*.zsync diff --git a/AppDir/usr/src/nmreval/io/merge_agr.py b/AppDir/usr/src/nmreval/io/merge_agr.py deleted file mode 100755 index 8a52a07..0000000 --- a/AppDir/usr/src/nmreval/io/merge_agr.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 - -import re -import argparse - - -def merger(infiles, outfile): - header = '' - graphs = '' - counter = 0 - for f in infiles: - headerflag = True - for line in f.readlines(): - if re.match('@with [Gg][0-9]', line): - headerflag = False - # one graph per file, adjust graph number - line = '@with g{}\n'.format(counter) - if headerflag: - if graphs == '': - # save fonts, colors etc. of first file - header += line - elif re.match('@[Gg][0-9]', line): - # save graph specifications of following files - line = re.sub('@[Gg][0-9]', '@g{}'.format(counter), line) - header += line - else: - pass - else: - # save sets - if re.match('@target [Gg][0-9]', line): - line = re.sub('@target [Gg][0-9]', - '@target G{}'.format(counter), line) - graphs += line - counter += 1 - outfile.write(header+graphs) - - -parser = argparse.ArgumentParser() - -parser.add_argument('input', nargs='+', type=argparse.FileType('r'), - help='One or more input files') -parser.add_argument('--output', '-o', nargs='?', type=argparse.FileType('w'), - default='merger_grace.agr', - help='Output file (default=merged_grace.agr)') - -args = parser.parse_args() - -merger(args.input, args.output) diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index b236cfb..45405d5 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -5,19 +5,22 @@ script: # Make usr and icons dirs - mkdir -p $TARGET_APPDIR/usr/src - mkdir -p $TARGET_APPDIR/usr/bin + - mkdir -p $TARGET_APPDIR/usr/share/icons + - mkdir -p $TARGET_APPDIR/usr/share/applications + # copy logo + - cp src/resources/logo.png $TARGET_APPDIR/usr/share/icons/ # Copy the python application code into the AppDir - - cp -r bin/evaluate.py $TARGET_APPDIR/usr/bin/ + - cp 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 + - cp src/pkm.vogel.nmreval.desktop $TARGET_APPDIR/usr/share/applications AppDir: app_info: id: pkm.vogel.nmreval name: NMReval - icon: utilities-terminal - version: 0.1.0 + icon: logo + version: 0.2.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 @@ -30,9 +33,12 @@ AppDir: - sourceline: 'deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrin non-free' include: + # for /usr/bin/env + - coreutils - dash - - python3 - - python3-pkg-resources + - gnome-accessibility-themes + - libatlas3-base + - python3.9-minimal - python3-pyqt5 - python3-numpy - python3-matplotlib @@ -74,6 +80,6 @@ AppDir: command: ./AppRun AppImage: - update-information: 'NMReval-*.AppImage.zsync' + update-information: 'zsync|http://mirror.infra.pkm/nmreval/NMReval-latest.AppImage.zsync' sign-key: None arch: x86_64 diff --git a/create_AppImage.bash b/create_AppImage.bash index 8118ccc..91e16a5 100644 --- a/create_AppImage.bash +++ b/create_AppImage.bash @@ -1,3 +1,8 @@ -wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage +BUILDER=appimage-builder-1.1.0-x86_64.AppImage +if [ -f $BUILDER ]; then + echo $BUILDER +else + wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/$BUILDER +fi chmod +x appimage-builder-1.1.0-x86_64.AppImage -./appimage-builder-1.1.0-x86_64.AppImage +./appimage-builder-1.1.0-x86_64.AppImage --skip-tests