mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
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.
This commit is contained in:
@@ -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<std::string> 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);
|
||||
|
||||
Reference in New Issue
Block a user