mirror of
https://github.com/NohamR/RMHook.git
synced 2026-01-10 06:28:12 +00:00
Switch to static zstd library and update build config
Replaces dynamic libzstd.1.dylib with static libzstd.a in CMakeLists.txt and updates architecture to support arm64. Adds zstd headers and static library, updates documentation and credits to reflect zstd usage, and removes unused tinyhook source files after moving headers and libraries.
This commit is contained in:
@@ -66,23 +66,6 @@ echo "[INFO] Copied $DYLIB to $APP_PATH/Contents/Resources/"
|
||||
# Use optool from the scripts folder
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Copy libzstd dependency and fix the reference in reMarkable.dylib
|
||||
LIBZSTD_PATH="$SCRIPT_DIR/../libs/libzstd.1.dylib"
|
||||
if [ -f "$LIBZSTD_PATH" ]; then
|
||||
cp "$LIBZSTD_PATH" "$APP_PATH/Contents/Resources/"
|
||||
echo "[INFO] Copied libzstd.1.dylib to $APP_PATH/Contents/Resources/"
|
||||
|
||||
# Update the dylib reference to @executable_path/../Resources (handle multiple possible source paths)
|
||||
DYLIB_IN_APP="$APP_PATH/Contents/Resources/$(basename "$DYLIB")"
|
||||
install_name_tool -change "/usr/local/lib/libzstd.1.dylib" "@executable_path/../Resources/libzstd.1.dylib" "$DYLIB_IN_APP"
|
||||
install_name_tool -change "/usr/local/opt/zstd/lib/libzstd.1.dylib" "@executable_path/../Resources/libzstd.1.dylib" "$DYLIB_IN_APP"
|
||||
install_name_tool -change "/opt/homebrew/lib/libzstd.1.dylib" "@executable_path/../Resources/libzstd.1.dylib" "$DYLIB_IN_APP"
|
||||
install_name_tool -change "/opt/homebrew/opt/zstd/lib/libzstd.1.dylib" "@executable_path/../Resources/libzstd.1.dylib" "$DYLIB_IN_APP"
|
||||
echo "[INFO] Updated libzstd references in $(basename "$DYLIB")"
|
||||
else
|
||||
echo "[WARNING] libzstd.1.dylib not found at $LIBZSTD_PATH - app may fail on systems without zstd"
|
||||
fi
|
||||
|
||||
"$SCRIPT_DIR/optool" install -c load -p "@executable_path/../Resources/$(basename "$DYLIB")" -t "$EXECUTABLE_PATH"
|
||||
echo "[INFO] Injected $DYLIB into $EXECUTABLE_PATH"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user