mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Add env variable to set app path.
This commit is contained in:
parent
106fb03bb0
commit
71e265f52b
2 changed files with 10 additions and 7 deletions
|
@ -193,6 +193,15 @@ std::string get_lib_path() {
|
||||||
|
|
||||||
std::string get_full_program_path()
|
std::string get_full_program_path()
|
||||||
{
|
{
|
||||||
|
std::string env_program_path = get_env_variable("SteamAppPath");
|
||||||
|
if (env_program_path.length()) {
|
||||||
|
if (env_program_path.back() != PATH_SEPARATOR[0]) {
|
||||||
|
env_program_path = env_program_path.append(PATH_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return env_program_path;
|
||||||
|
}
|
||||||
|
|
||||||
std::string program_path;
|
std::string program_path;
|
||||||
#if defined(STEAM_WIN32)
|
#if defined(STEAM_WIN32)
|
||||||
char DllPath[MAX_PATH] = {0};
|
char DllPath[MAX_PATH] = {0};
|
||||||
|
|
|
@ -8,8 +8,6 @@ CUR_DIR=$(pwd)
|
||||||
cd "$CONFIG_PATH"
|
cd "$CONFIG_PATH"
|
||||||
mkdir -p ~/.steam/sdk64
|
mkdir -p ~/.steam/sdk64
|
||||||
mkdir -p ~/.steam/sdk32
|
mkdir -p ~/.steam/sdk32
|
||||||
rm -rf ~/.steam/sdk64/steam_settings
|
|
||||||
rm -rf ~/.steam/sdk32/steam_settings
|
|
||||||
#make a backup of original files
|
#make a backup of original files
|
||||||
mv ~/.steam/steam.pid ~/.steam/steam.pid.orig || true
|
mv ~/.steam/steam.pid ~/.steam/steam.pid.orig || true
|
||||||
mv ~/.steam/sdk64/steamclient.so ~/.steam/sdk64/steamclient.so.orig || true
|
mv ~/.steam/sdk64/steamclient.so ~/.steam/sdk64/steamclient.so.orig || true
|
||||||
|
@ -17,18 +15,14 @@ mv ~/.steam/sdk32/steamclient.so ~/.steam/sdk32/steamclient.so.orig || true
|
||||||
#copy our files
|
#copy our files
|
||||||
cp x86/steamclient.so ~/.steam/sdk32/steamclient.so
|
cp x86/steamclient.so ~/.steam/sdk32/steamclient.so
|
||||||
cp x86_64/steamclient.so ~/.steam/sdk64/steamclient.so
|
cp x86_64/steamclient.so ~/.steam/sdk64/steamclient.so
|
||||||
cp -r steam_settings ~/.steam/sdk32/
|
|
||||||
cp -r steam_settings ~/.steam/sdk64/
|
|
||||||
echo $BASHPID > ~/.steam/steam.pid
|
echo $BASHPID > ~/.steam/steam.pid
|
||||||
cd "$APP_PATH"
|
cd "$APP_PATH"
|
||||||
SteamAppId=$APP_ID SteamGameId=$APP_ID "$APP_NAME"
|
SteamAppPath="$APP_PATH" SteamAppId=$APP_ID SteamGameId=$APP_ID "$APP_NAME"
|
||||||
cd "$CUR_DIR"
|
cd "$CUR_DIR"
|
||||||
#restore original
|
#restore original
|
||||||
rm -f ~/.steam/steam.pid
|
rm -f ~/.steam/steam.pid
|
||||||
rm -f ~/.steam/sdk64/steamclient.so
|
rm -f ~/.steam/sdk64/steamclient.so
|
||||||
rm -f ~/.steam/sdk32/steamclient.so
|
rm -f ~/.steam/sdk32/steamclient.so
|
||||||
rm -rf ~/.steam/sdk64/steam_settings
|
|
||||||
rm -rf ~/.steam/sdk32/steam_settings
|
|
||||||
mv ~/.steam/steam.pid.orig ~/.steam/steam.pid
|
mv ~/.steam/steam.pid.orig ~/.steam/steam.pid
|
||||||
mv ~/.steam/sdk64/steamclient.so.orig ~/.steam/sdk64/steamclient.so || true
|
mv ~/.steam/sdk64/steamclient.so.orig ~/.steam/sdk64/steamclient.so || true
|
||||||
mv ~/.steam/sdk32/steamclient.so.orig ~/.steam/sdk32/steamclient.so || true
|
mv ~/.steam/sdk32/steamclient.so.orig ~/.steam/sdk32/steamclient.so || true
|
||||||
|
|
Loading…
Reference in a new issue