Hello,

I am trying to distribute JOSM with the HDM Presets and Paint Styles for
offline survey.  That means I can't rely on JOSM to be able to pull the
presets down, and links should be relative so that they work no matter
where a user places the JOSM directory.

I really want to make a folder situation like this:

josm-latest.jar
-appdata
--HDM
---HDM-JOSM-style.zip
---HDM.xml (HDM Presets)

I am looking at the preferences.xml file and I cannot figure out how to put
in a relative link.
I see only absolute links like "C:Users/blahblah/Desktop/josm/etc/HDM.xml"

I see another kind of relative link that appears to point inside the
jar, resource://data/defaultpresets.xml

I am aware that this is not the ideal situation, as presets might be
updated and need to be downloaded again, but, it would be nice to have your
help.  Right now my distribution looks like this:

  <maps key='mappaint.style.entries'>
    <map>
      <tag key='title' value='JOSM Internal Style'/>
      <tag key='active' value='false'/>
      <tag key='ptoken' value='standard'/>
      <tag key='url' value='resource://styles/standard/elemstyles.xml'/>
    </map>
    <map>
      <tag key='title' value='Potlatch 2'/>
      <tag key='active' value='false'/>
      <tag key='ptoken' value='standard'/>
      <tag key='url' value='resource://styles/standard/potlatch2.mapcss'/>
    </map>
    <map>
      <tag key='title' value='HDM'/>
      <tag key='active' value='true'/>
      <tag key='url' value='C:\Users\me\Desktop\JOSM\HDM-JOSM-style.zip'/>
    </map>
  </maps>

I'd like it if my users don't have to navigate a bunch of restarts out of
the gate, so I am trying to find a way to make that       <tag key='url'
value='C:\Users\me\Desktop\JOSM\HDM-JOSM-style.zip'/> relative to
josm-latest.jar if possible.

like: "\\appdata\HDM\HDM-JOSM-style.zip"
_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to