Made the run script look for missing dependencies.
On Linux, MultiMC's startup script will now look for plugins with missing depenedencies and warn the user about them if they are missing.
This commit is contained in:
parent
b69351d50d
commit
e6e63307fd
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# Basic start script for running MultiMC with the libs packaged with it.
|
# Basic start script for running MultiMC with the libs packaged with it.
|
||||||
|
|
||||||
MMC_DIR=`dirname "$0"`
|
MMC_DIR=`dirname "$0"`
|
||||||
@ -10,9 +10,24 @@ export LD_LIBRARY_PATH="${MMC_DIR}/bin":$LD_LIBRARY_PATH
|
|||||||
export QT_PLUGIN_PATH="${MMC_DIR}/plugins"
|
export QT_PLUGIN_PATH="${MMC_DIR}/plugins"
|
||||||
export QT_FONTPATH="${MMC_DIR}/fonts"
|
export QT_FONTPATH="${MMC_DIR}/fonts"
|
||||||
|
|
||||||
# Just to be sure...
|
# Detect missing dependencies...
|
||||||
chmod +x "${MMC_DIR}/bin/MultiMC"
|
DEPS_LIST=`ldd "${MMC_DIR}"/plugins/*/*.so | grep "not found" | awk -vORS=", " '{ print $1 }'`
|
||||||
|
if [ -z $DEPS_LIST ]; then
|
||||||
|
# We have all our dependencies. Run MultiMC.
|
||||||
|
echo "No missing dependencies found."
|
||||||
|
|
||||||
# run MultiMC
|
# Just to be sure...
|
||||||
"${MMC_DIR}/bin/MultiMC" -d "${MMC_DIR}" $@
|
chmod +x "${MMC_DIR}/bin/MultiMC"
|
||||||
|
|
||||||
|
# Run MultiMC
|
||||||
|
"${MMC_DIR}/bin/MultiMC" -d "${MMC_DIR}" $@
|
||||||
|
|
||||||
|
# Exit with MultiMC's exit code.
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
echo "Error: MultiMC is missing the following libraries that it needs to work correctly:"
|
||||||
|
echo "\t${DEPS_LIST}"
|
||||||
|
echo "Please install them from your distribution's package manager."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user