Hi Jürgen -

On 19-07-2015 15:07, Jürgen E. Fischer wrote:
Hi Bo,

On Sun, 19. Jul 2015 at 11:42:36 +0200, Bo Victor Thomsen wrote:
This would be a _vast_ improvement for a lot of QGIS users.
And probably a big regression for a lot of others.
I don't understand the risque of regression - It would be an addition to the method that reads the option values from either the registry or the ini file. The addition would scan the input before returning it to the caller and substitute any value between "%"'s or "@"'s with the corresponding environment values or internal values like version number or absolute location of the qgis binary. If you don't use it, it won't be activated. And you could introduce a new option like "Use_character_substitution" = on/off (or whatever) to enable/disable the function.

If you thinking about the risque that some option values already use the special characters, then it would be possible to use other special characters (or combinations of characters) that's improbable to have been used before, like "*&!" or "*@!"
Introducing the posibility of using environment variables
(%USERPROFILE%) and tokens (@version@)
The "tokens" are already currently used at packaging time.
But not at run time

Instead of have lines  like this in in the QGIS2.ini file:
*Configuration\SAGA_FOLDER=E:/OSGeo4W/apps\\saga*
The keypoint is to identify what tools refer to paths from the settings - and
change those to save and retrieve paths relative to
QgsApplication::prefixPath() (similar to QgsProject::readPath/writePath for
project relative paths) and "c:/osgeo4w/apps/saga/saga_cmd" used at runtime
would be turned into "../saga/saga_cmd" in the settings.
I see your point - that could replace my "@qgis_bin_path@" "token", but not references to environment variables like "%QGIS_OPTION_DIR%" (or whatever), because there would not be a guaranteed method to express a relative path between the the location of the qgis executable and the options directory (.qgis2) for QGIS. They could for example be located on completely different (windows) drives.


Jürgen



_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Regards Bo Victor
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to