C7-Game / Prototype

An early-stage, open-source 4X strategy game
https://c7-game.github.io/
MIT License
33 stars 9 forks source link

#382 - Remember install location for next time when it is set. #383

Closed QuintillusCFC closed 1 year ago

QuintillusCFC commented 1 year ago

Closes #382

This results in not having to either set the Civ3_Home environment variable, or manually select the install location every time. A nice convenience if you don't have Civ3 in the Windows Registry and aren't familiar with environment variables.

WildWeazel commented 1 year ago

@QuintillusCFC is this still relevant? I seem to remember something related to this going in already

QuintillusCFC commented 1 year ago

@QuintillusCFC is this still relevant? I seem to remember something related to this going in already

Yeah, it is. You're thinking of https://github.com/C7-Game/Prototype/pull/386, which gives auto-detect on Linux/Mac if the Steam version of Civ3 is findable.

This handles the case where Civ3 isn't findable, regardless of OS. Rather than setting the Civ3Home environment variable, which is a bit of a tough ask for a non-technical user (I'm not sure I know any non-developers, or at least developer-adjacent professionals, who would know how to do that), you can just select the location once in the UI, and with this update, it'll remember that in the future.

QuintillusCFC commented 1 year ago

I'm pretty sure I hadn't merged this because there was a conflict, and I haven't been doing much C7 work since then. Resolved it tonight (it was easy), now merging.