mirror of
https://github.com/glest/glest-source.git
synced 2025-09-03 04:52:34 +02:00
better handling for embedded/dynamic libraries
This commit is contained in:
21
.travis.yml
21
.travis.yml
@@ -10,18 +10,19 @@ matrix:
|
||||
env: Tr_Compiler_Version="6"
|
||||
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
|
||||
dist: trusty # broken compiler on 12.04
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: Tr_Compiler_Version="5"
|
||||
#- os: linux
|
||||
# compiler: gcc
|
||||
# env: Tr_Compiler_Version="5"
|
||||
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
|
||||
dist: trusty
|
||||
# dist: trusty
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: Tr_Compiler_Version="default"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: Tr_Compiler_Version="3.8"
|
||||
# http://apt.llvm.org/
|
||||
# http://apt.llvm.org/, compiler not newer than available on debian testing
|
||||
# https://packages.debian.org/search?suite=testing&keywords=clang-
|
||||
dist: trusty
|
||||
- os: linux
|
||||
compiler: clang
|
||||
@@ -31,15 +32,13 @@ matrix:
|
||||
# osx_image: xcode8
|
||||
# env: Tr_Xcode_Version="8"
|
||||
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
|
||||
# odd linking problems related with brew which is not creating links, e.g. solution
|
||||
# (quite bad) "brew link gettext", or showing in cmake direct paths (also not so good)
|
||||
- os: osx
|
||||
env: Tr_Xcode_Version="default"
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: Tr_Compiler_Version="default"
|
||||
#- os: osx
|
||||
# osx_image: xcode8
|
||||
# env: Tr_Xcode_Version="8"
|
||||
|
||||
git:
|
||||
submodules: false
|
||||
@@ -52,6 +51,8 @@ before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./.travis-before_install.sh "$CC" "$Tr_Compiler_Version"; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sdl2 lua freetype ftgl libogg glew libvorbis cppunit glib fribidi miniupnpc wxmac; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$Tr_Xcode_Version" != "default" ]; then brew link --force gettext; fi
|
||||
# ^ odd linking problems related with brew which is not creating links, not on travis also needed are: cmake + pkgconfig + xquartz (find by "search") + (maybe) git
|
||||
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" = "gcc" ]; then export CXX="g++-${Tr_Compiler_Version}" CC="gcc-${Tr_Compiler_Version}"; fi
|
||||
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" == "clang" ]; then export CXX="clang++-${Tr_Compiler_Version}" CC="clang-${Tr_Compiler_Version}"; fi
|
||||
- $CC --version
|
||||
|
Submodule data/glest_game updated: f755b3e256...aea4d1ce12
@@ -66,12 +66,12 @@ fi
|
||||
cd $PROJDIR
|
||||
mkdir -p "$RELEASEDIR/lib"
|
||||
|
||||
[[ -d "lib" ]] && rm -rf "lib"
|
||||
if [ -d "lib" ]; then rm -rf "lib"; fi
|
||||
echo "building binary dependencies ..."
|
||||
./makedeps_folder.sh megaglest
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 'ERROR: "./makedeps_folder.sh megaglest" failed.' >&2; exit 2
|
||||
fi
|
||||
for mg_bin in megaglest megaglest_editor megaglest_g3dviewer; do
|
||||
./makedeps_folder.sh "$mg_bin"
|
||||
if [ "$?" -ne "0" ]; then echo "ERROR: \"./makedeps_folder.sh $mg_bin\" failed." >&2; exit 2; fi
|
||||
done
|
||||
|
||||
# copy binary info
|
||||
cd $PROJDIR
|
||||
|
@@ -22,16 +22,21 @@ sync_support_libs(){
|
||||
local _cp="/bin/cp"
|
||||
#local skip_deps="libm.so libpthread.so libstdc++.so libgcc_s.so libc.so libdl.so libX11.so libpulse libfusion libdirect libnvidia libXext librt libxcb libICE libSM libXtst libwrap libdbus libXau libXdmcp libnsl libFLAC libGL"
|
||||
local skip_deps=""
|
||||
local keep_deps="libcurl libgnu libgcrypt libnghttp libidn librtmp libssh libnettle libicu liblua libjpeg libpng libircclient libminiupnpc libwx libgtk libgdk libftgl libfreetype libvlc"
|
||||
|
||||
local keep_deps="libcurl libgnu libgcrypt libnghttp libidn librtmp libssh libnettle libicu liblua libjpeg libpng libvorbis libogg libircclient libminiupnpc libwx_ libGLEW libftgl libfreetype libvlc libopenal libSDL2-"
|
||||
# libwx_ - recommended to keep always just because API/ABI compatibility, huge impact for map editor
|
||||
# libGLEW - most likely safe to keep embedded everywhere, its version matters with tools
|
||||
# libopenal - safe to keep but if any version is available locally then should be replaced
|
||||
# libSDL2 - safe to keep on .deb family only and even there, if any version is available locally then should be replaced
|
||||
# liblber & libldap_r - aren't safe to keep, very nasty secondary dependencies
|
||||
|
||||
local scan_via_skiplist=1
|
||||
|
||||
if [ -n "$skip_deps" ]; then
|
||||
scan_via_skiplist=1
|
||||
echo 'scanning for deps TO SKIP...'
|
||||
elif [ -n "$keep_deps" ]; then
|
||||
echo "scanning for deps TO SKIP for '$pFILE'..."
|
||||
elif [ -n "$keep_deps" ]; then
|
||||
scan_via_skiplist=0
|
||||
echo 'scanning for deps TO KEEP...'
|
||||
echo "scanning for deps TO KEEP for '$pFILE'..."
|
||||
fi
|
||||
|
||||
|
||||
@@ -48,7 +53,7 @@ sync_support_libs(){
|
||||
|
||||
skipfile=0
|
||||
|
||||
if [ $scan_via_skiplist -eq 1 ]; then
|
||||
if [ $scan_via_skiplist -eq 1 ]; then
|
||||
for j in $(echo $skip_deps)
|
||||
do
|
||||
if [ `awk "BEGIN {print index(\"$i\", \"$j\")}"` -ne 0 ]; then
|
||||
@@ -57,7 +62,7 @@ sync_support_libs(){
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif [ $scan_via_skiplist -eq 0 ]; then
|
||||
elif [ $scan_via_skiplist -eq 0 ]; then
|
||||
skipfile=1
|
||||
for j in $(echo $keep_deps)
|
||||
do
|
||||
@@ -69,7 +74,7 @@ sync_support_libs(){
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $skipfile -eq 0 ]; then
|
||||
if [ "$skipfile" -eq "0" ] && [ ! -e "$d/$(basename "$i")" ]; then
|
||||
echo Including file = [$i]
|
||||
${_cp} -f $i ${d}
|
||||
fi
|
||||
@@ -91,9 +96,7 @@ usage(){
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage
|
||||
#[ ! -d $BASE ] && mkdir -p $BASE
|
||||
[ -d $BASE ] && rm -r $BASE
|
||||
mkdir -p $BASE
|
||||
if [ ! -d "$BASE" ]; then mkdir -p "$BASE"; fi
|
||||
|
||||
# copy all files
|
||||
for f in $file
|
||||
|
@@ -1,12 +1,11 @@
|
||||
#!/bin/sh
|
||||
# 2011 Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
||||
# 2014 Rewritten by filux <heross(@@)o2.pl>
|
||||
# Copyright (c) 2011-2015 under GNU GPL v3.0+
|
||||
# Copyright (c) 2011-2016 under GNU GPL v3.0+
|
||||
# ----------------------------------------------------------------------------
|
||||
# If you want to have core files generated (for debugging purposes):
|
||||
# ulimit -c unlimited
|
||||
LANG=C
|
||||
|
||||
SCRIPTLOCATION="$(readlink -f "$0")"
|
||||
GAMEDIR="$(dirname "$SCRIPTLOCATION")"
|
||||
ARCHITECTURE="$(uname -m | tr '[A-Z]' '[a-z]')"
|
||||
@@ -22,20 +21,21 @@ SHORT_GAME_NAME="megaglest"
|
||||
# e.g. "\"long name with spaces\""
|
||||
LONG_GAME_NAME="MegaGlest"
|
||||
# -------
|
||||
LIBDIR="lib"; ExitStatus=0; LibsWarnings=""; IgnoredLibs=""
|
||||
LIBDIR="lib"; ExitStatus=0; LibsWarnings=""; IgnoredLibs=""; FirstLnError=""
|
||||
if [ ! -d "$GAMEDIR/$LIBDIR" ]; then mkdir "$GAMEDIR/$LIBDIR"; fi
|
||||
if [ "$1" = "--tool-editor" ] || [ "$1" = "--tool-g3dviewer" ] || [ "$1" = "--tool-buginfo" ];
|
||||
then OperatingMode="$1"; else OperatingMode="--game"; fi
|
||||
BeginTime="$(date +"%s")"
|
||||
if [ "$(which lsb_release 2>/dev/null)" != "" ]; then
|
||||
OS_INFO_P="$(which lsb_release) -d"
|
||||
OS_INFO="$($OS_INFO_P | awk -F ':[ \t]*' '{print $2}')"
|
||||
WhichLsbRelease="$(which lsb_release 2>/dev/null)"
|
||||
if [ "$WhichLsbRelease" != "" ]; then
|
||||
OS_INFO="$($WhichLsbRelease -d | awk -F ':[ \t]*' '{print $2}')"
|
||||
fi
|
||||
|
||||
if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
if [ "$LDCONFIG" = "" ]; then
|
||||
if [ "$(which ldconfig 2>/dev/null)" != "" ]; then
|
||||
LDCONFIG="$(which ldconfig 2>/dev/null)"; LDconfigType=1
|
||||
WhichLdconfig="$(which ldconfig 2>/dev/null)"
|
||||
if [ "$WhichLdconfig" != "" ]; then
|
||||
LDCONFIG="$WhichLdconfig"; LDconfigType=1
|
||||
elif [ -x "/sbin/ldconfig" ]; then
|
||||
LDCONFIG="/sbin/ldconfig"; LDconfigType=2
|
||||
else
|
||||
@@ -47,7 +47,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
LDconfigType=9
|
||||
fi
|
||||
LibsWarnings="$LibsWarnings
|
||||
|| $LONG_GAME_NAME requires some libraries to be present on this system.
|
||||
|| $LONG_GAME_NAME requires some libraries to be present on this operating system.
|
||||
|| Missing libraries (if any) will be listed next, along with full names
|
||||
|| and default versions. Use the package manager provided by your Linux
|
||||
|| distribution to install them. Most Linux distributions provide a web search
|
||||
@@ -60,7 +60,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
|| downloaded and installed by running this script:
|
||||
|| '${SHORT_GAME_NAME}-mini-update.sh'
|
||||
||
|
||||
|| If, after this, $LONG_GAME_NAME still fails to start, please report a bug at
|
||||
|| If after this, $LONG_GAME_NAME still fails to start, please report a bug at
|
||||
|| '$BugReportEngine'
|
||||
|| or '$BugReportBoth'"
|
||||
LibsWarnings="$LibsWarnings
|
||||
@@ -69,19 +69,15 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
|| OS info. [$OS_INFO], Arch.[$ARCHITECTURE], Dir.[$GAMEDIR]"
|
||||
|
||||
if [ "$ARCHITECTURE" = "x86_64" ]; then GrepPattern="x86[_-]64"
|
||||
else GrepPattern="$ARCHITECTURE"; fi
|
||||
else GrepPattern="$ARCHITECTURE"; fi
|
||||
LDCONFIG_P="$($LDCONFIG -p)"; ArchSortLibs="no"
|
||||
LDCONFIG_P_ARCH="$(echo "$LDCONFIG_P" | grep "$GrepPattern")"
|
||||
if [ "$LDCONFIG_P_ARCH" != "" ]; then
|
||||
LDCONFIG_P_R_ARCH="$(echo "$LDCONFIG_P" | grep -v "$GrepPattern")"
|
||||
ArchSortLibs="yes"
|
||||
fi
|
||||
if [ "$OperatingMode" = "--game" ]; then
|
||||
ldd_target="$GAMEDIR/$EXC_BINARY"
|
||||
else
|
||||
ldd_target="$GAMEDIR/$2"
|
||||
fi
|
||||
c_required_libs="$(ldd "$ldd_target")"
|
||||
if [ "$OperatingMode" = "--game" ]; then ldd_target="$GAMEDIR/$EXC_BINARY"
|
||||
else ldd_target="$GAMEDIR/$2"; fi
|
||||
|
||||
hasSOlib() {
|
||||
if [ "$2" = "myarch" ]; then
|
||||
@@ -96,21 +92,25 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
findMissingSO() {
|
||||
SO_WANTED_LIB="$1"; SO_WANTED_LIB2="$2"; SO_LIB_PATTERN="$3"
|
||||
SO_LINKED_LIB="$GAMEDIR/$LIBDIR/$SO_WANTED_LIB2"
|
||||
|
||||
hasSO="$(hasSOlib "$SO_LIB_PATTERN" "myarch")"; CommonPart="no"
|
||||
if [ "$hasSO" != "" ]; then
|
||||
if [ ! -L "$SO_LINKED_LIB" ] && [ -e "$SO_LINKED_LIB" ]; then EmbLibExist="yes"; else EmbLibExist="no"; fi
|
||||
if [ "$hasSO" != "" ] && ( [ "$6" != "|L" ] || [ "$EmbLibExist" = "no" ] ); then
|
||||
CommonPart="yes"
|
||||
elif [ "$SO_WANTED_LIB" = "$SO_LIB_PATTERN" ] && [ ! -h "$SO_LINKED_LIB" ] && [ -e "$SO_LINKED_LIB" ]; then
|
||||
elif [ "$SO_WANTED_LIB" = "$SO_LIB_PATTERN" ] && [ "$EmbLibExist" = "yes" ] && [ "$6" != "|H" ]; then
|
||||
if [ "$6" = "|L" ]; then Emb_Keyword=" is used as"; else Emb_Keyword=" is missing in your OS, using"; fi
|
||||
LibsWarnings="$LibsWarnings
|
||||
||- default library [$SO_WANTED_LIB2] is missing in your OS, using embedded library."
|
||||
||- default library ${5}[$SO_WANTED_LIB2]$Emb_Keyword embedded library."
|
||||
return 0
|
||||
else
|
||||
hasSO="$(hasSOlib "$SO_LIB_PATTERN")"
|
||||
if [ "$ArchSortLibs" = "yes" ] && [ "$hasSO" != "" ]; then
|
||||
CommonPart="yes"
|
||||
else
|
||||
if [ "$SO_WANTED_LIB" = "$SO_LIB_PATTERN" ]; then
|
||||
if [ "$SO_WANTED_LIB" = "$SO_LIB_PATTERN" ] && ( [ "$EmbLibExist" = "no" ] || [ "$6" = "|H" ] ); then
|
||||
if [ "$6" = "|H" ] && [ "$EmbLibExist" = "yes" ]; then Emb_Keyword2=" (ae)"; else Emb_Keyword2=""; fi
|
||||
LibsWarnings="$LibsWarnings
|
||||
||- default library [$SO_WANTED_LIB2] is missing in your OS, attempting to find and link to different version if is available..."
|
||||
||- default library ${5}[$SO_WANTED_LIB2] is missing in your OS${Emb_Keyword2}, attempting to find and link to different version if is available..."
|
||||
fi
|
||||
if [ "$4" != "no" ]; then
|
||||
LibsWarnings="$LibsWarnings
|
||||
@@ -121,15 +121,24 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
fi
|
||||
if [ "$CommonPart" = "yes" ]; then
|
||||
if [ "$SO_WANTED_LIB" != "$SO_LIB_PATTERN" ]; then
|
||||
LibsWarnings="$LibsWarnings
|
||||
|| new library link [.../$LIBDIR/$SO_WANTED_LIB2] pointed to [$hasSO]."
|
||||
ln -f -s "$hasSO" "$SO_LINKED_LIB"
|
||||
if [ "$?" -eq "0" ]; then
|
||||
LibsWarnings="$LibsWarnings
|
||||
|| new library link [.../$LIBDIR/$SO_WANTED_LIB2] pointed to [$hasSO]."
|
||||
else
|
||||
LibsWarnings="$LibsWarnings
|
||||
|| ERROR: Detected some problems during process of creating symlink."
|
||||
if [ "$FirstLnError" = "" ]; then FirstLnError="no"
|
||||
LibsWarnings="$LibsWarnings
|
||||
|| ... lack of write permissions in game location?"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ -e "$SO_LINKED_LIB" ]; then rm -f "$SO_LINKED_LIB"; fi
|
||||
if [ "$(echo "$c_required_libs" | grep "$SO_LIB_PATTERN[ \t]*=>[ \t]*not found")" != "" ]; then
|
||||
if [ "$(echo "$c_required_libs" | grep "${SO_LIB_PATTERN}[ \t]*=>[ \t]*not found")" != "" ] && [ "$EmbLibExist" = "no" ]; then
|
||||
#rare exception
|
||||
LibsWarnings="$LibsWarnings
|
||||
||- default library: [$SO_WANTED_LIB2] is missing in your OS, attempting to find and link to different version if is available...
|
||||
||- default library: ${5}[$SO_WANTED_LIB2] is missing in your OS, attempting to find and link to different version if is available...
|
||||
|| > not found !"
|
||||
fi
|
||||
fi
|
||||
@@ -139,24 +148,38 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
|
||||
checkLibsStatus() {
|
||||
if [ "$1" != "" ]; then
|
||||
list_of_libs="$(echo "$1" | sed -e 's|\([^\]\)\.|\1\\.|g' -e 's|\[num\]|[0-9]\\+|g')"
|
||||
for var in $list_of_libs; do
|
||||
patterns="$(echo "$var" | sed -e 's|^ */||' -e 's|/| |g' -e 's/| /|/')"
|
||||
patterns_num="$(echo "$patterns" | wc -w)"
|
||||
wanted_lib="$(echo "$patterns" | awk '{print $1}')"; i=2
|
||||
wanted_lib2="$(echo "$wanted_lib" | sed 's/\\//g')";
|
||||
last_pattern="$(echo "$patterns" | awk '{print $(NF-1)}')"
|
||||
if [ "$(echo "$c_required_libs" | grep "[^_-]$last_pattern")" != "" ]; then
|
||||
for var2 in $patterns; do
|
||||
if [ "$var2" = "|" ]; then break; fi
|
||||
lib_pattern="$(echo "$var" | awk -F '/' -v ii="$i" '{print $ii}')"
|
||||
if [ "$i" -lt "$patterns_num" ]; then end_w="no"; else end_w="yes"; fi
|
||||
findMissingSO "$wanted_lib" "$wanted_lib2" "$lib_pattern" "$end_w"
|
||||
if [ "$?" -eq "0" ]; then break; else i=$((i + 1)); fi
|
||||
done
|
||||
else
|
||||
IgnoredLibs="$IgnoredLibs $wanted_lib2"
|
||||
check_nr=1
|
||||
while [ "$check_nr" -le "2" ]; do
|
||||
if [ "$check_nr" -eq "1" ]; then c_required_libs="$(ldd "$ldd_target")"; else
|
||||
c_required_libs="$(LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${GAMEDIR}/${LIBDIR}" ldd "$ldd_target")"
|
||||
fi
|
||||
list_of_libs="$(echo "$1" | sed -e 's|\([^\]\)\.|\1\\.|g' -e 's|\[num\]|[0-9]\\+|g')"
|
||||
for var in $list_of_libs; do
|
||||
patterns="$(echo "$var" | sed -e 's|^ */||' -e 's|/| |g' -e 's/\(|[HL]\?\) /\1/')"
|
||||
wanted_lib="$(echo "$patterns" | awk '{print $1}')"; i=2
|
||||
if [ "$check_nr" -ne "1" ] && [ "$(echo "$IgnoredLibs" | grep "$wanted_lib")" != "" ]; then WantedLibIgnored="yes"
|
||||
else WantedLibIgnored="no"; fi
|
||||
if [ "$check_nr" -eq "1" ] || [ "$WantedLibIgnored" = "yes" ]; then
|
||||
wanted_lib2="$(echo "$wanted_lib" | sed 's/\\//g')"; patterns_num="$(echo "$patterns" | wc -w)"
|
||||
last_pattern="$(echo "$patterns" | awk '{print $(NF-1)}')"; end_mark="$(echo "$patterns" | awk '{print $NF}')"
|
||||
if [ "$check_nr" -ne "1" ]; then foreign_dep="(sd) "; else foreign_dep=""; fi
|
||||
if [ "$(echo "$c_required_libs" | grep "[^_-]$last_pattern")" != "" ]; then
|
||||
if [ "$WantedLibIgnored" = "yes" ]; then IgnoredLibs="$(echo "$IgnoredLibs" | sed "s|$wanted_lib||")"; fi
|
||||
for var2 in $patterns; do
|
||||
if [ "$var2" = "|" ] || [ "$var2" = "|H" ] || [ "$var2" = "|L" ]; then break; fi
|
||||
lib_pattern="$(echo "$var" | awk -F '/' -v ii="$i" '{print $ii}')"
|
||||
if [ "$wanted_lib" != "$last_pattern" ] && [ "$i" -lt "$patterns_num" ]; then end_w="no"
|
||||
else end_w="yes"; fi
|
||||
findMissingSO "$wanted_lib" "$wanted_lib2" "$lib_pattern" "$end_w" "$foreign_dep" "$end_mark"
|
||||
if [ "$?" -eq "0" ]; then break; else i=$((i + 1)); fi
|
||||
done
|
||||
elif [ "$WantedLibIgnored" = "no" ]; then
|
||||
IgnoredLibs="$IgnoredLibs $wanted_lib2"
|
||||
if [ -L "$GAMEDIR/$LIBDIR/$wanted_lib2" ]; then rm -f "$GAMEDIR/$LIBDIR/$wanted_lib2"; fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
check_nr=$((check_nr + 1))
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -168,15 +191,20 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
# or [num] what mean "any number with one or more digits".
|
||||
# Last word should have length at least 6 chars, but use longer if string is too much common.
|
||||
|
||||
# If line is ended by /|H/ this mean 'H'igher priority about finding local library instead of existing
|
||||
# (if exist) embedded version, useful in case if embedded library has a lot of own dependencies.
|
||||
# If line is ended by /|L/ this mean 'L'ower priority about finding local library instead of existing
|
||||
# (if exist) embedded version, (rarely) useful in case if embedded library may eliminate ABI-API
|
||||
# conflixts, e.g. binary <> WxWidgets.
|
||||
# ignored: linux-vdso.so*, linux-gate.so*, ld-linux-*.so*, libpthread.so*, libpulsecommon-*.so, libresolv.so*
|
||||
libs_list="/libSDL2-2.0.so.0/libSDL2-2.[num].so/libSDL2-[0-9].[num].so/libSDL2-/|/
|
||||
libs_list="/libSDL2-2.0.so.0/libSDL2-2.[num].so/libSDL2-[0-9].[num].so/libSDL2-/|H/
|
||||
/libGLU.so.1/libGLU.so/|/
|
||||
/libGL.so.1/libGL.so/|/
|
||||
/libX11.so.6/libX11.so/|/
|
||||
/libidn.so.11/libidn.so/|/
|
||||
/librtmp.so.0/librtmp.so/|/
|
||||
/libgcrypt.so.11/libgcrypt.so.1[0-9]/libgcrypt.so/libgcrypt/|/
|
||||
/libgnutls.so.26/libgnutls.so.2[0-9]/libgnutls.so/libgnutls/|/
|
||||
/libgcrypt.so.11/|/
|
||||
/libgnutls.so.26/|/
|
||||
/libgssapi_krb5.so.2/libgssapi_krb[0-9].so/libgssapi_krb[num].so/libgssapi_krb/|/
|
||||
/liblber-2.4.so.2/liblber-2.[num].so/liblber-[0-9].[num].so/liblber-/liblber/|/
|
||||
/libldap_r-2.4.so.2/libldap_r-2.[num].so/libldap_r-[0-9].[num].so/libldap_r-/libldap_r/|/
|
||||
@@ -255,14 +283,14 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
/libGLEW.so.1.10/libGLEW.so.1.[num]/libGLEW.so/|/"
|
||||
if [ "$OperatingMode" = "--game" ]; then
|
||||
libs_list="$libs_list
|
||||
/libopenal.so.1/libopenal.so/libopenal/|/
|
||||
/libopenal.so.1/libopenal.so/libopenal/|H/
|
||||
/libvlccore.so.7/libvlccore.so/libvlccore/|/
|
||||
/libvlc.so.5/libvlc.so/|/"
|
||||
else
|
||||
libs_list="$libs_list
|
||||
/libwx_gtk2u_core-3.0.so.0/libwx_gtk2u_core-3.[num].so/|/
|
||||
/libwx_baseu-3.0.so.0/libwx_baseu-3.[num].so/|/
|
||||
/libwx_gtk2u_gl-3.0.so.0/libwx_gtk2u_gl-3.[num].so/|/
|
||||
/libwx_gtk2u_core-3.0.so.0/libwx_gtk2u_core-3.[num].so/|L/
|
||||
/libwx_baseu-3.0.so.0/libwx_baseu-3.[num].so/|L/
|
||||
/libwx_gtk2u_gl-3.0.so.0/libwx_gtk2u_gl-3.[num].so/|L/
|
||||
/libgtk-x11-2.0.so.0/libgtk-x11-2.[num].so/libgtk-x11-[0-9].[num].so/libgtk-x11-[0-9]/libgtk-x11/|/
|
||||
/libgdk-x11-2.0.so.0/libgdk-x11-2.[num].so/libgdk-x11-[0-9].[num].so/libgdk-x11-[0-9]/libgdk-x11/|/
|
||||
/libpangocairo-1.0.so.0/libpangocairo-1.[num].so/libpangocairo-[0-9].[num].so/libpangocairo-[0-9]/libpangocairo/|/
|
||||
@@ -272,7 +300,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
/libgobject-2.0.so.0/libgobject-2.[num].so/libgobject-[0-9].[num].so/libgobject-[0-9]/libgobject/|/
|
||||
/libglib-2.0.so.0/libglib-2.[num].so/libglib-[0-9].[num].so/libglib-[0-9]/libglib-/|/
|
||||
/libSM.so.6/libSM.so/|/
|
||||
/libjpeg.so.8/libjpeg.so.[0-9]/libjpeg.so/|/
|
||||
/libjpeg.so.8/|/
|
||||
/libtiff.so.5/libtiff.so/|/
|
||||
/libgmodule-2.0.so.0/libgmodule-2.[num].so/libgmodule-[0-9].[num].so/libgmodule-[0-9]/libgmodule/|/
|
||||
/libatk-1.0.so.0/libatk-1.[num].so/libatk-[0-9].[num].so/libatk-[0-9]/|/
|
||||
@@ -297,6 +325,27 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
#else
|
||||
#fi
|
||||
|
||||
IfRealLibExist() {
|
||||
RealEmbLib="$GAMEDIR/$LIBDIR/$1"
|
||||
if [ ! -L "$RealEmbLib" ] && [ -e "$RealEmbLib" ]; then
|
||||
if [ "$2" = "remove" ]; then rm -f "$RealEmbLib"; else return 0; fi
|
||||
else return 1; fi
|
||||
}
|
||||
# exceptions, keep them in sync with listed libraries on 'libs_list'
|
||||
if [ "$(echo "$OS_INFO" | grep 'Debian\|Ubuntu\|LinuxMint')" = "" ]; then IfRealLibExist "libSDL2-2.0.so.0" "remove"; fi
|
||||
if [ "$OperatingMode" = "--game" ]; then
|
||||
if [ "$(IfRealLibExist "libvlc.so.5"; echo "$?")" -ne "0" ] && [ "$(IfRealLibExist "libvlccore.so.7"; echo "$?")" -ne "0" ] && \
|
||||
[ -d "$GAMEDIR/$LIBDIR/vlc" ]; then rm -rf "$GAMEDIR/$LIBDIR/vlc"; fi
|
||||
else
|
||||
if [ "$(IfRealLibExist "libwx_gtk2u_core-3.0.so.0"; echo "$?")" -ne "0" ] || \
|
||||
[ "$(IfRealLibExist "libwx_baseu-3.0.so.0"; echo "$?")" -ne "0" ] || \
|
||||
[ "$(IfRealLibExist "libwx_gtk2u_gl-3.0.so.0"; echo "$?")" -ne "0" ]; then
|
||||
IfRealLibExist "libwx_gtk2u_core-3.0.so.0" "remove"
|
||||
IfRealLibExist "libwx_baseu-3.0.so.0" "remove"
|
||||
IfRealLibExist "libwx_gtk2u_gl-3.0.so.0" "remove"
|
||||
fi
|
||||
fi
|
||||
|
||||
checkLibsStatus "$libs_list"
|
||||
if [ -f "$GAMEDIR/${SHORT_GAME_NAME}-configure-desktop.sh" ]; then
|
||||
"$GAMEDIR/${SHORT_GAME_NAME}-configure-desktop.sh"
|
||||
@@ -312,9 +361,7 @@ fi
|
||||
if [ "$OperatingMode" = "--game" ]; then
|
||||
if [ -d "$GAMEDIR/$LIBDIR" ]; then
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${GAMEDIR}/${LIBDIR}"
|
||||
if [ -d "$GAMEDIR/$LIBDIR/vlc" ]; then
|
||||
export VLC_PLUGIN_PATH="${GAMEDIR}/${LIBDIR}/vlc"
|
||||
fi
|
||||
if [ -d "$GAMEDIR/$LIBDIR/vlc" ]; then export VLC_PLUGIN_PATH="${GAMEDIR}/${LIBDIR}/vlc"; fi
|
||||
fi
|
||||
"$GAMEDIR/$EXC_BINARY" "$@"
|
||||
ExitStatus="$?"
|
||||
@@ -323,11 +370,14 @@ if [ "$OperatingMode" = "--game" ]; then
|
||||
ErrorTime="$(date +"%s")"
|
||||
fi
|
||||
if [ "$ExitStatus" -ne "0" ] || [ "$OperatingMode" = "--tool-editor" ] || [ "$OperatingMode" = "--tool-g3dviewer" ]; then
|
||||
if [ "$(echo "$@" | grep "^[ \t]*--help[ \t]*$")" = "" ] && [ "$(echo "$@" | grep "^[ \t]*-h[ \t]*$")" = "" ]; then
|
||||
if [ "$(echo "$@" | grep '^[ \t]*--help[ \t]*$\|^[ \t]*-h[ \t]*$')" = "" ]; then
|
||||
DiffTime="$(($ErrorTime-$BeginTime))"
|
||||
if [ "$DiffTime" -le "15" ] && [ -e "$GAMEDIR/$BinaryToCheck" ] && [ -x "$GAMEDIR/$BinaryToCheck" ]; then
|
||||
if [ "$OperatingMode" = "--game" ]; then ShowLibsTime=35; else ShowLibsTime=45; fi
|
||||
if [ "$DiffTime" -le "$ShowLibsTime" ] && [ -e "$GAMEDIR/$BinaryToCheck" ] && [ -x "$GAMEDIR/$BinaryToCheck" ]; then
|
||||
echo "$LibsWarnings" | sed 's/^[\t ]*||//g' >&2; echo
|
||||
if [ "$IgnoredLibs" != "" ]; then
|
||||
if [ "$OperatingMode" != "--tool-buginfo" ]; then
|
||||
IgnoredLibs="$(echo "$IgnoredLibs" | sed -e 's/ */ /g' -e 's/^ //g')"
|
||||
if [ "$IgnoredLibs" = "" ]; then IgnoredLibs="-none-"; fi
|
||||
echo "Ignored libraries (please include in bug reports):" >&2
|
||||
echo "$IgnoredLibs" >&2; echo
|
||||
fi
|
||||
@@ -339,7 +389,7 @@ if [ "$ExitStatus" -ne "0" ] || [ "$OperatingMode" = "--tool-editor" ] || [ "$Op
|
||||
|| here: '$BugReportBoth2',
|
||||
|| or if you think that bug is related with game engine here:
|
||||
|| '$BugReportEngine'"
|
||||
if [ "$BugReportData" != "" ] && [ "$BugReportData" != "$BugReportBoth2" ] && [ "$BugReportData" != "$BugReportEngine" ] ; then
|
||||
if [ "$BugReportData" != "" ] && [ "$BugReportData" != "$BugReportBoth2" ] && [ "$BugReportData" != "$BugReportEngine" ]; then
|
||||
BugReportInfo="$BugReportInfo,
|
||||
|| or if you think that bug is related with game data here:
|
||||
|| '$BugReportData'."
|
||||
|
Submodule mk/linux/tools-for-standalone-client/installer/mojosetup updated: 0bc051300e...86bb138f83
@@ -1,4 +1,4 @@
|
||||
local GAME_INSTALL_SIZE = 680000000;
|
||||
local GAME_INSTALL_SIZE = 705000000;
|
||||
local GAME_VERSION = "3.12-dev";
|
||||
|
||||
local _ = MojoSetup.translate
|
||||
|
Reference in New Issue
Block a user