#!/bin/sh # Evelauncher shared functions desktop_msg() { if [ -x "$(which notify-send 2>/dev/null)" ] ;then notify-send -i eve 'EVE Online Launcher' "$@" fi echo "$(basename $0): $@" } check_custom_wine() { EVECONF=$HOME/.config/CCP/EVE.conf CUSTOMWP=$(grep CustomWinePath $EVECONF | cut -d= -f2) SHAREDIR=$(grep SharedCacheFolder $EVECONF | cut -d= -f2) UCW=$(grep UseCustomWine $EVECONF | cut -d= -f2) WINEPREFIX=${SHAREDIR}wineenv if [ "x$UCW" = "xtrue" ] ;then WINEPATH=${CUSTOMWP%/*} else desktop_msg "INFO: \"Use custom Wine\" not set, using internal version." CUSTOMWP=${SHAREDIR}wine WINEPATH=${SHAREDIR}wine/bin fi if [ ! -x "$WINEPATH/wine" ] ;then desktop_msg "ERROR: \"$CUSTOMWP\" from \"Custom Wine path\" not found!" exit 1 fi }