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:
parent
e8325a8e2d
commit
b71e5c2763
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue