Detecting platform, namely reading /proc/version to detect Chromium OS.

Disabling Eject on Chromium, detecting removable media the Chromium way.
This commit is contained in:
Vojtech Bubnik 2021-03-11 13:25:13 +01:00
parent 2b19708720
commit ca8cf0a9f1
5 changed files with 40 additions and 25 deletions

View file

@ -9,6 +9,7 @@
#include "slic3r/GUI/format.hpp"
#include "slic3r/GUI/MainFrame.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/Utils/Platform.hpp"
// To show a message box if GUI initialization ends up with an exception thrown.
#include <wx/msgdlg.h>
@ -36,6 +37,8 @@ int GUI_Run(GUI_InitParams &params)
signal(SIGCHLD, SIG_DFL);
#endif // __APPLE__
detect_platform();
try {
GUI::GUI_App* gui = new GUI::GUI_App(params.start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor);
if (gui->get_app_mode() != GUI::GUI_App::EAppMode::GCodeViewer) {