mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Fix compile errors and warnings with mayapath.cxx
This commit is contained in:
parent
426fdf0842
commit
b7840fed06
@ -5973,19 +5973,19 @@ for VER in MAYAVERSIONS:
|
||||
TargetAdd('mayapath'+VNUM+'.obj', opts=OPTS, input='mayapath.cxx')
|
||||
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', input='mayapath'+VNUM+'.obj')
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', opts=['ADVAPI'])
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', input='libpandaexpress.dll')
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('maya2egg'+VNUM+'.exe', opts=['ADVAPI']+VER_OPTS)
|
||||
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', input='mayapath'+VNUM+'.obj')
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', opts=['ADVAPI'])
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', input='libpandaexpress.dll')
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('egg2maya'+VNUM+'.exe', opts=['ADVAPI']+VER_OPTS)
|
||||
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', input='mayapath'+VNUM+'.obj')
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', opts=['ADVAPI'])
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', input='libpandaexpress.dll')
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', input=COMMON_DTOOL_LIBS)
|
||||
TargetAdd('mayacopy'+VNUM+'.exe', opts=['ADVAPI']+VER_OPTS)
|
||||
|
||||
#
|
||||
# DIRECTORY: contrib/src/ai/
|
||||
|
@ -78,7 +78,11 @@ find_pyzip(const Filename &maya_location) {
|
||||
return Filename();
|
||||
}
|
||||
|
||||
struct { char *ver, *key; } maya_versions[] = {
|
||||
struct MayaVerInfo {
|
||||
const char *ver, *key;
|
||||
};
|
||||
|
||||
struct MayaVerInfo maya_versions[] = {
|
||||
{ "MAYA6", "6.0" },
|
||||
{ "MAYA65", "6.5" },
|
||||
{ "MAYA7", "7.0" },
|
||||
@ -96,10 +100,10 @@ struct { char *ver, *key; } maya_versions[] = {
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
get_version_number(const char *ver) {
|
||||
for (int i=0; maya_versions[i].ver != 0; i++) {
|
||||
if (strcmp(maya_versions[i].ver, ver)==0) {
|
||||
for (int i = 0; maya_versions[i].ver != 0; ++i) {
|
||||
if (strcmp(maya_versions[i].ver, ver) == 0) {
|
||||
return maya_versions[i].key;
|
||||
}
|
||||
}
|
||||
@ -376,7 +380,7 @@ main(int argc, char *argv[]) {
|
||||
// Also put the Maya bin directory on the PATH.
|
||||
Filename bin = Filename(maya_location, "bin");
|
||||
if (bin.is_directory()) {
|
||||
char *path = getenv("PATH");
|
||||
const char *path = getenv("PATH");
|
||||
if (path == NULL) {
|
||||
path = "";
|
||||
}
|
||||
@ -388,7 +392,7 @@ main(int argc, char *argv[]) {
|
||||
#ifdef IS_OSX
|
||||
// And on DYLD_LIBRARY_PATH.
|
||||
if (bin.is_directory()) {
|
||||
char *path = getenv("DYLD_LIBRARY_PATH");
|
||||
const char *path = getenv("DYLD_LIBRARY_PATH");
|
||||
if (path == NULL) {
|
||||
path = "";
|
||||
}
|
||||
@ -401,7 +405,7 @@ main(int argc, char *argv[]) {
|
||||
#elif !defined(_WIN32)
|
||||
// Linux (or other non-Windows OS) gets it added to LD_LIBRARY_PATH.
|
||||
if (bin.is_directory()) {
|
||||
char *path = getenv("LD_LIBRARY_PATH");
|
||||
const char *path = getenv("LD_LIBRARY_PATH");
|
||||
if (path == NULL) {
|
||||
path = "";
|
||||
}
|
||||
@ -416,7 +420,7 @@ main(int argc, char *argv[]) {
|
||||
// When this is set, Panda3D will try not to use any functions from the
|
||||
// CPython API. This is necessary because Maya links with its own copy
|
||||
// of Python, which may be incompatible with ours.
|
||||
putenv("PANDA_INCOMPATIBLE_PYTHON=1");
|
||||
putenv((char *)"PANDA_INCOMPATIBLE_PYTHON=1");
|
||||
|
||||
// Now that we have set up the environment variables properly, chain
|
||||
// to the actual maya2egg_bin (or whichever) executable.
|
||||
|
Loading…
x
Reference in New Issue
Block a user