ananace / wf_proton_launcher

1 stars 1 forks source link

Remove working directory requirement, base paths on file path instead #7

Open ananace opened 6 years ago

ananace commented 6 years ago

Currently, the launcher requires you to run it from the correct folder, it would be better to instead discover the path of the executable and base all file operations from there instead.

GloriousEggroll commented 6 years ago

you could just do this based on whether or not -registry:Steam is passed and change the Warframe.exe location and download path based on that

ananace commented 6 years ago

Changing such a fundamental thing based on a parameter that's not even truly used by the launcher itself feels off though.

And seeing as the launcher will always be in the Tools folder, it makes sense to use that path to discover the actual Warframe install path, instead of just hoping that it's a folder up from where the cwd happens to be.

ananace commented 6 years ago

I think the best solution for this would be to have it do some simple auto-detection, and allowing it to be overridden by launch arguments.

My thought is to first check the file location, see if it is in a Warframe install. Otherwise default to the working directory as the base path.
And if a parameter - for example - -path:cwd is set then it should always use the working directory, with a -path:file forcing it to base off of the file location. (Though probably with better names for the parameter and value)