-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add VS Code development environment #432
Conversation
I have a general remark on embedding visual code windows path to the environment, is that not a burden for linux devs @domi4484 ? |
.vscode/settings.json
Outdated
@@ -0,0 +1,4 @@ | |||
{ | |||
"qgis.installationRoot": "C:\\Program Files\\QGIS 3.34.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using OSGEO4W installer which is recommended by TEKSI, the path will be different.
eg : C:\OSGeo4W\bin\qgis-ltr-bin.exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Should this recommendation be placed within the README.md as well?
The settings.json was intended as a template. User can overwrite the settings in vscode. See also comment in README.md:
- Install QGIS in Version 3.34.10 or adapt
qgis.installationRoot
in '.vscode/settings.json'.
If QGIS & Shell would be found on PATH on all Plattform, the configuration would be much simpler. Alternatively, if the required version / distribution of QGIS could be specified we would have the option to write a platform aware launch.json without using the "hacky" settings.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we adapt .vscode/settings.json will it not always show as modified in git status?
If QGIS & Shell would be found on PATH on all Plattform, the configuration would be much simpler.
Maybe the needed path could be defined in system variables. If not set, just use the most common variant (porbably windows/OSGeo4w ?).
Or providing the file as a settings.json.default
to be renamed?
But I am not used to this kind of vscode configuration I don't now what's the best way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to use OSGeo4w as default in settings.json and adapting it to qgis.installationRoot.windows
. If we run int in vscode the value either is correct, or the developer will get a message like "C:\OSGeo4w\qgis.bar was not found." I assume every developer will get a hint of what to do. OSGeo4w, in the optimal case, defines a link for the lates installed QGIS version to use. Corresponding linux variant can then be added as well.
The approuch should not depend on any environment variables defined from outside of VSCode as this break the whole concept of "no setup needed launch configuration".
Co-authored-by: Arnaud Poncet-Montanges <ponceta@users.noreply.github.com>
for more information, see https://pre-commit.ci
Co-authored-by: Damiano Lombardi <lombardi.damiano@gmail.com>
Closes: wapaAdmin#81