Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ xcuserdata/
*.dSYM.zip
*.dSYM

# build script output
build/

# working paths
glweb171/
glweb/
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["vadimcn.vscode-lldb"]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -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": []
}
]
}
20 changes: 6 additions & 14 deletions Overlook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
78 changes: 78 additions & 0 deletions Overlook.xcodeproj/xcshareddata/xcschemes/Overlook.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2630"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "06000001"
BuildableName = "Overlook.app"
BlueprintName = "Overlook"
ReferencedContainer = "container:Overlook.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "06000001"
BuildableName = "Overlook.app"
BlueprintName = "Overlook"
ReferencedContainer = "container:Overlook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "06000001"
BuildableName = "Overlook.app"
BlueprintName = "Overlook"
ReferencedContainer = "container:Overlook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Empty file.
70 changes: 70 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
set -euo pipefail

CONFIG="Debug"

usage() {
cat <<EOF
Usage: $(basename "$0") [-c debug|release] [-- xcodebuild args...]

Options:
-c, --config Build configuration: debug (default) or release
-h, --help Show this help

Any arguments after -- are passed through to xcodebuild.
EOF
}

while [[ $# -gt 0 ]]; do
case "$1" in
-c|--config)
shift
[[ $# -gt 0 ]] || { echo "error: --config requires a value" >&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/"
Loading