Skip to content

Building from source Windows

BenJule edited this page May 31, 2026 · 2 revisions

Building BambuStudio on Windows


Prerequisites

System Requirements

Component Minimum Recommended
Windows 10 (1903) 11
CPU x86_64 4-core x86_64 8-core / ARM64
RAM 8 GB 16 GB
Disk 30 GB free 50 GB free

Required Tools

Install the following in order:

  1. Visual Studio 2022 (Community edition is free)

    • Workload: Desktop development with C++
    • Components: MSVC v143, Windows 11 SDK, CMake tools
  2. Git for Windowshttps://git-scm.com/download/win

  3. Git LFShttps://git-lfs.github.com/

  4. CMake (3.25+) — https://cmake.org/download/

  5. Ninjahttps://github.com/ninja-build/ninja/releases

    • Add to PATH
  6. gettext (for translations) — Install via winget install GnuWin32.GetText or GnuWin32


Clone the Repository

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

Build

Step 1 — Open Developer Command Prompt

Use x64 Native Tools Command Prompt for VS 2022 (found in Start Menu under Visual Studio 2022). This sets up the MSVC toolchain environment.

Step 2 — Build Dependencies

BuildWindows.bat -d

This builds all C++ dependencies into deps\build\destdir\. First run takes 60–120 min.

Step 3 — Build BambuStudio

BuildWindows.bat -s

Step 4 — Create the Installer

BuildWindows.bat -p

Output: build\BambuStudio_*.exe (NSIS installer)


ARM64 (Windows on ARM)

BambuStudio is built for both x64 and ARM64 in CI. To build for ARM64 locally, use the ARM64 Native Tools Command Prompt for VS 2022 and pass the architecture flag:

cmake -S . -B build -G Ninja ^
  -DCMAKE_BUILD_TYPE=Release ^
  -A ARM64 ^
  -DCMAKE_PREFIX_PATH=deps\build\destdir\usr\local

CI Platforms

Platform Architecture Workflow
Windows Server 2022 x64 ci-build.yml
Windows 11 ARM ARM64 ci-build.yml

Manual CMake Build

:: From the x64 Native Tools Command Prompt

cmake -S . -B build -G Ninja ^
  -DCMAKE_BUILD_TYPE=Release ^
  -DBBL_RELEASE_TO_PUBLIC=1 ^
  -DCMAKE_PREFIX_PATH=deps\build\destdir\usr\local

cmake --build build --target BambuStudio --parallel %NUMBER_OF_PROCESSORS%

Installer Packaging (NSIS)

BambuStudio uses NSIS for its Windows installer. Install NSIS 3.x from https://nsis.sourceforge.io/ and add it to PATH.

The installer script is in resources/nsis/. It is called automatically by BuildWindows.bat -p.


Troubleshooting

cl.exe: error C1060: compiler is out of heap space

Reduce parallel build jobs:

cmake --build build --target BambuStudio --parallel 2

Or add more RAM or a larger page file.

cmake: command not found

CMake was not added to PATH during installation. Re-run the CMake installer and check Add CMake to the system PATH.

Linker error: LINK : fatal error LNK1181: cannot open input file

The deps build did not complete successfully. Re-run BuildWindows.bat -d and check for errors.

git lfs not installed — binary files are 134 bytes

winget install GitHub.GitLFS
git lfs install
git lfs pull

Antivirus interfering with build

Some antivirus software quarantines build outputs. Add the repository directory to your AV exclusion list.

Clone this wiki locally