Skip to content

Instantly share code, notes, and snippets.

@junkblocker
Forked from syneart/meld_hotfix_sonoma.sh
Created December 20, 2023 05:29
Show Gist options
  • Save junkblocker/76fb942745d2debf22616438108193ff to your computer and use it in GitHub Desktop.
Save junkblocker/76fb942745d2debf22616438108193ff to your computer and use it in GitHub Desktop.
Meld hotfix on MacOS with Sonoma(14) Intel / M1 & M2 & M3 (Apple silicon) CPU [with Rosetta]
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
install_name_tool -change /usr/local/opt/brotli/lib/libbrotlidec.1.dylib @executable_path/../Frameworks/libbrotlidec.1.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Make MacOS trust Meld.app
xattr -rd com.apple.quarantine /Applications/Meld.app
#if CPU type is Apple silicon, use Rosetta to execute
/usr/libexec/PlistBuddy -c "Set :LSRequiresNativeExecution false" /Applications/Meld.app/Contents/Info.plist
#Try to open Meld
open /Applications/Meld.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment