mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
parent
7b5e11e9c9
commit
c2a5b08de5
@ -195,7 +195,11 @@ int
|
|||||||
main(int argc, char *argv[]) {
|
main(int argc, char *argv[]) {
|
||||||
// First, get the command line and append _bin, so we will actually run
|
// First, get the command line and append _bin, so we will actually run
|
||||||
// maya2egg_bin.exe, egg2maya_bin.exe, etc.
|
// maya2egg_bin.exe, egg2maya_bin.exe, etc.
|
||||||
Filename command = Filename::from_os_specific(argv[0]);
|
Filename command = ExecutionEnvironment::get_binary_name();
|
||||||
|
|
||||||
|
if (command.empty() || command == "unknown" || !command.exists()) {
|
||||||
|
command = Filename::from_os_specific(argv[0]);
|
||||||
|
|
||||||
if (!command.is_fully_qualified()) {
|
if (!command.is_fully_qualified()) {
|
||||||
DSearchPath path;
|
DSearchPath path;
|
||||||
path.append_path(ExecutionEnvironment::get_environment_variable("PATH"));
|
path.append_path(ExecutionEnvironment::get_environment_variable("PATH"));
|
||||||
@ -204,17 +208,9 @@ main(int argc, char *argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
command.resolve_filename(path);
|
command.resolve_filename(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (command.get_extension() == "exe") {
|
|
||||||
command.set_extension("");
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
command = command.get_fullpath() + string("_bin");
|
command.set_basename_wo_extension(command.get_basename_wo_extension() + "_bin");
|
||||||
#ifdef _WIN32
|
|
||||||
command.set_extension("exe");
|
|
||||||
#endif
|
|
||||||
string os_command = command.to_os_specific();
|
string os_command = command.to_os_specific();
|
||||||
|
|
||||||
// First start with $PANDA_MAYA_LOCATION. If it is set, it overrides
|
// First start with $PANDA_MAYA_LOCATION. If it is set, it overrides
|
||||||
|
Loading…
x
Reference in New Issue
Block a user