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
This commit is contained in:
Saran Tunyasuvunakool
2022-11-16 12:39:52 -08:00
committed by Copybara-Service
parent 571b703f1c
commit 2ebc5f097b
3 changed files with 14 additions and 6 deletions
+5 -5
View File
@@ -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
+6
View File
@@ -51,6 +51,12 @@ General
- 50% faster ``mju_dotSparse`` using manual loop unroll. See `engine_util_sparse_benchmark_test
<https://github.com/deepmind/mujoco/tree/main/test/benchmark/engine_util_sparse_benchmark_test.cc>`_.
Simulate
^^^^^^^^
- Renamed the directory in which the ``simulate`` application searches for plugins from ``plugin`` to ``mujoco_plugin``.
Version 2.3.0 (October 18, 2022)
--------------------------------
+3 -1
View File
@@ -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 <windows.h>
@@ -224,7 +226,7 @@ std::vector<unique_dlhandle> 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;