- fix windows build and better automation for building steam shim

This commit is contained in:
SoftCoder 2017-10-09 23:53:43 -07:00
parent ffe6e5462d
commit ab3b70f36a
3 changed files with 33 additions and 6 deletions

View File

@ -5,7 +5,7 @@
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
if ! cppcheck_loc="$(type -p "cppcheck")" || [ -z "$cppcheck_loc" ]; then
# install foobar here
# install cppcheck
echo "CPPCHECK is not installed, installing now..."
sudo apt install cppcheck
fi

View File

@ -102,7 +102,7 @@ std::string utf8_encode(const std::wstring &wstr);
std::wstring utf8_decode(const std::string &str);
std::string getRegKey(const std::string& location, const std::string& name);
void message(string message, bool isNonGraphicalModeEnabled,string writepath);
void message(string message, bool isNonGraphicalModeEnabled,const string &writepath);
void exceptionMessage(const exception &excp);
string getCommandLine();
void init_win32();

View File

@ -2,10 +2,37 @@
# Use this script to build MegaGlest Steam Shim using make
# ----------------------------------------------------------------------------
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
# Copyright (c) 2011-2013 Mark Vejvoda under GNU GPL v3.0+
# Copyright (c) 2011-2017 Mark Vejvoda under GNU GPL v3.0+
# ----------------------------------------------------------------------------
rm -f megaglest_shim
rm -f megaglest
#make STEAMWORKS?=/home/softcoder/Code/steamworks_sdk/sdk
CURRENTDIR="$(dirname $(readlink -f $0))"
rm -f ${CURRENTDIR}/megaglest_shim
rm -f ${CURRENTDIR}/megaglest
# Pass the path to your steam SDK example:
# builds.sh STEAMWORKS?=/home/softcoder/Code/steamworks_sdk/sdk
#
# make STEAMWORKS?=/home/softcoder/Code/steamworks_sdk/sdk
make $@
if [ $? -ne 0 ]; then
echo 'ERROR: MAKE failed.' >&2; exit 2
fi
STEAM_MG_PATH="$HOME/.steam/steam/steamapps/common/MegaGlest/"
if [ -d ${STEAM_MG_PATH} ]; then
if [ ! -f "${STEAM_MG_PATH}/steam_appid.txt" ]; then
echo "Installing steam appid file to Megaglest Steam folder [${STEAM_MG_PATH}] ..."
cp ${CURRENTDIR}/steam_appid.txt ${STEAM_MG_PATH}/steam_appid.txt
fi
PARAM1=$1
prefix=STEAMWORKS?=
STEAMWORKS=${PARAM1#$prefix}
# echo "${STEAMWORKS}"
if [ ! -f "${STEAM_MG_PATH}/lib/libsteam_api.so" ]; then
echo "Installing steam sdk api to Megaglest Steam folder [${STEAM_MG_PATH}/lib/] ..."
cp ${STEAMWORKS}/redistributable_bin/linux64/libsteam_api.so ${STEAM_MG_PATH}/lib/libsteam_api.so
fi
echo "Installing steam shim to Megaglest Steam folder [${STEAM_MG_PATH}] ..."
cp ${CURRENTDIR}/megaglest_shim ${STEAM_MG_PATH}/megaglest_shim
fi