From b71e5c2763e80e652a6f3bb410ed9325b91479b2 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 1 Oct 2020 15:11:56 +0200 Subject: [PATCH] Maybe one day we will be able to run PrusaGCodeViewer, but for now the Apple notarization process refuses Apps with multiple binaries and Vojtech does not know any workaround. Just run PrusaSlicer and give it a --gcodeviewer parameter. --- src/slic3r/Utils/Process.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/Utils/Process.cpp b/src/slic3r/Utils/Process.cpp index 375c10a6a5..d2a326221a 100644 --- a/src/slic3r/Utils/Process.cpp +++ b/src/slic3r/Utils/Process.cpp @@ -56,11 +56,17 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance boost::filesystem::path bin_path = into_path(wxStandardPaths::Get().GetExecutablePath()); #if defined(__APPLE__) { - bin_path = bin_path.parent_path() / ((instance_type == NewSlicerInstanceType::Slicer) ? "PrusaSlicer" : "PrusaGCodeViewer"); + // Maybe one day we will be able to run PrusaGCodeViewer, but for now the Apple notarization + // process refuses Apps with multiple binaries and Vojtech does not know any workaround. + // ((instance_type == NewSlicerInstanceType::Slicer) ? "PrusaSlicer" : "PrusaGCodeViewer"); + // Just run PrusaSlicer and give it a --gcodeviewer parameter. + bin_path = bin_path.parent_path() / "PrusaSlicer"; // On Apple the wxExecute fails, thus we use boost::process instead. BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << bin_path.string() << "\""; try { std::vector args; + if (instance_type == NewSlicerInstanceType::GCodeViewer) + args.emplace_back("--gcodeviewer"); if (path_to_open) args.emplace_back(into_u8(*path_to_open)); boost::process::spawn(bin_path, args);