Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2020-07-03 14:24:56 +0300
committersupermerill <merill@free.fr>2020-07-03 14:24:56 +0300
commit90ef7989e6d630e5b8d9d3946cac7f355026b2b4 (patch)
tree5df55a2336959218bbe1a573312c1be18a12486a
parenteaca18d628f17a53546cda332c2ea5910f60fba7 (diff)
#333 better python path completion for all os.
-rw-r--r--src/slic3r/GUI/FreeCADDialog.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp
index e993bc1f2..34f83af08 100644
--- a/src/slic3r/GUI/FreeCADDialog.cpp
+++ b/src/slic3r/GUI/FreeCADDialog.cpp
@@ -733,9 +733,22 @@ bool FreeCADDialog::init_start_python() {
// Get the freecad path (python path)
boost::filesystem::path pythonpath(gui_app->app_config->get("freecad_path"));
- pythonpath = pythonpath / "python.exe";
+ if (pythonpath.filename().string().find("python") == std::string::npos) {
+ if (pythonpath.filename().string() != "bin") {
+ pythonpath = pythonpath / "bin";
+ }
+#ifdef __WINDOWS__
+ pythonpath = pythonpath / "python.exe";
+#endif
+#ifdef __APPLE__
+ pythonpath = pythonpath / "python";
+#endif
+#ifdef __linux__
+ pythonpath = pythonpath / "python";
+#endif
+ }
if (!exists(pythonpath)) {
- m_errors->AppendText("Error, cannot find the freecad (version 0.19 or higher) python at '" + pythonpath.string() + "', please update your freecad bin directory in the preferences.");
+ m_errors->AppendText("Error, cannot find the freecad (version 0.19 or higher) python at '" + pythonpath.string() + "', please update your freecad python path in the preferences.");
return false;
}