Permalink
Browse files

Code changes for external python. Changes include submissions by cpts…

…piff,WiSo,blinkseb, and jcarroll

changed: limit the scope of the python includes. this will be useful in an upcomming patch. credit jcarroll
changed: use a m4 check to set the python path directly, and ditch the old hardcoded version nonsense. credit jcarroll
Fixed the build for when --enable-external-python is not used.
Fixed the warnings due to Python.h not being the first header as required by Python.
Final fix to the osx make build so that external python works. Needed to change the m4 macro to account for .dylib on osx and the dependant ./configure call to pass the installed location of the python xbmc is to be built against. Also updated .gitignore for the osx dependency builds.
There was a name collision between the python datetime.h and the xbmc/DateTime.h on file systems that are not case sensitive. This is now fixed by renaming DateTime.h to XBDateTime.h
By request, the .cpp files now sorted alphabetically in the Makefile.in.
the m4 macros is a mess of mixed spaces and tabs. In order to make my couple line change more readable I changed the spaces to tabs so it would be consistent with the surrounding area. This was per the request of jmarshall.
Fixed an error where under internal python the correct header wasn't being used.
if --enable-external-python is selected then don't build the internal python at all and not using any of the wrappers.
Modified the xcode project to work with the external python changes.
There was a bug in the Makefile.in where the internal python build target wasn't being set correctly. This is now fixed.
[WIN32] removed some uneeded files, renamed DateTime* to XBDateTime* and defined USE_EXTERNAL_PYTHON
Added xbmc/cores/DllLoader/Makefile to .gitignore since it's being autogened.
Made it so that the distinction between internal and external python is limited to mostly just Makefile's now. Most of the code no longer needs to make the distinction. This should make it much easier to move forward in windows and eventually with removing the internal python.
updated: .gitignore
  • Loading branch information...
1 parent 3b508b2 commit b768137069e3b0db7710c31b45222bfca1a0641b spiff committed with Jim Carroll Feb 24, 2011
Showing with 613 additions and 835 deletions.
  1. +4 −9 .gitignore
  2. +22 −1 Makefile.in
  3. +44 −58 XBMC.xcodeproj/project.pbxproj
  4. +17 −25 configure.in
  5. +333 −0 m4/ax_python_devel.m4
  6. +4 −5 project/VS2010Express/XBMC.vcxproj
  7. +10 −13 project/VS2010Express/XBMC.vcxproj.filters
  8. +2 −1 tools/osx/osx-depends/xbmc/Makefile
  9. +1 −1 xbmc/FileItem.h
  10. +1 −1 xbmc/GUIInfoManager.h
  11. +1 −1 xbmc/Makefile.in
  12. +1 −1 xbmc/TextureDatabase.cpp
  13. +1 −1 xbmc/{DateTime.cpp → XBDateTime.cpp}
  14. 0 xbmc/{DateTime.h → XBDateTime.h}
  15. +1 −1 xbmc/addons/AddonDatabase.cpp
  16. +1 −1 xbmc/addons/Repository.h
  17. +1 −1 xbmc/addons/Scraper.h
  18. +1 −1 xbmc/dialogs/GUIDialogSeekBar.h
  19. +1 −1 xbmc/filesystem/MythDirectory.h
  20. +1 −1 xbmc/filesystem/MythFile.cpp
  21. +1 −1 xbmc/filesystem/MythFile.h
  22. +1 −1 xbmc/filesystem/MythSession.cpp
  23. +1 −1 xbmc/guilib/GUIEditControl.cpp
  24. +0 −9 xbmc/interfaces/python/Makefile
  25. +14 −0 xbmc/interfaces/python/Makefile.in
  26. +10 −20 xbmc/interfaces/python/XBPyThread.cpp
  27. +2 −18 xbmc/interfaces/python/XBPyThread.h
  28. +9 −16 xbmc/interfaces/python/XBPython.cpp
  29. +2 −2 xbmc/interfaces/python/XBPython.h
  30. +2 −12 xbmc/interfaces/python/XBPythonDll.cpp
  31. +3 −0 xbmc/interfaces/python/XBPythonDll.h
  32. +1 −9 xbmc/interfaces/python/XBPythonDllFuncs.S
  33. +17 −16 xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp
  34. +6 −22 xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.h
  35. +10 −10 xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp
  36. +3 −3 xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.h
  37. +3 −1 xbmc/interfaces/python/xbmcmodule/{Makefile → Makefile.in}
  38. +1 −16 xbmc/interfaces/python/xbmcmodule/PythonAddon.h
  39. +1 −16 xbmc/interfaces/python/xbmcmodule/PythonPlayer.h
  40. +2 −16 xbmc/interfaces/python/xbmcmodule/action.h
  41. +2 −16 xbmc/interfaces/python/xbmcmodule/control.h
  42. +2 −16 xbmc/interfaces/python/xbmcmodule/controlbutton.cpp
  43. +2 −16 xbmc/interfaces/python/xbmcmodule/controlcheckmark.cpp
  44. +2 −16 xbmc/interfaces/python/xbmcmodule/controlfadelabel.cpp
  45. +2 −16 xbmc/interfaces/python/xbmcmodule/controlgroup.cpp
  46. +2 −16 xbmc/interfaces/python/xbmcmodule/controlimage.cpp
  47. +2 −16 xbmc/interfaces/python/xbmcmodule/controllabel.cpp
  48. +2 −16 xbmc/interfaces/python/xbmcmodule/controllist.cpp
  49. +2 −16 xbmc/interfaces/python/xbmcmodule/controlprogress.cpp
  50. +2 −16 xbmc/interfaces/python/xbmcmodule/controlradiobutton.cpp
  51. +2 −16 xbmc/interfaces/python/xbmcmodule/controlslider.cpp
  52. +2 −16 xbmc/interfaces/python/xbmcmodule/controlspin.cpp
  53. +2 −16 xbmc/interfaces/python/xbmcmodule/controltextbox.cpp
  54. +1 −16 xbmc/interfaces/python/xbmcmodule/dialog.cpp
  55. +2 −16 xbmc/interfaces/python/xbmcmodule/dialog.h
  56. +1 −16 xbmc/interfaces/python/xbmcmodule/infotagmusic.h
  57. +2 −16 xbmc/interfaces/python/xbmcmodule/infotagvideo.h
  58. +2 −16 xbmc/interfaces/python/xbmcmodule/keyboard.h
  59. +2 −16 xbmc/interfaces/python/xbmcmodule/listitem.cpp
  60. +2 −16 xbmc/interfaces/python/xbmcmodule/listitem.h
  61. +1 −1 xbmc/interfaces/python/xbmcmodule/player.cpp
  62. +2 −16 xbmc/interfaces/python/xbmcmodule/player.h
  63. +3 −15 xbmc/interfaces/python/xbmcmodule/pyplaylist.cpp
  64. +1 −16 xbmc/interfaces/python/xbmcmodule/pyplaylist.h
  65. +2 −17 xbmc/interfaces/python/xbmcmodule/pyutil.h
  66. +2 −16 xbmc/interfaces/python/xbmcmodule/window.h
  67. +2 −14 xbmc/interfaces/python/xbmcmodule/winxml.cpp
  68. +1 −16 xbmc/interfaces/python/xbmcmodule/winxml.h
  69. +4 −15 xbmc/interfaces/python/xbmcmodule/winxmldialog.cpp
  70. +1 −16 xbmc/interfaces/python/xbmcmodule/xbmcaddonmodule.cpp
  71. +3 −20 xbmc/interfaces/python/xbmcmodule/xbmcguimodule.cpp
  72. +2 −14 xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp
  73. +3 −3 xbmc/interfaces/python/xbmcmodule/xbmcplugin.cpp
  74. +2 −14 xbmc/interfaces/python/xbmcmodule/xbmcvfsmodule.cpp
  75. +1 −1 xbmc/network/WebServer.cpp
  76. +1 −1 xbmc/pictures/PictureInfoTag.cpp
  77. +1 −1 xbmc/playlists/SmartPlayList.cpp
  78. +1 −1 xbmc/utils/StringUtils.h
  79. +1 −1 xbmc/utils/TimeUtils.cpp
  80. +1 −1 xbmc/utils/Weather.cpp
  81. +1 −1 xbmc/video/VideoInfoDownloader.h
  82. +1 −1 xbmc/video/VideoInfoScanner.h
  83. +1 −1 xbmc/video/windows/GUIWindowFullScreen.cpp
  84. +1 −1 xbmc/win32/XBMC_PC.cpp
View
@@ -385,15 +385,7 @@ lib/cmyth/Makefile
/system/profiles.xml
# /system/python
-/system/python/Lib/
-/system/python/python24.zip
-/system/python/python24.dll
-/system/python/DLLs/_socket.pyd
-/system/python/DLLs/pyexpat.pyd
-/system/python/DLLs/select.pyd
-/system/python/DLLs/unicodedata.pyd
-/system/python/DLLs/zlib.pyd
-/system/python/DLLs/bz2.pyd
+/system/python/
# /system/webserver
/system/webserver
@@ -496,6 +488,7 @@ lib/cmyth/Makefile
/xbmc/cores/DllLoader/exports/build_wrapper.sh
/xbmc/cores/DllLoader/exports/wrapper.def
/xbmc/cores/DllLoader/Makefile
+
/xbmc/cores/Makefile
/xbmc/cores/VideoRenderers/Makefile
@@ -1029,6 +1022,8 @@ lib/cmyth/Makefile
# /xbmc/interfaces/
/xbmc/interfaces/Makefile
+/xbmc/interfaces/python/Makefile
+/xbmc/interfaces/python/xbmcmodule/Makefile
/xbmc/interfaces/python/linux/Makefile
/xbmc/interfaces/python/linux/wrapper_python.def
View
@@ -120,11 +120,14 @@ LIB_DIRS=\
lib/libhdhomerun \
lib/libid3tag \
lib/libapetag \
- xbmc/interfaces/python/linux \
lib/cpluff \
lib/xbmc-dll-symbols \
lib/jsoncpp/src/lib_json
+ifneq (@USE_EXTERNAL_PYTHON@,1)
+LIB_DIRS+=xbmc/interfaces/python/linux
+endif
+
SS_DIRS=\
xbmc/screensavers/rsxs-0.9/xbmc
@@ -168,6 +171,12 @@ DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
lib/python/libpython2.4.so.1.0 \
system/libcpluff-@ARCH@.so
+ifneq (@USE_EXTERNAL_PYTHON@,1)
+ PYTHON_TARGET=python
+else
+ PYTHON_TARGET=
+endif
+
all : Makefile externals xbmc.bin xbmc-xrandr skins
include Makefile.include
@@ -407,8 +416,10 @@ endif
libpython: dllloader
$(MAKE) -C xbmc/interfaces/python
$(MAKE) -C xbmc/interfaces/python/xbmcmodule
+ifneq (@USE_EXTERNAL_PYTHON@,1)
python: dllloader
$(MAKE) -C xbmc/interfaces/python/linux
+endif
dvdpcodecs: dllloader
$(MAKE) -C lib
$(MAKE) -C lib/libdvd
@@ -453,6 +464,12 @@ codecs: papcodecs dvdpcodecs
libs: cmyth libhdhomerun libid3tag imagelib libexif python system/libcpluff-@ARCH@.so
externals: codecs libs python visualizations screensavers
+ifeq ($(findstring osx,@ARCH@), osx)
+libs: libhdhomerun libid3tag imagelib libexif $(PYTHON_TARGET) system/libcpluff-@ARCH@.so system/players/paplayer/libmodplug-@ARCH@.so
+else
+libs: libhdhomerun libid3tag imagelib libexif $(PYTHON_TARGET) system/libcpluff-@ARCH@.so
+endif
+
xcode_depends: \
codecs libs python visualizations screensavers eventclients skins \
lib/libsquish/libsquish.a \
@@ -579,6 +596,10 @@ ifeq ($(findstring arm,@ARCH@), arm)
LIBS +=-lpython2.6
endif
+ifeq (@USE_EXTERNAL_PYTHON@,1)
+LIBS += @PYTHON_LDFLAGS@
+endif
+
xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC)
ifeq ($(findstring osx,@ARCH@), osx)
$(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
Oops, something went wrong.

0 comments on commit b768137

Please sign in to comment.