Created
January 29, 2026 13:52
-
-
Save owlwang/6a73c92e6e530c17ab3d49213c7c5bc6 to your computer and use it in GitHub Desktop.
crossover.sh
This file contains hidden or 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 | |
| [ $EUID -ne 0 ] && echo "Run as root" && exit 1 | |
| K="/tmp/cx.pem" | |
| P="/Library/Preferences" | |
| L="$P/com.codeweavers.CrossOver.license" | |
| S="$P/com.codeweavers.CrossOver.sha256" | |
| openssl genrsa -out "$K" 2048 2>&- | |
| printf "[crossmac]\ncustomer=CyberPunk\nemail=wake_up@samurai.city\nexpires=9999/12/31\n[license]\nid=silverhand\n" > "$L" | |
| openssl dgst -sha256 -sign "$K" -out "$S" "$L" | |
| for d in /Applications/CrossOver*.app; do | |
| [ -d "$d" ] || continue | |
| openssl rsa -in "$K" -outform PEM -pubout -out "$d/Contents/SharedSupport/CrossOver/share/crossover/data/tie.pub" 2>&- | |
| for f in "$d"/Contents/Resources/libcxsetup*.py; do | |
| [ -f "$f" ] && ! grep -q "is_really_signed" "$f" && \ | |
| printf "\nimport fileupdate\ndef is_really_signed(d,s=(None,)):\n return True\nfileupdate.is_signed=is_really_signed\n" >> "$f" | |
| done | |
| codesign -f -s - --deep "$d" 2>&- | |
| done | |
| rm -f "$K" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment