mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 07:06:03 +08:00
Fix for OSX
This commit is contained in:
parent
9473ae8fe2
commit
1221c67d7f
@ -42,12 +42,12 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance
|
|||||||
wxExecute(const_cast<wchar_t**>(args.data()), wxEXEC_ASYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_MAKE_GROUP_LEADER);
|
wxExecute(const_cast<wchar_t**>(args.data()), wxEXEC_ASYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_MAKE_GROUP_LEADER);
|
||||||
#else
|
#else
|
||||||
// Own executable path.
|
// Own executable path.
|
||||||
boost::filesystem::path own_path = into_path(wxStandardPaths::Get().GetExecutablePath());
|
boost::filesystem::path bin_path = into_path(wxStandardPaths::Get().GetExecutablePath());
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
{
|
{
|
||||||
own_path /= (instance_type == NewSlicerInstanceType::Slicer) ? "PrusaSlicer" : "PrusaGCodeViewer";
|
bin_path /= (instance_type == NewSlicerInstanceType::Slicer) ? "PrusaSlicer" : "PrusaGCodeViewer";
|
||||||
// On Apple the wxExecute fails, thus we use boost::process instead.
|
// On Apple the wxExecute fails, thus we use boost::process instead.
|
||||||
path_to_open ? boost::process::spawn(path.string(), into_u8(*path_to_open)) : boost::process::spawn(path.string());
|
path_to_open ? boost::process::spawn(bin_path.string(), into_u8(*path_to_open)) : boost::process::spawn(bin_path.string());
|
||||||
}
|
}
|
||||||
#else // Linux or Unix
|
#else // Linux or Unix
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user