MinGW: if PYTHONHOME is not set then automatically do it at program start
This commit is contained in:
@@ -72,6 +72,13 @@ int main( int argc, char ** argv )
|
||||
setlocale(LC_ALL, "");
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
const char* mingw_prefix = getenv("MINGW_PREFIX");
|
||||
const char* py_home = getenv("PYTHONHOME");
|
||||
if (!py_home && mingw_prefix)
|
||||
_putenv_s("PYTHONHOME", mingw_prefix);
|
||||
#endif
|
||||
|
||||
// Name and Version of the Application
|
||||
App::Application::Config()["ExeName"] = "FreeCAD";
|
||||
App::Application::Config()["ExeVendor"] = "FreeCAD";
|
||||
|
||||
Reference in New Issue
Block a user