From 64ba36e710f34d8331d6c4684828e3725ce0ec01 Mon Sep 17 00:00:00 2001 From: maksarsanjeev Date: Tue, 6 Oct 2026 19:58:48 +0300 Subject: [PATCH] Build script: install to ~/Applications, DerivedData outside iCloud Documents Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 7 +++++-- scripts/build.sh | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 scripts/build.sh diff --git a/CLAUDE.md b/CLAUDE.md index 887a181..3205d0e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,8 +10,11 @@ BroV is a personal, never-published fork of Coucou (github.com/Louis-CFM/coucou, ## Build ``` -cd NotchBuddy && xcodegen && xcodebuild -scheme BroV -configuration Debug -derivedDataPath build build -open build/Build/Products/Debug/BroV.app +bash scripts/build.sh # xcodegen + xcodebuild, installs ~/Applications/BroV.app, relaunches +bash scripts/render-brov.sh # character in every state → /tmp/brov-states.png +``` +DerivedData must stay outside ~/Documents (iCloud adds Finder attributes and codesign fails). +``` ``` ## Rules diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..5fcfa99 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Build BroV and install it to ~/Applications/BroV.app, then (re)launch it. +# DerivedData lives outside ~/Documents: iCloud adds Finder attributes there and codesign refuses them. +set -e +cd "$(dirname "$0")/../NotchBuddy" +D="$HOME/Library/Developer/Xcode/DerivedData/BroV" +xcodegen -q +xcodebuild -scheme BroV -configuration "${1:-Debug}" -derivedDataPath "$D" build | grep -E 'error:|BUILD (SUCCEEDED|FAILED)' || true +APP="$D/Build/Products/${1:-Debug}/BroV.app" +[ -d "$APP" ] || { echo "build failed"; exit 1; } +pkill -x BroV 2>/dev/null || true +mkdir -p "$HOME/Applications" +rm -rf "$HOME/Applications/BroV.app" +cp -R "$APP" "$HOME/Applications/BroV.app" +open "$HOME/Applications/BroV.app" +echo "BroV installed to ~/Applications/BroV.app and launched"