[mapguide-commits] r8643 - sandbox/jng/diet_oem
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri May 1 06:07:49 PDT 2015
Author: jng
Date: 2015-05-01 06:07:49 -0700 (Fri, 01 May 2015)
New Revision: 8643
Modified:
sandbox/jng/diet_oem/setenvironment.bat
Log:
Incorporate php/httpd tarball/header preparation logic from prepare_webtier_components.bat
Modified: sandbox/jng/diet_oem/setenvironment.bat
===================================================================
--- sandbox/jng/diet_oem/setenvironment.bat 2015-05-01 13:04:12 UTC (rev 8642)
+++ sandbox/jng/diet_oem/setenvironment.bat 2015-05-01 13:07:49 UTC (rev 8643)
@@ -55,6 +55,76 @@
SET MG_OEM_GEOS_DEBUG_SUFFIX=d
SET MG_OEM_JSONCPP_DEBUG_SUFFIX=d
)
+
+SET SEVENZ=%CD%\BuildTools\WebTools\7-zip\7z.exe
+SET MG_OEM_HTTPD_VER=2.4.10
+SET MG_OEM_PHP_VER=5.5.17
+
+REM ==================== HTTPD ========================
+SET MG_OEM_HTTPD_ROOT=%CD%\LinuxApt\httpd-%MG_OEM_HTTPD_VER%
+SET MG_OEM_HTTPD_LIB_DIR=%CD%\httpd\lib%MG_OEM_PLAT_SHORT%
+SET MG_OEM_HTTPD_LIBS=libhttpd.lib;libapr-1.lib;libaprutil-1.lib
+REM ==================== PHP ==========================
+SET MG_OEM_PHP_ROOT=%CD%\LinuxApt\php-%MG_OEM_PHP_VER%
+if "%MG_OEM_PLATFORM%"=="x64" (
+SET MG_OEM_PHP_LIB_DIR=%CD%\php\x64\Release_TS
+) else (
+SET MG_OEM_PHP_LIB_DIR=%CD%\php\Release_TS
+)
+SET MG_OEM_PHP_LIBS=php5ts.lib
+
+pushd LinuxApt
+:check_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER% goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\httpd.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\http_config.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\ap_config.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\http_log.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\http_protocol.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\http_main.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\util_script.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\http_core.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\apr_strings.h goto unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%\include\apr_tables.h goto unpack_httpd
+goto check_php
+:unpack_httpd
+if not exist httpd-%MG_OEM_HTTPD_VER%.tar "%SEVENZ%" x httpd-%MG_OEM_HTTPD_VER%.tar.bz2
+"%SEVENZ%" x -y httpd-%MG_OEM_HTTPD_VER%.tar
+:check_php
+rem *sigh* there is not a 100% reliable way to nuke a directory in windows from the cmd line to make way
+rem for a new MapGuide build, meaning we could have empty PHP directories from a previous build that would
+rem pass the previous iteration of this check to determine if PHP needs to be unpacked. So check for the specific
+rem headers that we know we are going to be using and if a single one of these headers cannot be found then
+rem do the archive unpacking
+if not exist php-%MG_OEM_PHP_VER% goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\ext goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\ext\standard goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\ext\standard\info.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\main goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\main\php.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\main\php_ini.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\main\config.w32.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\main\win95nt.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\TSRM goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\TSRM\readdir.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\Zend goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\Zend\zend.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\Zend\zend_exceptions.h goto unpack_php
+if not exist php-%MG_OEM_PHP_VER%\Zend\zend_API.h goto unpack_php
+goto patch_php_headers
+:unpack_php
+if not exist php-%MG_OEM_PHP_VER%.tar "%SEVENZ%" x php-%MG_OEM_PHP_VER%.tar.bz2
+"%SEVENZ%" x -y php-%MG_OEM_PHP_VER%.tar
+:patch_php_headers
+echo Patching PHP headers
+copy /Y ..\php\main\*.h php-%MG_OEM_PHP_VER%\main\
+copy /Y ..\php\TSRM\*.h php-%MG_OEM_PHP_VER%\TSRM\
+:patch_httpd_headers
+echo Patching HTTPD headers
+copy /Y ..\httpd\include\*.h httpd-%MG_OEM_HTTPD_VER%\include\
+popd
+
REM ==================== ACE ==========================
SET MG_OEM_ACE_INC_DIR=%CD%\ACE\ACE_Wrappers
SET MG_OEM_ACE_LIB_DIR=%CD%\ACE\ACE_Wrappers\lib%MG_OEM_PLAT_SHORT%\%MG_OEM_CONFIG%
@@ -112,22 +182,18 @@
SET MG_OEM_GEOS_LIB_DIR=%CD%\geos\VisualStudio\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%
SET MG_OEM_GEOS_LIBS=GEOS%MG_FDO_DEBUG_SUFFIX%.lib
SET MG_OEM_GEOS_BIN_DIR=%MG_OEM_GEOS_LIB_DIR%
-REM ==================== HTTPD ========================
-SET MG_OEM_HTTPD_INC_DIR=%CD%\LinuxApt\httpd-2.4.10\include
-SET MG_OEM_HTTPD_LIB_DIR=%CD%\httpd\lib%MG_OEM_PLAT_SHORT%
-SET MG_OEM_HTTPD_LIBS=libhttpd.lib;libapr-1.lib;libaprutil-1.lib
-REM ==================== PHP ==========================
-SET MG_OEM_PHP_INC_DIR=%CD%\LinuxApt\php-5.5.17
-if "%MG_OEM_PLATFORM%"=="x64" (
-SET MG_OEM_PHP_LIB_DIR=%CD%\php\x64\Release_TS
-) else (
-SET MG_OEM_PHP_LIB_DIR=%CD%\php\Release_TS
-)
-SET MG_OEM_PHP_LIBS=php5ts.lib
REM ==================== JSONCPP ======================
SET MG_OEM_JSONCPP_INC_DIR=%CD%\jsoncpp\include
SET MG_OEM_JSONCPP_LIB_DIR=%CD%\jsoncpp\lib%MG_OEM_PLAT_SHORT%\%MG_OEM_CONFIG%
SET MG_OEM_JSONCPP_LIBS=lib_json%MG_FDO_DEBUG_SUFFIX%.lib
+REM ==================== SWIG =========================
+SET MG_OEM_SWIG_BIN_DIR=%CD%\SWIGEx\Win32
+SET MG_OEM_SWIG_LIB_DIR=%CD%\SWIGEx\Lib
+REM ==================== IMAKE ========================
+SET MG_OEM_IMAKE_BIN_DIR=%CD%\WebTools\IMake\Win32
+REM ==================== JAVA =========================
+SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_80
+if "%MG_OEM_PLATFORM%"=="x64" SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
REM Path sanity checking
if not exist %MG_OEM_ACE_INC_DIR% (
@@ -170,8 +236,8 @@
SET ERRORMSG=No such path: MG_OEM_XERCES_LIB_DIR [%MG_OEM_XERCES_LIB_DIR%]
goto custom_error_no_help
)
-if not exist %MG_OEM_HTTPD_INC_DIR% (
- SET ERRORMSG=No such path: MG_OEM_HTTPD_INC_DIR [%MG_OEM_HTTPD_INC_DIR%]
+if not exist %MG_OEM_HTTPD_ROOT% (
+ SET ERRORMSG=No such path: MG_OEM_HTTPD_ROOT [%MG_OEM_HTTPD_ROOT%]
goto custom_error_no_help
)
if not exist %MG_OEM_HTTPD_LIB_DIR% (
@@ -186,6 +252,18 @@
SET ERRORMSG=No such path: MG_OEM_PHP_LIB_DIR [%MG_OEM_PHP_LIB_DIR%]
goto custom_error_no_help
)
+if not exist %MG_OEM_SWIG_BIN_DIR% (
+ SET ERRORMSG=No such path: MG_OEM_SWIG_BIN_DIR [%MG_OEM_SWIG_BIN_DIR%]
+ goto custom_error_no_help
+)
+if not exist %MG_OEM_SWIG_LIB_DIR% (
+ SET ERRORMSG=No such path: MG_OEM_SWIG_LIB_DIR [%MG_OEM_SWIG_LIB_DIR%]
+ goto custom_error_no_help
+)
+if not exist %MG_OEM_IMAKE_BIN_DIR% (
+ SET ERRORMSG=No such path: MG_OEM_IMAKE_BIN_DIR [%MG_OEM_IMAKE_BIN_DIR%]
+ goto custom_error_no_help
+)
echo ========= Environment Variable Summary ============
echo ==================== ACE ==========================
echo MG_OEM_ACE_INC_DIR = %MG_OEM_ACE_INC_DIR%
@@ -235,7 +313,7 @@
echo MG_OEM_GEOS_LIB_DIR = %MG_OEM_GEOS_LIB_DIR%
echo MG_OEM_GEOS_LIBS = %MG_OEM_GEOS_LIBS%
echo ==================== HTTPD ========================
-echo MG_OEM_HTTPD_INC_DIR = %MG_OEM_HTTPD_INC_DIR%
+echo MG_OEM_HTTPD_ROOT = %MG_OEM_HTTPD_ROOT%
echo MG_OEM_HTTPD_LIB_DIR = %MG_OEM_HTTPD_LIB_DIR%
echo MG_OEM_HTTPD_LIBS = %MG_OEM_HTTPD_LIBS%
echo ==================== PHP ==========================
@@ -246,6 +324,13 @@
echo MG_OEM_JSONCPP_INC_DIR = %MG_OEM_JSONCPP_INC_DIR%
echo MG_OEM_JSONCPP_LIB_DIR = %MG_OEM_JSONCPP_LIB_DIR%
echo MG_OEM_JSONCPP_LIBS = %MG_OEM_JSONCPP_LIBS%
+echo ==================== SWIG =========================
+echo MG_OEM_SWIG_BIN_DIR = %MG_OEM_SWIG_BIN_DIR%
+echo MG_OEM_SWIG_LIB_DIR = %MG_OEM_SWIG_LIB_DIR%
+echo ==================== IMAKE ========================
+echo MG_OEM_IMAKE_BIN_DIR = %MG_OEM_IMAKE_BIN_DIR%
+echo ==================== JAVA =========================
+echo JAVA_HOME = %JAVA_HOME%
echo ===================================================
goto quit
More information about the mapguide-commits
mailing list