From d16a5b29e81bb6e0e58af2a97484defccacf355c Mon Sep 17 00:00:00 2001 From: BeatLink Date: Fri, 16 Aug 2019 20:00:38 -0500 Subject: Move branding and settings to seperate repos and move browser to top level --- linux/appimage/build_appimage.sh | 44 ++++++++++++++++ linux/appimage/content/.DirIcon | 1 + linux/appimage/content/AppRun | 12 +++++ linux/appimage/content/librewolf.desktop | 6 +++ linux/appimage/content/librewolf.svg | 90 ++++++++++++++++++++++++++++++++ 5 files changed, 153 insertions(+) create mode 100755 linux/appimage/build_appimage.sh create mode 120000 linux/appimage/content/.DirIcon create mode 100755 linux/appimage/content/AppRun create mode 100644 linux/appimage/content/librewolf.desktop create mode 100644 linux/appimage/content/librewolf.svg (limited to 'linux/appimage') diff --git a/linux/appimage/build_appimage.sh b/linux/appimage/build_appimage.sh new file mode 100755 index 0000000..c3e53d0 --- /dev/null +++ b/linux/appimage/build_appimage.sh @@ -0,0 +1,44 @@ +#!/bin/sh +printf "\n\n------------------------------------ APPIMAGE BUILD -----------------------------------------\n"; + +# Aborts the script upon any faliure +set -e; + +# Sets up script variables +BINARY_TARBALL=$1 +APPIMAGE_FILE=$2 +_SCRIPT_FOLDER=$(realpath $(dirname $0)); +_BINARY_TARBALL_EXTRACTED_FOLDER=$_SCRIPT_FOLDER/librewolf; +_BUILD_APPIMAGE_FILE=$_SCRIPT_FOLDER/LibreWolf*.AppImage; +_APPIMAGETOOL_DOWNLOAD_URL=https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage; +_APPIMAGETOOL_EXTRACTED_FOLDER=$_SCRIPT_FOLDER/squashfs-root; +_APPIMAGETOOL_FILE=$_SCRIPT_FOLDER/appimagetool; +_APPIMAGE_CONTENT_FOLDER=$_SCRIPT_FOLDER/content + +# Extracts the binary tarball +printf "\nExtracting librewolf binary tarball\n"; +mkdir $_BINARY_TARBALL_EXTRACTED_FOLDER; +tar -xvf $BINARY_TARBALL -C $_BINARY_TARBALL_EXTRACTED_FOLDER; + +# Copy appimage resources to main tarball +printf "Copying AppImage resources to binary tarball folder\n"; +cp -vrT $_APPIMAGE_CONTENT_FOLDER $_BINARY_TARBALL_EXTRACTED_FOLDER; + +# Downloads appimage tool +printf "\nDownloading AppImage Tool\n"; +apt -qq update && apt -qqy install wget; +wget $_APPIMAGETOOL_DOWNLOAD_URL -O $_APPIMAGETOOL_FILE; +chmod +x $_APPIMAGETOOL_FILE; +$_APPIMAGETOOL_FILE --appimage-mount $_APPIMAGETOOL_EXTRACTED_FOLDER; +rm -f $_APPIMAGETOOL_FILE; + +# Generate AppImage +printf "\nGenerating AppImage\n"; +ARCH=x86_64 $_APPIMAGETOOL_EXTRACTED_FOLDER/AppRun $_BINARY_TARBALL_EXTRACTED_FOLDER; +rm -rf $_BINARY_TARBALL_EXTRACTED_FOLDER; +rm -rf $_APPIMAGETOOL_EXTRACTED_FOLDER; +chmod +x $_BUILD_APPIMAGE_FILE; + +# Move AppImage to specified location +printf "\nMoving AppImage to specified location\n"; +mv $_BUILD_APPIMAGE_FILE $APPIMAGE_FILE; diff --git a/linux/appimage/content/.DirIcon b/linux/appimage/content/.DirIcon new file mode 120000 index 0000000..2653ffb --- /dev/null +++ b/linux/appimage/content/.DirIcon @@ -0,0 +1 @@ +librewolf.svg \ No newline at end of file diff --git a/linux/appimage/content/AppRun b/linux/appimage/content/AppRun new file mode 100755 index 0000000..e347dcd --- /dev/null +++ b/linux/appimage/content/AppRun @@ -0,0 +1,12 @@ +#!/bin/sh +SELF=$(readlink -f "$0") +HERE=${SELF%/*} +export PATH="${HERE}:${HERE}/usr/bin/:${HERE}/usr/sbin/:${HERE}/usr/games/:${HERE}/bin/:${HERE}/sbin/${PATH:+:$PATH}" +export LD_LIBRARY_PATH="${HERE}/usr/lib/:${HERE}/usr/lib/i386-linux-gnu/:${HERE}/usr/lib/x86_64-linux-gnu/:${HERE}/usr/lib32/:${HERE}/usr/lib64/:${HERE}/lib/:${HERE}/lib/i386-linux-gnu/:${HERE}/lib/x86_64-linux-gnu/:${HERE}/lib32/:${HERE}/lib64/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" +export PYTHONPATH="${HERE}/usr/share/pyshared/${PYTHONPATH:+:$PYTHONPATH}" +export XDG_DATA_DIRS="${HERE}/usr/share/${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}" +export PERLLIB="${HERE}/usr/share/perl5/:${HERE}/usr/lib/perl5/${PERLLIB:+:$PERLLIB}" +export GSETTINGS_SCHEMA_DIR="${HERE}/usr/share/glib-2.0/schemas/${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR}" +export QT_PLUGIN_PATH="${HERE}/usr/lib/qt4/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt4/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt4/plugins/:${HERE}/usr/lib32/qt4/plugins/:${HERE}/usr/lib64/qt4/plugins/:${HERE}/usr/lib/qt5/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt5/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt5/plugins/:${HERE}/usr/lib32/qt5/plugins/:${HERE}/usr/lib64/qt5/plugins/${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}" +EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1) +exec "${EXEC}" "$@" diff --git a/linux/appimage/content/librewolf.desktop b/linux/appimage/content/librewolf.desktop new file mode 100644 index 0000000..3e36765 --- /dev/null +++ b/linux/appimage/content/librewolf.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=LibreWolf +Exec=librewolf +Icon=librewolf +Type=Application +Categories=Network; diff --git a/linux/appimage/content/librewolf.svg b/linux/appimage/content/librewolf.svg new file mode 100644 index 0000000..2c6262a --- /dev/null +++ b/linux/appimage/content/librewolf.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + -- cgit