2013-12-13 21:08:17 +05:30
|
|
|
#!/bin/sh
|
2013-02-12 21:44:23 +05:30
|
|
|
# Basic start script for running MultiMC with the libs packaged with it.
|
|
|
|
|
2013-11-24 11:06:16 +05:30
|
|
|
MMC_DIR=`dirname "$0"`
|
2013-02-12 21:44:23 +05:30
|
|
|
cd "${MMC_DIR}"
|
2013-10-02 03:00:30 +05:30
|
|
|
echo "MultiMC Dir: ${MMC_DIR}"
|
2013-02-12 21:44:23 +05:30
|
|
|
|
2013-11-24 11:06:16 +05:30
|
|
|
# Set up env
|
2013-10-02 03:17:59 +05:30
|
|
|
export LD_LIBRARY_PATH="${MMC_DIR}/bin":$LD_LIBRARY_PATH
|
2013-10-02 02:43:21 +05:30
|
|
|
export QT_PLUGIN_PATH="${MMC_DIR}/plugins"
|
|
|
|
export QT_FONTPATH="${MMC_DIR}/fonts"
|
2013-11-24 11:06:16 +05:30
|
|
|
|
2013-12-13 21:08:17 +05:30
|
|
|
# Detect missing dependencies...
|
|
|
|
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."
|
2013-11-24 11:06:16 +05:30
|
|
|
|
2013-12-13 21:08:17 +05:30
|
|
|
# Just to be sure...
|
|
|
|
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
|
2013-10-02 02:43:21 +05:30
|
|
|
|