Skip to content

Instantly share code, notes, and snippets.

@owlwang
Created January 29, 2026 13:52
Show Gist options
  • Select an option

  • Save owlwang/6a73c92e6e530c17ab3d49213c7c5bc6 to your computer and use it in GitHub Desktop.

Select an option

Save owlwang/6a73c92e6e530c17ab3d49213c7c5bc6 to your computer and use it in GitHub Desktop.
crossover.sh
#!/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