From 35058592f5b4b38c7f37358aaf274a3183a50ba9 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Sat, 13 Jul 2019 16:21:46 +0200 Subject: [PATCH] Initial commit --- LICENSE.txt | 19 +++++++++++++++ README.md | 20 ++++++++++++++++ linuxdeploy-plugin-gtk.sh | 49 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100755 linuxdeploy-plugin-gtk.sh diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..880b0ee --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright 2018-2019 TheAssassin and the linuxdeploy contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5772614 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# linuxdeploy-plugin-gtk + +This is an (as of yet experimental) plugin for linuxdeploy. Its job is to bundle additional resources for applications that use Gtk+ 2 or 3, and for common dependencies. Those involve GLib schemas for instance. + + +## Usage + +```bash +# get linuxdeploy and linuxdeploy-plugin-gtk +> wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" +> wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" + +# first option: install your app into your AppDir via `make install` etc. +# second option: bundle your app's main executables manually +# see https://docs.appimage.org/packaging-guide/from-source/native-binaries.html for more information +> [...] + +# call through linuxdeploy +> ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage --icon mypackage.png --desktop-file mypackage.desktop +``` diff --git a/linuxdeploy-plugin-gtk.sh b/linuxdeploy-plugin-gtk.sh new file mode 100755 index 0000000..4d321db --- /dev/null +++ b/linuxdeploy-plugin-gtk.sh @@ -0,0 +1,49 @@ +#! /bin/bash + +# abort on all errors +set -e + +if [ "$DEBUG" != "" ]; then + set -x +fi + +script=$(readlink -f "$0") + +show_usage() { + echo "Usage: $script --appdir " + echo + echo "Bundles resources for applications that use Gtk 2 or 3 into an AppDir" +} + +APPDIR= + +while [ "$1" != "" ]; do + case "$1" in + --plugin-api-version) + echo "0" + exit 0 + ;; + --appdir) + APPDIR="$2" + shift + shift + ;; + --help) + show_usage + exit 0 + ;; + *) + echo "Invalid argument: $1" + echo + show_usage + exit 1 + ;; + esac +done + +if [ "$APPDIR" == "" ]; then + show_usage + exit 1 +fi + +mkdir -p "$APPDIR"