<div dir="ltr"><div><div><div>Andreas, <br><br></div>Thanks for the specific examples. That's exactly what I thought of collecting in this thread. Even if there's no immediate solution or response forthcoming I encourage more of them (from anyone). <br><br>I'm only able to spend a few stolen hours here and there on apt and related packaging efforts, so progress from <br>me comes in fits and starts, but it is something I'll be continuing to move forward. ;-)<br><br></div>cheers,<br><br></div>matt<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 4:34 AM, Müller, Andreas, Dr. phil. <span dir="ltr"><<a href="mailto:muellea@uni-trier.de" target="_blank">muellea@uni-trier.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Matt and Alex and all readers,<br>
First: I hope this post fits in the right place, because i had no mail to respond to...<br>
<br>
I asked Matt at github, <a href="https://github.com/maphew/apt/issues/10#issuecomment-73048724" target="_blank">https://github.com/maphew/apt/issues/10#issuecomment-73048724</a>, because i wanted his apt.py to work on a portable install for OSGeo4W packages. So he opened this thread. Thank you for that!<br>
<br>
To have a portable OSGeo4W, you could easily copy from an installed version. Much works, but it is not really portable. For eg. you should start QGIS with option configpath, like --configpath "%HOME%\.qgis". That prevents QGIS to write to the Windows-Registry.<br>
<br>
There are attempts to build a portable gqis, osgeo4w Version, but, like the one mentioned by Alex, <a href="http://www.archaeogeek.com/blog/2014/01/20/portable-gis-v4/" target="_blank">http://www.archaeogeek.com/blog/2014/01/20/portable-gis-v4/</a>, it lacks, as far as i know, a possibility to choose and update packages. That's the point, where apt.py, as a package manager, joins the game! (because i'm more comfortable with python than with perl, thanks for the code of "<a href="http://creatensis.pl" target="_blank">creatensis.pl</a>" by jef-n on github)<br>
<br>
Unfortunately nearly all packages go through the postinstall stage of installation. Here, bat files in etc/postinstall are called, mainly to replace patterns like @osgeo4w@ to hard codes paths, which we don't want in a portable install. One tool to do that is textreplace, which turns @osgeo4w@ into the string stored in the environment variable %OSGEO4W_ROOT%.<br>
<br>
For example apache:<br>
in etc/postinstall we find apache.bat and inside<br>
textreplace -sf apache/conf/httpd.conf -df apache/conf/httpd.conf -map @osgeo4w@ %OSGEO4W_ROOT%<br>
which changes the pattern in http.conf.<br>
A portable version would be<br>
textreplace -sf apache/conf/httpd.conf -df apache/conf/httpd.conf -map @osgeo4w@ ${OSGEO4W_ROOT}<br>
now it's up to apache to find the path through the environment variable.<br>
<br>
A lot of packages make use of textreplace, i didn't check them all. And there are cases, where something different is wanted to happen, where software must be installed to the System, like Visual-C Re-distributables.<br>
<br>
What i'm asking for, is there a way to deal with postinstall-issues, even if i can't predict which package is to be installed.<br>
<br>
One solution would be to delegate that through the Packaking-instructions (<a href="https://trac.osgeo.org/osgeo4w/wiki/PackagingInstructions" target="_blank">https://trac.osgeo.org/osgeo4w/wiki/PackagingInstructions</a>). But is this realistic?<br>
<br>
<br>
if someone interested or willing to help, i can show the cases i found, during my version of a "portable installer".<br>
<br>
Best Regards,<br>
Andreas<br>
<br>
Dr. Andreas Müller -_- Universität Trier - FB VI - Kartographie, <a href="mailto:muellea@uni-trier.de">muellea@uni-trier.de</a><br>
54286 Trier, Behringstr. 29, F 191, <a href="tel:%2B%2B496512014576" value="+496512014576">++496512014576</a><br>
_______________________________________________<br>
osgeo4w-dev mailing list<br>
<a href="mailto:osgeo4w-dev@lists.osgeo.org">osgeo4w-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev</a><br>
</blockquote></div><br></div>