mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 05:54:03 -06:00
Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
This commit is contained in:
parent
e1528e4299
commit
e9e4d75877
267 changed files with 10326 additions and 32228 deletions
|
@ -1,35 +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: searches for wx-3.1 by default, but with cmake option `SLIC3R_WX_STABLE=ON` it will use wx-3.0 bundled with most distros.
|
||||
* 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.
|
||||
* Shiny: 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.
|
||||
|
||||
|
|
@ -1,131 +1,4 @@
|
|||
|
||||
# Building PrusaSlicer on UNIX/Linux
|
||||
# Building Bambu Studio 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 [binary builds](https://github.com/prusa3d/PrusaSlicer/releases).
|
||||
|
||||
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.
|
||||
|
||||
Instead of compiling PrusaSlicer from source code, one may also consider to install PrusaSlicer [pre-compiled by contributors](https://github.com/prusa3d/PrusaSlicer/wiki/PrusaSlicer-on-Linux---binary-distributions).
|
||||
|
||||
## Step by step guide
|
||||
|
||||
This guide describes building PrusaSlicer statically against dependencies pulled by our `deps` script. Running all the listed commands in order should result in successful build.
|
||||
|
||||
#### 0. 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 20.10, run
|
||||
```shell
|
||||
sudo apt-get install -y \
|
||||
git \
|
||||
build-essential \
|
||||
autoconf \
|
||||
cmake \
|
||||
libglu1-mesa-dev \
|
||||
libgtk-3-dev \
|
||||
libdbus-1-dev \
|
||||
|
||||
```
|
||||
The names of the packages may be different on different distros.
|
||||
|
||||
#### 1. Cloning the repository
|
||||
|
||||
|
||||
Cloning the repository is simple thanks to git and Github. Simply `cd` into wherever you want to clone PrusaSlicer code base and run
|
||||
```
|
||||
git clone https://www.github.com/prusa3d/PrusaSlicer
|
||||
cd PrusaSlicer
|
||||
```
|
||||
This will download the source code into a new directory and `cd` into it. You can now optionally select a tag/branch/commit to build using `git checkout`. Otherwise, `master` branch will be built.
|
||||
|
||||
|
||||
#### 2. Building dependencies
|
||||
|
||||
PrusaSlicer uses CMake and the build is quite simple, the only tricky part is resolution of dependencies. The supported and recommended way is to build the dependencies first and link to them statically. PrusaSlicer source base contains a CMake script that automatically downloads and builds the required dependencies. All that is needed is to run the following (from the top of the cloned repository):
|
||||
|
||||
cd deps
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DDEP_WX_GTK3=ON
|
||||
make
|
||||
cd ../..
|
||||
|
||||
|
||||
**Warning**: Once the dependency bundle is installed in a destdir, the destdir cannot be moved elsewhere. This is because wxWidgets hardcode the installation path.
|
||||
|
||||
|
||||
#### 3. Building PrusaSlicer
|
||||
|
||||
Now when the dependencies are compiled, all that is needed is to tell CMake that we are interested in static build and point it to the dependencies. From the top of the repository, run
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DSLIC3R_STATIC=1 -DSLIC3R_GTK=3 -DSLIC3R_PCH=OFF -DCMAKE_PREFIX_PATH=$(pwd)/../deps/build/destdir/usr/local
|
||||
make -j4
|
||||
|
||||
And that's it. It is now possible to run the freshly built PrusaSlicer binary:
|
||||
|
||||
cd src
|
||||
./prusa-slicer
|
||||
|
||||
|
||||
|
||||
|
||||
## Useful CMake flags when building dependencies
|
||||
|
||||
- `-DDESTDIR=<target destdir>` allows to specify a directory where the dependencies will be installed. When not provided, the script creates and uses `destdir` directory where cmake is run.
|
||||
|
||||
- `-DDEP_DOWNLOAD_DIR=<download cache dir>` specifies a directory to cache the downloaded source packages for each library. Can be useful for repeated builds, to avoid unnecessary network traffic.
|
||||
|
||||
- `-DDEP_WX_GTK3=ON` builds wxWidgets (one of the dependencies) against GTK3 (defaults to OFF)
|
||||
|
||||
|
||||
## Useful CMake flags when building PrusaSlicer
|
||||
- `-DSLIC3R_ASAN=ON` enables gcc/clang address sanitizer (defaults to `OFF`, requires gcc>4.8 or clang>3.1)
|
||||
- `-DSLIC3R_GTK=3` to use GTK3 (defaults to `2`). Note that wxWidgets must be built against the same GTK version.
|
||||
- `-DSLIC3R_STATIC=ON` for static build (defaults to `OFF`)
|
||||
- `-DSLIC3R_WX_STABLE=ON` to look for wxWidgets 3.0 (defaults to `OFF`)
|
||||
- `-DCMAKE_BUILD_TYPE=Debug` to build in debug mode (defaults to `Release`)
|
||||
|
||||
See the CMake files to get the complete list.
|
||||
|
||||
|
||||
|
||||
## Building dynamically
|
||||
|
||||
As already mentioned above, dynamic linking of dependencies is possible, but PrusaSlicer team is unable to troubleshoot (Linux world is way too complex). Feel free to do so, but you are on your own. Several remarks though:
|
||||
|
||||
The list of dependencies can be easily obtained by inspecting the CMake scripts in the `deps/` directory. Some of the dependencies don't have to be as recent as the versions listed - generally versions available on conservative Linux distros such as Debian stable, Ubuntu LTS releases or Fedora are likely sufficient. If you decide to build this way, it is your responsibility to make sure that CMake finds all required dependencies. It is possible to look at your distribution PrusaSlicer package to see how the package maintainers solved the dependency issues.
|
||||
|
||||
#### wxWidgets
|
||||
By default, PrusaSlicer looks for wxWidgets 3.1. Our build script in fact downloads specific patched version of wxWidgets. If you want to link against wxWidgets 3.0 (which are still provided by most distributions because wxWidgets 3.1 have not yet been declared stable), you must set `-DSLIC3R_WX_STABLE=ON` when running CMake. Note that while PrusaSlicer can be linked against wWidgets 3.0, the combination is not well tested and there might be bugs in the resulting application.
|
||||
|
||||
When building on ubuntu 20.04 focal fossa, the package libwxgtk3.0-gtk3-dev needs to be installed instead of libwxgtk3.0-dev and you should use:
|
||||
```
|
||||
-DSLIC3R_WX_STABLE=1 -DSLIC3R_GTK=3
|
||||
```
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
### Installation
|
||||
|
||||
At runtime, PrusaSlicer needs a way to access its resource files. By default, it looks for a `resources` directory relative to its binary.
|
||||
|
||||
If you instead want PrusaSlicer installed in a structure according to the File System Hierarchy Standard, use the `SLIC3R_FHS` flag
|
||||
|
||||
cmake .. -DSLIC3R_FHS=1
|
||||
|
||||
This will make PrusaSlicer look for a fixed-location `share/slic3r-prusa3d` directory instead (note that the location becomes hardcoded).
|
||||
|
||||
You can then use the `make install` target to install PrusaSlicer.
|
||||
|
||||
### Desktop Integration (PrusaSlicer 2.4 and newer)
|
||||
|
||||
If PrusaSlicer is to be distributed as an AppImage or a binary blob (.tar.gz and similar), then a desktop integration support is compiled in by default: PrusaSlicer will offer to integrate with desktop by manually copying the desktop file and application icon into user's desktop configuration. The built-in desktop integration is also handy on Crosstini (Linux on Chrome OS).
|
||||
|
||||
If PrusaSlicer is compiled with `SLIC3R_FHS` enabled, then a desktop integration support will not be integrated. One may want to disable desktop integration by running
|
||||
|
||||
cmake .. -DSLIC3R_DESKTOP_INTEGRATION=0
|
||||
|
||||
when building PrusaSlicer for flatpack or snap, where the desktop integration is performed by the installer.
|
||||
Currently Linux version is not verified, you can try it referring to [PrusaSlicer'S linux building guide](https://github.com/prusa3d/PrusaSlicer/blob/master/doc/How%20to%20build%20-%20Linux%20et%20al.md)
|
|
@ -1,109 +1,41 @@
|
|||
|
||||
# Building PrusaSlicer on Mac OS
|
||||
# Building Bambu Studio on Mac OS
|
||||
|
||||
To build PrusaSlicer on Mac OS, you will need the following software:
|
||||
## Enviroment setup
|
||||
Install Following tools:
|
||||
- Xcode from app store
|
||||
- Cmake
|
||||
- git
|
||||
- gettext
|
||||
|
||||
- XCode
|
||||
- CMake
|
||||
- git
|
||||
- gettext
|
||||
Cmake, git, gettext can be installed from brew(brew install cmake git gettext)
|
||||
|
||||
XCode is available through Apple's App Store, the other three tools are available on
|
||||
[brew](https://brew.sh/) (use `brew install cmake git gettext` to install them).
|
||||
## building the deps
|
||||
You need to build the dependence of BambuStudio first. (Only needs for the first time)
|
||||
|
||||
### Dependencies
|
||||
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
|
||||
**(Please make sure to replace the username with the one on your computer)**
|
||||
|
||||
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 PrusaSlicer sources directory and then to `deps`.
|
||||
Use the following commands to build the dependencies:
|
||||
`cd BambuStudio/deps`
|
||||
`mkdir build;cd build`
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
for arm64 architecture
|
||||
`cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-arm64-cc"`
|
||||
for x86 architeccture
|
||||
`cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-x86_64-cc"`
|
||||
`make -jN` (N can be a number between 1 and the max cpu number)
|
||||
|
||||
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`.
|
||||
## building the Bambu Studio
|
||||
create a directory to store the installed files at /Users/username/work/projects/BambuStudio/install_dir
|
||||
`cd BambuStudio`
|
||||
`mkdir install_dir`
|
||||
`mkdir build;cd build`
|
||||
|
||||
**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 it use cmake
|
||||
`cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on`
|
||||
`cmake --build . --target install --config Release -jN`
|
||||
|
||||
FIXME The Cereal serialization library needs a tiny patch on some old OSX clang installations
|
||||
https://github.com/USCiLab/cereal/issues/339#issuecomment-246166717
|
||||
|
||||
|
||||
### 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.
|
||||
|
||||
### Note on Mac OS X 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 Mac PrusaSlicer builds are currently built against SDK 10.9 to ensure compatibility with older Macs.
|
||||
|
||||
_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.
|
||||
|
||||
|
||||
# TL; DR
|
||||
|
||||
Works on a fresh installation of MacOS Catalina 10.15.6
|
||||
|
||||
- Install [brew](https://brew.sh/):
|
||||
- Open Terminal
|
||||
|
||||
- Enter:
|
||||
|
||||
```
|
||||
brew update
|
||||
brew install cmake git gettext
|
||||
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
|
||||
```
|
||||
building it use xcode
|
||||
`cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on`
|
||||
then building it using Xcode
|
|
@ -1,216 +1,36 @@
|
|||
# Step by Step Visual Studio 2019 Instructions
|
||||
# Building Bambu Studio on Windows
|
||||
|
||||
### Install the tools
|
||||
## Enviroment setup
|
||||
Install Following tools:
|
||||
- Visual Studio Community 2019 from [visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/) (Older versions are not supported as Bambu Studio requires support for C++17, and newer versions should also be ok);
|
||||
- Cmake from [cmake.org](https://cmake.org/download/)
|
||||
- Git from [gitforwindows.org](https://gitforwindows.org/)
|
||||
- Perl from [strawberryperl](https://strawberryperl.com/)
|
||||
|
||||
Install Visual Studio Community 2019 from [visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/). Older versions are not supported as PrusaSlicer requires support for C++17.
|
||||
Select all workload options for C++ and make sure to launch Visual Studio after install (to ensure that the full setup completes).
|
||||
## building the deps
|
||||
Suppose you download the codes into D:/work/Projects/BambuStudio
|
||||
create a directory to store the dependence built: D:/work/Projects/BambuStudio_dep
|
||||
|
||||
Install git for Windows from [gitforwindows.org](https://gitforwindows.org/)
|
||||
Download and run the exe accepting all defaults
|
||||
`cd BambuStudio/deps`
|
||||
`mkdir build;cd build`
|
||||
`cmake ../ -G "Visual Studio 16 2019" -DDESTDIR="D:/work/Projects/BambuStudio_dep" -DCMAKE_BUILD_TYPE=Release`
|
||||
`msbuild /m ALL_BUILD.vcxproj`
|
||||
|
||||
### Download sources
|
||||
It takes "00:14:27.37" to finish it on my machine (11th Gen Intel(R) Core(TM) i9-11900 @2.50GHz 2.50 GHz, with 32.0 GB DDR)
|
||||
|
||||
Clone the respository. To place it in C:\src\PrusaSlicer, run:
|
||||
```
|
||||
c:> mkdir src
|
||||
c:> cd src
|
||||
c:\src> git clone https://github.com/prusa3d/PrusaSlicer.git
|
||||
```
|
||||
## 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`
|
||||
|
||||
### Run the automatic build script
|
||||
set -DWIN10SDK_PATH to your windows sdk path(for example: C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0) in below command:
|
||||
`cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="D:/work/Projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"`
|
||||
|
||||
The script `build_win.bat` will automatically find the default Visual Studio installation, set up the build environment, and then run both CMake and MSBuild to generate the dependencies and application as needed. If you'd rather do these steps manually, you can skip to the [Manual Build Instructions](#manual-build-instructions) in the next section. Otherwise, just run the following command to get everything going with the default configs:
|
||||
then build it using command
|
||||
`cmake --build . --target install --config Release`
|
||||
|
||||
```
|
||||
c:\src>cd c:\src\PrusaSlicer
|
||||
c:\src\PrusaSlicer>build_win.bat -d=..\PrusaSlicer-deps -r=console
|
||||
```
|
||||
or building it under the Visual Studio 2019
|
||||
(set the BambuStudio_app_gui as start project)
|
||||

|
||||
|
||||
The build script will run for a while (over an hour, depending on your machine) and automatically perform the following steps:
|
||||
1. Configure and build [deps](#compile-the-dependencies) as RelWithDebInfo with `c:\src\PrusaSlicer-deps` as the destination directory
|
||||
2. Configure and build all [application targets](#compile-prusaslicer) as RelWithDebInfo
|
||||
3. Launch the resulting `prusa-slicer-console.exe` binary
|
||||
|
||||
You can change the above command line options to do things like:
|
||||
* Change the destination for the dependencies by pointing `-d` to a different directory such as: `build_win.bat -d=s:\PrusaSlicerDeps`
|
||||
* Open the solution in Visual Studio after the build completes by changing the `-r` switch to `-r=ide`
|
||||
* Generate a release build without debug info by adding `-c=Release` or a full debug build with `-c=Debug`
|
||||
* Perform an incremental application build (the default) with: `build_win.bat -s=app-dirty`
|
||||
* Clean and rebuild the application: `build_win.bat -s=app`
|
||||
* Clean and rebuild the dependencies: `build_win.bat -s=deps`
|
||||
* Clean and rebuild everything (app and deps): `build_win.bat -s=all`
|
||||
* _The full list of build script options can be listed by running:_ `build_win.bat -?`
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
You're best off initiating builds from within Visual Studio for day-to-day development. However, the `build_win.bat` script can be very helpful if you run into build failures after updating your source tree. Here are some tips to keep in mind:
|
||||
* The last several lines of output from `build_win.bat` will usually have the most helpful error messages.
|
||||
* If CMake complains about missing binaries or paths (e.g. after updating Visual Studio), building with `build_win.bat` will force CMake to regenerate its cache on an error.
|
||||
* After a deps change, you may just need to rebuild everything with the `-s=all` switch.
|
||||
* Reading through the instructions in the next section may help diagnose more complex issues.
|
||||
|
||||
# Manual Build Instructions
|
||||
|
||||
_Follow the steps below if you want to understand how to perform a manual build, or if you're troubleshooting issues with the automatic build script._
|
||||
|
||||
### Compile the dependencies.
|
||||
Dependencies are updated seldomly, thus they are compiled out of the PrusaSlicer source tree.
|
||||
Go to the Windows Start Menu and Click on "Visual Studio 2019" folder, then select the ->"x64 Native Tools Command Prompt" to open a command window and run the following:
|
||||
```
|
||||
cd c:\src\PrusaSlicer\deps
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 16 2019" -DDESTDIR="c:\src\PrusaSlicer-deps"
|
||||
|
||||
msbuild /m ALL_BUILD.vcxproj // This took 13.5 minutes on my machine: core I7-7700K @ 4.2Ghz with 32GB main memory and 20min on a average laptop
|
||||
```
|
||||
|
||||
### Generate Visual Studio project file for PrusaSlicer, referencing the precompiled dependencies.
|
||||
Go to the Windows Start Menu and Click on "Visual Studio 2019" folder, then select the ->"x64 Native Tools Command Prompt" to open a command window and run the following:
|
||||
```
|
||||
cd c:\src\PrusaSlicer\
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH="c:\src\PrusaSlicer-deps\usr\local"
|
||||
```
|
||||
|
||||
Note that `CMAKE_PREFIX_PATH` must be absolute path. A relative path like "..\..\PrusaSlicer-deps\usr\local" does not work.
|
||||
|
||||
### Compile PrusaSlicer.
|
||||
|
||||
Double-click c:\src\PrusaSlicer\build\PrusaSlicer.sln to open in Visual Studio 2019.
|
||||
OR
|
||||
Open Visual Studio for C++ development (VS asks this the first time you start it).
|
||||
|
||||
Select PrusaSlicer_app_gui as your startup project (right-click->Set as Startup Project).
|
||||
|
||||
Run Build->Rebuild Solution once to populate all required dependency modules. This is NOT done automatically when you build/run. If you run both Debug and Release variants, you will need to do this once for each.
|
||||
|
||||
Debug->Start Debugging or press F5
|
||||
|
||||
PrusaSlicer should start. You're up and running!
|
||||
|
||||
note: Thanks to @douggorgen for the original guide, as an answer for a issue
|
||||
|
||||
|
||||
# The below information is out of date, but still useful for reference purposes
|
||||
|
||||
We have switched to MS Visual Studio 2019.
|
||||
|
||||
We don't use MSVS 2013 any more. At the moment we are in the process of creating new pre-built dependency bundles
|
||||
and updating this document. In the meantime, you will need to compile the dependencies yourself
|
||||
[the same way as before](#building-the-dependencies-package-yourself)
|
||||
except with CMake generators for MSVS 2019 instead of 2013.
|
||||
|
||||
Thank you for understanding.
|
||||
|
||||
---
|
||||
|
||||
# Building PrusaSlicer on Microsoft Windows
|
||||
|
||||
~~The currently supported way of building PrusaSlicer on Windows is with CMake and MS Visual Studio 2013.
|
||||
You can use the free [Visual Studio 2013 Community Edition](https://www.visualstudio.com/vs/older-downloads/).
|
||||
CMake installer can be downloaded from [the official website](https://cmake.org/download/).~~
|
||||
|
||||
~~Building with newer versions of MSVS (2015, 2017) may work too as reported by some of our users.~~
|
||||
|
||||
_Note:_ Thanks to [**@supermerill**](https://github.com/supermerill) for testing and inspiration for this guide.
|
||||
|
||||
### Dependencies
|
||||
|
||||
On Windows PrusaSlicer is built against statically built libraries.
|
||||
~~We provide a prebuilt package of all the needed dependencies. This package only works on Visual Studio 2013, so~~ if you are using a newer version of Visual Studio, you need to compile the dependencies yourself as per [below](#building-the-dependencies-package-yourself).
|
||||
The package comes in a several variants:
|
||||
|
||||
- ~~64 bit, Release mode only (41 MB, 578 MB unpacked)~~
|
||||
- ~~64 bit, Release and Debug mode (88 MB, 1.3 GB unpacked)~~
|
||||
- ~~32 bit, Release mode only (38 MB, 520 MB unpacked)~~
|
||||
- ~~32 bit, Release and Debug mode (74 MB, 1.1 GB unpacked)~~
|
||||
|
||||
When unsure, use the _Release mode only_ variant, the _Release and Debug_ variant is only needed for debugging & development.
|
||||
|
||||
If you're unsure where to unpack the package, unpack it into `C:\local\` (but it can really be anywhere).
|
||||
|
||||
Alternatively you can also compile the dependencies yourself, see below.
|
||||
|
||||
### Building PrusaSlicer with Visual Studio
|
||||
|
||||
First obtain the PrusaSlicer sources via either git or by extracting the source archive.
|
||||
|
||||
Then you will need to note down the so-called 'prefix path' to the dependencies, this is the location of the dependencies packages + `\usr\local` appended.
|
||||
For example on 64 bits this would be `C:\local\destdir-64\usr\local`. The prefix path will need to be passed to CMake.
|
||||
|
||||
When ready, open the relevant Visual Studio command line and `cd` into the directory with PrusaSlicer sources.
|
||||
Use these commands to prepare Visual Studio solution file:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 12 Win64" -DCMAKE_PREFIX_PATH="<insert prefix path here>"
|
||||
|
||||
Note that if you're building a 32-bit variant, you will need to change the `"Visual Studio 12 Win64"` to just `"Visual Studio 12"`.
|
||||
|
||||
Conversely, if you're using Visual Studio version other than 2013, the version number will need to be changed accordingly.
|
||||
|
||||
If `cmake` has finished without errors, go to the build directory and open the `PrusaSlicer.sln` solution file in Visual Studio.
|
||||
Before building, make sure you're building the right project (use one of those starting with `PrusaSlicer_app_...`) and that you're building
|
||||
with the right configuration, i.e. _Release_ vs. _Debug_. When unsure, choose _Release_.
|
||||
Note that you won't be able to build a _Debug_ variant against a _Release_-only dependencies package.
|
||||
|
||||
#### Installing using the `INSTALL` project
|
||||
|
||||
PrusaSlicer can be run from the Visual Studio or from Visual Studio's build directory (`src\Release` or `src\Debug`),
|
||||
but for longer-term usage you might want to install somewhere using the `INSTALL` project.
|
||||
By default, this installs into `C:\Program Files\PrusaSlicer`.
|
||||
To customize the install path, use the `-DCMAKE_INSTALL_PREFIX=<path of your choice>` when invoking `cmake`.
|
||||
|
||||
### Building from the command line
|
||||
|
||||
There are several options for building from the command line:
|
||||
|
||||
- [msbuild](https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-reference?view=vs-2017&viewFallbackFrom=vs-2013)
|
||||
- [Ninja](https://ninja-build.org/)
|
||||
- [nmake](https://docs.microsoft.com/en-us/cpp/build/nmake-reference?view=vs-2017)
|
||||
|
||||
To build with msbuild, use the same CMake command as in previous paragraph and then build using
|
||||
|
||||
msbuild /m /P:Configuration=Release ALL_BUILD.vcxproj
|
||||
|
||||
To build with Ninja or nmake, replace the `-G` option in the CMake call with `-G Ninja` or `-G "NMake Makefiles"` , respectively.
|
||||
Then use either `ninja` or `nmake` to start the build.
|
||||
|
||||
To install, use `msbuild /P:Configuration=Release INSTALL.vcxproj` , `ninja install` , or `nmake install` .
|
||||
|
||||
### Building the dependencies package yourself
|
||||
|
||||
The dependencies package is built using CMake scripts inside the `deps` subdirectory of PrusaSlicer sources.
|
||||
(This is intentionally not interconnected with the CMake scripts in the rest of the sources.)
|
||||
|
||||
Open the preferred Visual Studio command line (64 or 32 bit variant) and `cd` into the directory with PrusaSlicer sources.
|
||||
Then `cd` into the `deps` directory and use these commands to build:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 16 2019" -DDESTDIR="C:\local\destdir-custom"
|
||||
msbuild /m ALL_BUILD.vcxproj
|
||||
|
||||
You can also use the Visual Studio GUI or other generators as mentioned above.
|
||||
|
||||
The `DESTDIR` option is the location where the bundle will be installed.
|
||||
This may be customized. If you leave it empty, the `DESTDIR` will be placed inside the same `build` directory.
|
||||
|
||||
Warning: If the `build` directory is nested too deep inside other folders, various file paths during the build
|
||||
become too long and the build might fail due to file writing errors (\*). For this reason, it is recommended to
|
||||
place the `build` directory relatively close to the drive root.
|
||||
|
||||
Note that the build variant that you may choose using Visual Studio (i.e. _Release_ or _Debug_ etc.) when building the dependency package is **not relevant**.
|
||||
The dependency build will by default build _both_ the _Release_ and _Debug_ variants regardless of what you choose in Visual Studio.
|
||||
You can disable building of the debug variant by passing the
|
||||
|
||||
-DDEP_DEBUG=OFF
|
||||
|
||||
option to CMake, this will only produce a _Release_ build.
|
||||
|
||||
Refer to the CMake scripts inside the `deps` directory to see which dependencies are built in what versions and how this is done.
|
||||
|
||||
\*) Specifically, the problem arises when building boost. Boost build tool appends all build options into paths of
|
||||
intermediate files, which are not handled correctly by either `b2.exe` or possibly `ninja` (?).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Localization and translation guide
|
||||
|
||||
The purpose of this guide is to describe how to contribute to the PrusaSlicer translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
|
||||
The purpose of this guide is to describe how to contribute to the Bambu Studio translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
|
||||
|
||||
Those can be downloaded here:
|
||||
- https://sourceforge.net/directory/os:windows/?q=gnu+gettext GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
|
||||
|
@ -12,41 +12,42 @@ Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext
|
|||
|
||||
|
||||
### Scenario 1. How do I add a translation or fix an existing translation
|
||||
1. Get PO-file from corresponding folder here:
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
||||
1. Get PO-file 'BambuStudio_xx.pot' from corresponding sub-folder here:
|
||||
https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n
|
||||
2. Open this file in PoEdit as "Edit a translation"
|
||||
3. Apply your corrections to the translation
|
||||
4. Push changed PrusaSlicer.po and PrusaSlicer.mo (will create automatically after saving of PrusaSlicer.po in PoEdit) into the original folder.
|
||||
4. Push changed BambuStudio_xx.po into the original folder
|
||||
5. copy BambuStudio_xx.mo into resources/i18n/xx and rename it to BambuStudio.mo, then push the changed file.
|
||||
|
||||
### Scenario 2. How do I add a new language support
|
||||
1. Get file PrusaSlicer.pot here :
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
||||
1. Get file BambuStudio.pot here :
|
||||
https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n
|
||||
2. Open it in PoEdit for "Create new translation"
|
||||
3. Select Translation Language (for example French).
|
||||
4. As a result you will have fr.po - the file containing translation to French.
|
||||
Notice. When the translation is complete you need to:
|
||||
- Rename the file to PrusaSlicer.po
|
||||
- Click "Save file" button. PrusaSlicer.mo will be created immediately
|
||||
- Both PrusaSlicer.po and PrusaSlicer.mo have to be saved here:
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/fr
|
||||
- Rename the file to BambuStudio_fr.po
|
||||
- Click "Save file" button. BambuStudio_fr.mo will be created immediately
|
||||
- Bambu_Studio_fr.po needs to be copied into the sub-folder fr of https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n, and be pushed
|
||||
- copy BambuStudio_xx.mo into resources/i18n/xx and rename it to BambuStudio.mo, then push the changed file.
|
||||
( name of folder "fr" means "French" - the translation language).
|
||||
|
||||
### Scenario 3. How do I add a new text resource when implementing a feature to PrusaSlicer
|
||||
Each string resource in PrusaSlicer available for translation needs to be explicitly marked using L() macro like this:
|
||||
### Scenario 3. How do I add a new text resource when implementing a feature to Bambu Studio
|
||||
Each string resource in Bambu Studio available for translation needs to be explicitly marked using L() macro like this:
|
||||
```C++
|
||||
auto msg = L("This message to be localized")
|
||||
```
|
||||
To get translated text use one of needed macro/function (`_(s)` or `_CHB(s)` ).
|
||||
If you add new file resource, add it to the list of files containing macro `L()`
|
||||
|
||||
### Scenario 4. How do I use GNUgettext to localize my own application taking PrusaSlicer as an example
|
||||
### Scenario 4. How do I use GNUgettext to localize my own application taking Bambu Studio as an example
|
||||
|
||||
1. For convenience create a list of files with this macro `L(s)`. We have
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/list.txt.
|
||||
https://github.com/bambulab/BambuStudio/blob/master/bbl/i18n/list.txt.
|
||||
|
||||
2. Create template file(*.POT) with GNUgettext command:
|
||||
```
|
||||
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o PrusaSlicer.pot -f list.txt
|
||||
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o BambuStudio.pot -f list.txt
|
||||
```
|
||||
|
||||
Use flag `--from-code=UTF-8` to specify that the source strings are in UTF-8 encoding
|
||||
|
@ -74,14 +75,14 @@ https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/list.t
|
|||
When you have Catalog to translation open POT or PO file in PoEdit and start translating.
|
||||
|
||||
|
||||
## General guidelines for PrusaSlicer translators
|
||||
## General guidelines for Bambu Studio translators
|
||||
|
||||
|
||||
- We recommend using *PoEdit* application for translation (as described above). It will help you eliminate most punctuation errors and will show you strings with "random" translations (if the fuzzy parameter was used).
|
||||
|
||||
- To check how the translated text looks on the UI elements, test it :) If you use *PoEdit*, all you need to do is save the file. At this point, a MO file will be created. Rename it PrusaSlicer.mo, and you can run PrusaSlicer (see above).
|
||||
- To check how the translated text looks on the UI elements, test it :) If you use *PoEdit*, all you need to do is save the file. At this point, a MO file will be created. Rename it Bambu Studio.mo, and you can run Bambu Studio (see above).
|
||||
|
||||
- If you see an encoding error (garbage characters instead of Unicode) somewhere in PrusaSlicer, report it. It is likely not a problem of your translation, but a bug in the software.
|
||||
- If you see an encoding error (garbage characters instead of Unicode) somewhere in Bambu Studio, report it. It is likely not a problem of your translation, but a bug in the software.
|
||||
|
||||
- See on which UI elements the translated phrase will be used. Especially if it's a button, it is very important to decide on the translation and not write alternative translations in parentheses, as this will significantly increase the width of the button, which is sometimes highly undesirable:
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -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 settings modified in a User preset has an open lock icon:
|
||||
|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||
|
||||
|
||||
# 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 |
Loading…
Add table
Add a link
Reference in a new issue