1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/CastleJing-OpenRA

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
configure-system-libraries.sh 2.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Castle Отправлено 21.07.2021 17:45 5518a9b
#!/bin/sh
# Patch *.dll.config files to use system libraries, working around issues with directories and naming schemes
####
# This file must stay /bin/sh and POSIX compliant for macOS and BSD portability.
# Copy-paste the entire script into http://shellcheck.net to check.
####
patch_config()
{
LABEL=$1
SEARCHDIRS=$2
CONFIG=$3
REPLACE=$4
SEARCH=$5
# NET 5 does not support .config files, so we must use symlinks instead
# Exit early if the symlink already exists
if [ -L "bin/${REPLACE}" ]; then
return 0
fi
printf "Searching for %s... " "${LABEL}"
for DIR in ${SEARCHDIRS} ; do
for LIB in ${SEARCH}; do
if [ -f "${DIR}/${LIB}" ]; then
echo "${LIB}"
ln -s "${DIR}/${LIB}" "bin/${REPLACE}"
return 0
fi
done
done
echo "FAILED"
echo "OpenRA expects to find a file matching \"${SEARCH}\" in one of the following locations:"
echo "${SEARCHDIRS}"
exit 1
}
if [ "$(uname -s)" = "Darwin" ]; then
SEARCHDIRS="/usr/local/lib /usr/local/opt/openal-soft/lib"
patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.dylib liblua5.1.dylib
patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.dylib libSDL2-2.0.0.dylib
patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.dylib libopenal.1.dylib
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
else
SEARCHDIRS="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"
fi

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/CastleJing-OpenRA.git
git@api.gitlife.ru:oschina-mirror/CastleJing-OpenRA.git
oschina-mirror
CastleJing-OpenRA
CastleJing-OpenRA
prep-2012-sc-temp-for-share