Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
buildsystem/SDKShell.bat
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (29 sloc)
1.37 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set SDK_ROOT=%~dp0 | |
set SDK_ROOT=%SDK_ROOT:\\=\% | |
echo %SDK_ROOT% | |
if "%1" == "setenv" goto setenv | |
%comspec% /k "%SDK_ROOT%SDKShell.bat" setenv %1 | |
goto exit | |
:setenv | |
@echo Setting environment for using the GDAL and MapServer tools. | |
if "%2"=="hideoci" goto hideoci | |
set ocipath=0 | |
set _path="%PATH:;=" "%" | |
for %%p in (%_path%) do if not "%%~p"=="" if exist %%~p\oci.dll set ocipath=1 | |
if "%ocipath%"=="0" goto hideoci | |
@echo WARNING: If you encounter problems with missing oci libraries then type: | |
@echo SDKShell hideoci | |
goto setenv2 | |
:hideoci | |
@echo Hiding the OCI plugin library. | |
if not exist "%SDK_ROOT%bin\gdal\plugins-optional" mkdir "%SDK_ROOT%bin\gdal\plugins-optional" | |
if exist "%SDK_ROOT%bin\gdal\plugins\ogr_OCI.dll" move "%SDK_ROOT%bin\gdal\plugins\ogr_OCI.dll" "%SDK_ROOT%bin\gdal\plugins-optional\ogr_OCI.dll" | |
if exist "%SDK_ROOT%bin\gdal\plugins\gdal_GEOR.dll" move "%SDK_ROOT%bin\gdal\plugins\gdal_GEOR.dll" "%SDK_ROOT%bin\gdal\plugins-optional\gdal_GEOR.dll" | |
:setenv2 | |
SET "PATH=%SDK_ROOT%bin;%SDK_ROOT%bin\gdal\python\osgeo;%SDK_ROOT%bin\proj6\apps;%SDK_ROOT%bin\gdal\apps;%SDK_ROOT%bin\ms\apps;%SDK_ROOT%bin\gdal\csharp;%SDK_ROOT%bin\ms\csharp;%SDK_ROOT%bin\curl;%PATH%" | |
SET "GDAL_DATA=%SDK_ROOT%bin\gdal-data" | |
SET "GDAL_DRIVER_PATH=%SDK_ROOT%bin\gdal\plugins" | |
SET "PYTHONPATH=%SDK_ROOT%bin\gdal\python;%SDK_ROOT%bin\ms\python" | |
SET "PROJ_LIB=%SDK_ROOT%bin\proj6\SHARE" | |
:exit |