Last active
November 15, 2024 15:08
-
-
Save syneart/4a8724cd479d31f0f742f499f807dcb2 to your computer and use it in GitHub Desktop.
Meld v3.21.0 (r4) hot-fix for macOS on Intel CPU / Apple Silicon CPU with Rosetta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Test on https://github.com/yousseb/meld/releases/tag/osx-20 | |
### OSX - 3.21.0 (r4) Sonoma | |
### !!! Note: You need put the Meld.app r4 build to the /Applications path first. | |
#!/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 | |
#Removes the existing code signature | |
codesign --remove-signature /Applications/Meld.app | |
#Re-signs with system’s default certificate | |
codesign --force --deep --sign - /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 | |
#Meld CLI Setup | |
curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_setup_cli.sh | zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
RC_FILES=( .bashrc .zshrc ) | |
for RC_FILE in "${RC_FILES[@]}" | |
do | |
[ -f ~/${RC_FILE} ] && { | |
( cat ~/${RC_FILE} | grep "alias meld=" ) && { | |
echo "Already put it at ~/${RC_FILE}" | |
}|| { | |
echo "alias meld='meld_script(){ /Applications/Meld.app/Contents/MacOS/Meld \$* 2>/dev/null & };meld_script'" >> ~/${RC_FILE} | |
. ~/${RC_FILE} | |
echo "Put it at ~/${RC_FILE} .. ok" | |
} | |
} | |
done | |
echo "[!] You may need to reopen your Terminal." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download the official **3.21.0 osx4 (r4 pre-release)** [https://github.com/yousseb/meld/releases/tag/osx-20] version. | |
2. Move the Meld.app file to the /Applications directory. | |
3. Execute the hot-fix script at CLI with the following command (**only one line**): | |
`curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh` |
@stevejordi I too got those errors
"The application Finder does not have permission to open null" or
"The application Dock does not have permission to open null"
Removing the signature of the app and self-signing it solved the problem.
codesign --remove-signature /Applications/Meld.app
codesign --force --deep --sign - /Applications/Meld.app
@syneart Thank you. It's working again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@k4u5hik, @stevejordi Thank you for the feedback.
I have already made adjustments for this issue. You can simply run the hot-fix script again to continue using Meld.app.
-> Execute the hot-fix script at CLI with the following command (only one line):
curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh
If it still fails, you can go through the process again.
curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh