Skip to content

Commit

Permalink
Add appimage files
Browse files Browse the repository at this point in the history
  • Loading branch information
extremecoders-re authored Aug 16, 2022
1 parent 75ab7da commit 957b5a6
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ $ cd attify-badge-tool
$ pip3 install -r requirements.txt
```

Alternatively you can download a precompiled appimage binary from Releases.

## Running

```
Expand Down
13 changes: 13 additions & 0 deletions appimage/BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### AppImage building instructions

On a Ubuntu 22.04 container run,

```
# apt update && apt install python3-pip --yes
# ./appimage-builder-1.1.0-x86_64.AppImage --recipe attify-badge-tool.yml
```

appimage-builder can be downloaded from https://github.com/AppImageCrafters/appimage-builder


Reference: https://appimage-builder.readthedocs.io/en/latest/examples/pyqt.html
File renamed without changes
48 changes: 48 additions & 0 deletions appimage/attify-badge-tool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 1
script:
- rm -rf AppDir | true
- mkdir -p AppDir/usr/src
- git clone https://github.com/attify/attify-badge-tool AppDir/usr/src/
- mkdir -p AppDir/usr/share/icons
- mv AppDir/usr/src/appimage/attify-badge-tool.png AppDir/usr/share/icons/
- rm -rf AppDir/usr/src/{.git,appimage,images,README.md,requirements.txt}
- pip3 install --ignore-installed --prefix=/usr --root=AppDir strip-ansi pyserial

AppDir:
path: ./AppDir

app_info:
id: org.attifyos.attify-badge-tool
name: Attify Badge Tool
icon: attify-badge-tool
version: 0.0.1
# 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/src/serial-console.py $@"

apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920d1991bc93c'

include:
- python3-minimal
- python3-pyqt5

exclude:
- libqt5designer5

runtime:
env:
# 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.10/site-packages'

AppImage:
sign-key: None
arch: x86_64

0 comments on commit 957b5a6

Please sign in to comment.