1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#!/bin/sh
set -e
bootstrap_install() {
if [ -x "$(which wine)" ] ;then
echo "Wine version $(wine --version) found."
else
echo "Wine not found. Please install Wine with your Package Manager."
echo "WineHQ or Developer Version are recommended."
printf "\nExiting.\n\n"
exit 0
fi
if [ -x "$(which winetricks)" ] ;then
echo "Winetricks version $(winetricks --version | cut -d' ' -f1) found."
else
echo "Winetricks not found. Winetricks are required."
echo " Please install Winetricks with your Package Manager."
printf "\nExiting.\n\n"
exit 0
fi
install -dv "${target}/bin/"
install -d "${prefix}/bin/"
install -d "${prefix}/share/applications/"
for cmd in evelauncher.sh evewine evewinetricks everegedit evewinecfg ;do
if [ -f "./$cmd" ] ;then
install "./$cmd" "${target}/bin/"
else
ln -sf evewine "${target}/bin/${cmd}"
fi
ln -s "${target}/bin/$cmd" "${prefix}/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
#-- testing only
#- oexec=$(grep Exec= ./${cmd%.*}.desktop)
#- sed -i s,$oexec,Exec=$prefix/bin/$cmd, ./${cmd%.*}.desktop
#--
install -m 0644 "./${cmd%.*}.desktop" "${prefix}/share/applications/"
#-- testing only
#- sed -i s,Exec=$prefix/bin/$cmd,$oexec, ./${cmd%.*}.desktop
#--
fi
done
install -dv "${target}/lib/"
for eta in $(ls ./eve-transl${qtver}-??.tar.gz) ;do
install -m 0644 "$eta" "${target}/lib"
done
install -m 0644 "./evelauncher.shlib" "${target}/lib"
install -m 0644 "./evelauncher-${elver}.tar.gz" "${target}/lib"
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
gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null
[ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] && \
chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache"
fi
}
bootstrap_remove() {
for icons in $(find . -type f -name '*.png') ;do
rm -f "${prefix}/share/${icons#*/}"
done
if [ -x $(which gtk-update-icon-cache) ] ;then
gtk-update-icon-cache -t -f "${prefix}/share/icons/hicolor" 2>/dev/null
[ -f "${prefix}/share/icons/hicolor/icon-theme.cache" ] && \
chmod 0644 "${prefix}/share/icons/hicolor/icon-theme.cache"
fi
rm -rfv "${target}/lib/"
for cmd in evelauncher.sh everegedit evewine evewinecfg evewinetricks ;do
rm -fv "${prefix}/bin/$cmd"
if [ ! "$cmd" = "evewine" ] ;then
rm -f "${prefix}/share/applications/${cmd%.*}.desktop"
fi
done
rm -rfv "${target}"
}
target="/opt/evesetup"
prefix="/usr"
key=""
qtver="5.11"
elver="1456645"
if [ $(id -u) -ne 0 ] ;then
printf "\nEVE Online Launcher Setup need root permissions."
printf "\nExiting.\n\n"
exit 0
fi
if [ -d "${target}/bin/" ] ;then
printf "\n"
read -p 'Remove EVE Online Launcher Setup? (Y/n) ' key
[ ! "x$(echo $key | tr [:upper:] [:lower:])" = "xn" ] && \
bootstrap_remove
else
#-- testing only
#- otarget=$(grep ^SETUPDIR= ./evelauncher.sh)
#- sed -i s,$otarget,SETUPDIR=\"$target\", ./evelauncher.sh
#--
printf "\n"
read -p 'Install EVE Online Launcher Setup? (Y/n) ' key
[ ! "x$(echo $key | tr [:upper:] [:lower:])" = "xn" ] && \
bootstrap_install && \
printf "\nYou can now start EVE Online Launcher and his " && \
echo "Tools from your Application menu."
#-- testing only
#- sed -i s,SETUPDIR=\"$target\",$otarget, ./evelauncher.sh
#--
fi
printf "\nDone.\n\n"
|