ThiaudioTT / hoi4-presence

Hearts of Iron IV presence for Discord!
MIT License
13 stars 10 forks source link

Change file location in batchFile if setup.py installs in another folder #5

Closed ThiaudioTT closed 1 year ago

ThiaudioTT commented 1 year ago

start "hoi4RPC.exe" "C:\Users\%USERNAME%\Documents\Paradox Interactive\Hearts of Iron IV\hoi4Presence\checkupdate.exe"

This drive name is fixed and needs to change like setup.py changes the installation.

We fix this issue making setup.py rewrite this line and making it point to the exact location.

Both for presence path and checkupdate path

ThiaudioTT commented 1 year ago

Pinning due to a higher priority

ThiaudioTT commented 1 year ago

Probably rewriting the path using the installer can solve it

ThiaudioTT commented 1 year ago

Setting a var and editing in python can solve it.

https://stackoverflow.com/questions/66453290/make-changes-to-a-bat-file-using-python

set checkUpdatePath="pathtogame"

@REM Start checkupdate
start "hoi4RPC.exe" %checkUpdatePath%

But I actually don't know if this is really an Issue, is there a possibility that checkupdate and hoi4presence is installed in other folder? This issue was created cause of OneDrive, but I don't use it.

https://forum.paradoxplaza.com/forum/threads/save-game-problem-with-onedrive.975580/

ThiaudioTT commented 1 year ago

If game is on drive D, the batch file won't execute it.