[mapguide-commits] r8646 - sandbox/jng/diet_oem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri May 1 09:55:36 PDT 2015


Author: jng
Date: 2015-05-01 09:55:36 -0700 (Fri, 01 May 2015)
New Revision: 8646

Modified:
   sandbox/jng/diet_oem/build.bat
   sandbox/jng/diet_oem/setenvironment.bat
Log:
Fix environment variables for debug configurations and enable passing CPU count to build.bat

This allows OEM to be built in all 4 combinations of debug/release/x86/x64 and allows IDE build of Server and WebTier in the same 4 combinations.

Modified: sandbox/jng/diet_oem/build.bat
===================================================================
--- sandbox/jng/diet_oem/build.bat	2015-05-01 16:54:04 UTC (rev 8645)
+++ sandbox/jng/diet_oem/build.bat	2015-05-01 16:55:36 UTC (rev 8646)
@@ -3,6 +3,7 @@
 SET MG_OEM_PLATFORM=x64
 SET MG_OEM_CONFIG=Release
 SET MG_OEM_ACTION=build
+SET MG_CORE_COUNT=1
 :study_params
 if (%1)==() goto start_build
 
@@ -15,6 +16,9 @@
 if "%1"=="-help"     goto help_show
 if "%1"=="-h"        goto help_show
 
+if "%1"=="-n"        goto get_corecount
+if "%1"=="-numcores" goto get_corecount
+
 if "%1"=="-a"        goto get_action
 if "%1"=="-action"   goto get_action
 
@@ -45,6 +49,11 @@
 SET MG_OEM_OUTPUT=%2
 goto next_param
 
+:get_corecount
+SET MG_CORE_COUNT=%2
+if "%2"=="" SET MG_CORE_COUNT=%NUMBER_OF_PROCESSORS%
+goto next_param
+
 :get_action
 SET MG_OEM_ACTION=%2
 if "%2"=="build" goto next_param
@@ -59,9 +68,9 @@
 goto custom_error
 
 :do_build
-echo [build]: OEM [%MG_OEM_CONFIG%,%MG_OEM_PLATFORM%] to: %MG_OEM_OUTPUT%
-msbuild /p:Configuration=%MG_OEM_CONFIG%;Platform=%MG_OEM_PLATFORM% /t:build oem.sln
-msbuild /p:Configuration=%MG_OEM_CONFIG%;Platform=%MG_OEM_PLATFORM% /t:build CsMap\VC110\OpenSource.sln
+echo [build]: OEM [%MG_OEM_CONFIG%,%MG_OEM_PLATFORM%] to: %MG_OEM_OUTPUT% [%MG_CORE_COUNT% cores]
+msbuild /p:Configuration=%MG_OEM_CONFIG%;Platform=%MG_OEM_PLATFORM% /t:build /m:%MG_CORE_COUNT% oem.sln
+msbuild /p:Configuration=%MG_OEM_CONFIG%;Platform=%MG_OEM_PLATFORM% /t:build /m:%MG_CORE_COUNT% CsMap\VC110\OpenSource.sln
 goto quit
 
 :do_clean

Modified: sandbox/jng/diet_oem/setenvironment.bat
===================================================================
--- sandbox/jng/diet_oem/setenvironment.bat	2015-05-01 16:54:04 UTC (rev 8645)
+++ sandbox/jng/diet_oem/setenvironment.bat	2015-05-01 16:55:36 UTC (rev 8646)
@@ -33,8 +33,16 @@
 
 :get_config
 SET MG_OEM_CONFIG=%2
-if "%2"=="debug" goto next_param
-if "%2"=="release" goto next_param
+if "%2"=="Debug" goto next_param
+if "%2"=="debug" (
+    SET MG_OEM_CONFIG=Debug
+    goto next_param
+)
+if "%2"=="Release" goto next_param
+if "%2"=="release" (
+    SET MG_OEM_CONFIG=Release
+    goto next_param
+)
 SET ERRORMSG=Unrecognised config: %2
 goto custom_error
 
@@ -45,18 +53,33 @@
     SET MG_OEM_CSMAP_DEBUG_SUFFIX=d
     SET MG_OEM_DBXML_DEBUG_SUFFIX=d
     SET MG_OEM_XERCES_DEBUG_SUFFIX=d
-    SET MG_OEM_DWFTK_DEBUG_SUFFIX=d
-    SET MG_OEM_FDO_DEBUG_SUFFIX=d
-    SET MG_OEM_GD_DEBUG_SUFFIX=d
-    SET MG_OEM_FREETYPE_DEBUG_SUFFIX=d
+    SET MG_OEM_DWFTK_DEBUG_SUFFIX=
+    SET MG_OEM_FDO_DEBUG_SUFFIX=
+    SET MG_OEM_GD_DEBUG_SUFFIX=
+    SET MG_OEM_FREETYPE_DEBUG_SUFFIX=_d
     SET MG_OEM_LIBJPEG_DEBUG_SUFFIX=d
     SET MG_OEM_LIBPNG_DEBUG_SUFFIX=d
     SET MG_OEM_ZLIB_DEBUG_SUFFIX=d
     SET MG_OEM_GEOS_DEBUG_SUFFIX=d
     SET MG_OEM_JSONCPP_DEBUG_SUFFIX=d
+) else (
+    SET MG_OEM_ACE_DEBUG_SUFFIX=
+    SET MG_OEM_CPPUNIT_DEBUG_SUFFIX=
+    SET MG_OEM_CSMAP_DEBUG_SUFFIX=
+    SET MG_OEM_DBXML_DEBUG_SUFFIX=
+    SET MG_OEM_XERCES_DEBUG_SUFFIX=
+    SET MG_OEM_DWFTK_DEBUG_SUFFIX=
+    SET MG_OEM_FDO_DEBUG_SUFFIX=
+    SET MG_OEM_GD_DEBUG_SUFFIX=
+    SET MG_OEM_FREETYPE_DEBUG_SUFFIX=
+    SET MG_OEM_LIBJPEG_DEBUG_SUFFIX=
+    SET MG_OEM_LIBPNG_DEBUG_SUFFIX=
+    SET MG_OEM_ZLIB_DEBUG_SUFFIX=
+    SET MG_OEM_GEOS_DEBUG_SUFFIX=
+    SET MG_OEM_JSONCPP_DEBUG_SUFFIX=
 )
 
-SET SEVENZ=%CD%\BuildTools\WebTools\7-zip\7z.exe
+SET SEVENZ=%CD%\WebTools\7-zip\7z.exe
 SET MG_OEM_HTTPD_VER=2.4.10
 SET MG_OEM_PHP_VER=5.5.17
 
@@ -73,56 +96,59 @@
 )
 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
+if not exist %MG_OEM_HTTPD_ROOT% goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\httpd.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\http_config.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\ap_config.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\http_log.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\http_protocol.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\http_main.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\util_script.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\http_core.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\apr_strings.h goto unpack_httpd
+if not exist %MG_OEM_HTTPD_ROOT%\include\apr_tables.h goto unpack_httpd
 goto check_php
 :unpack_httpd
+pushd LinuxApt
 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
+popd
 :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
+if not exist %MG_OEM_PHP_ROOT% goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\ext goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\ext\standard goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\ext\standard\info.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\main goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\main\php.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\main\php_ini.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\main\config.w32.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\main\win95nt.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\TSRM goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\TSRM\readdir.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\Zend goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\Zend\zend.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\Zend\zend_exceptions.h goto unpack_php
+if not exist %MG_OEM_PHP_ROOT%\Zend\zend_API.h goto unpack_php
 goto patch_php_headers
 :unpack_php
+pushd LinuxApt
 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
+popd
 :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\
+copy /Y %CD%\php\main\*.h %MG_OEM_PHP_ROOT%\main\
+copy /Y %CD%\php\TSRM\*.h %MG_OEM_PHP_ROOT%\TSRM\
 :patch_httpd_headers
 echo Patching HTTPD headers
-copy /Y ..\httpd\include\*.h httpd-%MG_OEM_HTTPD_VER%\include\
+copy /Y %CD%\httpd\include\*.h %MG_OEM_HTTPD_ROOT%\include\
 popd
 
 REM ==================== ACE ==========================
@@ -149,43 +175,47 @@
 SET MG_OEM_XERCES_LIBS=xerces-c_3mg%MG_OEM_XERCES_DEBUG_SUFFIX%.lib
 REM ==================== DWFTK ========================
 SET MG_OEM_DWFTK_INC_DIR=%CD%\DWFTK\develop\global\src
-SET MG_OEM_DWFTK_LIB_DIR=%CD%\DWFTK\develop\global\lib\%MG_OEM_PLATFORM%\static\%MG_OEM_CONFIG%\vc10.0
-SET MG_OEM_DWFTK_LIBS=dwfcore_wt.1.7.0%MG_OEM_DBXML_DEBUG_SUFFIX%.lib;dwftk_wt.7.7.0%MG_OEM_DBXML_DEBUG_SUFFIX%.lib;whiptk_wt.7.13.601%MG_OEM_DBXML_DEBUG_SUFFIX%.lib
-SET MG_OEM_DWFTK_LIBS_RENDERERS=%MG_OEM_DWFTK_LIBS%;w3dtk_wt.1.7.1555%MG_OEM_DBXML_DEBUG_SUFFIX%.lib
+if "%MG_OEM_PLATFORM%"=="x64" (
+    SET MG_OEM_DWFTK_LIB_DIR=%CD%\DWFTK\develop\global\lib\%MG_OEM_PLATFORM%\static\%MG_OEM_CONFIG%\vc10.0
+) else (
+    SET MG_OEM_DWFTK_LIB_DIR=%CD%\DWFTK\develop\global\lib\static\%MG_OEM_CONFIG%\vc10.0
+)
+SET MG_OEM_DWFTK_LIBS=dwfcore_wt.1.7.0%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib;dwftk_wt.7.7.0%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib;whiptk_wt.7.13.601%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib
+SET MG_OEM_DWFTK_LIBS_RENDERERS=%MG_OEM_DWFTK_LIBS%;w3dtk_wt.1.7.1555%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib
 SET MG_OEM_DWFTK_LIBS_DRAWING_SVC=%MG_OEM_DWFTK_LIBS_RENDERERS%
-SET MG_OEM_DWFTK_LIBS_KML_SVC=dwfcore_wt.1.7.0%MG_OEM_DBXML_DEBUG_SUFFIX%.lib
-SET MG_OEM_DWFTK_LIBS_RESOURCE_SVC=dwfcore_wt.1.7.0%MG_OEM_DBXML_DEBUG_SUFFIX%.lib
+SET MG_OEM_DWFTK_LIBS_KML_SVC=dwfcore_wt.1.7.0%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib
+SET MG_OEM_DWFTK_LIBS_RESOURCE_SVC=dwfcore_wt.1.7.0%MG_OEM_DWFTK_DEBUG_SUFFIX%.lib
 REM ==================== FDO ==========================
 SET MG_OEM_FDO_ROOT=%CD%\FDO
 SET MG_OEM_FDO_INC_DIR=%MG_OEM_FDO_ROOT%\Inc
 SET MG_OEM_FDO_LIB_DIR=%MG_OEM_FDO_ROOT%\Lib%MG_OEM_PLAT_SHORT%
-SET MG_OEM_FDO_LIBS=FDO%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_FDO_LIBS=FDO%MG_OEM_FDO_DEBUG_SUFFIX%.lib
 REM ==================== GD ===========================
 SET MG_OEM_GD_INC_DIR=%CD%\gd\gd
 SET MG_OEM_GD_LIB_DIR=%CD%\gd\build\win32\gd\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%
-SET MG_OEM_GD_LIBS=gd%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_GD_LIBS=gd%MG_OEM_GD_DEBUG_SUFFIX%.lib
 SET MG_OEM_GD_BIN_DIR=%MG_OEM_GD_LIB_DIR%
 SET MG_OEM_FREETYPE_INC_DIR=%CD%\gd\freetype\include
 SET MG_OEM_FREETYPE_LIB_DIR=%CD%\gd\freetype\objs\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%\
-SET MG_OEM_FREETYPE_LIBS=freetype235%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_FREETYPE_LIBS=freetype235%MG_OEM_FREETYPE_DEBUG_SUFFIX%.lib
 SET MG_OEM_LIBJPEG_INC_DIR=%CD%\gd\jpeg
 SET MG_OEM_LIBJPEG_LIB_DIR=%CD%\gd\jpeg\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%
-SET MG_OEM_LIBJPEG_LIBS=jpeg%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_LIBJPEG_LIBS=jpeg%MG_OEM_LIBJPEG_DEBUG_SUFFIX%.lib
 SET MG_OEM_LIBPNG_INC_DIR=%CD%\gd\lpng
 SET MG_OEM_LIBPNG_LIB_DIR=%CD%\gd\lpng\projects\vs\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%
-SET MG_OEM_LIBPNG_LIBS=libpng%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_LIBPNG_LIBS=libpng%MG_OEM_LIBPNG_DEBUG_SUFFIX%.lib
 SET MG_OEM_ZLIB_INC_DIR=%CD%\gd\zlib
 SET MG_OEM_ZLIB_LIB_DIR=%CD%\gd\lpng\projects\vs\%MG_OEM_CONFIG%%MG_OEM_PLAT_SHORT%\ZLib
-SET MG_OEM_ZLIB_LIBS=zlib%MG_FDO_DEBUG_SUFFIX%.lib
+SET MG_OEM_ZLIB_LIBS=zlib%MG_OEM_ZLIB_DEBUG_SUFFIX%.lib
 REM ==================== GEOS =========================
 SET MG_OEM_GEOS_INC_DIR=%CD%\geos\include
 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_LIBS=GEOS%MG_OEM_GEOS_DEBUG_SUFFIX%.lib
 SET MG_OEM_GEOS_BIN_DIR=%MG_OEM_GEOS_LIB_DIR%
 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
+SET MG_OEM_JSONCPP_LIBS=lib_json%MG_OEM_JSONCPP_DEBUG_SUFFIX%.lib
 REM ==================== SWIG =========================
 SET MG_OEM_SWIG_BIN_DIR=%CD%\SWIGEx\Win32
 SET MG_OEM_SWIG_LIB_DIR=%CD%\SWIGEx\Lib
@@ -244,8 +274,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_PHP_INC_DIR% (
-    SET ERRORMSG=No such path: MG_OEM_PHP_INC_DIR [%MG_OEM_PHP_INC_DIR%]
+if not exist %MG_OEM_PHP_ROOT% (
+    SET ERRORMSG=No such path: MG_OEM_PHP_ROOT [%MG_OEM_PHP_ROOT%]
     goto custom_error_no_help
 )
 if not exist %MG_OEM_PHP_LIB_DIR% (
@@ -264,7 +294,10 @@
     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 Platform: %MG_OEM_PLATFORM%
+echo Configuration: %MG_OEM_CONFIG%
 echo ==================== ACE ==========================
 echo MG_OEM_ACE_INC_DIR = %MG_OEM_ACE_INC_DIR%
 echo MG_OEM_ACE_LIB_DIR = %MG_OEM_ACE_LIB_DIR%



More information about the mapguide-commits mailing list