- Release plans recap for the road to QGIS 1.0
- New version of eVis
- Contour Lines in Qgis
- QGIS and Google Summer of Code
- Quantum GIS Graduates OSGeo Incubation
- Paolo Cavallini Named to QGIS Project Steering Committee
- Nominations for QGIS PSC Open
- Capturing map coordinates in a stand alone app...
- Tutorial 7 - Creating spatial datasets with the QGIS API
- Html Image Plugin 0.2
Creating a clean room development environment
While most of us QGIS developers are GNU/Linux converts or Mac users, none of us really work on windows. Our userbase however is very much a different affair. Download statistics reveal that a great many of our users are (stuck?) on Windows. Offlist we have been discussing this situation and have decided to put more effort into quality control of the Windows version of QGIS.
We already have the chroot environment that allows the Windows version to be cross compiled under Linux. However it doesn't provide many options for debugging and testing under Windows. To address this we have decided to build a native windows build environment using Qt4/Windows and mingw. The idea is that we will a) document the whole process and b) make a ready to use c:\mingw archive with all the dependencies compiled in it so that potential developers can simply download QGIS sources and build under windows using our preconfigured mingw. Well this is the idea we have anyway....
Yesterday I reformatted my desktop pc and performed fresh installs of Windows XP and Ubuntu Dapper on it. I performed a basic setup of windows - adding all latest security patches and getting rid of as much junk as possible. Now I am ready to start creating my mingw environment and so on. I think its good to have a clean machine available for testing, and since I cant afford to buy VMWare Workstation, I came up with a cunning plan :-) Before doing anything further on the Windows installation I have created a partition image in Linux using the 'dd' command line tool:
sudo dd if=/dev/hda1 of=windows.base.install.backup.dd
My idea is that for testing I can just revert the whole partition back to its just installed state, and then test QGIS Windows installers and the QGIS Windows build environmnet / procedure on an unadulterated copy of Windows. So when I want to roll it back I'll just do this:
sudo dd if=windows.base.install.backup.dd of=/dev/hda1
I'm going to give it a dry run test a little later today..hopefully it will work well and I will easily be able to get back to a clean room development environment....
Update on dd
Ok so the procedure I tested above works very well - I've successfully created two images - one with an clean base OS install and one with qt4 + mingw etc dev tools installed. And I can swap between them by booting into linux and issuing the dd command as described above. There are a few disadvantages:
* Each image takes 11GB of space on my linux partition - I can bzip2 them but it will result in a long delay to extract the dd image when I want to re-image my windows partition.
* Swapping images takes a bit of time and rebooting
The advantage is that I get to run windows at native speed and with real (as opposed to virtual) hardware devices which probably presents a better test environment.
Update on VMWare
As a few people have mentioned, there is in fact a free VMWare server edition. Before I started writing the above blog post I did in fact look into VMWare but I really struggled to make head or tail of the product details on their site and it left me with with the impression that I needed to have the Payware Workstation edition to create my own os images.
I found some nice clear instructions for getting it set up here which I followed and I am now creating my first VMWare XP image as I write this.
There are two downsides to VMWare I can see:
* Its gonna be a bit slow on my machine
* It needed to compile its own kernel module so every time adept updates my kernel it will require tinkering to get vmware running again.
The big advantage is I get to live in linux all the time :-) I'll play around a bit with both approaches and see which ends up being more workable....
- Tim Sutton's blog
- Add new comment
- 3951 reads

Dis nou toevallig
Vir die eerste keer tik ek 'n "comment" op die internet in Afrikaans!!! :-))
Baie dankie vir die vinnige "reply"!!!
Dis 'n klein wereld. Lyk my Suid-Afrikaners is besig om die wereld oor te neem! :-))
Anyway!
Over to business! I'd like to make your maptools with the QGIS canvas API work on windows?? Will that be possible or probably too technical for a newbie like me? Do I have to install GDAL, GEOS etc. or can I just install the QGIS 0.8 preview for windows. Is the necessary include and lib files included with the install?? Anything else to configure??
Once again thanks a lot!
Groete
Thinus p.s. Wanneer maak jy die tutoriale Afrikaans??? ;-))
GEOS is the 'Hakplek'
Theoretically you should be able to just do the following:
- download the QGIS binary zip for windows and put it somewhere on your HD
- download the QGIS sources from svn (preferably using the version tag that the binaries were built against)
- add INCLUDEPATH += to your project file pointing into /src/foo
- add LIBS += to your project file pointing to the /libs
- build you mapcanvas based project as described in my previous tutorial
However the problem that I need to resolve is that QgsVectorLayer has various method signatures that take GEOS::foo geometries as parameters. This means that the headers for GEOS are required. I tried building GEOS under mingw but ran into some issues. It may be possible to use forward declarations in QgsVectorLayer for teh GEOS types, though that probably simply pushes the problem down to the client of QGISlibs (i.e. your app).
I havent had time to finish trying to resolve this issue, but I believe its the only thing standing in the way of getting an app using QgsCanvas working under win.
I will post a note to this blog once I get it working...
Regards
Tim
Necessities??
Hi there!
First of all thanks for a great website.
I am a newbie to qgis and qt. I want to integrate qgis with GUI of mine. I am struggling to find out excactly what is necessary to compile qgis and these examples of yours under Windows XP. I am suspecting that I need GDAL and some other "maptools" in addition to qgis 0.8 source and qt4. I however don't know where to find precompiled binaries for these maptools applications. Do I really need them???
I basicaly just want to load a streetmap and display longitude lattitude coordinates with dots on it. The user must however be able to interact with the map.
Preconfigured mingw will be EXCELLENT!!! By approximately when should it be available??
Any help whatsoever will be truly appreciated.
Thanks a lot!
Thinus
MapCanvas under windows
As you will see from my previous blog posts, I'm busy integrating QGIS mapcanvas into openModeller. It works nicely under linux and now I need to get it working under windows....so I will no doubt post a how to once I resolve the issues I am having (which relate to geos headers).
I'd love to give a fixed time when the preconfigured mingw will be ready...but I'd rather not commit myself since I dont know what problems I am going to encounter along the way. And Norman Vine who was planning to help with this is currently off at sea so I am just getting my clean room environment set up and was planning to work on this proper when he returns.
PS. Groete van 'n Suid Afrikaner woonagtig in Brazil!
VMWare now free as in beer
VMWare now offers 2 new products VMWare Player and VMWare Server for no cost.
VMWare Player is a client that runs pre-built OS images, it is unable to create the initial image but is fully functional otherwise. You can download pre-built Linux distro images from their web-site and other places.
VMWare Server, despite its name, is the full server and client package which can be installed and run on the same machine, and can create the initial OS image files.
So save yourself the reboots, there's plenty of install walkthroughs for Ubuntu on the net. The ability to Roll-Back or even run in no-commit mode are great.
A Free option is QEmu, but it is slower than VMWare and without all the features, and I'd rather you had 0.8 out sooner :-)
Cheers!
John.
Ill give VMWare a try
Thanks for the mention of VMWare - someone on IRC also mentioned that you can in fact create OS images with the free version so based on your tips I went back to give it another go (see updated blog post above).
Tim
Sounds good
That's a good idea to prepare such clean environment for testing. Getting Windows compilation environment to work is a big job, mainly because one needs to compile a bunch of dependencies and building them is not always straightforward.
Recently when I was working on CMake support for the refactoring branch I've compiled all the libraries that full installation of QGIS needs using MSYS+MinGW. Later I've managed to compile the dependencies also with MSVC8 (excluding postgresql and grass). I have some brief notes (although very similar to Radim's HOWTO on wiki) and compiled binaries, I've planned to publish my environment, but so far I didn't have time to make it publishable and test it.