Compare commits

...

68 Commits
f29 ... rawhide

Author SHA1 Message Date
Mamoru TASAKA e7e66a9e36 Backport upstream fix for build with Boost 1.79+ 2023-02-27 09:56:00 +09:00
Jonathan Wakely 991b979a79 Rebuilt for Boost 1.81 2023-02-20 22:13:08 +00:00
Scott Talbert 1549bb81f9 Rebuild with wxWidgets 3.2 (again) with additional fixes 2023-02-01 19:57:32 -05:00
Scott Talbert a62e48a5ab Fix FTBFS with GCC 13 2023-01-27 11:45:01 +01:00
Fedora Release Engineering e1c016f900 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 10:22:40 +00:00
Miro Hrončok 03c907e3cb Rebuilt for openvdb 10.0 2022-12-31 21:46:53 +01:00
Kalev Lember 4f32e08fa8 Switch back to wxWidgets 3.0 (#2131615)
When built against wxWidgets 3.2, prusa-slicer crashes on startup and is
completely unusable. Upstream recommends sticking with wxWidgets 3.0 for
now.

See https://github.com/prusa3d/PrusaSlicer/issues/8284

This reverts commit f2c45198b5.
2022-10-25 22:07:37 +02:00
Kalev Lember fdd89dbdaf Remove incorrect flatpak conditional
Avoid dropping data/hints.ini for flatpak builds as it is equally useful
for both flatpak and regular builds. Plus, we can get rid of some spec
file complexity.
2022-10-24 19:51:50 +02:00
Kalev Lember e244ab2c08 Don't ship udev rules for flatpak builds
Work around flatpak module build FTBFS by dropping udev rules. They are
only used when installed on the host, not in flatpak containers so we
can get rid of an unneccesary file at the same time.
2022-10-24 19:51:50 +02:00
Scott Talbert f2c45198b5 Rebuild with wxWidgets 3.2 2022-08-04 14:30:24 -04:00
Jan Staněk 6bad3771f5 Update to 2.4.2 2022-07-25 16:36:04 +02:00
Fedora Release Engineering 0804388956 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 15:30:46 +00:00
Miro Hrončok bc72b3e9e4 Rebuilt for openvdb 9.1 2022-06-27 17:23:01 +02:00
Miro Hrončok eef89e9ece Exclude ix86 on F37+
https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
2022-06-27 17:21:54 +02:00
Thomas Rodgers 745a2de187 Rebuilt for Boost 1.78 2022-05-04 11:41:14 +02:00
Mamoru TASAKA 6597f2176e Remove the previous voronoi workaround for fixed binutils 2022-03-17 16:09:58 +09:00
Mamoru TASAKA 2afb99f84b %ix86 %arm: kill LTO for now
kill test_voronoi.cpp, compilation (as) hangs
2022-03-02 08:06:46 +09:00
Miro Hrončok 8957980666 libnest2d is now packaged in Fedora 2022-02-22 00:44:46 +01:00
Miro Hrončok 9e4ba3cf2e Adapt spec for 2.4.0 2022-02-22 00:12:55 +01:00
Miro Hrončok 60fc9ebe6c Revert "Disable GLIBCXX_ASSERTIONS"
This reverts commit 49eb9ad063.

It is no longer needed.
2022-02-22 00:04:27 +01:00
Tom spot Callaway cb7a199d52 add no cereal lib patch 2022-02-14 13:32:37 -05:00
Tom spot Callaway 465b852a28 2.4.0 2022-02-14 13:32:03 -05:00
Orion Poplawski 200ca08428 Rebuild for glew 2.2 2022-02-09 21:03:04 -07:00
Fedora Release Engineering 6aaef67d53 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 09:32:44 +00:00
Miro Hrončok 49eb9ad063 Disable GLIBCXX_ASSERTIONS
Workaround for https://github.com/prusa3d/PrusaSlicer/issues/7231
               https://bugzilla.redhat.com/show_bug.cgi?id=2023345
2021-11-30 14:16:36 +01:00
Richard Shaw a391b36ffe Rebuild for OpenVDB 9. 2021-11-27 22:06:01 -06:00
Dennis Gilmore 5623e93d5e update to 2.3.3
remove upstreamed gcc patch

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2021-11-08 08:46:04 -06:00
Miro Hrončok 41bededbd6 Enable LTO on arm again, it builds 2021-11-05 13:24:24 +01:00
Jonathan Wakely f75256edb7 Rebuilt for Boost 1.76 2021-08-07 02:09:37 +01:00
Miro Hrončok 5035941782 Remove old conditionals 2021-08-02 17:28:40 +02:00
Miro Hrončok 8d0380f7f3 OpenEXR 3 fixes from Arch Linux
Due to lack of time, we apply the patch conditionally only on F35+.
2021-08-02 17:28:40 +02:00
Fedora Release Engineering ff498de501 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 04:09:05 +00:00
Miro Hrončok 10f30131da Rebuilt for openvdb 8.1 2021-06-24 01:04:13 +02:00
Dennis Gilmore 4edf8674c5 update to 2.3.1
include upstream patch fixing build with gcc 11

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2021-05-15 23:26:47 -05:00
Dennis Gilmore 65694a84d7 update to 2.3.1
include upstream patch fixing build with gcc 11

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2021-05-15 21:43:42 -05:00
Jonathan Wakely ddada69453 Rebuilt for removed libstdc++ symbols (#1937698) 2021-05-10 16:08:31 +01:00
Fedora Release Engineering 8192d5d35b - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 08:39:23 +00:00
Miro Hrončok 7339ddc0b3 Include <atomic> for std::atomic where needed
Fixes build with Boost 1.75
2021-01-25 12:57:10 +01:00
Jonathan Wakely 891e75adaa Rebuilt for Boost 1.75 2021-01-22 21:12:38 +00:00
Miro Hrončok 0d5b77de51 Trim perl build dependencies (changelog entry) 2021-01-14 13:15:40 +01:00
Miro Hrončok 6188029a33 Update perl BuildRequires 2021-01-13 01:56:58 +01:00
Miro Hrončok eacebd1880 Rebuilt for openvdb 8.0 2021-01-04 16:37:50 +01:00
Richard Shaw 88e4812c68 Rebuild for OpenEXR 2.5.3. 2021-01-01 16:22:51 -06:00
Jan Beran d552b687e5 Fix flatpak build
When building prusa-slicer as flatpak, Perl test suite is unable to build
because of many build-related errors (Perl tests have many dependencies
which have to be built with /app prefix, which is not always simple).

As we are unable to pass any flags to rpmbuild to switch off
the Perl tests, we need to switch them off for flatpak build directly in the spec file.

The second change is related to %{perl_vendorlib} and %{perl_vendorarch} macros,
which are not set during flatpak build (a build %without perltests).

When the %{flatpak} macro is not set, there should be no change in functionality.
2020-08-26 11:43:22 +02:00
Miro Hrončok 2cebe75897 Rebuilt for openvdb 7.1 2020-08-24 13:16:35 +02:00
Miro Hrončok 0e9b06d7c8 Disable LTO on arm temporarily 2020-08-07 10:45:14 +02:00
Miro Hrončok 96833091ef https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds 2020-08-04 10:15:44 +02:00
Fedora Release Engineering e29535c969 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 07:14:28 +00:00
Fedora Release Engineering fc6de5d9ed - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 23:04:51 +00:00
Miro Hrončok 998832ef5e Rebuilt and fix for Boost 1.73.0 (second attempt) 2020-06-03 10:26:03 +02:00
Miro Hrončok 393c0474b3 Revert "Rebuilt and fix for Boost 1.73.0"
The fix breaks s390x

This reverts commit a8cfa9157e.
2020-06-02 01:29:53 +02:00
Miro Hrončok a8cfa9157e Rebuilt and fix for Boost 1.73.0
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1842011
2020-06-01 16:25:16 +02:00
Miro Hrončok 2fd6939398 Upload sources and fix bogus date in %changelog 2020-03-31 12:47:21 +02:00
Alexander Jacocks 573698ee14 Update to 2.2.0
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1779297
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1799898
2020-03-31 10:13:12 +02:00
Fedora Release Engineering 2d45c29d8b - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 09:51:04 +00:00
Jason Tibbitts 9e9bc6e94a Update to 2.1.1. 2020-01-02 16:54:44 -06:00
Jason Tibbitts c26d5e70ef Add patches to fix s390x build issues. 2019-09-23 12:15:44 -05:00
Jason Tibbitts a00aa925db Reduce build parallelism on ppc64le. 2019-09-16 12:19:01 -05:00
Jason Tibbitts e732c3905b Still broken on s390x. 2019-09-13 12:16:21 -05:00
Jason Tibbitts 222530aa31 Update to 2.1.0. 2019-09-13 12:00:30 -05:00
Jason Tibbitts e5cf3b2bd8 Temporarily disable s390x build. 2019-09-06 13:23:24 -05:00
Jason Tibbitts 626ee093ec Remove an unused patch/source file. 2019-09-06 10:19:32 -05:00
Jason Tibbitts 3bb902b4a2 No need to patch the testsuite for aarch64 and s390x. 2019-09-04 19:06:30 -05:00
Jason Tibbitts 42d48f00ca Update to rc0. 2019-09-04 17:46:24 -05:00
Jason Tibbitts 50b1a61360 Blanket ignore the source archives. 2019-09-04 17:45:48 -05:00
Jason Tibbitts beb29b6a10 Initial attempt to update to 2.1.0 alpha1.
Signed-off-by: Jason Tibbitts <j@tib.bs>
2019-08-13 14:32:51 -05:00
Fedora Release Engineering a06b99dfcd - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 11:23:50 +00:00
Jason Tibbitts 7c2bdbfafc Use a better screenshot
I just attached a screenshot to the relevant github issue to avoid
referencing something stored in a personal account.
2019-07-24 19:18:53 -05:00
22 changed files with 615 additions and 687 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/PrusaSlicer*/
/results_*/
/*.src.rpm
/version_2.0.0.tar.gz
/version_*.tar.gz

View File

@ -1,254 +0,0 @@
From 07282eb24d027817b4279f59ebbf0d80bac5f950 Mon Sep 17 00:00:00 2001
From: Lukas Matena <lukasmatena@seznam.cz>
Date: Wed, 22 May 2019 16:43:14 +0200
Subject: [PATCH] Fixed unit tests when run with range checks on std::vector
There was a bug in unit tests that led to generating the wipe tower with non-normalized preset.
This caused out-of-bounds access into max_layer_height vector in fill_wipe_tower_partitions.
The problem surfaced in https://github.com/prusa3d/PrusaSlicer/issues/2288.
I quickly patched additional normalization of the preset to prevent this from happening.
Also, an assert in the same function turned out to trip on one of the tests.
This one was commented out for now and will (hopefully) be looked into later.
Function Print::apply_config was renamed to apply_config_perl_tests_only so everyone
sees its current purpose and does not mistake it for the more important Print::apply.
---
lib/Slic3r/Print/Simple.pm | 2 +-
lib/Slic3r/Test.pm | 8 ++++----
src/libslic3r/GCode/ToolOrdering.cpp | 5 ++++-
src/libslic3r/Print.cpp | 28 +++++++++++++++++++++++++---
src/libslic3r/Print.hpp | 2 +-
src/libslic3r/PrintBase.hpp | 2 +-
src/libslic3r/PrintObject.cpp | 2 +-
src/libslic3r/SLAPrint.cpp | 2 +-
t/combineinfill.t | 2 +-
t/print.t | 2 +-
t/skirt_brim.t | 2 +-
xs/xsp/Print.xsp | 4 ++--
12 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/lib/Slic3r/Print/Simple.pm b/lib/Slic3r/Print/Simple.pm
index b5b749f12..2ab68f4d3 100644
--- a/lib/Slic3r/Print/Simple.pm
+++ b/lib/Slic3r/Print/Simple.pm
@@ -13,7 +13,7 @@ use Slic3r::Geometry qw(X Y);
has '_print' => (
is => 'ro',
default => sub { Slic3r::Print->new },
- handles => [qw(apply_config extruders output_filepath
+ handles => [qw(apply_config_perl_tests_only extruders output_filepath
total_used_filament total_extruded_volume
placeholder_parser process)],
);
diff --git a/lib/Slic3r/Test.pm b/lib/Slic3r/Test.pm
index b767ca593..d1b99e48c 100644
--- a/lib/Slic3r/Test.pm
+++ b/lib/Slic3r/Test.pm
@@ -176,7 +176,7 @@ sub init_print {
$config->set('gcode_comments', 1) if $ENV{SLIC3R_TESTS_GCODE};
my $print = Slic3r::Print->new;
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
$models = [$models] if ref($models) ne 'ARRAY';
$models = [ map { ref($_) ? $_ : model($_, %params) } @$models ];
@@ -192,8 +192,8 @@ sub init_print {
$print->add_model_object($model_object);
}
}
- # Call apply_config one more time, so that the layer height profiles are updated over all PrintObjects.
- $print->apply_config($config);
+ # Call apply_config_perl_tests_only one more time, so that the layer height profiles are updated over all PrintObjects.
+ $print->apply_config_perl_tests_only($config);
$print->validate;
# We return a proxy object in order to keep $models alive as required by the Print API.
@@ -250,7 +250,7 @@ sub add_facet {
package Slic3r::Test::Print;
use Moo;
-has 'print' => (is => 'ro', required => 1, handles => [qw(process apply_config)]);
+has 'print' => (is => 'ro', required => 1, handles => [qw(process apply_config_perl_tests_only)]);
has 'models' => (is => 'ro', required => 1);
1;
diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp
index e800cd53f..e25ad91fe 100644
--- a/src/libslic3r/GCode/ToolOrdering.cpp
+++ b/src/libslic3r/GCode/ToolOrdering.cpp
@@ -327,7 +327,10 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
LayerTools &lt_prev = m_layer_tools[j - 1];
LayerTools &lt_next = m_layer_tools[j + 1];
assert(! lt_prev.extruders.empty() && ! lt_next.extruders.empty());
- assert(lt_prev.extruders.back() == lt_next.extruders.front());
+ // FIXME: Following assert tripped when running combine_infill.t. I decided to comment it out for now.
+ // If it is a bug, it's likely not critical, because this code is unchanged for a long time. It might
+ // still be worth looking into it more and decide if it is a bug or an obsolete assert.
+ //assert(lt_prev.extruders.back() == lt_next.extruders.front());
lt_extra.has_wipe_tower = true;
lt_extra.extruders.push_back(lt_next.extruders.front());
lt_extra.wipe_tower_partitions = lt_next.wipe_tower_partitions;
diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp
index 29bbb49fe..f9129f15a 100644
--- a/src/libslic3r/Print.cpp
+++ b/src/libslic3r/Print.cpp
@@ -51,7 +51,7 @@ void Print::reload_object(size_t /* idx */)
this->invalidate_all_steps();
/* TODO: this method should check whether the per-object config and per-material configs
have changed in such a way that regions need to be rearranged or we can just apply
- the diff and invalidate something. Same logic as apply_config()
+ the diff and invalidate something. Same logic as apply()
For now we just re-add all objects since we haven't implemented this incremental logic yet.
This should also check whether object volumes (parts) have changed. */
// collect all current model objects
@@ -83,7 +83,7 @@ PrintRegion* Print::add_region(const PrintRegionConfig &config)
return m_regions.back();
}
-// Called by Print::apply_config().
+// Called by Print::apply().
// This method only accepts PrintConfig option keys.
bool Print::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
@@ -422,10 +422,32 @@ void Print::add_model_object(ModelObject* model_object, int idx)
}
}
-bool Print::apply_config(DynamicPrintConfig config)
+// This function is only called through the Perl-C++ binding from the unit tests, should be
+// removed when unit tests are rewritten to C++.
+bool Print::apply_config_perl_tests_only(DynamicPrintConfig config)
{
tbb::mutex::scoped_lock lock(this->state_mutex());
+
+ // Perl unit tests were failing in case the preset was not normalized (e.g. https://github.com/prusa3d/PrusaSlicer/issues/2288 was caused
+ // by too short max_layer_height vector. Calling the necessary function Preset::normalize(...) is not currently possible because there is no
+ // access to preset. This should be solved when the unit tests are rewritten to C++. For now we just copy-pasted code from Preset.cpp
+ // to make sure the unit tests pass (functions set_num_extruders and nozzle_options()).
+ auto *nozzle_diameter = dynamic_cast<const ConfigOptionFloats*>(config.option("nozzle_diameter", true));
+ assert(nozzle_diameter != nullptr);
+ const auto &defaults = FullPrintConfig::defaults();
+ for (const std::string &key : { "nozzle_diameter", "min_layer_height", "max_layer_height", "extruder_offset",
+ "retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed",
+ "retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe",
+ "retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour" })
+ {
+ auto *opt = config.option(key, true);
+ assert(opt != nullptr);
+ assert(opt->is_vector());
+ unsigned int num_extruders = (unsigned int)nozzle_diameter->values.size();
+ static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
+ }
+
// we get a copy of the config object so we can modify it safely
config.normalize();
diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp
index be2a9a3bd..53d6d692d 100644
--- a/src/libslic3r/Print.hpp
+++ b/src/libslic3r/Print.hpp
@@ -294,7 +294,7 @@ class Print : public PrintBaseWithState<PrintStep, psCount>
// The following three methods are used by the Perl tests only. Get rid of them!
void reload_object(size_t idx);
void add_model_object(ModelObject* model_object, int idx = -1);
- bool apply_config(DynamicPrintConfig config);
+ bool apply_config_perl_tests_only(DynamicPrintConfig config);
void process() override;
// Exports G-code into a file name based on the path_template, returns the file path of the generated G-code file.
diff --git a/src/libslic3r/PrintBase.hpp b/src/libslic3r/PrintBase.hpp
index a4ef67117..d4c39499c 100644
--- a/src/libslic3r/PrintBase.hpp
+++ b/src/libslic3r/PrintBase.hpp
@@ -84,7 +84,7 @@ class PrintState : public PrintStateBase
// Set the step as started. Block on mutex while the Print / PrintObject / PrintRegion objects are being
// modified by the UI thread.
- // This is necessary to block until the Print::apply_config() updates its state, which may
+ // This is necessary to block until the Print::apply() updates its state, which may
// influence the processing step being entered.
template<typename ThrowIfCanceled>
bool set_started(StepType step, tbb::mutex &mtx, ThrowIfCanceled throw_if_canceled) {
diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp
index bcc61e0bf..660a2d939 100644
--- a/src/libslic3r/PrintObject.cpp
+++ b/src/libslic3r/PrintObject.cpp
@@ -435,7 +435,7 @@ SupportLayerPtrs::const_iterator PrintObject::insert_support_layer(SupportLayerP
return m_support_layers.insert(pos, new SupportLayer(id, this, height, print_z, slice_z));
}
-// Called by Print::apply_config().
+// Called by Print::apply().
// This method only accepts PrintObjectConfig and PrintRegionConfig option keys.
bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp
index 457be23ba..f0dfddda0 100644
--- a/src/libslic3r/SLAPrint.cpp
+++ b/src/libslic3r/SLAPrint.cpp
@@ -1552,7 +1552,7 @@ SLAPrintObject::SLAPrintObject(SLAPrint *print, ModelObject *model_object):
SLAPrintObject::~SLAPrintObject() {}
-// Called by SLAPrint::apply_config().
+// Called by SLAPrint::apply().
// This method only accepts SLAPrintObjectConfig option keys.
bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
diff --git a/t/combineinfill.t b/t/combineinfill.t
index 563ecb9c1..8aa0ff5e3 100644
--- a/t/combineinfill.t
+++ b/t/combineinfill.t
@@ -89,7 +89,7 @@ plan tests => 8;
# we disable combination after infill has been generated
$config->set('infill_every_layers', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
$print->process;
ok !(defined first { @{$_->get_region(0)->fill_surfaces} == 0 }
diff --git a/t/print.t b/t/print.t
index 6939d5f15..be2db3431 100644
--- a/t/print.t
+++ b/t/print.t
@@ -44,7 +44,7 @@ use Slic3r::Test;
is $print->print->regions->[0]->config->fill_density, 100, 'region config inherits model object config';
# user exports G-code, thus the default config is reapplied
- $print->print->apply_config($config);
+ $print->print->apply_config_perl_tests_only($config);
is $print->print->regions->[0]->config->fill_density, 100, 'apply_config() does not override per-object settings';
diff --git a/t/skirt_brim.t b/t/skirt_brim.t
index 225b0a92f..b05435784 100644
--- a/t/skirt_brim.t
+++ b/t/skirt_brim.t
@@ -106,7 +106,7 @@ use Slic3r::Test;
# we enable support material after skirt has been generated
$config->set('support_material', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
my $skirt_length = 0;
my @extrusion_points = ();
diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp
index f4c04577d..c35f967f8 100644
--- a/xs/xsp/Print.xsp
+++ b/xs/xsp/Print.xsp
@@ -142,8 +142,8 @@ _constant()
%};
void add_model_object(ModelObject* model_object, int idx = -1);
- bool apply_config(DynamicPrintConfig* config)
- %code%{ RETVAL = THIS->apply_config(*config); %};
+ bool apply_config_perl_tests_only(DynamicPrintConfig* config)
+ %code%{ RETVAL = THIS->apply_config_perl_tests_only(*config); %};
bool has_infinite_skirt();
std::vector<unsigned int> extruders() const;
int validate() %code%{

View File

@ -1,59 +0,0 @@
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp
index 1280fa6d9..ff2295cd7 100644
--- a/src/slic3r/GUI/GLCanvas3D.cpp
+++ b/src/slic3r/GUI/GLCanvas3D.cpp
@@ -4098,8 +4098,8 @@ void GLCanvas3D::_render_gizmos_overlay() const
#if ENABLE_RETINA_GL
m_gizmos.set_overlay_scale(m_retina_helper->get_scale_factor());
#else
-// m_gizmos.set_overlay_scale(m_canvas->GetContentScaleFactor());
- m_gizmos.set_overlay_scale(wxGetApp().em_unit()*0.1f);//! #ys_FIXME_experiment
+ const float size = int(GLGizmosManager::Default_Icons_Size*wxGetApp().toolbar_icon_scale());
+ m_gizmos.set_overlay_icon_size(size);
#endif /* __WXMSW__ */
m_gizmos.render_overlay(*this, m_selection);
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 472abd6dc..6773dbd30 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -390,6 +390,27 @@ void GUI_App::set_label_clr_sys(const wxColour& clr) {
app_config->save();
}
+float GUI_App::toolbar_icon_scale(const bool is_limited/* = false*/) const
+{
+#ifdef __APPLE__
+ const float icon_sc = 1.0f; // for Retina display will be used its own scale
+#else
+ const float icon_sc = m_em_unit*0.1f;
+#endif // __APPLE__
+
+ const std::string& use_val = app_config->get("use_custom_toolbar_size");
+ const std::string& val = app_config->get("custom_toolbar_size");
+
+ if (val.empty() || use_val.empty() || use_val == "0")
+ return icon_sc;
+
+ int int_val = atoi(val.c_str());
+ if (is_limited && int_val < 50)
+ int_val = 50;
+
+ return 0.01f * int_val * icon_sc;
+}
+
void GUI_App::recreate_GUI()
{
// Weird things happen as the Paint messages are floating around the windows being destructed.
diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp
index 1c9a462c6..b70f0dc16 100644
--- a/src/slic3r/GUI/GUI_App.hpp
+++ b/src/slic3r/GUI/GUI_App.hpp
@@ -115,6 +115,7 @@ public:
const wxFont& normal_font() { return m_normal_font; }
size_t em_unit() const { return m_em_unit; }
void set_em_unit(const size_t em_unit) { m_em_unit = em_unit; }
+ float toolbar_icon_scale(const bool is_limited = false) const;
void recreate_GUI();
void system_info();

View File

@ -1,21 +0,0 @@
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 3880f1d79..907231b76 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -142,6 +142,16 @@ GUI_App::GUI_App()
bool GUI_App::OnInit()
{
+ wxSetAssertHandler([](const wxString &file,
+ int line,
+ const wxString &func,
+ const wxString &cond,
+ const wxString &msg)
+ {
+ BOOST_LOG_TRIVIAL(debug) << file << " line: " << line << ":\n" << func
+ << " " << cond << " " << msg;
+ });
+
try {
return on_init_inner();
} catch (...) {

View File

@ -1,105 +0,0 @@
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 472abd6dc..74a574fe3 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -707,7 +707,7 @@ void GUI_App::update_mode()
void GUI_App::add_config_menu(wxMenuBar *menu)
{
auto local_menu = new wxMenu();
- wxWindowID config_id_base = wxWindow::NewControlId((int)ConfigMenuCnt);
+ wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt));
const auto config_wizard_name = _(ConfigWizard::name(true).wx_str());
const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), config_wizard_name);
@@ -729,9 +729,9 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _(L("Simple")), _(L("Simple View Mode")));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _(L("Advanced")), _(L("Advanced View Mode")));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeExpert, _(L("Expert")), _(L("Expert View Mode")));
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comSimple); }, config_id_base + ConfigMenuModeSimple);
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comAdvanced); }, config_id_base + ConfigMenuModeAdvanced);
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comExpert); }, config_id_base + ConfigMenuModeExpert);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comExpert) evt.Check(true); }, config_id_base + ConfigMenuModeExpert);
local_menu->AppendSubMenu(mode_menu, _(L("Mode")), wxString::Format(_(L("%s View Mode")), SLIC3R_APP_NAME));
local_menu->AppendSeparator();
@@ -810,10 +810,14 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
break;
}
});
- mode_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent& event) {
- int id_mode = event.GetId() - config_id_base;
- save_mode(id_mode - ConfigMenuModeSimple);
- });
+
+ using std::placeholders::_1;
+
+ auto modfn = [this](int mode, wxCommandEvent&) { if(get_mode() != mode) save_mode(mode); };
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple);
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced);
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comExpert, _1), config_id_base + ConfigMenuModeExpert);
+
menu->Append(local_menu, _(L("&Configuration")));
}
diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp
index 103a9ecf0..76ba853dc 100644
--- a/src/slic3r/GUI/wxExtensions.cpp
+++ b/src/slic3r/GUI/wxExtensions.cpp
@@ -2557,6 +2557,11 @@ ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 10*/) :
{_(L("Expert")), "mode_expert_sq.png"}
};
+ auto modebtnfn = [](wxCommandEvent &event, int mode_id) {
+ Slic3r::GUI::wxGetApp().save_mode(mode_id);
+ event.Skip();
+ };
+
m_mode_btns.reserve(3);
for (const auto& button : buttons) {
#ifdef __WXOSX__
@@ -2567,37 +2572,22 @@ ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 10*/) :
#else
m_mode_btns.push_back(new ModeButton(parent, wxID_ANY, button.second, button.first));;
#endif // __WXOSX__
+
+ m_mode_btns.back()->Bind(wxEVT_BUTTON, std::bind(modebtnfn, std::placeholders::_1, m_mode_btns.size() - 1));
+ Add(m_mode_btns.back());
}
-
- for (auto btn : m_mode_btns)
- {
- btn->Bind(wxEVT_BUTTON, [btn, this](wxCommandEvent &event) {
- event.Skip();
- int mode_id = 0;
- for (auto cur_btn : m_mode_btns) {
- if (cur_btn == btn)
- break;
- else
- mode_id++;
- }
- Slic3r::GUI::wxGetApp().save_mode(mode_id);
- });
-
- Add(btn);
- }
-
}
void ModeSizer::SetMode(const int mode)
{
- for (int m = 0; m < m_mode_btns.size(); m++)
- m_mode_btns[m]->SetState(m == mode);
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
+ m_mode_btns[m]->SetState(int(m) == mode);
}
void ModeSizer::msw_rescale()
{
- for (int m = 0; m < m_mode_btns.size(); m++)
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
m_mode_btns[m]->msw_rescale();
}

21
optional.patch Normal file
View File

@ -0,0 +1,21 @@
From 62592cab48cfb6a20d84041b1992aecc6a2b659c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= <hejl.lukas@gmail.com>
Date: Sat, 1 May 2021 22:33:59 +0200
Subject: [PATCH] Added missing include (GCC 11.1)
---
src/libslic3r/Optimize/Optimizer.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libslic3r/Optimize/Optimizer.hpp b/src/libslic3r/Optimize/Optimizer.hpp
index 05191eba26..8ae55c61c5 100644
--- a/src/libslic3r/Optimize/Optimizer.hpp
+++ b/src/libslic3r/Optimize/Optimizer.hpp
@@ -8,6 +8,7 @@
#include <functional>
#include <limits>
#include <cassert>
+#include <optional>
namespace Slic3r { namespace opt {

View File

@ -1,13 +0,0 @@
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index ff1da37..a3f92e4 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -2,7 +2,7 @@
#include <string.h>
#include <map>
#include <string>
-#include <expat/expat.h>
+#include <expat.h>
#include <boost/nowide/cstdio.hpp>

View File

@ -1,65 +0,0 @@
diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp
index 5a16a6e..2023259 100644
--- a/src/libslic3r/Format/3mf.cpp
+++ b/src/libslic3r/Format/3mf.cpp
@@ -16,7 +16,7 @@
#include <expat.h>
#include <Eigen/Dense>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
// VERSION NUMBERS
// 0 : .3mf, files saved by older slic3r or other applications. No version definition in them.
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index a3f92e4..f85c6d6 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -16,7 +16,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/nowide/fstream.hpp>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
#if 0
// Enable debugging and assert in this file.
diff --git a/src/libslic3r/Format/PRUS.cpp b/src/libslic3r/Format/PRUS.cpp
index 80aae75..04cedc0 100644
--- a/src/libslic3r/Format/PRUS.cpp
+++ b/src/libslic3r/Format/PRUS.cpp
@@ -4,7 +4,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/nowide/convert.hpp>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
#include <Eigen/Geometry>
diff --git a/src/libslic3r/Rasterizer/Rasterizer.cpp b/src/libslic3r/Rasterizer/Rasterizer.cpp
index 6384a24..e121355 100644
--- a/src/libslic3r/Rasterizer/Rasterizer.cpp
+++ b/src/libslic3r/Rasterizer/Rasterizer.cpp
@@ -15,7 +15,7 @@
#include <agg/agg_path_storage.h>
// Experimental minz image write:
-#include <miniz/miniz_tdef.h>
+#include <miniz.h>
namespace Slic3r {
diff --git a/src/libslic3r/Zipper.cpp b/src/libslic3r/Zipper.cpp
index 4466f1b..16f4f5b 100644
--- a/src/libslic3r/Zipper.cpp
+++ b/src/libslic3r/Zipper.cpp
@@ -3,7 +3,7 @@
#include <iostream>
#include "Zipper.hpp"
-#include "miniz/miniz_zip.h"
+#include <miniz.h>
#include <boost/log/trivial.hpp>
#include "I18N.hpp"

View File

@ -1,17 +0,0 @@
diff --git a/src/libslic3r/TriangleMesh.cpp b/src/libslic3r/TriangleMesh.cpp
index 20c9a9c..4d35cab 100644
--- a/src/libslic3r/TriangleMesh.cpp
+++ b/src/libslic3r/TriangleMesh.cpp
@@ -2,9 +2,9 @@
#include "ClipperUtils.hpp"
#include "Geometry.hpp"
#include "Tesselate.hpp"
-#include "qhull/src/libqhullcpp/Qhull.h"
-#include "qhull/src/libqhullcpp/QhullFacetList.h"
-#include "qhull/src/libqhullcpp/QhullVertexSet.h"
+#include <libqhullcpp/Qhull.h>
+#include <libqhullcpp/QhullFacetList.h>
+#include <libqhullcpp/QhullVertexSet.h>
#include <cmath>
#include <deque>
#include <queue>

View File

@ -1,13 +0,0 @@
diff --git a/xs/t/03_point.t b/xs/t/03_point.t
index cb71f68..0cc58e1 100644
--- a/xs/t/03_point.t
+++ b/xs/t/03_point.t
@@ -44,7 +44,7 @@ ok !$point->coincides_with($point2), 'coincides_with';
{
my $line = Slic3r::Line->new([50,50], [125,-25]);
- is +Slic3r::Point->new(100,0)->distance_to_line($line), 0, 'distance_to_line()';
+ cmp_ok(abs(Slic3r::Point->new(100,0)->distance_to_line($line)), '<=', 4e-15, 'distance_to_line()');
}
{

View File

@ -0,0 +1,31 @@
From 926ae0471800abd1e5335e251a5934570eb8f6ff Mon Sep 17 00:00:00 2001
From: Vojtech Bubnik <bubnikv@gmail.com>
Date: Mon, 25 Apr 2022 11:32:03 +0200
Subject: [PATCH] Follow-up to 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Fixing
compilation of tests on latest GCC/boost
---
tests/fff_print/test_data.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/fff_print/test_data.cpp b/tests/fff_print/test_data.cpp
index 32e31c264c..f7077007db 100644
--- a/tests/fff_print/test_data.cpp
+++ b/tests/fff_print/test_data.cpp
@@ -11,6 +11,7 @@
#include <string>
#include <boost/nowide/cstdio.hpp>
+#include <boost/nowide/fstream.hpp>
#include <boost/filesystem.hpp>
#include <libslic3r/ModelArrange.hpp>
@@ -286,7 +287,7 @@ std::string gcode(Print & print)
print.set_status_silent();
print.process();
print.export_gcode(temp.string(), nullptr, nullptr);
- std::ifstream t(temp.string());
+ boost::nowide::ifstream t(temp.string());
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
boost::nowide::remove(temp.string().c_str());
return str;

View File

@ -0,0 +1,81 @@
From 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Mon Sep 17 00:00:00 2001
From: Vojtech Bubnik <bubnikv@gmail.com>
Date: Mon, 25 Apr 2022 08:33:48 +0200
Subject: [PATCH] Fix of Boost 1.79 deprecated boost::filesystem::ofstream
#8238 Replacing boost::filesystem::fstream with boost::nowide::fstream
variants with the unfortunate cost of string path conversion on Windows from
16 bits to UTF8 and back to 16 bits.
Unfortunately we cannot use std::filesystem yet as it is missing
on older MACs and because the interface is crooked minefield on Windows
see https://github.com/microsoft/STL/issues/909
---
src/hints/HintsToPot.cpp | 2 +-
src/libslic3r/Preset.cpp | 2 +-
src/slic3r/GUI/HintNotification.cpp | 8 +++++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp
index 7c8029cdeb..4791f0612f 100644
--- a/src/hints/HintsToPot.cpp
+++ b/src/hints/HintsToPot.cpp
@@ -9,7 +9,7 @@
bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
{
- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
+ boost::nowide::ofstream file(path.string(), std::ios_base::app);
for (const auto& element : data)
{
//Example of .pot element
diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
index f3a1c15b3e..f171cb14dd 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -84,7 +84,7 @@ ConfigFileType guess_config_file_type(const ptree &tree)
VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all)
{
ptree tree;
- boost::filesystem::ifstream ifs(path);
+ boost::nowide::ifstream ifs(path.string());
boost::property_tree::read_ini(ifs, tree);
return VendorProfile::from_ini(tree, path, load_all);
}
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index 93e0fb3259..820b74eedb 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -14,12 +14,14 @@
#include "libslic3r/Config.hpp"
#include "libslic3r/PrintConfig.hpp"
+#include <map>
+
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ini_parser.hpp>
-#include <map>
+
#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
@@ -65,7 +67,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
void write_used_binary(const std::vector<std::string>& ids)
{
- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
+ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal").string(), std::ios::binary);
cereal::BinaryOutputArchive archive(file);
HintsCerealData cd { ids };
try
@@ -84,7 +86,7 @@ void read_used_binary(std::vector<std::string>& ids)
BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
return;
}
- boost::filesystem::ifstream file(path);
+ boost::nowide::ifstream file(path.string());
cereal::BinaryInputArchive archive(file);
HintsCerealData cd;
try

View File

@ -0,0 +1,26 @@
Author: Thomas Viehmann <tv@beamnet.de>
Date: Thu, 8 Dec 2022 12:23:15 +0800
Subject: Fix segfault due to uninitialized imgui in wxwidgets3.2
Bug-Debian: https://bugs.debian.org/1022234
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022234#15
Forwarded: no
---
src/slic3r/GUI/HintNotification.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index e88947d..1ca52e0 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -560,7 +560,9 @@ void HintDatabase::clear_used()
void NotificationManager::HintNotification::count_spaces()
{
- //determine line width
+ ImGuiWrapper& imgui = *wxGetApp().imgui();
+ imgui.new_frame();
+ //determine line width
m_line_height = ImGui::CalcTextSize("A").y;

View File

@ -0,0 +1,32 @@
From: Chow Loong Jin <hyperair@debian.org>
Date: Tue, 11 Oct 2022 10:42:05 +0800
Subject: Fix segfault due to WxTranslations::Get() returning nullptr
Bug-Debian: https://bugs.debian.org/1020702
Bug: https://github.com/prusa3d/PrusaSlicer/issues/9024
Origin: https://github.com/prusa3d/PrusaSlicer/issues/8299#issuecomment-1236874810
Author: Lukas Matena <lukasmatena@seznam.cz>
---
src/slic3r/GUI/GUI_App.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 0aeebc7..fd22f2c 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -2075,6 +2075,15 @@ bool GUI_App::load_language(wxString language, bool initial)
{
// Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance.
wxLocale temp_locale;
+#ifdef __WXOSX__
+ // ysFIXME - temporary workaround till it isn't fixed in wxWidgets:
+ // Use English as an initial language, because of under OSX it try to load "inappropriate" language for wxLANGUAGE_DEFAULT.
+ // For example in our case it's trying to load "en_CZ" and as a result PrusaSlicer catch warning message.
+ // But wxWidgets guys work on it.
+ temp_locale.Init(wxLANGUAGE_ENGLISH);
+#else
+ temp_locale.Init();
+#endif // __WXOSX__
// Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code).
wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT);
// Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer

11
prusa-slicer-gcc13.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp.gcc13 PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp
--- PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp.gcc13 2022-04-22 07:01:19.000000000 -0400
+++ PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp 2023-01-26 20:47:42.311148005 -0500
@@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <istream>
+#include <cstdint>
namespace Slic3r { namespace png {

View File

@ -0,0 +1,35 @@
diff -up PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt.no-cereal-lib 2022-02-11 20:07:36.399806933 +0000
+++ PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt 2022-02-11 20:14:53.806895641 +0000
@@ -335,7 +335,6 @@ target_include_directories(libslic3r PUB
target_link_libraries(libslic3r
libnest2d
admesh
- cereal
libigl
miniz
boost_libs
diff -up PrusaSlicer-version_2.4.0/src/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/CMakeLists.txt.no-cereal-lib 2022-02-11 20:31:04.581810442 +0000
+++ PrusaSlicer-version_2.4.0/src/CMakeLists.txt 2022-02-11 20:31:15.726430666 +0000
@@ -125,7 +125,7 @@ if (NOT WIN32 AND NOT APPLE)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif ()
-target_link_libraries(PrusaSlicer libslic3r cereal)
+target_link_libraries(PrusaSlicer libslic3r)
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
diff -up PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt.no-cereal-lib 2022-02-11 20:30:36.653762157 +0000
+++ PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt 2022-02-11 20:30:47.604388990 +0000
@@ -260,7 +260,7 @@ add_library(libslic3r_gui STATIC ${SLIC3
encoding_check(libslic3r_gui)
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
+target_link_libraries(libslic3r_gui libslic3r avrdude imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)

View File

@ -0,0 +1,76 @@
diff -up PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake.openexr3 PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake
--- PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake.openexr3 2021-12-21 15:57:35.000000000 +0000
+++ PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake 2022-02-11 19:27:12.105404186 +0000
@@ -347,28 +347,10 @@ macro(just_fail msg)
return()
endmacro()
-find_package(IlmBase QUIET)
-if(NOT IlmBase_FOUND)
- pkg_check_modules(IlmBase QUIET IlmBase)
-endif()
-if (IlmBase_FOUND AND NOT TARGET IlmBase::Half)
- message(STATUS "Falling back to IlmBase found by pkg-config...")
-
- find_library(IlmHalf_LIBRARY NAMES Half)
- if(IlmHalf_LIBRARY-NOTFOUND OR NOT IlmBase_INCLUDE_DIRS)
- just_fail("IlmBase::Half can not be found!")
- endif()
-
- add_library(IlmBase::Half UNKNOWN IMPORTED)
- set_target_properties(IlmBase::Half PROPERTIES
- IMPORTED_LOCATION "${IlmHalf_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
-elseif(NOT IlmBase_FOUND)
- just_fail("IlmBase::Half can not be found!")
-endif()
find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
find_package(ZLIB ${_quiet} ${_required})
find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
+find_package(Imath CONFIG)
# Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
# which we can query for optional deps. This basically runs ldd/otoll/objdump
@@ -419,7 +401,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUI
set(OpenVDB_USES_LOG4CPLUS ON)
endif()
- string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
+ string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP)
if(NOT ${_HAS_DEP} EQUAL -1)
set(OpenVDB_USES_ILM ON)
endif()
@@ -450,11 +432,7 @@ if(OpenVDB_USES_LOG4CPLUS)
find_package(Log4cplus ${_quiet} ${_required})
endif()
-if(OpenVDB_USES_ILM)
- find_package(IlmBase ${_quiet} ${_required})
-endif()
-
-if(OpenVDB_USES_EXR)
+if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
find_package(OpenEXR ${_quiet} ${_required})
endif()
@@ -471,7 +449,7 @@ endif()
set(_OPENVDB_VISIBLE_DEPENDENCIES
Boost::iostreams
Boost::system
- IlmBase::Half
+ Imath::Imath
)
set(_OPENVDB_DEFINITIONS)
@@ -481,10 +459,7 @@ endif()
if(OpenVDB_USES_EXR)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ OpenEXR::OpenEXR
)
list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
endif()

View File

@ -0,0 +1,43 @@
From f9f8e811526dbf41c4987400924b1028c2dadd1a Mon Sep 17 00:00:00 2001
From: KARBOWSKI Piotr <piotr.karbowski@gmail.com>
Date: Mon, 9 May 2022 10:35:50 +0200
Subject: [PATCH] Fix building with new Boost 1.79.0.
Fixes #8302
---
src/slic3r/GUI/DesktopIntegrationDialog.cpp | 3 ++-
src/slic3r/GUI/GUI_App.cpp | 1 +
src/slic3r/Utils/AppUpdater.cpp | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
index 81c681bc3a..7f99a505c6 100644
--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
@@ -10,6 +10,7 @@
#include "libslic3r/Platform.hpp"
#include "libslic3r/Config.hpp"
+#include <boost/nowide/fstream.hpp>
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
#include <boost/dll/runtime_symbol_info.hpp>
@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
} // namespace GUI
} // namespace Slic3r
-#endif // __linux__
\ No newline at end of file
+#endif // __linux__
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 8533854f4d..4435f836b3 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -13,6 +13,7 @@
#include <cstdlib>
#include <regex>
#include <string_view>
+#include <boost/nowide/fstream.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">prusa-slicer.desktop</id>
<id type="desktop">PrusaSlicer.desktop</id>
<metadata_license>0BSD</metadata_license>
<project_licence>AGPLv3</project_licence>
<summary>3D printing slicer optimized for Prusa printers</summary>
@ -9,7 +9,7 @@
<p>PrusaSlicer is based on Slic3r by Alessandro Ranelucci and the RepRap community.</p>
</description>
<screenshots>
<screenshot type="default" width="1152" height="940">https://www.prusa3d.com/wp-content/uploads/2018/07/image.jpg</screenshot>
<screenshot type="default" width="2253" height="1432">https://user-images.githubusercontent.com/10857207/61836791-71ffa080-ae47-11e9-9011-2e6500956e26.png</screenshot>
</screenshots>
<url type="homepage">https://github.com/prusa3d/PrusaSlicer/</url>
<updatecontact>bubnikv@gmail.com</updatecontact>

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Name=PrusaSlicer
GenericName=3D Printing Software
Icon=prusa-slicer
Exec=prusa-slicer %F
Terminal=false
Type=Application
MimeType=model/stl;model/x-wavefront-obj;model/3mf;model/x-geomview-off;application/x-amf;
Categories=Graphics;3DGraphics;Engineering;
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
StartupNotify=false
StartupWMClass=prusa-slicer

View File

@ -1,9 +1,14 @@
# Currently all of the test suite requires the old Perl infrastructure to run.
# When building flatpak, tests have to be disabled by default due to some missing dependencies.
%if 0%{?flatpak}
%bcond_with perltests
%else
%bcond_without perltests
%endif
Name: prusa-slicer
Version: 2.0.0
Release: 3%{?dist}
Version: 2.4.2
Release: 9%{?dist}
Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -16,38 +21,49 @@ Summary: 3D printing slicer optimized for Prusa printers
# that here.
License: AGPLv3
URL: https://github.com/prusa3d/PrusaSlicer/
Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_2.0.0.tar.gz
Source1: %name.desktop
Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%version.tar.gz
Source2: %name.appdata.xml
# A single test suite fails, but only on aarch64 and s390x, due to floating
# point rouding issues. This patch adds small epsilon (4e-15) to one
# comparison to work around this.
# We will conditionally apply this so it's a source file, not a patch.
# https://github.com/prusa3d/PrusaSlicer/issues/2461
Source10: patch-testsuite-epsilon
Patch1: prusa-slicer-no-cereal-lib.patch
# Fix an improper include of expat.h
# https://github.com/prusa3d/PrusaSlicer/pull/2315
Patch0: patch-expat-includes
# Add missing include, needed for GCC13
# Proposed upstream: https://github.com/prusa3d/PrusaSlicer/pull/9434
Patch2: prusa-slicer-gcc13.patch
# Fix improper qhull include locations
# https://github.com/prusa3d/PrusaSlicer/pull/2319
Patch1: patch-qhull-includes
# Fix a couple of segfaults that happen with wxWidgets 3.2 (from Debian)
Patch3: prusa-slicer-fix-wxtranslations-segfault.patch
Patch4: prusa-slicer-fix-uninitialized-imgui-segfault.patch
# Fix a number of failing unit tests
# https://github.com/prusa3d/PrusaSlicer/issues/2288
Patch10: https://github.com/prusa3d/PrusaSlicer/commit/07282eb24d027817b4279f59ebbf0d80bac5f950.patch
# Beware!
# Patches >= 340 are only applied on Fedora 34+
# Patches >= 350 are only applied on Fedora 35+
# ...
# These patches are pulled from upstream's Debian packaging, and were cherry picked from post-release commits.
# I (JT) have not personally seen the bugs these fix but upstream asked that they be included.
Patch20: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/fix-gizmo-icon-size.patch
Patch21: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/handle-wx-assert-with-boost.patch
Patch22: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/mode-switching-fix.patch
# OpenEXR 3 fixes
Patch351: https://github.com/archlinux/svntogit-community/blob/1dea61c0b5/trunk/prusa-slicer-openexr3.patch
# Boost 1.79 fixes
# https://github.com/prusa3d/PrusaSlicer/pull/8304
Patch391: prusa-slicer-pr8304-boost-1_79-fix.patch
# https://github.com/prusa3d/PrusaSlicer/commit/408e56f0390f20aaf793e0aa0c70c4d9544401d4
Patch392: prusa-slicer-boost_filesystem_ofstream-deprecation-1_79.patch
# https://github.com/prusa3d/PrusaSlicer/commit/926ae0471800abd1e5335e251a5934570eb8f6ff
Patch393: prusa-slicer-boost_filesystem_ofstream-deprecation-1_79-followup.patch
# Highly-parallel uild can run out of memory on PPC64le
%ifarch ppc64le
%global _smp_ncpus_max 8
%endif
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
ExcludeArch: %{ix86}
%endif
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: cereal-devel
BuildRequires: CGAL-devel
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
BuildRequires: eigen3-devel
@ -57,15 +73,17 @@ BuildRequires: gettext
BuildRequires: git-core
BuildRequires: glew-devel
BuildRequires: gtest-devel
BuildRequires: ilmbase-devel
BuildRequires: ImageMagick
BuildRequires: miniz-devel
BuildRequires: libgudev
# Upstream miniz is no longer compatible, gotta use the fork.
# BuildRequires: miniz-devel
BuildRequires: NLopt-devel
BuildRequires: openvdb
BuildRequires: openvdb-devel
BuildRequires: systemd-devel
BuildRequires: tbb-devel
BuildRequires: wxBase3-devel
BuildRequires: wxGTK3-devel
# Upstream says this is obsolete, but still needed to compile
BuildRequires: poly2tri-devel
BuildRequires: wxGTK-devel
# Things we wish we could unbundle
#BuildRequires: admesh-devel >= 0.98.1
@ -73,42 +91,38 @@ BuildRequires: poly2tri-devel
#BuildRequires: boost-nowide-devel
#BuildRequires: qhull-devel
# For the %%_udevrulesdir macro
BuildRequires: systemd
%if %{with perltests}
# All of the old Perl dependencies needed to run the test suite
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(Class::XSAccessor)
BuildRequires: perl(Devel::CheckLib)
BuildRequires: perl(Encode::Locale)
BuildRequires: perl(ExtUtils::CppGuess)
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::ParseXS)
BuildRequires: perl(ExtUtils::Typemaps::Default)
BuildRequires: perl(ExtUtils::Typemaps)
BuildRequires: perl(ExtUtils::Typemaps::Basic)
BuildRequires: perl(ExtUtils::XSpp)
BuildRequires: perl(ExtUtils::XSpp::Cmd)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Spec)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Growl::GNTP)
BuildRequires: perl(IO::Scalar)
BuildRequires: perl(List::Util)
BuildRequires: perl(local::lib)
BuildRequires: perl(Math::PlanePath)
BuildRequires: perl(Module::Build::WithXSpp)
BuildRequires: perl(Moo)
BuildRequires: perl(parent)
BuildRequires: perl(POSIX)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Storable)
BuildRequires: perl(SVG)
BuildRequires: perl(Test::Harness)
BuildRequires: perl(Test::More)
BuildRequires: perl(Thread::Semaphore)
BuildRequires: perl(threads)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(Unicode::Normalize)
BuildRequires: perl(Wx)
BuildRequires: perl(XML::SAX)
BuildRequires: perl(XML::SAX::ExpatXS)
%endif
Requires: hicolor-icon-theme
@ -145,10 +159,6 @@ Provides: bundled(avrdude) = 6.3
# Upstream: https://github.com/artyom-beilis/nowide
Provides: bundled(boost-nowide)
# License: MPLv2.0
# Upstream: https://github.com/libigl/libigl
Provides: bundled(igl)
# Not packaged in Fedora, but could be.
# License: MIT
# Upstream: https://github.com/ocornut/imgui
@ -160,15 +170,13 @@ Provides: bundled(imgui) = 1.66
# License: MIT
Provides: bundled(mesa-libGLU)
%if %{?fedora <= 30}
# For <= F30, the system miniz is too old to be used. The bundled library is a
# fork from somewhere around 2.0.6, with various C++ source files added.
# License: MIT and Unlicense
Provides: bundled(miniz) = 2.0.6
%endif
# PrusaResearch added functions to the upstream miniz. Yay.
# See https://github.com/prusa3d/PrusaSlicer/issues/7080
# License: MIT
Provides: bundled(miniz) = 2.1.0prusa
# A header-only library, developed by one of the authors of PrusaSlicer. Not
# packaged in Fedora, but could be (for little benefit).
# A header-only library, developed by one of the authors of PrusaSlicer.
# Packaged in Fedora, but have not yet attempted unbundling.
# None of the source files carry licensing information, but a file LICENSE.txt
# exists and contains the AGPL text.
# License: AGPLv3
@ -222,11 +230,16 @@ Provides: bundled(shinyprofiler) = 2.6~rc1
# In case someone tries to install the upstream name
Provides: PrusaSlicer = %version-%release
# Because the old profiles are not compatible, don't replace slic3r-prusa3d
# until F31. Both packages can be installed and used in parallel
%if %{?fedora} >= 31
# The package was renamed after version 2
Obsoletes: slic3r-prusa3d < 1.41.3-2
Provides: slic3r-prusa3d = %version-%release
# Get Fedora 33++ behavior on anything older
%undefine __cmake_in_source_build
# i686 arm build fails with lto
%ifarch %ix86 %arm
%define _lto_cflags %{nil}
%endif
%description
@ -239,8 +252,11 @@ with Mach3, LinuxCNC and Machinekit controllers.
PrusaSlicer is based on Slic3r by Alessandro Ranelucci and the RepRap
community.
%prep
%autosetup -S git -n PrusaSlicer-version_2.0.0
%autosetup -S git -n PrusaSlicer-version_%version -N
# Apply patches, but only apply 340+ on Fedora 34, 350+ on Fedora 35, etc...
%autopatch -M %[%{?fedora} * 10 + 9]
commit () { git commit -q -a -m "$1" --author "%{__scm_author}"; }
@ -248,12 +264,6 @@ commit () { git commit -q -a -m "$1" --author "%{__scm_author}"; }
sed -i 's/UNKNOWN/Fedora/' version.inc
commit "Fix version string"
# F29 has the nlopt library under a different name
%if %{?fedora} < 30
sed -ri 's/^(.*_NLopt_LIB_NAMES "nlopt)(".*)$/\1_cxx\2/' src/libnest2d/cmake_modules/FindNLopt.cmake
commit "Fix name of nlopt library"
%endif
# Copy out specific license files so we can reference them later.
license () { mv src/$1/$2 $2-$1; git add $2-$1; echo %%license $2-$1 >> license-files; }
license agg copying
@ -278,63 +288,31 @@ unbundle eigen
unbundle expat
unbundle glew
# This code doesn't seem to be used, so remove it to (potentially) simplify the
# licensing issue.
unbundle igl/copyleft
# These tests were fixed but the fixes were undone upsteam with commit ac6969c
# https://github.com/prusa3d/PrusaSlicer/issues/2288
# Just remove them for now
rm -f t/combineinfill.t t/custom_gcode.t t/fill.t t/multi.t t/retraction.t t/skirt_brim.t
commit "Remove xfail tests."
# Upstream says this is obsolete, but it's still needed for compilation.
# The Fedora version appears to work fine for that purpose so we'll use it.
unbundle poly2tri
# The miniz in F30 is too old to unbundle.
# The sed could be a patch, but conditionally applying patches is problematic
# and this will be fixed upstream in the next release.
%if %{?fedora} >= 31
unbundle miniz
sed -i 's/^#include.*miniz.*/#include <miniz.h>/' \
src/libslic3r/Format/{3mf.cpp,AMF.cpp,PRUS.cpp} \
src/libslic3r/Rasterizer/Rasterizer.cpp \
src/libslic3r/Zipper.cpp
commit "Fix miniz includes"
%endif
# A single test fails on these architectures due to a difference in floating
# point rounding causing a tiny value instead of an expected zero.
%ifarch s390x aarch64
git apply %SOURCE10
commit "Testsuite fix"
# compiling test_voronoi.cpp seems to hang...
# Fixed with binutils-2.38-6.fc37 (bug 2059646)
%if 0%{?fedora} < 37
sed -i tests/libslic3r/CMakeLists.txt -e '\@test_voronoi.cpp@d'
commit "Disable voronoi test"
%endif
%build
mkdir Build
pushd Build
# -DSLIC3R_PCH=0 - Disable precompiled headers, which break cmake for some reason
# -DSLIC3R_FHS=1 - Enable FHS layout instead of installing things into the resources directory
# -DSLIC3R_WX_STABLE=1 - Allow use of wxGTK version 3.0 instead of 3.1.
%cmake .. -DSLIC3R_PCH=0 -DSLIC3R_FHS=1 -DSLIC3R_WX_STABLE=1 -DSLIC3R_GTK=3 \
%cmake -DSLIC3R_PCH=0 -DSLIC3R_FHS=1 -DSLIC3R_WX_STABLE=1 -DSLIC3R_GTK=3 \
-DSLIC3R_BUILD_TESTS=1 -DCMAKE_BUILD_TYPE=Release \
%if %{with perltests}
-DSLIC3R_PERL_XS=1
%endif
%make_build
popd
# Extract multiple sizes of PNG from the included .ico file. The order of
# extracted files can change, so a bit of magic is required to get stable
# filenames.
mkdir hicolor
pushd hicolor
convert -set filename:dim '%%wx%%h' ../resources/icons/PrusaSlicer.ico %name-%%[filename:dim].png
for res in 16 32 48 64 128 256; do
mkdir -p ${res}x${res}/apps
cp %name-${res}x${res}.png ${res}x${res}/apps/%name.png
done
rm %name-*.png
popd
%cmake_build
# To avoid "iCCP: Not recognized known sRGB profile that has been edited"
pushd resources/icons
find . -type f -name "*.png" -exec convert {} -strip {} \;
@ -342,9 +320,7 @@ popd
%install
pushd Build
%make_install
popd
%cmake_install
# Since the binary segfaults under Wayland, we have to wrap it.
mv %buildroot%_bindir/prusa-slicer %buildroot%_bindir/prusa-slicer.wrapped
@ -355,20 +331,18 @@ exec %_bindir/prusa-slicer.wrapped "$@"
END
chmod 755 %buildroot%_bindir/prusa-slicer
mkdir -p %buildroot%_datadir/icons/hicolor/
cp -r hicolor/* %buildroot%_datadir/icons/hicolor/
mkdir -p %buildroot%_datadir/appdata
install -m 644 %SOURCE2 %buildroot%_datadir/appdata/%name.appdata.xml
desktop-file-install --dir=%buildroot%_datadir/applications %SOURCE1
# For now, delete the Perl module that gets installed. It only exists because
# we want the test suite to run. It could be placed into a subpackage, but
# nothing needs it currently and it would conflict with the other slic3r
# package.
rm -rf %buildroot/%perl_vendorarch
rm -rf %buildroot/%perl_vendorlib
#
# The %%perl_vendorarch and %%perl_vendorlib can be undefined,
# which would cause deleting of the whole buildroot.
%{?perl_vendorarch:rm -rf %buildroot/%perl_vendorarch}
%{?perl_vendorlib:rm -rf %buildroot/%perl_vendorlib}
# Upstream installs the translation source files when they probably shouldn't
ls -lR %buildroot%_datadir/PrusaSlicer/localization
@ -398,28 +372,185 @@ find %buildroot%_datadir/PrusaSlicer/localization -type d | sed '
s:\(.*\):%dir \1:
' >> lang-files
%if 0%{?flatpak}
# Remove udev rules that aren't needed for flatpak builds
rm -f %buildroot%_prefix/lib/udev/rules.d/90-3dconnexion.rules
%endif
%check
desktop-file-validate %buildroot%_datadir/applications/PrusaGcodeviewer.desktop
# Some tests are Perl but there is a framework for other tests even though
# currently the only thing that uses them is one of the bundled libraries.
# There's no reason not to run as much as we can.
pushd Build
make test ARGS=-V
%cmake_build -- test ARGS=-V
%files -f license-files -f lang-files
%license LICENSE
%doc README.md
%_bindir/%name
%_bindir/prusa-gcodeviewer
%_bindir/%name.wrapped
%_datadir/icons/hicolor/*/apps/%name.png
%_datadir/applications/%name.desktop
%_datadir/icons/hicolor/*/apps/PrusaSlicer*.png
%_datadir/applications/PrusaGcodeviewer.desktop
%_datadir/applications/PrusaSlicer.desktop
%_datadir/appdata/%name.appdata.xml
%dir %_datadir/PrusaSlicer
%_datadir/PrusaSlicer/{icons,models,profiles,shaders}/
%_datadir/PrusaSlicer/{icons,models,profiles,shaders,shapes,udev,applications,data}/
%if !0%{?flatpak}
%_udevrulesdir/90-3dconnexion.rules
%endif
%changelog
* Mon Feb 27 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.2-9
- Backport upstream fix for build with Boost 1.79+
* Mon Feb 20 2023 Jonathan Wakely <jwakely@redhat.com> - 2.4.2-8
- Rebuilt for Boost 1.81
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-7
- Rebuild with wxWidgets 3.2 (again) with additional fixes
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-6
- Fix FTBFS with GCC 13
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Dec 31 2022 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
- Rebuilt for openvdb 10.0
* Tue Oct 25 2022 Kalev Lember <klember@redhat.com> - 2.4.2-3
- Switch back to wxWidgets 3.0 (#2131615)
* Thu Aug 04 2022 Scott Talbert <swt@techie.net> - 2.4.2-2
- Rebuild with wxWidgets 3.2
* Fri Jul 22 2022 Jan Staněk <jstanek@redhat.com> - 2.4.2-1
- Update to 2.4.2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 27 2022 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-5
- Rebuilt for openvdb 9.1
- Fixes: rhbz#2098784
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 2.4.0-4
- Rebuilt for Boost 1.78
* Thu Mar 17 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.0-3
- Remove the previous voronoi workaround for fixed binutils
* Wed Mar 2 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.0-2
- %%ix86 %%arm: kill LTO for now
- kill test_voronoi.cpp, compilation (as) hangs (bug 2059646)
* Mon Feb 14 2022 Tom Callaway <spot@fedoraproject.org> - 2.4.0-1
- update to 2.4.0
* Thu Feb 10 2022 Orion Poplawski <orion@nwra.com> - 2.3.3-5
- Rebuild for glew 2.2
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 30 2021 Miro Hrončok <mhroncok@redhat.com> - 2.3.3-3
- Disable GLIBCXX_ASSERTIONS
- Fixes rhbz#2023345
* Sun Nov 28 2021 Richard Shaw <hobbes1069@gmail.com> - 2.3.3-2
- Rebuild for OpenVDB 9.
* Mon Nov 08 2021 Dennis Gilmore <dennis@ausil.us> - 2.3.3-1
- update to 2.3.3
- remove upstreamed gcc patch
* Sat Aug 07 2021 Jonathan Wakely <jwakely@redhat.com> - 2.3.1-5
- Rebuilt for Boost 1.76
* Mon Aug 02 2021 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-4
- Rebuilt for OpenEXR 3
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 23 2021 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-2
- Rebuilt for openvdb 8.1
- Fixes rhbz#1972120
* Sat May 15 2021 Dennis Gilmore <dennis@ausil.us> - 2.3.1-1
- update to 2.3.1
- include upstream patch fixing build with gcc 11
* Mon May 10 2021 Jonathan Wakely <jwakely@redhat.com> - 2.2.0-12
- Rebuilt for removed libstdc++ symbols (#1937698)
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 2.2.0-10
- Rebuilt for Boost 1.75
* Thu Jan 14 2021 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-9
- Trim perl build dependencies
* Mon Jan 04 2021 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-8
- Rebuilt for openvdb 8.0
- Fixes: rhbz#1912499
* Fri Jan 01 2021 Richard Shaw <hobbes1069@gmail.com> - 2.2.0-7
- Rebuild for OpenEXR 2.5.3.
* Wed Aug 26 2020 Jan Beran <jaberan@redhat.com> - 2.2.0-6
- Add fixes for the flatpak build:
disable perltests by default when building flatpak
don't remove Perl modules when building without perltests
* Mon Aug 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-5
- Rebuilt for openvdb 7.1
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 02 2020 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-2
- Rebuilt and fix for Boost 1.73.0 (#1842011)
* Tue Mar 31 2020 Alexander Jacocks <alexander@redhat.com> - 2.2.0-1
- Update to 2.2.0.
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 02 2020 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.1-1
- Update to 2.1.1.
* Mon Sep 23 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0-2
- Fix the s390x build and re-enable it.
* Fri Sep 13 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0-1
- Update to 2.1.0.
* Fri Sep 06 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0~rc0-2
- Temporarily disable build on s390x because of a new bug in the code upstream:
https://github.com/prusa3d/PrusaSlicer/issues/2879
* Wed Sep 04 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0~rc0-1
- Update to rc0.
- Drop tests which are known to fail.
* Tue Aug 13 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0~alpha1-1
- Update to the current alpha.
- Drop several upstreamed patches.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jun 14 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.0.0-3
- Wrap the executable to set GDK_BACKEND=x11 to avoid segfault on Wayland.

View File

@ -1 +1 @@
SHA512 (version_2.0.0.tar.gz) = 31f51f4b0d54f9061e6556631297e5a2c3bbe7f867a891b5ec8e8c6ed4f4d973c38c8897e7b4b9d8935843aafd4a44556d9779865ebf35a75822036d8fae20f3
SHA512 (version_2.4.2.tar.gz) = d480c608eadb58b53ee220317a749c0363db580759322ed7a9aebe2ea5c1acc30dbd3bdf9ed9849c23ba5c125ee6f923de6ac01987bf85abf7aeb3f91c2ae23f