Skip to content

Commit f2be475

Browse files
committed
documenting workflow
To help new people find documentation.
1 parent 9dba173 commit f2be475

3 files changed

Lines changed: 250 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
This command is ran in the get-dependencies.sh script.
2+
It replaces some default Archlinux packages with smaller versions intended for AppImages.
3+
More info at https://github.com/pkgforge-dev/archlinux-pkgs-debloated
4+
5+
------------------------
6+
Example Code
7+
------------------------
8+
get-debloated-pkgs --add-common --prefer-nano
9+
10+
------------------------
11+
GENERAL COMMANDS
12+
------------------------
13+
--add-common
14+
Install a curated set of common packages, implies --add-mesa
15+
16+
--prefer-nano
17+
Prefer 'nano' variants of packages instead of 'mini'
18+
19+
-------- ----------------
20+
Speclized Commands
21+
-------------------------
22+
--ffmpeg-mini
23+
which removes 20 MiB libx265.so dependency, also removes AV1 enconding support (decoding still works).
24+
25+
--gdk-pixbuf2-mini, --librsvg-mini
26+
These remove the glycin dependency, ~20 MiB of bloat. (glycin is also super buggy and depends on bwrap which is problematic for running appimages in very old kernels)
27+
28+
--gtk3-mini
29+
??
30+
31+
--gtk4-mini
32+
??
33+
34+
--icu-mini
35+
Much smaller version of libicudata.so that is less than 3 MIB in size (10x reduction in size).
36+
37+
--intel-media-driver-mini
38+
?
39+
40+
--kiconthemes-mini
41+
?
42+
43+
--llvm-libs-mini
44+
smaller version of libLLVM.so which is a 150+ MiB library, this version is reduced down to 99 MiB.
45+
46+
--llvm-libs-nano
47+
similar to mini, but with the llvm targets limited (x86_64 or aarch64) + AMDGPU, this reduces the size of the library to less than 70 MiB. Note this will cause issues if application depends on more llvm targets like compilers.
48+
49+
--mangohud-mini
50+
?
51+
52+
--mesa-mini and vulkan-{radeon,intel,etc}-mini
53+
remove linking to libLLVM.so, making any hardware accelerated app tiny as result.
54+
55+
--mesa-nano and vulkan-{radeon,intel,etc}-nano
56+
similar to mesa-mini, built with -Os which makes it ~30% smaller. Note -Os can have a performance and even stability issue so do not use this package in apps like emulators where this is critical.
57+
58+
--mesa-zink-mini
59+
?
60+
61+
--opus-mini
62+
I have no idea why Archlinux makes this lib 5 MiB when both ubuntu and alpine make it <500 KiB
63+
64+
--qt6-base-mini and libxml2-mini
65+
remove 30 MiB libicudata lib dependency.
66+
67+
--x265-mini
68+
?

Documentation/install_from_source

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Examples for compiling software in the get-dependencies.sh script.
2+
3+
----------------
4+
Compiling using Meson
5+
----------------
6+
7+
echo "Installing from source..."
8+
echo "---------------------------------------------------------------"
9+
git clone https://gitlab.com/guillermop/master-key.git source && (
10+
cd ./source
11+
#Setiing Application Version for sharun.
12+
TAG=$(git tag --sort=-v:refname | grep -vi 'rc\|alpha' | head -1)
13+
git checkout "$TAG"
14+
echo "$TAG" > ~/version
15+
# Building
16+
meson setup build --prefix=/usr
17+
meson compile -C build
18+
meson install -C build
19+
)
20+
21+
-----------------------------------------
22+
Downloading swift compiler then compiling
23+
-----------------------------------------
24+
25+
SWIFT_VERSION="6.2"
26+
if [ "$ARCH" = "aarch64" ]; then
27+
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204-aarch64/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64.tar.gz"
28+
else
29+
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz"
30+
fi
31+
if [ ! -d "/opt/swift" ]; then
32+
curl -L "$URL" -o swift.tar.gz
33+
sudo mkdir -p /opt/swift
34+
sudo tar -xzf swift.tar.gz -C /opt/swift --strip-components=1
35+
fi
36+
export PATH="/opt/swift/usr/bin:$PATH"
37+
38+
echo "Installing swiftynotes from source packages..."
39+
echo "---------------------------------------------------------------"
40+
git clone https://github.com/makoni/swifty-notes-gtk.git source
41+
cd source
42+
mkdir -p Sources/CSpelling/include
43+
cp /usr/include/libspelling-1/libspelling.h Sources/CSpelling/include/
44+
export SWIFT_FLAGS="-Xcc -I$(pwd)/Sources/CSpelling/include"
45+
chmod +x packaging/release/assemble-install-root.sh
46+
./packaging/release/assemble-install-root.sh --prefix /usr --dest build-root
47+
sudo cp -rv build-root/usr/* /usr/
48+
cd ..
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---------------
2+
Default Exports
3+
---------------
4+
export ARCH
5+
Used by sharun to set x86_64 or aarch64 in appimage name
6+
7+
VERSION=$(pacman -Q PACKAGENAME | awk '{print $2; exit}')
8+
export VERSION
9+
example command to get version of application here
10+
11+
export OUTPATH=./dist
12+
Where sharun will store the appimage
13+
14+
export ADD_HOOKS="self-updater.hook"
15+
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
16+
Enable self updating, and sets the path used by zsync.
17+
18+
export ICON=PATH_OR_URL_TO_ICON
19+
Path or URL to an icon file to include.
20+
21+
export DESKTOP=PATH_OR_URL_TO_DESKTOP_ENTRY
22+
Path or URL to a .desktop file to include.
23+
24+
------------------------
25+
These effect the builder
26+
------------------------
27+
export NO_STRIP=1
28+
Disable stripping binaries and libraries if set.
29+
export APPDIR=./AppDir
30+
Destination AppDir (default: ./AppDir).
31+
export ANYLINUX_LIB
32+
Preloads a library that unsets environment variables known to
33+
cause problems to child processes. Set to 0 to disable.
34+
Additionally you can set ANYLINUX_DO_NOT_LOAD_LIBS to a
35+
list of colon separated libraries to prevent from being
36+
dlopened, the entries support simple globbing, example:
37+
export ANYLINUX_DO_NOT_LOAD_LIBS='libpipewire-0.3.so*'
38+
Useful for applications that will try to dlopen several
39+
optional dependencies that you do not want to include.
40+
export OUTPUT_APPIMAGE=1
41+
Set to 1 to turn the deployed AppDir into an AppImage.
42+
43+
------------------------
44+
System Libraries
45+
------------------------
46+
export DEPLOY_PYTHON=1
47+
Set to 1 to deploy system Python. Will remove all pycache
48+
files, set DEBLOAT_PYTHON to 0 to prevent this.
49+
export LIB_DIR
50+
Set source library directory if autodetection fails.
51+
export PATH_MAPPING
52+
Configures and preloads pathmap.
53+
Set this variable if the application is hardcoded to look
54+
into /usr and similar locations, example:
55+
56+
export PATH_MAPPING='
57+
/usr/lib/myapp_libs:\${SHARUN_DIR}/lib/myapp_libs
58+
/etc/myapp.conf:\${SHARUN_DIR}/etc/myapp.conf
59+
'
60+
61+
\${SHARUN_DIR} here must NOT expand! The braces in the variable are mandatory!
62+
export DEPLOY_LOCALE=1
63+
Set to 1 to deploy locale data.
64+
65+
------------------------
66+
GUI Toolkits
67+
------------------------
68+
export DEPLOY_GTK=1
69+
Set to 1 to force deployment of GTK.
70+
export DEPLOY_QT=1
71+
Set to 1 to force deployment of Qt. Will determine to deploy
72+
QtWebEngine and Qml as well, these can be controlled with
73+
DEPLOY_QT_WEB_ENGINE and DEPLOY_QML. Set to 1 enable, 0 disable
74+
Set QT_DIR if the system Qt directory in LIB_DIR has a different name.
75+
export STARTUPWMCLASS=ext.website.appname
76+
export GTK_CLASS_FIX=1
77+
Default to Wayland's wmclass. For X11, GTK_CLASS_FIX will force the wmclass to be the Wayland one.
78+
79+
------------------------
80+
Hardware support
81+
------------------------
82+
export DEPLOY_SDL=1
83+
Set to 1 to force deployment of SDL.
84+
85+
------------------------
86+
3D Support
87+
------------------------
88+
export DEPLOY_OPENGL=1
89+
Set to 1 to force deployment of OpenGL.
90+
export DEPLOY_VULKAN=1
91+
Set to 1 to force deployment of Vulkan.
92+
export ALWAYS_SOFTWARE=1
93+
Set to 1 to enable. Sets several env variables to make
94+
applications use software rendering, use this option when
95+
you do not want hardware acceleration.
96+
Will fail if the application makes use of mesa during deployment.
97+
------------------------
98+
Audio Support
99+
------------------------
100+
export DEPLOY_PIPEWIRE=1
101+
Set to 1 to force deployment of Pipewire.
102+
export DEPLOY_PULSE=1
103+
Set to 1 to force deployment of pulseaudio.
104+
105+
------------------------
106+
Image Support
107+
------------------------
108+
export DEPLOY_BABL=1
109+
Set to 1 to force deployment of babl.
110+
export DEPLOY_GDK=1
111+
Set to 1 to force deployment of gdk-pixbuf.
112+
export DEPLOY_GEGL=1
113+
Set to 1 to force deployment of GEGL.
114+
export DEPLOY_GLYCIN=1
115+
Set to 1 to force deployment of Glycin.
116+
export DEPLOY_IMAGEMAGICK=1
117+
Set to 1 to force deployment of ImageMagick.
118+
export DEPLOY_LIBHEIF=1
119+
Set to 1 to force deployment of libheif.
120+
121+
------------------------
122+
Media Playback
123+
------------------------
124+
export DEPLOY_GSTREAMER=1
125+
export DEPLOY_GSTREAMER_ALL=1
126+
Set to 1 to force deployment of GStreamer. By default
127+
several gstreamer plugins are removed, set DEPLOY_GSTREAMER_ALL=1
128+
if you can to deploy ALL Gstreamer plugins. (Very bloated).
129+
130+
------------------------
131+
Security
132+
------------------------
133+
export EPLOY_P11KIT=1
134+
Set to 1 to force deployment of p11-kit.

0 commit comments

Comments
 (0)