Unverified Commit 0a1cb264 authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

prusa-slicer,super-slicer: migrate to by-name (#485485)

parents 93ec038c 20ef1993
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
{
  stdenv,
  clangStdenv,
  lib,
  binutils,
  fetchFromGitHub,
@@ -36,7 +36,7 @@
  catch2_3,
  webkitgtk_4_1,
  ctestCheckHook,
  withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
  withSystemd ? lib.meta.availableOn clangStdenv.hostPlatform systemd,
  systemd,
  udevCheckHook,
  z3,
@@ -60,10 +60,12 @@ let
  opencascade-override' =
    if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override;
in
stdenv.mkDerivation (finalAttrs: {
clangStdenv.mkDerivation (finalAttrs: {
  pname = "prusa-slicer";
  version = "2.9.4";

  # Build with clang even on Linux, because GCC uses absolutely obscene amounts of memory
  # on this particular code base (OOM with 32GB memory and --cores 16 on GCC, succeeds
  # with --cores 32 on clang).
  src = fetchFromGitHub {
    owner = "prusa3d";
    repo = "PrusaSlicer";
@@ -81,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
  # (not applicable to super-slicer fork)
  postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") (
    # Patch required for GCC 14, but breaks on clang
    lib.optionalString stdenv.cc.isGNU ''
    lib.optionalString clangStdenv.cc.isGNU ''
      substituteInPlace src/slic3r-arrange/include/arrange/DataStoreTraits.hpp \
        --replace-fail \
        "WritableDataStoreTraits<ArrItem>::template set" \
@@ -250,7 +252,7 @@ stdenv.mkDerivation (finalAttrs: {
    ];
    platforms = lib.platforms.unix;
  }
  // lib.optionalAttrs (stdenv.hostPlatform.isDarwin) {
  // lib.optionalAttrs (clangStdenv.hostPlatform.isDarwin) {
    mainProgram = "PrusaSlicer";
  };
})
+43 −0
Original line number Diff line number Diff line
commit 56a60ee50122613d3a356ce74b4bd77b5e7be235
Author: Tim Kosse <tim.kosse@filezilla-project.org>
Date:   Sat Aug 26 15:37:30 2017 +0200

    If a wxTopLevelWindow has been instanced, but Create has not been called, calling Destroy on the window results in an assertion in Show(false), at least under wxGTK. Fix this by only hiding a top level window during destruction if it is actually shown.

diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp
index ef693690c5..8d07812031 100644
--- a/src/common/toplvcmn.cpp
+++ b/src/common/toplvcmn.cpp
@@ -122,19 +122,21 @@ bool wxTopLevelWindowBase::Destroy()
     // any more as no events will be sent to the hidden window and without idle
     // events we won't prune wxPendingDelete list and the application won't
     // terminate
-    for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(),
-                                     end = wxTopLevelWindows.end();
-          i != end;
-          ++i )
-    {
-        wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
-        if ( win != this && win->IsShown() )
+    if ( IsShown() ) {
+        for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(),
+                                         end = wxTopLevelWindows.end();
+              i != end;
+              ++i )
         {
-            // there remains at least one other visible TLW, we can hide this
-            // one
-            Hide();
+            wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
+            if ( win != this && win->IsShown() )
+            {
+                // there remains at least one other visible TLW, we can hide this
+                // one
+                Hide();
 
-            break;
+                break;
+            }
         }
     }
 
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ let
      fetchSubmodules = true;
    };
    patches = [
      ../../../by-name/wx/wxGTK31/0001-fix-assertion-using-hide-in-destroy.patch
      ./0001-fix-assertion-using-hide-in-destroy.patch
    ];
  });

Loading