Getting the source codeIt is best to create a dev folder on C:\ because several paths are hardcoded in the Visual Studio project file of MapWinGIS.
Using TortoiseSVN you can download the needed files from our code repositories.
You need to download the source code from
To compile the project you also need a lib, bin and header folder for the supporting libraries (GDAL, Proj4, GEOS, etc.)
You also need the files for the Spatial Index Library.
Download the source code from
I normally start every morning updating all source code (including MapWinGIS), then I know for sure my changes don't conflict with other modifications.
The trunk folder (
https://mapwingis.svn.codeplex.com/svn/MapWinGIS/trunk/) has version 4.8 of MapWinGIS.
https://mapwingis.svn.codeplex.com/svn/MapWinGIS/branches/4.9/holds the new version of MapWinGIS.
PatchesIt should be possible to use the Express edition (Free) of Visual Studio 2008 (download) to compile the source code of MapWinGIS. You might need some MFC libraries. We have them here:
You can also download the trail version of Visual Studio 2008 Professional, it is valid for 90 days.
You have access to the repository to download the source code, you cannot commit your changes because we will not give you commit rights straight away.
Due to bad experience in the past we are very strict about giving those rights.
You can send us a patch file with your modifications and we will review it and if it passes we will apply the patch. When you've submitted several good patches we will give you direct access.
TestingTo be able to test your changes you (of course) need to compile the MapWinGIS solution first. To compile quickly you can use the
This will produce
Next you'll need to register the ocx. On Vista\Win7 this is more complicated than on WinXP, because of security issues. If you right-click on
C:\dev\MapWindow4Dev\Bin\regMapWinGIS.cmdand select 'Run as Admin' you'll still get a security warning but the commands will be executed.
You should get a message box saying the ocx was successfully registered.
To make life easier I've created a shortcut of regMapWinGIS.cmd and checked 'Run as Admin'. Now you can just run the shortcut instead of doing the right-click.
After you've registered the ocx you need to create the interop dlls (
AxInterop.MapWinGIS.dll, Interop.MapWinGIS.dll) You can create these dlls using the small C# application:
http://svn.mapwindow.org/svnroot/MapWindow4Dev/interopCreator/. When compiling, this solution will register the ocx (if you have created a shortcut named regMapWinGIS-as-Admin), delete the current interop dlls, recreated the new interop dlls and copies them to
So all you need to recompile MapWinGIS and recompile interopCreator and you can test your changes in MapWindow.
Creating a test script will be the easiest. Just copy
http://svn.mapwindow.org/svnroot/TestingScripts/_TestingScriptTemplate.csand add your new method(s).