fix(build): move gz_env.sh out of rootfs (#28977)

This commit is contained in:
Mathéo Taillandier authored and GitHub committed 2026-10-02 11:51:26 -06:00
1 parent e6db1b3a14
commit 03c32c66f6
3 files changed
+9 -8

No files matched your search

@@ -3,12 +3,13 @@
# Setup gz environment variables. This comes first because on macOS it
# also puts the gz from Tools/setup/macos/pixi.toml on PATH.
if [ -f ./gz_env.sh ]; then
. ./gz_env.sh
elif [ -f ../gz_env.sh ]; then
. ../gz_env.sh
fi
if [ -f ./gz_env.sh ]; then
. ./gz_env.sh
elif [ -f ../gz_env.sh ]; then
. ../gz_env.sh
elif [ -f ../../gz_env.sh ]; then
. ../../gz_env.sh
fi
# Enforce minimum gz version as Harmonic (gz-sim8)
MIN_GZ_VERSION="8.0.0"
+1 -1
View File
@@ -357,7 +357,7 @@ See [Simulation > Environment Configuration](../simulation/index.md#environment-
The PX4 Gazebo worlds and models databases [can be found on GitHub here](https://github.com/PX4/PX4-gazebo-models).
::: info
`gz_env.sh.in` is compiled and made available in `$PX4_DIR/build/px4_sitl_default/rootfs/gz_env.sh`
`gz_env.sh.in` is compiled and made available in `$PX4_DIR/build/px4_sitl_default/gz_env.sh`
:::
### Examples
@@ -140,7 +140,7 @@ if (gz-transport_FOUND)
# Setup the environment variables: PX4_GZ_MODELS, PX4_GZ_WORLDS, GZ_SIM_RESOURCE_PATH
# @ONLY disables ${VAR} substitution so that shell $VAR references in the
# template are passed through untouched.
configure_file(gz_env.sh.in ${PX4_BINARY_DIR}/rootfs/gz_env.sh @ONLY)
configure_file(gz_env.sh.in ${PX4_BINARY_DIR}/gz_env.sh @ONLY)
else()
# Fallback targets with helpful error messages when Gazebo deps are missing.