Skip to content

Commit

Permalink
Include a patch for versions below 2024.4
Browse files Browse the repository at this point in the history
This patch will add `/usr/lib64` to the LD_LIBRARY path if the C4D
version is below 2024.4.

Versions lower than this had an issue where `c4dplugin.xso64` required
libwebkit2gtk even in a headless `-nogui` mode.

This caused issues if the system libwebkit2gtk required a newer version
of libstdc++.so than Cinema 4D provided.

This apepars to have been fixed in Cinema 4D 2024.4 and the
c4dplugin.xso64 appears to no longer call out for libwebkit2gtk.
  • Loading branch information
Ahuge committed Jun 14, 2024
1 parent 6cc9206 commit e420e03
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/deadline/cinema4d_adaptor/Cinema4DAdaptor/adaptor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@ shift
ARGS="$@"
echo " Passed argument list: ${ARGS}"

C4DVERSION=""

if [[ "$C4DEXE" =~ [^/]*cinema4dr([0-9\.]+)[^/]* ]]
then
C4DVERSION="${BASH_REMATCH[1]}"
fi

C4DBASE=$(dirname "${C4DEXE}")
if [ -f "${C4DBASE}/setup_c4d_env" ]
then
cd $C4DBASE
echo "Sourcing setup_c4d_env from ${C4DBASE}/setup_c4d_env";
source "${C4DBASE}/setup_c4d_env";
# Hacky patch to allow for libwebkit2gtk to load if C4D provides a really old version of libstdc++.so
if (( $(echo "2024.4 > $C4DVERSION" |bc -l) )); then
echo "Cinema 4D version $C4DVERSION is less than 2024.4."
echo " Patching in libstdc++.so from system"
export LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
fi
else
echo "setup_c4d_env not found in ${C4DBASE}";
fi
Expand Down

0 comments on commit e420e03

Please sign in to comment.