Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Documentation/debloated_packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
This command is ran in the get-dependencies.sh script.
It replaces some default Archlinux packages with smaller versions intended for AppImages.
More info at https://github.com/pkgforge-dev/archlinux-pkgs-debloated

------------------------
Example Code
------------------------
get-debloated-pkgs --add-common --prefer-nano

------------------------
GENERAL COMMANDS
------------------------
--add-common
Install a curated set of common packages, implies --add-mesa

--prefer-nano
Prefer 'nano' variants of packages instead of 'mini'

-------- ----------------
Speclized Commands
-------------------------
--ffmpeg-mini
which removes 20 MiB libx265.so dependency, also removes AV1 enconding support (decoding still works).

--gdk-pixbuf2-mini, --librsvg-mini
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)

--gtk3-mini
??

--gtk4-mini
??

--icu-mini
Much smaller version of libicudata.so that is less than 3 MIB in size (10x reduction in size).

--intel-media-driver-mini
?

--kiconthemes-mini
?

--llvm-libs-mini
smaller version of libLLVM.so which is a 150+ MiB library, this version is reduced down to 99 MiB.

--llvm-libs-nano
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.

--mangohud-mini
Comment on lines +22 to +49
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are not flags.

?

--mesa-mini and vulkan-{radeon,intel,etc}-mini
remove linking to libLLVM.so, making any hardware accelerated app tiny as result.

--mesa-nano and vulkan-{radeon,intel,etc}-nano
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.

--mesa-zink-mini
?

--opus-mini
I have no idea why Archlinux makes this lib 5 MiB when both ubuntu and alpine make it <500 KiB

--qt6-base-mini and libxml2-mini
remove 30 MiB libicudata lib dependency.

--x265-mini
Comment on lines +52 to +67
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are not flags either

?
48 changes: 48 additions & 0 deletions Documentation/install_from_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Examples for compiling software in the get-dependencies.sh script.

----------------
Compiling using Meson
----------------

echo "Installing from source..."
echo "---------------------------------------------------------------"
git clone https://gitlab.com/guillermop/master-key.git source && (
cd ./source
#Setiing Application Version for sharun.
TAG=$(git tag --sort=-v:refname | grep -vi 'rc\|alpha' | head -1)
git checkout "$TAG"
echo "$TAG" > ~/version
# Building
meson setup build --prefix=/usr
meson compile -C build
meson install -C build
)

-----------------------------------------
Downloading swift compiler then compiling
-----------------------------------------

SWIFT_VERSION="6.2"
if [ "$ARCH" = "aarch64" ]; then
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204-aarch64/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64.tar.gz"
else
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz"
fi
if [ ! -d "/opt/swift" ]; then
curl -L "$URL" -o swift.tar.gz
sudo mkdir -p /opt/swift
sudo tar -xzf swift.tar.gz -C /opt/swift --strip-components=1
fi
export PATH="/opt/swift/usr/bin:$PATH"

echo "Installing swiftynotes from source packages..."
echo "---------------------------------------------------------------"
git clone https://github.com/makoni/swifty-notes-gtk.git source
cd source
mkdir -p Sources/CSpelling/include
cp /usr/include/libspelling-1/libspelling.h Sources/CSpelling/include/
export SWIFT_FLAGS="-Xcc -I$(pwd)/Sources/CSpelling/include"
chmod +x packaging/release/assemble-install-root.sh
./packaging/release/assemble-install-root.sh --prefix /usr --dest build-root
sudo cp -rv build-root/usr/* /usr/
cd ..
134 changes: 134 additions & 0 deletions Documentation/sharun_environment_variable.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---------------
Default Exports
---------------
export ARCH
Used by sharun to set x86_64 or aarch64 in appimage name

VERSION=$(pacman -Q PACKAGENAME | awk '{print $2; exit}')
export VERSION
example command to get version of application here

export OUTPATH=./dist
Where sharun will store the appimage

export ADD_HOOKS="self-updater.hook"
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
Enable self updating, and sets the path used by zsync.

export ICON=PATH_OR_URL_TO_ICON
Path or URL to an icon file to include.

export DESKTOP=PATH_OR_URL_TO_DESKTOP_ENTRY
Path or URL to a .desktop file to include.

------------------------
These effect the builder
------------------------
export NO_STRIP=1
Disable stripping binaries and libraries if set.
export APPDIR=./AppDir
Destination AppDir (default: ./AppDir).
export ANYLINUX_LIB
Preloads a library that unsets environment variables known to
cause problems to child processes. Set to 0 to disable.
Additionally you can set ANYLINUX_DO_NOT_LOAD_LIBS to a
list of colon separated libraries to prevent from being
dlopened, the entries support simple globbing, example:
export ANYLINUX_DO_NOT_LOAD_LIBS='libpipewire-0.3.so*'
Useful for applications that will try to dlopen several
optional dependencies that you do not want to include.
export OUTPUT_APPIMAGE=1
Set to 1 to turn the deployed AppDir into an AppImage.

------------------------
System Libraries
------------------------
export DEPLOY_PYTHON=1
Set to 1 to deploy system Python. Will remove all pycache
files, set DEBLOAT_PYTHON to 0 to prevent this.
export LIB_DIR
Set source library directory if autodetection fails.
export PATH_MAPPING
Configures and preloads pathmap.
Set this variable if the application is hardcoded to look
into /usr and similar locations, example:

export PATH_MAPPING='
/usr/lib/myapp_libs:\${SHARUN_DIR}/lib/myapp_libs
/etc/myapp.conf:\${SHARUN_DIR}/etc/myapp.conf
'

\${SHARUN_DIR} here must NOT expand! The braces in the variable are mandatory!
export DEPLOY_LOCALE=1
Set to 1 to deploy locale data.

------------------------
GUI Toolkits
------------------------
export DEPLOY_GTK=1
Set to 1 to force deployment of GTK.
export DEPLOY_QT=1
Set to 1 to force deployment of Qt. Will determine to deploy
QtWebEngine and Qml as well, these can be controlled with
DEPLOY_QT_WEB_ENGINE and DEPLOY_QML. Set to 1 enable, 0 disable
Set QT_DIR if the system Qt directory in LIB_DIR has a different name.
export STARTUPWMCLASS=ext.website.appname
export GTK_CLASS_FIX=1
Default to Wayland's wmclass. For X11, GTK_CLASS_FIX will force the wmclass to be the Wayland one.

------------------------
Hardware support
------------------------
export DEPLOY_SDL=1
Set to 1 to force deployment of SDL.

------------------------
3D Support
------------------------
export DEPLOY_OPENGL=1
Set to 1 to force deployment of OpenGL.
export DEPLOY_VULKAN=1
Set to 1 to force deployment of Vulkan.
export ALWAYS_SOFTWARE=1
Set to 1 to enable. Sets several env variables to make
applications use software rendering, use this option when
you do not want hardware acceleration.
Will fail if the application makes use of mesa during deployment.
------------------------
Audio Support
------------------------
export DEPLOY_PIPEWIRE=1
Set to 1 to force deployment of Pipewire.
export DEPLOY_PULSE=1
Set to 1 to force deployment of pulseaudio.

------------------------
Image Support
------------------------
export DEPLOY_BABL=1
Set to 1 to force deployment of babl.
export DEPLOY_GDK=1
Set to 1 to force deployment of gdk-pixbuf.
export DEPLOY_GEGL=1
Set to 1 to force deployment of GEGL.
export DEPLOY_GLYCIN=1
Set to 1 to force deployment of Glycin.
export DEPLOY_IMAGEMAGICK=1
Set to 1 to force deployment of ImageMagick.
export DEPLOY_LIBHEIF=1
Set to 1 to force deployment of libheif.

------------------------
Media Playback
------------------------
export DEPLOY_GSTREAMER=1
export DEPLOY_GSTREAMER_ALL=1
Set to 1 to force deployment of GStreamer. By default
several gstreamer plugins are removed, set DEPLOY_GSTREAMER_ALL=1
if you can to deploy ALL Gstreamer plugins. (Very bloated).

------------------------
Security
------------------------
export EPLOY_P11KIT=1
Set to 1 to force deployment of p11-kit.