From 36e4f4adc3e756da128de0b4fbead2f5c821f52d Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Wed, 22 Apr 2026 15:48:25 +0200 Subject: [PATCH 1/3] Add build.sh script for Debug/Release builds Builds the Overlook scheme via xcodebuild and copies the resulting .app into build/debug or build/release. Defaults to Debug; pass -c release for a Release build. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 3 +++ build.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index 612de1d..c44c426 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ xcuserdata/ *.dSYM.zip *.dSYM +# build script output +build/ + # working paths glweb171/ glweb/ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..923d1d7 --- /dev/null +++ b/build.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +set -euo pipefail + +CONFIG="Debug" + +usage() { + cat <&2; exit 1; } + case "$(echo "$1" | tr '[:upper:]' '[:lower:]')" in + debug) CONFIG="Debug" ;; + release) CONFIG="Release" ;; + *) echo "error: config must be 'debug' or 'release'" >&2; exit 1 ;; + esac + shift + ;; + -h|--help) usage; exit 0 ;; + --) shift; break ;; + *) echo "error: unknown argument: $1" >&2; usage >&2; exit 1 ;; + esac +done + +cd "$(dirname "$0")" + +DEST_DIR="build/$(echo "$CONFIG" | tr '[:upper:]' '[:lower:]')" + +echo "Building Overlook ($CONFIG)..." +xcodebuild \ + -project Overlook.xcodeproj \ + -scheme Overlook \ + -configuration "$CONFIG" \ + build "$@" + +BUILT_PRODUCTS_DIR=$(xcodebuild \ + -project Overlook.xcodeproj \ + -scheme Overlook \ + -configuration "$CONFIG" \ + -showBuildSettings build 2>/dev/null \ + | awk -F' = ' '/^[[:space:]]*BUILT_PRODUCTS_DIR =/ {print $2; exit}') + +FULL_PRODUCT_NAME=$(xcodebuild \ + -project Overlook.xcodeproj \ + -scheme Overlook \ + -configuration "$CONFIG" \ + -showBuildSettings build 2>/dev/null \ + | awk -F' = ' '/^[[:space:]]*FULL_PRODUCT_NAME =/ {print $2; exit}') + +APP_SRC="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" +if [[ ! -d "$APP_SRC" ]]; then + echo "error: built app not found at $APP_SRC" >&2 + exit 1 +fi + +mkdir -p "$DEST_DIR" +rm -rf "$DEST_DIR/$FULL_PRODUCT_NAME" +cp -R "$APP_SRC" "$DEST_DIR/" +echo "Copied $FULL_PRODUCT_NAME -> $DEST_DIR/" From 892321e7f0fe756253ae47e0103a792fc5a1d262 Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Wed, 22 Apr 2026 15:52:29 +0200 Subject: [PATCH 2/3] Track shared Xcode scheme and Preview Content directory - Commit the shared Overlook scheme so xcodebuild and CI use the same scheme without relying on Xcode's autocreation. - Add an empty Overlook/Preview Content directory (with .gitkeep) so ValidateDevelopmentAssets passes on a fresh clone, removing the need for the mkdir workaround in the GitHub Actions workflow. - Accept Xcode's reformatting of project.pbxproj (key reordering, string quoting, OTHER_SWIFT_FLAGS array collapsed into one string); no semantic build setting changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- Overlook.xcodeproj/project.pbxproj | 20 ++--- .../xcshareddata/xcschemes/Overlook.xcscheme | 78 +++++++++++++++++++ Overlook/Preview Content/.gitkeep | 0 3 files changed, 84 insertions(+), 14 deletions(-) create mode 100644 Overlook.xcodeproj/xcshareddata/xcschemes/Overlook.xcscheme create mode 100644 Overlook/Preview Content/.gitkeep diff --git a/Overlook.xcodeproj/project.pbxproj b/Overlook.xcodeproj/project.pbxproj index 4580627..b3fe2ea 100644 --- a/Overlook.xcodeproj/project.pbxproj +++ b/Overlook.xcodeproj/project.pbxproj @@ -363,22 +363,18 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "Overlook needs microphone access to send audio to the remote device."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "Overlook needs microphone access to send audio to the remote device."; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = ( - "$(inherited)", - "-Xcc", - "-Wno-deprecated-declarations", - ); + OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -Wno-deprecated-declarations"; PRODUCT_BUNDLE_IDENTIFIER = com.overlook.app; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = Overlook/Overlook-Bridging-Header.h; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Overlook/Overlook-Bridging-Header.h"; SWIFT_VERSION = 5.0; }; name = Debug; @@ -398,22 +394,18 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "Overlook needs microphone access to send audio to the remote device."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "Overlook needs microphone access to send audio to the remote device."; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = ( - "$(inherited)", - "-Xcc", - "-Wno-deprecated-declarations", - ); + OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -Wno-deprecated-declarations"; PRODUCT_BUNDLE_IDENTIFIER = com.overlook.app; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = Overlook/Overlook-Bridging-Header.h; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Overlook/Overlook-Bridging-Header.h"; SWIFT_VERSION = 5.0; }; name = Release; diff --git a/Overlook.xcodeproj/xcshareddata/xcschemes/Overlook.xcscheme b/Overlook.xcodeproj/xcshareddata/xcschemes/Overlook.xcscheme new file mode 100644 index 0000000..f0a4af1 --- /dev/null +++ b/Overlook.xcodeproj/xcshareddata/xcschemes/Overlook.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Overlook/Preview Content/.gitkeep b/Overlook/Preview Content/.gitkeep new file mode 100644 index 0000000..e69de29 From 4a5f6657bbd1be8f86f400f037bbd4d1655b4afa Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Wed, 22 Apr 2026 15:53:13 +0200 Subject: [PATCH 3/3] Add VS Code launch config for debugging Overlook with LLDB Sets up CodeLLDB-backed launch and attach configurations so the app can be debugged from VS Code with print() output routed to the Debug Console. preLaunchTask wraps build.sh -c debug. Co-Authored-By: Claude Opus 4.7 (1M context) --- .vscode/extensions.json | 3 +++ .vscode/launch.json | 22 ++++++++++++++++++++++ .vscode/tasks.json | 13 +++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..282da53 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["vadimcn.vscode-lldb"] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..e730441 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Overlook", + "type": "lldb", + "request": "launch", + "program": "${workspaceFolder}/build/debug/Overlook.app/Contents/MacOS/Overlook", + "cwd": "${workspaceFolder}", + "terminal": "console", + "preLaunchTask": "build-overlook-debug", + "stopOnEntry": false + }, + { + "name": "Attach to Overlook", + "type": "lldb", + "request": "attach", + "program": "${workspaceFolder}/build/debug/Overlook.app/Contents/MacOS/Overlook", + "waitFor": true + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..bb80f11 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build-overlook-debug", + "type": "shell", + "command": "${workspaceFolder}/build.sh", + "args": ["-c", "debug"], + "group": { "kind": "build", "isDefault": true }, + "problemMatcher": [] + } + ] +}