Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2019-01-03 21:33:57 +0300
committerVojtech Kral <vojtech@kral.hk>2019-01-07 19:25:04 +0300
commit02e1636831378e10653e6f3d08fc19416b127cdf (patch)
treebb28863770a356d158822e8168795da2af972be9 /doc
parentb66f41f43dd740f17e54951fbaf453bd8069c889 (diff)
doc: Update Windows build instructions
Diffstat (limited to 'doc')
-rw-r--r--doc/How to build - Windows.md118
1 files changed, 54 insertions, 64 deletions
diff --git a/doc/How to build - Windows.md b/doc/How to build - Windows.md
index 5c8e7ef3c..96fa24cae 100644
--- a/doc/How to build - Windows.md
+++ b/doc/How to build - Windows.md
@@ -1,99 +1,89 @@
-### NOTE: This document is currently outdated wrt. the new post-Perl Slic3rPE. A new build process and the description thereof is a work in progress and is comming soon. Please stay tuned.
-
---
-
-
# Building Slic3r PE on Microsoft Windows
-The currently supported way of building Slic3r PE on Windows is with CMake and MS Visual Studio 2013
-using our Perl binary distribution (compiled from official Perl sources).
+The currently supported way of building Slic3r PE 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/).
-Other setups (such as mingw + Strawberry Perl) _may_ work, but we cannot guarantee this will work
-and cannot provide guidance.
+Building with newer versions of MSVS (2015, 2017) may work too as reported by some of our users.
+### Dependencies
-### Geting the dependencies
+On Windows Slic3r is built against statically built libraries.
+We provide a prebuilt package of all the needed dependencies.
+The package comes in a several variants:
-First, download and upnack our Perl + wxWidgets binary distribution:
+ - [64 bit, Release mode only](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-64.7z) (41 MB, 546 MB unpacked)
+ - [64 bit, Release and Debug mode](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-64-dev.7z) (88 MB, 1200 MB unpacked)
+ - [32 bit, Release mode only](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-32.7z) (38 MB, 391 MB unpacked)
+ - [32 bit, Release and Debug mode](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-32-dev.7z) (24 MB, 487 MB unpacked)
- - 32 bit, release mode: [wperl32-5.24.0-2018-03-02.7z](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=wperl32-5.24.0-2018-03-02.7z)
- - 64 bit, release mode: [wperl64-5.24.0-2018-03-02.7z](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=wperl64-5.24.0-2018-03-02.7z)
- - 64 bit, release mode + debug symbols: [wperl64d-5.24.0-2018-03-02.7z](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=wperl64d-5.24.0-2018-03-02.7z)
+When unsure, use the _Release mode only_ variant, the _Release and Debug_ variant is only needed for debugging & developement.
-It is recommended to unpack this package into `C:\`.
+If you're unsure where to unpack the package, unpack it into `C:\local\` (but it can really be anywhere).
-Apart from wxWidgets and Perl, you will also need additional dependencies:
+Alternatively you can also compile the dependencies yourself, see below.
- - Boost
- - Intel TBB
- - libcurl
+### Building Slic3r PE with Visual Studio
-We have prepared a binary package of the listed libraries:
+First obtain the Slic3 PE sources via either git or by extracting the source archive.
- - 32 bit: [slic3r-destdir-32.7z](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=2%2Fslic3r-destdir-32.7z)
- - 64 bit: [slic3r-destdir-64.7z](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=2%2Fslic3r-destdir-64.7z)
+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.
-It is recommended you unpack this package into `C:\local\` as the environment
-setup script expects it there.
+When ready, open the relevant Visual Studio command line and `cd` into the directory with Slic3r sources.
+Use these commands to prepare Visual Studio solution file:
-Alternatively you can also compile the additional dependencies yourself.
-There is a [powershell script](./deps-build/windows/slic3r-makedeps.ps1) which automates this process.
-
-### Building Slic3r PE
+ mkdir build
+ cd build
+ cmake .. -G "Visual Studio 12 Win64" -DCMAKE_PREFIX_PATH="<insert prefix path here>"
-Once the dependencies are set up in their respective locations,
-go to the `wperl*` directory extracted earlier and launch the `cmdline.lnk` file
-which opens a command line prompt with appropriate environment variables set up.
+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"`.
-In this command line, `cd` into the directory with Slic3r sources
-and use these commands to build the Slic3r from the command line:
+Conversely, if you're using Visual Studio version other than 2013, the version number will need to be changed accordingly.
- perl Build.PL
- perl Build.PL --gui
- mkdir build
- cd build
- cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
- nmake
- cd ..
- perl slic3r.pl
+If `cmake` has finished without errors, go to the build directory and open the `Slic3r.sln` solution file in Visual Studio.
+Before building, make sure you're building the right project (use one of those starting with `slic3r_app_...`) and that you're building
+with the right configuration, ie. _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.
-The above commands use `nmake` Makefiles.
-You may also build Slic3r PE with other build tools:
+TODO: Install paragraph from @supermerill (?), also credit
+### Building from the command line
-### Building with Visual Studio
+There are several options for building from the command line:
-To build and debug Slic3r PE with Visual Studio (64 bits), replace the `cmake` command with:
+- [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)
- cmake .. -G "Visual Studio 12 Win64" -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo
+To build with msbuild, use the same CMake command as in previous paragraph and then build using
-For the 32-bit variant, use:
+ msbuild /P:Configuration=Release ALL_BUILD.vcxproj
- cmake .. -G "Visual Studio 12" -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo
+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.
-After `cmake` has finished, go to the build directory and open the `Slic3r.sln` solution file.
-This should open Visual Studio and load the Slic3r solution containing all the projects.
-Make sure you use Visual Studio 2013 to open the solution.
+### Building the dependencies package yourself
-You can then use the usual Visual Studio controls to build Slic3r (Hit `F5` to build and run with debugger).
-If you want to run or debug Slic3r from within Visual Studio, make sure the `XS` project is activated.
-It should be set as the Startup project by CMake by default, but you might want to check anyway.
-There are multiple projects in the Slic3r solution, but only the `XS` project is configured with the right
-commands to run and debug Slic3r.
+The dependencies package is built using CMake scripts inside the `deps` subdirectory of Slic3r PE sources.
+(This is intentionally not interconnected with the CMake scripts in the rest of the sources.)
-The above cmake commands generate Visual Studio project files with the `RelWithDebInfo` configuration only.
-If you also want to use the `Release` configuration, you can generate Visual Studio projects with:
+Open the preferred Visual Studio command line and `cd` into the directory with Slic3r sources.
+Then `cd` into the `deps` directory and use these commands to build:
- -DCMAKE_CONFIGURATION_TYPES=Release;RelWithDebInfo
+ mkdir build
+ cd build
+ cmake .. -G "Visual Studio 12 Win64" -DDESTDIR="C:\local\destdir-custom"
+ msbuild ALL_BUILD.vcxproj
-(The `Debug` configuration is not supported as of now.)
+You can also use the Visual Studio GUI or other generators as mentioned above.
-### Building with ninja
+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 places inside the same `build` directory.
-To use [Ninja](https://ninja-build.org/), replace the `cmake` and `nmake` commands with:
+Note that the build variant that you may choose using Visual Studio (ie. _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.
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
- ninja
+Refer to the CMake scripts inside the `deps` directory to see which dependencies are built in what versions and how this is done.