Makepanda and OSX

Im starting a new thread on this topic, because the “normal” osx thread is already over-loaded…

The modified makepanda scripts:
public.nouser.org/~rspoerri/Deve … a-v001.zip

Problem:

Most of the includes which are normally under parser-inc cant be found. I have started to add lines to CompileCxx, is this the right way?

For example: malloc.h is missing (which is under /Developer/SDKs/MacOSX10.4u.sdk/usr/include/malloc/)

edit:

Later on i found out that something deeper seems to be missing:

#elif defined(IS_LINUX) || defined(IS_OSX) || defined(FreeBSD)

appears not to be executed. (IS_OSX not defined?), how would i define that?

Problem:

Traceback (most recent call last):
File “makepanda/makepanda.py”, line 3468, in ?
RunDependencyQueue(DEPENDENCYQUEUE)
File “makepanda/makepanda.py”, line 3466, in RunDependencyQueue
SequentialMake(tasklist)
File “makepanda/makepanda.py”, line 3459, in SequentialMake
apply(task[0], task[1])
File “makepanda/makepanda.py”, line 663, in CompileAnything
return CompileImod(target, inputs, opts)
File “makepanda/makepanda.py”, line 435, in CompileImod
WriteFile(woutc,"")
UnboundLocalError: local variable ‘woutc’ referenced before assignment

This does look like a bug in the script (i have tried with --nothing, now switching to --use-python), this seems to work a bit better…

Warning:

Cannot read /proc/self/environ; environment variables unavailable.
Cannot read /proc/self/cmdline; command-line arguments unavailable to config.
Warning: unable to auto-locate config files in directory named by “etc”.

Dont know what this is for, currently works fine, but might cause a problem later on.

Seems like your compiler command line is not quite right. Suggestion: look at the compile command lines generated by ppremake. Emulate this in makepanda.

Also ensure that you generate dtool_config.h properly. Normally, ppremake generates this, and puts #define IS_OSX in there, among other important things.

David

The problem there is that makepanda sets

DEFAULT_PRC_DIR=etc

And doesn’t seem to be implemented under OSX.

have you got any hints for me what should do? (where should this point to)

Let me explain. Panda3D needs to find its config file. The path can be hardwired into the binary, but that’s not such a good idea under windows, because under windows, people are allowed to install Panda3D wherever they want.

So instead, the idea behind “/etc” is that it should automatically find the root of the panda install tree, and then append “/etc” to that, and that’s the directory where it should look for config files.

How does it find the root of the panda install tree? It starts in the directory containing “libdtool.dll” (or “libdtool.so” under unix) and then walks up the directory hierarchy from there.

In OSX-land, it’s probably reasonable to hardwire a path into the binary. You could just replace the /etc with a specific path.

On Mac OS X malloc.h isn’t its own file. The declarations are in stdlib.h.

I added the following preprocessor conditional to dtool/src/dtoolbase/dtoolbase.h

#ifndef APPLE
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#endif

Of course even after that change the build didn’t get very far for me. I’m willing to put some effort into making Panda3D a first class Mac citizen though.

Or, you could just make sure that your generated dtool_config.h doesn’t define HAVE_MALLOC_H; this is precisely why we have that macro. Ppremake is already configured to generate a dtool_config.h on OSX that doesn’t define it.

David

My current diff, it already compiles quite a lot, however i currently have problems with compiling genpycode (_main entry point is missing):

What i dont really understand is, why is there a compileC in othermakepanda, while compileCxx (in makepanda) also handles c extensions?

[code]Only in panda3d-makepanda/: .DS_Store
diff -u -r panda3d-1.5.0/makepanda/makepanda.py panda3d-makepanda/makepanda/makepanda.py
— panda3d-1.5.0/makepanda/makepanda.py 2007-12-13 20:56:29.000000000 +0100
+++ panda3d-makepanda/makepanda/makepanda.py 2008-03-22 12:45:38.000000000 +0100
@@ -272,13 +272,18 @@
if (COMPILER==“LINUX”):
if (src.endswith(".c")): cmd = 'gcc -fPIC -c -o ’ + obj
else: cmd = 'g++ -ftemplate-depth-30 -fPIC -c -o ’ + obj

  •    if (sys.platform == 'darwin'):
    
  •        cmd = cmd + ' -shared -undefined dynamic_lookup -dynamic -dynamiclib'
       if (PkgSkip("PYTHON")==0): cmd = cmd + ' -I"' + SDK["PYTHON"] + '"'
       if (PkgSelected(opts,"VRPN")):     cmd = cmd + ' -I' + THIRDPARTYLIBS + 'vrpn/include'
       if (PkgSelected(opts,"FFTW")):     cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fftw/include'
       if (PkgSelected(opts,"FMOD")):     cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmod/include'
       if (PkgSelected(opts,"FMODEX")):   cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmodex/include'
       if (PkgSelected(opts,"OPENAL")):   cmd = cmd + ' -I' + THIRDPARTYLIBS + 'openal/include'
    
  •    if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'nvidiacg/include'
    
  •    if (sys.platform == 'darwin'):
    
  •        if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers'
    
  •    else:
    
  •        if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'nvidiacg/include'
       if (PkgSelected(opts,"FFMPEG")):    cmd = cmd + ' -I' + THIRDPARTYLIBS + 'ffmpeg/include'
       if (PkgSelected(opts,"ARTOOLKIT")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'artoolkit/include'
       if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
    

@@ -292,6 +297,15 @@
if (optlevel==4): cmd = cmd + " -O2 -DNDEBUG"
building = GetValueOption(opts, “BUILDING:”)
if (building): cmd = cmd + " -DBUILDING_" + building

  •    if sys.platform == 'darwin':
    
  •        cmd = cmd + " -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/"
    
  •        #cmd = cmd + " -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/"
    
  •        #cmd = cmd + " -Ibuilt/include/parser-inc/"
    
  •        #cmd = cmd + " -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/"
    
  •        cmd = cmd + " -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/malloc/"
    
  •        cmd = cmd + " -I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/"
    
  •        # even with --nothing it asks for Python.h
    
  •        #cmd = cmd + " -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/"
       cmd = cmd + ' ' + src
       oscmd(cmd)
    

@@ -402,7 +416,11 @@
for pkg in PkgListGet():
if (PkgSelected(opts,pkg)):
cmd = cmd + " -S" + THIRDPARTYLIBS + pkg.lower() + “/include”

  •    cmd = cmd + ' -S/usr/include'
    
  •    if sys.platform == 'darwin':
    
  •        #cmd = cmd + ' -S/Developer/SDKs/MacOSX10.4u.sdk/usr/include'
    
  •        pass
    
  •    else:
    
  •        cmd = cmd + ' -S/usr/include'
       building = GetValueOption(opts, "BUILDING:")
       if (building): cmd = cmd + " -DBUILDING_"+building
       if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
    

@@ -574,10 +592,21 @@
else: mtcmd = mtcmd + ‘;1’
oscmd(mtcmd)
if (COMPILER==“LINUX”):

  •    if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib'
    
  •    else:                         cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib'
    
  •    if (sys.platform == 'darwin'):
    
  •        if (GetOrigExt(dll)==".exe"):
    
  •            cmd = 'g++ -o ' + dll + ' -Lbuilt/lib'
    
  •        else:
    
  •            cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib'
    
  •            cmd = cmd + " -undefined dynamic_lookup -dynamic -dynamiclib"
    
  •        # g++  -undefined dynamic_lookup -dynamic -dynamiclib -o Opt3-OSX/libdtool.dylib -install_name libdtool.dylib Opt3-OSX/dtool_dtool.o  -L../../src/dtoolbase/Opt3-OSX -L../../src/dtoolutil/Opt3-OSX -L/usr/local/panda/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -ldtoolutil -ldtoolbase -lpthread 
    
  •        # g++  -undefined dynamic_lookup -bundle -o Opt3-OSX/libdtool.so  Opt3-OSX/libdtool.dylib -L../../src/dtoolbase/Opt3-OSX -L../../src/dtoolutil/Opt3-OSX -L/usr/local/panda/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -ldtoolutil -ldtoolbase -lpthread 
    
  •        cmd = cmd + " -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/"
    
  •    else:
    
  •        if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -Lbuilt/lib'
    
  •        else:                         cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib'
    
  •        cmd = cmd + ' -L/usr/X11R6/lib'
       for x in obj:
    
  •   if (GetOrigExt(x) != ".dat"):
    
  •        if (GetOrigExt(x) != ".dat"):
               base = os.path.basename(x)
               if (base[-3:]==".so") and (base[:3]=="lib"):
                   cmd = cmd + ' -l' + base[3:-3]
    

@@ -586,10 +615,14 @@
#if (PkgSelected(opts,“FMOD”)): cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘fmod/lib -lfmod’
if (PkgSelected(opts,“FMODEX”)): cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘fmodex/lib -lfmodex’
#if (PkgSelected(opts,“OPENAL”)): cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘openal/lib -lopenal’

  •    if (PkgSelected(opts,"NVIDIACG")):
    
  •        cmd = cmd + ' -Lthirdparty/nvidiacg/lib '
    
  •        if (opts.count("CGGL")):  cmd = cmd + " -lCgGL"
    
  •        cmd = cmd + " -lCg "
    
  •    if (sys.platform == 'darwin'):
    
  •        if (PkgSelected(opts,"NVIDIACG")):
    
  •            cmd = cmd + " -framework Cg"
    
  •            #if (opts.count("CGGL")):  cmd = cmd + " -lCgGL" # is included in framework
    
  •        if (PkgSelected(opts,"NVIDIACG")):
    
  •            cmd = cmd + ' -Lthirdparty/nvidiacg/lib '
    
  •            if (opts.count("CGGL")):  cmd = cmd + " -lCgGL"
    
  •            cmd = cmd + " -lCg "
       if (PkgSelected(opts,"FFMPEG")):   cmd = cmd + ' -L' + THIRDPARTYLIBS + 'ffmpeg/lib -lavformat -lavcodec -lavformat -lavutil'
       if (PkgSelected(opts,"OPENAL")):   cmd = cmd + ' -L' + THIRDPARTYLIBS + 'openal/lib -lpandaopenal'
       if (PkgSelected(opts,"ZLIB")):     cmd = cmd + " -lz"
    

@@ -601,8 +634,11 @@
if (opts.count(“GTK2”)): cmd = cmd + ’ -lgtk-x11-2.0’
if (PkgSelected(opts,“VRPN”)): cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘vrpn/lib -lvrpn -lquat’
if (PkgSelected(opts,“FFTW”)): cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘fftw/lib -lrfftw -lfftw’

  • if (PkgSelected(opts,“ARTOOLKIT”)):cmd = cmd + ’ -L’ + THIRDPARTYLIBS + ‘artoolkit/lib -lAR’
  •    if (opts.count("GLUT")):           cmd = cmd + " -lGL -lGLU"
    
  •    if (PkgSelected(opts,"ARTOOLKIT")):cmd = cmd + ' -L' + THIRDPARTYLIBS + 'artoolkit/lib -lAR'
    
  •    if (sys.platform == 'darwin'):
    
  •        if (opts.count("GLUT")):           cmd = cmd + " -framework OpenGL -framework GLUT"
    
  •    else:
    
  •        if (opts.count("GLUT")):           cmd = cmd + " -lGL -lGLU"
       cmd = cmd + " -lpthread -ldl"
       oscmd(cmd)
    

@@ -733,124 +769,125 @@

##########################################################################################

  • #_Variable_________________________Windows_____Unix________OSX
    DTOOL_CONFIG=[
  • #Variable_________________________Windows___________________Unix_________
  • (“HAVE_PYTHON”, ‘1’, ‘1’),
  • (“PYTHON_FRAMEWORK”, ‘UNDEF’, ‘UNDEF’),
  • (“COMPILE_IN_DEFAULT_FONT”, ‘1’, ‘1’),
  • (“HAVE_MAYA”, ‘1’, ‘1’),
  • (“MAYA_PRE_5_0”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_SOFTIMAGE”, ‘UNDEF’, ‘UNDEF’),
  • (“SSL_097”, ‘UNDEF’, ‘UNDEF’),
  • (“REPORT_OPENSSL_ERRORS”, ‘1’, ‘1’),
  • (“HAVE_GL”, ‘1’, ‘1’),
  • (“HAVE_MESA”, ‘UNDEF’, ‘UNDEF’),
  • (“MESA_MGL”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_SGIGL”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GLX”, ‘UNDEF’, ‘1’),
  • (“HAVE_WGL”, ‘1’, ‘UNDEF’),
  • (“HAVE_DX8”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DX9”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CHROMIUM”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_THREADS”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_AUDIO”, ‘1’, ‘1’),
  • (“NOTIFY_DEBUG”, ‘UNDEF’, ‘UNDEF’),
  • (“DO_PSTATS”, ‘UNDEF’, ‘UNDEF’),
  • (“DO_COLLISION_RECORDING”, ‘UNDEF’, ‘UNDEF’),
  • (“SUPPORT_IMMEDIATE_MODE”, ‘1’, ‘1’),
  • (“TRACK_IN_INTERPRETER”, ‘UNDEF’, ‘UNDEF’),
  • (“DO_MEMORY_USAGE”, ‘UNDEF’, ‘UNDEF’),
  • (“DO_PIPELINING”, ‘UNDEF’, ‘UNDEF’),
  • (“EXPORT_TEMPLATES”, ‘yes’, ‘yes’),
  • (“LINK_IN_GL”, ‘UNDEF’, ‘UNDEF’),
  • (“LINK_IN_PHYSICS”, ‘UNDEF’, ‘UNDEF’),
  • (“DEFAULT_PATHSEP”, ‘";"’, ‘":"’),
  • (“WORDS_BIGENDIAN”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NAMESPACE”, ‘1’, ‘1’),
  • (“HAVE_OPEN_MASK”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_WCHAR_T”, ‘1’, ‘1’),
  • (“HAVE_WSTRING”, ‘1’, ‘1’),
  • (“HAVE_TYPENAME”, ‘1’, ‘1’),
  • (“SIMPLE_STRUCT_POINTERS”, ‘1’, ‘UNDEF’),
  • (“HAVE_DINKUM”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_STL_HASH”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GETTIMEOFDAY”, ‘UNDEF’, ‘1’),
  • (“GETTIMEOFDAY_ONE_PARAM”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GETOPT”, ‘UNDEF’, ‘1’),
  • (“HAVE_GETOPT_LONG_ONLY”, ‘UNDEF’, ‘1’),
  • (“HAVE_GETOPT_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_LINUX_INPUT_H”, ‘UNDEF’, ‘1’),
  • (“IOCTL_TERMINAL_WIDTH”, ‘UNDEF’, ‘1’),
  • (“HAVE_STREAMSIZE”, ‘1’, ‘1’),
  • (“HAVE_IOS_TYPEDEFS”, ‘1’, ‘1’),
  • (“HAVE_IOS_BINARY”, ‘1’, ‘1’),
  • (“STATIC_INIT_GETENV”, ‘1’, ‘UNDEF’),
  • (“HAVE_PROC_SELF_EXE”, ‘UNDEF’, ‘1’),
  • (“HAVE_PROC_SELF_MAPS”, ‘UNDEF’, ‘1’),
  • (“HAVE_PROC_SELF_ENVIRON”, ‘UNDEF’, ‘1’),
  • (“HAVE_PROC_SELF_CMDLINE”, ‘UNDEF’, ‘1’),
  • (“HAVE_GLOBAL_ARGV”, ‘1’, ‘UNDEF’),
  • (“PROTOTYPE_GLOBAL_ARGV”, ‘UNDEF’, ‘UNDEF’),
  • (“GLOBAL_ARGV”, ‘__argv’, ‘UNDEF’),
  • (“GLOBAL_ARGC”, ‘__argc’, ‘UNDEF’),
  • (“HAVE_IO_H”, ‘1’, ‘UNDEF’),
  • (“HAVE_IOSTREAM”, ‘1’, ‘1’),
  • (“HAVE_MALLOC_H”, ‘1’, ‘1’),
  • (“HAVE_SYS_MALLOC_H”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_ALLOCA_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_LOCALE_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_MINMAX_H”, ‘1’, ‘UNDEF’),
  • (“HAVE_SSTREAM”, ‘1’, ‘1’),
  • (“HAVE_NEW”, ‘1’, ‘1’),
  • (“HAVE_SYS_TYPES_H”, ‘1’, ‘1’),
  • (“HAVE_SYS_TIME_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_UNISTD_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_UTIME_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_GLOB_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_DIRENT_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_SYS_SOUNDCARD_H”, ‘UNDEF’, ‘1’),
  • (“HAVE_RTTI”, ‘1’, ‘1’),
  • (“IS_LINUX”, ‘UNDEF’, ‘1’),
  • (“GLOBAL_OPERATOR_NEW_EXCEPTIONS”, ‘UNDEF’, ‘1’),
  • (“USE_STL_ALLOCATOR”, ‘1’, ‘1’),
  • (“USE_MEMORY_DLMALLOC”, ‘1’, ‘UNDEF’),
  • (“USE_MEMORY_PTMALLOC”, ‘UNDEF’, ‘UNDEF’),
  • (“USE_MEMORY_MALLOC”, ‘UNDEF’, ‘1’),
  • (“HAVE_ZLIB”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_PNG”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_JPEG”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_TIFF”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_VRPN”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FMOD”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FMODEX”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_OPENAL”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NVIDIACG”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FREETYPE”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FFTW”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_OPENSSL”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NET”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CG”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CGGL”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CGDX9”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FFMPEG”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_ARTOOLKIT”, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DIRECTCAM”, ‘UNDEF’, ‘UNDEF’),
  • (“PRC_SAVE_DESCRIPTIONS”, ‘1’, ‘1’),
  • (“HAVE_PYTHON”, ‘1’, ‘1’, ‘1’),
  • (“PYTHON_FRAMEWORK”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“COMPILE_IN_DEFAULT_FONT”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_MAYA”, ‘1’, ‘1’, ‘1’),
  • (“MAYA_PRE_5_0”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_SOFTIMAGE”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“SSL_097”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“REPORT_OPENSSL_ERRORS”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_GL”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_MESA”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“MESA_MGL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_SGIGL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GLX”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_WGL”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DX8”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DX9”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CHROMIUM”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_THREADS”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_AUDIO”, ‘1’, ‘1’, ‘1’),
  • (“NOTIFY_DEBUG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“DO_PSTATS”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“DO_COLLISION_RECORDING”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“SUPPORT_IMMEDIATE_MODE”, ‘1’, ‘1’, ‘1’),
  • (“TRACK_IN_INTERPRETER”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“DO_MEMORY_USAGE”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“DO_PIPELINING”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“EXPORT_TEMPLATES”, ‘yes’, ‘yes’, ‘yes’),
  • (“LINK_IN_GL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“LINK_IN_PHYSICS”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“DEFAULT_PATHSEP”, ‘";"’, ‘":"’, ‘":"’),
  • (“WORDS_BIGENDIAN”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NAMESPACE”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_OPEN_MASK”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_WCHAR_T”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_WSTRING”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_TYPENAME”, ‘1’, ‘1’, ‘1’),
  • (“SIMPLE_STRUCT_POINTERS”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DINKUM”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_STL_HASH”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GETTIMEOFDAY”, ‘UNDEF’, ‘1’, ‘1’),
  • (“GETTIMEOFDAY_ONE_PARAM”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_GETOPT”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_GETOPT_LONG_ONLY”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_GETOPT_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_LINUX_INPUT_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“IOCTL_TERMINAL_WIDTH”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_STREAMSIZE”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_IOS_TYPEDEFS”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_IOS_BINARY”, ‘1’, ‘1’, ‘1’),
  • (“STATIC_INIT_GETENV”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_PROC_SELF_EXE”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_PROC_SELF_MAPS”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_PROC_SELF_ENVIRON”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_PROC_SELF_CMDLINE”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_GLOBAL_ARGV”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“PROTOTYPE_GLOBAL_ARGV”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“GLOBAL_ARGV”, ‘__argv’, ‘UNDEF’, ‘UNDEF’),
  • (“GLOBAL_ARGC”, ‘__argc’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_IO_H”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_IOSTREAM”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_MALLOC_H”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_SYS_MALLOC_H”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_ALLOCA_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_LOCALE_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_MINMAX_H”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_SSTREAM”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_NEW”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_SYS_TYPES_H”, ‘1’, ‘1’, ‘1’),
  • (“HAVE_SYS_TIME_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_UNISTD_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_UTIME_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_GLOB_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_DIRENT_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_SYS_SOUNDCARD_H”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_RTTI”, ‘1’, ‘1’, ‘1’),
  • (“IS_LINUX”, ‘UNDEF’, ‘1’, ‘UNDEF’),
  • (“IS_OSX”, ‘UNDEF’, ‘UNDEF’, ‘1’),
  • (“GLOBAL_OPERATOR_NEW_EXCEPTIONS”, ‘UNDEF’, ‘1’, ‘1’),
  • (“USE_STL_ALLOCATOR”, ‘1’, ‘1’, ‘1’),
  • (“USE_MEMORY_DLMALLOC”, ‘1’, ‘UNDEF’, ‘UNDEF’),
  • (“USE_MEMORY_PTMALLOC”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“USE_MEMORY_MALLOC”, ‘UNDEF’, ‘1’, ‘1’),
  • (“HAVE_ZLIB”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_PNG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_JPEG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_TIFF”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_VRPN”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FMOD”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FMODEX”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_OPENAL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NVIDIACG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FREETYPE”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FFTW”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_OPENSSL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_NET”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CGGL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_CGDX9”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_FFMPEG”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_ARTOOLKIT”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“HAVE_DIRECTCAM”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“PRC_SAVE_DESCRIPTIONS”, ‘1’, ‘1’, ‘1’),
    ]

PRC_PARAMETERS=[

  • (“DEFAULT_PRC_DIR”, ‘“etc”’, ‘“etc”’),
  • (“PRC_DIR_ENVVARS”, ‘“PANDA_PRC_DIR”’, ‘“PANDA_PRC_DIR”’),
  • (“PRC_PATH_ENVVARS”, ‘“PANDA_PRC_PATH”’, ‘“PANDA_PRC_PATH”’),
  • (“PRC_PATTERNS”, ‘".prc"’, '".prc"’),
  • (“PRC_ENCRYPTED_PATTERNS”, ‘".prc.pe"’, '".prc.pe"’),
  • (“PRC_ENCRYPTION_KEY”, ‘""’, ‘""’),
  • (“PRC_EXECUTABLE_PATTERNS”, ‘""’, ‘""’),
  • (“PRC_EXECUTABLE_ARGS_ENVVAR”, ‘“PANDA_PRC_XARGS”’, ‘“PANDA_PRC_XARGS”’),
  • (“PRC_PUBLIC_KEYS_FILENAME”, ‘""’, ‘""’),
  • (“PRC_RESPECT_TRUST_LEVEL”, ‘UNDEF’, ‘UNDEF’),
  • (“PRC_DCONFIG_TRUST_LEVEL”, ‘0’, ‘0’),
  • (“PRC_INC_TRUST_LEVEL”, ‘0’, ‘0’),
  • (“DEFAULT_PRC_DIR”, ‘“etc”’, ‘“etc”’, ‘"/usr/local/panda/etc"’),
  • (“PRC_DIR_ENVVARS”, ‘“PANDA_PRC_DIR”’, ‘“PANDA_PRC_DIR”’, ‘“PANDA_PRC_DIR”’),
  • (“PRC_PATH_ENVVARS”, ‘“PANDA_PRC_PATH”’, ‘“PANDA_PRC_PATH”’, ‘“PANDA_PRC_PATH”’),
  • (“PRC_PATTERNS”, ‘".prc"’, '".prc"’, ‘"*.prc"’),
  • (“PRC_ENCRYPTED_PATTERNS”, ‘".prc.pe"’, '".prc.pe"’, ‘"*.prc.pe"’),
  • (“PRC_ENCRYPTION_KEY”, ‘""’, ‘""’, ‘""’),
  • (“PRC_EXECUTABLE_PATTERNS”, ‘""’, ‘""’, ‘""’),
  • (“PRC_EXECUTABLE_ARGS_ENVVAR”, ‘“PANDA_PRC_XARGS”’, ‘“PANDA_PRC_XARGS”’, ‘“PANDA_PRC_XARGS”’),
  • (“PRC_PUBLIC_KEYS_FILENAME”, ‘""’, ‘""’, ‘""’),
  • (“PRC_RESPECT_TRUST_LEVEL”, ‘UNDEF’, ‘UNDEF’, ‘UNDEF’),
  • (“PRC_DCONFIG_TRUST_LEVEL”, ‘0’, ‘0’, ‘0’),
  • (“PRC_INC_TRUST_LEVEL”, ‘0’, ‘0’, ‘0’),
    ]

def WriteConfigSettings():
@@ -858,14 +895,19 @@
prc_parameters={}

 if (sys.platform == "win32"):
  •    for key,win,unix in DTOOL_CONFIG:
    
  •    for key,win,unix,osx in DTOOL_CONFIG:
           dtool_config[key] = win
    
  •    for key,win,unix in PRC_PARAMETERS:
    
  •    for key,win,unix,osx in PRC_PARAMETERS:
           prc_parameters[key] = win
    
  • elif (sys.platform == ‘darwin’):
  •    for key,win,unix,osx in DTOOL_CONFIG:
    
  •        dtool_config[key] = osx
    
  •    for key,win,unix,osx in PRC_PARAMETERS:
    
  •        prc_parameters[key] = osx
    
    else:
  •    for key,win,unix in DTOOL_CONFIG:
    
  •    for key,win,unix,osx in DTOOL_CONFIG:
           dtool_config[key] = unix
    
  •    for key,win,unix in PRC_PARAMETERS:
    
  •    for key,win,unix,osx in PRC_PARAMETERS:
           prc_parameters[key] = unix
    

    for x in PkgListGet():
    @@ -1147,10 +1189,12 @@
    CopyAllHeaders(‘panda/src/glstuff’)
    CopyAllHeaders(‘panda/src/glgsg’)
    CopyAllHeaders(‘panda/metalibs/pandaegg’)
    -if (sys.platform != “win32”):
    +if (sys.platform == “win32”):

  • CopyAllHeaders(‘panda/src/wgldisplay’)
    +elif (sys.platform == ‘linux2’):
    CopyAllHeaders(‘panda/src/glxdisplay’)
    else:

  • CopyAllHeaders(‘panda/src/wgldisplay’)
  • CopyAllHeaders(‘panda/src/osxdisplay’)
    CopyAllHeaders(‘panda/metalibs/pandagl’)

CopyAllHeaders(‘panda/src/physics’)
@@ -2278,7 +2322,7 @@

DIRECTORY: panda/src/glxdisplay/

-if (sys.platform != “win32”):
+if (sys.platform != “win32” and sys.platform != ‘darwin’):
OPTS=[‘DIR:panda/src/glxdisplay’, ‘BUILDING:PANDAGLUT’, ‘GLUT’, ‘NVIDIACG’, ‘CGGL’]
TargetAdd(‘glxdisplay_composite.obj’, opts=OPTS, input=‘glxdisplay_composite.cxx’)
OPTS=[‘DIR:panda/metalibs/pandagl’, ‘BUILDING:PANDAGLUT’, ‘GLUT’, ‘NVIDIACG’, ‘CGGL’]
@@ -2311,6 +2355,25 @@
TargetAdd(‘libpandagl.dll’, input=COMMON_PANDA_LIBS)
TargetAdd(‘libpandagl.dll’, opts=[‘WINGDI’, ‘GLUT’, ‘WINKERNEL’, ‘WINOLDNAMES’, ‘WINUSER’, ‘WINMM’, ‘NVIDIACG’, ‘CGGL’])

+’’’#
+# DIRECTORY: panda/src/osxdisplay/
+#
+
+if (sys.platform == “darwin”):

  • OPTS=[‘DIR:panda/src/osxdisplay’, ‘DIR:panda/src/glstuff’, ‘BUILDING:PANDAGL’, ‘NVIDIACG’, ‘CGGL’]
  • TargetAdd(‘osxdisplay_composite.obj’, opts=OPTS, input=‘osxdisplay_composite.cxx’)
  • OPTS=[‘DIR:panda/metalibs/pandagl’, ‘BUILDING:PANDAGL’, ‘NVIDIACG’, ‘CGGL’]
  • TargetAdd(‘pandagl_pandagl.obj’, opts=OPTS, input=‘pandagl.cxx’)
  • TargetAdd(‘libpandagl.dll’, input=‘pandagl_pandagl.obj’)
  • TargetAdd(‘libpandagl.dll’, input=‘glgsg_config_glgsg.obj’)
  • TargetAdd(‘libpandagl.dll’, input=‘glgsg_glgsg.obj’)
  • TargetAdd(‘libpandagl.dll’, input=‘osxdisplay_composite.obj’)
  • TargetAdd(‘libpandagl.dll’, input=‘libp3windisplay.dll’)
  • TargetAdd(‘libpandagl.dll’, input=‘libp3glstuff.dll’)
  • TargetAdd(‘libpandagl.dll’, input=‘libpandafx.dll’)
  • TargetAdd(‘libpandagl.dll’, input=COMMON_PANDA_LIBS)
  • TargetAdd(‘libpandagl.dll’, opts=[‘GLUT’, ‘NVIDIACG’, ‘CGGL’])’’’

DIRECTORY: panda/src/physics/

@@ -3567,13 +3630,21 @@
oscmd(“mkdir -p linuxroot/etc/ld.so.conf.d”)
oscmd(“sed -e ‘s@model-cache-@# model-cache-@’ -e ‘s@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@’ < built/etc/Config.prc > linuxroot/etc/Config.prc”)
oscmd(“cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc”)

  • oscmd(“cp --recursive built/include linuxroot/usr/include/panda3d”)
  • oscmd(“cp --recursive direct linuxroot/usr/share/panda3d/direct”)
  • oscmd(“cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac”)
  • oscmd(“cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw”)
  • if sys.platform == ‘darwin’:
  •    oscmd("cp -R built/include linuxroot/usr/include/panda3d")
    
  •    oscmd("cp -R direct        linuxroot/usr/share/panda3d/direct")
    
  •    oscmd("cp -R built/pandac  linuxroot/usr/share/panda3d/pandac")
    
  •    oscmd("cp -R built/Pmw     linuxroot/usr/share/panda3d/Pmw")
    
  •    oscmd("cp -R built/models  linuxroot/usr/share/panda3d/models")
    
  •    oscmd("cp -R samples       linuxroot/usr/share/panda3d/samples")
    
  • else:
  •    oscmd("cp --recursive built/include linuxroot/usr/include/panda3d")
    
  •    oscmd("cp --recursive direct        linuxroot/usr/share/panda3d/direct")
    
  •    oscmd("cp --recursive built/pandac  linuxroot/usr/share/panda3d/pandac")
    
  •    oscmd("cp --recursive built/Pmw     linuxroot/usr/share/panda3d/Pmw")
    
  •    oscmd("cp --recursive built/models  linuxroot/usr/share/panda3d/models")
    
  •    oscmd("cp --recursive samples       linuxroot/usr/share/panda3d/samples")
    
    oscmd(“cp built/direct/init.py linuxroot/usr/share/panda3d/direct/init.py”)
  • oscmd(“cp --recursive built/models linuxroot/usr/share/panda3d/models”)
  • oscmd(“cp --recursive samples linuxroot/usr/share/panda3d/samples”)
    oscmd(“cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE”)
    oscmd(“cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE”)
    oscmd(“cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes”)
    diff -u -r panda3d-1.5.0/makepanda/makepandacore.py panda3d-makepanda/makepanda/makepandacore.py
    — panda3d-1.5.0/makepanda/makepandacore.py 2007-12-08 21:49:15.000000000 +0100
    +++ panda3d-makepanda/makepanda/makepandacore.py 2008-03-21 01:09:32.000000000 +0100
    @@ -694,7 +694,10 @@
    if (PkgSkip(“PYTHON”)==0):
    if (sys.platform == “win32”):
    SDK[“PYTHON”]=“thirdparty/win-python”
  •   SDK["PYTHONVERSION"]="python2.5"
    
  •        SDK["PYTHONVERSION"]="python2.5"
    
  •    if (sys.platform == "darwin"):
    
  •        SDK["PYTHON"]="/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5"
    
  •        SDK["PYTHONVERSION"]="python2.5"
       else:
           os.system("python -V > built/tmp/pythonversion 2>&1")
           pv=ReadFile("built/tmp/pythonversion")
    

@@ -710,7 +713,7 @@
if (sys.platform != “win32”): return
vcdir = GetRegistryKey(“SOFTWARE\Microsoft\VisualStudio\SxS\VC7”, “8.0”)
if (vcdir != 0) and (vcdir[-4:] == “\VC\”):

  • vcdir = vcdir[:-3]
  •    vcdir = vcdir[:-3]
       SDK["VISUALSTUDIO"] = vcdir
    

def SdkLocateMSPlatform():
@@ -852,6 +855,8 @@
if (os.path.isdir(dstdir)): return 0
if (sys.platform == “win32”):
cmd = ‘xcopy /I/Y/E/Q "’ + srcdir + ‘" "’ + dstdir + ‘"’

  • elif (sys.platform == “darwin”):
  •    cmd = 'cp -R -f ' + srcdir + ' ' + dstdir
    
    else:
    cmd = 'cp --recursive --force ’ + srcdir + ’ ’ + dstdir
    oscmd(cmd)
    Only in panda3d-makepanda/makepanda: makepandacore.pyc
    diff -u -r panda3d-1.5.0/makepanda/otherMakePanda.py panda3d-makepanda/makepanda/otherMakePanda.py
    — panda3d-1.5.0/makepanda/otherMakePanda.py 2005-11-12 01:09:41.000000000 +0100
    +++ panda3d-makepanda/makepanda/otherMakePanda.py 2008-03-22 12:42:07.000000000 +0100
    @@ -361,6 +361,9 @@
    if (sys.platform == “win32” or sys.platform == “cygwin”):
    for key,win,unix in DTOOLDEFAULTS:
    DTOOLCONFIG[key] = win
    +elif (sys.platform == “darwin”):
  • for key,win,unix in DTOOLDEFAULTS:
  •    DTOOLCONFIG[key] = unix
    

else:
for key,win,unix in DTOOLDEFAULTS:
DTOOLCONFIG[key] = unix
@@ -726,6 +729,11 @@
“C:/Python24”,
“C:/Python25”,
‘thirdparty/win-python’]

  • elif sys.platform == “darwin”:
  •    pythonPaths = [
    
  •        "/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4",
    
  •        "/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5"
    
  •    ]
    
    else:
    pythonPaths = [
    “/usr/include/python2.5”,
    @@ -1177,7 +1185,11 @@
    def CopyTree(dstdir,srcdir):
    if (os.path.isdir(dstdir)): return 0
    if (COMPILER==“MSVC7” or COMPILER==“MSVC71”): cmd = ‘xcopy.exe /I/Y/E/Q "’ + srcdir + ‘" "’ + dstdir + ‘"’
  • elif (COMPILER==“LINUXA”): cmd = 'cp --recursive --force ’ + srcdir + ’ ’ + dstdir
  • elif (COMPILER==“LINUXA”):
  •    if sys.platform == 'darwin'
    
  •        cmd = 'cp -R -f ' + srcdir + ' ' + dstdir
    
  •    else:
    
  •        cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
    
    oscmd(cmd)
    updatefiledate(dstdir)

@@ -1243,13 +1255,16 @@
priorIPath=path

def CompileC(obj=0,src=0,ipath=[],opts=[]):

  • global VERBOSE
  • CompileLink(obj,src,opts)
  • ‘’'global VERBOSE
    if ((obj==0)|(src==0)): sys.exit(“syntax error in CompileC directive”)
    ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
    fullsrc = CxxFindSource(src, ipath)
    if (fullsrc == 0): sys.exit("Cannot find source file "+src)
    dep = CxxCalcDependencies(fullsrc, ipath, [])
  • print “COMPILER”, COMPILER
  • if (COMPILER==“MSVC7” or COMPILER==“MSVC71”):
    wobj = PREFIX+"/tmp/"+obj
    if (older(wobj, dep)):
    @@ -1293,6 +1308,7 @@
    if (PkgSelected(opts,“NVIDIACG”)): cmd = cmd + ’ -I’ + THIRDPARTY + ‘/linux-libs-a/nvidiacg/include’
    if (PkgSelected(opts,“NSPR”)): cmd = cmd + ’ -I’ + NSPR_SDK + ‘/include’
    if (PkgSelected(opts,“FREETYPE”)): cmd = cmd + ’ -I/usr/include/freetype2’
  •        #cmd = cmd + ' -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/'
           for x in ipath: cmd = cmd + ' -I' + x
           if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
           if (OPTIMIZE==1): cmd = cmd + " -g"
    

@@ -1303,7 +1319,7 @@
if (building): cmd = cmd + " -DBUILDING_" + building
cmd = cmd + ’ ’ + fullsrc
oscmd(cmd)

  •        updatefiledate(wobj)
    
  •        updatefiledate(wobj)'''
    

########################################################################

diff -u -r panda3d-1.5.0/panda/src/nativenet/socket_address.h panda3d-makepanda/panda/src/nativenet/socket_address.h
— panda3d-1.5.0/panda/src/nativenet/socket_address.h 2007-07-21 01:02:55.000000000 +0200
+++ panda3d-makepanda/panda/src/nativenet/socket_address.h 2008-03-22 00:21:10.000000000 +0100
@@ -1,9 +1,11 @@
#ifndef SOCKET_ADDRESS_H
#define SOCKET_ADDRESS_H

+#undef _POSIX_C_SOURCE
#include “pandabase.h”
#include “numeric_types.h”
#include “socket_portable.h”
+#include <netinet/in.h>

///////////////////////////////////
// Class : Socket_Address
diff -u -r panda3d-1.5.0/panda/src/nativenet/socket_portable.h panda3d-makepanda/panda/src/nativenet/socket_portable.h
— panda3d-1.5.0/panda/src/nativenet/socket_portable.h 2008-01-17 20:27:49.000000000 +0100
+++ panda3d-makepanda/panda/src/nativenet/socket_portable.h 2008-03-22 00:29:12.000000000 +0100
@@ -246,11 +246,12 @@

#elif defined(IS_LINUX) || defined(IS_OSX) || defined(FreeBSD)

+#undef _POSIX_C_SOURCE
+
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
-#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <fcntl.h>
[/code]

can you post the output of the diff program with the “-u” option?

I have modified the above post diff, to be -u. Be aware that it still cant completely compile panda3d, but it gets you further then the “normal” script. I have tried to keep it compatible with linux/windows/other platforms but might have broken something.

I just completed a fully working makepanda compile, along with a couple of single-file patches that are necessary to compile.

The whole thing produces universal binaries from end to end, but unfortunately they are built against the 10.5 SDK, because I can’t get the 10.4u SDK to work for this.

I have also assembled a ‘darwin-libs-a’ directory of pretty much all of the dependencies, to simplify things greatly. It currently includes artoolkit, fftw, fmod, fmodx, gtk, jpeg, png and vrpn. I hope to have ffmpeg and tiff added soon - if any of you have a universal binary of ffmpeg I would be much obliged.

What would be the prefered format to submit these to all of you? I can supply diffs of makepanda/py and makepandacore.py, as well as the modified genpycode.c, and a tarball of the dependencies directory, but it might be simpler to supply a tarball of the whole thing as well - let me know what would be best.

Send a tarball. Now, I will need diffs, but I’d like to generate them myself by comparing the files in the tarball to files in the distribution. For this to work, I need to know exactly which distribution you used as a basis: was it 1.5.0?

As for how to send the tarball: I don’t know. Do you have a webserver where I could download it from you?

Now, since I don’t have a mac, I won’t be able to test it. What I can do, however, is include it in 1.5.1. Then, you can test it. I might very well make a few mistakes integrating it, so there will probably be a bug or two. You can test it, report the bug and the fix to me, and we’ll get a clean version by 1.5.2, probably.

PS. I really, really appreciate this - and I’m sure the Panda3D community does too.

Still working through a couple of issues, but the compile definitely completes. Now just a matter of making sure everything actually ended up where it should have and getting the config to a usable state.

Ja, 1.5.0

Sure, I will post it to mediafire once I fix the last few problems and add tiff and ffmpeg.

Sounds good to me. I don’t really want to end up maintaining this log term though (already maintaining another engine), so if we can find someone else willing to maintian once we have it stable it would be great :wink:

@Hypnos: Are you using a patched osxdisplay driver? I have the engine fully compiled and now running with makepanda, but panda reports my OpenGL driver as not supporting shaders (this is an MacBook Pro with an X1600), so something must be messed up.

Well, how about this: if you promise to coach me on how to build it on Mac, I’ll go get myself a Mac. But I don’t want to puzzle this out myself - I want to be taught. So that would mean you would use something like VNC or such to guide me through the process, and then I would go through the process while you watch, and I then I would know how to do it.

Are you up for that?

No i didnt change anything at all except the posted patches (which dont include any changes @osxdisplay). Shaders do work for me pretty well (except some features which are not implemented under osx (aka some type of offscreenbuffer)).

Start output:

:interrogatedb(warning): Classes Http_Request and Socket_TCP share the same TypeHandle value (42); check class definitions.
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
:04-03-2008 11:13:56 ShowBase(info): Default graphics pipe is OpenGL (osxGraphicsPipe).
:display:osxdisplay: Creating standard window
:display:osxdisplay: In Resize.....size=(800, 600) title="Panda" !undecorated !fullscreen foreground !minimized open !cursor_hidden absolute 
:display:osxdisplay: Resize Complete.....
:display:osxdisplay: Event handler installed, now buildGL
:display:osxdisplay: BuildGL complete, set properties
:display:osxdisplay: Do Reshape
:display:osxdisplay: In Resize.....origin=(0, 0) size=(773, 600) title="Panda" !undecorated !fullscreen foreground !minimized open !cursor_hidden absolute 
:display:osxdisplay: Resize Complete.....

You could check if panda’s display stuff is linked against the Nvidia CG:

otool -L /usr/local/panda/lib/libpandagl.dylib
should contain:
	@executable_path/../Frameworks/Cg.framework/Cg (compatibility version 0.0.0, current version 0.0.0)

grep Cg.framework /usr/local/panda/lib/*
gives me:
Binary file /usr/local/panda/lib/libglgsg.dylib matches
Binary file /usr/local/panda/lib/libglgsg.so matches
Binary file /usr/local/panda/lib/libglstuff.dylib matches
Binary file /usr/local/panda/lib/libglstuff.so matches
Binary file /usr/local/panda/lib/libgobj.dylib matches
Binary file /usr/local/panda/lib/libosxdisplay.dylib matches
Binary file /usr/local/panda/lib/libosxdisplay.so matches
Binary file /usr/local/panda/lib/libpandagl.dylib matches
Binary file /usr/local/panda/lib/libpandagl.so matches

I am using the same hardware.

Thanks, that was it, I had a bad path to the cg library.

As of now, you unpack the tarball and type makepanda/makepanda.py at the command line, just like linux. In fact, apart from a handful of changes to makepanda.py, this is linux.

BTW, I only meant that I don’t want to maintain this permanently - I am quite happy to get it fully working and coach it along for a couple of releases.