From 876af17e9466775945d199ad51feffb435683767 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <15145274+bam241@users.noreply.github.com> Date: Fri, 16 Dec 2022 11:58:52 +0100 Subject: [PATCH 1/3] fixing macos 2022.4 plugin --- scripts/unix_share_build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/unix_share_build.sh b/scripts/unix_share_build.sh index 57ff23ff..81a20796 100644 --- a/scripts/unix_share_build.sh +++ b/scripts/unix_share_build.sh @@ -74,6 +74,8 @@ function setup_var() { CUBIT_PATH="/opt/Coreform-Cubit-2021.3" elif [ "$1" == "2021.4" ] ; then CUBIT_PATH="/opt/Coreform-Cubit-2021.4" + elif [ "$1" == "2022.4" ] ; then + CUBIT_PATH="/opt/Coreform-Cubit-2022.4" else echo "unknown Cubit version" return 1 @@ -289,6 +291,11 @@ function mac_build_plugin_pkg(){ cp /usr/local/opt/libaec/lib/libsz.dylib . install_name_tool -change /usr/local/opt/libaec/lib/libsz.dylib @rpath/libsz.dylib libsvalinn_plugin.so + if [ "$1" == "2022.4" ] ; then + cp /usr/local/opt/libaec/lib/libsz.2.dylib . + install_name_tool -change /usr/local/opt/libaec/lib/libsz.2.dylib @rpath/libsz.2.dylib libsvalinn_plugin.so + fi + # restoring correct RPATH for 17.1 (bin does not exist as it is not shipped with SDK) if [ "$1" == "17.1.0" ] ; then install_name_tool -rpath ${CUBIT_PATH}/bin/plugins/svalinn ${CUBIT_PATH}/MacOS/plugins/svalinn libsvalinn_plugin.so From bf8718a9fe929ec72976775bac88665e63dee2ad Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <15145274+bam241@users.noreply.github.com> Date: Wed, 4 Jan 2023 15:19:30 +0100 Subject: [PATCH 2/3] Update scripts/unix_share_build.sh Co-authored-by: Paul Wilson --- scripts/unix_share_build.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/unix_share_build.sh b/scripts/unix_share_build.sh index 81a20796..660becdc 100644 --- a/scripts/unix_share_build.sh +++ b/scripts/unix_share_build.sh @@ -291,10 +291,13 @@ function mac_build_plugin_pkg(){ cp /usr/local/opt/libaec/lib/libsz.dylib . install_name_tool -change /usr/local/opt/libaec/lib/libsz.dylib @rpath/libsz.dylib libsvalinn_plugin.so + libsz=libsz.dylib if [ "$1" == "2022.4" ] ; then - cp /usr/local/opt/libaec/lib/libsz.2.dylib . - install_name_tool -change /usr/local/opt/libaec/lib/libsz.2.dylib @rpath/libsz.2.dylib libsvalinn_plugin.so - fi + libsz=libsz.2.dylib + fi + + cp /usr/local/opt/libaec/lib/$libsz . + install_name_tool -change /usr/local/opt/libaec/lib/$libsz @rpath/$libsz libsvalinn_plugin.so # restoring correct RPATH for 17.1 (bin does not exist as it is not shipped with SDK) if [ "$1" == "17.1.0" ] ; then From c0fdcca3d1f2172e35895c3516d9854b35b8a90d Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <15145274+bam241@users.noreply.github.com> Date: Wed, 4 Jan 2023 15:31:18 +0100 Subject: [PATCH 3/3] some change to improve readability ? --- scripts/unix_share_build.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/scripts/unix_share_build.sh b/scripts/unix_share_build.sh index 660becdc..16b5ad8d 100644 --- a/scripts/unix_share_build.sh +++ b/scripts/unix_share_build.sh @@ -176,7 +176,6 @@ function remove_app_logger() { } function mac_setup_cubit() { - cd ${FOLDER_PKG} hdiutil convert ${CUBIT_PKG} -format UDTO -o cubit_eula.dmg.cdr hdiutil attach cubit_eula.dmg.cdr -mountpoint /Volumes/Cubit @@ -208,8 +207,6 @@ function mac_setup_cubit() { fi hdiutil detach /Volumes/Cubit - - } function linux_setup_cubit() { @@ -248,8 +245,6 @@ function build_plugin(){ } function linux_build_plugin_pkg(){ - - cd ${PLUGIN_ABS_PATH} mkdir -p pack/bin/plugins/svalinn cd pack/bin/plugins/svalinn @@ -293,20 +288,27 @@ function mac_build_plugin_pkg(){ libsz=libsz.dylib if [ "$1" == "2022.4" ] ; then - libsz=libsz.2.dylib - fi + libsz=libsz.2.dylib + fi cp /usr/local/opt/libaec/lib/$libsz . install_name_tool -change /usr/local/opt/libaec/lib/$libsz @rpath/$libsz libsvalinn_plugin.so - # restoring correct RPATH for 17.1 (bin does not exist as it is not shipped with SDK) + # restoring correct RPATH and BIN for 17.1 (bin does not exist as it is not shipped with SDK) if [ "$1" == "17.1.0" ] ; then - install_name_tool -rpath ${CUBIT_PATH}/bin/plugins/svalinn ${CUBIT_PATH}/MacOS/plugins/svalinn libsvalinn_plugin.so - install_name_tool -rpath ${CUBIT_PATH}/bin/plugins/svalinn ${CUBIT_PATH}/MacOS/plugins/svalinn libiGeom.dylib - install_name_tool -rpath ${CUBIT_PATH}/bin/plugins/svalinn ${CUBIT_PATH}/MacOS/plugins/svalinn libmcnp2cad.dylib - install_name_tool -rpath ${CUBIT_PATH}/bin ${CUBIT_PATH}/MacOS libmcnp2cad.dylib - install_name_tool -rpath ${CUBIT_PATH}/bin ${CUBIT_PATH}/MacOS libiGeom.dylib - install_name_tool -rpath ${CUBIT_PATH}/bin ${CUBIT_PATH}/MacOS libsvalinn_plugin.so + # Correcting the RPATH for the svalinn and dependent libs + rpath_old=${CUBIT_PATH}/bin/plugins/svalinn + rpath_fix=${CUBIT_PATH}/MacOS/plugins/svalinn + install_name_tool -rpath ${rpath_old} ${rpath_fix} libsvalinn_plugin.so + install_name_tool -rpath ${rpath_old} ${rpath_fix} libiGeom.dylib + install_name_tool -rpath ${rpath_old} ${rpath_fix} libmcnp2cad.dylib + + # Correcting the BIN for the svalinm and dependent libs + bin_old=${CUBIT_PATH}/bin + bin_fix=${CUBIT_PATH}/MacOS + install_name_tool -rpath ${bin_old} ${bin_fix} libmcnp2cad.dylib + install_name_tool -rpath ${bin_old} ${bin_fix} libiGeom.dylib + install_name_tool -rpath ${bin_old} ${bin_fix} libsvalinn_plugin.so fi # Create the Svalinn plugin tarball