Skip to content

Commit

Permalink
Added appid definition for a game
Browse files Browse the repository at this point in the history
  • Loading branch information
xomachine committed Feb 26, 2017
1 parent f899fce commit 7719aba
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions app_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def get_app_config(appid):
if '<' in name or name == "":
name = startinfos["name"]
startinfos["infos"][name] = startinfo
print(startinfos)
return startinfos

def generate_manifest(appinfos):
Expand All @@ -80,9 +79,15 @@ def generate_runscript(appinfo: LaunchInfo, config):
export WINEDEBUG="trace+steam_api"
export WINEARCH="win32"
export WINEDLLOVERRIDES="*steam_api=b"
export SteamAppId="{6}"
export SteamControllerAppId="{6}"
export SteamGameId="{6}"
export SteamUser="{7}"
export SteamAppUser="{7}"
LD_PRELOAD="gameoverlayrenderer.so" wine "{1}/common/{2}" {3} &> "$(dirname "$0")/lastrun.log"
""".format(config['wineprefix'], config['steamapps'], appinfo.executable,
appinfo.arguments, config['dllpath'], config['overlaypath'])
appinfo.arguments, config['dllpath'], config['overlaypath'],
config['appid'], config['login'])
return runscript

aparser = argparse.ArgumentParser(description="Steam windows game installation script")
Expand Down Expand Up @@ -119,6 +124,7 @@ def generate_runscript(appinfo: LaunchInfo, config):
dump(config, f, indent=2)
config['password'] = config_args.password
appid = config_args.appid
config['appid'] = appid

print("Obtaining app info...")
appinfos = get_app_config(appid)
Expand All @@ -139,5 +145,8 @@ def generate_runscript(appinfo: LaunchInfo, config):
runscript_location = (rs_location + name + '.sh')
with open(runscript_location, "w") as f:
f.write(runscript)
print("Placing steam_appid.txt to the game location...")
with open(rs_location + '/steam_appid.txt', "w") as f:
f.write(str(appid))
print("Done! You may launch the game via scripts located at " + rs_location)

0 comments on commit 7719aba

Please sign in to comment.