From 8795f7dba86d0a7c08946be0d61513673c3d297e Mon Sep 17 00:00:00 2001
From: bubnikv <bubnikv@gmail.com>
Date: Wed, 18 Dec 2019 10:17:47 +0100
Subject: [PATCH 1/6] Trying to fix a compilation issue on Linux / OSX

---
 src/slic3r/GUI/wxExtensions.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp
index 9b7de93cd..0c43be3a0 100644
--- a/src/slic3r/GUI/wxExtensions.hpp
+++ b/src/slic3r/GUI/wxExtensions.hpp
@@ -962,7 +962,7 @@ private:
         bool operator<(const TICK_CODE& other) const { return other.tick > this->tick; }
         bool operator>(const TICK_CODE& other) const { return other.tick < this->tick; }
 
-        int         tick;
+        int         tick = 0;
         std::string gcode = Slic3r::ColorChangeCode;
         int         extruder = 0;
         std::string color;

From c97aacd2d8e984e09e24e8e353e0016e1f1e3d6c Mon Sep 17 00:00:00 2001
From: tamasmeszaros <meszaros.q@gmail.com>
Date: Wed, 18 Dec 2019 11:53:28 +0100
Subject: [PATCH 2/6] Officially move to C++17 for the whole PrusaSlicer source
 tree;

---
 CMakeLists.txt             | 2 +-
 src/avrdude/CMakeLists.txt | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39d9298e5..be07b5216 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,7 +102,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
 enable_testing ()
 
 # Enable C++11 language standard.
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
 if(NOT WIN32)
diff --git a/src/avrdude/CMakeLists.txt b/src/avrdude/CMakeLists.txt
index 889720021..fc01b7d8d 100644
--- a/src/avrdude/CMakeLists.txt
+++ b/src/avrdude/CMakeLists.txt
@@ -1,8 +1,5 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
 add_definitions(-D_BSD_SOURCE -D_DEFAULT_SOURCE)   # To enable various useful macros and functions on Unices
 remove_definitions(-D_UNICODE -DUNICODE)
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)

From 4220124658dc544308ac14f715b15dda3753e5d8 Mon Sep 17 00:00:00 2001
From: tamasmeszaros <meszaros.q@gmail.com>
Date: Wed, 18 Dec 2019 11:57:21 +0100
Subject: [PATCH 3/6] Add mpfr download mirror

---
 deps/MPFR/MPFR.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deps/MPFR/MPFR.cmake b/deps/MPFR/MPFR.cmake
index 7873bc0d6..17ac283ea 100644
--- a/deps/MPFR/MPFR.cmake
+++ b/deps/MPFR/MPFR.cmake
@@ -19,7 +19,7 @@ if (MSVC)
 
 else ()
     ExternalProject_Add(dep_MPFR
-        URL https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2
+        URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2  # mirrors are allowed
         BUILD_IN_SOURCE ON
         CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --with-gmp=${DESTDIR}/usr/local --with-pic
         BUILD_COMMAND make -j

From 74d6c23ba85a50b8fb73c65b6e3b3f2b60bd0fe6 Mon Sep 17 00:00:00 2001
From: bubnikv <bubnikv@gmail.com>
Date: Wed, 18 Dec 2019 15:29:37 +0100
Subject: [PATCH 4/6] Updated Prusa3D config - elephant foot compensation 0.2mm
 allowed for all profiles but 0.25mm dmr nozzles.

---
 resources/profiles/PrusaResearch.ini | 109 ++++++++++++++-------------
 1 file changed, 56 insertions(+), 53 deletions(-)

diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini
index aefff5c85..74bc529ae 100644
--- a/resources/profiles/PrusaResearch.ini
+++ b/resources/profiles/PrusaResearch.ini
@@ -106,7 +106,7 @@ compatible_printers =
 complete_objects = 0
 default_acceleration = 1000
 dont_support_bridges = 1
-elefant_foot_compensation = 0
+elefant_foot_compensation = 0.2
 ensure_vertical_shell_thickness = 1
 external_fill_pattern = rectilinear
 external_perimeters_first = 0
@@ -223,6 +223,7 @@ extruder_clearance_radius = 35
 
 # Print parameters common to a 0.25mm diameter nozzle.
 [print:*0.25nozzle*]
+elefant_foot_compensation = 0
 external_perimeter_extrusion_width = 0.25
 extrusion_width = 0.25
 first_layer_extrusion_width = 0.3
@@ -238,6 +239,7 @@ support_material_xy_spacing = 150%
 output_filename_format = {input_filename_base}_{nozzle_diameter[0]}n_{layer_height}mm_{filament_type[0]}_{printer_model}_{print_time}.gcode
 
 [print:*0.25nozzleMK3*]
+elefant_foot_compensation = 0
 external_perimeter_extrusion_width = 0.25
 extrusion_width = 0.25
 first_layer_extrusion_width = 0.3
@@ -271,6 +273,7 @@ fill_density = 20%
 output_filename_format = {input_filename_base}_{nozzle_diameter[0]}n_{layer_height}mm_{filament_type[0]}_{printer_model}_{print_time}.gcode
 
 [print:*0.25nozzleMINI*]
+elefant_foot_compensation = 0
 external_perimeter_extrusion_width = 0.25
 extrusion_width = 0.25
 first_layer_extrusion_width = 0.3
@@ -2993,21 +2996,21 @@ inherits = *common 0.025*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Grey Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 7
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Azure Blue Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 7
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 
 [sla_material:Prusa Maroon Tough @0.025]
@@ -3015,56 +3018,56 @@ inherits = *common 0.025*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Beige Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Pink Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 7
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa White Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 6.5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 6
 initial_exposure_time = 15
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Green Dental Casting @0.025]
 inherits = *common 0.025*
 exposure_time = 12
 initial_exposure_time = 40
 material_type = Casting
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Green Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Clear ABS like @0.025]
 inherits = *common 0.025*
 exposure_time = 6
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa ABS like White @0.025]
 ## inherits = *common 0.025*
@@ -3076,35 +3079,35 @@ inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Cyan Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Magenta Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Yellow Tough @0.025]
 inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Orange-Yellow Teeth Model @0.025]
 inherits = *common 0.025*
 exposure_time = 5
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 
 ########### Materials 0.05
@@ -3333,91 +3336,91 @@ inherits = *common 0.05*
 exposure_time = 7
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Orange Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 7.5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Grey Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 8.5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Black Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Super Low Odor Beige Tough @0.05]
 ## inherits = *common 0.05*
 ## exposure_time = 7.5
 ## initial_exposure_time = 35
 ## material_type = Tough
-## material_vendor = Prusa
+## material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Super Low Odor White Tough @0.05]
 ## inherits = *common 0.05*
 ## exposure_time = 6.5
 ## initial_exposure_time = 35
 ## material_type = Tough
-## material_vendor = Prusa
+## material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Super Low Odor Grey Tough @0.05]
 ## inherits = *common 0.05*
 ## exposure_time = 6.5
 ## initial_exposure_time = 35
 ## material_type = Tough
-## material_vendor = Prusa
+## material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Cyan Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Magenta Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Super Low Odor Yellow Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Black High Tenacity @0.05]
 ## inherits = *common 0.05*
 ## exposure_time = 7
 ## initial_exposure_time = 35
 ## material_type = Tough
-## material_vendor = Prusa
+## material_vendor = Made for Prusa
 
 [sla_material:Prusa Orange-Yellow Teeth Model @0.05]
 inherits = *common 0.05*
 exposure_time = 7
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Green Dental Casting @0.05]
 inherits = *common 0.05*
 exposure_time = 13
 initial_exposure_time = 50
 material_type = Casting
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Yellow Solid @0.05]
 ## inherits = *common 0.05*
@@ -3429,49 +3432,49 @@ inherits = *common 0.05*
 exposure_time = 7.5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Green Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Red Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Maroon Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 7.5
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Pink Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 8
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Azure Blue Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 8
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Tough @0.05]
 inherits = *common 0.05*
 exposure_time = 7
 initial_exposure_time = 15
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Yellow Flexible @0.05]
 ## inherits = *common 0.05*
@@ -3483,7 +3486,7 @@ inherits = *common 0.05*
 exposure_time = 5
 initial_exposure_time = 15
 material_type = Flexible
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa White Flexible @0.05]
 ## inherits = *common 0.05*
@@ -3495,7 +3498,7 @@ inherits = *common 0.05*
 exposure_time = 5
 initial_exposure_time = 15
 material_type = Flexible
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa Black Flexible @0.05]
 ## inherits = *common 0.05*
@@ -3512,7 +3515,7 @@ inherits = *common 0.05*
 exposure_time = 8
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ## [sla_material:Prusa ABS like White @0.05]
 ## inherits = *common 0.05*
@@ -3524,14 +3527,14 @@ inherits = *common 0.05*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Casting
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Grey High Tenacity @0.05]
 inherits = *common 0.05*
 exposure_time = 7
 initial_exposure_time = 30
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ########### Materials 0.035
 
@@ -3540,7 +3543,7 @@ inherits = *common 0.035*
 exposure_time = 6
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 ########### Materials 0.1
 
@@ -3565,70 +3568,70 @@ inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Beige Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Pink Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Azure Blue Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Maroon Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa White Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 45
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Black Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 13
 initial_exposure_time = 55
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 8
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Green Dental Casting @0.1]
 inherits = *common 0.1*
 exposure_time = 15
 initial_exposure_time = 50
 material_type = Casting
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [sla_material:Prusa Transparent Green Tough @0.1]
 inherits = *common 0.1*
 exposure_time = 7
 initial_exposure_time = 35
 material_type = Tough
-material_vendor = Prusa
+material_vendor = Made for Prusa
 
 [printer:*common*]
 printer_technology = FFF

From b2b037eb0bec0e6dd78f5be5efdee0785e8d616a Mon Sep 17 00:00:00 2001
From: Enrico Turri <enricoturri@seznam.cz>
Date: Wed, 18 Dec 2019 15:32:25 +0100
Subject: [PATCH 5/6] Show requested filename on title of reload from disk
 dialog on Mac

---
 src/slic3r/GUI/Plater.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 861ff47da..4ce4529b1 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -3234,7 +3234,13 @@ void Plater::priv::reload_from_disk()
     {
         // ask user to select the missing file
         std::string search = missing_input_paths.back().string();
-        wxFileDialog dialog(q, _(L("Please select the file to reload:")), "", from_u8(fs::path(search).filename().string()), file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
+        wxString title = _(L("Please select the file to reload"));
+#if defined(__APPLE__)
+        title += " (" + from_u8(fs::path(search).filename().string()) + "):";
+#else
+        title += ":";
+#endif // __APPLE__
+        wxFileDialog dialog(q, title, "", from_u8(fs::path(search).filename().string()), file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
         if (dialog.ShowModal() != wxID_OK)
             return;
 

From 8f655242eb4583c6bce071329a0c39086e5e53fa Mon Sep 17 00:00:00 2001
From: tamasmeszaros <meszaros.q@gmail.com>
Date: Wed, 18 Dec 2019 15:42:53 +0100
Subject: [PATCH 6/6] Fix for CGAL relocation fix. Wrong libdir was used.

---
 deps/CGAL/CGAL.cmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/deps/CGAL/CGAL.cmake b/deps/CGAL/CGAL.cmake
index 96a629258..285d819ab 100644
--- a/deps/CGAL/CGAL.cmake
+++ b/deps/CGAL/CGAL.cmake
@@ -8,8 +8,13 @@ prusaslicer_add_cmake_project(
     DEPENDS dep_boost dep_GMP dep_MPFR
 )
 
+include(GNUInstallDirs)
+
+# CGAL, for whatever reason, makes itself non-relocatable by writing the build directory into
+# CGALConfig-installation-dirs.cmake and including it in configure time.
+# If this file is not present, it will not consider the stored absolute path
 ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix
     DEPENDEES install
     COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake
-    WORKING_DIRECTORY "${DESTDIR}/usr/local/lib/cmake/CGAL"
+    WORKING_DIRECTORY "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL"
 )
\ No newline at end of file