diff options
author | Jernuh Zakalwe | 2020-09-13 15:00:48 +0200 |
---|---|---|
committer | Jernuh Zakalwe | 2020-09-13 15:00:48 +0200 |
commit | fc79547a67652b69c8a76219d41e8459406c0d53 (patch) | |
tree | 0109e5c580cd0d676bd643f61edfd288e65b3a42 | |
parent | cf8c8d2359a24144915abf6125086bd7be2b1152 (diff) | |
download | aur-fc79547a67652b69c8a76219d41e8459406c0d53.tar.gz |
Format Changes in all Shellscripts to save space.
Minor Changes in evesetup.shlib.
-rwxr-xr-x | build_installer.sh | 80 | ||||
-rwxr-xr-x | build_lite_installer.sh | 62 | ||||
-rw-r--r-- | evebackup | 60 | ||||
-rw-r--r-- | evelauncher.sh.in | 10 | ||||
-rw-r--r-- | evesetup.shlib | 196 | ||||
-rw-r--r-- | evewine | 8 | ||||
-rw-r--r-- | evewinetricks | 6 | ||||
-rw-r--r-- | setup.sh.in | 320 | ||||
-rw-r--r-- | setup_lite.sh.in | 200 |
9 files changed, 472 insertions, 470 deletions
diff --git a/build_installer.sh b/build_installer.sh index 437c8fad3fcf..cf0ef9e28f37 100755 --- a/build_installer.sh +++ b/build_installer.sh @@ -26,33 +26,33 @@ pelcs=$(expr $pshal + $pofsl) plc=1 while read pline ;do - if [ $plc -eq $pdvcs ] ;then - dvcsum=${pline#*\'} - dvcsum=${dvcsum%%\'*} - fi - if [ $plc -eq $pelcs ] ;then - elcsum=${pline#*\'} - elcsum=${elcsum%%\'*} - fi - plc=$(expr $plc + 1) + if [ $plc -eq $pdvcs ] ;then + dvcsum=${pline#*\'} + dvcsum=${dvcsum%%\'*} + fi + if [ $plc -eq $pelcs ] ;then + elcsum=${pline#*\'} + elcsum=${elcsum%%\'*} + fi + plc=$(expr $plc + 1) done < PKGBUILD if [ ! -x "$(which curl 2>/dev/null)" ] ;then - printf "\nError: Curl not found. Curl are needed for downloading makeself build tool." - printf "\n\tPlease install curl with your Package Manager.\n" - printf "\nLeaving.\n\n" - exit 0 + printf "\nError: Curl not found. Curl are needed for downloading makeself build tool." + printf "\n\tPlease install curl with your Package Manager.\n" + printf "\nLeaving.\n\n" + exit 0 fi if [ ! -f "./makeself-2.4.0.run" ] ;then - printf "\nGet makeself...\n\n" - curl -L -O https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run + printf "\nGet makeself...\n\n" + curl -L -O https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run fi rcsum="$(sha256sum ./makeself-2.4.0.run | cut -d' ' -f1)" if [ "$rcsum" != "$mscsum" ] ;then - printf "\n\nError: Checksum makeself-2.4.0.run mismatch!" - printf "\nLeaving.\n\n" - exit 0 + printf "\n\nError: Checksum makeself-2.4.0.run mismatch!" + printf "\nLeaving.\n\n" + exit 0 fi printf "\nCreate clean build environment..." @@ -71,9 +71,9 @@ printf "\nCopy needed files from AUR source..." for eia in ../eve-icons*.tar.gz ;do tar xf $eia -C evesetup/ ;done for eta in ../eve-transl5.12-??.tar.gz ;do cp $eta evesetup/ ;done for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - if [ -f ../$cmd ] ;then cp ../$cmd evesetup/ ;fi - if [ ! "$cmd" = "evewine" ] ;then cp ../${cmd%.*}.desktop evesetup/ ;fi + cmd=eve$cmd + if [ -f ../$cmd ] ;then cp ../$cmd evesetup/ ;fi + if [ ! "$cmd" = "evewine" ] ;then cp ../${cmd%.*}.desktop evesetup/ ;fi done cp ../evesetup.shlib evesetup/ cp ../evelauncher.kwinrule evesetup/ @@ -89,32 +89,32 @@ chmod a+x evesetup/setup.sh echo "done." if [ -f "../evelauncher-$version.tar.gz" ] ;then - printf "\nFound EVE Launcher archive..." - rcsum="$(sha256sum ../evelauncher-$version.tar.gz | cut -d' ' -f1)" - if [ "$rcsum" = "$elcsum" ] ;then - cp ../evelauncher-$version.tar.gz evesetup/ && \ - echo "added." - else - echo "skipped, checksum mismatch." - fi + printf "\nFound EVE Launcher archive..." + rcsum="$(sha256sum ../evelauncher-$version.tar.gz | cut -d' ' -f1)" + if [ "$rcsum" = "$elcsum" ] ;then + cp ../evelauncher-$version.tar.gz evesetup/ && \ + echo "added." + else + echo "skipped, checksum mismatch." + fi else - printf "\nEVE Launcher archive not found, will be downloaded during the setup process.\n" + printf "\nEVE Launcher archive not found, will be downloaded during the setup process.\n" fi if [ -f "../dxvk-$dvver.tar.gz" ] ;then - printf "\nFound DXVK archive..." - rcsum="$(sha256sum ../dxvk-$dvver.tar.gz | cut -d' ' -f1)" - if [ "$rcsum" = "$dvcsum" ] ;then - cp ../dxvk-$dvver.tar.gz evesetup/ && \ - echo "added." - else - echo "skipped, checksum mismatch." - fi + printf "\nFound DXVK archive..." + rcsum="$(sha256sum ../dxvk-$dvver.tar.gz | cut -d' ' -f1)" + if [ "$rcsum" = "$dvcsum" ] ;then + cp ../dxvk-$dvver.tar.gz evesetup/ && \ + echo "added." + else + echo "skipped, checksum mismatch." + fi else - printf "\nDXVK archive not found, will be downloaded during the setup process.\n" + printf "\nDXVK archive not found, will be downloaded during the setup process.\n" fi printf "\nBuild self-extractable archive evesetup-$version-$release-$arch.run\n\n" ./makeself.sh --tar-quietly evesetup/ ../evesetup-$version-$release-$arch.run \ - "EVE Online Launcher Setup $version-$release" ./setup.sh + "EVE Online Launcher Setup $version-$release" ./setup.sh cd .. printf "\nClean up build environment..." rm -rf src/ diff --git a/build_lite_installer.sh b/build_lite_installer.sh index c44c5345f3a8..350f7c2f44ac 100755 --- a/build_lite_installer.sh +++ b/build_lite_installer.sh @@ -26,54 +26,54 @@ pelcs=$(expr $pshal + $pofsl) plc=1 while read pline ;do - if [ $plc -eq $pdvcs ] ;then - dvcsum=${pline#*\'} - dvcsum=${dvcsum%%\'*} - fi - if [ $plc -eq $pelcs ] ;then - elcsum=${pline#*\'} - elcsum=${elcsum%%\'*} - fi - plc=$(expr $plc + 1) + if [ $plc -eq $pdvcs ] ;then + dvcsum=${pline#*\'} + dvcsum=${dvcsum%%\'*} + fi + if [ $plc -eq $pelcs ] ;then + elcsum=${pline#*\'} + elcsum=${elcsum%%\'*} + fi + plc=$(expr $plc + 1) done < PKGBUILD if [ ! -x "$(which curl 2>/dev/null)" ] ;then - printf "\nError: Curl not found. Curl are needed for downloading makeself build tool." - printf "\n\tPlease install curl with your Package Manager.\n" - printf "\nLeaving.\n\n" - exit 0 + printf "\nError: Curl not found. Curl are needed for downloading makeself build tool." + printf "\n\tPlease install curl with your Package Manager.\n" + printf "\nLeaving.\n\n" + exit 0 fi if [ ! -f "./makeself-2.4.0.run" ] ;then - printf "\nGet makeself...\n\n" - curl -L -O https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run + printf "\nGet makeself...\n\n" + curl -L -O https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run fi rcsum="$(sha256sum ./makeself-2.4.0.run | cut -d' ' -f1)" if [ "$rcsum" != "$mscsum" ] ;then - printf "\n\nError: Checksum makeself-2.4.0.run mismatch!" - printf "\nLeaving.\n\n" - exit 0 + printf "\n\nError: Checksum makeself-2.4.0.run mismatch!" + printf "\nLeaving.\n\n" + exit 0 fi if [ ! -r "./evelauncher-$version.tar.gz" ] ;then - printf "\nGet evelauncher-$version.tar.gz...\n\n" - curl -L -O https://binaries.eveonline.com/evelauncher-$version.tar.gz + printf "\nGet evelauncher-$version.tar.gz...\n\n" + curl -L -O https://binaries.eveonline.com/evelauncher-$version.tar.gz fi rcsum="$(sha256sum ./evelauncher-$version.tar.gz| cut -d' ' -f1)" if [ "$rcsum" != "$elcsum" ] ;then - printf "\n\nError: Checksum evelauncher-$version.tar.gz mismatch!" - printf "\nLeaving.\n\n" - exit 0 + printf "\n\nError: Checksum evelauncher-$version.tar.gz mismatch!" + printf "\nLeaving.\n\n" + exit 0 fi if [ ! -r "./dxvk-$dvver.tar.gz" ] ;then - printf "\nDownload dxvk-$dvver.tar.gz...\n\n" - curl -L -O https://github.com/doitsujin/dxvk/releases/download/v$dvver/dxvk-$dvver.tar.gz + printf "\nDownload dxvk-$dvver.tar.gz...\n\n" + curl -L -O https://github.com/doitsujin/dxvk/releases/download/v$dvver/dxvk-$dvver.tar.gz fi rcsum="$(sha256sum ./dxvk-$dvver.tar.gz| cut -d' ' -f1)" if [ "$rcsum" != "$dvcsum" ] ;then - printf "\n\nWarning: Checksum dxvk-$dvver.tar.gz mismatch, ignored.\n" - rm -f ./dxvk-$dvver.tar.gz + printf "\n\nWarning: Checksum dxvk-$dvver.tar.gz mismatch, ignored.\n" + rm -f ./dxvk-$dvver.tar.gz fi printf "\nCreate clean build environment..." @@ -91,9 +91,9 @@ echo "done." printf "\nCopy needed files from AUR source..." for eia in ../eve-icons*.tar.gz ;do tar xf $eia -C evesetup/ ;done for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - if [ -f ../$cmd ] ;then cp ../$cmd evesetup/ ;fi - if [ ! "$cmd" = "evewine" ] ;then cp ../${cmd%.*}.desktop evesetup/ ;fi + cmd=eve$cmd + if [ -f ../$cmd ] ;then cp ../$cmd evesetup/ ;fi + if [ ! "$cmd" = "evewine" ] ;then cp ../${cmd%.*}.desktop evesetup/ ;fi done cp ../evesetup.shlib evesetup/ cp ../evelauncher.kwinrule evesetup/ @@ -144,7 +144,7 @@ echo "done." printf "\nBuild self-extractable archive evesetup-lite-${version}-$release-$arch.run\n\n" ./makeself.sh --tar-quietly evesetup/ ../evesetup-lite-${version}-$release-$arch.run \ - "EVE Online Launcher Setup (Lite) ${version}-$release" ./setup.sh + "EVE Online Launcher Setup (Lite) ${version}-$release" ./setup.sh cd .. printf "\nClean up build environment..." rm -rf src/ diff --git a/evebackup b/evebackup index f8343c8b3f08..78b17e7ba859 100644 --- a/evebackup +++ b/evebackup @@ -6,38 +6,38 @@ set -e backup_settings() { for SERVER in tranquility singularity duality thunderdome ;do - CLPROFILE="$(ls -d *_$SERVER 2>/dev/null || true)" - [ "x$CLPROFILE" = "x" ] && continue - if [ -f "$BACKUPDIR/$SERVER-settings_current.7z" ] ;then - mv "$BACKUPDIR/$SERVER-settings_current.7z" "$BACKUPDIR/$SERVER-settings.7z" - SERVERLIST="$SERVERLIST $SERVER" - MSGSTR="Settings for$SERVERLIST in $BACKUPDIR stored." - else - MSGSTR="Preparing backup for $SERVER, please run $CMDSTR again." - desktop_msg "$MSGSTR" - fi - cd "$CLPROFILE" - 7z u -t7z -xr!Browser "$BACKUPDIR/$SERVER-settings.7z" \ - -u- -u!"$BACKUPDIR/$SERVER-settings_current.7z" "settings_*" >/dev/null - cd .. + CLPROFILE="$(ls -d *_$SERVER 2>/dev/null || true)" + [ "x$CLPROFILE" = "x" ] && continue + if [ -f "$BACKUPDIR/$SERVER-settings_current.7z" ] ;then + mv "$BACKUPDIR/$SERVER-settings_current.7z" "$BACKUPDIR/$SERVER-settings.7z" + SERVERLIST="$SERVERLIST $SERVER" + MSGSTR="Settings for$SERVERLIST in $BACKUPDIR stored." + else + MSGSTR="Preparing backup for $SERVER, please run $CMDSTR again." + desktop_msg "$MSGSTR" + fi + cd "$CLPROFILE" + 7z u -t7z -xr!Browser "$BACKUPDIR/$SERVER-settings.7z" \ + -u- -u!"$BACKUPDIR/$SERVER-settings_current.7z" "settings_*" >/dev/null + cd .. done } restore_settings() { for SERVER in thunderdome duality singularity tranquility ;do - if [ ! -f "$BACKUPDIR/$SERVER-settings.7z" ] ;then - MSGSTR="No settings in $BACKUPDIR found." - continue 2 - fi - case $SERVER in - tranquility) SERVER_SHORT=tq ;; - singularity) SERVER_SHORT=sisi ;; - *) SERVER_SHORT=$SERVER ;; - esac - [ -d c_"$SERVER_SHORT"_"$SERVER" ] || mkdir c_"$SERVER_SHORT"_"$SERVER" - 7z x "$BACKUPDIR/$SERVER-settings.7z" -oc_"$SERVER_SHORT"_"$SERVER" -y >/dev/null - SERVERLIST="$SERVERLIST $SERVER" - MSGSTR="Settings for$SERVERLIST from $BACKUPDIR restored." + if [ ! -f "$BACKUPDIR/$SERVER-settings.7z" ] ;then + MSGSTR="No settings in $BACKUPDIR found." + continue 2 + fi + case $SERVER in + tranquility) SERVER_SHORT=tq ;; + singularity) SERVER_SHORT=sisi ;; + *) SERVER_SHORT=$SERVER ;; + esac + [ -d c_"$SERVER_SHORT"_"$SERVER" ] || mkdir c_"$SERVER_SHORT"_"$SERVER" + 7z x "$BACKUPDIR/$SERVER-settings.7z" -oc_"$SERVER_SHORT"_"$SERVER" -y >/dev/null + SERVERLIST="$SERVERLIST $SERVER" + MSGSTR="Settings for$SERVERLIST from $BACKUPDIR restored." done } @@ -51,9 +51,9 @@ CMDSTR=$(basename $0) cd "$SETTINGSDIR" case $CMDSTR in - evebackup) backup_settings ;; - everestore) restore_settings ;; - *) exit 1 ;; + evebackup) backup_settings ;; + everestore) restore_settings ;; + *) exit 1 ;; esac desktop_msg "$MSGSTR" diff --git a/evelauncher.sh.in b/evelauncher.sh.in index f3325e085eef..fe9d90fb563b 100644 --- a/evelauncher.sh.in +++ b/evelauncher.sh.in @@ -17,11 +17,11 @@ check_wine check_steam if [ ! -r "$LAUNCHER/translations/qt_en.qm" ] ;then - if [ -r "$LAUNCHER/libQt5Core.so.$QTVER.0" ] ;then - for eta in ./eve-transl${QTVER}-??.tar.gz ;do - tar xf $eta -C $LAUNCHER - done - fi + if [ -r "$LAUNCHER/libQt5Core.so.$QTVER.0" ] ;then + for eta in ./eve-transl${QTVER}-??.tar.gz ;do + tar xf $eta -C $LAUNCHER + done + fi fi export DXVK_LOG_LEVEL=${DXVK_LOG_LEVEL:-error} diff --git a/evesetup.shlib b/evesetup.shlib index bb55f5e97b70..4d5d171720c8 100644 --- a/evesetup.shlib +++ b/evesetup.shlib @@ -8,125 +8,127 @@ check_elv() { ELBIN=$(getdate $LAUNCHER/evelauncher) ELARC=$(getdate $SETUPDIR/lib/evelauncher-$ELVER.tar.?z) if [ "$ELBIN" -lt "$ELARC" ] ;then - if [ -d "$LAUNCHER" ] ;then - rm -rf $LAUNCHER - desktop_msg "Update EVE Launcher binaries" - fi - tar xmf $SETUPDIR/lib/evelauncher-$ELVER.tar.?z -C $EVEDIR - mv $EVEDIR/evelauncher $LAUNCHER - if [ -f "$HOME/.config/devilspie2/evelauncher.lua" ] ;then - sed -i 2\ s,[0-9].*\",$ELVER\", $HOME/.config/devilspie2/evelauncher.lua - fi - for ELCACHE in $HOME/.cache $HOME/.local/share ;do - if [ -d "$ELCACHE/CCP/EVE/QtWebEngine" ] ;then - rm -rf $ELCACHE/CCP/EVE/QtWebEngine + if [ -d "$LAUNCHER" ] ;then + rm -rf $LAUNCHER + desktop_msg "Update EVE Launcher binaries" fi - done + tar xmf $SETUPDIR/lib/evelauncher-$ELVER.tar.?z -C $EVEDIR + mv $EVEDIR/evelauncher $LAUNCHER + if [ -f "$HOME/.config/devilspie2/evelauncher.lua" ] ;then + sed -i 2\ s,[0-9].*\",$ELVER\", $HOME/.config/devilspie2/evelauncher.lua + fi + for ELCACHE in $HOME/.cache $HOME/.local/share ;do + if [ -d "$ELCACHE/CCP/EVE/QtWebEngine" ] ;then + rm -rf $ELCACHE/CCP/EVE/QtWebEngine + fi + done fi } check_env() { - if [ -r "$EVECONF" ] ;then SHAREDIR=$(getval SharedCacheFolder) ;fi - if [ ! -d "$SHAREDIR" ] ;then SHAREDIR="" ;fi - if [ "x$SHAREDIR" != "x$EVEDIR/SharedCache/" ] ;then - desktop_msg "Please wait, prepare environment in $EVEDIR" - mkdir -p $CONFDIR - echo "[General]" >$EVECONF - echo "SharedCacheFolder=$EVEDIR/SharedCache/" >>$EVECONF - echo "UseCustomWine=true" >>$EVECONF - echo "CustomWinePath=$WINEPATH/wine" >>$EVECONF - mkdir -p $EVEDIR/SharedCache - if [ -d "$SHAREDIR/ResFiles/" ] ;then - mv $SHAREDIR/ResFiles/ $EVEDIR/SharedCache/ - mv $SHAREDIR/*.txt $EVEDIR/SharedCache/ - rm -rf $SHAREDIR + if [ -r "$EVECONF" ] ;then SHAREDIR=$(getval SharedCacheFolder) ;fi + if [ ! -d "$SHAREDIR" ] ;then SHAREDIR="" ;fi + if [ "x$SHAREDIR" != "x$EVEDIR/SharedCache/" ] ;then + desktop_msg "Please wait, prepare environment in $EVEDIR" + mkdir -p $CONFDIR + cat >$EVECONF <<EOF +[General] +SharedCacheFolder=$EVEDIR/SharedCache/ +UseCustomWine=true +CustomWinePath=$WINEPATH/wine +EOF + mkdir -p $EVEDIR/SharedCache + if [ -d "$SHAREDIR/ResFiles/" ] ;then + mv $SHAREDIR/ResFiles/ $EVEDIR/SharedCache/ + mv $SHAREDIR/*.txt $EVEDIR/SharedCache/ + rm -rf $SHAREDIR + fi fi - fi } check_steam() { - if [ ! -r "$LAUNCHER/steam_appid.txt" -a -x "$(which steam)" ] ;then - echo "8500" >$LAUNCHER/steam_appid.txt - fi + if [ ! -r "$LAUNCHER/steam_appid.txt" -a -x "$(which steam)" ] ;then + echo "8500" >$LAUNCHER/steam_appid.txt + fi } check_wine() { - CUSTOMWP=$(getval CustomWinePath) - SHAREDIR=$(getval SharedCacheFolder) - UCW=$(getval UseCustomWine) - DXVKLIBDIR=$SETUPDIR/lib/dxvk - DXVKFILELIST="d3d10core d3d11 d3d9 dxgi" - WINEPREFIX=${SHAREDIR}wineenv - WINSYSDIR=$WINEPREFIX/drive_c/windows/system32 - W32SYSDIR=${WINSYSDIR%/*}/syswow64 - if [ "$UCW" = "true" ] ;then - WINEPATH=${CUSTOMWP%/*} - if [ -d "${SHAREDIR}wine" ] ;then rm -rf ${SHAREDIR}wine ;fi - else - CUSTOMWP=${SHAREDIR}wine - WINEPATH=${SHAREDIR}wine/bin - fi - if [ -x "$WINEPATH/wine64" ] ;then - WINE=$WINEPATH/wine64 - else - WINE=$WINEPATH/wine - fi - if [ ! -x "$WINE" ] ;then - desktop_msg "ERROR: \"$CUSTOMWP\" not found!" - exit 1 - fi - INSTWINE=$(tr -dc [:digit:] 2>/dev/null < $WINEPREFIX/.update-timestamp || printf 0) - WINEINFP=$(readlink -f $CUSTOMWP) - WINECONF=$(find ${WINEINFP%bin*}share/wine* -name 'wine.inf') - WINEDATE=$(getdate $WINECONF) - if [ "$WINEDATE" != "$INSTWINE" ] ;then - desktop_msg "Prepare wine environment for EVE" - env WINEPREFIX=$WINEPREFIX \ - WINEDEBUG=-all \ - WINEDLLOVERRIDES="mscoree,mshtml=d" \ - $WINE wineboot - env WINEPREFIX=$WINEPREFIX \ - $WINE reg add \ - 'HKCU\Software\Wine\FileOpenAssociations' \ - /v Enable /d N /f >/dev/null - fi - if [ -d "$DXVKLIBDIR" ] ;then - DXVKARC=$(getdate $DXVKLIBDIR/x64/d3d11.dll) - INSTDX=$(getdate $WINSYSDIR/d3d11.dll) - if [ "$INSTDX" != "$DXVKARC" ] ;then - for DXVKFILE in $DXVKFILELIST ;do - cp --preserve=timestamps $DXVKLIBDIR/x64/$DXVKFILE.dll $WINSYSDIR/$DXVKFILE.dll - if [ -d "$W32SYSDIR" ] ;then - cp --preserve=timestamps $DXVKLIBDIR/x32/$DXVKFILE.dll $W32SYSDIR/$DXVKFILE.dll + CUSTOMWP=$(getval CustomWinePath) + SHAREDIR=$(getval SharedCacheFolder) + UCW=$(getval UseCustomWine) + DXVKLIBDIR=$SETUPDIR/lib/dxvk + DXVKFILELIST="d3d10core d3d11 d3d9 dxgi" + WINEPREFIX=${SHAREDIR}wineenv + WINSYSDIR=$WINEPREFIX/drive_c/windows/system32 + W32SYSDIR=${WINSYSDIR%/*}/syswow64 + if [ "$UCW" = "true" ] ;then + WINEPATH=${CUSTOMWP%/*} + if [ -d "${SHAREDIR}wine" ] ;then rm -rf ${SHAREDIR}wine ;fi + else + CUSTOMWP=${SHAREDIR}wine + WINEPATH=${SHAREDIR}wine/bin + fi + if [ -x "$WINEPATH/wine64" ] ;then + WINE=$WINEPATH/wine64 + else + WINE=$WINEPATH/wine + fi + if [ ! -x "$WINE" ] ;then + desktop_msg "ERROR: \"$CUSTOMWP\" not found!" + exit 1 + fi + INSTWINE=$(tr -dc [:digit:] 2>/dev/null < $WINEPREFIX/.update-timestamp || printf 0) + WINEINFP=$(readlink -f $CUSTOMWP) + WINECONF=$(find ${WINEINFP%bin*}share/wine* -name 'wine.inf') + WINEDATE=$(getdate $WINECONF) + if [ "$WINEDATE" != "$INSTWINE" ] ;then + desktop_msg "Prepare wine environment for EVE" + env WINEPREFIX=$WINEPREFIX \ + WINEDEBUG=-all \ + WINEDLLOVERRIDES="mscoree,mshtml=d" \ + $WINE wineboot + env WINEPREFIX=$WINEPREFIX \ + $WINE reg add \ + 'HKCU\Software\Wine\FileOpenAssociations' \ + /v Enable /d N /f >/dev/null + fi + if [ -d "$DXVKLIBDIR" ] ;then + DXVKARC=$(getdate $DXVKLIBDIR/x64/d3d11.dll) + INSTDX=$(getdate $WINSYSDIR/d3d11.dll) + if [ "$INSTDX" != "$DXVKARC" ] ;then + for DXVKFILE in $DXVKFILELIST ;do + cp --preserve=timestamps $DXVKLIBDIR/x64/$DXVKFILE.dll $WINSYSDIR/$DXVKFILE.dll + if [ -d "$W32SYSDIR" ] ;then + cp --preserve=timestamps $DXVKLIBDIR/x32/$DXVKFILE.dll $W32SYSDIR/$DXVKFILE.dll + fi + env WINEPREFIX=$WINEPREFIX \ + $WINE reg add \ + 'HKCU\Software\Wine\DllOverrides' \ + /v $DXVKFILE /d native /f >/dev/null + done fi + fi + if [ "$(grep -csw winemenubuilder $WINEPREFIX/system.reg)" != "0" ] ;then env WINEPREFIX=$WINEPREFIX \ - $WINE reg add \ - 'HKCU\Software\Wine\DllOverrides' \ - /v $DXVKFILE /d native /f >/dev/null - done + $WINE reg delete \ + 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices' \ + /v winemenubuilder /f >/dev/null fi - fi - if [ "$(grep -csw winemenubuilder $WINEPREFIX/system.reg)" != "0" ] ;then - env WINEPREFIX=$WINEPREFIX \ - $WINE reg delete \ - 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices' \ - /v winemenubuilder /f >/dev/null - fi } desktop_msg() { - if [ -x "$(which notify-send)" ] ;then notify-send -i eve $(basename $0) "$@" ;fi - printf "$(basename $0): $@\n" + if [ -x "$(which notify-send)" ] ;then notify-send -i eve $(basename $0) "$@" ;fi + printf "$(basename $0): $@\n" } getdate() { - printf $(ls -l --time-style=+%s $1 | cut -d' ' -f6) || printf 0 + printf $(ls -l --time-style=+%s $1 | cut -d' ' -f6) || printf 0 } getval() { - if [ ! -r "$EVECONF" ] ;then - desktop_msg "ERROR: EVE Configuration not found!" - exit 1 - fi - printf $(grep "$1" $EVECONF | cut -d= -f2) + if [ ! -r "$EVECONF" ] ;then + desktop_msg "ERROR: EVE Configuration not found!" + exit 1 + fi + printf $(grep "$1" $EVECONF | cut -d= -f2) } @@ -5,11 +5,11 @@ check_wine if [ -x "$WINEPATH/${0##*eve}" ] ;then - WINECMD=$WINEPATH/${0##*eve} + WINECMD=$WINEPATH/${0##*eve} else - WINECMD=$CUSTOMWP\ ${0##*eve} + WINECMD=$CUSTOMWP\ ${0##*eve} fi env WINEPREFIX=$WINEPREFIX \ - WINEDEBUG=-all \ - $WINECMD "$@" + WINEDEBUG=-all \ + $WINECMD "$@" diff --git a/evewinetricks b/evewinetricks index 182a091903ee..eea31357c765 100644 --- a/evewinetricks +++ b/evewinetricks @@ -7,9 +7,9 @@ check_wine WINETRICKS=$(which winetricks 2>/dev/null) if [ "x$WINETRICKS" = "x" ] ;then - desktop_msg "winetricks not found!" - exit 1 + desktop_msg "winetricks not found!" + exit 1 fi env WINEPREFIX=$WINEPREFIX \ - WINE=$WINEPATH/wine $WINETRICKS "$@" + WINE=$WINEPATH/wine $WINETRICKS "$@" diff --git a/setup.sh.in b/setup.sh.in index 58206a09726b..7d8bff11af16 100644 --- a/setup.sh.in +++ b/setup.sh.in @@ -3,155 +3,155 @@ set -e bootstrap_install() { - install -dv "$destdir" - install -dv "$bindir" - install -dv "$libdir" - install -dv "$docdir" - install -d "$prefix/bin/" - install -d "$prefix/share/applications/" - for eta in ./eve-transl${qtver}-??.tar.gz ;do - install -m 0644 "$eta" "$libdir" - done - if [ -f "./dxvk-$dvver.tar.gz" ] ;then - install -d "$libdir/dxvk/" - echo "$dvver" >"$libdir/dxvk/version" - chmod 0644 "$libdir/dxvk/version" - tar xf ./dxvk-$dvver.tar.gz -C $libdir/dxvk/ --no-same-owner \ - --strip-components=1 dxvk-$dvver/x32 dxvk-$dvver/x64 - fi - install -m 0644 "./evesetup.shlib" "$libdir" - install -m 0644 "./evelauncher-${elver}.tar.gz" "$libdir" - install -m 0644 "./evelauncher.kwinrule" "$docdir" - install -m 0644 "./evelauncher.lua" "$docdir" - sed -i s,./eve-transl,$libdir/eve-transl, ./evelauncher.sh - sed -i s,SETUPDIR=\"\",SETUPDIR=\"$destdir\", ./evelauncher.sh - for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - if [ -f "./$cmd" ] ;then - sed -i s,./evesetup.shlib,$libdir/evesetup.shlib, ./$cmd - install "./$cmd" "$bindir/" - else - if [ "$cmd" = "everestore" ] ;then - ln -s evebackup "$bindir/$cmd" - else - ln -s evewine "$bindir/$cmd" - fi - fi - [ "$bindir" != "$prefix/bin" ] && ln -s "$bindir/$cmd" "$prefix/bin/$cmd" - if [ ! "$cmd" = "evewine" ] ;then - oexec=$(grep Exec= ./${cmd%.*}.desktop) - sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop - install -m 0644 "./${cmd%.*}.desktop" "$prefix/share/applications/" + install -dv "$destdir" + install -dv "$bindir" + install -dv "$libdir" + install -dv "$docdir" + install -d "$prefix/bin/" + install -d "$prefix/share/applications/" + for eta in ./eve-transl${qtver}-??.tar.gz ;do + install -m 0644 "$eta" "$libdir" + done + if [ -f "./dxvk-$dvver.tar.gz" ] ;then + install -d "$libdir/dxvk/" + echo "$dvver" >"$libdir/dxvk/version" + chmod 0644 "$libdir/dxvk/version" + tar xf ./dxvk-$dvver.tar.gz -C $libdir/dxvk/ --no-same-owner \ + --strip-components=1 dxvk-$dvver/x32 dxvk-$dvver/x64 fi - done - for icons in $(find . -type f -name '*.png') ;do - install -D -m 0644 "$icons" "$prefix/share/${icons#*/}" - done - if [ -x $(which gtk-update-icon-cache) ] ;then - if [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] ;then - gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null - chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache" + install -m 0644 "./evesetup.shlib" "$libdir" + install -m 0644 "./evelauncher-${elver}.tar.gz" "$libdir" + install -m 0644 "./evelauncher.kwinrule" "$docdir" + install -m 0644 "./evelauncher.lua" "$docdir" + sed -i s,./eve-transl,$libdir/eve-transl, ./evelauncher.sh + sed -i s,SETUPDIR=\"\",SETUPDIR=\"$destdir\", ./evelauncher.sh + for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do + cmd=eve$cmd + if [ -f "./$cmd" ] ;then + sed -i s,./evesetup.shlib,$libdir/evesetup.shlib, ./$cmd + install "./$cmd" "$bindir/" + else + if [ "$cmd" = "everestore" ] ;then + ln -s evebackup "$bindir/$cmd" + else + ln -s evewine "$bindir/$cmd" + fi + fi + [ "$bindir" != "$prefix/bin" ] && ln -s "$bindir/$cmd" "$prefix/bin/$cmd" + if [ ! "$cmd" = "evewine" ] ;then + oexec=$(grep Exec= ./${cmd%.*}.desktop) + sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop + install -m 0644 "./${cmd%.*}.desktop" "$prefix/share/applications/" + fi + done + for icons in $(find . -type f -name '*.png') ;do + install -D -m 0644 "$icons" "$prefix/share/${icons#*/}" + done + if [ -x $(which gtk-update-icon-cache) ] ;then + if [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] ;then + gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null + chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache" + fi fi - fi } bootstrap_remove() { - for icons in $(find . -type f -name '*.png') ;do - rm -f "$prefix/share/${icons#*/}" - done - for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - rm -fv "$prefix/bin/$cmd" - if [ ! "$cmd" = "evewine" ] ;then - rm -f "$prefix/share/applications/${cmd%.*}.desktop" - fi - done - printf "\nRemove $destdir...\n" - rm -rf "$destdir" + for icons in $(find . -type f -name '*.png') ;do + rm -f "$prefix/share/${icons#*/}" + done + for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do + cmd=eve$cmd + rm -fv "$prefix/bin/$cmd" + if [ ! "$cmd" = "evewine" ] ;then + rm -f "$prefix/share/applications/${cmd%.*}.desktop" + fi + done + printf "\nRemove $destdir...\n" + rm -rf "$destdir" } build_lib() { - if [ ! -r "./evelauncher-$elver.tar.gz" ] ;then - printf "\nDownload evelauncher-$elver.tar.gz...\n\n" - curl -L -O https://binaries.eveonline.com/evelauncher-$elver.tar.gz - fi - rcsum="$(sha256sum ./evelauncher-$elver.tar.gz| cut -d' ' -f1)" - if [ "$rcsum" != "$elcsum" ] ;then - printf "\n\nError: Checksum evelauncher-$elver.tar.gz mismatch!" - printf "\nLeaving.\n\n" - exit 0 - fi - printf "\n\nExtract evelauncher-$elver.tar.gz..." - tar xf evelauncher-$elver.tar.gz - echo "done." - printf "\nClean up evelauncher directory..." - cd evelauncher/ - rm -f ./*.a ./*.la ./*.pem ./*.prl ./libxcb* - chmod 0755 ./* - chmod 0644 ./*.qm ./*.conf ./errorpage/* - echo "done." - printf "\nReplace identical files with symbolic links..." - ln -sf evelauncher.sh LogLite.sh - ln -sf libicudata.so.55.1 libicudata.so - ln -sf libicudata.so.55.1 libicudata.so.55 - ln -sf libicui18n.so.55.1 libicui18n.so - ln -sf libicui18n.so.55.1 libicui18n.so.55 - ln -sf libicuuc.so.55.1 libicuuc.so - ln -sf libicuuc.so.55.1 libicuuc.so.55 - ln -sf libgpr.so.6.0.0 libgpr.so - ln -sf libgpr.so.6.0.0 libgpr.so.6 - ln -sf libgrpc++.so.1.12.0 libgrpc++.so - ln -sf libgrpc++.so.1.12.0 libgrpc++.so.1 - ln -sf libgrpc++.so.1.12.0 libgrpc++.so.6 - ln -sf libgrpc.so.6.0.0 libgrpc.so - ln -sf libgrpc.so.6.0.0 libgrpc.so.6 - ln -sf libpng12.so.0.54.0 libpng12.so.0 - ln -sf libprotobuf.so.16.0.0 libprotobuf.so - ln -sf libprotobuf.so.16.0.0 libprotobuf.so.16 - echo "done." - printf "\nRemove unneeded symbols from files..." - find ./ -maxdepth 1 -type f -exec strip -s {} 2>/dev/null \; - echo "done." - printf "\nRepack evelauncher-$elver.tar.gz..." - cd ../ - rm evelauncher-$elver.tar.gz - tar czf evelauncher-$elver.tar.gz evelauncher/ - rm -rf evelauncher/ - echo "done." + if [ ! -r "./evelauncher-$elver.tar.gz" ] ;then + printf "\nDownload evelauncher-$elver.tar.gz...\n\n" + curl -L -O https://binaries.eveonline.com/evelauncher-$elver.tar.gz + fi + rcsum="$(sha256sum ./evelauncher-$elver.tar.gz| cut -d' ' -f1)" + if [ "$rcsum" != "$elcsum" ] ;then + printf "\n\nError: Checksum evelauncher-$elver.tar.gz mismatch!" + printf "\nLeaving.\n\n" + exit 0 + fi + printf "\n\nExtract evelauncher-$elver.tar.gz..." + tar xf evelauncher-$elver.tar.gz + echo "done." + printf "\nClean up evelauncher directory..." + cd evelauncher/ + rm -f ./*.a ./*.la ./*.pem ./*.prl ./libxcb* + chmod 0755 ./* + chmod 0644 ./*.qm ./*.conf ./errorpage/* + echo "done." + printf "\nReplace identical files with symbolic links..." + ln -sf evelauncher.sh LogLite.sh + ln -sf libicudata.so.55.1 libicudata.so + ln -sf libicudata.so.55.1 libicudata.so.55 + ln -sf libicui18n.so.55.1 libicui18n.so + ln -sf libicui18n.so.55.1 libicui18n.so.55 + ln -sf libicuuc.so.55.1 libicuuc.so + ln -sf libicuuc.so.55.1 libicuuc.so.55 + ln -sf libgpr.so.6.0.0 libgpr.so + ln -sf libgpr.so.6.0.0 libgpr.so.6 + ln -sf libgrpc++.so.1.12.0 libgrpc++.so + ln -sf libgrpc++.so.1.12.0 libgrpc++.so.1 + ln -sf libgrpc++.so.1.12.0 libgrpc++.so.6 + ln -sf libgrpc.so.6.0.0 libgrpc.so + ln -sf libgrpc.so.6.0.0 libgrpc.so.6 + ln -sf libpng12.so.0.54.0 libpng12.so.0 + ln -sf libprotobuf.so.16.0.0 libprotobuf.so + ln -sf libprotobuf.so.16.0.0 libprotobuf.so.16 + echo "done." + printf "\nRemove unneeded symbols from files..." + find ./ -maxdepth 1 -type f -exec strip -s {} 2>/dev/null \; + echo "done." + printf "\nRepack evelauncher-$elver.tar.gz..." + cd ../ + rm evelauncher-$elver.tar.gz + tar czf evelauncher-$elver.tar.gz evelauncher/ + rm -rf evelauncher/ + echo "done." } get_dxvk() { - if [ ! -r "./dxvk-$dvver.tar.gz" ] ;then - printf "\nDownload dxvk-$dvver.tar.gz...\n\n" - curl -L -O https://github.com/doitsujin/dxvk/releases/download/v$dvver/dxvk-$dvver.tar.gz - fi - rcsum="$(sha256sum ./dxvk-$dvver.tar.gz| cut -d' ' -f1)" - if [ "$rcsum" != "$dvcsum" ] ;then - printf "\n\nWarning: Checksum dxvk-$dvver.tar.gz mismatch, ignored.\n" - rm ./dxvk-$dvver.tar.gz 2>/dev/null || true - fi + if [ ! -r "./dxvk-$dvver.tar.gz" ] ;then + printf "\nDownload dxvk-$dvver.tar.gz...\n\n" + curl -L -O https://github.com/doitsujin/dxvk/releases/download/v$dvver/dxvk-$dvver.tar.gz + fi + rcsum="$(sha256sum ./dxvk-$dvver.tar.gz| cut -d' ' -f1)" + if [ "$rcsum" != "$dvcsum" ] ;then + printf "\n\nWarning: Checksum dxvk-$dvver.tar.gz mismatch, ignored.\n" + rm ./dxvk-$dvver.tar.gz 2>/dev/null || true + fi } check_req() { - if [ ! -r "$(find /usr/lib -type f -name 'libxcb-xinerama*' 2>/dev/null)" ] ;then - req="${req}libxcb-xinerama\n" - fi - if [ ! -x "$(which 7z 2>/dev/null)" ] ;then - req="${req}7z\n" - fi - if [ ! -x "$(which curl 2>/dev/null)" ] ;then - req="${req}curl\n" - fi - if [ ! -x "$(which wine 2>/dev/null)" ] ;then - req="${req}wine\n" - fi - if [ "x$req" != "x" ] ;then - printf "\nError: Following requirements are missing:\n" - printf "\n$req\n" - printf "\nPlease install these requirements with your Package Manager.\n" - printf "\nLeaving.\n\n" - exit 0 - fi + if [ ! -r "$(find /usr/lib -type f -name 'libxcb-xinerama*' 2>/dev/null)" ] ;then + req="${req}libxcb-xinerama\n" + fi + if [ ! -x "$(which 7z 2>/dev/null)" ] ;then + req="${req}7z\n" + fi + if [ ! -x "$(which curl 2>/dev/null)" ] ;then + req="${req}curl\n" + fi + if [ ! -x "$(which wine 2>/dev/null)" ] ;then + req="${req}wine\n" + fi + if [ "x$req" != "x" ] ;then + printf "\nError: Following requirements are missing:\n" + printf "\n$req\n" + printf "\nPlease install these requirements with your Package Manager.\n" + printf "\nLeaving.\n\n" + exit 0 + fi } prefix="/usr" @@ -168,35 +168,35 @@ rcsum="" key="" if [ $(id -u) -ne 0 ] ;then - printf "\nEVE Online Launcher Setup need root permissions." - printf "\nLeaving.\n\n" - exit 0 + printf "\nEVE Online Launcher Setup need root permissions." + printf "\nLeaving.\n\n" + exit 0 fi if [ -d "$destdir" ] ;then - printf "\n" - read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key - if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then - printf "\nRemoving...\n\n" - bootstrap_remove - fi + printf "\n" + read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key + if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then + printf "\nRemoving...\n\n" + bootstrap_remove + fi else - printf "\n" - read -p 'Install EVE Online Launcher Setup? (Y/n) ' key - if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then - printf "\nInstalling...\n" - check_req - build_lib - get_dxvk printf "\n" - bootstrap_install - printf "\nYou can now start EVE Online Launcher and his Tools:\n\n" - for cmd in *.desktop ;do - oexec=$(grep Exec= $cmd | cut -d= -f2); oexec=${oexec##*/} - [ ! "$oexec" = "evelauncher.sh" ] && \ - printf " $oexec\t- $(grep Comment= $cmd | cut -d= -f2)\n" - done - printf "\n evelauncher.sh\t- EVE Online Launcher\n" - fi + read -p 'Install EVE Online Launcher Setup? (Y/n) ' key + if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then + printf "\nInstalling...\n" + check_req + build_lib + get_dxvk + printf "\n" + bootstrap_install + printf "\nYou can now start EVE Online Launcher and his Tools:\n\n" + for cmd in *.desktop ;do + oexec=$(grep Exec= $cmd | cut -d= -f2); oexec=${oexec##*/} + [ ! "$oexec" = "evelauncher.sh" ] && \ + printf " $oexec\t- $(grep Comment= $cmd | cut -d= -f2)\n" + done + printf "\n evelauncher.sh\t- EVE Online Launcher\n" + fi fi printf "\nDone.\n\n" diff --git a/setup_lite.sh.in b/setup_lite.sh.in index b6efd6097261..e2eaf03863f3 100644 --- a/setup_lite.sh.in +++ b/setup_lite.sh.in @@ -3,91 +3,91 @@ set -e bootstrap_install() { - install -dv "$destdir" - install -dv "$bindir" - install -dv "$libdir" - install -dv "$docdir" - install -d "$prefix/bin/" - install -d "$prefix/share/applications/" - if [ -f "./dxvk-$dvver.tar.gz" ] ;then - install -d "$libdir/dxvk/" - echo "$dvver" >"$libdir/dxvk/version" - chmod 0644 "$libdir/dxvk/version" - tar xf ./dxvk-$dvver.tar.gz -C $libdir/dxvk/ --no-same-owner \ - --strip-components=1 dxvk-$dvver/x32 dxvk-$dvver/x64 - fi - install -m 0644 "./evesetup.shlib" "$libdir" - install -m 0644 "./evelauncher-${elver}.tar.gz" "$libdir" - install -m 0644 "./evelauncher.kwinrule" "$docdir" - install -m 0644 "./evelauncher.lua" "$docdir" - sed -i s,SETUPDIR=\"\",SETUPDIR=\"$destdir\", ./evelauncher.sh - for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - if [ -f "./$cmd" ] ;then - sed -i s,./evesetup.shlib,$libdir/evesetup.shlib, ./$cmd - install "./$cmd" "$bindir/" - else - if [ "$cmd" = "everestore" ] ;then - ln -s evebackup "$bindir/$cmd" - else - ln -s evewine "$bindir/$cmd" - fi + install -dv "$destdir" + install -dv "$bindir" + install -dv "$libdir" + install -dv "$docdir" + install -d "$prefix/bin/" + install -d "$prefix/share/applications/" + if [ -f "./dxvk-$dvver.tar.gz" ] ;then + install -d "$libdir/dxvk/" + echo "$dvver" >"$libdir/dxvk/version" + chmod 0644 "$libdir/dxvk/version" + tar xf ./dxvk-$dvver.tar.gz -C $libdir/dxvk/ --no-same-owner \ + --strip-components=1 dxvk-$dvver/x32 dxvk-$dvver/x64 fi - [ "$bindir" != "$prefix/bin" ] && ln -s "$bindir/$cmd" "$prefix/bin/$cmd" - if [ ! "$cmd" = "evewine" ] ;then - oexec=$(grep Exec= ./${cmd%.*}.desktop) - sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop - install -m 0644 "./${cmd%.*}.desktop" "$prefix/share/applications/" - fi - done - for icons in $(find . -type f -name '*.png') ;do - install -D -m 0644 "$icons" "$prefix/share/${icons#*/}" - done - if [ -x $(which gtk-update-icon-cache) ] ;then - if [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] ;then - gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null - chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache" + install -m 0644 "./evesetup.shlib" "$libdir" + install -m 0644 "./evelauncher-${elver}.tar.gz" "$libdir" + install -m 0644 "./evelauncher.kwinrule" "$docdir" + install -m 0644 "./evelauncher.lua" "$docdir" + sed -i s,SETUPDIR=\"\",SETUPDIR=\"$destdir\", ./evelauncher.sh + for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do + cmd=eve$cmd + if [ -f "./$cmd" ] ;then + sed -i s,./evesetup.shlib,$libdir/evesetup.shlib, ./$cmd + install "./$cmd" "$bindir/" + else + if [ "$cmd" = "everestore" ] ;then + ln -s evebackup "$bindir/$cmd" + else + ln -s evewine "$bindir/$cmd" + fi + fi + [ "$bindir" != "$prefix/bin" ] && ln -s "$bindir/$cmd" "$prefix/bin/$cmd" + if [ ! "$cmd" = "evewine" ] ;then + oexec=$(grep Exec= ./${cmd%.*}.desktop) + sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop + install -m 0644 "./${cmd%.*}.desktop" "$prefix/share/applications/" + fi + done + for icons in $(find . -type f -name '*.png') ;do + install -D -m 0644 "$icons" "$prefix/share/${icons#*/}" + done + if [ -x $(which gtk-update-icon-cache) ] ;then + if [ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] ;then + gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null + chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache" + fi fi - fi } bootstrap_remove() { - for icons in $(find . -type f -name '*.png') ;do - rm -f "$prefix/share/${icons#*/}" - done - for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do - cmd=eve$cmd - rm -fv "$prefix/bin/$cmd" - if [ ! "$cmd" = "evewine" ] ;then - rm -f "$prefix/share/applications/${cmd%.*}.desktop" - fi - done - printf "\nRemove $destdir...\n" - rm -rf "$destdir" + for icons in $(find . -type f -name '*.png') ;do + rm -f "$prefix/share/${icons#*/}" + done + for cmd in backup launcher.sh regedit restore wine winecfg winetricks ;do + cmd=eve$cmd + rm -fv "$prefix/bin/$cmd" + if [ ! "$cmd" = "evewine" ] ;then + rm -f "$prefix/share/applications/${cmd%.*}.desktop" + fi + done + printf "\nRemove $destdir...\n" + rm -rf "$destdir" } check_req() { - if [ ! -r "$(find /usr/lib -type f -name 'libxcb-xinerama*' 2>/dev/null)" ] ;then - req="${req}libxcb-xinerama\n" - fi - if [ ! -x "$(which 7z 2>/dev/null)" ] ;then - req="${req}7z\n" - fi - if [ ! -x "$(which wine 2>/dev/null)" ] ;then - req="${req}wine\n" - fi - tar xf evelauncher-$elver.tar.gz - cd evelauncher/ - req="${req}$(LD_LIBRARY_PATH=$(pwd) ldd ./evelauncher | grep -i not | sed 's,\t,,;s,.so.*,,')" - cd ../ - rm -rf evelauncher/ - if [ "x$req" != "x" ] ;then - printf "\nError: Following requirements are missing:\n" - printf "\n$req\n" - printf "\nPlease install these requirements with your Package Manager.\n" - printf "\nLeaving.\n\n" - exit 0 - fi + if [ ! -r "$(find /usr/lib -type f -name 'libxcb-xinerama*' 2>/dev/null)" ] ;then + req="${req}libxcb-xinerama\n" + fi + if [ ! -x "$(which 7z 2>/dev/null)" ] ;then + req="${req}7z\n" + fi + if [ ! -x "$(which wine 2>/dev/null)" ] ;then + req="${req}wine\n" + fi + tar xf evelauncher-$elver.tar.gz + cd evelauncher/ + req="${req}$(LD_LIBRARY_PATH=$(pwd) ldd ./evelauncher | grep -i not | sed 's,\t,,;s,.so.*,,')" + cd ../ + rm -rf evelauncher/ + if [ "x$req" != "x" ] ;then + printf "\nError: Following requirements are missing:\n" + printf "\n$req\n" + printf "\nPlease install these requirements with your Package Manager.\n" + printf "\nLeaving.\n\n" + exit 0 + fi } prefix="/usr" @@ -100,33 +100,33 @@ dvver="" key="" if [ $(id -u) -ne 0 ] ;then - printf "\nEVE Online Launcher Setup need root permissions." - printf "\nLeaving.\n\n" - exit 0 + printf "\nEVE Online Launcher Setup need root permissions." + printf "\nLeaving.\n\n" + exit 0 fi if [ -d "$destdir" ] ;then - printf "\n" - read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key - if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then - printf "\nRemoving...\n\n" - bootstrap_remove - fi + printf "\n" + read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key + if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then + printf "\nRemoving...\n\n" + bootstrap_remove + fi else - printf "\n" - read -p 'Install EVE Online Launcher Setup? (Y/n) ' key - if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then - printf "\nInstalling...\n" - check_req printf "\n" - bootstrap_install - printf "\nYou can now start EVE Online Launcher and his Tools:\n\n" - for cmd in *.desktop ;do - oexec=$(grep Exec= $cmd | cut -d= -f2); oexec=${oexec##*/} - [ ! "$oexec" = "evelauncher.sh" ] && \ - printf " $oexec\t- $(grep Comment= $cmd | cut -d= -f2)\n" - done - printf "\n evelauncher.sh\t- EVE Online Launcher\n" - fi + read -p 'Install EVE Online Launcher Setup? (Y/n) ' key + if [ "x$(echo $key | tr [:upper:] [:lower:])" != "xn" ] ;then + printf "\nInstalling...\n" + check_req + printf "\n" + bootstrap_install + printf "\nYou can now start EVE Online Launcher and his Tools:\n\n" + for cmd in *.desktop ;do + oexec=$(grep Exec= $cmd | cut -d= -f2); oexec=${oexec##*/} + [ ! "$oexec" = "evelauncher.sh" ] && \ + printf " $oexec\t- $(grep Comment= $cmd | cut -d= -f2)\n" + done + printf "\n evelauncher.sh\t- EVE Online Launcher\n" + fi fi printf "\nDone.\n\n" |