stephan@278: @echo off stephan@278: if "%1" == "setenv" goto setenv stephan@278: stephan@278: %comspec% /k RunExample.bat setenv %1 stephan@278: goto exit stephan@278: stephan@278: :setenv stephan@278: @echo Setting environment for using MXD2map based on gisinternals.com windows builds. stephan@278: @echo See http://mxd2map.org and http://gisinternals.com/sdk/ for details. stephan@278: stephan@278: if "%2"=="hideoci" goto hideoci stephan@278: stephan@278: set ocipath=0 stephan@278: set _path="%PATH:;=" "%" stephan@278: for %%p in (%_path%) do if not "%%~p"=="" if exist %%~p\oci.dll set ocipath=1 stephan@278: stephan@278: if "%ocipath%"=="0" goto hideoci stephan@278: @echo WARNING: If you encounter problems with missing oci libraries then type: stephan@278: @echo MXD2mapShell hideoci stephan@278: goto setenv2 stephan@278: stephan@278: :hideoci stephan@278: @echo Hiding the OCI plugin library. stephan@278: if not exist %CD%\ms_6.1-dev\bin\gdal\plugins-optional mkdir %CD%\ms_6.1-dev\bin\gdal\plugins-optional stephan@278: if exist %CD%\ms_6.1-dev\bin\gdal\plugins\ogr_OCI.dll move %CD%\ms_6.1-dev\bin\gdal\plugins\ogr_OCI.dll %CD%\ms_6.1-dev\bin\gdal\plugins-optional\ogr_OCI.dll stephan@278: if exist %CD%\ms_6.1-dev\bin\gdal\plugins\gdal_GEOR.dll move %CD%\ms_6.1-dev\bin\gdal\plugins\gdal_GEOR.dll %CD%\ms_6.1-dev\bin\gdal\plugins-optional\gdal_GEOR.dll stephan@278: stephan@278: REM SEE Details about the installation of arcobjects.jar!! stephan@278: REM http://forums.arcgis.com/threads/17398-Unable-to-initialize-ArcObjects-environment-%28Java-API%29 stephan@278: REM http://forums.arcgis.com/threads/12833-ArcGIS-Server-initialize-license-%28Java-version%29 stephan@278: REM SEE Details about the installation of arcobjects.jar!! stephan@278: :setenv2 stephan@278: SET PATH=C:\Program Files\ArcGIS\DeveloperKit10.0\java\jre\bin;C:\Program Files\Java\jdk1.6.0_26\bin;C:\Program Files\ArcGIS\Desktop10.0\bin;C:\Program Files\ArcGIS\Desktop10.0\java\lib;C:\Program Files\ArcGIS\DeveloperKit10.0\java\tools\ant\bin;%CD%\ms_6.1-dev\bin;%CD%\ms_6.1-dev\bin\gdal\python\osgeo;%CD%\ms_6.1-dev\bin\proj\apps;%CD%\ms_6.1-dev\bin\gdal\apps;%CD%\ms_6.1-dev\bin\ms\apps;%CD%\ms_6.1-dev\bin\gdal\csharp;%CD%\ms_6.1-dev\bin\ms\csharp;%CD%\ms_6.1-dev\bin\curl;%CD%\ms_6.1-dev\bin\ms\java;%PATH% stephan@278: SET GDAL_DATA=%CD%\ms_6.1-dev\bin\gdal-data stephan@278: SET GDAL_DRIVER_PATH=%CD%\ms_6.1-dev\bin\gdal\plugins stephan@278: SET PYTHONPATH=%CD%\ms_6.1-dev\bin\gdal\python\osgeo stephan@278: SET PROJ_LIB=%CD%\bin\proj\SHARE stephan@278: SET CURL_CA_BUNDLE=C:\ms4w\Apache\conf\ca-bundle\cacert.pem stephan@278: SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_26 stephan@278: stephan@278: java -jar mxd2map.jar -m example\example.mxd -t example\template.map -a "%HOMEDRIVE%%HOMEPATH%\MXD2map\example\output.map" stephan@278: stephan@278: :exit