Version 3 (modified by 14 years ago) ( diff ) | ,
---|
Building MapGuide trunk with Visual C++ Express Edition
Environment Setup
- Microsoft Visual C++ 2008 Express Edition
- Windows SDK for Windows Server 2008 and .NET Framework 3.5
The Windows SDK provides us with the x64 native/cross compilers if you want to build MapGuide in 64-bit. This is not required if you are only building in 32-bit.
Setting up x64 compilers
If you don't intend to build 64-bit MapGuide you can skip this section.
Build Oem
Manual
Open Oem.sln in Visual C++ Express and build the solution using your configuration of choice. You will get an error about a particular project not loading (SQLiteGUI). This is because VS express doesn't support solutions with mixed project types. Fortunately, this project is not required and the error can be safely ignored.
Then open the CS-Map OpenSource.sln and build that solution using the same configuration.
Automated
From the Visual Studio 2008 command prompt type the following from the Oem folder:
msbuild.exe /p:Configuration=Release Oem.sln
Then go into the CS-Map folder and type the following:
msbuild.exe /p:Configuration=Release OpenSource.sln
A note about building CS-Map in 64-bit
When building the OpenSource.sln in a 32-bit system using the 64-bit cross compiler, you will get a post-build error. This is because the Compiler.vcproj project has a post-build step that runs the compiled executable to compile the Coordinate System dictionaries. The compiled executable being a 64-bit binary, will not run on a 32-bit system. The current CS-Map trunk has been patched to not run the post-build event for x64 if being cross-compiled on a 32-bit machine.
Nevertheless, the Coordinate System Dictionaries will still have to be compiled at least once. To resolve this, build the OpenSource.sln (Compiler and Library) in 32-bit first, this will trigger the post-build event and compile your CS dictionaries. Then only build the Library.vcproj project in 64-bit. For subsequent builds, you only need to build the Library.vcproj project
Build Server
Manual
Open Server.sln in Visual C++ Express and build the solution using the same configuration used to build your Oem components.
Automated
From the Visual Studio 2008 command prompt type the following from the MgDev\Server folder:
msbuild.exe /p:Configuration=Release Server.sln
Build WebTier
Manual
Open WebTier.sln in Visual C++ Express and build the solution using the same configuration used to build the Server solution.
Automated
From the Visual Studio 2008 command prompt type the following from the MgDev\Web\src folder:
msbuild.exe /p:Configuration=Release WebTier.sln
Doing it all automatically
A build.bat
file has been provided in the MgDev directory that does all of the above.
Typing the following from the command line:
build.bat
Will build the full Oem, Server and WebTier solutions
Typing the following afterwards:
build.bat -a=install
will copy all the compiled binaries and required files into a pre-defined output directory (default is MgDev\Release
. You can specify a custom output directory by using the -o
switch)