ImportUtils.find_mountains_map() needs to be OS independent #135
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
priority low
This issue is almost unnoticable/unimportant to app function
surface importer
Issue is regarding surface importing modification.
Milestone
Currently
find_mountains_map()
is written solely for a Windows OS. This is due to the fact that it uses the winreg module (which can be used to search through the Windows Registery) to find the path of the MountainsMap executable.So, this function needs to be modified to support other operating systems. This would involve adding some sort of conditional check at the top of the function to determine which OS the tool is currently running (many options on how to do this).
The winreg implementation should then ONLY be run for Windows systems, while some new implementation should be run for MacOS or Linux systems. This new implementation could involve calling the
which
command to find MountainsMap, or just some other means of finding the MountainsMap executable.NOTE: MountainsMap may not even be supported by other OSs but Windows, and so you may end up having to just return a
MountainsNotFound
value (defined in ImportUtils.py) immediately after determining Windows is not being used.ANOTHER NOTE: I'm not sure what I was thinking with making
MountainsNotFound
a subtype ofstr
that could then be returned. If you would like to change this to an exception, I think that would still be fair to consider it in the scope of this issue.The text was updated successfully, but these errors were encountered: