How can I setup a portable QGIS to run from a flash drive / USB-Stick? In the userguide for QGIS 1.7 Wroclaw there is only mentioned the option of "--configpath". But to me it is not clear how to deal with this information.
Can someone post a step-by-step explanation!
Answer
Here's one method, install Osgeo4W from scratch using the command line; open a command shell and:
# navigate to the USB device:
pushd U:\
# download command line installer
wget http://download.osgeo.org/osgeo4w/release/apt/apt-r1193M.exe -O apt.exe
# set install root to USB drive
set osgeo4w_root=%cd%\o4w_mobile
apt setup
# install quantum gis and dependencies
apt install qgis
Edit U:\o4w_mobile\bin\qgis.bat
and change SET OSGEO4W_ROOT=U:\o4w_mobile
to:
SET OSGEO4W_ROOT=%~dp0\..\
Take the usb drive to a new computer, plug it in, run X:\o4w_mobile\Osgeo4w.bat
, and from that shell run qgis
, et voila!
Notes
At time of writing, this will download some 85mb of package archives, so allocate time and bandwidth accordingly.
On a slow USB device some steps will appear to hang, e.g while installing the python-core package. Just let it ride, it will eventually finish or least at give an error message.
While the results are portable, the installation is not. The install process creates shortcuts on the host computer's desktop and start menu, some registry entries, and updates some system dll's (if needed, which leads to important note: the new host system may or not have the right dll's for some packages, particularly openssl).
You probably don't want to leave your broken shortcuts etc. on the host machine, so either delete the shortcuts or run the install again from a local fixed drive.
The command line installer is not necessary, the same method can be used using the standard OSGeo4W installer. The important part is editing the startup qgis batch file. The rest is just candy.
No comments:
Post a Comment