Getting started
Getting the source code
It 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
https://mapwingis.svn.codeplex.com/svn/MapWinGIS/ to C:\dev\MapWinGIS4Dev\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
http://svn.mapwindow.org/svnroot/SupportLibraries/lib/toC:\dev\SupportLibraries\lib\http://svn.mapwindow.org/svnroot/SupportLibraries/bin/toC:\dev\SupportLibraries\bin\http://svn.mapwindow.org/svnroot/SupportLibraries/include/toC:\dev\SupportLibraries\include\http://svn.mapwindow.org/svnroot/SupportLibraries/SpatialIndex/toC:\dev\SupportLibraries\SpatialIndex\
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.
Patches
It 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:http://svn.mapwindow.org/svnroot/SupportLibraries/MFC/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.
Testing
To be able to test your changes you (of course) need to compile the MapWinGIS solution first. To compile quickly you can use the'Release Fast|Win32' configuration.This will produce
mapwingis.ocx in C:\dev\MapWindow4Dev\Bin\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.cmd and 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 C:\dev\MapWindow4Dev\Bin\.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.cs and add your new method(s).
