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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
#!/bin/sh
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
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
}
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
rm -rfv "$destdir"
}
build_lib() {
if [ ! -r "./evelauncher-$elver.tar.gz" ] ;then
if [ -x "$(which curl 2>/dev/null)" ] ;then
echo "Curl version $(curl -V | head -n1 | cut -d' ' -f2) found."
else
echo "Curl not found. Curl are needed for downloading evelauncher binaries."
echo " Please install curl with your Package Manager."
printf "\nLeaving.\n\n"
exit 0
fi
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 from evelauncher-$elver.tar.gz doesn't match!"
printf "\nLeaving.\n\n"
exit 0
fi
printf "\nExtract evelauncher-$elver.tar.gz..."
tar xf evelauncher-$elver.tar.gz
echo "done."
printf "\nClean up evelauncher directory..."
cd evelauncher/
rm -f ./*.a ./*.la ./*.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..."
touch ./*
cd ../
rm evelauncher-$elver.tar.gz
tar czf evelauncher-$elver.tar.gz evelauncher/
rm -rf evelauncher/
echo "done."
}
check_req() {
if [ -x "$(which 7z 2>/dev/null)" ] ;then
echo "$(7z | head -n2 | cut -d: -f1 | tr -d [:cntrl:])found."
else
echo "p7zip not found. Please install p7zip with your Package Manager."
printf "\nLeaving.\n\n"
exit 0
fi
if [ -x "$(which wine 2>/dev/null)" ] ;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 "\nLeaving.\n\n"
exit 0
fi
}
prefix="/usr"
destdir="/opt/evesetup"
bindir="$destdir/bin"
libdir="$destdir/lib"
docdir="$destdir/doc"
qtver="5.11"
elver=""
elcsum=""
rcsum=""
key=""
if [ $(id -u) -ne 0 ] ;then
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
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\n"
check_req
build_lib
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"
|