Skip to content

Commit

Permalink
Migrate games with both exe and exe64
Browse files Browse the repository at this point in the history
  • Loading branch information
strycore committed Apr 3, 2024
1 parent b4efcef commit c01327a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions games/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,21 @@ def autofix_installers():

# Check if installer has exe64 support
if "exe64" in script.keys():
if "game" not in script:
script["game"] = {}
script["game"]["exe"] = script["exe64"]
if "exe" in script.keys():
stats["exe64_exe"] += 1
else:
stats["exe64_only"] += 1
if "game" not in script:
script["game"] = {}
script["game"]["exe"] = script["exe64"]
del(script["exe64"])
installer.content = dump_yaml(script)
installer.save()
script["game"]["launch_configs"] = []
script["game"]["launch_configs"].append({"exe": script["exe"], "name": "32 bit version"})
del(script["exe"])
del(script["exe64"])
installer.content = dump_yaml(script)
installer.save()
stats["exe64"] += 1
if "exe" in script.keys() and "exe64" not in script.keys():
if "game" not in script:
script["game"] = {}
if "exe" not in script["game"] or script["game"]["exe"] != script["exe"]:
if "exe" not in script["game"] or script["game"]["exe"].strip() == script["exe"].strip():
script["game"]["exe"] = script["exe"]
del(script["exe"])
installer.content = dump_yaml(script)
Expand Down

0 comments on commit c01327a

Please sign in to comment.