[osgeo4w-dev] osgeo4w portability

Matt Wilkie maphew at gmail.com
Wed Feb 18 00:03:12 PST 2015


Andreas,

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).

I'm only able to spend a few stolen hours here and there on apt and related
packaging efforts, so progress from
me comes in fits and starts, but it is something I'll be continuing to move
forward. ;-)

cheers,

matt

On Mon, Feb 9, 2015 at 4:34 AM, Müller, Andreas, Dr. phil. <
muellea at uni-trier.de> wrote:

> Hi Matt and Alex and all readers,
> First: I hope this post fits in the right place, because i had no mail to
> respond to...
>
> I asked Matt at github,
> https://github.com/maphew/apt/issues/10#issuecomment-73048724, because i
> wanted his apt.py to work on a portable install for OSGeo4W packages. So he
> opened this thread. Thank you for that!
>
> 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.
>
> There are attempts to build a portable gqis, osgeo4w Version, but, like
> the one mentioned by Alex,
> http://www.archaeogeek.com/blog/2014/01/20/portable-gis-v4/, 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 "
> creatensis.pl" by jef-n on github)
>
> 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%.
>
> For example apache:
> in etc/postinstall we find apache.bat and inside
> textreplace -sf apache/conf/httpd.conf -df apache/conf/httpd.conf -map
> @osgeo4w@ %OSGEO4W_ROOT%
> which changes the pattern in http.conf.
> A portable version would be
> textreplace -sf apache/conf/httpd.conf -df apache/conf/httpd.conf -map
> @osgeo4w@ ${OSGEO4W_ROOT}
> now it's up to apache to find the path through the environment variable.
>
> 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.
>
> 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.
>
> One solution would be to delegate that through the Packaking-instructions (
> https://trac.osgeo.org/osgeo4w/wiki/PackagingInstructions). But is this
> realistic?
>
>
> if someone interested or willing to help, i can show the cases i found,
> during my version of a "portable installer".
>
> Best Regards,
> Andreas
>
> Dr. Andreas Müller -_- Universität Trier - FB VI - Kartographie,
> muellea at uni-trier.de
> 54286 Trier, Behringstr. 29, F 191, ++496512014576
> _______________________________________________
> osgeo4w-dev mailing list
> osgeo4w-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20150218/f580c5d9/attachment.html>


More information about the osgeo4w-dev mailing list