Feature request #11430

qgis osgeo4w portable install

Added by Andreas Mueller over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Pull Request or Patch supplied:No Resolution:invalid
Easy fix?:No Copied to github as #:19706

Description

Hello,
teaching GIS and Python at my local university, i wanted a software installation off osgeo4w (and other) on a usb storage.
I tried to change the postinstall procedure to a get a portable version (see below). At least i ended up with a python error when opening the python command line in QGIS. Those files caused the error because of hardcoded pathes:
osgeo4w\\apps\\Python27\\Lib\\site-packages\\PyQt4\\pyqtconfig.py.tmpl
osgeo4w\\apps\\Python27\\Lib\\site-packages\\sipconfig.py.tmpl

I found a solution at http://www.mantidproject.org/Building_Windows_Dependencies, applied it and it works.
To have no trouble with future releases i want to suggest postinstall template- and batch files, that allow an almost portable Installation.

Here is, what i did basicly, to automate the procedure:
First i download apt. whith apt i downloaded all the packages i need. Extract was done with gnu tar. Writing batch files for this i got an install-routine but no postinstall. I figured out that /etc/postinstall is the central place for it.
Keeping textreplace i changed mapping from osgeo4w_root to %osgeo4w_root% for batch files, to take advantage from the windows environment. Also for many conf-Files it is possible to use a environment variable ${OSGEO4W_ROOT} (Apache, PHP), so i change those either. I didn't want apache to start as a service, so i used the windows-apache-mysql-php start script as a basis.

Because i was looking for a portable python for gis programming i created batch files for idle. Adding Postgresql, Postgis and pgrouting was no problem. I din't care about mapserver map- und html files, they don't work by now, may be pathes whithout drive letters work?

regards,
Andreas Mueller

History

#1 Updated by Giovanni Manghi over 9 years ago

  • Resolution deleted (worksforme)
  • Status changed from Open to Feedback

#2 Updated by Paolo Cavallini over 9 years ago

  • Subject changed from qgis osgeo4w potable install to qgis osgeo4w portable install

#3 Updated by Andreas Mueller over 9 years ago

@Paolo Cavallini: ups, typo, thanx
@Giovanni Manghi: Yes, i know it. But they have a lot off double installs, because they put Software Packages in parallel (side by side) and not integrated like it is done in osgeo4w. Python comes as Portable and with qgis, apache comes separately with ms4w - and they use PyQt4 with the same problem than me: Whenever there is a path in the configuration (pyqtconfig.py), they point to an absolute Path, like 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4'. I don't know why this works at last?

As I'am thinking ahead, i would like to build an integrated solution, even with postgresql/postgis, using the same libs, as it would do under unix.
But first I'am trying to understand windows-portable specific problems, like avoiding registry entries, flexible path handling and so on.

PyQt4 coming with PotablePython, is looking very different to the osgeo4w package though.

Anyone with errors, experiences?
Andreas

#4 Updated by Giovanni Manghi over 9 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

better open a discussion in the developers mailing lists, where you will certainly find more support/ideas.

Also available in: Atom PDF