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

More path functionality #192

Merged
merged 4 commits into from Dec 20, 2023
Merged

More path functionality #192

merged 4 commits into from Dec 20, 2023

Conversation

florisvdh
Copy link
Member

  • Export a general wrapper qgis_detect_paths() specifically for Windows and macOS, used as a helper in the next addition. See also Detect paths #152 (comment).
  • qgis_configure(): optionally detect and propose newer QGIS (win/mac)

The second addition only has effect (and happens while loading the package) if the following conditions are all true:

  • an option qgisprocess.detect_newer_qgis or env var R_QGISPROCESS_DETECT_NEWER_QGIS is set as TRUE
  • system is Windows or macOS
  • two or more QGIS installations are present in their own default path and these paths contain the QGIS version number (typical for the standalone installs)
  • the {qgisprocess} cache does not point at the newest version of those QGIS paths

If so, the user will be offered the possibility to switch to the newer QGIS version. Still to be tested in a real system.

This is a further addition wrt #187.

This iterates an idea that @JanCaha already proposed, but was not merged at the time
(#152 (comment)).

Specifically, the function is now explicitly limited to Windows and macOS.
This only has effect (and happens while loading the package) if the following conditions are all true:

- an option qgisprocess.detect_newer_qgis or env var R_QGISPROCESS_DETECT_NEWER_QGIS is set as TRUE
- system is Windows or macOS
- two or more QGIS installations are present in their own default path _and_ these paths contain the QGIS version number (typical for the standalone installs)
- the qgisprocess cache does not point at the newest version of those QGIS paths

If so, the user will be offered the possibility to switch to the newer QGIS version.

This is a further addition wrt #187.
@florisvdh florisvdh merged commit 27be51f into main Dec 20, 2023
16 checks passed
@florisvdh florisvdh deleted the paths branch December 20, 2023 16:35
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

Successfully merging this pull request may close these issues.

None yet

1 participant