mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
somewhat experimental support for 64-bits OS X and OS X Lion
This commit is contained in:
parent
07e3f33fd2
commit
30872b617e
@ -28,10 +28,15 @@
|
|||||||
#define C++FLAGS_GEN -ftemplate-depth-30
|
#define C++FLAGS_GEN -ftemplate-depth-30
|
||||||
|
|
||||||
// Configure for universal binaries on OSX.
|
// Configure for universal binaries on OSX.
|
||||||
#defer ARCH_FLAGS $[if $[UNIVERSAL_BINARIES],-arch i386 -arch ppc,]
|
#defer ARCH_FLAGS $[if $[UNIVERSAL_BINARIES],-arch i386 -arch ppc -arch x86_64,]
|
||||||
#define OSX_CDEFS
|
#define OSX_CDEFS
|
||||||
#define OSX_CFLAGS -Wno-deprecated-declarations
|
#define OSX_CFLAGS -Wno-deprecated-declarations
|
||||||
|
|
||||||
|
// Whether to build for Cocoa, Carbon or both. 64-bits systems do not
|
||||||
|
// have Carbon. We also disable it for universal and 64-bits builds.
|
||||||
|
#define HAVE_COCOA 1
|
||||||
|
#defer HAVE_CARBON $[not $[or $[eq $[shell uname -m], x86_64],$[UNIVERSAL_BINARIES]]]
|
||||||
|
|
||||||
// How to compile a C or C++ file into a .o file. $[target] is the
|
// How to compile a C or C++ file into a .o file. $[target] is the
|
||||||
// name of the .o file, $[source] is the name of the source file,
|
// name of the .o file, $[source] is the name of the source file,
|
||||||
// $[ipath] is a space-separated list of directories to search for
|
// $[ipath] is a space-separated list of directories to search for
|
||||||
|
@ -260,6 +260,14 @@
|
|||||||
#print Configuring Panda without threading support.
|
#print Configuring Panda without threading support.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if $[OSX_PLATFORM]
|
||||||
|
#if $[UNIVERSAL_BINARIES]
|
||||||
|
#print Compilation will create universal binaries.
|
||||||
|
#else
|
||||||
|
#print Compilation will not create universal binaries.
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#print
|
#print
|
||||||
#print See dtool_config.h for more details about the specified configuration.
|
#print See dtool_config.h for more details about the specified configuration.
|
||||||
|
|
||||||
@ -737,6 +745,10 @@ $[cdefine LINK_ALL_STATIC]
|
|||||||
/* Define to compile the plugin code. */
|
/* Define to compile the plugin code. */
|
||||||
$[cdefine HAVE_P3D_PLUGIN]
|
$[cdefine HAVE_P3D_PLUGIN]
|
||||||
|
|
||||||
|
/* Define to compile for Cocoa or Carbon on Mac OS X. */
|
||||||
|
$[cdefine HAVE_COCOA]
|
||||||
|
$[cdefine HAVE_CARBON]
|
||||||
|
|
||||||
/* Platform-identifying defines. */
|
/* Platform-identifying defines. */
|
||||||
$[cdefine IS_OSX]
|
$[cdefine IS_OSX]
|
||||||
$[cdefine IS_LINUX]
|
$[cdefine IS_LINUX]
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
//
|
//
|
||||||
// This is the package-specific file, which should be at the top of
|
// This is the package-specific file, which should be at the top of
|
||||||
// every source hierarchy. It generally gets the ball rolling, and is
|
// every source hierarchy. It generally gets the ball rolling, and is
|
||||||
// responsible for explicitly including all of the relevent Config.pp
|
// responsible for explicitly including all of the relevant Config.pp
|
||||||
// files.
|
// files.
|
||||||
|
|
||||||
// Check the version of ppremake in use.
|
// Check the version of ppremake in use.
|
||||||
@ -253,6 +253,9 @@
|
|||||||
|
|
||||||
#set HAVE_WGL $[HAVE_WGL]
|
#set HAVE_WGL $[HAVE_WGL]
|
||||||
|
|
||||||
|
#set HAVE_COCOA $[HAVE_COCOA]
|
||||||
|
#set HAVE_CARBON $[HAVE_CARBON]
|
||||||
|
|
||||||
#set DX8_IPATH $[unixfilename $[DX8_IPATH]]
|
#set DX8_IPATH $[unixfilename $[DX8_IPATH]]
|
||||||
#set DX8_LPATH $[unixfilename $[DX8_LPATH]]
|
#set DX8_LPATH $[unixfilename $[DX8_LPATH]]
|
||||||
#set DX8_LIBS $[DX8_LIBS]
|
#set DX8_LIBS $[DX8_LIBS]
|
||||||
|
@ -61,6 +61,7 @@ MAJOR_VERSION=None
|
|||||||
COREAPI_VERSION=None
|
COREAPI_VERSION=None
|
||||||
PLUGIN_VERSION=None
|
PLUGIN_VERSION=None
|
||||||
OSXTARGET=None
|
OSXTARGET=None
|
||||||
|
UNIVERSAL=False
|
||||||
HOST_URL="https://runtime.panda3d.org/"
|
HOST_URL="https://runtime.panda3d.org/"
|
||||||
global STRDXSDKVERSION, STRMSPLATFORMVERSION, BOOUSEINTELCOMPILER
|
global STRDXSDKVERSION, STRMSPLATFORMVERSION, BOOUSEINTELCOMPILER
|
||||||
STRDXSDKVERSION = 'default'
|
STRDXSDKVERSION = 'default'
|
||||||
@ -85,6 +86,7 @@ PkgListSet(["PYTHON", "DIRECT", # Python support
|
|||||||
"NPAPI", "AWESOMIUM", # Browser embedding
|
"NPAPI", "AWESOMIUM", # Browser embedding
|
||||||
"GTK2", "WX", "FLTK", # Toolkit support
|
"GTK2", "WX", "FLTK", # Toolkit support
|
||||||
"ROCKET", # GUI libraries
|
"ROCKET", # GUI libraries
|
||||||
|
"CARBON", "COCOA", # Mac OS X toolkits
|
||||||
"OSMESA", "X11", "XF86DGA", "XRANDR", "XCURSOR", # Unix platform support
|
"OSMESA", "X11", "XF86DGA", "XRANDR", "XCURSOR", # Unix platform support
|
||||||
"PANDATOOL", "PVIEW", "DEPLOYTOOLS", # Toolchain
|
"PANDATOOL", "PVIEW", "DEPLOYTOOLS", # Toolchain
|
||||||
"SKEL", # Example SKEL project
|
"SKEL", # Example SKEL project
|
||||||
@ -131,6 +133,7 @@ def usage(problem):
|
|||||||
print " --host URL (set the host url (runtime build only))"
|
print " --host URL (set the host url (runtime build only))"
|
||||||
print " --threads N (use the multithreaded build system. see manual)"
|
print " --threads N (use the multithreaded build system. see manual)"
|
||||||
print " --osxtarget N (the OSX version number to build for (OSX only))"
|
print " --osxtarget N (the OSX version number to build for (OSX only))"
|
||||||
|
print " --universal (build universal binaries (OSX only))"
|
||||||
print " --override \"O=V\" (override dtool_config/prc option value)"
|
print " --override \"O=V\" (override dtool_config/prc option value)"
|
||||||
print " --static (builds libraries for static linking)"
|
print " --static (builds libraries for static linking)"
|
||||||
print ""
|
print ""
|
||||||
@ -181,6 +184,7 @@ def parseopts(args):
|
|||||||
elif (option=="--threads"): THREADCOUNT=int(value)
|
elif (option=="--threads"): THREADCOUNT=int(value)
|
||||||
elif (option=="--outputdir"): SetOutputDir(value.strip())
|
elif (option=="--outputdir"): SetOutputDir(value.strip())
|
||||||
elif (option=="--osxtarget"): OSXTARGET=value.strip()
|
elif (option=="--osxtarget"): OSXTARGET=value.strip()
|
||||||
|
elif (option=="--universal"): UNIVERSAL=True
|
||||||
elif (option=="--nocolor"): DisableColors()
|
elif (option=="--nocolor"): DisableColors()
|
||||||
elif (option=="--version"):
|
elif (option=="--version"):
|
||||||
VERSION=value
|
VERSION=value
|
||||||
@ -432,6 +436,8 @@ if (COMPILER=="MSVC"):
|
|||||||
PkgDisable("GLES")
|
PkgDisable("GLES")
|
||||||
PkgDisable("GLES2")
|
PkgDisable("GLES2")
|
||||||
PkgDisable("EGL")
|
PkgDisable("EGL")
|
||||||
|
PkgDisable("CARBON")
|
||||||
|
PkgDisable("COCOA")
|
||||||
if (PkgSkip("PYTHON")==0):
|
if (PkgSkip("PYTHON")==0):
|
||||||
IncDirectory("ALWAYS", SDK["PYTHON"] + "/include")
|
IncDirectory("ALWAYS", SDK["PYTHON"] + "/include")
|
||||||
LibDirectory("ALWAYS", SDK["PYTHON"] + "/libs")
|
LibDirectory("ALWAYS", SDK["PYTHON"] + "/libs")
|
||||||
@ -591,6 +597,10 @@ if (COMPILER=="MSVC"):
|
|||||||
|
|
||||||
if (COMPILER=="LINUX"):
|
if (COMPILER=="LINUX"):
|
||||||
PkgDisable("AWESOMIUM")
|
PkgDisable("AWESOMIUM")
|
||||||
|
if (sys.platform != "darwin"):
|
||||||
|
PkgDisable("CARBON")
|
||||||
|
PkgDisable("COCOA")
|
||||||
|
|
||||||
if (PkgSkip("PYTHON")==0):
|
if (PkgSkip("PYTHON")==0):
|
||||||
IncDirectory("ALWAYS", SDK["PYTHON"])
|
IncDirectory("ALWAYS", SDK["PYTHON"])
|
||||||
if (sys.platform == "darwin"):
|
if (sys.platform == "darwin"):
|
||||||
@ -653,7 +663,7 @@ if (COMPILER=="LINUX"):
|
|||||||
SmartPkgEnable("GTK2", "gtk+-2.0")
|
SmartPkgEnable("GTK2", "gtk+-2.0")
|
||||||
SmartPkgEnable("JPEG", "", ("jpeg"), "jpeglib.h")
|
SmartPkgEnable("JPEG", "", ("jpeg"), "jpeglib.h")
|
||||||
SmartPkgEnable("OPENSSL", "openssl", ("ssl", "crypto"), ("openssl/ssl.h", "openssl/crypto.h"))
|
SmartPkgEnable("OPENSSL", "openssl", ("ssl", "crypto"), ("openssl/ssl.h", "openssl/crypto.h"))
|
||||||
SmartPkgEnable("PNG", "libpng", ("png"), "png.h")
|
SmartPkgEnable("PNG", "libpng", ("png"), "png.h", tool = "libpng-config")
|
||||||
SmartPkgEnable("ZLIB", "zlib", ("z"), "zlib.h")
|
SmartPkgEnable("ZLIB", "zlib", ("z"), "zlib.h")
|
||||||
if (RTDIST and sys.platform == "darwin" and "PYTHONVERSION" in SDK):
|
if (RTDIST and sys.platform == "darwin" and "PYTHONVERSION" in SDK):
|
||||||
# Don't use the framework for the OSX rtdist build. I'm afraid it gives problems somewhere.
|
# Don't use the framework for the OSX rtdist build. I'm afraid it gives problems somewhere.
|
||||||
@ -967,16 +977,22 @@ def CompileCxx(obj,src,opts):
|
|||||||
for (opt,var,val) in DEFSYMBOLS:
|
for (opt,var,val) in DEFSYMBOLS:
|
||||||
if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
|
if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
|
||||||
for x in ipath: cmd += ' -I' + x
|
for x in ipath: cmd += ' -I' + x
|
||||||
|
|
||||||
|
# Mac-specific flags.
|
||||||
if (sys.platform == "darwin"):
|
if (sys.platform == "darwin"):
|
||||||
cmd += " -Wno-deprecated-declarations"
|
cmd += " -Wno-deprecated-declarations"
|
||||||
if (OSXTARGET != None):
|
if (OSXTARGET != None):
|
||||||
cmd += " -isysroot " + SDK["MACOSX"]
|
cmd += " -isysroot " + SDK["MACOSX"]
|
||||||
cmd += " -mmacosx-version-min=" + OSXTARGET
|
cmd += " -mmacosx-version-min=" + OSXTARGET
|
||||||
if is_64:
|
if (UNIVERSAL):
|
||||||
cmd += " -arch x86_64"
|
|
||||||
else:
|
|
||||||
cmd += " -arch i386"
|
cmd += " -arch i386"
|
||||||
if ("NOPPC" not in opts): cmd += " -arch ppc"
|
if int(platform.mac_ver()[0][3]) >= 5 and not RTDIST and not RUNTIME:
|
||||||
|
#XXX we don't support 64-bits rtdist or plugin at the moment.
|
||||||
|
# 10.5 supports building 64-bits Cocoa apps.
|
||||||
|
cmd += " -arch x86_64"
|
||||||
|
if ("NOPPC" not in opts):
|
||||||
|
cmd += " -arch ppc"
|
||||||
|
|
||||||
cmd += " -pthread"
|
cmd += " -pthread"
|
||||||
if PkgSkip("SSE2") == 0:
|
if PkgSkip("SSE2") == 0:
|
||||||
cmd += " -msse2"
|
cmd += " -msse2"
|
||||||
@ -1285,11 +1301,14 @@ def CompileLink(dll, obj, opts):
|
|||||||
if (OSXTARGET != None):
|
if (OSXTARGET != None):
|
||||||
cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"]
|
cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"]
|
||||||
cmd += " -mmacosx-version-min=" + OSXTARGET
|
cmd += " -mmacosx-version-min=" + OSXTARGET
|
||||||
if is_64:
|
if (UNIVERSAL):
|
||||||
cmd += " -arch x86_64"
|
|
||||||
else:
|
|
||||||
cmd += " -arch i386"
|
cmd += " -arch i386"
|
||||||
if ("NOPPC" not in opts): cmd += " -arch ppc"
|
if int(platform.mac_ver()[0][3]) >= 5 and not RTDIST and not RUNTIME:
|
||||||
|
#XXX we don't support 64-bits rtdist or plugin at the moment.
|
||||||
|
# 10.5 supports building 64-bits Cocoa apps.
|
||||||
|
cmd += " -arch x86_64"
|
||||||
|
if ("NOPPC" not in opts):
|
||||||
|
cmd += " -arch ppc"
|
||||||
if (LDFLAGS !=""): cmd += " " + LDFLAGS
|
if (LDFLAGS !=""): cmd += " " + LDFLAGS
|
||||||
|
|
||||||
for (opt, dir) in LIBDIRECTORIES:
|
for (opt, dir) in LIBDIRECTORIES:
|
||||||
@ -1740,6 +1759,8 @@ DTOOL_CONFIG=[
|
|||||||
("HAVE_DIRECTCAM", 'UNDEF', 'UNDEF'),
|
("HAVE_DIRECTCAM", 'UNDEF', 'UNDEF'),
|
||||||
("HAVE_SQUISH", 'UNDEF', 'UNDEF'),
|
("HAVE_SQUISH", 'UNDEF', 'UNDEF'),
|
||||||
("HAVE_FCOLLADA", 'UNDEF', 'UNDEF'),
|
("HAVE_FCOLLADA", 'UNDEF', 'UNDEF'),
|
||||||
|
("HAVE_CARBON", 'UNDEF', 'UNDEF'),
|
||||||
|
("HAVE_COCOA", 'UNDEF', 'UNDEF'),
|
||||||
("HAVE_OPENAL_FRAMEWORK", 'UNDEF', 'UNDEF'),
|
("HAVE_OPENAL_FRAMEWORK", 'UNDEF', 'UNDEF'),
|
||||||
("HAVE_ROCKET_PYTHON", '1', '1'),
|
("HAVE_ROCKET_PYTHON", '1', '1'),
|
||||||
("HAVE_ROCKET_DEBUGGER", 'UNDEF', 'UNDEF'),
|
("HAVE_ROCKET_DEBUGGER", 'UNDEF', 'UNDEF'),
|
||||||
@ -1807,6 +1828,10 @@ def WriteConfigSettings():
|
|||||||
dtool_config["PHAVE_MALLOC_H"] = 'UNDEF'
|
dtool_config["PHAVE_MALLOC_H"] = 'UNDEF'
|
||||||
dtool_config["PHAVE_SYS_MALLOC_H"] = '1'
|
dtool_config["PHAVE_SYS_MALLOC_H"] = '1'
|
||||||
dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1'
|
dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1'
|
||||||
|
if not RTDIST and not RUNTIME:
|
||||||
|
dtool_config["HAVE_COCOA"] = '1'
|
||||||
|
if not (UNIVERSAL or is_64):
|
||||||
|
dtool_config["HAVE_CARBON"] = '1'
|
||||||
dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it.
|
dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it.
|
||||||
dtool_config["HAVE_XRANDR"] = 'UNDEF'
|
dtool_config["HAVE_XRANDR"] = 'UNDEF'
|
||||||
dtool_config["HAVE_XF86DGA"] = 'UNDEF'
|
dtool_config["HAVE_XF86DGA"] = 'UNDEF'
|
||||||
@ -2347,6 +2372,7 @@ if (sys.platform.startswith("win")):
|
|||||||
CopyAllHeaders('panda/src/wgldisplay')
|
CopyAllHeaders('panda/src/wgldisplay')
|
||||||
elif (sys.platform == "darwin"):
|
elif (sys.platform == "darwin"):
|
||||||
CopyAllHeaders('panda/src/osxdisplay')
|
CopyAllHeaders('panda/src/osxdisplay')
|
||||||
|
CopyAllHeaders('panda/src/cocoadisplay')
|
||||||
else:
|
else:
|
||||||
CopyAllHeaders('panda/src/x11display')
|
CopyAllHeaders('panda/src/x11display')
|
||||||
CopyAllHeaders('panda/src/glxdisplay')
|
CopyAllHeaders('panda/src/glxdisplay')
|
||||||
@ -2717,6 +2743,7 @@ if (not RUNTIME):
|
|||||||
TargetAdd('p3putil_composite2.obj', opts=OPTS, input='p3putil_composite2.cxx')
|
TargetAdd('p3putil_composite2.obj', opts=OPTS, input='p3putil_composite2.cxx')
|
||||||
IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"])
|
IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"])
|
||||||
IGATEFILES.remove("test_bam.h")
|
IGATEFILES.remove("test_bam.h")
|
||||||
|
IGATEFILES.remove("paramValue.h")
|
||||||
TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES)
|
TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES)
|
||||||
TargetAdd('libp3putil.in', opts=['IMOD:panda', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil'])
|
TargetAdd('libp3putil.in', opts=['IMOD:panda', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil'])
|
||||||
TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"])
|
TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"])
|
||||||
@ -3017,6 +3044,7 @@ if (not RUNTIME):
|
|||||||
TargetAdd('p3grutil_composite1.obj', opts=OPTS, input='p3grutil_composite1.cxx')
|
TargetAdd('p3grutil_composite1.obj', opts=OPTS, input='p3grutil_composite1.cxx')
|
||||||
TargetAdd('p3grutil_composite2.obj', opts=OPTS, input='p3grutil_composite2.cxx')
|
TargetAdd('p3grutil_composite2.obj', opts=OPTS, input='p3grutil_composite2.cxx')
|
||||||
IGATEFILES=GetDirectoryContents('panda/src/grutil', ["*.h", "*_composite*.cxx"])
|
IGATEFILES=GetDirectoryContents('panda/src/grutil', ["*.h", "*_composite*.cxx"])
|
||||||
|
IGATEFILES.remove("convexHull.h")
|
||||||
TargetAdd('libp3grutil.in', opts=OPTS, input=IGATEFILES)
|
TargetAdd('libp3grutil.in', opts=OPTS, input=IGATEFILES)
|
||||||
TargetAdd('libp3grutil.in', opts=['IMOD:panda', 'ILIB:libp3grutil', 'SRCDIR:panda/src/grutil'])
|
TargetAdd('libp3grutil.in', opts=['IMOD:panda', 'ILIB:libp3grutil', 'SRCDIR:panda/src/grutil'])
|
||||||
TargetAdd('libp3grutil_igate.obj', input='libp3grutil.in', opts=["DEPENDENCYONLY"])
|
TargetAdd('libp3grutil_igate.obj', input='libp3grutil.in', opts=["DEPENDENCYONLY"])
|
||||||
@ -3689,11 +3717,30 @@ if (sys.platform != "win32" and sys.platform != "darwin" and PkgSkip("GL")==0 an
|
|||||||
TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
|
TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
|
||||||
TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
|
TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
|
||||||
|
|
||||||
|
#
|
||||||
|
# DIRECTORY: panda/src/cocoadisplay/
|
||||||
|
#
|
||||||
|
|
||||||
|
if (sys.platform == 'darwin' and PkgSkip("COCOA")==0 and PkgSkip("GL")==0 and not RUNTIME):
|
||||||
|
OPTS=['DIR:panda/src/cocoadisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
|
||||||
|
TargetAdd('p3cocoadisplay_composite1.obj', opts=OPTS, input='p3cocoadisplay_composite1.mm')
|
||||||
|
OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
|
||||||
|
TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
|
||||||
|
TargetAdd('libpandagl.dll', input='pandagl_pandagl.obj')
|
||||||
|
TargetAdd('libpandagl.dll', input='p3glgsg_config_glgsg.obj')
|
||||||
|
TargetAdd('libpandagl.dll', input='p3glgsg_glgsg.obj')
|
||||||
|
TargetAdd('libpandagl.dll', input='p3cocoadisplay_composite1.obj')
|
||||||
|
TargetAdd('libpandagl.dll', input='libp3glstuff.dll')
|
||||||
|
if (PkgSkip('PANDAFX')==0):
|
||||||
|
TargetAdd('libpandagl.dll', input='libpandafx.dll')
|
||||||
|
TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
|
||||||
|
TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'COCOA'])
|
||||||
|
|
||||||
#
|
#
|
||||||
# DIRECTORY: panda/src/osxdisplay/
|
# DIRECTORY: panda/src/osxdisplay/
|
||||||
#
|
#
|
||||||
|
|
||||||
if (sys.platform == 'darwin' and PkgSkip("GL")==0 and not RUNTIME):
|
if (sys.platform == 'darwin' and PkgSkip("CARBON")==0 and PkgSkip("GL")==0 and not RUNTIME):
|
||||||
OPTS=['DIR:panda/src/osxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
|
OPTS=['DIR:panda/src/osxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
|
||||||
TargetAdd('p3osxdisplay_composite1.obj', opts=OPTS, input='p3osxdisplay_composite1.cxx')
|
TargetAdd('p3osxdisplay_composite1.obj', opts=OPTS, input='p3osxdisplay_composite1.cxx')
|
||||||
TargetAdd('p3osxdisplay_osxGraphicsWindow.obj', opts=OPTS, input='osxGraphicsWindow.mm')
|
TargetAdd('p3osxdisplay_osxGraphicsWindow.obj', opts=OPTS, input='osxGraphicsWindow.mm')
|
||||||
@ -5954,10 +6001,15 @@ def MakeInstallerOSX():
|
|||||||
plist.close()
|
plist.close()
|
||||||
if not os.path.isdir("dstroot/" + pkg):
|
if not os.path.isdir("dstroot/" + pkg):
|
||||||
os.makedirs("dstroot/" + pkg)
|
os.makedirs("dstroot/" + pkg)
|
||||||
|
|
||||||
if os.path.exists("/Developer/usr/bin/packagemaker"):
|
if os.path.exists("/Developer/usr/bin/packagemaker"):
|
||||||
cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate'
|
cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate'
|
||||||
if os.path.isdir("dstroot/scripts/" + pkg):
|
if os.path.isdir("dstroot/scripts/" + pkg):
|
||||||
cmd += ' --scripts dstroot/scripts/' + pkg
|
cmd += ' --scripts dstroot/scripts/' + pkg
|
||||||
|
elif os.path.exists("/Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"):
|
||||||
|
cmd = '/Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate'
|
||||||
|
if os.path.isdir("dstroot/scripts/" + pkg):
|
||||||
|
cmd += ' --scripts dstroot/scripts/' + pkg
|
||||||
elif os.path.exists("/Developer/Tools/packagemaker"):
|
elif os.path.exists("/Developer/Tools/packagemaker"):
|
||||||
cmd = '/Developer/Tools/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist'
|
cmd = '/Developer/Tools/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist'
|
||||||
else:
|
else:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define COMPONENT_LIBS \
|
#define COMPONENT_LIBS \
|
||||||
p3glgsg p3x11display p3glxdisplay \
|
p3glgsg p3x11display p3glxdisplay \
|
||||||
p3wgldisplay p3osxdisplay
|
p3wgldisplay p3osxdisplay p3cocoadisplay
|
||||||
|
|
||||||
#define LOCAL_LIBS p3gsgbase p3display p3express
|
#define LOCAL_LIBS p3gsgbase p3display p3express
|
||||||
#define OTHER_LIBS p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
|
#define OTHER_LIBS p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
|
||||||
|
@ -12,7 +12,12 @@
|
|||||||
#include "wglGraphicsPipe.h"
|
#include "wglGraphicsPipe.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IS_OSX
|
#ifdef HAVE_COCOA
|
||||||
|
#include "config_cocoadisplay.h"
|
||||||
|
#include "cocoaGraphicsPipe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CARBON
|
||||||
#include "config_osxdisplay.h"
|
#include "config_osxdisplay.h"
|
||||||
#include "osxGraphicsPipe.h"
|
#include "osxGraphicsPipe.h"
|
||||||
#endif
|
#endif
|
||||||
@ -22,8 +27,8 @@
|
|||||||
#include "glxGraphicsPipe.h"
|
#include "glxGraphicsPipe.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_WGL) && !defined(IS_OSX) && !defined(HAVE_GLX)
|
#if !defined(HAVE_WGL) && !defined(HAVE_COCOA) && !defined(HAVE_CARBON) && !defined(HAVE_GLX)
|
||||||
#error One of HAVE_WGL, IS_OSX or HAVE_GLX must be defined when compiling pandagl!
|
#error One of HAVE_WGL, HAVE_COCOA, HAVE_CARBON or HAVE_GLX must be defined when compiling pandagl!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// By including checkPandaVersion.h, we guarantee that runtime
|
// By including checkPandaVersion.h, we guarantee that runtime
|
||||||
@ -48,7 +53,11 @@ init_libpandagl() {
|
|||||||
init_libwgldisplay();
|
init_libwgldisplay();
|
||||||
#endif // HAVE_GL
|
#endif // HAVE_GL
|
||||||
|
|
||||||
#ifdef IS_OSX
|
#ifdef HAVE_COCOA
|
||||||
|
init_libcocoadisplay();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CARBON
|
||||||
init_libosxdisplay();
|
init_libosxdisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -68,7 +77,9 @@ get_pipe_type_pandagl() {
|
|||||||
return wglGraphicsPipe::get_class_type().get_index();
|
return wglGraphicsPipe::get_class_type().get_index();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IS_OSX
|
#if defined(HAVE_COCOA)
|
||||||
|
return CocoaGraphicsPipe::get_class_type().get_index();
|
||||||
|
#elif defined(HAVE_CARBON)
|
||||||
return osxGraphicsPipe::get_class_type().get_index();
|
return osxGraphicsPipe::get_class_type().get_index();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define BUILD_DIRECTORY $[and $[IS_OSX],$[HAVE_GL]]
|
#define BUILD_DIRECTORY $[and $[IS_OSX],$[HAVE_GL],$[HAVE_CARBON]]
|
||||||
|
|
||||||
#define OTHER_LIBS p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
|
#define OTHER_LIBS p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
|
||||||
p3dtoolutil:c p3dtoolbase:c p3dtool:m p3prc:c
|
p3dtoolutil:c p3dtoolbase:c p3dtool:m p3prc:c
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
tinyOffscreenGraphicsPipe.I tinyOffscreenGraphicsPipe.h \
|
tinyOffscreenGraphicsPipe.I tinyOffscreenGraphicsPipe.h \
|
||||||
tinyOsxGraphicsPipe.I tinyOsxGraphicsPipe.h \
|
tinyOsxGraphicsPipe.I tinyOsxGraphicsPipe.h \
|
||||||
tinyOsxGraphicsWindow.h tinyOsxGraphicsWindow.I \
|
tinyOsxGraphicsWindow.h tinyOsxGraphicsWindow.I \
|
||||||
$[if $[IS_OSX],tinyOsxGraphicsWindow.mm,] \
|
$[if $[and $[IS_OSX],$[HAVE_CARBON]],tinyOsxGraphicsWindow.mm,] \
|
||||||
zbuffer.h zfeatures.h zgl.h \
|
zbuffer.h zfeatures.h zgl.h \
|
||||||
zline.h zmath.h \
|
zline.h zmath.h \
|
||||||
ztriangle_1.cxx ztriangle_2.cxx \
|
ztriangle_1.cxx ztriangle_2.cxx \
|
||||||
|
@ -116,7 +116,7 @@ init_libtinydisplay() {
|
|||||||
ps->set_system_tag("TinyPanda", "native_window_system", "Win");
|
ps->set_system_tag("TinyPanda", "native_window_system", "Win");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
TinyOsxGraphicsPipe::init_type();
|
TinyOsxGraphicsPipe::init_type();
|
||||||
TinyOsxGraphicsWindow::init_type();
|
TinyOsxGraphicsWindow::init_type();
|
||||||
selection->add_pipe_type(TinyOsxGraphicsPipe::get_class_type(),
|
selection->add_pipe_type(TinyOsxGraphicsPipe::get_class_type(),
|
||||||
@ -150,7 +150,7 @@ get_pipe_type_p3tinydisplay() {
|
|||||||
return TinyWinGraphicsPipe::get_class_type().get_index();
|
return TinyWinGraphicsPipe::get_class_type().get_index();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
return TinyOsxGraphicsPipe::get_class_type().get_index();
|
return TinyOsxGraphicsPipe::get_class_type().get_index();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
|
|
||||||
#include "tinyOsxGraphicsPipe.h"
|
#include "tinyOsxGraphicsPipe.h"
|
||||||
#include "config_tinydisplay.h"
|
#include "config_tinydisplay.h"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
|
|
||||||
// We have to include this early, before anyone includes
|
// We have to include this early, before anyone includes
|
||||||
// netinet/tcp.h, which will define TCP_NODELAY and other symbols and
|
// netinet/tcp.h, which will define TCP_NODELAY and other symbols and
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
|
|
||||||
#if defined(IS_OSX) && !defined(BUILD_IPHONE)
|
#if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON)
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <Cocoa/Cocoa.h>
|
#include <Cocoa/Cocoa.h>
|
||||||
@ -48,7 +48,7 @@ struct work1
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define PANDA_CREATE_WINDOW 101
|
#define PANDA_CREATE_WINDOW 101
|
||||||
static void Post_Event_Wiait(unsigned short type, unsigned int data1 , unsigned int data2 , int target_window ) {
|
static void Post_Event_Wait(unsigned short type, unsigned int data1 , unsigned int data2 , int target_window ) {
|
||||||
work1 w;
|
work1 w;
|
||||||
w.work_done = false;
|
w.work_done = false;
|
||||||
NSEvent *ev = [NSEvent otherEventWithType:NSApplicationDefined
|
NSEvent *ev = [NSEvent otherEventWithType:NSApplicationDefined
|
||||||
@ -58,8 +58,8 @@ static void Post_Event_Wiait(unsigned short type, unsigned int data1 , unsigned
|
|||||||
windowNumber:target_window
|
windowNumber:target_window
|
||||||
context:nil
|
context:nil
|
||||||
subtype:type
|
subtype:type
|
||||||
data1:data1
|
data1:(NSInteger)data1
|
||||||
data2:(int)&w];
|
data2:(NSInteger)&w];
|
||||||
|
|
||||||
[NSApp postEvent:ev atStart:NO];
|
[NSApp postEvent:ev atStart:NO];
|
||||||
while (!w.work_done)
|
while (!w.work_done)
|
||||||
@ -1050,7 +1050,7 @@ bool TinyOsxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties) {
|
|||||||
// NSWindow* childWindow = [[NSWindow alloc] initWithWindowRef:_osx_window];
|
// NSWindow* childWindow = [[NSWindow alloc] initWithWindowRef:_osx_window];
|
||||||
|
|
||||||
|
|
||||||
Post_Event_Wiait(PANDA_CREATE_WINDOW,(unsigned long) _osx_window,1,[parentWindow windowNumber]);
|
Post_Event_Wait(PANDA_CREATE_WINDOW,(unsigned long) _osx_window,1,[parentWindow windowNumber]);
|
||||||
|
|
||||||
// [childWindow setFrameOrigin:origin];
|
// [childWindow setFrameOrigin:origin];
|
||||||
// [childWindow setAcceptsMouseMovedEvents:YES];
|
// [childWindow setAcceptsMouseMovedEvents:YES];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user