[mapguide-commits] r4719 - in trunk/MgDev: Common/CoordinateSystem Common/Geometry Oem/LinuxApt

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Mar 30 15:55:16 EDT 2010


Author: trevorwekel
Date: 2010-03-30 15:55:15 -0400 (Tue, 30 Mar 2010)
New Revision: 4719

Removed:
   trunk/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h
Modified:
   trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
   trunk/MgDev/Common/Geometry/Geometry.vcproj
   trunk/MgDev/Common/Geometry/Makefile.am
   trunk/MgDev/Oem/LinuxApt/build_apt.sh
Log:
Ticket #1004 Release 2.1.0 (Beta) build in linux_redhat5 not work
- Various fixups to Apache/Tomcat/Php build and configure script
  Enable Apache module agent instead of cgi agent
  Replace Tomcat redirect with rewrite
  Fix cs-map environment variable initialization
- Remove hard coded path to coordsys libs (no longer required)


Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-03-30 18:01:57 UTC (rev 4718)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-03-30 19:55:15 UTC (rev 4719)
@@ -54,10 +54,6 @@
 #undef GetMessage
 #endif
 
-#ifndef _WIN32
-#include "CoordSysEnvVariable.h"
-#endif
-
 //Global variables needed from Mentor
 extern "C"
 {
@@ -225,12 +221,6 @@
         MgUtil::MultiByteToWideChar(string(szPath), sDir);
     }
 
-    if (sDir.empty())
-    {
-        bResult = true;
-        sDir = LINUX_COORD_PATH;
-    }
-
 #endif
     if (sDir.empty())
     {

Deleted: trunk/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h	2010-03-30 18:01:57 UTC (rev 4718)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h	2010-03-30 19:55:15 UTC (rev 4719)
@@ -1,11 +0,0 @@
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-#define LINUX_COORD_PATH    L"/usr/local/mapguideopensource/share/gis/coordsys";  // NOXLATE

Modified: trunk/MgDev/Common/Geometry/Geometry.vcproj
===================================================================
--- trunk/MgDev/Common/Geometry/Geometry.vcproj	2010-03-30 18:01:57 UTC (rev 4718)
+++ trunk/MgDev/Common/Geometry/Geometry.vcproj	2010-03-30 19:55:15 UTC (rev 4719)
@@ -2879,10 +2879,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\CoordinateSystem\CoordSysEnvVariable.h"
-				>
-			</File>
-			<File
 				RelativePath="..\CoordinateSystem\CoordSysFormatConverter.cpp"
 				>
 			</File>

Modified: trunk/MgDev/Common/Geometry/Makefile.am
===================================================================
--- trunk/MgDev/Common/Geometry/Makefile.am	2010-03-30 18:01:57 UTC (rev 4718)
+++ trunk/MgDev/Common/Geometry/Makefile.am	2010-03-30 19:55:15 UTC (rev 4719)
@@ -390,8 +390,7 @@
   ../CoordinateSystem/CoordSysMgrsZone.h \
   ../CoordinateSystem/CoordSysMgrs.h \
   ../CoordinateSystem/CoordSysMgrsMajorRegion.h \
-  ../CoordinateSystem/CoordSysOneGrid.h\
-  ../CoordinateSystem/CoordSysEnvVariable.h
+  ../CoordinateSystem/CoordSysOneGrid.h
 
 INCLUDES = \
   -I../Security \

Modified: trunk/MgDev/Oem/LinuxApt/build_apt.sh
===================================================================
--- trunk/MgDev/Oem/LinuxApt/build_apt.sh	2010-03-30 18:01:57 UTC (rev 4718)
+++ trunk/MgDev/Oem/LinuxApt/build_apt.sh	2010-03-30 19:55:15 UTC (rev 4719)
@@ -177,13 +177,21 @@
 
 popd
 
-# Create symlink for agent.
+# Create dummy mapagent.fcgi and symlinks for module.
 mkdir -p $INSTALLWEB/www/mapagent
 mkdir $INSTALLWEB/bin
 pushd $INSTALLWEB/www/mapagent
-ln -s ../../bin/mapagent mapagent.fcgi
+cat > mapagent.fcgi <<END-OF-FCGI
+// Empty file.  IIS application mappings and Apache script aliases are
+used to bind this file to the actual MapAgent binaries
+END-OF-FCGI
 popd
 
+mkdir -p $INSTALLWEB/lib
+pushd $INSTALLWEB/apache2/modules
+ln -s ../../lib/mod_mgmapagent.so mod_mgmapagent.so
+popd
+
 #**********************************************************
 # Php build procedure
 # Notes: none
@@ -216,6 +224,7 @@
 #**********************************************************
 if [ "$TOMCAT" = "1" ]; then
 echo Tomcat connector build/install started
+tar -zxf tomcat-connectors-1.2.25-src.tar.gz
 pushd tomcat-connectors-1.2.25-src/native
 
 ./configure --with-apxs=$INSTALLWEB/apache2/bin/apxs
@@ -259,41 +268,63 @@
 rm httpd.conf.mgorig_
 popd
 
+# Required modifications for envvars
+pushd $INSTALLWEB/apache2/bin
+cat >> envvars <<END-OF-ENVVARS
+export LD_LIBRARY_PATH=$INSTALLWEB/lib:$INSTALLWEB/php/lib:$INSTALLDIR/lib
+export MENTOR_DICTIONARY_PATH=$INSTALLDIR/share/gis/coordsys
+END-OF-ENVVARS
+popd
+
 # Required modifications to httpd.conf, append to mapguide.conf
 pushd $INSTALLWEB/apache2/conf
 cat >> mapguide.conf <<END-OF-CONFIGURATION
+
 # Environment variables for MapGuide
 SetEnv LD_LIBRARY_PATH "$INSTALLWEB/lib:$INSTALLWEB/php/lib:$INSTALLDIR/lib"
-SetEnv GDAL_DATA $INSTALLDIR/share/gdal
-SetEnv PROJ_LIB $INSTALLDIR/share/proj
+SetEnv MENTOR_DICTIONARY_PATH "$INSTALLDIR/share/gis/coordsys"
 
-#LoadModule mgmapagent_module modules/mod_mgmapagent.so
+LoadModule mgmapagent_module modules/mod_mgmapagent.so
 
+RewriteEngine On
+
 #START NormalCGI PHP configuration
 #ScriptAlias /php/ "$INSTALLWEB/php/bin/"
 #Action application/x-httpd-php "/php/php"
 #AddType application/x-httpd-php .php
 #END NormalCGI PHP configuration
 
-# MapViewer to MapViewerPhp aliases
-ScriptAlias /mapguide/mapagent/mapagent "$INSTALLWEB/www/mapagent/mapagent"
-AliasMatch ^/mapguide/mapviewerajax/([^\?])(.*)$ "$INSTALLWEB/www/mapviewerphp/\$1\$2"
-AliasMatch ^/mapguide/mapviewerajax/(.*)$ "$INSTALLWEB/www/mapviewerphp/ajaxviewer.php\$1"
-AliasMatch ^/mapguide/mapviewerdwf/([^\?])(.*)$ "$INSTALLWEB/www/mapviewerphp/\$1\$2"
-AliasMatch ^/mapguide/mapviewerdwf/(.*)$ "$INSTALLWEB/www/mapviewerphp/dwfviewer.php\$1"
+# CGI agent alias
+#ScriptAlias /mapguide/mapagent/mapagent.fcgi "$INSTALLWEB/www/mapagent/mapagent"
+
+# mapviewerajax to mapviewerphp rewrite rules
+# comment out for java api/viewer
+RewriteRule ^/mapguide/mapviewerajax/([^\?])(.*)$ /mapguide/mapviewerphp/$1$2 [PT]
+RewriteRule ^/mapguide/mapviewerajax/(.*)$ /mapguide/mapviewerphp/ajaxviewer.php$1 [PT]
+RewriteRule ^/mapguide/mapviewerdwf/([^\?])(.*)$ /mapguide/mapviewerphp/$1$2 [PT]
+RewriteRule ^/mapguide/mapviewerdwf/(.*)$ /mapguide/mapviewerphp/dwfviewer.php$1 [PT]
+
+# mapviewerajax to mapviewerjava aliases
+# uncomment for java api/viewer
+#RewriteRule ^/mapguide/mapviewerajax/([^\?])(.*)$ /mapguide/mapviewerjava/$1$2 [PT]
+#RewriteRule ^/mapguide/mapviewerajax/(.*)$ /mapguide/mapviewerjava/ajaxviewer.jsp$1 [PT]
+#RewriteRule ^/mapguide/mapviewerdwf/([^\?])(.*)$ /mapguide/mapviewerjava/$1$2 [PT]
+#RewriteRule ^/mapguide/mapviewerdwf/(.*)$ /mapguide/mapviewerjava/dwfviewer.jsp$1 [PT]
+
 Alias /mapguide "$INSTALLWEB/www/"
+
 <Directory "$INSTALLWEB/www/">
   AllowOverride All
   Options All
   Order allow,deny
   Allow from all
 
-AddHandler php5-script .php
-#AddHandler mgmapagent_handler fcgi
+  AddHandler php5-script .php
+  AddHandler mgmapagent_handler fcgi
 
-  RewriteEngine on
   RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
 </Directory>
+
 END-OF-CONFIGURATION
 popd
 
@@ -307,9 +338,8 @@
 echo Tomcat configuration started
 pushd $INSTALLWEB/apache2/conf
 cat >> mapguide.conf <<END-OF-CONFIGURATION
+
 #Tomcat Integration
-#Taken from http://tomcat.apache.org/connectors-doc/howto/quick.html
-
 # Load mod_jk module
 # Update this path to match your modules location
 LoadModule    jk_module  modules/mod_jk.so
@@ -332,6 +362,7 @@
 # Send everything for context /examples to worker named worker1 (ajp13)
 JkMount  /mapguide/mapviewerjava/* worker1
 JkMount  /mapguide/javaviewersample/* worker1
+
 END-OF-CONFIGURATION
 
 cat > workers.properties <<END-OF-CONFIGURATION
@@ -349,6 +380,11 @@
 END-OF-CONFIGURATION
 
 popd
+
+if [ ! -d $INSTALLWEB/tomcat/conf/Catalina/localhost ]; then
+mkdir -p $INSTALLWEB/tomcat/conf/Catalina/localhost
+fi
+
 pushd $INSTALLWEB/tomcat/conf/Catalina/localhost
 cat > mapguide.xml <<END_OF_CONFIGURATION
 <!--
@@ -375,6 +411,23 @@
 mv -f $INSTALLWEB/tomcat/conf/server.xml $INSTALLWEB/tomcat/conf/server_orig.xml
 cp -f server.xml $INSTALLWEB/tomcat/conf
 
+pushd $INSTALLWEB/tomcat/bin
+if [ ! -e startup.sh.orig ]; then
+mv startup.sh startup.sh.orig
+fi
+
+LIB_PATH=$INSTALLWEB/lib:$INSTALLDIR/lib
+cat > startup.sh <<END_OF_CONFIGURATION
+#!/bin/bash
+export LD_LIBRARY_PATH=$LIB_PATH
+export MENTOR_DICTIONARY_PATH=$INSTALLDIR/share/gis/coordsys
+export JAVA_OPTS="-Djava.library.path=$LIB_PATH"
+END_OF_CONFIGURATION
+
+cat startup.sh.orig >> startup.sh
+chmod 755 startup.sh
+popd
+
 echo Tomcat configuration completed
 fi
 
@@ -435,8 +488,6 @@
 if [ "$TOMCAT" = "1" ]; then
 echo Tomcat startup 
 pushd $INSTALLWEB/tomcat/bin
-export LD_LIBRARY_PATH=$INSTALLWEB/lib:$INSTALLDIR/lib:$LD_LIBRARY_PATH
-export JAVA_OPTS="-Djava.library.path=$LD_LIBRARY_PATH"
 ./startup.sh
 popd
 



More information about the mapguide-commits mailing list