mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-20 05:54:54 -04:00
Fix issues on Linux and OSX with libraries being located incorrectly
This commit is contained in:
parent
61cc68225f
commit
160f208469
@ -486,7 +486,9 @@ read_args() {
|
|||||||
maps.getline(buffer, PATH_MAX);
|
maps.getline(buffer, PATH_MAX);
|
||||||
char *tail = strrchr(buffer,'/');
|
char *tail = strrchr(buffer,'/');
|
||||||
char *head = strchr(buffer,'/');
|
char *head = strchr(buffer,'/');
|
||||||
if (tail && head && (strcmp(tail,"/libp3dtool.so")==0)) {
|
if (tail && head && (strcmp(tail,"/libp3dtool.so." PANDA_VERSION_STR)==0)) {
|
||||||
|
_dtool_name = head;
|
||||||
|
} else if (tail && head && (strcmp(tail,"/libp3dtool.so")==0)) {
|
||||||
_dtool_name = head;
|
_dtool_name = head;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -500,7 +502,9 @@ read_args() {
|
|||||||
for (uint32_t i = 0; i < ic; ++i) {
|
for (uint32_t i = 0; i < ic; ++i) {
|
||||||
const char *buffer = _dyld_get_image_name(i);
|
const char *buffer = _dyld_get_image_name(i);
|
||||||
const char *tail = strrchr(buffer, '/');
|
const char *tail = strrchr(buffer, '/');
|
||||||
if (tail && (strcmp(tail,"/libp3dtool.dylib")==0)) {
|
if (tail && (strcmp(tail,"/libp3dtool." PANDA_VERSION_STR ".dylib")==0)) {
|
||||||
|
_dtool_name = buffer;
|
||||||
|
} else if (tail && (strcmp(tail,"/libp3dtool.dylib")==0)) {
|
||||||
_dtool_name = buffer;
|
_dtool_name = buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user