From 711e900f5e4a717fc2eac4da4d2d3b8f29f1ab1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81drik=20Fuoco?= Date: Fri, 23 May 2025 10:27:00 -0400 Subject: [PATCH 1/2] fix wrapper conflicts for qt6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- packages/rv/rv.install_handler_linux | 124 +++++++-------- packages/rv/rv.install_handler_linux_rvpush | 126 +++++++-------- src/bin/apps/rv/bob.wrapper | 33 ++++ src/bin/apps/rv/rv.wrapper | 150 +++++++----------- src/bin/apps/rvpkg/rvpkg.wrapper | 84 +++++----- src/bin/apps/rvprof/rvprof.wrapper | 114 ++++++------- src/bin/apps/rvpush/rvpush.wrapper | 103 ++++++------ src/bin/apps/rvshell/rvshell.wrapper | 103 ++++++------ src/bin/gtotools/gtofilter/gtofilter.wrapper | 102 ++++++------ src/bin/gtotools/gtoimage/gtoimage.wrapper | 100 ++++++------ src/bin/gtotools/gtoinfo/gtoinfo.wrapper | 103 ++++++------ src/bin/gtotools/gtomerge/gtomerge.wrapper | 86 ++++++---- .../makeFBIOformats/makeFBIOformats.wrapper | 103 ++++++------ .../makeMovieIOformats.wrapper | 103 ++++++------ .../rmsImageDiff/rmsImageDiff.wrapper | 103 ++++++------ src/bin/imgtools/rvio/rvio.wrapper | 103 ++++++------ src/bin/imgtools/rvio_sw/rvio_sw.wrapper | 103 ++++++------ src/bin/imgtools/rvls/rvls.wrapper | 102 ++++++------ src/bin/mu/mu-interp/mu-interp.wrapper | 106 +++++++------ src/bin/python/py-interp/py-interp.wrapper | 114 +++++++------ 20 files changed, 1043 insertions(+), 1022 deletions(-) create mode 100755 src/bin/apps/rv/bob.wrapper diff --git a/packages/rv/rv.install_handler_linux b/packages/rv/rv.install_handler_linux index 3af343351..00f533305 100755 --- a/packages/rv/rv.install_handler_linux +++ b/packages/rv/rv.install_handler_linux @@ -1,65 +1,58 @@ -#!/bin/tcsh -f -# +#!/bin/sh + # -# This script attempts to register RV as the protocol hander for -# links that look like rvlink://blah. +# This script attempts to register RV as the protocol hander for +# links that look like rvlink://blah. # -# It should be sufficient for gnome apps like pidgin and kde apps -# like konqueror. Firefox seems to pay attention to the gnome -# settings at least to the degree that it recognizes links of the -# form rvlink://blah as hot-links, but it may still ask you to -# select the application the first time you click on one. +# It should be sufficient for gnome apps like pidgin and kde apps +# like konqueror. Firefox seems to pay attention to the gnome +# settings at least to the degree that it recognizes links of the +# form rvlink://blah as hot-links, but it may still ask you to +# select the application the first time you click on one. # -# We (tweak) are not expert on this stuff, so if you have ideas -# about how to do this better or more completely, please let us -# know ! (support@tweakadmin.com) +# We (tweak) are not expert on this stuff, so if you have ideas +# about how to do this better or more completely, please let us +# know ! (support@tweakadmin.com) # -if (! $?RV_HOME) then - pushd `dirname $0` >& /dev/null - setenv RV_HOME `dirname ${cwd}` - popd >& /dev/null -endif +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -set rv = "$RV_HOME/bin/rv" +export rv="$RV_HOME/bin/rv" -# -# Gnome: register rv as rvlink protocol handler -# echo "Installing rvlink protocol handler for Gnome." -set gconfTool = "`which gconftool-2`" - -if ($status == 0) then +if which gconftool-2; then gconftool-2 --set --type=string /desktop/gnome/url-handlers/rvlink/command $rv' "%s"' gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/enabled true gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/need-terminal false else echo "WARNING: gconftool-2 not found: skipping gnome url-handler registration." -endif +fi -# -# KDE: register rv as rvlink protocol handler -# If you want to install this system wide copy the rvlink.protocol file to /usr/share/kde4/services/ -# +# If you want to install this system wide copy the rvlink.protocol file to /usr/share/kde4/services/ echo "Installing rvlink protocol handler for KDE." -set kdeProtoDir = ~/.kde/share/services -if ( -e ~/.kde4/share/services ) then - set kdeProtoDir = ~/.kde4/share/services -endif -if (${?KDEDIR}) then - set kdeProtoDir = ${KDEDIR}/share/services -endif +kdeProtoDir="$HOME/.kde/share/services" +if [ -e "$HOME/.kde4/share/services" ]; then + kdeProtoDir="$HOME/.kde4/share/services" +fi +if [ -n "$KDEDIR" ]; then + kdeProtoDir="$KDEDIR/share/services" +fi -if ( ! -e $kdeProtoDir) then - mkdir -p $kdeProtoDir -endif +if [ ! -e "$kdeProtoDir" ]; then + mkdir -p "$kdeProtoDir" +fi -if ( -e $kdeProtoDir) then - set kdeProtoFile = $kdeProtoDir/rvlink.protocol - rm -f $kdeProtoFile - cat > $kdeProtoFile << EOF +if [ -e "$kdeProtoDir" ]; then + kdeProtoFile="$kdeProtoDir/rvlink.protocol" + rm -f "$kdeProtoFile" + cat > "$kdeProtoFile" << EOF [Protocol] exec=$rv "%u" protocol=rvlink @@ -72,30 +65,25 @@ writing=false makedir=false deleting=false EOF - echo "Successfully created ${kdeProtoFile}" + echo "Successfully created $kdeProtoFile" else - echo "WARNING: can't find or create KDE protocol directory: ${kdeProtoDir}: skipping KDE url-handler registration." -endif + echo "WARNING: Can't find or create KDE protocol directory: $kdeProtoDir. Skipping KDE url-handler registration." +fi -# -# Gnome part 2 for xdg/Chrome: register rv as rvlink protocol handler -# If you want to install this system wide run the desktop-file-install as sudo/root -# and remove the --dir= bit. -# +# If you want to install this system wide run the desktop-file-install as sudo/root +# and remove the --dir= bit. echo "Installing rvlink protocol handler for XDG" -set desktopInstall = "`which desktop-file-install`" - -if ($status == 0) then - set xdgDir = $HOME/.local/share/applications - if ( ! -e $xdgDir ) then - mkdir -p $xdgDir - endif +if which desktop-file-install; then + xdgDir=$HOME/.local/share/applications + if [ ! -e "$xdgDir" ]; then + mkdir -p "$xdgDir" + fi - if ( -e $xdgDir) then - set xdgFile = $xdgDir/rv.desktop - rm -f $xdgFile - cat > $xdgFile << EOF + if [ ! -e "$xdgDir" ]; then + xdgFile="$xdgDir/rv.desktop" + rm -f "$xdgFile" + cat > "$xdgFile" << EOF [Desktop Entry] Name=RVLink Type=Application @@ -105,14 +93,14 @@ Categories=AudioVideo;Viewer;Player; MimeType=x-scheme-handler/rvlink; NoDisplay=true EOF - echo "Successfully created ${xdgFile}" + echo "Successfully created $xdgFile" else - echo "WARNING: can't find or create XDG directory: ${xdgDir}: skipping XDG url-handler registration." - endif + echo "WARNING: Can't find or create XDG directory: $xdgDir. Skipping XDG url-handler registration." + fi - desktop-file-install $xdgFile --rebuild-mime-info-cache --dir=$xdgDir + desktop-file-install "$xdgFile" --rebuild-mime-info-cache --dir="$xdgDir" else - echo "WARNING: desktop-file-install not found: skipping xdg-handler registration." -endif + echo "WARNING: desktop-file-install not found: Skipping xdg-handler registration." +fi echo "Done." diff --git a/packages/rv/rv.install_handler_linux_rvpush b/packages/rv/rv.install_handler_linux_rvpush index f8a23aa0d..e177605b0 100755 --- a/packages/rv/rv.install_handler_linux_rvpush +++ b/packages/rv/rv.install_handler_linux_rvpush @@ -1,65 +1,58 @@ -#!/bin/tcsh -f -# +#!/bin/sh + # -# This script attempts to register RV as the protocol hander for -# links that look like rvlink://blah. +# This script attempts to register RV as the protocol hander for +# links that look like rvlink://blah. # -# It should be sufficient for gnome apps like pidgin and kde apps -# like konqueror. Firefox seems to pay attention to the gnome -# settings at least to the degree that it recognizes links of the -# form rvlink://blah as hot-links, but it may still ask you to -# select the application the first time you click on one. +# It should be sufficient for gnome apps like pidgin and kde apps +# like konqueror. Firefox seems to pay attention to the gnome +# settings at least to the degree that it recognizes links of the +# form rvlink://blah as hot-links, but it may still ask you to +# select the application the first time you click on one. # -# We (tweak) are not expert on this stuff, so if you have ideas -# about how to do this better or more completely, please let us -# know ! (support@tweakadmin.com) +# We (tweak) are not expert on this stuff, so if you have ideas +# about how to do this better or more completely, please let us +# know ! (support@tweakadmin.com) # -if (! $?RV_HOME) then - pushd `dirname $0` >& /dev/null - setenv RV_HOME `dirname ${cwd}` - popd >& /dev/null -endif +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -set rvpush = "$RV_HOME/bin/rvpush" +export rvpush="$RV_HOME/bin/rvpush" -# -# Gnome: register rv as rvlink protocol handler -# echo "Installing rvlink protocol handler for Gnome." -set gconfTool = "`which gconftool-2`" - -if ($status == 0) then - gconftool-2 --set --type=string /desktop/gnome/url-handlers/rvlink/command $rvpush' -tag rvlink url "%s"' +if which gconftool-2; then + gconftool-2 --set --type=string /desktop/gnome/url-handlers/rvlink/command $rv' "%s"' gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/enabled true gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/need-terminal false else echo "WARNING: gconftool-2 not found: skipping gnome url-handler registration." -endif +fi -# -# KDE: register rv as rvlink protocol handler -# If you want to install this system wide copy the rvlink.protocol file to /usr/share/kde4/services/ -# +# If you want to install this system wide copy the rvlink.protocol file to /usr/share/kde4/services/ echo "Installing rvlink protocol handler for KDE." -set kdeProtoDir = ~/.kde/share/services -if ( -e ~/.kde4/share/services ) then - set kdeProtoDir = ~/.kde4/share/services -endif -if (${?KDEDIR}) then - set kdeProtoDir = ${KDEDIR}/share/services -endif +kdeProtoDir="$HOME/.kde/share/services" +if [ -e "$HOME/.kde4/share/services" ]; then + kdeProtoDir="$HOME/.kde4/share/services" +fi +if [ -n "$KDEDIR" ]; then + kdeProtoDir="$KDEDIR/share/services" +fi -if ( ! -e $kdeProtoDir) then - mkdir -p $kdeProtoDir -endif +if [ ! -e "$kdeProtoDir" ]; then + mkdir -p "$kdeProtoDir" +fi -if ( -e $kdeProtoDir) then - set kdeProtoFile = $kdeProtoDir/rvlink.protocol - rm -f $kdeProtoFile - cat > $kdeProtoFile << EOF +if [ -e "$kdeProtoDir" ]; then + kdeProtoFile="$kdeProtoDir/rvlink.protocol" + rm -f "$kdeProtoFile" + cat > "$kdeProtoFile" << EOF [Protocol] exec=$rvpush -tag rvlink url "%u" protocol=rvlink @@ -72,30 +65,25 @@ writing=false makedir=false deleting=false EOF - echo "Successfully created ${kdeProtoFile}" + echo "Successfully created $kdeProtoFile" else - echo "WARNING: can't find or create KDE protocol directory: ${kdeProtoDir}: skipping KDE url-handler registration." -endif + echo "WARNING: Can't find or create KDE protocol directory: $kdeProtoDir. Skipping KDE url-handler registration." +fi -# -# Gnome part 2 for xdg/Chrome: register rv as rvlink protocol handler -# If you want to install this system wide run the desktop-file-install as sudo/root -# and remove the --dir= bit. -# +# If you want to install this system wide run the desktop-file-install as sudo/root +# and remove the --dir= bit. echo "Installing rvlink protocol handler for XDG" -set desktopInstall = "`which desktop-file-install`" - -if ($status == 0) then - set xdgDir = $HOME/.local/share/applications - if ( ! -e $xdgDir ) then - mkdir -p $xdgDir - endif +if which desktop-file-install; then + xdgDir=$HOME/.local/share/applications + if [ ! -e "$xdgDir" ]; then + mkdir -p "$xdgDir" + fi - if ( -e $xdgDir) then - set xdgFile = $xdgDir/rv.desktop - rm -f $xdgFile - cat > $xdgFile << EOF + if [ ! -e "$xdgDir" ]; then + xdgFile="$xdgDir/rv.desktop" + rm -f "$xdgFile" + cat > "$xdgFile" << EOF [Desktop Entry] Name=RVLink Type=Application @@ -105,14 +93,14 @@ Categories=AudioVideo;Viewer;Player; MimeType=x-scheme-handler/rvlink; NoDisplay=true EOF - echo "Successfully created ${xdgFile}" + echo "Successfully created $xdgFile" else - echo "WARNING: can't find or create XDG directory: ${xdgDir}: skipping XDG url-handler registration." - endif + echo "WARNING: Can't find or create XDG directory: $xdgDir. Skipping XDG url-handler registration." + fi - desktop-file-install $xdgFile --rebuild-mime-info-cache --dir=$xdgDir + desktop-file-install "$xdgFile" --rebuild-mime-info-cache --dir="$xdgDir" else - echo "WARNING: desktop-file-install not found: skipping xdg-handler registration." -endif + echo "WARNING: desktop-file-install not found: Skipping xdg-handler registration." +fi echo "Done." diff --git a/src/bin/apps/rv/bob.wrapper b/src/bin/apps/rv/bob.wrapper new file mode 100755 index 000000000..5debd08b4 --- /dev/null +++ b/src/bin/apps/rv/bob.wrapper @@ -0,0 +1,33 @@ +#!/bin/sh + +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) + +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 + +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 +else + is_python_vfx2023=1 +fi + +is_python_vfx2023=1 +echo $is_python_vfx2023 +echo $is_python_vfx2024 + +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + echo "here" + echo $required_openssl_found + fi + + if [ -z "$required_openssl_found" ]; then + LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + echo "here2" + echo $LD_LIBRARY_PATH + fi +fi \ No newline at end of file diff --git a/src/bin/apps/rv/rv.wrapper b/src/bin/apps/rv/rv.wrapper index 340fc88e4..494429ca2 100644 --- a/src/bin/apps/rv/rv.wrapper +++ b/src/bin/apps/rv/rv.wrapper @@ -1,114 +1,80 @@ -#!/bin/tcsh -f +#!/bin/sh -# -# Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# +# Uncomment this if you want to use the pulseaudio/libsndfile package mismatch +# workaround below. +# export RV_USE_PULSEAUDIO_WORKAROUND=1 -# -# This script sets the RV_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. -# -# NOTE: doesn't properly set RV_HOME if invoked from a link to the script -# and RV_HOME is not already set -# - -set noglob - -# -# Uncomment this if you want to use the pulseaudio/libsndfile package mismatch -# workaround below. -# -#setenv RV_USE_PULSEAUDIO_WORKAROUND 1 - -# -# Workaround for pulseaudio/libsndfile package mismatch on FC/Cent that causes -# crash when accessing preferences. -# -if ((-e /usr/bin/padsp) && $?RV_USE_PULSEAUDIO_WORKAROUND) then - setenv OPTIONAL_PADSP /usr/bin/padsp -else - setenv OPTIONAL_PADSP "" -endif +# Workaround for pulseaudio/libsndfile package mismatch on FC/Cent that causes +# crash when accessing preferences. +if [ -e /usr/bin/padsp ] && [ -n "$RV_USE_PULSEAUDIO_WORKAROUND" ]; then + export OPTIONAL_PADSP="/usr/bin/padsp" +else + export OPTIONAL_PADSP="" +fi -if ($?QT_PLUGIN_PATH) then +if [ -n "$QT_PLUGIN_PATH" ]; then echo "INFO: warning: QT_PLUGIN_PATH is set, which can cause RV to load the wrong Qt libraries/plugins. Unsetting..." - unsetenv QT_PLUGIN_PATH -endif + unset QT_PLUGIN_PATH +fi -# -# Uncomment this if you're on an older linux distro and RV is hanging in -# the Audio preferences or on startup with audio sources -# -#setenv PA_ALSA_EXCLUDE_DMIX_DEFAULT 1 +# Uncomment this if you're on an older linux distro and RV is hanging in +# the Audio preferences or on startup with audio sources +# export PA_ALSA_EXCLUDE_DMIX_DEFAULT=1 -# -# For unknown reasons, LANG causes problems when set to -# interesting values (like fr_FR.UTF-8). -# -unsetenv LANG +# For unknown reasons, LANG causes problems when set to +# interesting values (like fr_FR.UTF-8). +unset LANG -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +if [ -z "$RV_HOME" ]; then + current_dir=$(dirname "$(readlink -f "$0")" ) + root_dir=$(dirname "$current_dir" ) + export RV_HOME="$root_dir" +fi -set platform = i386 -set rvbin = "$RV_HOME/bin/rv.bin.$platform" +rvbin="$RV_HOME/bin/rv.bin.i386" +if [ ! -e "$rvbin" ]; then + rvbin="$RV_HOME/bin/rv.bin" +fi -if (! (-e $rvbin) ) then - set rvbin = "$RV_HOME/bin/rv.bin" -endif +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" - -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi # exec RV - - -if ("x$1" == "x") then - # No parameter supplied, just execute app - exec $OPTIONAL_PADSP $rvbin $*:q +if [ "$1" = "-d" ] || [ "$1" = "--debug" ]; then + shift # skip '-d / --debug' + gdb "${OPTIONAL_PADSP}${rvbin}" "$@" else - if ( "$1" == "-d" || "$1" == "--debug") then - shift # skip '-d / --debug' - gdb $OPTIONAL_PADSP $rvbin $*:q - else - exec $OPTIONAL_PADSP $rvbin $*:q - endif -endif + exec "${OPTIONAL_PADSP}${rvbin}" "$@" +fi diff --git a/src/bin/apps/rvpkg/rvpkg.wrapper b/src/bin/apps/rvpkg/rvpkg.wrapper index 7ade453e6..ab178bce2 100644 --- a/src/bin/apps/rvpkg/rvpkg.wrapper +++ b/src/bin/apps/rvpkg/rvpkg.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,48 +7,53 @@ # # -# This script sets the RV_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set RV_HOME if invoked from a link to the script -# and RV_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob +set -o noglob -# -# Uncomment this if you're on an older linux distro and RV is hanging in -# the Audio preferences or on startup with audio sources -# -#setenv PA_ALSA_EXCLUDE_DMIX_DEFAULT 1 +# Uncomment this if you're on an older linux distro and RV is hanging in +# the Audio preferences or on startup with audio sources +# export PA_ALSA_EXCLUDE_DMIX_DEFAULT=1 -# -# For unknown reasons, LANG causes problems when set to -# interesting values (like fr_FR.UTF-8). -# -unsetenv LANG +# For unknown reasons, LANG causes problems when set to +# interesting values (like fr_FR.UTF-8). +unset LANG -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -set platform = i386 -set rvpkgbin = "$RV_HOME/bin/rvpkg.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $rvpkgbin) ) then - set rvpkgbin = "$RV_HOME/bin/rvpkg.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi + +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi # Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` @@ -65,6 +70,7 @@ endif # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. +<<<<<<< HEAD # if (! $?RV_USE_SYSTEM_OPENSSL) then set required_openssl_found = "" @@ -76,7 +82,13 @@ if (! $?RV_USE_SYSTEM_OPENSSL) then setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" endif endif - -# exec RV - -exec $rvpkgbin $*:q +======= +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi +>>>>>>> pr/rockylinux8 + +exec "$bin" "$@" diff --git a/src/bin/apps/rvprof/rvprof.wrapper b/src/bin/apps/rvprof/rvprof.wrapper index 53d7c326e..f04d084b4 100644 --- a/src/bin/apps/rvprof/rvprof.wrapper +++ b/src/bin/apps/rvprof/rvprof.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,76 +7,78 @@ # # -# This script sets the RV_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set RV_HOME if invoked from a link to the script -# and RV_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob +set -o noglob -# -# Uncomment this if you're on an older linux distro and RV is hanging in -# the Audio preferences or on startup with audio sources -# -#setenv PA_ALSA_EXCLUDE_DMIX_DEFAULT 1 +# Uncomment this if you're on an older linux distro and RV is hanging in +# the Audio preferences or on startup with audio sources +# export PA_ALSA_EXCLUDE_DMIX_DEFAULT=1 -# -# For unknown reasons, LANG causes problems when set to -# interesting values (like fr_FR.UTF-8). -# -unsetenv LANG +# For unknown reasons, LANG causes problems when set to +# interesting values (like fr_FR.UTF-8). +unset LANG + +name=$(basename "$0") -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -set platform = i386 -set pvbin = "$RV_HOME/bin/rvprof.bin.$platform" +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $pvbin) ) then - set pvbin = "$RV_HOME/bin/rvprof.bin" -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec bin - -exec $pvbin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/apps/rvpush/rvpush.wrapper b/src/bin/apps/rvpush/rvpush.wrapper index c6b51a31c..f0978b604 100755 --- a/src/bin/apps/rvpush/rvpush.wrapper +++ b/src/bin/apps/rvpush/rvpush.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rvpush +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/apps/rvshell/rvshell.wrapper b/src/bin/apps/rvshell/rvshell.wrapper index 0fd334620..f0978b604 100755 --- a/src/bin/apps/rvshell/rvshell.wrapper +++ b/src/bin/apps/rvshell/rvshell.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rvshell +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtofilter/gtofilter.wrapper b/src/bin/gtotools/gtofilter/gtofilter.wrapper index 2215bf779..f0978b604 100755 --- a/src/bin/gtotools/gtofilter/gtofilter.wrapper +++ b/src/bin/gtotools/gtofilter/gtofilter.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,72 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # +set -o noglob -set noglob -set name = gtofilter +name=$(basename "$0") -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtoimage/gtoimage.wrapper b/src/bin/gtotools/gtoimage/gtoimage.wrapper index b497d5f9b..f83bf8e8e 100755 --- a/src/bin/gtotools/gtoimage/gtoimage.wrapper +++ b/src/bin/gtotools/gtoimage/gtoimage.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,71 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = gtoimage +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi -# exec binary + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi -exec $bin $*:q +# exec binary +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper index 3628880bc..f0978b604 100755 --- a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper +++ b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = gtoinfo +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtomerge/gtomerge.wrapper b/src/bin/gtotools/gtomerge/gtomerge.wrapper index f68fb895b..f0978b604 100755 --- a/src/bin/gtotools/gtomerge/gtomerge.wrapper +++ b/src/bin/gtotools/gtomerge/gtomerge.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,44 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = gtomerge +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" +else + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi + +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) + +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 + +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + is_python_vfx2023=1 +fi + +# Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the +# OpenSSL provided with RV when the required OpenSSL version cannot be found. +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi -# exec binary + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi -exec $bin $*:q +exec "$bin" "$@" diff --git a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper index e444d1066..f0978b604 100755 --- a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper +++ b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = makeFBIOformats +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper index 56ce42a40..f0978b604 100755 --- a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper +++ b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = makeMovieIOformats +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper index f32ef0597..f0978b604 100755 --- a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper +++ b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rmsImageDiff +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvio/rvio.wrapper b/src/bin/imgtools/rvio/rvio.wrapper index b636228ea..f0978b604 100755 --- a/src/bin/imgtools/rvio/rvio.wrapper +++ b/src/bin/imgtools/rvio/rvio.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rvio +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -#echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper index fa5d0f17c..f0978b604 100755 --- a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper +++ b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,71 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rvio_sw +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -#echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvls/rvls.wrapper b/src/bin/imgtools/rvls/rvls.wrapper index 32480e771..f0978b604 100755 --- a/src/bin/imgtools/rvls/rvls.wrapper +++ b/src/bin/imgtools/rvls/rvls.wrapper @@ -1,4 +1,4 @@ -#!/bin/tcsh -f +#!/bin/sh # # Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. @@ -7,70 +7,70 @@ # # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -set noglob -set name = rvls +set -o noglob -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +name=$(basename "$0") -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec binary - -exec $bin $*:q +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi + +exec "$bin" "$@" diff --git a/src/bin/mu/mu-interp/mu-interp.wrapper b/src/bin/mu/mu-interp/mu-interp.wrapper index 997857a86..f0978b604 100755 --- a/src/bin/mu/mu-interp/mu-interp.wrapper +++ b/src/bin/mu/mu-interp/mu-interp.wrapper @@ -1,70 +1,76 @@ -#!/bin/tcsh -f +#!/bin/sh + # -# This script sets the APP_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. # -# NOTE: doesn't properly set APP_HOME if invoked from a link to the script -# and APP_HOME is not already set +# SPDX-License-Identifier: Apache-2.0 # -set noglob -set name = mu-interp +# +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. +# +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set +# -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +set -o noglob -echo RV_HOME = $RV_HOME -set platform = i386 -set bin = "$RV_HOME/bin/$name.bin.$platform" +name=$(basename "$0") -if (! (-e $bin) ) then - set bin = "$RV_HOME/bin/$name.bin" -endif +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $bin) ) then - echo "ERROR: binary " $bin " not found" - exit(-1) -endif +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" -unsetenv BUILD_ROOT -setenv PATH "$RV_HOME/bin:${PATH}" +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi + +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi -# exec binary + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi -exec $bin $*:q +exec "$bin" "$@" diff --git a/src/bin/python/py-interp/py-interp.wrapper b/src/bin/python/py-interp/py-interp.wrapper index 6dd1d6586..f04d084b4 100644 --- a/src/bin/python/py-interp/py-interp.wrapper +++ b/src/bin/python/py-interp/py-interp.wrapper @@ -1,74 +1,84 @@ -#!/bin/tcsh -f +#!/bin/sh + # -# This script sets the RV_HOME environment (if not already set), -# makes sure the plugins are the path and launches the actual binary. +# Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. # -# NOTE: doesn't properly set RV_HOME if invoked from a link to the script -# and RV_HOME is not already set +# SPDX-License-Identifier: Apache-2.0 # -set noglob - # -# Uncomment this if you're on an older linux distro and RV is hanging in -# the Audio preferences or on startup with audio sources +# This script sets the APP_HOME environment (if not already set), +# makes sure the plugins are the path and launches the actual binary. # -#setenv PA_ALSA_EXCLUDE_DMIX_DEFAULT 1 - +# NOTE: doesn't properly set APP_HOME if invoked from a link to the script +# and APP_HOME is not already set # -# For unknown reasons, LANG causes problems when set to -# interesting values (like fr_FR.UTF-8). -# -unsetenv LANG -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +set -o noglob + +# Uncomment this if you're on an older linux distro and RV is hanging in +# the Audio preferences or on startup with audio sources +# export PA_ALSA_EXCLUDE_DMIX_DEFAULT=1 -set platform = i386 -set pyinterpbin = "$RV_HOME/bin/py-interp.bin.$platform" +# For unknown reasons, LANG causes problems when set to +# interesting values (like fr_FR.UTF-8). +unset LANG -if (! (-e $pyinterpbin) ) then - set pyinterpbin = "$RV_HOME/bin/py-interp.bin" -endif +name=$(basename "$0") -setenv PATH "$RV_HOME/bin:${PATH}" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if ($?LD_LIBRARY_PATH) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib:$LD_LIBRARY_PATH" +echo "RV_HOME=$RV_HOME" +platform=i386 +bin="$RV_HOME/bin/$name.bin.$platform" + +if [ ! -e "$bin" ]; then + bin="$RV_HOME/bin/$name.bin" +fi + +if [ ! -e "$bin" ]; then + echo "ERROR: binary $bin not found" + exit 1 +fi + +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib:$LD_LIBRARY_PATH" else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif + export LD_LIBRARY_PATH="$RV_HOME/lib" +fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif +if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi -# exec RV + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi +fi -exec $pyinterpbin $*:q +exec "$bin" "$@" From f8bacb2aabdb012cd27fc40c0c5f11ec12a6ba5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81drik=20Fuoco?= Date: Fri, 23 May 2025 15:42:50 -0400 Subject: [PATCH 2/2] missing change for rvpkg.wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- src/bin/apps/rvpkg/rvpkg.wrapper | 44 ++++++++++++-------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/src/bin/apps/rvpkg/rvpkg.wrapper b/src/bin/apps/rvpkg/rvpkg.wrapper index ab178bce2..f04d084b4 100644 --- a/src/bin/apps/rvpkg/rvpkg.wrapper +++ b/src/bin/apps/rvpkg/rvpkg.wrapper @@ -55,40 +55,30 @@ else export LD_LIBRARY_PATH="$RV_HOME/lib" fi -# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL (3+). -set python_version = `$RV_HOME/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'` -set minor_version = `echo $python_version | cut -d. -f2` +# Detect if VFX2023 (OpenSSL 1.1.1) or VFX2024+ (OpenSSL 3+). +python_version=$("$RV_HOME/bin/python" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +minor_version=$(echo "$python_version" | cut -d. -f2) -set is_python_vfx2023 = 0 # VFX2023 Python 3.10 -set is_python_vfx2024 = 0 # VFX2024 Python 3.11 +is_python_vfx2023=0 # VFX2023 Python 3.10 +is_python_vfx2024=0 # VFX2024 Python 3.11 -if ($minor_version > 10) then - set is_python_vfx2024 = 1 +if [ "$minor_version" -gt 10 ]; then + is_python_vfx2024=1 else - set is_python_vfx2023 = 1 -endif + is_python_vfx2023=1 +fi # Unless the RV_USE_SYSTEM_OPENSSL environment variable is set, use the # OpenSSL provided with RV when the required OpenSSL version cannot be found. -<<<<<<< HEAD -# -if (! $?RV_USE_SYSTEM_OPENSSL) then - set required_openssl_found = "" - if ($is_python_vfx2023) then - set required_openssl_found = "`openssl version | grep 1.1.1`" - endif - - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif -======= if [ -z "$RV_USE_SYSTEM_OPENSSL" ]; then - required_openssl_found=$(openssl version | grep 1.1.1) - if [ -z "$required_openssl_found" ]; then - export LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - fi + required_openssl_found="" + if [ "$is_python_vfx2023" -eq 1 ]; then + required_openssl_found=$(openssl version | grep 1.1.1) + fi + + if [ -z "$required_openssl_found" ]; then + export LD_LIBRARY_PATH="$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" + fi fi ->>>>>>> pr/rockylinux8 exec "$bin" "$@"