<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 19, 2016 at 1:51 AM, Pietro <span dir="ltr"><<a href="mailto:peter.zamb@gmail.com" target="_blank">peter.zamb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bo" class="a3s" style="overflow:hidden">I've recently implemented a function in r.green.install<br>
("add_rgreen_menu" [0]) that modify the main_menu.xml and<br>
toolboxes.xml files in the ~/.grass7/toolboxes directory adding a menu<br>
for the r.green modules.<br></div></blockquote><div><br></div><div>Nice. The whole r.green.install is a nice work (although it is a workaround I guess). Perhaps some things can go to grass.tools package. The whole toolbox things should move there anyway.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bo" class="a3s" style="overflow:hidden">
<br>
Just now, I've seen the flag "t" in g.extension but it is not clear to<br>
me how should I prepare the xml files, should I add the r.green<br>
toolboxes in:<br>
<a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/toolboxes.xml" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/toolboxes.xml</a> ?<br></div></blockquote><div><br></div><div>The important part is that addon toolboxes and GUI toolboxes are unrelated. The unification is a TODO (it might be on some list somewhere).<br><br></div><div>How toolboxes are used in addons is to install related modules together. This happens automatically for r.green.* since it is one directory (I like to call it module group).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bo" class="a3s" style="overflow:hidden">
<br>
If yes there is a way to test it locally without messing the official:<br>
grass-addons/grass7/toolboxes.xml?<br></div></blockquote><div><br></div><div>Generally, it is hard to test the addons things locally and Martin can probably comment more on what is currently possible and what is not. Having all local would definitively simplify development.<br><br></div><div>However, there is a test for g.extension using addons' toolboxes.xml which is local. Unfortunately, it seems that there is something wrong with g.extension as I was not able install toolbox last time I tried. I had no time to look to the code and fix it.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bo" class="a3s" style="overflow:hidden">
<br>
Why generate an unique xml file for all the addons?<br></div></blockquote><div><br></div><div>I'm not sure if I understand the question.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bo" class="a3s" style="overflow:hidden">
<br>
Perhaps g.extension could detect in the main root of the grass addon a<br>
toolboxes directory and if the flag "-t" is true proceed installing<br>
and merging the toolboxes in the GRASS GUI. For example for the<br>
r.green module I should only define a directory in<br>
grass-addons/grass7/raster/r.green/toolboxes that contains two xml<br>
files (main_menu.xml and toolboxes.xml).</div></blockquote></div><br></div><div class="gmail_extra">This is the addons and GUI toolboxes unification task. It makes sense to have files and flag to add toolboxes to a special position in menu (as opposed to on-the-fly auto-generated addon list (which is quite problematic)). For some modules in addons it makes sense to install them together, although they are not in the same directory (they have independent implementations). Some toolboxes might even mix modules from addons and from core.<br><br></div><div class="gmail_extra">Vaclav<br></div></div>