MapGuide Windows编译
1. 代码下载
1)MapGuide代码下载地址:https://svn.osgeo.org/mapguide/trunk
2)FDO代码下载地址:https://svn.osgeo.org/fdo/trunk
3)CSMap代码下载地址:https://svn.osgeo.org/metacrs/csmap/trunk
2. 环境配置
在Windows下编译MapGuide需要安装如下软件:
1)JDK 1.8.0_74(jdk-8u74-windows-i586.exe),主要用于编译JavaAPI;
2)Flex 和Bison(cywin),主要用于编译PHP;
3)安装Perl(Strawberry),主要用于编译FDO;
4)安装.Net FrameWork 3.5,主要用于编译CsMap和配置ASP.NET网站;
5)安装Visual Studio 2015 update3
添加如下用户环境变量:
1)JAVA_HOME= C:\Program Files (x86)\Java\jdk1.8.0_74
2)PATH=%PATH%;C:\Strawberry\perl\bin;C:\cygwin\bin
3. 编译第三方库
MapGuide需要的第三方库大部分都包含在oem.sln解决方案中,对于较为复杂的第三方库(FDO、PHP、httpd)需要单独进行编译,具体编译步骤如下。
3.1 编译FDO
编译FDO(Feature Data Object 地理空间数据访问)需要安装Perl和.Net Framework 3.5,并且需要将Perl的安装路径添加到Path环境变量中,配置完成后在MgDev\Oem\FDO目录下执行如下命令进行FDO的编译:
1) 编译32位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat
build_thirdparty.bat
build.bat
build.bat -a=install -o=../
2)编译32位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat
build_thirdparty.bat -c=debug
build.bat -c=debug
build.bat -c=debug -a=install -o=../
3)编译64位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment.bat x86_amd64
build_thirdparty.bat -p=x64
build.bat -p=x64
build.bat -p=x64 -a=install -o=../
4)编译64位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment.bat x86_amd64
build_thirdparty.bat -c=debug -p=x64
build.bat -c=debug -p=x64
build.bat -c=debug -p=x64 -a=install -o=../
3.2 编译PHP
编译PHP主要是用来编译生成MapGuide PHP API。编译PHP需要安装Bison,并将其添加在Path环境变量中。在编译PHP扩展时会依赖其他的开源库,依赖的这些库可以到https://windows.php.net/downloads/php-sdk/deps网站上下载,也可以下载相应的源代码进行编译,依赖的开源库主要有:freetype、curl、libexslt、libpng16、libxml、libxml2、libxslt、openssl等,在MgDev\Oem\目录创建phpdev\vc14\x86文件夹和phpdev\vc14\x64其中目录“phpdev\vc14\x86\deps\lib”和“phpdev\vc14\x64\deps\lib”用于放置依赖开源库的库文件,“phpdev\vc14\x86\deps\include”和“phpdev\vc14\x64\deps\include”用于放置依赖开源库的头文件。配置完成后在MgDev\Oem\php目录下执行如下命令进行PHP库及其扩展的编译,如:libcurl、libjpeg、libpng、libwebp、libxpm、libiconv、mcrypt、zlib、libxml2、libxslt、openssl、freetype
1) 编译32位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
buildconf.bat
cscript configure.js --with-extra-libs=..\phpdev\vc14\x86\deps\lib --with-extra-includes=..\phpdev\vc14\x86\deps\include --disable-all --enable-cli --enable-cgi --enable-bcmath --enable-calendar --enable-com-dotnet=shared --enable-ctype --with-dom --with-ereg --enable-filter --enable-ftp --enable-hash --with-iconv --enable-json --with-libxml --enable-mbstring=shared --with-mysqlnd --enable-odbc --enable-opcache --with-openssl=shared --enable-phar --enable-session --with-simplexml --enable-tokenizer --with-xsl=shared --without-t1lib --with-curl --enable-session --with-gd=shared --with-wddx --with-xml --enable-xmlreader --enable-xmlwriter --enable-zip --enable-zlib --with-mcrypt=static --without-analyzer
nmake
编译完成后生成的库在Release_TS目录下。
2)编译32位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
buildconf.bat
cscript configure.js --with-extra-libs=..\phpdev\vc14\x86\deps\lib --with-extra-includes=..\phpdev\vc14\x86\deps\include --enable-debug --disable-all --enable-cli --enable-cgi --enable-bcmath --enable-calendar --enable-com-dotnet=shared --enable-ctype --with-dom --with-ereg --enable-filter --enable-ftp --enable-hash --with-iconv --enable-json --with-libxml --enable-mbstring=shared --with-mysqlnd --enable-odbc --enable-opcache --with-openssl=shared --enable-phar --enable-session --with-simplexml --enable-tokenizer --with-xsl=shared --without-t1lib --with-curl --enable-session --with-gd=shared --with-wddx --with-xml --enable-xmlreader --enable-xmlwriter --enable-zip --enable-zlib --with-mcrypt=static --without-analyzer
nmake
编译完成后生成的库在Debug_TS目录下。
3)编译64位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
buildconf.bat
cscript configure.js --with-extra-libs=..\phpdev\vc14\x64\deps\lib --with-extra-includes=..\phpdev\vc14\x64\deps\include --disable-all --enable-cli --enable-cgi --enable-bcmath --enable-calendar --enable-com-dotnet=shared --enable-ctype --with-dom --with-ereg --enable-filter --enable-ftp --enable-hash --with-iconv --enable-json --with-libxml --enable-mbstring=shared --with-mysqlnd --enable-odbc --enable-opcache --with-openssl=shared --enable-phar --enable-session --with-simplexml --enable-tokenizer --with-xsl=shared --without-t1lib --with-curl --enable-session --with-gd=shared --with-wddx --with-xml --enable-xmlreader --enable-xmlwriter --enable-zip --enable-zlib --with-mcrypt=static --without-analyzer
nmake
编译完成后生成的库在x64\Release_TS目录下。
4)编译64位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
buildconf.bat
cscript configure.js --with-extra-libs=..\phpdev\vc14\x64\deps\lib --with-extra-includes=..\phpdev\vc14\x64\deps\include --enable-debug --disable-all --enable-cli --enable-cgi --enable-bcmath --enable-calendar --enable-com-dotnet=shared --enable-ctype --with-dom --with-ereg --enable-filter --enable-ftp --enable-hash --with-iconv --enable-json --with-libxml --enable-mbstring=shared --with-mysqlnd --enable-odbc --enable-opcache --with-openssl=shared --enable-phar --enable-session --with-simplexml --enable-tokenizer --with-xsl=shared --without-t1lib --with-curl --enable-session --with-gd=shared --with-wddx --with-xml --enable-xmlreader --enable-xmlwriter --enable-zip --enable-zlib --with-mcrypt=static --without-analyzer
nmake
编译完成后生成的库在x64\Debug_TS目录下。
3.3 编译OEM
MapGuide需要的第三方库大部分都包含在oem.sln解决方案中,编译此类第三方库仅需使用Visual Studio 2015打开解决方案进行编译即可,也可以通过执行MgDev目录下的批处理进行编译,如下所示:
1)编译32位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat
build.bat –w=oem
2)编译32位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat debug
build.bat –w=oem
3)编译64位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment.bat
build.bat –w=oem
4)编译64位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment.bat debug
build.bat –w=oem
4. 编译Mapguide
第三方库编译完成后在MgDev目录下执行如下命令进行MapGuide的编译:
1)编译32位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat
build.bat
build_desktop.bat
2)编译32位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
setenvironment.bat debug
build.bat
build_desktop.bat
3)编译64位Release版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment64.bat
build.bat
build_desktop.bat
4)编译64位Debug版本:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
setenvironment64.bat debug
build.bat
build_desktop.bat
5. 启动Mapguide服务
编译完成后可以启动MapGuide服务以检查MapGuide编译的正确性和完整性。编译完成后会在MgDev\Server\Bin\Debug和MgDev\Server\Bin\Release目录下生成“mgserver.exe”服务可执行文件,在启动MapGuide服务之前可以对服务的配置文件“serverconfig.ini”进行修改,可以在配置文件中修改服务的IP地址、端口号、各类服务的状态、各类服务的属性、日志配置等,配置完成后可以在MgDev\Server\Bin\Debug或MgDev\Server\Bin\Release目录下执行如下命令启动MapGuide服务:
mgserver.exe run
启动MapGuide服务过程中可能遇到的错误及解决方法如下所示:
1)FDO加载失败,导致此问题的原因可能是服务配置中“FdoPath”参数配置不正确,或者是缺少FDO动态库的相关依赖。
MapGuide Windows编译相关推荐
- OGRE 2.1 Windows 编译
版权所有,转载请注明链接 OGRE 2.1 Windows 编译 环境: Windows 7 64Bit Visual Studio 2012 OGRE 2.1 CMake 2.8.12.1 OGRE ...
- DCNv2 windows编译2021
2019年曾经写过一篇DCNv2 windows编译的博客 https://blog.csdn.net/jacke121/article/details/91355170 当时vs2015是编译成功的 ...
- Cef mysql.exe_CEF3.2623使用记录:windows编译
CEF3.2623使用记录:windows编译 1:cef3.2623下载地址 2623是cef3最后一个支持xp系统的版本,且可以支持html的audio标签,可以用作对html音频的处理下载地址为 ...
- LibreCAD for windows 编译
LibreCAD for windows 编译 项目中要用到平面CAD功能,找到libreCAD,发现不很适合需求,需要重新改造一下:)要改造就要编译: 1.下载源码解压到H盘 2.用notepad+ ...
- FreeRDP 2.0 for Windows 编译
简介 Freerdp 一个开源的RDP跨平台客户端: https://github.com/FreeRDP/FreeRDP 版本 2020-04-09 Github上其发布了2.0版本: 只下载其re ...
- Windows编译FreeRDP
Windows编译FreeRDP 需要准备的工具 1.安装CMake (cmake-gui) 2.安装`Visual Studio Community 2017` 3.下载`FreeRDP`源码 4. ...
- windows编译g20问题解决记录
windows编译g20问题解决记录 error C3861: 'vasprintf': identifier not found 参考链接 here
- Windows编译安装AzerothCore魔兽世界开源服务端Lua脚本引擎Eluna和防作弊anticheat模块教程
Windows编译安装AzerothCore魔兽世界开源服务端Lua脚本引擎Eluna和防作弊anticheat模块教程 大家好,我是艾西今天和大家聊聊魔兽世界游戏内的脚步以及防作弊模块 Eluna是 ...
- windows编译libzip vs2017
windows编译libzip vs2017 1 下载 2 打开工具 3 编译zlib 4 编译libzip 链接 参考: 原创文章禁止转载 同步发布http://www.alom.com.cn/ 1 ...
- Skia Windows 编译
Skia Windows 编译 编译环境:win10 64位.VS2017.git.LLVM 一.下载Skia相关源码 1. 下载google工具depot_tools git clone https ...
最新文章
- 车联网APP,安全设施薄弱的山寨品
- 2021-03-12java性能调优三板斧
- 算法---找到数组中第二大的数
- python的继承模式_Python之继承--增加新功能,不更改以前的代码
- ML之SVM:利用SVM算法对手写数字图片识别数据集(PCA降维处理)进行预测并评估模型(两种算法)性能
- 最简单易懂的对拍讲解
- Vue子组件与父组件之间的通信
- 简直要逆天!超炫的 HTML5 粒子效果进度条
- 【nodejs原理源码赏析(9)】用node-ssh实现轻量级自动化部署
- python传递utf8 到c++_深入理解Python的TLS机制和Threading.local()
- 利用navicat将数据库中的查询结果导出文件
- 借助Squid代理服务器,建立灵活的访问控制系统
- 【1月7日】议程正式公布!年度AIoT产业盛典重磅来袭!
- 容器:forward_list用法及示例
- VLAN的概念与配置
- Problem Q: 计算公司员工的工资
- 潭州学院html学习(day07)
- 计算机办公软件试题答案,2017年office办公软件考试题目及答案
- 【Python数据分析】利用Python删除EXCEL表格中指定的列数据或行数据
- 浅谈智慧河南城市建设