diff --git a/CMakeLists.txt b/CMakeLists.txt index a313a3b741ed8459c37e2b2d07e6fd8dec559230..c451398229892005ee0ef5338ce56b52dcc15747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -447,6 +447,7 @@ if(WIN32) set(my_file_ext ".bat") install( PROGRAMS ${OTB_SOURCE_DIR}/Packaging/Files/otbenv.bat + ${OTB_SOURCE_DIR}/Packaging/Files/otbenv.ps1 ${OTB_SOURCE_DIR}/Packaging/Files/otbenv.bash DESTINATION . COMPONENT Core diff --git a/Packaging/Files/otbenv.ps1 b/Packaging/Files/otbenv.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..3ea6eaa32b0a28b5e7cfdd43221b3c9eda13b4f6 --- /dev/null +++ b/Packaging/Files/otbenv.ps1 @@ -0,0 +1,28 @@ +# +# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Setup environment for OTB package +$env:PATH+=";$PSScriptRoot\bin;$PSScriptRoot\lib" +$env:PYTHONPATH+=";$PSScriptRoot\lib\otb\python" +$env:OTB_APPLICATION_PATH+=";$PSScriptRoot\lib\otb\application" + +$env:GDAL_DATA="$PSScriptRoot\share\data" +$env:GDAL_DRIVER_PATH=disable +$env:PROJ_LIB="$PSScriptRoot\share\proj" +$env:LC_NUMERIC=C