Skip to content

Commit

Permalink
Merge pull request #38 from ThiaudioTT/hotfix/enconding-launcher-sett…
Browse files Browse the repository at this point in the history
…ings

fix(setup/uninstall): adds encoding as ut-f8
  • Loading branch information
ThiaudioTT authored Apr 21, 2024
2 parents bd92a27 + 9492289 commit 82287af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ This is a presence for discord that shows what you are doing in Hearts of Iron 4

Struggling in installing? See the [Wiki](https://github.com/ThiaudioTT/hoi4-presence/wiki/Downloading,-Installing-and-Uninstalling).

## Known issues

HOI4 is frequently updating, see known issues in [Issues](https://github.com/ThiaudioTT/hoi4-presence/labels/bug).

## Submiting an issue

Found a bug? Submit it in [Issues](https://github.com/ThiaudioTT/hoi4-presence/issues).
Found a bug? [Submit it](https://github.com/ThiaudioTT/hoi4-presence/issues/new/choose).

## Contributing

Expand Down
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
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.2.1",
"auto-update": true,
"date": "19-august-2023"
"date": "21-april-2024"
}

0 comments on commit 82287af

Please sign in to comment.