From 79d9fd154eb051641e21a5cc4e8087b1137dbbe1 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 25 Oct 2021 17:40:18 +0200 Subject: [PATCH] Wrong build on windows system (32 vs 64bit) dialog --- src/slic3r/GUI/GUI_App.cpp | 23 +++++++++++++++++++++++ src/slic3r/GUI/NotificationManager.hpp | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 49fbb8a313..0b7bf45bca 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -812,6 +812,29 @@ bool GUI_App::OnInit() bool GUI_App::on_init_inner() { +// win32 build on win64 and viceversa +#ifdef _WIN64 + if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "") { + wxRichMessageDialog dlg(nullptr, + _L("You have started PrusaSlicer for 64-bit architecture on 32-bit system." + "\nPlease download and install correct version at https://www.prusa3d.cz/prusaslicer/." + "\nDo you wish to continue?"), + "PrusaSlicer", wxICON_QUESTION | wxYES_NO); + if (dlg.ShowModal() != wxID_YES) + return false; + } +#elif _WIN32 + if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") { + wxRichMessageDialog dlg(nullptr, + _L("You have started PrusaSlicer for 32-bit architecture on 64-bit system." + "\nPlease download and install correct version at https://www.prusa3d.cz/prusaslicer/." + "\nDo you wish to continue?"), + "PrusaSlicer", wxICON_QUESTION | wxYES_NO); + if (dlg.ShowModal() != wxID_YES) + return false; + } +#endif // _WIN64 + // Forcing back menu icons under gtk2 and gtk3. Solution is based on: // https://docs.gtk.org/gtk3/class.Settings.html // see also https://docs.wxwidgets.org/3.0/classwx_menu_item.html#a2b5d6bcb820b992b1e4709facbf6d4fb diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp index 9adcc240d0..655b17e634 100644 --- a/src/slic3r/GUI/NotificationManager.hpp +++ b/src/slic3r/GUI/NotificationManager.hpp @@ -112,7 +112,7 @@ enum class NotificationType // information about netfabb is finished repairing model (blocking proccess) NetfabbFinished, // Short meesage to fill space between start and finish of export - ExportOngoing + ExportOngoing, }; class NotificationManager