-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
AppImageBuilder-x86_64.yml
85 lines (75 loc) · 3.45 KB
/
AppImageBuilder-x86_64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
# Builds on ubuntu 20.04
version: 1
script:
# Remove any previous build
- rm -rf AppDir | true
# Make usr dirs
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps/
- mkdir -p AppDir/usr/bin
# Copy the python application code into the AppDir
- rsync -av src/ AppDir/usr/src --exclude __pycache__ --exclude stickers_input --exclude stickers_output --exclude creds.json
# Copy appicon
- cp ./src/sticker_convert/resources/appicon.png AppDir/usr/share/icons/hicolor/256x256/apps/sticker-convert.png
AppDir:
path: ./AppDir
app_info:
id: com.laggykiller.sticker_convert
name: sticker-convert
icon: sticker-convert
version: latest
exec: usr/bin/python3.12
exec_args: "$APPDIR/usr/src/sticker-convert.py $@"
apt:
arch: amd64
sources:
- sourceline: deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu focal main
key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse
include:
- python3.12
- python3.12-tk
- python3.12-distutils
exclude: []
after_bundle: |
export PYTHONHOME=$(pwd)/AppDir/usr
export PYTHONPATH=$(pwd)/AppDir/usr/lib/python3.12/site-packages:$(pwd)/AppDir/usr/lib/python3.12
export PATH=$(pwd)/AppDir/usr/bin:$PATH
# Install pip
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
# Install pip packages
AppDir/usr/bin/python3.12 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r ./requirements.txt
AppDir/usr/bin/python3.12 -m pip install --ignore-installed --prefix=/usr --root=AppDir certifi opencv-python
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.12/site-packages'
# SSL Certificates are placed in a different location for every system therefore we ship our own copy
SSL_CERT_FILE: '${APPDIR}/usr/lib/python3.12/site-packages/certifi/cacert.pem'
# Tcl library has to be specified or else cannot find init.tcl
TCL_LIBRARY: '${APPDIR}/usr/share/tcltk/tcl8.6'
files:
include: []
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
AppImage:
arch: x86_64
update-information: guess