Skip to content

Linux Compile Guide

Lane.Wei edited this page Feb 21, 2023 · 21 revisions

Environment setup

Ubuntu

Install Following tools before building:

sudo apt-get install cmake git g++ build-essential libgl1-mesa-dev m4 libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.0-dev libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-bad libosmesa6-dev

gstreamer1.0-plugins-bad will provide the h264 decoder in gstreamer for liveview

Fedora

Install Following tools before building:
sudo dnf install gcc gcc-c++ cmake
sudo dnf install mesa-libGL-devel mesa-libGLU-devel
sudo dnf install m4
sudo dnf install perl
sudo dnf install extra-cmake-modules
sudo dnf install wayland-devel wayland-protocols-devel libxkbcommon-devel
sudo dnf install gtk3-dev webkit2gtk3-devel
sudo dnf install gstreamer1-devel gstreamer1-plugins-base-devel
sudo dnf install gstreamer1-plugin-openh264 #for linux liveview decoder requirement
sudo dnf install mesa-libOSMesa-devel

building the deps

You need to build the dependence of BambuStudio first. (Only needs for the first time)

Suppose you download the codes into /home/username/work/projects/BambuStudio
create a directory to store the dependence built: /home/username/work/projects/BambuStudio_dep
(Please make sure to replace the username with the one on your computer)

cd BambuStudio/deps
mkdir build;cd build

cmake ../ -DDESTDIR="/home/_username_/work/projects/BambuStudio_dep" -DCMAKE_BUILD_TYPE=Release -DDEP_WX_GTK3=1
make -jN (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 /home/username/work/projects/BambuStudio/install_dir
cd BambuStudio
mkdir install_dir
mkdir build;cd build

cmake .. -DSLIC3R_STATIC=ON -DSLIC3R_GTK=3 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/home/_username_/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release cmake --build . --target install --config Release -jN (N can be a number between 1 and the max cpu number)

Currently these steps have been verified on ubuntu and fedora,
For more Linux Platforms or script building, we can find the details or help at Bambustudio build for linux(Thanks to all the contributors)
and we will update more details later on this Page.

using scripts under ubuntu

currently we support build it using scripts under ubuntu
just execute following commands
cd BambuStudio
./BuildLinux.sh -dsi
the binary and appimage will be generated

Clone this wiki locally