Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627#!/bin/sh# Brand and ad-hoc sign the dev Electron binary. macOS takes the menu-bar name# from the bundle's Info.plist and the Dock's from the bundle's file name, so# rename both, and point electron's path.txt (which `electron` and# electron-vite launch from) at the renamed bundle. The virtualization# entitlement lets `bun run dev` boot sandbox VMs. (Release builds get all of# this from the app's real bundle and signing identity.) Signing comes last,# since editing Info.plist invalidates the signature. No-op off macOS.set -eu[ "$(uname)" = Darwin ] || exit 0root="$(cd "$(dirname "$0")/.." && pwd)"electron="$root/node_modules/electron"app="$electron/dist/code-browser.app"# install.js sees the edited path.txt as a stale install and extracts a fresh# Electron.app, so a new one replaces the renamed bundle.if [ -d "$electron/dist/Electron.app" ]; then rm -rf "$app" mv "$electron/dist/Electron.app" "$app"fi[ -d "$app" ] || { echo "Electron not installed yet" >&2; exit 0; }printf %s "code-browser.app/Contents/MacOS/Electron" > "$electron/path.txt"plist="$app/Contents/Info.plist"for key in CFBundleName CFBundleDisplayName; do /usr/libexec/PlistBuddy -c "Set :$key code-browser" "$plist"donecodesign --force --sign - --entitlements "$root/native/entitlements.plist" "$app"