Skip to content

Building from source macOS

BenJule edited this page May 31, 2026 · 2 revisions

Building BambuStudio on macOS


Prerequisites

System Requirements

Component Minimum Recommended
macOS 13 Ventura 15 Sequoia
Xcode 14 16
RAM 8 GB 16 GB
Disk 30 GB free 50 GB free

Install Tools

# Install Xcode Command Line Tools
xcode-select --install

# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install build tools
brew install cmake ninja git-lfs gettext

Clone the Repository

git clone https://github.com/BenJule/BambuStudio.git
cd BambuStudio
git lfs pull

Build

Step 1 — Build Dependencies

./BuildMac.sh -d

Builds all C++ dependencies into deps/build/destdir/. Takes ~60–90 min on first run, cached thereafter.

Step 2 — Build BambuStudio

./BuildMac.sh -s

Step 3 — Create the App Bundle

./BuildMac.sh -p

Output: build/BambuStudio.app

Launch directly:

open build/BambuStudio.app

Universal Binary (Intel + Apple Silicon)

CI produces a universal binary (arm64;x86_64) that runs natively on both architectures. To build locally for your native arch only (faster):

cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DBBL_RELEASE_TO_PUBLIC=1 \
  -DCMAKE_PREFIX_PATH="$(pwd)/deps/build/destdir/usr/local"
cmake --build build --target BambuStudio --parallel $(sysctl -n hw.logicalcpu)

To build a universal binary locally:

cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
  -DCMAKE_PREFIX_PATH="$(pwd)/deps/build/destdir/usr/local"

CI Platforms

Platform Architecture Workflow
macOS 15 Intel x86_64 ci-build-macos.yml
macOS 15 ARM Universal arm64 + x86_64 ci-build-macos.yml

Code Signing

For local development, signing is not required. For distribution:

# Ad-hoc signing (local use only)
codesign --force --deep -s - build/BambuStudio.app

# Distribution signing (requires Apple Developer ID Certificate)
codesign --force --deep \
  --sign "Developer ID Application: Your Name (TEAMID)" \
  --options runtime \
  build/BambuStudio.app

# Notarize for macOS Gatekeeper
xcrun notarytool submit BambuStudio.dmg \
  --apple-id your@apple.id \
  --team-id TEAMID \
  --password APP_SPECIFIC_PASSWORD \
  --wait

Troubleshooting

xcrun: error: unable to find utility "cmake"

xcode-select --install
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Build fails with OpenSSL errors

brew reinstall openssl@3
export OPENSSL_ROOT_DIR="$(brew --prefix openssl@3)"

App shows "damaged" warning on first launch

codesign --force --deep -s - build/BambuStudio.app
xattr -cr build/BambuStudio.app

Apple Silicon: Bad CPU type error

The binary was built for x86_64 only. Build a universal binary or build natively for arm64 using the CMake flags above.

Clone this wiki locally