forked from bottlesdevs/Bottles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppImageBuilder.yml
209 lines (179 loc) · 6.61 KB
/
AppImageBuilder.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
version: 1
script:
# Remove any previous build
- rm -rf AppDir | true
- rm -rf build | true
# Building with meson and ninja
- DESTDIR=$TARGET_APPDIR
- mkdir build & meson build --prefix=/usr --buildtype=release
- cd build
- ninja ; ninja install ; ninja bottles-pot ; ninja bottles-update-po
- cd ..
# Preparing directories
- mkdir -p AppDir/usr AppDir/usr/local/share/bottles AppDir/usr/bin AppDir/usr/share/glib-2.0/schemas AppDir/usr/share/applications AppDir/usr/share/metainfo AppDir/usr/share/icons
# Compiling and installing glib-resources
- glib-compile-resources --sourcedir=src/ui/ src/ui/bottles.gresource.xml --target=AppDir/usr/local/share/bottles/bottles.gresource
# Copying Bottles binary
- cp build/src/bottles AppDir/usr/bin/
# Copying Bottles python package and remove not useful files
- cp -a src AppDir/usr/local/share/bottles/bottles
- rm AppDir/usr/local/share/bottles/bottles/bottles.in AppDir/usr/local/share/bottles/bottles/meson.build
# Compiling and installing translations
- cat po/LINGUAS | while read lang
- do
- mkdir -p AppDir/usr/share/locale/$lang/LC_MESSAGES
- msgfmt -o AppDir/usr/share/locale/$lang/LC_MESSAGES/bottles.mo po/$lang.po
- done
# Copying icons
- cp -a data/icons AppDir/usr/share
- mv AppDir/usr/share/icons/symbolic/scalable/apps/*.svg AppDir/usr/share/icons/hicolor/scalable/apps/
# Copying Desktop file
- cp build/data/com.usebottles.bottles.desktop AppDir/usr/share/applications/
# Copying and compiling gschema
- cp data/com.usebottles.bottles.gschema.xml AppDir/usr/share/glib-2.0/schemas/com.usebottles.bottles.gschema.xml
- glib-compile-schemas AppDir/usr/share/glib-2.0/schemas/
# Copying appdata
- cp -a data/com.usebottles.bottles.appdata.xml.in AppDir/usr/share/metainfo/com.usebottles.bottles.appdata.xml
# Set bash as default shell
- mkdir -p AppDir/bin
- ln -sf bash AppDir/bin/sh
# Set python3 as default python
- mkdir -p AppDir/usr/bin
- ln -sf python3 AppDir/usr/bin/python
# Install p7zip
- wget https://github.com/bottlesdevs/p7zip/releases/download/16.02/p7zip.tar.xz
- tar -xf p7zip.tar.xz -C AppDir/usr/bin
# Install EasyTerm
- wget https://github.com/bottlesdevs/EasyTerm/archive/refs/tags/0.2.0.tar.gz
- mkdir -p $HOME/easyterm
- tar zxvf 0.2.0.tar.gz -C $HOME/easyterm
- cp $HOME/easyterm/EasyTerm-*/easyterm/easyterm.py AppDir/usr/bin/
- chmod +x AppDir/usr/bin/easyterm.py
# Install LibAdwaita
- git clone https://gitlab.gnome.org/GNOME/libadwaita.git && cd ./libadwaita
- git reset --hard 5cb00a274318b870f4b3ff09ed8f24d52f11f7de && export DESTDIR=../../AppDir
- mkdir build && meson build -Dtests=false -Dexamples=false --prefix=/usr --buildtype=release
- cd ./build && ninja install && cd ../../ && rm -rf ./libadwaita && unset DESTDIR
# Fetch appimage_module_patcher.sh
- wget https://gist.githubusercontent.com/azubieta/202c85f1f5a9e5c6be5cb066fcb2d5e2/raw/40f04063fa5fff21310ba075922295b09dd84bee/appimage_module_patcher.sh
- cp appimage_module_patcher.sh AppDir/usr/bin/appimage_module_patcher
- chmod +x AppDir/usr/bin/appimage_module_patcher
AppDir:
path: ./AppDir
app_info:
id: com.usebottles.bottles
name: Bottles
icon: com.usebottles.bottles
version: 2022.8.14-brescia-1
# Set the python executable as entry point
exec: usr/bin/python3.10
# Set the application main script path as argument. Use '$@' to forward CLI parameters
exec_args: "$APPDIR/usr/bin/bottles $@"
apt:
arch: [amd64, i386]
sources:
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ kinetic main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
include:
- bash
- coreutils
- gsettings-desktop-schemas
- dconf-gsettings-backend
- gsettings-backend
- libgtksourceview-5-0
- libbz2-1.0
- libcanberra-pulse
- libexpat1
- libgcc-s1
- libc6
- libc6:i386
- libgpg-error0
- libpcre3
- libprocps8
- libpython3.10-stdlib
- librsvg2-common
- libselinux1
- libgtk-4-1
- libwebkit2gtk-4.0
- libglib2.0-0
- libglib2.0-bin
- libgee-0.8-2
- libffi8ubuntu1
- libportal1
- libportal-gtk4-1
- python3-gi-cairo
- python3-certifi
- python3-yaml
- python3-requests
- python3-markdown
- gir1.2-gtk-4.0
- gir1.2-gtksource-5
- gir1.2-notify-0.7
- ibus-gtk4
- zlib1g
- libfreetype6
- libfreetype6:i386
- libgamemode0
- winbind
- cabextract
- patool
# - p7zip
- x11-utils
exclude:
- humanity-icon-theme
after_runtime: |
# rm -f $APPDIR/.bundle.yml
# rm -rf $APPDIR/usr/share/doc
# rm -rf $APPDIR/usr/share/man
# mkdir -p $APPDIR/usr/local/lib/p7zip/
# ln -s $APPDIR/usr/lib/p7zip/ $APPDIR/usr/local/lib/p7zip/
AppDir/usr/bin/appimage_module_patcher $APPDIR/usr/bin/*
files:
include:
- AppDir/usr/bin/*
- AppDir/usr/lib/x86_64-linux-gnu/libffi.so.8
- AppDir/usr/lib/x86_64-linux-gnu/libadwaita-1.so.0
exclude:
- AppDir/usr/lib/x86_64-linux-gnu/gconv
- AppDir/usr/share/man
- AppDir/.bundle.yml
- AppDir/usr/share/doc
- AppDir/usr/share/doc/*/README.*
- AppDir/usr/share/doc/*/changelog.*
- AppDir/usr/share/doc/*/NEWS.*
- AppDir/usr/share/doc/*/TODO.*
runtime:
arch: [ x86_64, i386 ]
env:
GDK_BACKEND: x11
PYTHONPATH: '$APPDIR/usr/lib/python3/dist-packages'
SSL_CERT_FILE: "$APPDIR/usr/lib/python3/dist-packages/certifi/cacert.pem"
APPDIR_MODULE_DIR: $HOME/.local/share/bottles/
# LD_LIBRARY_PATH: '$APPDIR/usr/lib/:$APPDIR/usr/lib/i386-linux-gnu/:$APPDIR/usr/lib/x86_64-linux-gnu/:$APPDIR/usr/lib32/:$APPDIR/usr/lib64/:$APPDIR/lib/:$APPDIR/lib/i386-linux-gnu/:$APPDIR/lib/x86_64-linux-gnu/:$APPDIR/lib32/:$APPDIR/lib64/:$LD_LIBRARY_PATH'
path_mappings:
- /usr/share/bottles:$APPDIR/usr/local/share/bottles
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
AppImage:
update-information: 'gh-releases-zsync|AppImage-*x86_64.AppImage.zsync'
sign-key: None
arch: x86_64