Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add activation scripts to workaround problem in relocatability #27

Merged
merged 1 commit into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipe/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
set IGN_RENDERING_PLUGIN_PATH=%CONDA_PREFIX%\Library\lib\ign-rendering-6\engine-plugins
set OGRE_RESOURCE_PATH=%CONDA_PREFIX%\Library\bin
set IGN_RENDERING_RESOURCE_PATH=%CONDA_PREFIX%\Library\share\ignition\ignition-rendering6
2 changes: 2 additions & 0 deletions recipe/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export OGRE_RESOURCE_PATH=$CONDA_PREFIX/lib/OGRE
export IGN_RENDERING_RESOURCE_PATH=$CONDA_PREFIX/share/ignition/ignition-rendering6
9 changes: 9 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ if errorlevel 1 exit 1
:: set RENDER_ENGINE_VALUES=ogre
:: ctest --output-on-failure -C Release -E "INTEGRATION|PERFORMANCE|REGRESSION|UNIT_RenderingIface_TEST|check_"
:: if errorlevel 1 exit 1

setlocal EnableDelayedExpansion
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
:: This will allow them to be run on environment activation.
for %%F in (activate deactivate) DO (
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
if %errorlevel% neq 0 exit /b %errorlevel%
)
8 changes: 8 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ cmake --build . --config Release --target install
# export RENDER_ENGINE_VALUES=ogre
# ctest --extra-verbose --output-on-failure -C Release -E "INTEGRATION|PERFORMANCE|REGRESSION|UNIT_RenderingIface_TEST|check_UNIT_RenderingIface_TEST|UNIT_Heightmap_TEST"
# fi

# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done
3 changes: 3 additions & 0 deletions recipe/deactivate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@set IGN_RENDERING_PLUGIN_PATH=
@set OGRE_RESOURCE_PATH=
@set IGN_RENDERING_RESOURCE_PATH=
2 changes: 2 additions & 0 deletions recipe/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unset OGRE_RESOURCE_PATH
unset IGN_RENDERING_RESOURCE_PATH
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source:
- 454.patch

build:
number: 0
number: 1
run_exports:
- {{ pin_subpackage(name, max_pin='x') }}

Expand Down