Skip to content
Open
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
102 changes: 102 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Xcode: Check Toolchain",
"type": "shell",
"command": "xcode-select",
"args": [
"-p"
],
"options": {
"cwd": "${workspaceFolder}"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"clear": true
},
"problemMatcher": []
},
{
"label": "Xcode: Build Debug",
"type": "shell",
"command": "xcodebuild",
"args": [
"-project",
"${workspaceFolder}/LidAngleSensor.xcodeproj",
"-scheme",
"LidAngleSensor",
"-configuration",
"Debug",
"-destination",
"platform=macOS",
"-derivedDataPath",
"${workspaceFolder}/build",
"CODE_SIGNING_ALLOWED=NO",
"build"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "shared",
"clear": true
},
"problemMatcher": "$gcc"
},
{
"label": "Xcode: Run App",
"type": "shell",
"command": "open",
"args": [
"${workspaceFolder}/build/Build/Products/Debug/LidAngleSensor.app"
],
"options": {
"cwd": "${workspaceFolder}"
},
"dependsOn": [
"Xcode: Build Debug"
],
"dependsOrder": "sequence",
"presentation": {
"reveal": "always",
"panel": "shared",
"clear": false
},
"problemMatcher": []
},
{
"label": "Xcode: Clean",
"type": "shell",
"command": "xcodebuild",
"args": [
"-project",
"${workspaceFolder}/LidAngleSensor.xcodeproj",
"-scheme",
"LidAngleSensor",
"-configuration",
"Debug",
"-destination",
"platform=macOS",
"-derivedDataPath",
"${workspaceFolder}/build",
"clean"
],
"options": {
"cwd": "${workspaceFolder}"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"clear": true
},
"problemMatcher": "$gcc"
}
]
}
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,27 @@ Yes, never click "Start Audio". But this energy isn't encouraged.

According to [this issue](https://github.com/samhenrigold/LidAngleSensor/issues/12), building requires having Xcode installed. I've only tested this on Xcode 26. YMMV.

## Using VS Code

You can use VS Code as your editor and task runner, but you still need the full `Xcode.app` toolchain installed for `xcodebuild`.

1. Install Xcode from the App Store.
2. Point the active developer directory to Xcode:

```shell
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
```

3. Open this folder in VS Code.
4. Run `Terminal > Run Task` and use one of the bundled tasks:
- `Xcode: Check Toolchain`
- `Xcode: Build Debug`
- `Xcode: Run App`
- `Xcode: Clean`

Build artifacts are written to `build/`, which is ignored by git.

## Installation

Via Homebrew:
Expand Down