From 5b6ea7abb5d8ba38a163db090ae758a9cabb7b5a Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Thu, 1 Feb 2024 17:07:18 -0800 Subject: [PATCH 1/6] docs: update Rocky Linux 8.7 docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From bf50b5d9e06d21c0eee94e39bdf95e3d89557435 Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Thu, 1 Feb 2024 17:07:40 -0800 Subject: [PATCH 2/6] feat: replace tcsh wrapper with sh --- src/bin/apps/rv/rv.wrapper | 127 ++++++++++++++----------------------- 1 file changed, 47 insertions(+), 80 deletions(-) diff --git a/src/bin/apps/rv/rv.wrapper b/src/bin/apps/rv/rv.wrapper index be353ddff..bf1c7709f 100644 --- a/src/bin/apps/rv/rv.wrapper +++ b/src/bin/apps/rv/rv.wrapper @@ -1,97 +1,64 @@ -#!/bin/tcsh -f +#!/bin/sh -# -# Copyright (C) 2022 Autodesk, Inc. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# -# 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 +# Uncomment this if you want to use the pulseaudio/libsndfile package mismatch +# workaround below. +# export 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 - -if (! $?RV_HOME) then - set canonicalName = "`readlink -f $0`" - set binName = "$canonicalName:h" - setenv RV_HOME "$binName:h" -endif +# For unknown reasons, LANG causes problems when set to +# interesting values (like fr_FR.UTF-8). +unset LANG -set platform = i386 -set rvbin = "$RV_HOME/bin/rv.bin.$platform" +if [ -z "$RV_HOME" ]; then + current_dir=$(dirname "$(readlink -f "$0")" ) + root_dir=$(dirname "$current_dir" ) + export RV_HOME="$root_dir" +fi -if (! (-e $rvbin) ) then - set rvbin = "$RV_HOME/bin/rv.bin" -endif +rvbin="$RV_HOME/bin/rv.bin.i386" +if [ ! -e "$rvbin" ]; then + rvbin="$RV_HOME/bin/rv.bin" +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 +# +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 From 5824e2b7381f12bc6de71e0698b870a1964225e7 Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Mon, 1 Apr 2024 01:28:37 -0400 Subject: [PATCH 3/6] feat: update all tcsh wrappers with sh --- packages/rv/rv.install_handler_linux | 124 ++++++++--------- packages/rv/rv.install_handler_linux_rvpush | 126 ++++++++---------- src/bin/apps/rv/rv.wrapper | 1 - src/bin/apps/rvpkg/rvpkg.wrapper | 86 ++++++------ src/bin/apps/rvprof/rvprof.wrapper | 86 ++++++------ src/bin/apps/rvpush/rvpush.wrapper | 77 ++++++----- src/bin/apps/rvshell/rvshell.wrapper | 77 ++++++----- src/bin/gtotools/gtofilter/gtofilter.wrapper | 76 +++++------ src/bin/gtotools/gtoimage/gtoimage.wrapper | 74 +++++----- src/bin/gtotools/gtoinfo/gtoinfo.wrapper | 77 ++++++----- src/bin/gtotools/gtomerge/gtomerge.wrapper | 73 +++++----- .../makeFBIOformats/makeFBIOformats.wrapper | 77 ++++++----- .../makeMovieIOformats.wrapper | 77 ++++++----- .../rmsImageDiff/rmsImageDiff.wrapper | 77 ++++++----- src/bin/imgtools/rvio/rvio.wrapper | 77 ++++++----- src/bin/imgtools/rvio_sw/rvio_sw.wrapper | 77 ++++++----- src/bin/imgtools/rvls/rvls.wrapper | 76 +++++------ src/bin/mu/mu-interp/mu-interp.wrapper | 84 ++++++------ src/bin/python/py-interp/py-interp.wrapper | 90 +++++++------ 19 files changed, 753 insertions(+), 759 deletions(-) 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 bf1c7709f..1d6f6a305 100644 --- a/src/bin/apps/rv/rv.wrapper +++ b/src/bin/apps/rv/rv.wrapper @@ -47,7 +47,6 @@ 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 diff --git a/src/bin/apps/rvpkg/rvpkg.wrapper b/src/bin/apps/rvpkg/rvpkg.wrapper index 75fad2592..e51d5b127 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="$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..e51d5b127 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..17e88d1a2 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..bd41a7661 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="$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..e51d5b127 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="$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" "$@" From ec0ad175c7c82ee129c7e05c909b6573e69f44c7 Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Thu, 16 May 2024 14:35:03 -0700 Subject: [PATCH 4/6] fix: change set name to filename --- src/bin/apps/rvpkg/rvpkg.wrapper | 2 +- src/bin/apps/rvprof/rvprof.wrapper | 2 +- src/bin/apps/rvpush/rvpush.wrapper | 2 +- src/bin/apps/rvshell/rvshell.wrapper | 2 +- src/bin/gtotools/gtofilter/gtofilter.wrapper | 2 +- src/bin/gtotools/gtoimage/gtoimage.wrapper | 2 +- src/bin/gtotools/gtoinfo/gtoinfo.wrapper | 2 +- src/bin/gtotools/gtomerge/gtomerge.wrapper | 2 +- src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper | 2 +- src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper | 2 +- src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper | 2 +- src/bin/imgtools/rvio/rvio.wrapper | 2 +- src/bin/imgtools/rvio_sw/rvio_sw.wrapper | 2 +- src/bin/imgtools/rvls/rvls.wrapper | 2 +- src/bin/mu/mu-interp/mu-interp.wrapper | 2 +- src/bin/python/py-interp/py-interp.wrapper | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/bin/apps/rvpkg/rvpkg.wrapper b/src/bin/apps/rvpkg/rvpkg.wrapper index e51d5b127..e76a0f685 100644 --- a/src/bin/apps/rvpkg/rvpkg.wrapper +++ b/src/bin/apps/rvpkg/rvpkg.wrapper @@ -24,7 +24,7 @@ set -o noglob # interesting values (like fr_FR.UTF-8). unset LANG -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/apps/rvprof/rvprof.wrapper b/src/bin/apps/rvprof/rvprof.wrapper index e51d5b127..e76a0f685 100644 --- a/src/bin/apps/rvprof/rvprof.wrapper +++ b/src/bin/apps/rvprof/rvprof.wrapper @@ -24,7 +24,7 @@ set -o noglob # interesting values (like fr_FR.UTF-8). unset LANG -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/apps/rvpush/rvpush.wrapper b/src/bin/apps/rvpush/rvpush.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/apps/rvpush/rvpush.wrapper +++ b/src/bin/apps/rvpush/rvpush.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/apps/rvshell/rvshell.wrapper b/src/bin/apps/rvshell/rvshell.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/apps/rvshell/rvshell.wrapper +++ b/src/bin/apps/rvshell/rvshell.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/gtotools/gtofilter/gtofilter.wrapper b/src/bin/gtotools/gtofilter/gtofilter.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/gtotools/gtofilter/gtofilter.wrapper +++ b/src/bin/gtotools/gtofilter/gtofilter.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/gtotools/gtoimage/gtoimage.wrapper b/src/bin/gtotools/gtoimage/gtoimage.wrapper index 17e88d1a2..a2debc53c 100755 --- a/src/bin/gtotools/gtoimage/gtoimage.wrapper +++ b/src/bin/gtotools/gtoimage/gtoimage.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/gtotools/gtoinfo/gtoinfo.wrapper +++ b/src/bin/gtotools/gtoinfo/gtoinfo.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/gtotools/gtomerge/gtomerge.wrapper b/src/bin/gtotools/gtomerge/gtomerge.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/gtotools/gtomerge/gtomerge.wrapper +++ b/src/bin/gtotools/gtomerge/gtomerge.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper +++ b/src/bin/imgtools/makeFBIOformats/makeFBIOformats.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper +++ b/src/bin/imgtools/makeMovieIOformats/makeMovieIOformats.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper +++ b/src/bin/imgtools/rmsImageDiff/rmsImageDiff.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/rvio/rvio.wrapper b/src/bin/imgtools/rvio/rvio.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/rvio/rvio.wrapper +++ b/src/bin/imgtools/rvio/rvio.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/rvio_sw/rvio_sw.wrapper +++ b/src/bin/imgtools/rvio_sw/rvio_sw.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/imgtools/rvls/rvls.wrapper b/src/bin/imgtools/rvls/rvls.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/imgtools/rvls/rvls.wrapper +++ b/src/bin/imgtools/rvls/rvls.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/mu/mu-interp/mu-interp.wrapper b/src/bin/mu/mu-interp/mu-interp.wrapper index bd41a7661..dede0e51f 100755 --- a/src/bin/mu/mu-interp/mu-interp.wrapper +++ b/src/bin/mu/mu-interp/mu-interp.wrapper @@ -16,7 +16,7 @@ set -o noglob -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") diff --git a/src/bin/python/py-interp/py-interp.wrapper b/src/bin/python/py-interp/py-interp.wrapper index e51d5b127..e76a0f685 100644 --- a/src/bin/python/py-interp/py-interp.wrapper +++ b/src/bin/python/py-interp/py-interp.wrapper @@ -24,7 +24,7 @@ set -o noglob # interesting values (like fr_FR.UTF-8). unset LANG -name="$0" +name=$(basename "$0") if [ -z "$RV_HOME" ]; then canonicalName=$(readlink -f "$0") From fa0833cf3e42e14e1d3eb8e65c3eff5fef9bc115 Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Fri, 27 Sep 2024 09:43:47 -0700 Subject: [PATCH 5/6] docs: update rocky8 docs --- docs/build_system/config_linux_rocky8.md | 288 +++++++++-------------- 1 file changed, 108 insertions(+), 180 deletions(-) diff --git a/docs/build_system/config_linux_rocky8.md b/docs/build_system/config_linux_rocky8.md index f01e41415..0be6cd959 100644 --- a/docs/build_system/config_linux_rocky8.md +++ b/docs/build_system/config_linux_rocky8.md @@ -1,224 +1,152 @@ -# Building Open RV on Rocky 8 +# Building OpenRV on Rocky Linux 8.7 -## Summary +## Manual Build -1. [Install Basics](#install-basics) -2. [Install tools and build dependencies](#install-tools-and-build-dependencies) -3. [Install CMake](#install-cmake) -4. [Install Qt5](#install-qt) -5. [Build Open RV](build_rocky8_openrv) - 1. [Building from command line](building_rocky8_from_command_line) - 2. [Building with Docker](building_rocky8_with_docker) +1. [Install Dependencies](#install-dependencies) +2. [Install Qt5](#install-qt5) +3. [Build and Install OpenRV](#build-and-install-openrv) -## Install Basics +### Install Dependencies Make sure we have some basic tools available on the workstation: -```bash -sudo dnf install wget git +```shell +sudo dnf install wget git cmake ``` -## Install tools and build dependencies - Some of the build dependencies come from outside the main AppStream repo. So first we will enable those and then install our dependencies: -```bash +```shell 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 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 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: -```bash -sudo dnf config-manager --set-disabled devel -``` - -### GLU - You may or may not have libGLU on your system depending on your graphics driver setup. To know you can check if you have the lib /usr/lib64/libGLU.so.1. If it's there you can skip this step, there's nothing further to do in this section. If not, you can install the graphics drivers for your system. As as last resort, you can install a software (mesa) libGLU version, but you may not have ideal performance with this option. To do so: -```bash +```shell sudo dnf install mesa-libGLU mesa-libGLU-devel ``` -### Install the python requirements - -Some of the RV build scripts requires extra python packages. They can be installed using the requirements.txt at the root of the repository. - -```bash -python3 -m pip install -r requirements.txt +Ensure that your `python3` packages are installed and up to date: +```shell +dnf install -y python3-setuptools +python3 -m pip install --upgrade pip setuptools wheel ``` -## Install CMake - -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 -tar -zxvf cmake-3.30.3.tar.gz -cd cmake-3.30.3 -./bootstrap --parallel=32 # 32 or whatever your machine allows -make -j 32 # 32 or whatever your machine allows -sudo make install - -cmake --version # confirm the version of your newly installed version of CMake -cmake version3.30.3 +Ensure that you have a symlink to `python3` at `/usr/bin/python`. +```shell +ln -sf /usr/bin/python3 /usr/bin/python ``` -## Install Qt +### Install Qt5 Download the last version of Qt 5.15.x that you can get using the online installer on the [Qt page](https://www.qt.io/download-open-source). Logs, Android, iOS and WebAssembly are not required to build OpenRV. WARNING: If you fetch Qt from another source, make sure to build it with SSL support, that it contains everything required to build PySide2, and that the file structure is similar to the official package. - -(build_rocky8_openrv)= -## Build Open RV - -(building_rocky8_from_command_line)= -### Building from command line - -(build_rocky8_openrv1)= -#### Before executing any commands - -To maximize your chances of successfully building Open RV, you must: -- Fully update your code base to the latest version (or the version you want to use) with a command like `git pull`. -- Fix all conflicts due to updating the code. -- Revisit all modified files to ensure they aren't using old code that changed during the update such as when the Visual Studio version changes. - -(build_rocky8_openrv2)= -#### Get Open RV source code - -Clone the Open RV repository and change directory into the newly created folder. Typically, the command would be: - -Using a password-protected SSH key: ```shell -git clone --recursive git@github.com:AcademySoftwareFoundation/OpenRV.git -cd OpenRV +./qt-unified-linux-x64-4.6.1-online.run --email "" --password "" --platform minimal --confirm-command --accept-licenses --accept-obligations --accept-messages install qt.qt5.5152.qtpdf qt.qt5.5152.qtpurchasing qt.qt5.5152.qtvirtualkeyboard qt.qt5.5152.qtquicktimeline qt.qt5.5152.qtlottie qt.qt5.5152.debug_info qt.qt5.5152.qtscript qt.qt5.5152.qtcharts qt.qt5.5152.qtwebengine qt.qt5.5152.qtwebglplugin qt.qt5.5152.qtnetworkauth qt.qt5.5152.qtwaylandcompositor qt.qt5.5152.qtdatavis3d qt.qt5.5152.logs qt.qt5.5152 qt.qt5.5152.src qt.qt5.5152.gcc_64 qt.qt5.5152.qtquick3d ``` -Using the web URL: +### Build and Install OpenRV + +Get the repository: ```shell git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git -cd OpenRV ``` -(build_rocky8_openrv3)= -#### Load aliases for Open RV - -From the Open RV directory: +Some of the RV build scripts requires extra python packages. +They can be installed using the requirements.txt at the root of the repository. ```shell -source rvcmds.sh +python3 -m pip install -r requirements.txt ``` -(build_rocky8_openrv4)= -#### Install Python dependencies - -````{note} -This section needs to be done only one time when a fresh Open RV repository is cloned. -The first time the `rvsetup` is executed, it will create a Python virtual environment in the current directory under `.venv`. -```` - -From the Open RV directory, the following command will download and install the Python dependencies. +Set the QT_HOME to the install location, build and install: ```shell -rvsetup -``` - -(build_rocky8_openrv5)= -#### Configure the project - -From the Open RV directory, the following command will configure CMake for the build: - -````{tabs} -```{code-tab} bash Release -rvcfg -``` -```{code-tab} bash Debug -rvcfgd -``` -```` - -(build_rocky8_openrv6)= -#### Build the dependencies - -From the Open RV directory, the following command will build the dependencies: - -````{tabs} -```{code-tab} bash Release -rvbuildt dependencies -``` -```{code-tab} bash Debug -rvbuildtd dependencies -``` -```` - -(build_rocky8_openrv7)= -#### Build the main executable - -From the Open RV directory, the following command will build the main executable: - -````{tabs} -```{code-tab} bash Release -rvbuildt main_executable -``` -```{code-tab} bash Debug -rvbuildtd main_executable -``` -```` - -(build_rocky8_openrv8)= -#### Opening Open RV executable - -````{tabs} -```{tab} Release -Once the build is completed, the Open RV application can be found in the Open RV directory under `_build/stage/app/bin/rv`. -``` -```{tab} Debug -Once the build is completed, the Open RV application can be found in the Open RV directory under `_build_debug/stage/app/bin/rv``. -``` -```` - -(building_rocky8_with_docker)= -### Building with Docker (Optional) - -To build Open RV using Docker, utilize the provided Dockerfile, which includes all required dependencies. - -(build_rocky8_image)= -#### Build the image -```bash -cd dockerfiles -docker build -t openrv-rocky8 -f Dockerfile.Linux-Rocky8 . -``` - -(run_rocky8_image)= -#### Create the container -```bash -docker run -d openrv-rocky8 /bin/bash -c "sleep infinity" -``` - -(go_into_the_rocky8_container)= -#### Go into the container -```bash -# Lookup the container id for openrv-rocky8 -docker container ls - -# Use the container id to go into it. -# e.g. -# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -# 59e7878debc4 openrv-rocky8 "/bin/bash -c 'sleep…" 21 minutes ago Up 21 minutes crazy_pare -# In this example, the would be 59e7878debc4. -docker container exec -it /bin/bash +export QT_HOME=/opt/Qt/5.15.2/gcc_64 +source rvcmds.sh +rvbootstrap +rvinst +``` + +## Docker Build + +OpenRV can also be built inside a Docker Container. + +1. [Build the Image](#build-the-image) +2. [Extract the Installation Files](#extract-the-installation-files) +3. [Cleanup](#cleanup) + +### Build the Image + +Here's a `Dockerfile` that installs all dependencies, builds and installs OpenRV from source. +> Note: You will need an email and password for Qt and you might have to update the url to the Qt5 online installer. + +```dockerfile +FROM rockylinux:8.7 + +# Install dependencies +RUN dnf install -y epel-release +RUN dnf config-manager --set-enabled powertools +RUN dnf install -y 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 qt5-qtbase-devel readline-devel \ + sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel +RUN dnf install -y mesa-libGLU mesa-libGLU-devel +RUN dnf install -y cmake git wget + +# Note: /usr/bin/python needs to exist for OpenRV to build correctly. +RUN dnf install -y python3-setuptools && \ + python3 -m pip install --upgrade pip setuptools wheel && \ + ln -sf /usr/bin/python3 /usr/bin/python + +# Install Qt5 +ARG QT_EMAIL +ARG QT_PASSWORD +RUN wget https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-unified-linux-x64-4.6.1-online.run && \ + chmod a+x qt-unified-linux-x64-4.6.1-online.run && \ + ./qt-unified-linux-x64-4.6.1-online.run \ + --email "$QT_EMAIL" --password "$QT_PASSWORD" --platform minimal \ + --confirm-command --accept-licenses --accept-obligations --accept-messages \ + install qt.qt5.5152.qtpdf qt.qt5.5152.qtpurchasing qt.qt5.5152.qtvirtualkeyboard \ + qt.qt5.5152.qtquicktimeline qt.qt5.5152.qtlottie qt.qt5.5152.debug_info \ + qt.qt5.5152.qtscript qt.qt5.5152.qtcharts qt.qt5.5152.qtwebengine \ + qt.qt5.5152.qtwebglplugin qt.qt5.5152.qtnetworkauth \ + qt.qt5.5152.qtwaylandcompositor qt.qt5.5152.qtdatavis3d qt.qt5.5152.logs \ + qt.qt5.5152 qt.qt5.5152.src qt.qt5.5152.gcc_64 qt.qt5.5152.qtquick3d + +# Get OpenRV Git Repo +RUN git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git +RUN python3 -m pip install -r /OpenRV/requirements.txt + +# Build and Install OpenRV +WORKDIR /OpenRV +# Note: Aliases only work in interactive shells. Use bash script with expand_aliases to +# use commands set in rvcmds.sh +RUN echo "#!/bin/bash" > install.sh && \ + echo "set -e" >> install.sh && \ + echo "shopt -s expand_aliases" >> install.sh && \ + echo "export QT_HOME=/opt/Qt/5.15.2/gcc_64" >> install.sh && \ + echo "source /OpenRV/rvcmds.sh" >> install.sh && \ + echo "rvbootstrap" >> install.sh && \ + echo "rvinst" >> install.sh +RUN bash ./install.sh +``` + +### Extract the Installation Files + +Next mount the image and copy the `_install` directory from it: +```shell +docker cp $(docker create --name temp_container openrv):/OpenRV/_install install && docker rm temp_container ``` -Once you are into the container, you can follow the [standard process](build_rocky8_openrv2). - -#### Copy the stage folder outside of the container - -If you are on a host that is compatible with Rocky Linux 8, you can copy the stage folder outside of the container and -execute Open RV. - -Container id is the same as the one used in the step [Go into the container](go_into_the_rocky8_container). +### Cleanup +To clean up, simply remove the image: ```bash -docker cp :/home/rv/OpenRV/_build/stage ./openrv_stage +docker image rm openrv ``` \ No newline at end of file From 5d3b07762536fba468d1426fdb57417161620e46 Mon Sep 17 00:00:00 2001 From: Beat Reichenbach Date: Fri, 27 Sep 2024 09:43:59 -0700 Subject: [PATCH 6/6] Revert "docs: update rocky8 docs" This reverts commit fa0833cf3e42e14e1d3eb8e65c3eff5fef9bc115. --- docs/build_system/config_linux_rocky8.md | 288 ++++++++++++++--------- 1 file changed, 180 insertions(+), 108 deletions(-) diff --git a/docs/build_system/config_linux_rocky8.md b/docs/build_system/config_linux_rocky8.md index 0be6cd959..f01e41415 100644 --- a/docs/build_system/config_linux_rocky8.md +++ b/docs/build_system/config_linux_rocky8.md @@ -1,152 +1,224 @@ -# Building OpenRV on Rocky Linux 8.7 +# Building Open RV on Rocky 8 -## Manual Build +## Summary -1. [Install Dependencies](#install-dependencies) -2. [Install Qt5](#install-qt5) -3. [Build and Install OpenRV](#build-and-install-openrv) +1. [Install Basics](#install-basics) +2. [Install tools and build dependencies](#install-tools-and-build-dependencies) +3. [Install CMake](#install-cmake) +4. [Install Qt5](#install-qt) +5. [Build Open RV](build_rocky8_openrv) + 1. [Building from command line](building_rocky8_from_command_line) + 2. [Building with Docker](building_rocky8_with_docker) -### Install Dependencies +## Install Basics Make sure we have some basic tools available on the workstation: -```shell -sudo dnf install wget git cmake +```bash +sudo dnf install wget git ``` +## Install tools and build dependencies + Some of the build dependencies come from outside the main AppStream repo. So first we will enable those and then install our dependencies: -```shell +```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 readline-devel sqlite-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: +```bash +sudo dnf config-manager --set-disabled devel +``` + +### GLU + You may or may not have libGLU on your system depending on your graphics driver setup. To know you can check if you have the lib /usr/lib64/libGLU.so.1. If it's there you can skip this step, there's nothing further to do in this section. If not, you can install the graphics drivers for your system. As as last resort, you can install a software (mesa) libGLU version, but you may not have ideal performance with this option. To do so: -```shell +```bash sudo dnf install mesa-libGLU mesa-libGLU-devel ``` -Ensure that your `python3` packages are installed and up to date: -```shell -dnf install -y python3-setuptools -python3 -m pip install --upgrade pip setuptools wheel +### Install the python requirements + +Some of the RV build scripts requires extra python packages. They can be installed using the requirements.txt at the root of the repository. + +```bash +python3 -m pip install -r requirements.txt ``` -Ensure that you have a symlink to `python3` at `/usr/bin/python`. -```shell -ln -sf /usr/bin/python3 /usr/bin/python +## Install CMake + +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 +tar -zxvf cmake-3.30.3.tar.gz +cd cmake-3.30.3 +./bootstrap --parallel=32 # 32 or whatever your machine allows +make -j 32 # 32 or whatever your machine allows +sudo make install + +cmake --version # confirm the version of your newly installed version of CMake +cmake version3.30.3 ``` -### Install Qt5 +## Install Qt Download the last version of Qt 5.15.x that you can get using the online installer on the [Qt page](https://www.qt.io/download-open-source). Logs, Android, iOS and WebAssembly are not required to build OpenRV. WARNING: If you fetch Qt from another source, make sure to build it with SSL support, that it contains everything required to build PySide2, and that the file structure is similar to the official package. -```shell -./qt-unified-linux-x64-4.6.1-online.run --email "" --password "" --platform minimal --confirm-command --accept-licenses --accept-obligations --accept-messages install qt.qt5.5152.qtpdf qt.qt5.5152.qtpurchasing qt.qt5.5152.qtvirtualkeyboard qt.qt5.5152.qtquicktimeline qt.qt5.5152.qtlottie qt.qt5.5152.debug_info qt.qt5.5152.qtscript qt.qt5.5152.qtcharts qt.qt5.5152.qtwebengine qt.qt5.5152.qtwebglplugin qt.qt5.5152.qtnetworkauth qt.qt5.5152.qtwaylandcompositor qt.qt5.5152.qtdatavis3d qt.qt5.5152.logs qt.qt5.5152 qt.qt5.5152.src qt.qt5.5152.gcc_64 qt.qt5.5152.qtquick3d -``` -### Build and Install OpenRV +(build_rocky8_openrv)= +## Build Open RV + +(building_rocky8_from_command_line)= +### Building from command line + +(build_rocky8_openrv1)= +#### Before executing any commands + +To maximize your chances of successfully building Open RV, you must: +- Fully update your code base to the latest version (or the version you want to use) with a command like `git pull`. +- Fix all conflicts due to updating the code. +- Revisit all modified files to ensure they aren't using old code that changed during the update such as when the Visual Studio version changes. + +(build_rocky8_openrv2)= +#### Get Open RV source code -Get the repository: +Clone the Open RV repository and change directory into the newly created folder. Typically, the command would be: + +Using a password-protected SSH key: ```shell -git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git +git clone --recursive git@github.com:AcademySoftwareFoundation/OpenRV.git +cd OpenRV ``` -Some of the RV build scripts requires extra python packages. -They can be installed using the requirements.txt at the root of the repository. +Using the web URL: ```shell -python3 -m pip install -r requirements.txt +git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git +cd OpenRV ``` -Set the QT_HOME to the install location, build and install: +(build_rocky8_openrv3)= +#### Load aliases for Open RV + +From the Open RV directory: ```shell -export QT_HOME=/opt/Qt/5.15.2/gcc_64 source rvcmds.sh -rvbootstrap -rvinst -``` - -## Docker Build - -OpenRV can also be built inside a Docker Container. - -1. [Build the Image](#build-the-image) -2. [Extract the Installation Files](#extract-the-installation-files) -3. [Cleanup](#cleanup) - -### Build the Image - -Here's a `Dockerfile` that installs all dependencies, builds and installs OpenRV from source. -> Note: You will need an email and password for Qt and you might have to update the url to the Qt5 online installer. - -```dockerfile -FROM rockylinux:8.7 - -# Install dependencies -RUN dnf install -y epel-release -RUN dnf config-manager --set-enabled powertools -RUN dnf install -y 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 qt5-qtbase-devel readline-devel \ - sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel -RUN dnf install -y mesa-libGLU mesa-libGLU-devel -RUN dnf install -y cmake git wget - -# Note: /usr/bin/python needs to exist for OpenRV to build correctly. -RUN dnf install -y python3-setuptools && \ - python3 -m pip install --upgrade pip setuptools wheel && \ - ln -sf /usr/bin/python3 /usr/bin/python - -# Install Qt5 -ARG QT_EMAIL -ARG QT_PASSWORD -RUN wget https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-unified-linux-x64-4.6.1-online.run && \ - chmod a+x qt-unified-linux-x64-4.6.1-online.run && \ - ./qt-unified-linux-x64-4.6.1-online.run \ - --email "$QT_EMAIL" --password "$QT_PASSWORD" --platform minimal \ - --confirm-command --accept-licenses --accept-obligations --accept-messages \ - install qt.qt5.5152.qtpdf qt.qt5.5152.qtpurchasing qt.qt5.5152.qtvirtualkeyboard \ - qt.qt5.5152.qtquicktimeline qt.qt5.5152.qtlottie qt.qt5.5152.debug_info \ - qt.qt5.5152.qtscript qt.qt5.5152.qtcharts qt.qt5.5152.qtwebengine \ - qt.qt5.5152.qtwebglplugin qt.qt5.5152.qtnetworkauth \ - qt.qt5.5152.qtwaylandcompositor qt.qt5.5152.qtdatavis3d qt.qt5.5152.logs \ - qt.qt5.5152 qt.qt5.5152.src qt.qt5.5152.gcc_64 qt.qt5.5152.qtquick3d - -# Get OpenRV Git Repo -RUN git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git -RUN python3 -m pip install -r /OpenRV/requirements.txt - -# Build and Install OpenRV -WORKDIR /OpenRV -# Note: Aliases only work in interactive shells. Use bash script with expand_aliases to -# use commands set in rvcmds.sh -RUN echo "#!/bin/bash" > install.sh && \ - echo "set -e" >> install.sh && \ - echo "shopt -s expand_aliases" >> install.sh && \ - echo "export QT_HOME=/opt/Qt/5.15.2/gcc_64" >> install.sh && \ - echo "source /OpenRV/rvcmds.sh" >> install.sh && \ - echo "rvbootstrap" >> install.sh && \ - echo "rvinst" >> install.sh -RUN bash ./install.sh -``` - -### Extract the Installation Files - -Next mount the image and copy the `_install` directory from it: +``` + +(build_rocky8_openrv4)= +#### Install Python dependencies + +````{note} +This section needs to be done only one time when a fresh Open RV repository is cloned. +The first time the `rvsetup` is executed, it will create a Python virtual environment in the current directory under `.venv`. +```` + +From the Open RV directory, the following command will download and install the Python dependencies. ```shell -docker cp $(docker create --name temp_container openrv):/OpenRV/_install install && docker rm temp_container +rvsetup +``` + +(build_rocky8_openrv5)= +#### Configure the project + +From the Open RV directory, the following command will configure CMake for the build: + +````{tabs} +```{code-tab} bash Release +rvcfg +``` +```{code-tab} bash Debug +rvcfgd +``` +```` + +(build_rocky8_openrv6)= +#### Build the dependencies + +From the Open RV directory, the following command will build the dependencies: + +````{tabs} +```{code-tab} bash Release +rvbuildt dependencies +``` +```{code-tab} bash Debug +rvbuildtd dependencies +``` +```` + +(build_rocky8_openrv7)= +#### Build the main executable + +From the Open RV directory, the following command will build the main executable: + +````{tabs} +```{code-tab} bash Release +rvbuildt main_executable +``` +```{code-tab} bash Debug +rvbuildtd main_executable +``` +```` + +(build_rocky8_openrv8)= +#### Opening Open RV executable + +````{tabs} +```{tab} Release +Once the build is completed, the Open RV application can be found in the Open RV directory under `_build/stage/app/bin/rv`. +``` +```{tab} Debug +Once the build is completed, the Open RV application can be found in the Open RV directory under `_build_debug/stage/app/bin/rv``. ``` +```` + +(building_rocky8_with_docker)= +### Building with Docker (Optional) + +To build Open RV using Docker, utilize the provided Dockerfile, which includes all required dependencies. + +(build_rocky8_image)= +#### Build the image +```bash +cd dockerfiles +docker build -t openrv-rocky8 -f Dockerfile.Linux-Rocky8 . +``` + +(run_rocky8_image)= +#### Create the container +```bash +docker run -d openrv-rocky8 /bin/bash -c "sleep infinity" +``` + +(go_into_the_rocky8_container)= +#### Go into the container +```bash +# Lookup the container id for openrv-rocky8 +docker container ls + +# Use the container id to go into it. +# e.g. +# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +# 59e7878debc4 openrv-rocky8 "/bin/bash -c 'sleep…" 21 minutes ago Up 21 minutes crazy_pare +# In this example, the would be 59e7878debc4. +docker container exec -it /bin/bash +``` + +Once you are into the container, you can follow the [standard process](build_rocky8_openrv2). + +#### Copy the stage folder outside of the container + +If you are on a host that is compatible with Rocky Linux 8, you can copy the stage folder outside of the container and +execute Open RV. -### Cleanup +Container id is the same as the one used in the step [Go into the container](go_into_the_rocky8_container). -To clean up, simply remove the image: ```bash -docker image rm openrv +docker cp :/home/rv/OpenRV/_build/stage ./openrv_stage ``` \ No newline at end of file