Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:munix9:unstable
openparsec
appimage.AppRun
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File appimage.AppRun of Package openparsec
#!/bin/bash HERE="$(dirname "$(readlink -f "${0}")")" [[ -z $APPIMAGE ]] && export APPIMAGE="$HERE" [[ -z $APPDIR ]] && export APPDIR="$HERE" [[ -z $ARGV0 ]] && export ARGV0="$0" _app="openparsec" _debug="" #_debug="echo" _general_home="$(dirname "$APPIMAGE")/${_app}-@MAIN_VERSION@.home" # # taken from https://github.com/AppImage/AppImageKit/blob/master/src/AppRun.c # export PYTHONHOME=${HERE}/usr TMP_PATH="%s/usr/bin:%s/usr/sbin:%s/usr/games:%s/bin:%s/sbin" export PATH="${TMP_PATH//\%s/$HERE}:$PATH" TMP_LD_LIBRARY_PATH="%s/usr/lib:%s/usr/lib/i386-linux-gnu:%s/usr/lib/x86_64-linux-gnu:%s/usr/lib32:%s/usr/lib64:%s/lib" TMP_LD_LIBRARY_PATH+=":%s/lib/i386-linux-gnu:%s/lib/x86_64-linux-gnu:%s/lib32:%s/lib64:%s/usr/lib64/pulseaudio" export LD_LIBRARY_PATH="${TMP_LD_LIBRARY_PATH//\%s/$HERE}:$LD_LIBRARY_PATH" export PYTHONPATH=${HERE}/usr/share/pyshared:$PYTHONPATH export XDG_DATA_DIRS=${HERE}/usr/share:/usr/local/share:/usr/share:$XDG_DATA_DIRS export PERLLIB=${HERE}/usr/share/perl5:${HERE}/usr/lib/perl5:$PERLLIB export GSETTINGS_SCHEMA_DIR=${HERE}/usr/share/glib-2.0/schemas:$GSETTINGS_SCHEMA_DIR TMP_QT_PLUGIN_PATH="%s/usr/lib/qt4/plugins:%s/usr/lib/i386-linux-gnu/qt4/plugins:%s/usr/lib/x86_64-linux-gnu/qt4/plugins" TMP_QT_PLUGIN_PATH+=":%s/usr/lib32/qt4/plugins:%s/usr/lib64/qt4/plugins:%s/usr/lib/qt5/plugins" TMP_QT_PLUGIN_PATH+=":%s/usr/lib/i386-linux-gnu/qt5/plugins:%s/usr/lib/x86_64-linux-gnu/qt5/plugins" TMP_QT_PLUGIN_PATH+=":%s/usr/lib32/qt5/plugins:%s/usr/lib64/qt5/plugins" export QT_PLUGIN_PATH="${TMP_QT_PLUGIN_PATH//\%s/$HERE}:$QT_PLUGIN_PATH" export GST_PLUGIN_SYSTEM_PATH=${HERE}/usr/lib/gstreamer:$GST_PLUGIN_SYSTEM_PATH export GST_PLUGIN_SYSTEM_PATH_1_0=${HERE}/usr/lib/gstreamer-1.0:$GST_PLUGIN_SYSTEM_PATH_1_0 export PYTHONDONTWRITEBYTECODE=1 export ICU_DATA=${HERE}/usr/share/icu # # additional settings # # get rid of '(app:...): Gtk-WARNING **: ...: Unable to locate theme engine in module_path: "murrine",' export GTK_PATH64=${HERE}/usr/lib64/gtk-2.0:$GTK_PATH64 # get rid of 'Qt: Session management error: None of the authentication protocols specified are supported' unset SESSION_MANAGER r_err () { echo "error: $1" exit 1 } app_create_general_home () { local _up_dir [[ -d $_general_home ]] && { echo "general home dir '$_general_home' already exists." exit 0 } _up_dir="$(dirname "$_general_home")" [[ -w $_up_dir ]] || { echo "parent dir '$_up_dir' is not writable." ; exit 1 ; } $_debug mkdir -p -m 0700 "$_general_home" || { echo "general home dir '$_general_home' could not be created." exit 1 } echo "general home dir '$_general_home' created." exit 0 } app_info () { if command -v less >/dev/null 2>&1 ; then less "${HERE}/.info" elif command -v more >/dev/null 2>&1 ; then more -d "${HERE}/.info" else cat "${HERE}/.info" fi exit 0 } app_help () { cat << EOF OpenParsec client @COMP_VERSION@ - Space shooter in 3D Usage: $ARGV0 [OPTION]... OpenParsec options: --help Show OpenParsec client help. AppImage options: --openparsec-server Start the OpenParsec server. --openparsec-create-general-home Create a general home directory depending on the main version $_general_home --openparsec-info Show information about the OpenParsec packages used to create this AppImage. -h, --openparsec-help Show this help and exit. EOF exit 0 } _server=false _args=() while [ $# -ne 0 ] ; do arg="$1" case $arg in --openparsec-server) _server=true shift ;; --openparsec-create-general-home) app_create_general_home shift ;; --openparsec-info) app_info shift ;; -h|--openparsec-help) app_help shift ;; *) # save it in an array for later use _args+=("$1") shift ;; esac done # restore positional parameters set -- "${_args[@]}" # export general home directory [[ -d $_general_home && -w $_general_home ]] && { export HOME="$_general_home" export XDG_DATA_HOME="$HOME/.local/share" } echo "Setting \$HOME to $HOME" if $_server ; then $_debug cd "${HERE}/usr/lib/openparsec/server" $_debug exec ./parsec_server "$@" else $_debug cd "${HERE}/usr/lib/openparsec/client" $_debug exec ./parsec "$@" fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor