Skip to content

Commit

Permalink
some change to improve readability ?
Browse files Browse the repository at this point in the history
  • Loading branch information
bam241 committed Jan 4, 2023
1 parent bf8718a commit c0fdcca
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions scripts/unix_share_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -208,8 +207,6 @@ function mac_setup_cubit() {
fi

hdiutil detach /Volumes/Cubit


}

function linux_setup_cubit() {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0fdcca

Please sign in to comment.