diff --git a/doc/makepanda/makepanda.py b/doc/makepanda/makepanda.py index 3bb56f6477..43e623c7b2 100755 --- a/doc/makepanda/makepanda.py +++ b/doc/makepanda/makepanda.py @@ -3165,7 +3165,8 @@ for VER in MAYAVERSIONS: TargetAdd('mayaeggimport'+VNUM+'.mll', input='mayaeggimport'+VNUM+'_mayaeggimport.obj') TargetAdd('mayaeggimport'+VNUM+'.mll', input='libpandaegg.dll') TargetAdd('mayaeggimport'+VNUM+'.mll', input=COMMON_PANDA_LIBS) - TargetAdd('mayaeggimport'+VNUM+'.mll', input='libp3pystub.dll') + if sys.platform == "win32": + TargetAdd('mayaeggimport'+VNUM+'.mll', input='libp3pystub.dll') TargetAdd('mayaeggimport'+VNUM+'.mll', opts=['ADVAPI', VER]) TargetAdd('mayaloader'+VNUM+'_config_mayaloader.obj', opts=OPTS, input='config_mayaloader.cxx') @@ -3196,21 +3197,30 @@ for VER in MAYAVERSIONS: TargetAdd('libmayapview'+VNUM+'.mll', input='libmayaegg'+VNUM+'.lib') TargetAdd('libmayapview'+VNUM+'.mll', input='libmaya'+VNUM+'.lib') TargetAdd('libmayapview'+VNUM+'.mll', input='libp3framework.dll') - TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS_PYSTUB) + if sys.platform == "win32": + TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS_PYSTUB) + else: + TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS) TargetAdd('libmayapview'+VNUM+'.mll', opts=['ADVAPI', VER]) TargetAdd('maya2egg'+VNUM+'_mayaToEgg.obj', opts=OPTS, input='mayaToEgg.cxx') TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='maya2egg'+VNUM+'_mayaToEgg.obj') TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmayaegg'+VNUM+'.lib') TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib') - TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) + if sys.platform == "win32": + TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) + else: + TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS) TargetAdd('maya2egg'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER]) TargetAdd('mayacopy'+VNUM+'_mayaCopy.obj', opts=OPTS, input='mayaCopy.cxx') TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='mayacopy'+VNUM+'_mayaCopy.obj') TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libcvscopy.lib') TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib') - TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) + if sys.platform == "win32": + TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) + else: + TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS) TargetAdd('mayacopy'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER]) TargetAdd('mayasavepview'+VNUM+'_mayaSavePview.obj', opts=OPTS, input='mayaSavePview.cxx') diff --git a/pandatool/src/mayaprogs/eggToMaya.cxx b/pandatool/src/mayaprogs/eggToMaya.cxx index 6484be431f..393129f831 100755 --- a/pandatool/src/mayaprogs/eggToMaya.cxx +++ b/pandatool/src/mayaprogs/eggToMaya.cxx @@ -15,7 +15,9 @@ #include "eggToMaya.h" #include "mayaEggLoader.h" #include "mayaApi.h" -#include "pystub.h" +#ifdef _WIN32 + #include "pystub.h" +#endif // We must define this to prevent Maya from doubly-declaring its // MApiVersion string in this file as well as in libmayaegg. @@ -120,11 +122,15 @@ run() { } int main(int argc, char *argv[]) { + // We don't want pystub on linux, since it gives problems with Maya's python. +#ifdef _WIN32 // A call to pystub() to force libpystub.so to be linked in. pystub(); +#endif EggToMaya prog; prog.parse_command_line(argc, argv); prog.run(); return 0; } + diff --git a/pandatool/src/mayaprogs/mayaCopy.cxx b/pandatool/src/mayaprogs/mayaCopy.cxx index 48816e219a..d801bea243 100644 --- a/pandatool/src/mayaprogs/mayaCopy.cxx +++ b/pandatool/src/mayaprogs/mayaCopy.cxx @@ -17,7 +17,9 @@ #include "cvsSourceDirectory.h" #include "mayaShader.h" #include "dcast.h" -#include "pystub.h" +#ifdef _WIN32 + #include "pystub.h" +#endif #include "pre_maya_include.h" #include @@ -463,11 +465,15 @@ collect_shader_for_node(const MDagPath &dag_path) { int main(int argc, char *argv[]) { + // We don't want pystub on linux, since it gives problems with Maya's python. +#ifdef _WIN32 // A call to pystub() to force libpystub.so to be linked in. pystub(); +#endif MayaCopy prog; prog.parse_command_line(argc, argv); prog.run(); return 0; } +