[mapguide-commits] r4979 - trunk/Installer/livedvd

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Jun 26 18:34:02 EDT 2010


Author: trevorwekel
Date: 2010-06-26 22:34:02 +0000 (Sat, 26 Jun 2010)
New Revision: 4979

Added:
   trunk/Installer/livedvd/mapguidemaestro.png
   trunk/Installer/livedvd/mapguideserver.png
   trunk/Installer/livedvd/startmapguide.sh
   trunk/Installer/livedvd/stopmapguide.sh
Removed:
   trunk/Installer/livedvd/mglivedvduninst.sh
Modified:
   trunk/Installer/livedvd/install_mapguide.sh
Log:
Ticket #1295 Improve build scripts for 2.2 release cycle
Add desktop icons, start/stop scripts, and Sheboygan sample for Live DVD


Modified: trunk/Installer/livedvd/install_mapguide.sh
===================================================================
--- trunk/Installer/livedvd/install_mapguide.sh	2010-06-26 19:29:32 UTC (rev 4978)
+++ trunk/Installer/livedvd/install_mapguide.sh	2010-06-26 22:34:02 UTC (rev 4979)
@@ -24,12 +24,17 @@
 # =======
 # sudo ./install_mapguide.sh
 
+USER_NAME="user"
+USER_HOME="/home/$USER_NAME"
+USER_DESKTOP="$USER_HOME/Desktop"
 
 TEMPDIR=/tmp/build_mapguide
 URL="http://download.osgeo.org/mapguide/releases/2.2.0/Beta"
 FDOVER=3.5.0-5460_i386
 MGVER=2.2.0-4898_i386
 MAESTROVER=2.0.0-4650_i386
+MGDIR=/usr/local/mapguideopensource-2.2.0
+
 # Create temporary download directory
 mkdir -p ${TEMPDIR}
 pushd ${TEMPDIR}
@@ -38,25 +43,25 @@
 apt-get -y install libexpat1 libssl0.9.8 odbcinst1debian1 unixodbc libcurl3 libxslt1.1
 apt-get -y install mono-runtime libmono-winforms2.0-cil
 
-# Resolve CentOS 5.4 / Ubuntu 9.10 shared lib differences with symlinks
-if [ ! -e /lib/libcrypto.so.6 ]; then
-  ln -s /lib/libcrypto.so.0.9.8 /lib/libcrypto.so.6
+# Resolve CentOS 5.4 / Ubuntu 10.04 shared lib differences with symlinks
+if [ ! -e /usr/local/lib/libcrypto.so.6 ]; then
+  ln -s /lib/libcrypto.so.0.9.8 /usr/local/lib/libcrypto.so.6
 fi
 
-if [ ! -e /lib/libssl.so.6 ]; then
-  ln -s /lib/libssl.so.0.9.8 /lib/libssl.so.6
+if [ ! -e /usr/local/lib/libssl.so.6 ]; then
+  ln -s /lib/libssl.so.0.9.8 /usr/local/lib/libssl.so.6
 fi
 
-if [ ! -e /lib/libexpat.so.0 ]; then
-  ln -s /lib/libexpat.so.1.5.2 /lib/libexpat.so.0
+if [ ! -e /usr/local/lib/libexpat.so.0 ]; then
+  ln -s /lib/libexpat.so.1.5.2 /usr/local/lib/libexpat.so.0
 fi
 
-if [ ! -e /usr/lib/libldap-2.3.so.0 ]; then
-  ln -s /usr/lib/libldap-2.4.so.2 /usr/lib/libldap-2.3.so.0
+if [ ! -e /usr/local/lib/libldap-2.3.so.0 ]; then
+  ln -s /usr/lib/libldap-2.4.so.2 /usr/local/lib/libldap-2.3.so.0
 fi
 
-if [ ! -e /usr/lib/liblber-2.3.so.0 ]; then
-  ln -s /usr/lib/liblber-2.4.so.2 /usr/lib/liblber-2.3.so.0
+if [ ! -e /usr/local/lib/liblber-2.3.so.0 ]; then
+  ln -s /usr/lib/liblber-2.4.so.2 /usr/local/lib/liblber-2.3.so.0
 fi
 
 if [ ! -d /var/lock/mgserver ]; then
@@ -94,5 +99,90 @@
 # Install Ubuntu Package for Maestro
 dpkg -E -G --install mapguideopensource-maestro_${MAESTROVER}.deb
 
+# Download icons and scripts for MapGuide and Maestro
+wget -N ${URL}/livedvd/mapguideserver.png -P /usr/share/icons
+wget -N ${URL}/livedvd/mapguidemaestro.png -P /usr/share/icons
+wget -N ${URL}/livedvd/startmapguide.sh -P ${MGDIR}
+chmod ugo+x ${MGDIR}/startmapguide.sh
+wget -N ${URL}/livedvd/stopmapguide.sh -P ${MGDIR}
+chmod ugo+x ${MGDIR}/stopmapguide.sh
+
+# Create shortcuts for MapGuide and Maestro
+if [ ! -e $USER_DESKTOP/mapguideserverstart.desktop ] ; then
+   cat << EOF > $USER_DESKTOP/mapguideserverstart.desktop
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=MapGuide\nStart
+Comment=Start MapGuide Server
+Categories=Application;Geography;
+Exec=${MGDIR}/startmapguide.sh
+Icon=/usr/share/icons/mapguideserver.png
+Terminal=true
+StartupNotify=true
+Categories=Application;Geography
+MimeType=
+EOF
+fi
+
+if [ ! -e $USER_DESKTOP/mapguideserverstop.desktop ] ; then
+   cat << EOF > $USER_DESKTOP/mapguideserverstop.desktop
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=MapGuide\nStop
+Comment=Stop MapGuide Server
+Categories=Application;Education;Geography;
+Exec=${MGDIR}/stopmapguide.sh
+Icon=/usr/share/icons/mapguideserver.png
+Terminal=true
+StartupNotify=true
+Categories=Application;Geography
+MimeType=
+EOF
+fi
+
+if [ ! -e $USER_DESKTOP/mapguidemaestro.desktop ] ; then
+   cat << EOF > $USER_DESKTOP/mapguidemaestro.desktop
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=MapGuide\nMaestro
+Comment=Start MapGuide Maestro
+Categories=Application;Geography;
+Exec=/usr/bin/mono /usr/local/mapguidemaestro-2.0.0/Maestro.exe
+Icon=/usr/share/icons/mapguidemaestro.png
+Terminal=false
+StartupNotify=false
+Categories=Application;Geography
+MimeType=
+EOF
+fi
+
+
+# Replace the MapGuide Server startup script for Ubuntu compatibility
+cat << EOF > ${MGDIR}/server/bin/mgserverd.sh
+#!/bin/bash
+export MENTOR_DICTIONARY_PATH=${MGDIR}/share/gis/coordsys
+export LD_LIBRARY_PATH=/usr/local/fdo-3.5.0/lib:"$LD_LIBRARY_PATH"
+ulimit -s 1024
+
+if [ ! -d /var/lock/mgserver ]; then
+  mkdir /var/lock/mgserver
+fi
+
+pushd ${MGDIR}/server/bin
+./mgserver daemon
 popd
+EOF
 
+chmod ugo+x ${MGDIR}/server/bin/mgserverd.sh
+
+# Download and install Sheboygan sample data
+if [ ! -d ${MGDIR}/webserverextensions/www/phpviewersample ]; then
+wget -N ${URL}/livedvd/sheboygansample.tgz
+cd ${MGDIR}
+tar -zxf ${TEMPDIR}/sheboygansample.tgz
+fi
+
+popd

Added: trunk/Installer/livedvd/mapguidemaestro.png
===================================================================
(Binary files differ)


Property changes on: trunk/Installer/livedvd/mapguidemaestro.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Installer/livedvd/mapguideserver.png
===================================================================
(Binary files differ)


Property changes on: trunk/Installer/livedvd/mapguideserver.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Deleted: trunk/Installer/livedvd/mglivedvduninst.sh
===================================================================
--- trunk/Installer/livedvd/mglivedvduninst.sh	2010-06-26 19:29:32 UTC (rev 4978)
+++ trunk/Installer/livedvd/mglivedvduninst.sh	2010-06-26 22:34:02 UTC (rev 4979)
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-#
-#  Copyright (C) 2010 by Autodesk, Inc.
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of version 2.1 of the GNU Lesser
-#  General Public License as published by the Free Software Foundation.
-#
-#  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
-#
-
-# Remove Ubuntu packages for MapGuide
-for file in server webextensions httpd common
-do
-  dpkg --remove mapguideopensource-${file}
-done
-
-# Remove Ubuntu packages for FDO
-for file in wms wfs sqlite shp sdf postgis ogr kingoracle gdal core
-do
-  dpkg --remove fdo-${file}
-done
-
-dpkg --remove mapguideopensource-maestro
-

Added: trunk/Installer/livedvd/startmapguide.sh
===================================================================
--- trunk/Installer/livedvd/startmapguide.sh	                        (rev 0)
+++ trunk/Installer/livedvd/startmapguide.sh	2010-06-26 22:34:02 UTC (rev 4979)
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+#  Copyright (C) 2010 by Autodesk, Inc.
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of version 2.1 of the GNU Lesser
+#  General Public License as published by the Free Software Foundation.
+#
+#  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
+#
+# About:
+# ===
+# This script will start the MapGuide Server and Apache on the LiveDVD
+# Usage (as user with sudo rights):
+# ./startmapguide.sh
+#
+sudo /bin/bash -c "echo Starting MapGuide...;sleep 1;/usr/local/mapguideopensource-2.2.0/server/bin/mgserverd.sh; sleep 5; echo Starting Apache...;/usr/local/mapguideopensource-2.2.0/webserverextensions/apache2/bin/apachectl start; sleep 5"


Property changes on: trunk/Installer/livedvd/startmapguide.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/Installer/livedvd/stopmapguide.sh
===================================================================
--- trunk/Installer/livedvd/stopmapguide.sh	                        (rev 0)
+++ trunk/Installer/livedvd/stopmapguide.sh	2010-06-26 22:34:02 UTC (rev 4979)
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+#  Copyright (C) 2010 by Autodesk, Inc.
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of version 2.1 of the GNU Lesser
+#  General Public License as published by the Free Software Foundation.
+#
+#  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
+#
+# About:
+# ===
+# This script will start the MapGuide Server and Apache on the LiveDVD
+# Usage (as user with sudo rights):
+# ./stopmapguide.sh
+#
+
+MGPID=`ps -C mgserver -o pid=`
+sudo /bin/bash -c "echo Stopping Apache...;sleep 1;/usr/local/mapguideopensource-2.2.0/webserverextensions/apache2/bin/apachectl stop; echo Stopping MapGuide...; sleep 2; kill -SIGKILL $MGPID; sleep 3"


Property changes on: trunk/Installer/livedvd/stopmapguide.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the mapguide-commits mailing list