Install Directory Detection (Windows/Mac/Linux, Steam/GOG/Other?)

Discussion in 'Starbound FAQs, Q&A, and General Help' started by apocalyptech, Oct 2, 2018.

  1. apocalyptech

    apocalyptech Intergalactic Tourist

    Hello all! I'm writing yet another Starbound map viewer, and I'd like my app to at least take a stab at autodetecting Starbound install locations before falling back to asking the user for the install dir. I'm personally on Linux and I feel like I've got that possibility taken care of about as well as possible, but on other OSes I'm pretty much guessing.

    Windows

    First up, the slightly easier one: Windows. Does Starbound happen to create any registry entries or something which could be read to find the install location? For Steam installs, I'm given to understand that I can query one of the following registry locations for "InstallLocation" -

    Code:
    HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820
    HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820
    In the absence of anything else, could someone with a Steam install on Windows check to see if that key does exist for you?

    Relatedly, anyone know of any similar tricks that might be possible for folks who've installed via GOG Galaxy? And were there other supported avenues of Starbound Installation?

    Mac

    This is the one where I'm most at a loss. I do know how to look for the most common Steam install location and find games from that, including parsing Steam's "libraryfolders.vdf" to look for extra library folders. (This is what I do on Linux as well). Is there a common/default install location I can look at otherwise, though?

    As with Windows, is there a common place to look for GOG Galaxy installs?

    Linux

    This is the wild west of game detection, of course, and the best I think I can do here is the Steam tricks mentioned in the Mac section.

    ------

    Of course, in addition to the autodetection, the user can just choose the install location manually, so it's not like it's vital to get autodetection perfect, but I like to be user-friendly with that kind of thing.

    If anyone's curious about the viewer, it does already work in a pretty basic sense, and tries to do what autodetection I'm aware of. This is written in Python and hasn't been packaged up properly yet, but if you're willing to deal with installing Python and the other app dependencies by hand, you can give it a try right now if you like: https://github.com/apocalyptech/pystarboundmap (though keep in mind that I don't yet consider this "released").

    There's a big ol' TODO on there which should give you an idea of some things I'd like to have in there, though I suspect at least some of those will end up going unimplemented.

    If any Windows user here is bold enough to try it out and let me know if the Windows Steam autodetection that I've got in there works or not, I'd certainly appreciate that. The Windows side of things is completely untested, and it's even possible that it'll crash while trying to do the detection, due to bugs I haven't seen, so caveat emptor.
     

Share This Page