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
59 changes: 59 additions & 0 deletions .github/workflows/macos-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: macOS Beta Build

on:
workflow_dispatch:

jobs:
build-macos-beta:
runs-on: macos-15

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Qt 5 from Homebrew
run: |
brew install qt@5
echo "$(brew --prefix qt@5)/bin" >> "$GITHUB_PATH"

- name: Show build environment
run: |
uname -m
which qmake
qmake -v
xcode-select -p

- name: Clean macOS build directory
run: rm -rf build/macos/*

- name: Build macOS test app
run: |
qmake -config release "CONFIG += release_macos build_original" QMAKE_APPLE_DEVICE_ARCHS=arm64
make clean
make -j"$(sysctl -n hw.ncpu)"
rm -rf build/macos/obj

- name: Deploy Qt runtime into app bundle
run: |
macdeployqt "build/macos/VESC Tool.app" -qmldir="$GITHUB_WORKSPACE" -verbose=2

- name: Sign app bundle
run: |
find "build/macos/VESC Tool.app/Contents/Frameworks" -type f \( -name '*.dylib' -o -path '*/Versions/5/*' \) -print0 | xargs -0 -I {} codesign --force --sign - "{}"
find "build/macos/VESC Tool.app/Contents/PlugIns" -type f -name '*.dylib' -print0 | xargs -0 -I {} codesign --force --sign - "{}"
codesign --force --sign - "build/macos/VESC Tool.app/Contents/MacOS/VESC Tool"
codesign --force --deep --sign - "build/macos/VESC Tool.app"
codesign --verify --deep --strict --verbose=2 "build/macos/VESC Tool.app"

- name: Package build output
run: |
cd build/macos
zip -r "vesc_tool_macos_test_${GITHUB_SHA::8}.zip" . -x "*.zip"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vesc-tool-macos-test-${{ github.sha }}
path: build/macos/*.zip
if-no-files-found: error
retention-days: 7
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ If you have custom hardware and you want to add support for it in the official r

**Note:** These instructions build VESC Tool without the BLDC firmwares bundled.

### macOS Beta Build with GitHub Actions

A manual GitHub Actions workflow is available for building an arm64 macOS test build.

1. Open the **Actions** tab in GitHub.
2. Select the **macOS Beta Build** workflow.
3. Click **Run workflow**.
4. Wait for the workflow to finish and download the generated artifact.
5. Unzip the artifact on a macOS machine to get `VESC Tool.app`.

The workflow is defined in `.github/workflows/macos-beta.yml` and builds the `build_original` variant using the repository default test version.

If macOS blocks the downloaded app because it has the quarantine attribute, remove it with:

```shell
xattr -dr com.apple.quarantine "VESC Tool.app"
```

After that, start the app again.

### Linux

Make sure that the required dependencies are installed. There is some advice in the [build_lin](./build_lin) file's comments. If you have Nix installed see below.
Expand Down
4 changes: 3 additions & 1 deletion vesc_tool.pro
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ macx {
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_OBJECTIVE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
}
}

ios {
Expand Down
Loading