Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/local/dev' into superslicer_var…
Browse files Browse the repository at this point in the history
…iant
  • Loading branch information
supermerill committed Feb 14, 2025
2 parents e9403e4 + 0d9cb1a commit 3502a2d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions src/platform/osx/BuildMacOSImage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,33 @@ done
cp -f bin/@SLIC3R_APP_CMD@ pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@
chmod u+x pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@

echo "otool -L exefile:"
otool -L pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@
echo "END otool"

#copy libzstd
ZSDT_FILE=
echo "libzstd:\n"
ls -al /opt/homebrew/opt/zstd/lib/libzstd*.dylib
ls -al /usr/local/opt/zstd/lib/libzstd*.dylib
ZSDT_FILE=$(ls -v /usr/local/opt/zstd/lib/libzstd.1.*.dylib | tail -n 1)
ZSDT_PATH=$(ls -v /usr/local/opt/zstd/lib/libzstd.1.*.dylib | tail -n 1)
if [ -z "${ZSDT_FILE}" ]
then
# try with homebrew
ZSDT_FILE=$(ls -v /opt/homebrew/opt/zstd/lib/libzstd.1.*.dylib | tail -n 1)
ZSDT_PATH=$(ls -v /opt/homebrew/opt/zstd/lib/libzstd.1.*.dylib | tail -n 1)
fi
echo "zstd var:'"$ZSDT_FILE"' need to be renamed libzstd.1.dylib in Contents/Frameworks";
cp $ZSDT_FILE pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/Frameworks/libzstd.1.dylib
ZSTD_FILE=$(basename ${ZSDT_PATH})
echo "zstd var:'"$ZSDT_PATH"' : "$ZSTD_FILE;
cp $ZSDT_PATH pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/Frameworks/$ZSTD_FILE
ls -al pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/Frameworks/

install_name_tool -change $ZSDT_PATH @executable_path/../Frameworks/$ZSTD_FILE pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@
install_name_tool -change /opt/homebrew/opt/zstd/lib/libzstd.1.dylib @executable_path/../Frameworks/$ZSTD_FILE pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@
install_name_tool -change /usr/local/opt/zstd/lib/libzstd.1.dylib @executable_path/../Frameworks/$ZSTD_FILE pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@

echo "otool -L exefile now:"
otool -L pack/@SLIC3R_APP_KEY@/@[email protected]/Contents/MacOS/@SLIC3R_APP_KEY@
echo "END otool"

# } &> $ROOT/Build.log # Capture all command output
echo -e "\n ... done\n"

Expand Down

0 comments on commit 3502a2d

Please sign in to comment.