Update build doc and remove unnecessary doc files

This commit is contained in:
Martin Šach 2026-07-21 13:18:34 +02:00 • committed by Martin Šach
parent 23734b9be9
commit 1cb02df782
12 changed files with 59 additions and 388 deletions

View file

@ -12,7 +12,7 @@ The **recommended installation method** is to go to the [PrusaSlicer project pag
**Alternatively**, for Windows and macOS, you can download the software directly from the [GitHub releases page](https://github.com/prusa3d/PrusaSlicer/releases). For Linux, PrusaSlicer is currently distributed exclusively through [Flathub](https://flathub.org/en/apps/com.prusa3d.PrusaSlicer).
If you prefer, you can always build PrusaSlicer yourself from source. See the [documentation](doc/) to learn how to do it.
If you prefer, you can always build PrusaSlicer yourself from source. See the [documentation](doc/Build.md) to learn how to do it.
### Main features

58
doc/Build.md Normal file
View file

@ -0,0 +1,58 @@
# Building from source
These are the build steps for Windows, MacOS and Linux. Depending on your hardware the dependencies compilation may take a significant amount of time (hours). PrusaSlicer compilation is also not instant.
## 0. Prerequisites
### Windows
- `Microsoft Visual Studio`
- `CMake`
- `git`.
### MacOS
```bash
brew update && brew install automake cmake git gettext libtool texinfo
```
### Linux
For example on Ubuntu 26.04:
```bash
sudo apt install git build-essential autoconf cmake libglu1-mesa-dev libgtk-3-dev libdbus-1-dev libwebkit2gtk-4.1-dev texinfo
```
Adapt it for your package manager.
## 1. Build dependencies
From the repository root:
```bash
cd deps
mkdir build
cd build
cmake ..
cmake --build .
```
## 1.1 Ensure dependencies build succeeded
After the dependencies build finishes, run `cmake --build .` again. It should be close to instant, **complete successfully** and no additional work should be done. For example, using `make`, it should say something along the lines of:
```
make: Nothing to be done for 'all'.
```
## 2. Build PrusaSlicer
From the repository root:
```bash
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="../deps/build/destdir/usr/local"
cmake --build .
```
## 3. Run tests (optional)
From the repository root:
```bash
cd build
ctest
```
## Advanced build options
The standard `CMAKE_BUILD_TYPE` option is supported. Furthermore there are several more build options provided by PrusaSlicer. These options have the `SLIC3R_` prefix and can be passed to cmake during in the `Build PrusaSlicer` step. E.g.:
```bash
cmake .. -DSLIC3R_ASAN=ON -DCMAKE_PREFIX_PATH="../deps/build/destdir/usr/local"
```
See the main CMakeLists.txt for the full list.

View file

@ -1,34 +0,0 @@
# Dependency report for PrusaSlicer
## Possible dynamic linking on Linux
* zlib: Strict dependency required from the system, linked dynamically. Many other libs depend on zlib.
* wxWidgets >= 3.2
* libcurl
* tbb
* boost
* eigen
* glew
* expat
* openssl
* nlopt
* openvdb: This library depends on other libs, namely boost, zlib, openexr, blosc (not strictly), etc...
* CGAL: Needs additional dependencies
* MPFR
* GMP
## External libraries in source tree
* ad-mesh: Lots of customization, have to be bundled in the source tree.
* avrdude: Like ad-mesh, many customization, need to be in the source tree.
* clipper: An important library we have to have full control over it. We also have some slicer specific modifications.
* glu-libtess: This is an extract of the mesa/glu library not officially available as a package.
* imgui: no packages for debian, author suggests using in the source tree
* miniz: No packages, author suggests using in the source tree
* qhull: libqhull-dev does not contain libqhullcpp => link errors. Until it is fixed, we will use the builtin version. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925540
* semver: One module C library, author expects to use clib for installation. No packages.
## Header only
* igl
* nanosvg
* agg
* catch2: Only Arch has packages for catch2, other distros at most catch (v1.x). Being strictly header only, we bundle this in the source tree. Used for the unit-test suites.

View file

@ -1,68 +0,0 @@
# Building PrusaSlicer on UNIX/Linux
Please understand that PrusaSlicer team cannot support compilation on all possible Linux distros. Namely, we cannot help troubleshoot OpenGL driver issues or dependency issues if compiled against distro provided libraries. **We can only support PrusaSlicer statically linked against the dependencies compiled with the `deps` scripts**, the same way we compile PrusaSlicer for our Flatpak bundle.
If you have some reason to link dynamically to your system libraries, you are free to do so, but we can not and will not troubleshoot any issues you possibly run into.
## Prerequisities
GNU build tools, CMake, git and other libraries have to be installed on the build machine.
Unless that's already the case, install them as usual from your distribution packages.
E.g. on Ubuntu 26.04, run
```shell
sudo apt install \
git \
build-essential \
autoconf \
cmake \
libglu1-mesa-dev \
libgtk-3-dev \
libdbus-1-dev \
libwebkit2gtk-4.1-dev \
texinfo
```
The names of the packages may be different on different distros.
## Building dependencies and PrusaSlicer
This is a complete list of commands needed to build PrusaSlicer:
```
git clone https://www.github.com/prusa3d/PrusaSlicer
cd PrusaSlicer
cd deps
mkdir build
cd build
cmake ..
cmake --build .
cd ../..
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=$(pwd)/../deps/build/destdir/usr/local
cmake --build .
```
In short, there are two steps. First you download deps sources and build them. Then you build PrusaSlicer, pointing it to the dependencies you just built. The application is linked statically.
## Useful CMake flags when building PrusaSlicer
- `-DCMAKE_BUILD_TYPE=Debug` to build in debug mode (defaults to `Release`)
- `-DSLIC3R_ASAN=ON` enables gcc/clang address sanitizer (defaults to `OFF`, requires gcc>4.8 or clang>3.1)
- `-DSLIC3R_STATIC=OFF` for dynamic builds (defaults to `ON`)
- `-DSLIC3R_GUI=0` to build the console variant of PrusaSlicer
See the root CMakeLists.txt to get the complete list of options.
## Running Unit Tests
To run all unit tests:
cd build
ctest
Each test has a separate binary, the test cases are labeled. It is possible to invoke subset of available test cases and passing the label as a filter:
./fff_tests [LabelUsedForFiltering]

View file

@ -1,163 +0,0 @@
# Building PrusaSlicer on macOS
To build PrusaSlicer on macOS, you will need Xcode, which is available through Apple's App Store. In addition, you will need couple of other tools, all of which are available through [brew](https://brew.sh/): use
```
brew update
brew install automake cmake git gettext libtool texinfo m4 zlib
brew upgrade
```
to install them.
It may help to skim over this document's [Troubleshooting](#troubleshooting)](#troubleshooting) first, as you may find helpful workarounds documented there.
### Dependencies
PrusaSlicer comes with a set of CMake scripts to build its dependencies, it lives in the `deps` directory.
Open a terminal window and navigate to the PrusaSlicer sources directory.
Use the following commands to build the dependencies:
cd deps
mkdir build
cd build
cmake ..
make
This will create a dependencies bundle inside the `build/destdir` directory.
You can also customize the bundle output path using the `-DDESTDIR=<some path>` option passed to `cmake`.
**Warning**: Once the dependency bundle is installed in a destdir, the destdir cannot be moved elsewhere.
(This is because wxWidgets hardcodes the installation path.)
### Building PrusaSlicer
If dependencies are built without errors, you can proceed to build PrusaSlicer itself.
Go back to top level PrusaSlicer sources directory and use these commands:
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
The `CMAKE_PREFIX_PATH` is the path to the dependencies bundle but with `/usr/local` appended - if you set a custom path
using the `DESTDIR` option, you will need to change this accordingly. **Warning:** the `CMAKE_PREFIX_PATH` needs to be an absolute path.
The CMake command above prepares PrusaSlicer for building from the command line.
To start the build, use
make -jN
where `N` is the number of CPU cores, so, for example `make -j4` for a 4-core machine.
Alternatively, if you would like to use Xcode GUI, modify the `cmake` command to include the `-GXcode` option:
cmake .. -GXcode -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
and then open the `PrusaSlicer.xcodeproj` file.
This should open up Xcode where you can perform build using the GUI or perform other tasks.
### Running Unit Tests
For the most complete unit testing, use the Debug build option `-DCMAKE_BUILD_TYPE=Debug` when running cmake.
Without the Debug build, internal assert statements are not tested.
To run all the unit tests:
cd build
make test
To run a specific unit test:
cd build/tests/
The unit tests can be found by
`ls */*_tests`
Any of these unit tests can be run directly e.g.
`./fff_print/fff_print_tests`
### Note on macOS SDKs
By default PrusaSlicer builds against whichever SDK is the default on the current system.
This can be customized. The `CMAKE_OSX_SYSROOT` option sets the path to the SDK directory location
and the `CMAKE_OSX_DEPLOYMENT_TARGET` option sets the target OS X system version (eg. `10.14` or similar).
Note you can set just one value and the other will be guessed automatically.
In case you set both, the two settings need to agree with each other. (Building with a lower deployment target
is currently unsupported because some of the dependencies don't support this, most notably wxWidgets.)
Please note that the `CMAKE_OSX_DEPLOYMENT_TARGET` and `CMAKE_OSX_SYSROOT` options need to be set the same
on both the dependencies bundle as well as PrusaSlicer itself.
Official macOS PrusaSlicer builds are currently (as of PrusaSlicer 2.5) built against SDK 10.12 to ensure compatibility with older systems.
_Warning:_ Xcode may be set such that it rejects SDKs bellow some version (silently, more or less).
This is set in the property list file
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
To remove the limitation, simply delete the key `MinimumSDKVersion` from that file.
## Troubleshooting
### `CMath::CMath` target not found
At the moment (20.2.2024) PrusaSlicer cannot be built with CMake 3.28+. Use [CMake 3.27](https://github.com/Kitware/CMake/releases/tag/v3.27.9) instead.
If you install the CMake application from [universal DMG](https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-macos-universal.dmg), you can invoke the CMake like this:
```
/Applications/CMake.app/Contents/bin/cmake
```
### Running `cmake -GXcode` fails with `No CMAKE_CXX_COMPILER could be found.`
- If Xcode command line tools wasn't already installed, run:
```
sudo xcode-select --install
```
- If Xcode command line tools are already installed, run:
```
sudo xcode-select --reset
```
### Xcode keeps trying to install `m4` or the process complains about no compatible `m4` found.
Ensure the homebrew installed `m4` is in front of any other installed `m4` on your system.
_e.g._ `echo 'export PATH="/opt/homebrew/opt/m4/bin:$PATH"' >> ~/.bash_profile`
### `cmake` complains that it can't determine the build deployment target
If you see a message similar this, you can fix it by adding an argument like this `-DCMAKE_OSX_DEPLOYMENT_TARGET=14.5` to the `cmake` command. Ensure that you give it the macOS version that you are building for.
# TL;DR
Works on a fresh installation of macOS Sequoia 15.5
- Install [brew](https://brew.sh/):
- Open Terminal
- Enter:
```
brew update
brew install automake cmake git gettext libtool texinfo m4 zlib
brew upgrade
git clone https://github.com/prusa3d/PrusaSlicer/
cd PrusaSlicer/deps
mkdir build
cd build
cmake ..
make
cd ../..
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
make
src/prusa-slicer
```

View file

@ -1,70 +0,0 @@
# Building PrusaSlicer on Windows
## 0. Prerequisities
The following tools need to be installed on your computer:
- Microsoft Visual Studio
- CMake
- git
## 1. Download sources
Clone the respository. Use a directory relatively close to the drive root, so the path is not too long. Avoid spaces and non-ASCII characters. To place it in `C:\src\PrusaSlicer`, run:
```
c:> mkdir src
c:> cd src
c:\src> git clone https://github.com/prusa3d/PrusaSlicer.git
```
## 2. Build the dependencies.
Dependencies are seldom updated, so they are built out of PrusaSlicer source tree.
Open the MSVC x64 Native Tools Command Prompt and run the following:
```
cd c:\src\PrusaSlicer\deps
mkdir build
cd build
cmake ..
cmake --build .
```
Expect this to take some time. Note that both _Debug_ and _Release_ variants are built. You can force only the _Release_ build by passing `-DDEP_DEBUG=OFF` to the first CMake call.
# 3. Generate MSVC project file for PrusaSlicer
The dependencies that were just built need to be referenced here.
Open the MSVC x64 Native Tools Command Prompt and run:
```
cd c:\src\PrusaSlicer\
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="c:\src\PrusaSlicer\deps\build\destdir\usr\local"
```
Note that `CMAKE_PREFIX_PATH` must be absolute path. A relative path will not work.
## 4. Open the project and build PrusaSlicer
Double-click c:\src\PrusaSlicer\build\PrusaSlicer.sln to open in Visual Studio and select `slic3r-app-launcher` as your startup project (right-click->Set as Startup Project). You can now build and run the application from within MSVC.
# Running Unit Tests
To run all unit tests:
cd c:\src\PrusaSlicer\build
ctest
Each test has a separate binary, the test cases are labeled. It is possible to invoke subset of available test cases and passing the label as a filter:
fff_tests.exe [LabelUsedForFiltering]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View file

@ -1,52 +0,0 @@
# Slic3r PE 1.40 configuration update
Slic3r PE 1.40.0 comes with a major re-work of the way configuration presets work.
There are three new features:
+ A two-tier system of presets being divided into _System_ and _User_ groups
+ Configuration snapshots
+ Configuration updating from the internet
## System and User presets
- _System preset_: These are the presets that come with Slic3r PE installation. They come from a vendor configuration bundle (not individual files like before). They are **read-only** – a user cannot modify them, but may instead create a derived User preset based on a System preset
- _User preset_: These are regular presets stored in files just like before. Additionally, they may be derived (inherited) from one of the System presets
A derived User preset keeps track of which settings are inherited from the parent System preset and which are modified by the user. When a system preset is updated (either via installation of a new Slic3r or automatically from the internet), in a User preset the settings that are modified by the user will stay that way, while the ones that are inherited reflect the updated System preset.
This system ensures that we don't overwrite user's settings when there is an update to the built in presets.
Slic3r GUI now displays accurately which settings are inherited and which are modified.
A setting derived from a System preset is represented by green label and a locked lock icon:
![a system setting](setting_sys.png)
A settings modified in a User preset has an open lock icon:
![a user setting](setting_user.png)
Clicking the open lock icon restores the system setting.
Additionally, any setting that is modified but not yet saved onto disk is represented by orange label and a back-arrow:
![a modified setting](setting_mod.png)
Clicking the back-arrow restores the value that was previously saved in this Preset.
## Configuration snapshots
Configuration snapshots can now be taken via the _Configuration_ menu.
A snapshot contains complete configuration from the point when the snapshot was taken.
Users may move back and forth between snapshots at will using a dialog:
![snapshots dialog](snapshots_dialog.png)
# Updating from the internet
Slic3r PE 1.40.0 checks for updates of the built-in System presets and downloads them.
The first-time configuration assistant will ask you if you want to enable this feature - it is **not** mandatory.
Updates are checked for and downloaded in the background. If there's is an update, Slic3r will prompt about it
next time it is launched, never during normal program operation. An update may be either accepted or refused.
Before any update is applied a configuration snapshot (as described above) is taken.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB