From 2ebc5f097b1a5fbbe276250ad1d13966510d1291 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Wed, 16 Nov 2022 12:39:52 -0800 Subject: [PATCH] Change `simulate` plugin directory name to `mujoco_plugin`. This helps distro packagers avoid having to create a directory with the generic `plugin` name in system locations. Context: https://github.com/deepmind/mujoco/issues/552 PiperOrigin-RevId: 489011386 Change-Id: Ie9f1748cbb4f2b9dc8c328064caaeb50c88fdec3 --- .github/workflows/build.yml | 10 +++++----- doc/changelog.rst | 6 ++++++ simulate/main.cc | 4 +++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3b61346..d261c110 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,13 +149,13 @@ jobs: - name: Copy plugins (POSIX) if: ${{ runner.os != 'Windows' }} working-directory: build - run: mkdir -p ${{ matrix.tmpdir }}/mujoco_install/plugin && - cp lib/libelasticity.* ${{ matrix.tmpdir }}/mujoco_install/plugin + run: mkdir -p ${{ matrix.tmpdir }}/mujoco_install/mujoco_plugin && + cp lib/libelasticity.* ${{ matrix.tmpdir }}/mujoco_install/mujoco_plugin - name: Copy plugins (Windows) if: ${{ runner.os == 'Windows' }} working-directory: build - run: mkdir -p ${{ matrix.tmpdir }}/mujoco_install/plugin && - cp bin/Release/elasticity.dll ${{ matrix.tmpdir }}/mujoco_install/plugin + run: mkdir -p ${{ matrix.tmpdir }}/mujoco_install/mujoco_plugin && + cp bin/Release/elasticity.dll ${{ matrix.tmpdir }}/mujoco_install/mujoco_plugin - name: Configure samples working-directory: sample run: > @@ -193,7 +193,7 @@ jobs: run: > source ${{ matrix.tmpdir }}/venv/bin/activate && MUJOCO_PATH="${{ matrix.tmpdir }}/mujoco_install" - MUJOCO_PLUGIN_PATH="${{ matrix.tmpdir }}/mujoco_install/plugin" + MUJOCO_PLUGIN_PATH="${{ matrix.tmpdir }}/mujoco_install/mujoco_plugin" MUJOCO_CMAKE_ARGS="-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF ${{ matrix.cmake_args }}" pip wheel -v --no-deps mujoco-*.tar.gz - name: Install Python bindings diff --git a/doc/changelog.rst b/doc/changelog.rst index a975b320..0c2bfddd 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -51,6 +51,12 @@ General - 50% faster ``mju_dotSparse`` using manual loop unroll. See `engine_util_sparse_benchmark_test `_. +Simulate +^^^^^^^^ + +- Renamed the directory in which the ``simulate`` application searches for plugins from ``plugin`` to ``mujoco_plugin``. + + Version 2.3.0 (October 18, 2022) -------------------------------- diff --git a/simulate/main.cc b/simulate/main.cc index 6b908bc1..1d4e5f52 100644 --- a/simulate/main.cc +++ b/simulate/main.cc @@ -30,6 +30,8 @@ #include "simulate.h" #include "array_safety.h" +#define MUJOCO_PLUGIN_DIR "mujoco_plugin" + extern "C" { #if defined(_WIN32) || defined(__CYGWIN__) #include @@ -224,7 +226,7 @@ std::vector scanPluginLibraries() { return dso_handles; } - const std::string plugin_dir = getExecutableDir() + sep + "plugin"; + const std::string plugin_dir = getExecutableDir() + sep + MUJOCO_PLUGIN_DIR; #if defined(_WIN32) || defined(__CYGWIN__) WIN32_FIND_DATAA find_data;