Skip to content

Mac Compile Guide

Lane.Wei edited this page Jul 15, 2022 · 10 revisions

Enviroment setup

Install Following tools:

building the deps

Suppose you download the codes into /Users/username/work/projects/BambuStudio
create a directory to store the dependence built: /Users/username/work/projects/BambuStudio_dep

cd BambuStudio/deps
mkdir build;cd build

for arm64 architecture
cmake ../ -DDESTDIR="/Users/username/codes/BambuStudio" -DOPENSSL_ARCH="darwin64-arm64-cc"
for x86 architeccture
cmake ../ -DDESTDIR="/Users/username/codes/BambuStudio" -DOPENSSL_ARCH="darwin64-x86_64-cc"
make -j N (N can be a number between 1 and the max cpu number)

building the Bambu Studio

create a directory to store the installed files at D:/work/Projects/BambuStudio/install_dir
cd BambuStudio
mkdir install_dir
mkdir build;cd build

building it use cmake
cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/codes/BambuStudio/usr/local" -DCMAKE_INSTALL_PREFIX="../install_release" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/codes/BambuStudio/usr/local"
cmake --build . --target install --config Release

building it use xcode
cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/codes/BambuStudio/usr/local" -DCMAKE_INSTALL_PREFIX="../install_release" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/codes/BambuStudio/usr/local"
then building it using Xcode

Clone this wiki locally