mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
further sanitize MAYA_LOCATION
This commit is contained in:
parent
5cfd0320d9
commit
53aa703996
@ -59,6 +59,11 @@ main(int argc, char *argv[]) {
|
||||
cerr << "The directory referred to by $MAYA_LOCATION does not exist!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Reset maya_location to its full long name, since Maya seems to
|
||||
// require that.
|
||||
maya_location.make_canonical();
|
||||
maya_location = Filename::from_os_specific(maya_location.to_os_long_name());
|
||||
|
||||
// Look for OpenMaya.dll as a sanity check.
|
||||
Filename openMaya = Filename::dso_filename(Filename(maya_location, "bin/OpenMaya.so"));
|
||||
@ -67,6 +72,13 @@ main(int argc, char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Re-set MAYA_LOCATION to its properly sanitized form.
|
||||
{
|
||||
string putenv_str = "MAYA_LOCATION=" + maya_location.to_os_specific();
|
||||
char *putenv_cstr = strdup(putenv_str.c_str());
|
||||
putenv(putenv_cstr);
|
||||
}
|
||||
|
||||
// Now set PYTHONHOME & PYTHONPATH. Maya2008 requires this to be
|
||||
// set and pointing within $MAYA_LOCATION, or it might get itself
|
||||
// confused with another Python installation (e.g. Panda's).
|
||||
|
Loading…
x
Reference in New Issue
Block a user