Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ConfigManager] Make OSGeo4W QGIS installation aware #473

Open
jonnyforestGIS opened this issue Sep 30, 2020 · 0 comments
Open

[ConfigManager] Make OSGeo4W QGIS installation aware #473

jonnyforestGIS opened this issue Sep 30, 2020 · 0 comments

Comments

@jonnyforestGIS
Copy link

Hi @NathanW2 ,
ROAM is not OSGeo4W QGIS installation aware. So I search in the code and I found in here this section inside of utils.py of configmanager.

def qgis_path(base_path, name):

for installpath in [qgis_path(os.environ['ProgramFiles'],"qgis-bin.exe"),

I start to do a PR about this and perhaps with a separate def osgeo path, something like this:

def qgis_path(base_path, name):
    return os.path.join(base_path, "QGIS 3.10", "bin", name)

def osgeo_path(base_path, name):
    return os.path.join(base_path, "bin", name)

def find_qgis():
    triedpaths = []
    for installpath in [qgis_path(os.environ['ProgramFiles'],"qgis-bin.exe"),
                        qgis_path(os.environ['ProgramFiles(x86)'], "qgis-bin.exe"),
                        qgis_path(os.environ['ProgramFiles'], "qgis-ltr-bin.exe"),
                        qgis_path(os.environ['ProgramFiles(x86)'], "qgis-ltr-bin.exe"),
                        osgeo_path(os.environ['OSGeo4W64'],"qgis-ltr-bin.exe"),
                        osgeo_path(os.environ['OSGeo4W'],"qgis-ltr-bin.exe"),
                        ]:

Let me know if is more complex than this if not I can submit a PR with these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant