Skip to content

Add macOS installation script for DroneCAN GUI Tool#102

Open
ryanjAA wants to merge 1 commit intodronecan:masterfrom
ryanjAA:patch-2
Open

Add macOS installation script for DroneCAN GUI Tool#102
ryanjAA wants to merge 1 commit intodronecan:masterfrom
ryanjAA:patch-2

Conversation

@ryanjAA
Copy link
Copy Markdown

@ryanjAA ryanjAA commented Nov 13, 2025

This script builds the DroneCAN GUI Tool for macOS, including installation of dependencies, creating a DMG installer, and handling application packaging.

This script builds the DroneCAN GUI Tool for macOS, including installation of dependencies, creating a DMG installer, and handling application packaging.
Copy link
Copy Markdown
Collaborator

@joshanne joshanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all the comments, I think the ability to allow a user to build any branch, instead of just v1.2.28.

I could see this being used in a github workflow to build the dmg/app.

# Builds a standalone .app and DMG using PyInstaller and Homebrew Python.
# This version vendors qtwidgets and patches it to use PyQt5.

set -e # Exit on any error
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be better to use:

Suggested change
set -e # Exit on any error
set -euo pipefail # Exit on any error/undefined vars; fail pipelines

it should fail for things like undefined variables, and fail on the first command in a pipeline if something errors.

# ---------------------------------------------------------------------------
# Configuration
# ---------------------------------------------------------------------------
BUILD_DIR="$HOME/dronecan_build_pyinstaller"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be at the top of the file, after set -e....

It would also be great if these were:

BUILD_DIR="${BUILD_DIR:-$HOME/dronecan_build_pyinstaller}"
REPO_URL="${REPO_URL:-https://github.com/DroneCAN/gui_tool.git}"
BRANCH="${BRANCH:-master}"
APP_NAME="${APP_NAME:-DroneCAN GUI Tool}"
DMG_NAME="${DMG_NAME:-DroneCAN-GUI-Tool-macOS}"

This allows the user to specify custom build dir, repo URL (if building from a forked repo) or branch (if building a non-default branch).

App Name and DMG name for completeness, but allows users to build for a custom name if necessary.

echo -e "${YELLOW}Upgrading pip/setuptools/wheel...${NC}"
pip install --upgrade pip setuptools wheel

echo -e "${YELLOW}Installing Python dependencies...${NC}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to ensure you've got pyserial installed?

# ---------------------------------------------------------------------------
# Clone the DroneCAN GUI Tool repo
# ---------------------------------------------------------------------------
echo -e "${YELLOW}Cloning DroneCAN GUI Tool repository...${NC}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be okay to merge as is - but i think we're conflating two different processes here.

The build process, and the acquisition of the macOS DMG/App Generate script.

Ultimately I think this should be similar to the windows build script, that generates an msi file as the end result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants