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
51 changes: 34 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<div align="center">
<p align="center">
<img alt="OrcaSlicer logo" src="resources/images/OrcaSlicer.png" width="15%">
</p>

<picture>
<img alt="OrcaSlicer logo" src="resources/images/OrcaSlicer.png" width="15%" height="15%">
</picture>
# OrcaSlicer — BambuNetwork edition

## This version of OrcaSlicer restores full BambuNetwork support for Bambu Lab printers.

You are not limited to LAN only.
It works over the internet just like before, through BambuNetwork, with full functionality for normal use and printing.
This version of OrcaSlicer restores full BambuNetwork support for Bambu Lab
printers. You are not limited to LAN only — it works over the internet just
like before, through BambuNetwork, with full functionality for normal use
and printing.

## Installation

### Windows

Windows requires WSL 2.

Before first launch, open Command Prompt or PowerShell as Administrator and run:
Windows requires WSL 2. Before the first launch, open Command Prompt or
PowerShell as Administrator and run:

```bat
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Expand All @@ -26,17 +25,35 @@ Restart Windows, then launch Orca Studio.

### Linux

On Linux, a normal installation is enough.
A normal installation is enough.

### macOS

Work in progress.
Supported on both Apple Silicon and Intel. On first launch OrcaSlicer
auto-installs a small Lima VM (`orcaslicer-bambu-network`) that runs the
Linux BambuNetwork plug-in under a native x86_64 Linux guest. You'll be
prompted to install the runtime when you launch the app for the first
time; accepting will:

- install Lima and `qemu-system-x86_64` via Homebrew if they're missing,
- bring up an Ubuntu x86_64 VM in the background,
- copy the BambuNetwork payload into the VM.

## BMCU
Once the runtime is ready, log in to Bambu Cloud normally — printers,
camera preview, and Send-to-Printer (cloud or LAN) all work as on other
platforms.

I also encourage you to use BMCU.
Notes:

You can find BMCU firmware in my repositories.
- The first runtime install downloads an Ubuntu cloud image and takes a
few minutes; subsequent launches are immediate.
- Building from source on macOS 15 (Tahoe) is supported via
`./build_release_macos.sh`. Ninja is the default generator; `-x`
switches to the Xcode generator if you have a full Xcode.app install.

## BMCU

</div>
The BMCU companion firmware is also encouraged. The firmware lives in a
separate repository in the upstream maintainer's account.
</content>
</invoke>
203 changes: 129 additions & 74 deletions build_release_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,122 @@ set -e
set -o pipefail
SECONDS=0

# Autotools-based dependencies (GMP, MPFR) don't inherit
# CMAKE_OSX_DEPLOYMENT_TARGET and pick up the host SDK by default. On macOS
# 15+ with Xcode 16+, that means they need SDKROOT pointed at the active SDK
# explicitly or their configure step fails. Export the active SDK path if the
# user hasn't already set one.
export SDKROOT="${SDKROOT:-$(xcrun --show-sdk-path)}"

# Check that the build-time tools the deps tree and slicer build need are
# actually on PATH. Failing here with an actionable `brew install` line is
# friendlier than letting the autotools deps step blow up halfway through
# with a cryptic "makeinfo: command not found" or similar. Pairs of
# "<tool>:<brew-package>"; the special "(Xcode Command Line Tools)" pseudo-
# package surfaces a CLT-install reminder rather than a brew command.
check_build_tools() {
local pair tool pkg
local missing_brew=""
local missing_xcode=0
for pair in \
"cmake:cmake" \
"ninja:ninja" \
"autoconf:autoconf" \
"automake:automake" \
"libtool:libtool" \
"pkg-config:pkg-config" \
"makeinfo:texinfo" \
"xcrun:(Xcode Command Line Tools)"; do
tool="${pair%%:*}"
pkg="${pair#*:}"
if command -v "$tool" >/dev/null 2>&1; then
continue
fi
if [ "${pkg#\(}" != "$pkg" ]; then
missing_xcode=1
echo "missing: $tool — install ${pkg}" >&2
else
missing_brew="${missing_brew:+$missing_brew }${pkg}"
fi
done
if [ -n "$missing_brew" ]; then
echo "missing build tools: ${missing_brew}" >&2
echo "install with:" >&2
echo " brew install ${missing_brew}" >&2
fi
if [ -n "$missing_brew" ] || [ "$missing_xcode" -ne 0 ]; then
exit 1
fi
}
check_build_tools

while getopts ":dpa:snt:xbc:i:1Tuh" opt; do
case "${opt}" in
d )
export BUILD_TARGET="deps"
;;
p )
export PACK_DEPS="1"
;;
a )
export ARCH="$OPTARG"
;;
s )
export BUILD_TARGET="slicer"
;;
n )
export NIGHTLY_BUILD="1"
;;
t )
export OSX_DEPLOYMENT_TARGET="$OPTARG"
;;
x )
export SLICER_CMAKE_GENERATOR="Ninja Multi-Config"
export SLICER_BUILD_TARGET="all"
export DEPS_CMAKE_GENERATOR="Ninja"
;;
b )
export BUILD_ONLY="1"
;;
c )
export BUILD_CONFIG="$OPTARG"
;;
i )
export CMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH:+$CMAKE_IGNORE_PREFIX_PATH;}$OPTARG"
;;
1 )
export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
T )
export BUILD_TESTS="1"
;;
u )
export BUILD_TARGET="universal"
;;
h ) echo "Usage: ./build_release_macos.sh [-d]"
echo " -d: Build deps only"
echo " -a: Set ARCHITECTURE (arm64 or x86_64 or universal)"
echo " -s: Build slicer only"
echo " -u: Build universal app only (requires existing arm64 and x86_64 app bundles)"
echo " -n: Nightly build"
echo " -t: Specify minimum version of the target platform, default is 11.3"
echo " -x: Use Ninja Multi-Config CMake generator, default is Xcode"
echo " -b: Build without reconfiguring CMake"
echo " -c: Set CMake build configuration, default is Release"
echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew"
echo " -1: Use single job for building"
echo " -T: Build and run tests"
exit 0
;;
* )
;;
esac
case "${opt}" in
d)
export BUILD_TARGET="deps"
;;
p)
export PACK_DEPS="1"
;;
a)
export ARCH="$OPTARG"
;;
s)
export BUILD_TARGET="slicer"
;;
n)
export NIGHTLY_BUILD="1"
;;
t)
export OSX_DEPLOYMENT_TARGET="$OPTARG"
;;
x)
# Opt into the Xcode generator. Default is Ninja because the
# Xcode generator requires a full Xcode.app install (not just
# the Command Line Tools), and tends to fail with
# "No CMAKE_C_COMPILER could be found" on machines that have
# only CLT.
export SLICER_CMAKE_GENERATOR="Xcode"
export SLICER_BUILD_TARGET="ALL_BUILD"
export DEPS_CMAKE_GENERATOR="Unix Makefiles"
;;
b)
export BUILD_ONLY="1"
;;
c)
export BUILD_CONFIG="$OPTARG"
;;
i)
export CMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH:+$CMAKE_IGNORE_PREFIX_PATH;}$OPTARG"
;;
1)
export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
T)
export BUILD_TESTS="1"
;;
u)
export BUILD_TARGET="universal"
;;
h)
echo "Usage: ./build_release_macos.sh [-d]"
echo " -d: Build deps only"
echo " -a: Set ARCHITECTURE (arm64 or x86_64 or universal)"
echo " -s: Build slicer only"
echo " -u: Build universal app only (requires existing arm64 and x86_64 app bundles)"
echo " -n: Nightly build"
echo " -t: Specify minimum version of the target platform, default is 11.3"
echo " -x: Use the Xcode CMake generator (default is Ninja; Xcode generator needs a full Xcode.app install, Ninja works with just Command Line Tools)"
echo " -b: Build without reconfiguring CMake"
echo " -c: Set CMake build configuration, default is Release"
echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew"
echo " -1: Use single job for building"
echo " -T: Build and run tests"
exit 0
;;
*)
;;
esac
done

if [ -z "$ARCH" ]; then
Expand All @@ -73,40 +128,40 @@ if [ -z "$ARCH" ]; then
fi

if [ -z "$BUILD_CONFIG" ]; then
export BUILD_CONFIG="Release"
export BUILD_CONFIG="Release"
fi

if [ -z "$BUILD_TARGET" ]; then
export BUILD_TARGET="all"
export BUILD_TARGET="all"
fi

if [ -z "$SLICER_CMAKE_GENERATOR" ]; then
export SLICER_CMAKE_GENERATOR="Xcode"
export SLICER_CMAKE_GENERATOR="Ninja Multi-Config"
fi

if [ -z "$SLICER_BUILD_TARGET" ]; then
export SLICER_BUILD_TARGET="ALL_BUILD"
export SLICER_BUILD_TARGET="all"
fi

if [ -z "$DEPS_CMAKE_GENERATOR" ]; then
export DEPS_CMAKE_GENERATOR="Unix Makefiles"
export DEPS_CMAKE_GENERATOR="Ninja"
fi

if [ -z "$OSX_DEPLOYMENT_TARGET" ]; then
export OSX_DEPLOYMENT_TARGET="11.3"
export OSX_DEPLOYMENT_TARGET="11.3"
fi

if [ -z "$CMAKE_IGNORE_PREFIX_PATH" ]; then
export CMAKE_IGNORE_PREFIX_PATH="/opt/local:/usr/local:/opt/homebrew"
export CMAKE_IGNORE_PREFIX_PATH="/opt/local:/usr/local:/opt/homebrew"
fi

CMAKE_VERSION=$(cmake --version | head -1 | sed -E 's/[^0-9]*([0-9]+).*/\1/')
if [ "$CMAKE_VERSION" -ge 4 ] 2>/dev/null; then
export CMAKE_POLICY_VERSION_MINIMUM=3.5
export CMAKE_POLICY_COMPAT="-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
echo "Detected CMake 4.x, adding compatibility flag (env + cmake arg)"
export CMAKE_POLICY_VERSION_MINIMUM=3.5
export CMAKE_POLICY_COMPAT="-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
echo "Detected CMake 4.x, adding compatibility flag (env + cmake arg)"
else
export CMAKE_POLICY_COMPAT=""
export CMAKE_POLICY_COMPAT=""
fi

echo "Build params:"
Expand Down Expand Up @@ -204,7 +259,7 @@ build_deps() {
mkdir -p "$DEPS"
cd "$DEPS_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake "${DEPS_DIR}" -G "${DEPS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" -DCMAKE_OSX_ARCHITECTURES:STRING="${_ARCH}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" ${CMAKE_POLICY_COMPAT}
cmake "${DEPS_DIR}" -G "${DEPS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" -DCMAKE_OSX_ARCHITECTURES:STRING="${_ARCH}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" ${CMAKE_POLICY_COMPAT}
fi
cmake --build . --config "$BUILD_CONFIG" --target deps
)
Expand Down Expand Up @@ -234,7 +289,7 @@ build_slicer() {
mkdir -p "$PROJECT_BUILD_DIR"
cd "$PROJECT_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake "${PROJECT_DIR}" -G "${SLICER_CMAKE_GENERATOR}" -DORCA_TOOLS=ON ${ORCA_UPDATER_SIG_KEY:+-DORCA_UPDATER_SIG_KEY="$ORCA_UPDATER_SIG_KEY"} ${BUILD_TESTS:+-DBUILD_TESTS=ON} -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" ${CMAKE_POLICY_COMPAT}
cmake "${PROJECT_DIR}" -G "${SLICER_CMAKE_GENERATOR}" -DORCA_TOOLS=ON ${ORCA_UPDATER_SIG_KEY:+-DORCA_UPDATER_SIG_KEY="$ORCA_UPDATER_SIG_KEY"} ${BUILD_TESTS:+-DBUILD_TESTS=ON} -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" ${CMAKE_POLICY_COMPAT}
fi
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
cmake --install . --config "$BUILD_CONFIG"
Expand Down Expand Up @@ -362,4 +417,4 @@ fi
elapsed=$SECONDS
printf "
Build completed in %dh %dm %ds
" $((elapsed/3600)) $((elapsed%3600/60)) $((elapsed%60))
" $((elapsed / 3600)) $((elapsed % 3600 / 60)) $((elapsed % 60))
Loading