Kaynağa Gözat

Changes for 64-bit

Josh Yelon 17 yıl önce
ebeveyn
işleme
d71fd1d89c

+ 8 - 4
doc/makepanda/makepanda.py

@@ -12,7 +12,7 @@
 #
 #
 ########################################################################
 ########################################################################
 
 
-import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil
+import sys,os,platform,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil
 
 
 from makepandacore import *
 from makepandacore import *
 
 
@@ -477,7 +477,11 @@ def CompileIgate(woutd,wsrc,opts):
         cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
         cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
     if (COMPILER=="LINUX"):
     if (COMPILER=="LINUX"):
         cmd = "built/bin/interrogate -srcdir "+srcdir+" -I"+srcdir
         cmd = "built/bin/interrogate -srcdir "+srcdir+" -I"+srcdir
-        cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
+        cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__const=const'
+        if (platform.machine()=="x86_64"):
+            cmd = cmd + ' -D_LP64'
+        else:
+            cmd = cmd + ' -D__i386__'
     optlevel=GetOptimizeOption(opts,OPTIMIZE)
     optlevel=GetOptimizeOption(opts,OPTIMIZE)
     if (optlevel==1): cmd = cmd + ' '
     if (optlevel==1): cmd = cmd + ' '
     if (optlevel==2): cmd = cmd + ' '
     if (optlevel==2): cmd = cmd + ' '
@@ -3426,7 +3430,7 @@ Package: panda3d
 Version: VERSION
 Version: VERSION
 Section: libdevel
 Section: libdevel
 Priority: optional
 Priority: optional
-Architecture: i386
+Architecture: ARCH
 Essential: no
 Essential: no
 Depends: PYTHONV
 Depends: PYTHONV
 Provides: panda3d
 Provides: panda3d
@@ -3503,7 +3507,7 @@ def MakeInstallerLinux():
     oscmd("chmod -R 555 linuxroot/usr/share/panda3d")
     oscmd("chmod -R 555 linuxroot/usr/share/panda3d")
 
 
     if (os.path.exists("/usr/bin/dpkg-deb")):
     if (os.path.exists("/usr/bin/dpkg-deb")):
-        txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV)
+        txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH)
         oscmd("mkdir -p linuxroot/DEBIAN")
         oscmd("mkdir -p linuxroot/DEBIAN")
         oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) >  DEBIAN/md5sums")
         oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) >  DEBIAN/md5sums")
         oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
         oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")

+ 2 - 0
dtool/src/pystub/pystub.cxx

@@ -106,6 +106,7 @@ extern "C" {
   EXPCL_DTOOLCONFIG int PyUnicode_Type(...);
   EXPCL_DTOOLCONFIG int PyUnicode_Type(...);
   EXPCL_DTOOLCONFIG int Py_BuildValue(...);
   EXPCL_DTOOLCONFIG int Py_BuildValue(...);
   EXPCL_DTOOLCONFIG int Py_InitModule4(...);
   EXPCL_DTOOLCONFIG int Py_InitModule4(...);
+  EXPCL_DTOOLCONFIG int Py_InitModule4_64(...);
   EXPCL_DTOOLCONFIG int Py_InitModule4TraceRefs(...);
   EXPCL_DTOOLCONFIG int Py_InitModule4TraceRefs(...);
   EXPCL_DTOOLCONFIG int _PyObject_DebugFree(...);
   EXPCL_DTOOLCONFIG int _PyObject_DebugFree(...);
   EXPCL_DTOOLCONFIG int _PyObject_Del(...);
   EXPCL_DTOOLCONFIG int _PyObject_Del(...);
@@ -206,6 +207,7 @@ int PyUnicodeUCS4_GetSize(...) { return 0; }
 int PyUnicode_Type(...) { return 0; }
 int PyUnicode_Type(...) { return 0; }
 int Py_BuildValue(...) { return 0; }
 int Py_BuildValue(...) { return 0; }
 int Py_InitModule4(...) { return 0; }
 int Py_InitModule4(...) { return 0; }
+int Py_InitModule4_64(...) { return 0; }
 int Py_InitModule4TraceRefs(...) { return 0; };
 int Py_InitModule4TraceRefs(...) { return 0; };
 int _PyObject_DebugFree(...) { return 0; };
 int _PyObject_DebugFree(...) { return 0; };
 int _PyObject_Del(...) { return 0; };
 int _PyObject_Del(...) { return 0; };

+ 1 - 1
panda/src/movies/ffmpegAudioCursor.cxx

@@ -94,7 +94,7 @@ FfmpegAudioCursor(FfmpegAudio *src) :
   // Align the buffer to a 16-byte boundary
   // Align the buffer to a 16-byte boundary
   // The ffmpeg codec likes this, because it uses SSE/SSE2.
   // The ffmpeg codec likes this, because it uses SSE/SSE2.
   _buffer = _buffer_alloc;
   _buffer = _buffer_alloc;
-  while (((int)_buffer) & 15) {
+  while (((size_t)_buffer) & 15) {
     _buffer += 1;
     _buffer += 1;
   }
   }