Skip to content

Commit

Permalink
Trying to fix #99 and #114, in that the Mac DMG did not provide the c…
Browse files Browse the repository at this point in the history
…orrect path for the sequential custom Python module.
  • Loading branch information
christofmuc committed Oct 10, 2021
1 parent 107ec57 commit fecc5f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adaptions/GenericAdaptation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ namespace knobkraft {
sGenericAdaptationPyOutputRedirect = std::make_unique<PyStdErrOutStreamRedirect>();
File pathToTheOrm = File::getSpecialLocation (File::SpecialLocationType::currentExecutableFile).getParentDirectory();
std::cout << pathToTheOrm.getFullPathName().toStdString() << std::endl;
std::string command = "import sys\nsys.path.append(R\"" + getAdaptationDirectory().getFullPathName().toStdString()
+ "\")\nsys.path.append(R\"" + pathToTheOrm.getFullPathName().toStdString() + "\")\n";
std::string command = "import sys\nsys.path.append(R\"" + getAdaptationDirectory().getFullPathName().toStdString() + "\")\n"
+ "sys.path.append(R\"" + pathToTheOrm.getFullPathName().toStdString() + "\")\n" // This is where Linux searches
+ "sys.path.append(R\"" + pathToTheOrm.getChildFile("python").getFullPathName().toStdString() + "\")\n"; // This is the path in the Mac DMG
py::exec(command);
#ifdef __APPLE__
// For Apple (probably for Linux as well?) we need to append the path "python" to the python sys path, so it will find
Expand Down

0 comments on commit fecc5f0

Please sign in to comment.