diff --git a/README.md b/README.md index 7b02ad191..aa5f30d8a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Open RV is currently supported on the following operating systems: * [Linux Rocky 8](docs/build_system/config_linux_rocky8.md) * [Linux Rocky 9](docs/build_system/config_linux_rocky9.md) -Support for other operating systems is on a best effort basis. +Support for other [operating systems](docs/build_system) is on a best effort basis. ## Building RV diff --git a/docs/build_system/config_linux_rocky8.md b/docs/build_system/config_linux_rocky8.md index 7535dc155..8ba9982f0 100644 --- a/docs/build_system/config_linux_rocky8.md +++ b/docs/build_system/config_linux_rocky8.md @@ -25,7 +25,7 @@ Some of the build dependencies come from outside the main AppStream repo. So fir ```bash sudo dnf install epel-release sudo dnf config-manager --set-enabled powertools -sudo dnf install alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor mesa-libOSMesa mesa-libOSMesa-devel meson ninja-build openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers python3 python3-devel qt5-qtbase-devel readline-devel sqlite-devel systemd-devel tcl-devel tcsh tk-devel yasm zip zlib-devel +sudo dnf install alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor mesa-libOSMesa mesa-libOSMesa-devel meson ninja-build openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers python3 python3-devel qt5-qtbase-devel readline-devel sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel ``` You can disable the devel repo afterwards since dnf will warn about it: @@ -51,7 +51,7 @@ python3 -m pip install -r requirements.txt ## Install CMake -You need CMake version 3.27+ to build RV. The dnf-installable version is not quite recent enough, you'll need to build and install CMake from source. +You need CMake version 3.27+ to build RV. The dnf-installable version is not quite recent enough, you'll to build and install CMake from sources. ```bash wget https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3.tar.gz 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/rv.wrapper b/src/bin/apps/rv/rv.wrapper index be353ddff..1d6f6a305 100644 --- a/src/bin/apps/rv/rv.wrapper +++ b/src/bin/apps/rv/rv.wrapper @@ -1,97 +1,63 @@ -#!/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 # 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 = "`openssl version | grep 1.1.1`" - 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 +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 75fad2592..e76a0f685 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,59 +7,61 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec RV +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 -exec $rvpkgbin $*:q +exec "$bin" "$@" diff --git a/src/bin/apps/rvprof/rvprof.wrapper b/src/bin/apps/rvprof/rvprof.wrapper index f06d60269..e76a0f685 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,59 +7,61 @@ # # -# 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 pvbin = "$RV_HOME/bin/rvprof.bin.$platform" +if [ -z "$RV_HOME" ]; then + canonicalName=$(readlink -f "$0") + binName=$(dirname "$canonicalName") + homeName=$(dirname "$binName") + export RV_HOME="$homeName" +fi -if (! (-e $pvbin) ) then - set pvbin = "$RV_HOME/bin/rvprof.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 # 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 = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec bin +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 -exec $pvbin $*:q +exec "$bin" "$@" diff --git a/src/bin/apps/rvpush/rvpush.wrapper b/src/bin/apps/rvpush/rvpush.wrapper index 47aa7c412..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/apps/rvshell/rvshell.wrapper b/src/bin/apps/rvshell/rvshell.wrapper index 13087810e..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtofilter/gtofilter.wrapper b/src/bin/gtotools/gtofilter/gtofilter.wrapper index 2fb32fa8d..dede0e51f 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,55 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtoimage/gtoimage.wrapper b/src/bin/gtotools/gtoimage/gtoimage.wrapper index 6ba37306b..a2debc53c 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,54 +7,54 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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 +fi # exec binary - -exec $bin $*:q +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper index 6684c69d0..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/gtotools/gtomerge/gtomerge.wrapper b/src/bin/gtotools/gtomerge/gtomerge.wrapper index f68fb895b..dede0e51f 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,53 @@ # # -# 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" -else - setenv LD_LIBRARY_PATH "$RV_HOME/lib" -endif - -# exec binary +unset BUILD_ROOT +export PATH="$RV_HOME/bin:$PATH" -exec $bin $*:q +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 + +# 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper index 08a73ced0..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper index 3fce4909a..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper index 3b082f949..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvio/rvio.wrapper b/src/bin/imgtools/rvio/rvio.wrapper index 49fe9e90a..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper index 0fbc3d27c..dede0e51f 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,54 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/imgtools/rvls/rvls.wrapper b/src/bin/imgtools/rvls/rvls.wrapper index 6d5e33a87..dede0e51f 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,53 +7,53 @@ # # -# 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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/mu/mu-interp/mu-interp.wrapper b/src/bin/mu/mu-interp/mu-interp.wrapper index b98188da2..dede0e51f 100755 --- a/src/bin/mu/mu-interp/mu-interp.wrapper +++ b/src/bin/mu/mu-interp/mu-interp.wrapper @@ -1,53 +1,59 @@ -#!/bin/tcsh -f +#!/bin/sh + +# +# Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + # -# 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 = mu-interp +set -o noglob + +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 # 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 = "`openssl version | grep 1.1.1`" - 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=$(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 + +exec "$bin" "$@" diff --git a/src/bin/python/py-interp/py-interp.wrapper b/src/bin/python/py-interp/py-interp.wrapper index 23e26a7d8..e76a0f685 100644 --- a/src/bin/python/py-interp/py-interp.wrapper +++ b/src/bin/python/py-interp/py-interp.wrapper @@ -1,57 +1,67 @@ -#!/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 # 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 = "`openssl version | grep 1.1.1`" - if ( "$required_openssl_found" == "" ) then - setenv LD_LIBRARY_PATH "$RV_HOME/lib/OpenSSL:$LD_LIBRARY_PATH" - endif -endif - -# exec RV +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 -exec $pyinterpbin $*:q +exec "$bin" "$@"