<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Jürgen -<br>
    <br>
    On 19-07-2015 15:07, Jürgen E. Fischer wrote:<br>
    <blockquote cite="mid:20150719130751.GA10661@norbit.de" type="cite">
      <pre wrap="">Hi Bo,

On Sun, 19. Jul 2015 at 11:42:36 +0200, Bo Victor Thomsen wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">This would be a _vast_ improvement for a lot of QGIS users.
</pre>
      </blockquote>
      <pre wrap="">
And probably a big regression for a lot of others.
</pre>
    </blockquote>
    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.<br>
    <br>
    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 "*@!"  <br>
    <blockquote cite="mid:20150719130751.GA10661@norbit.de" type="cite">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">Introducing the posibility of using environment variables
(%USERPROFILE%) and tokens (@version@)
</pre>
      </blockquote>
      <pre wrap="">
The "tokens" are already currently used at packaging time.</pre>
    </blockquote>
    But not at run time<br>
    <blockquote cite="mid:20150719130751.GA10661@norbit.de" type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">Instead of have lines  like this in in the QGIS2.ini file:
</pre>
      </blockquote>
      <pre wrap=""> 
</pre>
      <blockquote type="cite">
        <pre wrap="">*Configuration\SAGA_FOLDER=E:/OSGeo4W/apps\\saga*
</pre>
      </blockquote>
      <pre wrap="">
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.</pre>
    </blockquote>
    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. <br>
    <blockquote cite="mid:20150719130751.GA10661@norbit.de" type="cite">
      <pre wrap="">


Jürgen

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </blockquote>
    Regards Bo Victor<br>
  </body>
</html>