Skip to content

Commit

Permalink
fix(setup/uninstall): adds encoding as ut-f8
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiaudioTT committed Apr 21, 2024
1 parent bd92a27 commit 015b6b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def customInput() -> str | None:
# 4
try:
print("Changing launcher-settings.json...")
with open(gameFolder + "\\launcher-settings.json", "r") as f:
with open(gameFolder + "\\launcher-settings.json", "r", encoding="utf-8") as f:
launcher = json.load(f)
launcher["exePath"] = "runRPC.bat"
with open(gameFolder + "\\launcher-settings.json", "w") as f:
with open(gameFolder + "\\launcher-settings.json", "w", encoding="utf-8") as f:
json.dump(launcher, f, indent=4)
except Exception as e:
print(e)
Expand Down
4 changes: 2 additions & 2 deletions src/uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
# Revert launcher-settings.json
try:
print("Changing launcher-settings.json...")
with open(gameFolder + "\\launcher-settings.json", "r") as f:
with open(gameFolder + "\\launcher-settings.json", "r", encoding="utf-8") as f:
launcher = json.load(f)
launcher["exePath"] = "hoi4.exe"
with open(gameFolder + "\\launcher-settings.json", "w") as f:
with open(gameFolder + "\\launcher-settings.json", "w", encoding="utf-8") as f:
json.dump(launcher, f, indent=4)
except Exception as e:
print(e)
Expand Down

0 comments on commit 015b6b8

Please sign in to comment.