Skip to content

Commit

Permalink
AppImage: remove custom AppRun
Browse files Browse the repository at this point in the history
Now there are linuxdeploy-plugins for that
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Jan 9, 2021
1 parent 021da10 commit f573111
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 110 deletions.
50 changes: 22 additions & 28 deletions scripts/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ runCmd() {
fi
}

safeCopy() {
local src=("${@:1:$#-1}")
local dst="${*:$#}"

for s in "${src[@]}"; do
runCmd cp "$s" --archive --parents --target-directory="$dst" --verbose
done
}

# Constant variables
if [[ $# -lt 2 ]]; then
echo "$0: WORKSPACE APPDIR"
Expand All @@ -29,35 +20,38 @@ fi

WORKSPACE="$1"
APPDIR="$2"
LIBARCHDIR="lib/x86_64-linux-gnu"

# Add extra files in AppDir
[[ -z "$VERSION" ]] && cp --recursive --verbose "$WORKSPACE/src" "$APPDIR/usr/" # Debug info
safeCopy \
"/usr/share/"{glib-2.0,terminfo} \
"/usr/$LIBARCHDIR/"{gdk-pixbuf-2.0,gtk-3.0,libgtk-3-0} \
"/usr/$LIBARCHDIR/libgdk_pixbuf"* \
"/usr/$LIBARCHDIR/libgobject"* \
"/usr/$LIBARCHDIR/libgio"* \
"$APPDIR"
runCmd glib-compile-schemas "$APPDIR/usr/share/glib-2.0/schemas"

# Download linuxdeploy

# Reset arguments
set --

# Download linuxdeploy and plugins
BUNDLER="$WORKSPACE/linuxdeploy.AppImage"
runCmd wget --no-verbose "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" --output-document="$BUNDLER"
runCmd chmod --verbose a+x "$BUNDLER"
runCmd wget --no-verbose "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" --output-document="$BUNDLER" \
&& set -- "$@" --output appimage
runCmd wget --no-verbose "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" \
&& set -- "$@" --plugin gtk
runCmd wget --no-verbose "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-ncurses/master/linuxdeploy-plugin-ncurses.sh" \
&& set -- "$@" --plugin ncurses
runCmd wget --no-verbose "https://raw.githubusercontent.com/linuxdeploy/misc-plugins/master/gettext/linuxdeploy-plugin-gettext.sh" \
&& set -- "$@" --plugin gettext
if [[ -z "$VERSION" ]]; then
export LINUXDEPLOY_PLUGIN_GDB_SRC="$WORKSPACE/src"
runCmd wget --no-verbose "https://raw.githubusercontent.com/linuxdeploy/misc-plugins/master/gdb/linuxdeploy-plugin-gdb.sh" \
&& set -- "$@" --plugin gdb
fi
runCmd chmod --verbose a+x ./*.AppImage ./*.sh

# Set useful variables for linuxdeploy
export ARCH=x86_64
export UPDATE_INFORMATION="gh-releases-zsync|${GITHUB_REPOSITORY//\//|}|${VERSION:-"continuous"}|CPU-X-*$ARCH.AppImage.zsync"
export VERBOSE=1
#export DEBUG=1
export DISABLE_COPYRIGHT_FILES_DEPLOYMENT=1

# Run linuxdeploy
runCmd mkdir --parents --verbose "$WORKSPACE/AppImage" && runCmd cd "$_"
runCmd "$BUNDLER" \
--appdir="$APPDIR" \
--custom-apprun="$WORKSPACE/scripts/run_appimage.sh" \
--desktop-file="$APPDIR/usr/share/applications/cpu-x.desktop" \
--output appimage \
--verbosity=1
--verbosity=1 \
"$@"
82 changes: 0 additions & 82 deletions scripts/run_appimage.sh

This file was deleted.

0 comments on commit f573111

Please sign in to comment.