/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
/xbmc/cores/DllLoader/exports/build_wrapper.sh
/xbmc/cores/DllLoader/exports/wrapper.def
/xbmc/cores/DllLoader/Makefile
+
/xbmc/cores/Makefile
/xbmc/cores/VideoRenderers/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
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
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
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
$(MAKE) -C lib/cximage-6.0
codecs: papcodecs dvdpcodecs
-libs: cmyth libhdhomerun libid3tag imagelib libexif python system/libcpluff-@ARCH@.so
-externals: codecs libs python visualizations screensavers
+libs: cmyth libhdhomerun libid3tag imagelib libexif $(PYTHON_TARGET) system/libcpluff-@ARCH@.so
+externals: codecs libs $(PYTHON_TARGET) visualizations screensavers
xcode_depends: \
- codecs libs python visualizations screensavers eventclients skins \
+ codecs libs $(PYTHON_TARGET) visualizations screensavers eventclients skins \
lib/libsquish/libsquish.a \
lib/libapetag/.libs/libapetag.a \
lib/libRTV/librtv.a \
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
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
- 183C454D130C4D55006AA317 /* xbmcvfsmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 189047D11301DEAB00C11012 /* xbmcvfsmodule.cpp */; };
+ 183C454D130C4D55006AA317 /* xbmcvfsmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 189047D11301DEAB00C11012 /* xbmcvfsmodule.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
183FDF8A11AF0B0500B81E9C /* PluginSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 183FDF8811AF0B0500B81E9C /* PluginSource.cpp */; };
183FDF8B11AF0B0500B81E9C /* PluginSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 183FDF8811AF0B0500B81E9C /* PluginSource.cpp */; };
184C472F1296BC6E0006DB3E /* Service.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 184C472D1296BC6E0006DB3E /* Service.cpp */; };
18C1D22E13033F6A00CFFE59 /* GLUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18C1D22B13033F6A00CFFE59 /* GLUtils.cpp */; };
18CCEAEE1112F5B800615FC6 /* PCMRemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18CCEAEC1112F5B800615FC6 /* PCMRemap.cpp */; };
18CCEAEF1112F5B800615FC6 /* PCMRemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18CCEAEC1112F5B800615FC6 /* PCMRemap.cpp */; };
+ 384718D81325BA04000486D6 /* XBDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 384718D61325BA04000486D6 /* XBDateTime.cpp */; };
431AE5D9109C1A63007428C3 /* OverlayRendererUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431AE5D7109C1A63007428C3 /* OverlayRendererUtil.cpp */; };
431AE5DA109C1A63007428C3 /* OverlayRendererUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431AE5D7109C1A63007428C3 /* OverlayRendererUtil.cpp */; };
43248C4E0FBE224000B88866 /* LockFree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83A72B950FBC8E3B00171871 /* LockFree.cpp */; };
7CD2C3AB11940B270009EFC1 /* DirectoryNodeCountry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2C3A811940B270009EFC1 /* DirectoryNodeCountry.cpp */; };
7CD2CD0111B38B000009EFC1 /* PythonAddon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CCFE11B38B000009EFC1 /* PythonAddon.cpp */; };
7CD2CD0211B38B000009EFC1 /* xbmcaddonmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CD0011B38B000009EFC1 /* xbmcaddonmodule.cpp */; };
- 7CD2CD0311B38B000009EFC1 /* PythonAddon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CCFE11B38B000009EFC1 /* PythonAddon.cpp */; };
- 7CD2CD0411B38B000009EFC1 /* xbmcaddonmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CD0011B38B000009EFC1 /* xbmcaddonmodule.cpp */; };
+ 7CD2CD0311B38B000009EFC1 /* PythonAddon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CCFE11B38B000009EFC1 /* PythonAddon.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ 7CD2CD0411B38B000009EFC1 /* xbmcaddonmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CD0011B38B000009EFC1 /* xbmcaddonmodule.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
7CDAE9050FFCA3520040B25F /* DVDTSCorrection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAE9030FFCA3520040B25F /* DVDTSCorrection.cpp */; };
7CDAE9060FFCA3520040B25F /* DVDTSCorrection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAE9030FFCA3520040B25F /* DVDTSCorrection.cpp */; };
7CDAEA7D1001CD6E0040B25F /* karaokelyricstextustar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAEA7B1001CD6E0040B25F /* karaokelyricstextustar.cpp */; };
889B4D8E0E0EF86C00FAD25E /* RSSDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 889B4D8C0E0EF86C00FAD25E /* RSSDirectory.cpp */; };
88ACB01B0DCF40800083CFDF /* ASAPFileDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB0190DCF40800083CFDF /* ASAPFileDirectory.cpp */; };
88ACB01F0DCF409E0083CFDF /* ASAPCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */; };
- 88D9FF600DD264B500EDA56F /* XBPythonDllFuncs.S in Sources */ = {isa = PBXBuildFile; fileRef = 88D9FF5F0DD264B500EDA56F /* XBPythonDllFuncs.S */; };
88ECB6590DE013C4003396A7 /* DiskArbitration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88ECB6580DE013C4003396A7 /* DiskArbitration.framework */; };
8DD76F790486A8DE00D96B5E /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */; };
- C80425711158A0DE00D158A6 /* controlslider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C80425701158A0DE00D158A6 /* controlslider.cpp */; };
+ C80425711158A0DE00D158A6 /* controlslider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C80425701158A0DE00D158A6 /* controlslider.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
C80425721158A0DE00D158A6 /* controlslider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C80425701158A0DE00D158A6 /* controlslider.cpp */; };
C84BF7341349BB74006D6FC9 /* JSONServiceDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C84BF7321349BB74006D6FC9 /* JSONServiceDescription.cpp */; };
C85EB75C1174614E0008E5A5 /* Repository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C85EB75A1174614E0008E5A5 /* Repository.cpp */; };
E33206380D5070AA00435CE3 /* DVDDemuxVobsub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E33206370D5070AA00435CE3 /* DVDDemuxVobsub.cpp */; };
E33466A60D2E5103005A65EC /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E33466A50D2E5103005A65EC /* IOKit.framework */; };
E33979960D62FD48004ECDDA /* DVDInputStreamTV.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E33979940D62FD47004ECDDA /* DVDInputStreamTV.cpp */; };
- E354EF040D99EDC900B55311 /* controlradiobutton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E354EF030D99EDC900B55311 /* controlradiobutton.cpp */; };
+ E354EF040D99EDC900B55311 /* controlradiobutton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E354EF030D99EDC900B55311 /* controlradiobutton.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
E35EF2550D380C3D00DB5CD5 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E35EF2540D380C3D00DB5CD5 /* QuickTime.framework */; };
E35EF3240D380E1E00DB5CD5 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E35EF3230D380E1E00DB5CD5 /* Carbon.framework */; };
E36578880D3AA7B40033CC1C /* DVDPlayerCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E36578860D3AA7B40033CC1C /* DVDPlayerCodec.cpp */; };
E38E1FF10D25F9FD00618676 /* YUV2RGBShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16710D25F9FA00618676 /* YUV2RGBShader.cpp */; };
E38E1FF70D25F9FD00618676 /* CueDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E167E0D25F9FA00618676 /* CueDocument.cpp */; };
E38E1FF80D25F9FD00618676 /* Database.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16800D25F9FA00618676 /* Database.cpp */; };
- E38E1FF90D25F9FD00618676 /* DateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16820D25F9FA00618676 /* DateTime.cpp */; };
E38E1FFA0D25F9FD00618676 /* DetectDVDType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16840D25F9FA00618676 /* DetectDVDType.cpp */; };
E38E1FFB0D25F9FD00618676 /* DNSNameCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16890D25F9FA00618676 /* DNSNameCache.cpp */; };
E38E1FFC0D25F9FD00618676 /* DynamicDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E168C0D25F9FA00618676 /* DynamicDll.cpp */; };
E38E20D60D25F9FD00618676 /* LangCodeExpander.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E18560D25F9FA00618676 /* LangCodeExpander.cpp */; };
E38E20D70D25F9FD00618676 /* LangInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E18580D25F9FA00618676 /* LangInfo.cpp */; };
E38E20D80D25F9FD00618676 /* LastFmManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E185A0D25F9FA00618676 /* LastFmManager.cpp */; };
- E38E21600D25F9FD00618676 /* XBPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A0D0D25F9FB00618676 /* XBPython.cpp */; };
- E38E21610D25F9FD00618676 /* XBPythonDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A0F0D25F9FB00618676 /* XBPythonDll.cpp */; };
- E38E21620D25F9FD00618676 /* XBPyThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A110D25F9FB00618676 /* XBPyThread.cpp */; };
+ E38E21600D25F9FD00618676 /* XBPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A0D0D25F9FB00618676 /* XBPython.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E21620D25F9FD00618676 /* XBPyThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A110D25F9FB00618676 /* XBPyThread.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
E38E21670D25F9FD00618676 /* scrobbler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A250D25F9FB00618676 /* scrobbler.cpp */; };
E38E21740D25F9FD00618676 /* MediaCrawler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1ABD0D25F9FB00618676 /* MediaCrawler.cpp */; };
E38E21760D25F9FD00618676 /* PltMicroMediaController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1AC20D25F9FB00618676 /* PltMicroMediaController.cpp */; };
E38E256D0D263A1C00618676 /* librtv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E38E256C0D263A1C00618676 /* librtv.a */; };
E38E25780D263BF600618676 /* unpack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25770D263BF600618676 /* unpack.cpp */; };
E38E257C0D263C4400618676 /* rar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E257B0D263C4400618676 /* rar.cpp */; };
- E38E259D0D263CE000618676 /* action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E257E0D263CE000618676 /* action.cpp */; };
- E38E259E0D263CE000618676 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E257F0D263CE000618676 /* control.cpp */; };
- E38E259F0D263CE000618676 /* controlbutton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25800D263CE000618676 /* controlbutton.cpp */; };
- E38E25A00D263CE000618676 /* controlcheckmark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25810D263CE000618676 /* controlcheckmark.cpp */; };
- E38E25A10D263CE000618676 /* controlfadelabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25820D263CE000618676 /* controlfadelabel.cpp */; };
- E38E25A20D263CE000618676 /* controlgroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25830D263CE000618676 /* controlgroup.cpp */; };
- E38E25A30D263CE000618676 /* controlimage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25840D263CE000618676 /* controlimage.cpp */; };
- E38E25A40D263CE000618676 /* controllabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25850D263CE000618676 /* controllabel.cpp */; };
- E38E25A50D263CE000618676 /* controllist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25860D263CE000618676 /* controllist.cpp */; };
- E38E25A60D263CE000618676 /* controlprogress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25870D263CE000618676 /* controlprogress.cpp */; };
- E38E25A70D263CE000618676 /* controlspin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25880D263CE000618676 /* controlspin.cpp */; };
- E38E25A80D263CE000618676 /* controltextbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25890D263CE000618676 /* controltextbox.cpp */; };
- E38E25A90D263CE000618676 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258A0D263CE000618676 /* dialog.cpp */; };
- E38E25AA0D263CE000618676 /* GUIPythonWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258B0D263CE000618676 /* GUIPythonWindow.cpp */; };
- E38E25AB0D263CE000618676 /* GUIPythonWindowDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258C0D263CE000618676 /* GUIPythonWindowDialog.cpp */; };
- E38E25AC0D263CE000618676 /* GUIPythonWindowXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258D0D263CE000618676 /* GUIPythonWindowXML.cpp */; };
- E38E25AD0D263CE000618676 /* GUIPythonWindowXMLDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258E0D263CE000618676 /* GUIPythonWindowXMLDialog.cpp */; };
- E38E25AE0D263CE000618676 /* infotagmusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258F0D263CE000618676 /* infotagmusic.cpp */; };
- E38E25AF0D263CE000618676 /* infotagvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25900D263CE000618676 /* infotagvideo.cpp */; };
- E38E25B00D263CE000618676 /* keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25910D263CE000618676 /* keyboard.cpp */; };
- E38E25B10D263CE000618676 /* listitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25920D263CE000618676 /* listitem.cpp */; };
- E38E25B20D263CE000618676 /* player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25930D263CE000618676 /* player.cpp */; };
- E38E25B30D263CE000618676 /* pyplaylist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25940D263CE000618676 /* pyplaylist.cpp */; };
- E38E25B40D263CE000618676 /* PythonPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25950D263CE000618676 /* PythonPlayer.cpp */; };
- E38E25B50D263CE000618676 /* pyutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25960D263CE000618676 /* pyutil.cpp */; };
- E38E25B60D263CE000618676 /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25970D263CE000618676 /* window.cpp */; };
- E38E25B70D263CE000618676 /* winxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25980D263CE000618676 /* winxml.cpp */; };
- E38E25B80D263CE000618676 /* winxmldialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25990D263CE000618676 /* winxmldialog.cpp */; };
- E38E25B90D263CE000618676 /* xbmcguimodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259A0D263CE000618676 /* xbmcguimodule.cpp */; };
- E38E25BA0D263CE000618676 /* xbmcmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259B0D263CE000618676 /* xbmcmodule.cpp */; };
- E38E25BB0D263CE000618676 /* xbmcplugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259C0D263CE000618676 /* xbmcplugin.cpp */; };
+ E38E259D0D263CE000618676 /* action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E257E0D263CE000618676 /* action.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E259E0D263CE000618676 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E257F0D263CE000618676 /* control.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E259F0D263CE000618676 /* controlbutton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25800D263CE000618676 /* controlbutton.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A00D263CE000618676 /* controlcheckmark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25810D263CE000618676 /* controlcheckmark.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A10D263CE000618676 /* controlfadelabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25820D263CE000618676 /* controlfadelabel.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A20D263CE000618676 /* controlgroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25830D263CE000618676 /* controlgroup.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A30D263CE000618676 /* controlimage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25840D263CE000618676 /* controlimage.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A40D263CE000618676 /* controllabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25850D263CE000618676 /* controllabel.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A50D263CE000618676 /* controllist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25860D263CE000618676 /* controllist.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A60D263CE000618676 /* controlprogress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25870D263CE000618676 /* controlprogress.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A70D263CE000618676 /* controlspin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25880D263CE000618676 /* controlspin.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A80D263CE000618676 /* controltextbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25890D263CE000618676 /* controltextbox.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25A90D263CE000618676 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258A0D263CE000618676 /* dialog.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AA0D263CE000618676 /* GUIPythonWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258B0D263CE000618676 /* GUIPythonWindow.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AB0D263CE000618676 /* GUIPythonWindowDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258C0D263CE000618676 /* GUIPythonWindowDialog.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AC0D263CE000618676 /* GUIPythonWindowXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258D0D263CE000618676 /* GUIPythonWindowXML.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AD0D263CE000618676 /* GUIPythonWindowXMLDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258E0D263CE000618676 /* GUIPythonWindowXMLDialog.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AE0D263CE000618676 /* infotagmusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E258F0D263CE000618676 /* infotagmusic.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25AF0D263CE000618676 /* infotagvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25900D263CE000618676 /* infotagvideo.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B00D263CE000618676 /* keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25910D263CE000618676 /* keyboard.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B10D263CE000618676 /* listitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25920D263CE000618676 /* listitem.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B20D263CE000618676 /* player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25930D263CE000618676 /* player.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B30D263CE000618676 /* pyplaylist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25940D263CE000618676 /* pyplaylist.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B40D263CE000618676 /* PythonPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25950D263CE000618676 /* PythonPlayer.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B50D263CE000618676 /* pyutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25960D263CE000618676 /* pyutil.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B60D263CE000618676 /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25970D263CE000618676 /* window.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B70D263CE000618676 /* winxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25980D263CE000618676 /* winxml.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B80D263CE000618676 /* winxmldialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25990D263CE000618676 /* winxmldialog.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25B90D263CE000618676 /* xbmcguimodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259A0D263CE000618676 /* xbmcguimodule.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25BA0D263CE000618676 /* xbmcmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259B0D263CE000618676 /* xbmcmodule.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
+ E38E25BB0D263CE000618676 /* xbmcplugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E259C0D263CE000618676 /* xbmcplugin.cpp */; settings = {COMPILER_FLAGS = "-I$XBMC_DEPENDS/include/python2.6"; }; };
E38E25C00D263DC100618676 /* DVDFactoryDemuxer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25BF0D263DC100618676 /* DVDFactoryDemuxer.cpp */; };
E38E25C30D263DE200618676 /* DVDDemuxFFmpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E25C20D263DE200618676 /* DVDDemuxFFmpeg.cpp */; };
E38F12C20D29FF200035C331 /* FileShoutcast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38F12C10D29FF200035C331 /* FileShoutcast.cpp */; };
F5A1C9370F6B06CF00A96ABD /* YUV2RGBShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16710D25F9FA00618676 /* YUV2RGBShader.cpp */; };
F5A1C9390F6B06CF00A96ABD /* CueDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E167E0D25F9FA00618676 /* CueDocument.cpp */; };
F5A1C93A0F6B06CF00A96ABD /* Database.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16800D25F9FA00618676 /* Database.cpp */; };
- F5A1C93B0F6B06CF00A96ABD /* DateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16820D25F9FA00618676 /* DateTime.cpp */; };
F5A1C93C0F6B06CF00A96ABD /* DetectDVDType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16840D25F9FA00618676 /* DetectDVDType.cpp */; };
F5A1C93D0F6B06CF00A96ABD /* DNSNameCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16890D25F9FA00618676 /* DNSNameCache.cpp */; };
F5A1C93E0F6B06CF00A96ABD /* DynamicDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E168C0D25F9FA00618676 /* DynamicDll.cpp */; };
F5A1C9FA0F6B06CF00A96ABD /* LangInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E18580D25F9FA00618676 /* LangInfo.cpp */; };
F5A1C9FB0F6B06CF00A96ABD /* LastFmManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E185A0D25F9FA00618676 /* LastFmManager.cpp */; };
F5A1CA010F6B06CF00A96ABD /* XBPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A0D0D25F9FB00618676 /* XBPython.cpp */; };
- F5A1CA020F6B06CF00A96ABD /* XBPythonDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A0F0D25F9FB00618676 /* XBPythonDll.cpp */; };
F5A1CA030F6B06CF00A96ABD /* XBPyThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A110D25F9FB00618676 /* XBPyThread.cpp */; };
F5A1CA040F6B06CF00A96ABD /* scrobbler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1A250D25F9FB00618676 /* scrobbler.cpp */; };
F5A1CA050F6B06CF00A96ABD /* MediaCrawler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1ABD0D25F9FB00618676 /* MediaCrawler.cpp */; };
F5A1CB520F6B06CF00A96ABD /* MusicFileDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 880DBE530DC224A100E26B71 /* MusicFileDirectory.cpp */; };
F5A1CB530F6B06CF00A96ABD /* ASAPFileDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB0190DCF40800083CFDF /* ASAPFileDirectory.cpp */; };
F5A1CB540F6B06CF00A96ABD /* ASAPCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */; };
- F5A1CB560F6B06CF00A96ABD /* XBPythonDllFuncs.S in Sources */ = {isa = PBXBuildFile; fileRef = 88D9FF5F0DD264B500EDA56F /* XBPythonDllFuncs.S */; };
F5A1CB570F6B06CF00A96ABD /* DVDOverlayCodecSSA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8883CE9E0DD817D1004E8B72 /* DVDOverlayCodecSSA.cpp */; };
F5A1CB580F6B06CF00A96ABD /* DVDSubtitleParserSSA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8883CEA30DD81807004E8B72 /* DVDSubtitleParserSSA.cpp */; };
F5A1CB590F6B06CF00A96ABD /* DVDSubtitlesLibass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8883CEA50DD81807004E8B72 /* DVDSubtitlesLibass.cpp */; };
18C1D22C13033F6A00CFFE59 /* GLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLUtils.h; sourceTree = "<group>"; };
18CCEAEC1112F5B800615FC6 /* PCMRemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PCMRemap.cpp; sourceTree = "<group>"; };
18CCEAED1112F5B800615FC6 /* PCMRemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCMRemap.h; sourceTree = "<group>"; };
+ 384718D61325BA04000486D6 /* XBDateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBDateTime.cpp; sourceTree = "<group>"; };
+ 384718D71325BA04000486D6 /* XBDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBDateTime.h; sourceTree = "<group>"; };
38B2BBD013131B4A00F83309 /* GlobalsHandling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalsHandling.h; sourceTree = "<group>"; };
430C881312D64A730098821A /* IPowerSyscall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPowerSyscall.h; sourceTree = "<group>"; };
431376FF12D6455C00680C15 /* GUIDialogCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogCache.h; sourceTree = "<group>"; };
88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASAPCodec.cpp; sourceTree = "<group>"; };
88ACB01D0DCF409E0083CFDF /* ASAPCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASAPCodec.h; sourceTree = "<group>"; };
88ACB01E0DCF409E0083CFDF /* DllASAP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllASAP.h; sourceTree = "<group>"; };
- 88D9FF5F0DD264B500EDA56F /* XBPythonDllFuncs.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = XBPythonDllFuncs.S; sourceTree = "<group>"; };
88ECB6580DE013C4003396A7 /* DiskArbitration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiskArbitration.framework; path = /System/Library/Frameworks/DiskArbitration.framework; sourceTree = "<absolute>"; };
8DD76F7E0486A8DE00D96B5E /* XBMC */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = XBMC; sourceTree = BUILT_PRODUCTS_DIR; };
C80425701158A0DE00D158A6 /* controlslider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = controlslider.cpp; sourceTree = "<group>"; };
E38E167F0D25F9FA00618676 /* CueDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CueDocument.h; sourceTree = "<group>"; };
E38E16800D25F9FA00618676 /* Database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Database.cpp; sourceTree = "<group>"; };
E38E16810D25F9FA00618676 /* Database.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Database.h; sourceTree = "<group>"; };
- E38E16820D25F9FA00618676 /* DateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateTime.cpp; sourceTree = "<group>"; };
- E38E16830D25F9FA00618676 /* DateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateTime.h; sourceTree = "<group>"; };
E38E16840D25F9FA00618676 /* DetectDVDType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetectDVDType.cpp; sourceTree = "<group>"; };
E38E16850D25F9FA00618676 /* DetectDVDType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetectDVDType.h; sourceTree = "<group>"; };
E38E16860D25F9FA00618676 /* DllImageLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllImageLib.h; sourceTree = "<group>"; };
E38E1A080D25F9FB00618676 /* winxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winxml.h; sourceTree = "<group>"; };
E38E1A0D0D25F9FB00618676 /* XBPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBPython.cpp; sourceTree = "<group>"; };
E38E1A0E0D25F9FB00618676 /* XBPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBPython.h; sourceTree = "<group>"; };
- E38E1A0F0D25F9FB00618676 /* XBPythonDll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBPythonDll.cpp; sourceTree = "<group>"; };
E38E1A100D25F9FB00618676 /* XBPythonDll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBPythonDll.h; sourceTree = "<group>"; };
E38E1A110D25F9FB00618676 /* XBPyThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBPyThread.cpp; sourceTree = "<group>"; };
E38E1A120D25F9FB00618676 /* XBPyThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBPyThread.h; sourceTree = "<group>"; };
E38E14730D25F9F900618676 /* BackgroundInfoLoader.h */,
E38E167E0D25F9FA00618676 /* CueDocument.cpp */,
E38E167F0D25F9FA00618676 /* CueDocument.h */,
- E38E16820D25F9FA00618676 /* DateTime.cpp */,
- E38E16830D25F9FA00618676 /* DateTime.h */,
E38E168C0D25F9FA00618676 /* DynamicDll.cpp */,
E38E168D0D25F9FA00618676 /* DynamicDll.h */,
E38E16900D25F9FA00618676 /* Favourites.cpp */,
E38E1E9A0D25F9FD00618676 /* ViewDatabase.h */,
E38E1EA70D25F9FD00618676 /* XBApplicationEx.cpp */,
E38E1EA80D25F9FD00618676 /* XBApplicationEx.h */,
+ 384718D61325BA04000486D6 /* XBDateTime.cpp */,
+ 384718D71325BA04000486D6 /* XBDateTime.h */,
E38E1ED10D25F9FD00618676 /* xbmc.cpp */,
);
path = xbmc;
E38E19820D25F9FB00618676 /* python */ = {
isa = PBXGroup;
children = (
- 88D9FF5F0DD264B500EDA56F /* XBPythonDllFuncs.S */,
E38E19DA0D25F9FB00618676 /* xbmcmodule */,
E38E1A0D0D25F9FB00618676 /* XBPython.cpp */,
E38E1A0E0D25F9FB00618676 /* XBPython.h */,
- E38E1A0F0D25F9FB00618676 /* XBPythonDll.cpp */,
E38E1A100D25F9FB00618676 /* XBPythonDll.h */,
E38E1A110D25F9FB00618676 /* XBPyThread.cpp */,
E38E1A120D25F9FB00618676 /* XBPyThread.h */,
E38E1FF10D25F9FD00618676 /* YUV2RGBShader.cpp in Sources */,
E38E1FF70D25F9FD00618676 /* CueDocument.cpp in Sources */,
E38E1FF80D25F9FD00618676 /* Database.cpp in Sources */,
- E38E1FF90D25F9FD00618676 /* DateTime.cpp in Sources */,
E38E1FFA0D25F9FD00618676 /* DetectDVDType.cpp in Sources */,
E38E1FFB0D25F9FD00618676 /* DNSNameCache.cpp in Sources */,
E38E1FFC0D25F9FD00618676 /* DynamicDll.cpp in Sources */,
E38E20D70D25F9FD00618676 /* LangInfo.cpp in Sources */,
E38E20D80D25F9FD00618676 /* LastFmManager.cpp in Sources */,
E38E21600D25F9FD00618676 /* XBPython.cpp in Sources */,
- E38E21610D25F9FD00618676 /* XBPythonDll.cpp in Sources */,
E38E21620D25F9FD00618676 /* XBPyThread.cpp in Sources */,
E38E21670D25F9FD00618676 /* scrobbler.cpp in Sources */,
E38E21740D25F9FD00618676 /* MediaCrawler.cpp in Sources */,
880DBE550DC224A100E26B71 /* MusicFileDirectory.cpp in Sources */,
88ACB01B0DCF40800083CFDF /* ASAPFileDirectory.cpp in Sources */,
88ACB01F0DCF409E0083CFDF /* ASAPCodec.cpp in Sources */,
- 88D9FF600DD264B500EDA56F /* XBPythonDllFuncs.S in Sources */,
8883CEA10DD817D1004E8B72 /* DVDOverlayCodecSSA.cpp in Sources */,
8883CEA70DD81807004E8B72 /* DVDSubtitleParserSSA.cpp in Sources */,
8883CEA80DD81807004E8B72 /* DVDSubtitlesLibass.cpp in Sources */,
F5AE40A713415D9E0004BD79 /* VideoLibrary.cpp in Sources */,
F5AE40A813415D9E0004BD79 /* XBMCOperations.cpp in Sources */,
C84BF7341349BB74006D6FC9 /* JSONServiceDescription.cpp in Sources */,
+ 384718D81325BA04000486D6 /* XBDateTime.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F5A1C9370F6B06CF00A96ABD /* YUV2RGBShader.cpp in Sources */,
F5A1C9390F6B06CF00A96ABD /* CueDocument.cpp in Sources */,
F5A1C93A0F6B06CF00A96ABD /* Database.cpp in Sources */,
- F5A1C93B0F6B06CF00A96ABD /* DateTime.cpp in Sources */,
F5A1C93C0F6B06CF00A96ABD /* DetectDVDType.cpp in Sources */,
F5A1C93D0F6B06CF00A96ABD /* DNSNameCache.cpp in Sources */,
F5A1C93E0F6B06CF00A96ABD /* DynamicDll.cpp in Sources */,
F5A1C9FA0F6B06CF00A96ABD /* LangInfo.cpp in Sources */,
F5A1C9FB0F6B06CF00A96ABD /* LastFmManager.cpp in Sources */,
F5A1CA010F6B06CF00A96ABD /* XBPython.cpp in Sources */,
- F5A1CA020F6B06CF00A96ABD /* XBPythonDll.cpp in Sources */,
F5A1CA030F6B06CF00A96ABD /* XBPyThread.cpp in Sources */,
F5A1CA040F6B06CF00A96ABD /* scrobbler.cpp in Sources */,
F5A1CA050F6B06CF00A96ABD /* MediaCrawler.cpp in Sources */,
F5A1CB520F6B06CF00A96ABD /* MusicFileDirectory.cpp in Sources */,
F5A1CB530F6B06CF00A96ABD /* ASAPFileDirectory.cpp in Sources */,
F5A1CB540F6B06CF00A96ABD /* ASAPCodec.cpp in Sources */,
- F5A1CB560F6B06CF00A96ABD /* XBPythonDllFuncs.S in Sources */,
F5A1CB570F6B06CF00A96ABD /* DVDOverlayCodecSSA.cpp in Sources */,
F5A1CB580F6B06CF00A96ABD /* DVDSubtitleParserSSA.cpp in Sources */,
F5A1CB590F6B06CF00A96ABD /* DVDSubtitlesLibass.cpp in Sources */,
AC_INIT([xbmc], [9.11], [http://trac.xbmc.org])
AC_CONFIG_HEADERS([xbmc/config.h])
AH_TOP([#pragma once])
+m4_include([m4/ax_python_devel.m4])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign])
# External Python
if test "$use_external_python" = "yes"; then
- AC_CHECK_LIB([python2.6], [main],
- [AC_DEFINE([HAVE_LIBPYTHON2_6], [1],
- [Define to 1 if you have the 'python2.6' library.])
- USE_PYTHON2_6=1],
- [AC_CHECK_LIB([python2.5], [main],
- [AC_DEFINE([HAVE_LIBPYTHON2_5], [1],
- [Define to 1 if you have the 'python2.5' library.])
- USE_PYTHON2_5=1],
- [AC_CHECK_LIB([python2.4], [main],
- [AC_DEFINE([HAVE_LIBPYTHON2_4], [1],
- [Define to 1 if you have the 'python2.4' library.])
- USE_PYTHON2_4=1],
- [AC_MSG_ERROR($missing_library)] )] )] )
-
- AC_MSG_NOTICE($external_python_enabled)
- test "$USE_PYTHON2_6" && AC_MSG_NOTICE([Using Python 2.6])
- test "$USE_PYTHON2_5" && AC_MSG_NOTICE([Using Python 2.5])
- test "$USE_PYTHON2_4" && AC_MSG_NOTICE([Using Python 2.4])
- USE_EXTERNAL_PYTHON=1
- AC_DEFINE([USE_EXTERNAL_PYTHON], [1], [Whether to use external python library.])
+ AX_PYTHON_DEVEL([>= 2.4])
+ PYTHON_VERSION=$ac_python_version
+
+ if test -z "$PYTHON_VERSION"; then
+ AC_MSG_NOTICE($external_python_disabled)
+ USE_EXTERNAL_PYTHON=0
+ else
+ AC_MSG_NOTICE($external_python_enabled)
+ AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
+ USE_EXTERNAL_PYTHON=1
+ AC_DEFINE([USE_EXTERNAL_PYTHON], [1], [Whether to use external python library.])
+ fi
else
- AC_MSG_NOTICE($external_python_disabled)
USE_EXTERNAL_PYTHON=0
+ PYTHON_CPPFLAGS="-I\$(abs_top_srcdir)/lib/python/Include"
fi
# VDPAU
lib/libsquish/Makefile \
lib/libid3tag/Makefile \
lib/cximage-6.0/Makefile \
- xbmc/interfaces/python/linux/Makefile \
+ xbmc/interfaces/python/Makefile \
+ xbmc/interfaces/python/xbmcmodule/Makefile \
lib/libUPnP/Makefile \
xbmc/DllPaths_generated.h \
xbmc/linux/Makefile \
AC_SUBST(BUILD_GOOM)
AC_SUBST(USE_EXTERNAL_FFMPEG)
AC_SUBST(USE_EXTERNAL_PYTHON)
-AC_SUBST(USE_PYTHON2_6)
-AC_SUBST(USE_PYTHON2_5)
-AC_SUBST(USE_PYTHON2_4)
+AC_SUBST(PYTHON_VERSION)
AC_SUBST(OUTPUT_FILES)
AC_SUBST(HAVE_XBMC_NONFREE)
AC_SUBST(USE_ASAP_CODEC)
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PYTHON_DEVEL([version])
+#
+# DESCRIPTION
+#
+# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
+# in your configure.ac.
+#
+# This macro checks for Python and tries to get the include path to
+# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
+# output variables. It also exports $(PYTHON_EXTRA_LIBS) and
+# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
+#
+# You can search for some particular version of Python by passing a
+# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
+# note that you *have* to pass also an operator along with the version to
+# match, and pay special attention to the single quotes surrounding the
+# version number. Don't use "PYTHON_VERSION" for this: that environment
+# variable is declared as precious and thus reserved for the end-user.
+#
+# This macro should work for all versions of Python >= 2.1.0. As an end
+# user, you can disable the check for the python version by setting the
+# PYTHON_NOVERSIONCHECK environment variable to something else than the
+# empty string.
+#
+# If you need to use this macro for an older Python version, please
+# contact the authors. We're always open for feedback.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
+# Copyright (c) 2009 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
+# Copyright (c) 2009 Andrew Collier <colliera@ukzn.ac.za>
+# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
+# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 8
+
+AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
+AC_DEFUN([AX_PYTHON_DEVEL],[
+ #
+ # Allow the use of a (user set) custom python version
+ #
+ AC_ARG_VAR([PYTHON_VERSION],[The installed Python
+ version to use, for example '2.3'. This string
+ will be appended to the Python interpreter
+ canonical name.])
+
+ AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
+ if test -z "$PYTHON"; then
+ AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
+ PYTHON_VERSION=""
+ fi
+
+ #
+ # Check for a version of Python >= 2.1.0
+ #
+ AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
+ ac_supports_python_ver=`$PYTHON -c "import sys; \
+ ver = sys.version.split ()[[0]]; \
+ print (ver >= '2.1.0')"`
+ if test "$ac_supports_python_ver" != "True"; then
+ if test -z "$PYTHON_NOVERSIONCHECK"; then
+ AC_MSG_RESULT([no])
+ AC_MSG_FAILURE([
+This version of the AC@&t@_PYTHON_DEVEL macro
+doesn't work properly with versions of Python before
+2.1.0. You may need to re-run configure, setting the
+variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
+PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
+Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
+to something else than an empty string.
+])
+ else
+ AC_MSG_RESULT([skip at user request])
+ fi
+ else
+ AC_MSG_RESULT([yes])
+ fi
+
+ #
+ # if the macro parameter ``version'' is set, honour it
+ #
+ if test -n "$1"; then
+ AC_MSG_CHECKING([for a version of Python $1])
+ ac_supports_python_ver=`$PYTHON -c "import sys; \
+ ver = sys.version.split ()[[0]]; \
+ print (ver $1)"`
+ if test "$ac_supports_python_ver" = "True"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([this package requires Python $1.
+If you have it installed, but it isn't the default Python
+interpreter in your system path, please pass the PYTHON_VERSION
+variable to configure. See ``configure --help'' for reference.
+])
+ PYTHON_VERSION=""
+ fi
+ fi
+
+ #
+ # Check if you have distutils, else fail
+ #
+ AC_MSG_CHECKING([for the distutils Python package])
+ ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+ if test -z "$ac_distutils_result"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([cannot import Python module "distutils".
+Please check your Python installation. The error was:
+$ac_distutils_result])
+ PYTHON_VERSION=""
+ fi
+
+ #
+ # Check for Python include path
+ #
+ AC_MSG_CHECKING([for Python include path])
+ if test -z "$PYTHON_CPPFLAGS"; then
+ python_path=`$PYTHON -c "import distutils.sysconfig; \
+ print (distutils.sysconfig.get_python_inc ());"`
+ if test -n "${python_path}"; then
+ python_path="-I$python_path"
+ fi
+ PYTHON_CPPFLAGS=$python_path
+ fi
+ AC_MSG_RESULT([$PYTHON_CPPFLAGS])
+ AC_SUBST([PYTHON_CPPFLAGS])
+
+ #
+ # Check for Python library path
+ #
+ AC_MSG_CHECKING([for Python library path])
+ if test -z "$PYTHON_LDFLAGS"; then
+ # (makes two attempts to ensure we've got a version number
+ # from the interpreter)
+ ac_python_version=`cat<<EOD | $PYTHON -
+
+# join all versioning strings, on some systems
+# major/minor numbers could be in different list elements
+from distutils.sysconfig import *
+ret = ''
+for e in get_config_vars ('VERSION'):
+ if (e != None):
+ ret += e
+print (ret)
+EOD`
+
+ if test -z "$ac_python_version"; then
+ if test -n "$PYTHON_VERSION"; then
+ ac_python_version=$PYTHON_VERSION
+ else
+ ac_python_version=`$PYTHON -c "import sys; \
+ print (sys.version[[:3]])"`
+ fi
+ fi
+
+ # Make the versioning information available to the compiler
+ AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
+ [If available, contains the Python version number currently in use.])
+
+ # First, the library directory:
+ ac_python_libdir=`cat<<EOD | $PYTHON -
+
+# There should be only one
+import distutils.sysconfig
+for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
+ if e != None:
+ print (e)
+ break
+EOD`
+
+ # Before checking for libpythonX.Y, we need to know
+ # the extension the OS we're on uses for libraries
+ # (we take the first one, if there's more than one fix me!):
+ ac_python_soext=`$PYTHON -c \
+ "import distutils.sysconfig; \
+ print (distutils.sysconfig.get_config_vars('SO')[[0]])"`
+
+ # Now, for the library:
+ ac_python_soname=`$PYTHON -c \
+ "import distutils.sysconfig; \
+ print (distutils.sysconfig.get_config_vars('LDLIBRARY')[[0]])"`
+
+ # If we're on OS X and this is a .dylib then the distutils will
+ # identify the .so extension incorrectly. So we check if the
+ # the extension is .dylib
+ PYTHON_LIB_IS_NOT_OSX_DYLIB=`echo "$ac_python_soname" | sed "s/^.*\.dylib$//"`
+ if test -z "$PYTHON_LIB_IS_NOT_OSX_DYLIB"; then
+ ac_python_soext=".dylib"
+ fi
+
+ # Strip away extension from the end to canonicalize its name:
+ ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
+
+ # This small piece shamelessly adapted from PostgreSQL python macro;
+ # credits goes to momjian, I think. I'd like to put the right name
+ # in the credits, if someone can point me in the right direction... ?
+ #
+ if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
+ -a x"$ac_python_library" != x"$ac_python_soname"
+ then
+ # use the official shared library
+ ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
+ PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
+ else
+ # old way: use libpython from python_configdir
+ ac_python_libdir=`$PYTHON -c \
+ "from distutils.sysconfig import get_python_lib as f; \
+ import os; \
+ print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
+ PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
+ fi
+
+ if test -z "$PYTHON_LDFLAGS"; then
+ AC_MSG_ERROR([
+ Cannot determine location of your Python DSO. Please check it was installed with
+ dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
+ ])
+ fi
+ fi
+ AC_MSG_RESULT([$PYTHON_LDFLAGS])
+ AC_SUBST([PYTHON_LDFLAGS])
+
+ #
+ # Check for site packages
+ #
+ AC_MSG_CHECKING([for Python site-packages path])
+ if test -z "$PYTHON_SITE_PKG"; then
+ PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
+ print (distutils.sysconfig.get_python_lib(0,0));"`
+ fi
+ AC_MSG_RESULT([$PYTHON_SITE_PKG])
+ AC_SUBST([PYTHON_SITE_PKG])
+
+ #
+ # libraries which must be linked in when embedding
+ #
+ AC_MSG_CHECKING(python extra libraries)
+ if test -z "$PYTHON_EXTRA_LIBS"; then
+ PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+ conf = distutils.sysconfig.get_config_var; \
+ print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
+ fi
+ AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
+ AC_SUBST(PYTHON_EXTRA_LIBS)
+
+ #
+ # linking flags needed when embedding
+ #
+ AC_MSG_CHECKING(python extra linking flags)
+ if test -z "$PYTHON_EXTRA_LDFLAGS"; then
+ PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
+ conf = distutils.sysconfig.get_config_var; \
+ print (conf('LINKFORSHARED'))"`
+ fi
+ AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
+ AC_SUBST(PYTHON_EXTRA_LDFLAGS)
+
+ #
+ # final check to see if everything compiles alright
+ #
+ AC_MSG_CHECKING([consistency of all components of python development environment])
+ # save current global flags
+ ac_save_LIBS="$LIBS"
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
+ CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
+ AC_LANG_PUSH([C])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[#include <Python.h>]],
+ [[Py_Initialize();]])
+ ],[pythonexists=yes],[pythonexists=no])
+ AC_LANG_POP([C])
+ # turn back to default flags
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ AC_MSG_RESULT([$pythonexists])
+
+ if test ! "x$pythonexists" = "xyes"; then
+ AC_MSG_FAILURE([
+ Could not link test program to Python. Maybe the main Python library has been
+ installed in some non-standard library path. If so, pass it to configure,
+ via the LDFLAGS environment variable.
+ Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
+ ============================================================================
+ ERROR!
+ You probably have to install the development version of the Python package
+ for your distribution. The exact name of this package varies among them.
+ ============================================================================
+ ])
+ PYTHON_VERSION=""
+ fi
+
+ #
+ # all done!
+ #
+])
del py_exclude.txt
rem create directories
-IF NOT EXIST "%XBMC_PATH%\system\players\paplayer" md "%XBMC_PATH%\system\players\paplayer"
\ No newline at end of file
+IF NOT EXIST "%XBMC_PATH%\system\players\paplayer" md "%XBMC_PATH%\system\players\paplayer"
copy SDL_image-1.2.10\lib\*.dll "%XBMC_PATH%\tools\TexturePacker\"
copy SDL_image-1.2.10\lib\SDL_image.lib "%CUR_PATH%\lib\SDL_image.lib" /Y
+rem for debugging
+copy SDL-1.2.14\lib\SDL.dll "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)\" /Y
+
cd %LOC_PATH%
\ No newline at end of file
--- /dev/null
+@ECHO ON
+
+SET LOC_PATH=%CD%
+SET FILES=%LOC_PATH%\python_d.txt
+
+CALL dlextract.bat python %FILES%
+
+cd %TMP_PATH%
+
+set DEBUG=false
+
+echo \test\ > py_exclude.txt
+
+if "%DEBUG%" == "false" (
+ echo _d.dll >> py_exclude.txt
+ echo _d.pyd >> py_exclude.txt
+ echo _d.lib >> py_exclude.txt
+ echo .pdb >> py_exclude.txt
+ echo tcl85g. >> py_exclude.txt
+ echo tclpip85g. >> py_exclude.txt
+ echo tk85g. >> py_exclude.txt
+)
+
+xcopy python2.6.6\include\* "%CUR_PATH%\include\python" /E /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\python\DLLs "%XBMC_PATH%\system\python\DLLs" /E /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\python\Lib "%XBMC_PATH%\system\python\Lib" /E /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\python26.dll "%XBMC_PATH%\project\Win32BuildSetup\dependencies\" /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\libs\*.lib "%CUR_PATH%\lib\" /E /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\libs\*.pdb "%CUR_PATH%\lib\" /E /Q /I /Y /EXCLUDE:py_exclude.txt
+
+rem for debugging
+xcopy python2.6.6\python26.dll "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)\" /Q /I /Y /EXCLUDE:py_exclude.txt
+xcopy python2.6.6\python26_d.dll "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)\" /Q /I /Y /EXCLUDE:py_exclude.txt
+
+cd %LOC_PATH%
--- /dev/null
+; filename source of the file
+python2.6.6.7z http://mirrors.xbmc.org/build-deps/win32/
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <IncludePath>$(SolutionDir)\..\BuildDependencies\include;$(IncludePath)</IncludePath>
+ <IncludePath>$(SolutionDir)\..\BuildDependencies\include;$(SolutionDir)\..\BuildDependencies\include\python;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup>
<LibraryPath>$(SolutionDir)\..\BuildDependencies\lib;$(LibraryPath)</LibraryPath>
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame_dll", "..\..\lib\liblame\vc_solution\vc10_libmp3lame_dll.vcxproj", "{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_make_versioninfo", "..\..\lib\python\PCbuild\make_versioninfo.vcxproj", "{FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore_dll", "..\..\lib\python\PCbuild\pythoncore.vcxproj", "{9E417A6D-50DE-4969-8542-F58EA1163376}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_zlib.pyd", "..\..\lib\python\PCbuild\zlib_python.vcxproj", "{680CDC79-9CCA-4282-9A8D-927CB0DB55B2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python__socket.pyd", "..\..\lib\python\PCbuild\_socket.vcxproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_pyexpat.pyd", "..\..\lib\python\PCbuild\pyexpat.vcxproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_select.pyd", "..\..\lib\python\PCbuild\select.vcxproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_unicodedata.pyd", "..\..\lib\python\PCbuild\unicodedata.vcxproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_bz2.pyd", "..\..\lib\python\PCbuild\bz2.vcxproj", "{62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhdhomerun_dll", "..\..\lib\libhdhomerun\hdhomerun\hdhomerun.vcxproj", "{1E2FB608-3DD2-4021-A598-90008FA6DE85}"
EndProject
Global
{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release (DirectX)|Win32.Build.0 = ReleaseNASM|Win32
{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release (OpenGL)|Win32.ActiveCfg = ReleaseNASM|Win32
{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release (OpenGL)|Win32.Build.0 = ReleaseNASM|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {9E417A6D-50DE-4969-8542-F58EA1163376}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {680CDC79-9CCA-4282-9A8D-927CB0DB55B2}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Debug (DirectX)|Win32.ActiveCfg = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Debug (DirectX)|Win32.Build.0 = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Debug (OpenGL)|Win32.ActiveCfg = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Debug (OpenGL)|Win32.Build.0 = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}.Release (OpenGL)|Win32.Build.0 = Release|Win32
{1E2FB608-3DD2-4021-A598-90008FA6DE85}.Debug (DirectX)|Win32.ActiveCfg = Debug|Win32
{1E2FB608-3DD2-4021-A598-90008FA6DE85}.Debug (DirectX)|Win32.Build.0 = Debug|Win32
{1E2FB608-3DD2-4021-A598-90008FA6DE85}.Debug (OpenGL)|Win32.ActiveCfg = Debug|Win32
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\Python\PC;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;NDEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_GL;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;NDEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_GL;__STDC_CONSTANT_MACROS;USE_EXTERNAL_PYTHON;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<OutputFile>$(OutDir)XBMC.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib\libSDL-WIN32\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;msvcrt;libci;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;libsamplerate-0.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)XBMC.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug (DirectX)|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\Python\PC;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;_DEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_DX;Py_NO_ENABLE_SHARED;D3D_DEBUG_INFO;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\cores;..\..\xbmc\cores\dvdplayer;..\..\xbmc\dialogs;..\..\xbmc\FileSystem;..\..\xbmc\guilib\;..\..\xbmc\utils;..\..\xbmc\win32;..\..\xbmc\windowing;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\libflac\flac-1.2.1\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libsamplerate\src;..\..\lib\win32\libssh_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\sqlite;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;_DEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_DX;USE_EXTERNAL_PYTHON;D3D_DEBUG_INFO;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\Python\PC;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;NDEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_DX;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;NDEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_DX;USE_EXTERNAL_PYTHON;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\Python\PC;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;_DEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_GL;Py_NO_ENABLE_SHARED;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\;..\..\xbmc\;..\..\xbmc\win32\;..\..\xbmc\cores\dvdplayer;..\..\lib;..\..\lib\ffmpeg;..\..\lib\ffmpeg\include-xbmc-win32;..\..\lib\freetype\include;..\..\lib\jsoncpp\jsoncpp\include;..\..\lib\liblame\include;..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\lib\libUPnP\Platinum\Source\Platinum;..\..\lib\libUPnP\Platinum\Source\Core;..\..\lib\libUPnP\Neptune\Source\Core;..\..\lib\libUPnP\Neptune\Source\System\Win32;..\..\lib\win32\boost;..\..\lib\win32\libbluray_win32;..\..\lib\win32\libcdio\include;..\..\lib\win32\libiconv\include;..\..\lib\win32\libmicrohttpd_win32\include;..\..\lib\win32\libwavpack;..\..\lib\win32\pcre;..\..\lib\win32\vorbisfile\libvorbis\include;..\..\lib\win32\vorbisfile\ogg\include;..\..\lib\jsoncpp\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDOWS;_MSVC;WIN32;_DEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_GL;__STDC_CONSTANT_MACROS;USE_EXTERNAL_PYTHON;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<IgnoreSpecificDefaultLibraries>libc;msvcrt;libcmt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
- <DelayLoadDLLs>dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;libsamplerate-0.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)XBMC.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ClCompile Include="..\..\xbmc\cores\VideoRenderers\RenderCapture.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.cpp" />
<ClCompile Include="..\..\xbmc\CueDocument.cpp" />
- <ClCompile Include="..\..\xbmc\DateTime.cpp" />
<ClCompile Include="..\..\xbmc\dbwrappers\Database.cpp" />
<ClCompile Include="..\..\xbmc\dbwrappers\dataset.cpp" />
<ClCompile Include="..\..\xbmc\dbwrappers\mysqldataset.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\json-rpc\SystemOperations.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\json-rpc\VideoLibrary.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\json-rpc\XBMCOperations.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\action.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\control.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlbutton.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlcheckmark.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlfadelabel.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlgroup.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlimage.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controllabel.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controllist.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlprogress.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlradiobutton.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlslider.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlspin.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controltextbox.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\dialog.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindow.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowDialog.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowXML.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowXMLDialog.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\infotagmusic.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\infotagvideo.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\keyboard.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\listitem.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\player.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\pyplaylist.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\PythonAddon.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\PythonPlayer.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\pyutil.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\window.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\winxml.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\winxmldialog.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcaddonmodule.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcguimodule.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcmodule.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcplugin.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcvfsmodule.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\XBPython.cpp" />
- <ClCompile Include="..\..\xbmc\interfaces\python\XBPyThread.cpp" />
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\action.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\control.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlbutton.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlcheckmark.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlfadelabel.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlgroup.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlimage.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controllabel.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controllist.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlprogress.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlradiobutton.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlslider.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controlspin.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\controltextbox.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\dialog.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindow.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowDialog.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowXML.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\GUIPythonWindowXMLDialog.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\infotagmusic.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\infotagvideo.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\keyboard.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\listitem.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\player.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\pyplaylist.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\PythonAddon.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\PythonPlayer.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\pyutil.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\window.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\winxml.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\winxmldialog.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcaddonmodule.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcguimodule.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcmodule.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcplugin.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\xbmcmodule\xbmcvfsmodule.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\XBPython.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\python\XBPyThread.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug (OpenGL)|Win32'">..\..\project\BuildDependencies\include\python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
<ClCompile Include="..\..\xbmc\LangInfo.cpp" />
<ClCompile Include="..\..\xbmc\MediaSource.cpp" />
<ClCompile Include="..\..\xbmc\music\Album.cpp" />
<ClCompile Include="..\..\xbmc\win32\stdio_utf8.cpp" />
<ClCompile Include="..\..\xbmc\win32\strverscmp.cpp" />
<ClCompile Include="..\..\xbmc\win32\Win32DelayedDllLoad.cpp" />
+ <ClCompile Include="..\..\xbmc\win32\win32env.cpp" />
<ClCompile Include="..\..\xbmc\win32\WIN32Util.cpp" />
- <ClCompile Include="..\..\xbmc\win32\WIN32XBPythonDll.cpp" />
<ClCompile Include="..\..\xbmc\win32\WINDirectSound.cpp" />
<ClCompile Include="..\..\xbmc\win32\WindowHelper.cpp" />
<ClCompile Include="..\..\xbmc\win32\WINFileSMB.cpp" />
<ClCompile Include="..\..\xbmc\windows\GUIWindowSystemInfo.cpp" />
<ClCompile Include="..\..\xbmc\windows\GUIWindowWeather.cpp" />
<ClCompile Include="..\..\xbmc\XBApplicationEx.cpp" />
+ <ClCompile Include="..\..\xbmc\XBDateTime.cpp" />
<ClCompile Include="..\..\xbmc\xbmc.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\cores\VideoRenderers\RenderCapture.h" />
<ClInclude Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.h" />
<ClInclude Include="..\..\xbmc\CueDocument.h" />
- <ClInclude Include="..\..\xbmc\DateTime.h" />
<ClInclude Include="..\..\xbmc\dbwrappers\Database.h" />
<ClInclude Include="..\..\xbmc\dbwrappers\dataset.h" />
<ClInclude Include="..\..\xbmc\dbwrappers\mysqldataset.h" />
<ClInclude Include="..\..\xbmc\ViewState.h" />
<ClInclude Include="..\..\xbmc\win32\pch.h" />
<ClInclude Include="..\..\xbmc\win32\PlatformDefs.h" />
+ <ClInclude Include="..\..\xbmc\XBDateTime.h" />
<CustomBuild Include="..\..\xbmc\win32\PlatformInclude.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Release (DirectX)|Win32'">update_git_rev.bat</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release (DirectX)|Win32'">..\..\xbmc\win32\git_rev.h;%(Outputs)</Outputs>
<ClCompile Include="..\..\xbmc\win32\strverscmp.cpp">
<Filter>win32</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\win32\Win32DelayedDllLoad.cpp">
- <Filter>win32</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\win32\WIN32Util.cpp">
<Filter>win32</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\interfaces\python\XBPyThread.cpp">
<Filter>interfaces\python</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\win32\WIN32XBPythonDll.cpp">
- <Filter>interfaces\python</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\music\dialogs\GUIDialogMusicInfo.cpp">
<Filter>music\dialogs</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\CueDocument.cpp">
<Filter>utils</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\DateTime.cpp">
- <Filter>utils</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\DynamicDll.cpp">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\interfaces\json-rpc\JSONServiceDescription.cpp">
<Filter>interfaces\json-rpc</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\XBDateTime.cpp">
+ <Filter>utils</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\win32\Win32DelayedDllLoad.cpp">
+ <Filter>win32</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\win32\win32env.cpp">
+ <Filter>win32</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
<ClInclude Include="..\..\xbmc\interfaces\python\XBPython.h">
<Filter>interfaces\python</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\interfaces\python\XBPythonDll.h">
- <Filter>interfaces\python</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\interfaces\python\XBPyThread.h">
<Filter>interfaces\python</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\CueDocument.h">
<Filter>utils</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\DateTime.h">
- <Filter>utils</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\DynamicDll.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\interfaces\json-rpc\ServiceDescription.h">
<Filter>interfaces\json-rpc</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\interfaces\python\XBPythonDll.h">
+ <Filter>interfaces\python</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\XBDateTime.h">
+ <Filter>utils</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\xbmc\win32\XBMC.ico">
SetOutPath "$INSTDIR\sounds"
File /r /x *.so "${xbmc_root}\Xbmc\sounds\*.*"
SetOutPath "$INSTDIR\system"
- File /r /x *.so /x mplayer "${xbmc_root}\Xbmc\system\*.*"
+ File /r /x *.so /x mplayer /x *_d.* /x tcl85g.dll /x tclpip85g.dll /x tk85g.dll "${xbmc_root}\Xbmc\system\*.*"
; delete msvc?90.dll's in INSTDIR, we use the vcredist installer later
Delete "$INSTDIR\msvcr90.dll"
"HelpLink" "http://xbmc.org/support"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
"URLInfoAbout" "http://xbmc.org"
+
SectionEnd
SectionGroup "Language" SecLanguages
# configuration settings
CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
--enable-external-python \
- PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig
+ PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
+ PYTHON=$(PREFIX)/bin/python
all: configure
+++ /dev/null
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "DateTime.h"
-#include "LangInfo.h"
-#include "guilib/LocalizeStrings.h"
-
-#define SECONDS_PER_DAY 86400UL
-#define SECONDS_PER_HOUR 3600UL
-#define SECONDS_PER_MINUTE 60UL
-#define SECONDS_TO_FILETIME 10000000UL
-
-/////////////////////////////////////////////////
-//
-// CDateTimeSpan
-//
-
-CDateTimeSpan::CDateTimeSpan()
-{
- m_timeSpan.dwHighDateTime=0;
- m_timeSpan.dwLowDateTime=0;
-}
-
-CDateTimeSpan::CDateTimeSpan(const CDateTimeSpan& span)
-{
- m_timeSpan.dwHighDateTime=span.m_timeSpan.dwHighDateTime;
- m_timeSpan.dwLowDateTime=span.m_timeSpan.dwLowDateTime;
-}
-
-CDateTimeSpan::CDateTimeSpan(int day, int hour, int minute, int second)
-{
- SetDateTimeSpan(day, hour, minute, second);
-}
-
-bool CDateTimeSpan::operator >(const CDateTimeSpan& right) const
-{
- return CompareFileTime(&m_timeSpan, &right.m_timeSpan)>0;
-}
-
-bool CDateTimeSpan::operator >=(const CDateTimeSpan& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTimeSpan::operator <(const CDateTimeSpan& right) const
-{
- return CompareFileTime(&m_timeSpan, &right.m_timeSpan)<0;
-}
-
-bool CDateTimeSpan::operator <=(const CDateTimeSpan& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTimeSpan::operator ==(const CDateTimeSpan& right) const
-{
- return CompareFileTime(&m_timeSpan, &right.m_timeSpan)==0;
-}
-
-bool CDateTimeSpan::operator !=(const CDateTimeSpan& right) const
-{
- return !operator ==(right);
-}
-
-CDateTimeSpan CDateTimeSpan::operator +(const CDateTimeSpan& right) const
-{
- CDateTimeSpan left(*this);
-
- ULARGE_INTEGER timeLeft;
- left.ToULargeInt(timeLeft);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeLeft.QuadPart+=timeRight.QuadPart;
-
- left.FromULargeInt(timeLeft);
-
- return left;
-}
-
-CDateTimeSpan CDateTimeSpan::operator -(const CDateTimeSpan& right) const
-{
- CDateTimeSpan left(*this);
-
- ULARGE_INTEGER timeLeft;
- left.ToULargeInt(timeLeft);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeLeft.QuadPart-=timeRight.QuadPart;
-
- left.FromULargeInt(timeLeft);
-
- return left;
-}
-
-const CDateTimeSpan& CDateTimeSpan::operator +=(const CDateTimeSpan& right)
-{
- ULARGE_INTEGER timeThis;
- ToULargeInt(timeThis);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeThis.QuadPart+=timeRight.QuadPart;
-
- FromULargeInt(timeThis);
-
- return *this;
-}
-
-const CDateTimeSpan& CDateTimeSpan::operator -=(const CDateTimeSpan& right)
-{
- ULARGE_INTEGER timeThis;
- ToULargeInt(timeThis);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeThis.QuadPart-=timeRight.QuadPart;
-
- FromULargeInt(timeThis);
-
- return *this;
-}
-
-void CDateTimeSpan::ToULargeInt(ULARGE_INTEGER& time) const
-{
- time.u.HighPart=m_timeSpan.dwHighDateTime;
- time.u.LowPart=m_timeSpan.dwLowDateTime;
-}
-
-void CDateTimeSpan::FromULargeInt(const ULARGE_INTEGER& time)
-{
- m_timeSpan.dwHighDateTime=time.u.HighPart;
- m_timeSpan.dwLowDateTime=time.u.LowPart;
-}
-
-void CDateTimeSpan::SetDateTimeSpan(int day, int hour, int minute, int second)
-{
- ULARGE_INTEGER time;
- ToULargeInt(time);
-
- time.QuadPart=(LONGLONG)day*SECONDS_PER_DAY*SECONDS_TO_FILETIME;
- time.QuadPart+=(LONGLONG)hour*SECONDS_PER_HOUR*SECONDS_TO_FILETIME;
- time.QuadPart+=(LONGLONG)minute*SECONDS_PER_MINUTE*SECONDS_TO_FILETIME;
- time.QuadPart+=(LONGLONG)second*SECONDS_TO_FILETIME;
-
- FromULargeInt(time);
-}
-
-void CDateTimeSpan::SetFromTimeString(const CStdString& time) // hh:mm
-{
- int hour = atoi(time.Mid(0,2).c_str());
- int minutes = atoi(time.Mid(3,2).c_str());
- SetDateTimeSpan(0,hour,minutes,0);
-}
-
-int CDateTimeSpan::GetDays() const
-{
- ULARGE_INTEGER time;
- ToULargeInt(time);
-
- return (int)(time.QuadPart/SECONDS_TO_FILETIME)/SECONDS_PER_DAY;
-}
-
-int CDateTimeSpan::GetHours() const
-{
- ULARGE_INTEGER time;
- ToULargeInt(time);
-
- return (int)((time.QuadPart/SECONDS_TO_FILETIME)%SECONDS_PER_DAY)/SECONDS_PER_HOUR;
-}
-
-int CDateTimeSpan::GetMinutes() const
-{
- ULARGE_INTEGER time;
- ToULargeInt(time);
-
- return (int)((time.QuadPart/SECONDS_TO_FILETIME%SECONDS_PER_DAY)%SECONDS_PER_HOUR)/SECONDS_PER_MINUTE;
-}
-
-int CDateTimeSpan::GetSeconds() const
-{
- ULARGE_INTEGER time;
- ToULargeInt(time);
-
- return (int)(((time.QuadPart/SECONDS_TO_FILETIME%SECONDS_PER_DAY)%SECONDS_PER_HOUR)%SECONDS_PER_MINUTE)%SECONDS_PER_MINUTE;
-}
-
-void CDateTimeSpan::SetFromPeriod(const CStdString &period)
-{
- long days = atoi(period.c_str());
- // find the first non-space and non-number
- int pos = period.find_first_not_of("0123456789 ", 0);
- if (pos >= 0)
- {
- CStdString units = period.Mid(pos, 3);
- if (units.CompareNoCase("wee") == 0)
- days *= 7;
- else if (units.CompareNoCase("mon") == 0)
- days *= 31;
- }
-
- SetDateTimeSpan(days, 0, 0, 0);
-}
-
-/////////////////////////////////////////////////
-//
-// CDateTime
-//
-
-CDateTime::CDateTime()
-{
- Reset();
-}
-
-CDateTime::CDateTime(const SYSTEMTIME &time)
-{
- // we store internally as a FILETIME
- m_state = ToFileTime(time, m_time) ? valid : invalid;
-}
-
-CDateTime::CDateTime(const FILETIME &time)
-{
- m_time=time;
- SetValid(true);
-}
-
-CDateTime::CDateTime(const CDateTime& time)
-{
- m_time=time.m_time;
- m_state=time.m_state;
-}
-
-CDateTime::CDateTime(const time_t& time)
-{
- m_state = ToFileTime(time, m_time) ? valid : invalid;
-}
-
-CDateTime::CDateTime(const tm& time)
-{
- m_state = ToFileTime(time, m_time) ? valid : invalid;
-}
-
-CDateTime::CDateTime(int year, int month, int day, int hour, int minute, int second)
-{
- SetDateTime(year, month, day, hour, minute, second);
-}
-
-CDateTime CDateTime::GetCurrentDateTime()
-{
- // get the current time
- SYSTEMTIME time;
- GetLocalTime(&time);
-
- return CDateTime(time);
-}
-
-CDateTime CDateTime::GetUTCDateTime()
-{
- TIME_ZONE_INFORMATION tz;
-
- CDateTime time(GetCurrentDateTime());
- switch(GetTimeZoneInformation(&tz))
- {
- case TIME_ZONE_ID_DAYLIGHT:
- time += CDateTimeSpan(0, 0, tz.Bias + tz.DaylightBias, 0);
- break;
- case TIME_ZONE_ID_STANDARD:
- time += CDateTimeSpan(0, 0, tz.Bias + tz.StandardBias, 0);
- break;
- case TIME_ZONE_ID_UNKNOWN:
- time += CDateTimeSpan(0, 0, tz.Bias, 0);
- break;
- }
-
- return time;
-}
-
-const CDateTime& CDateTime::operator =(const SYSTEMTIME& right)
-{
- m_state = ToFileTime(right, m_time) ? valid : invalid;
-
- return *this;
-}
-
-const CDateTime& CDateTime::operator =(const FILETIME& right)
-{
- m_time=right;
- SetValid(true);
-
- return *this;
-}
-
-const CDateTime& CDateTime::operator =(const time_t& right)
-{
- m_state = ToFileTime(right, m_time) ? valid : invalid;
-
- return *this;
-}
-
-const CDateTime& CDateTime::operator =(const tm& right)
-{
- m_state = ToFileTime(right, m_time) ? valid : invalid;
-
- return *this;
-}
-
-bool CDateTime::operator >(const CDateTime& right) const
-{
- return operator >(right.m_time);
-}
-
-bool CDateTime::operator >=(const CDateTime& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTime::operator <(const CDateTime& right) const
-{
- return operator <(right.m_time);
-}
-
-bool CDateTime::operator <=(const CDateTime& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTime::operator ==(const CDateTime& right) const
-{
- return operator ==(right.m_time);
-}
-
-bool CDateTime::operator !=(const CDateTime& right) const
-{
- return !operator ==(right);
-}
-
-bool CDateTime::operator >(const FILETIME& right) const
-{
- return CompareFileTime(&m_time, &right)>0;
-}
-
-bool CDateTime::operator >=(const FILETIME& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTime::operator <(const FILETIME& right) const
-{
- return CompareFileTime(&m_time, &right)<0;
-}
-
-bool CDateTime::operator <=(const FILETIME& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTime::operator ==(const FILETIME& right) const
-{
- return CompareFileTime(&m_time, &right)==0;
-}
-
-bool CDateTime::operator !=(const FILETIME& right) const
-{
- return !operator ==(right);
-}
-
-bool CDateTime::operator >(const SYSTEMTIME& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator >(time);
-}
-
-bool CDateTime::operator >=(const SYSTEMTIME& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTime::operator <(const SYSTEMTIME& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator <(time);
-}
-
-bool CDateTime::operator <=(const SYSTEMTIME& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTime::operator ==(const SYSTEMTIME& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator ==(time);
-}
-
-bool CDateTime::operator !=(const SYSTEMTIME& right) const
-{
- return !operator ==(right);
-}
-
-bool CDateTime::operator >(const time_t& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator >(time);
-}
-
-bool CDateTime::operator >=(const time_t& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTime::operator <(const time_t& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator <(time);
-}
-
-bool CDateTime::operator <=(const time_t& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTime::operator ==(const time_t& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator ==(time);
-}
-
-bool CDateTime::operator !=(const time_t& right) const
-{
- return !operator ==(right);
-}
-
-bool CDateTime::operator >(const tm& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator >(time);
-}
-
-bool CDateTime::operator >=(const tm& right) const
-{
- return operator >(right) || operator ==(right);
-}
-
-bool CDateTime::operator <(const tm& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator <(time);
-}
-
-bool CDateTime::operator <=(const tm& right) const
-{
- return operator <(right) || operator ==(right);
-}
-
-bool CDateTime::operator ==(const tm& right) const
-{
- FILETIME time;
- ToFileTime(right, time);
-
- return operator ==(time);
-}
-
-bool CDateTime::operator !=(const tm& right) const
-{
- return !operator ==(right);
-}
-
-CDateTime CDateTime::operator +(const CDateTimeSpan& right) const
-{
- CDateTime left(*this);
-
- ULARGE_INTEGER timeLeft;
- left.ToULargeInt(timeLeft);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeLeft.QuadPart+=timeRight.QuadPart;
-
- left.FromULargeInt(timeLeft);
-
- return left;
-}
-
-CDateTime CDateTime::operator -(const CDateTimeSpan& right) const
-{
- CDateTime left(*this);
-
- ULARGE_INTEGER timeLeft;
- left.ToULargeInt(timeLeft);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeLeft.QuadPart-=timeRight.QuadPart;
-
- left.FromULargeInt(timeLeft);
-
- return left;
-}
-
-const CDateTime& CDateTime::operator +=(const CDateTimeSpan& right)
-{
- ULARGE_INTEGER timeThis;
- ToULargeInt(timeThis);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeThis.QuadPart+=timeRight.QuadPart;
-
- FromULargeInt(timeThis);
-
- return *this;
-}
-
-const CDateTime& CDateTime::operator -=(const CDateTimeSpan& right)
-{
- ULARGE_INTEGER timeThis;
- ToULargeInt(timeThis);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeThis.QuadPart-=timeRight.QuadPart;
-
- FromULargeInt(timeThis);
-
- return *this;
-}
-
-CDateTimeSpan CDateTime::operator -(const CDateTime& right) const
-{
- CDateTimeSpan left;
-
- ULARGE_INTEGER timeLeft;
- left.ToULargeInt(timeLeft);
-
- ULARGE_INTEGER timeThis;
- ToULargeInt(timeThis);
-
- ULARGE_INTEGER timeRight;
- right.ToULargeInt(timeRight);
-
- timeLeft.QuadPart=timeThis.QuadPart-timeRight.QuadPart;
-
- left.FromULargeInt(timeLeft);
-
- return left;
-}
-
-CDateTime::operator FILETIME() const
-{
- return m_time;
-}
-
-void CDateTime::Archive(CArchive& ar)
-{
- if (ar.IsStoring())
- {
- ar<<(int)m_state;
- if (m_state==valid)
- {
- SYSTEMTIME st;
- GetAsSystemTime(st);
- ar<<st;
- }
- }
- else
- {
- Reset();
- int state;
- ar >> (int &)state;
- m_state = CDateTime::STATE(state);
- if (m_state==valid)
- {
- SYSTEMTIME st;
- ar>>st;
- ToFileTime(st, m_time);
- }
- }
-}
-
-void CDateTime::Reset()
-{
- SetDateTime(1601, 1, 1, 0, 0, 0);
- SetValid(false);
-}
-
-void CDateTime::SetValid(bool yesNo)
-{
- m_state=yesNo ? valid : invalid;
-}
-
-bool CDateTime::IsValid() const
-{
- return m_state==valid;
-}
-
-bool CDateTime::ToFileTime(const SYSTEMTIME& time, FILETIME& fileTime) const
-{
- return SystemTimeToFileTime(&time, &fileTime)==TRUE;
-}
-
-bool CDateTime::ToFileTime(const time_t& time, FILETIME& fileTime) const
-{
- LONGLONG ll = Int32x32To64(time, 10000000)+0x19DB1DED53E8000LL;
-
- fileTime.dwLowDateTime = (DWORD)(ll & 0xFFFFFFFF);
- fileTime.dwHighDateTime = (DWORD)(ll >> 32);
-
- return true;
-}
-
-bool CDateTime::ToFileTime(const tm& time, FILETIME& fileTime) const
-{
- SYSTEMTIME st;
- ZeroMemory(&st, sizeof(SYSTEMTIME));
-
- st.wYear=time.tm_year+1900;
- st.wMonth=time.tm_mon+1;
- st.wDayOfWeek=time.tm_wday;
- st.wDay=time.tm_mday;
- st.wHour=time.tm_hour;
- st.wMinute=time.tm_min;
- st.wSecond=time.tm_sec;
-
- return SystemTimeToFileTime(&st, &fileTime)==TRUE;
-}
-
-void CDateTime::ToULargeInt(ULARGE_INTEGER& time) const
-{
- time.u.HighPart=m_time.dwHighDateTime;
- time.u.LowPart=m_time.dwLowDateTime;
-}
-
-void CDateTime::FromULargeInt(const ULARGE_INTEGER& time)
-{
- m_time.dwHighDateTime=time.u.HighPart;
- m_time.dwLowDateTime=time.u.LowPart;
-}
-
-void CDateTime::SetFromDateString(const CStdString &date)
-{
- if (date.IsEmpty())
- {
- SetValid(false);
- return;
- }
-
- const char* months[] = {"january","february","march","april","may","june","july","august","september","october","november","december",NULL};
- int j=0;
- int iDayPos = date.Find("day");
- int iPos = date.Find(" ");
- if (iDayPos < iPos && iDayPos > -1)
- {
- iDayPos = iPos+1;
- iPos = date.Find(" ",iPos+1);
- }
- else
- iDayPos = 0;
-
- CStdString strMonth = date.Mid(iDayPos,iPos-iDayPos);
- if (strMonth.IsEmpty()) // assume dbdate format
- {
- SetFromDBDate(date);
- return;
- }
-
- int iPos2 = date.Find(",");
- CStdString strDay = date.Mid(iPos,iPos2-iPos);
- CStdString strYear = date.Mid(date.Find(" ",iPos2)+1);
- while (months[j] && stricmp(strMonth.c_str(),months[j]) != 0)
- j++;
- if (!months[j])
- return;
-
- SetDateTime(atol(strYear.c_str()),j+1,atol(strDay.c_str()),0,0,0);
-}
-
-int CDateTime::GetDay() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wDay;
-}
-
-int CDateTime::GetMonth() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wMonth;
-}
-
-int CDateTime::GetYear() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wYear;
-}
-
-int CDateTime::GetHour() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wHour;
-}
-
-int CDateTime::GetMinute() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wMinute;
-}
-
-int CDateTime::GetSecond() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wSecond;
-}
-
-int CDateTime::GetDayOfWeek() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- return st.wDayOfWeek;
-}
-
-int CDateTime::GetMinuteOfDay() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
- return st.wHour*60+st.wMinute;
-}
-
-void CDateTime::SetDateTime(int year, int month, int day, int hour, int minute, int second)
-{
- SYSTEMTIME st;
- ZeroMemory(&st, sizeof(SYSTEMTIME));
-
- st.wYear=year;
- st.wMonth=month;
- st.wDay=day;
- st.wHour=hour;
- st.wMinute=minute;
- st.wSecond=second;
-
- m_state = ToFileTime(st, m_time) ? valid : invalid;
-}
-
-void CDateTime::SetDate(int year, int month, int day)
-{
- SetDateTime(year, month, day, 0, 0, 0);
-}
-
-void CDateTime::SetTime(int hour, int minute, int second)
-{
- // 01.01.1601 00:00:00 is 0 as filetime
- SetDateTime(1601, 1, 1, hour, minute, second);
-}
-
-void CDateTime::GetAsSystemTime(SYSTEMTIME& time) const
-{
- FileTimeToSystemTime(&m_time, &time);
-}
-
-#define UNIX_BASE_TIME 116444736000000000LL /* nanoseconds since epoch */
-void CDateTime::GetAsTime(time_t& time) const
-{
- LONGLONG ll;
- ll = ((LONGLONG)m_time.dwHighDateTime << 32) + m_time.dwLowDateTime;
- time=(time_t)((ll - UNIX_BASE_TIME) / 10000000);
-}
-
-void CDateTime::GetAsTm(tm& time) const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- time.tm_year=st.wYear-1900;
- time.tm_mon=st.wMonth-1;
- time.tm_wday=st.wDayOfWeek;
- time.tm_mday=st.wDay;
- time.tm_hour=st.wHour;
- time.tm_min=st.wMinute;
- time.tm_sec=st.wSecond;
-
- mktime(&time);
-}
-
-void CDateTime::GetAsTimeStamp(FILETIME& time) const
-{
- ::LocalFileTimeToFileTime(&m_time, &time);
-}
-
-CStdString CDateTime::GetAsDBDate() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- CStdString date;
- date.Format("%04i-%02i-%02i", st.wYear, st.wMonth, st.wDay);
-
- return date;
-}
-
-CStdString CDateTime::GetAsDBDateTime() const
-{
- SYSTEMTIME st;
- GetAsSystemTime(st);
-
- CStdString date;
- date.Format("%04i-%02i-%02i %02i:%02i:%02i", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
-
- return date;
-}
-
-void CDateTime::SetFromW3CDate(const CStdString &dateTime)
-{
- CStdString date, time, zone;
-
- int posT = dateTime.Find("T");
- if(posT >= 0)
- {
- date = dateTime.Left(posT);
- CStdString::size_type posZ = dateTime.find_first_of("+-Z", posT);
- if(posZ == CStdString::npos)
- time = dateTime.Mid(posT+1);
- else
- {
- time = dateTime.Mid(posT+1, posZ-posT-1);
- zone = dateTime.Mid(posZ);
- }
- }
- else
- date = dateTime;
-
- int year = 0, month = 1, day = 1, hour = 0, min = 0, sec = 0;
-
- if (date.size() >= 4)
- year = atoi(date.Mid(0,4).c_str());
-
- if (date.size() >= 10)
- {
- month = atoi(date.Mid(5,2).c_str());
- day = atoi(date.Mid(8,2).c_str());
- }
-
- if (time.length() >= 5)
- {
- hour = atoi(time.Mid(0,2).c_str());
- min = atoi(time.Mid(3,2).c_str());
- }
-
- if (time.length() >= 8)
- sec = atoi(time.Mid(6,2).c_str());
-
- SetDateTime(year, month, day, hour, min, sec);
-}
-
-void CDateTime::SetFromDBDateTime(const CStdString &dateTime)
-{
- // assumes format YYYY-MM-DD HH:MM:SS
- if (dateTime.size() == 19)
- {
- int year = atoi(dateTime.Mid(0,4).c_str());
- int month = atoi(dateTime.Mid(5,2).c_str());
- int day = atoi(dateTime.Mid(8,2).c_str());
- int hour = atoi(dateTime.Mid(11,2).c_str());
- int min = atoi(dateTime.Mid(14,2).c_str());
- int sec = atoi(dateTime.Mid(17,2).c_str());
- SetDateTime(year, month, day, hour, min, sec);
- }
-}
-
-void CDateTime::SetFromDBDate(const CStdString &date)
-{
- // assumes format:
- // YYYY-MM-DD or DD-MM-YYYY
- int year = 0, month = 0, day = 0;
- if (date.size() > 2 && (date[2] == '-' || date[2] == '.'))
- {
- day = atoi(date.Mid(0,2).c_str());
- month = atoi(date.Mid(3,2).c_str());
- year = atoi(date.Mid(6,4).c_str());
- }
- else
- {
- year = atoi(date.Mid(0,4).c_str());
- month = atoi(date.Mid(5,2).c_str());
- day = atoi(date.Mid(8,2).c_str());
- }
- SetDate(year, month, day);
-}
-
-void CDateTime::SetFromDBTime(const CStdString &time)
-{
- // assumes format:
- // HH:MM:SS
- int hour, minute, second;
-
- hour = atoi(time.Mid(0,2).c_str());
- minute = atoi(time.Mid(3,2).c_str());
- second = atoi(time.Mid(6,2).c_str());
-
- SetTime(hour, minute, second);
-}
-
-CStdString CDateTime::GetAsLocalizedTime(const CStdString &format, bool withSeconds) const
-{
- CStdString strOut;
- const CStdString& strFormat = format.IsEmpty() ? g_langInfo.GetTimeFormat() : format;
-
- SYSTEMTIME dateTime;
- GetAsSystemTime(dateTime);
-
- // Prefetch meridiem symbol
- const CStdString& strMeridiem=g_langInfo.GetMeridiemSymbol(dateTime.wHour > 11 ? CLangInfo::MERIDIEM_SYMBOL_PM : CLangInfo::MERIDIEM_SYMBOL_AM);
-
- int length=strFormat.GetLength();
- for (int i=0; i<length; ++i)
- {
- char c=strFormat[i];
- if (c=='\'')
- {
- // To be able to display a "'" in the string,
- // find the last "'" that doesn't follow a "'"
- int pos=i+1;
- while(((pos=strFormat.Find(c,pos+1))>-1 && pos<strFormat.GetLength()) && strFormat[pos+1]=='\'') {}
-
- CStdString strPart;
- if (pos>-1)
- {
- // Extract string between ' '
- strPart=strFormat.Mid(i+1, pos-i-1);
- i=pos;
- }
- else
- {
- strPart=strFormat.Mid(i+1, length-i-1);
- i=length;
- }
-
- strPart.Replace("''", "'");
-
- strOut+=strPart;
- }
- else if (c=='h' || c=='H') // parse hour (H="24 hour clock")
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the hour mask, eg. HH
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- int hour=dateTime.wHour;
- if (c=='h')
- { // recalc to 12 hour clock
- if (hour > 11)
- hour -= (12 * (hour > 12));
- else
- hour += (12 * (hour < 1));
- }
-
- // Format hour string with the length of the mask
- CStdString str;
- if (partLength==1)
- str.Format("%d", hour);
- else
- str.Format("%02d", hour);
-
- strOut+=str;
- }
- else if (c=='m') // parse minutes
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the minute mask, eg. mm
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- // Format minute string with the length of the mask
- CStdString str;
- if (partLength==1)
- str.Format("%d", dateTime.wMinute);
- else
- str.Format("%02d", dateTime.wMinute);
-
- strOut+=str;
- }
- else if (c=='s') // parse seconds
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the seconds mask, eg. ss
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- if (withSeconds)
- {
- // Format seconds string with the length of the mask
- CStdString str;
- if (partLength==1)
- str.Format("%d", dateTime.wSecond);
- else
- str.Format("%02d", dateTime.wSecond);
-
- strOut+=str;
- }
- else
- strOut.Delete(strOut.GetLength()-1,1);
- }
- else if (c=='x') // add meridiem symbol
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the meridiem mask
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- strOut+=strMeridiem;
- }
- else // everything else pass to output
- strOut+=c;
- }
-
- return strOut;
-}
-
-CStdString CDateTime::GetAsLocalizedDate(bool longDate/*=false*/, bool withShortNames/*=true*/) const
-{
- CStdString strOut;
-
- const CStdString& strFormat=g_langInfo.GetDateFormat(longDate);
-
- SYSTEMTIME dateTime;
- GetAsSystemTime(dateTime);
-
- int length=strFormat.GetLength();
-
- for (int i=0; i<length; ++i)
- {
- char c=strFormat[i];
- if (c=='\'')
- {
- // To be able to display a "'" in the string,
- // find the last "'" that doesn't follow a "'"
- int pos=i+1;
- while(((pos=strFormat.Find(c,pos+1))>-1 && pos<strFormat.GetLength()) && strFormat[pos+1]=='\'') {}
-
- CStdString strPart;
- if (pos>-1)
- {
- // Extract string between ' '
- strPart=strFormat.Mid(i+1, pos-i-1);
- i=pos;
- }
- else
- {
- strPart=strFormat.Mid(i+1, length-i-1);
- i=length;
- }
- strPart.Replace("''", "'");
- strOut+=strPart;
- }
- else if (c=='D') // parse days
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the day mask, eg. DDDD
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- // Format string with the length of the mask
- CStdString str;
- if (partLength==1) // single-digit number
- str.Format("%d", dateTime.wDay);
- else if (partLength==2) // two-digit number
- str.Format("%02d", dateTime.wDay);
- else // Day of week string
- {
- int wday = dateTime.wDayOfWeek;
- if (wday < 1 || wday > 7) wday = 7;
- str = g_localizeStrings.Get((withShortNames ? 40 : 10) + wday);
- }
- strOut+=str;
- }
- else if (c=='M') // parse month
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the month mask, eg. MMMM
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- // Format string with the length of the mask
- CStdString str;
- if (partLength==1) // single-digit number
- str.Format("%d", dateTime.wMonth);
- else if (partLength==2) // two-digit number
- str.Format("%02d", dateTime.wMonth);
- else // Month string
- {
- int wmonth = dateTime.wMonth;
- if (wmonth < 1 || wmonth > 12) wmonth = 12;
- str = g_localizeStrings.Get((withShortNames ? 50 : 20) + wmonth);
- }
- strOut+=str;
- }
- else if (c=='Y') // parse year
- {
- int partLength=0;
-
- int pos=strFormat.find_first_not_of(c,i+1);
- if (pos>-1)
- {
- // Get length of the year mask, eg. YYYY
- partLength=pos-i;
- i=pos-1;
- }
- else
- {
- // mask ends at the end of the string, extract it
- partLength=length-i;
- i=length;
- }
-
- // Format string with the length of the mask
- CStdString str;
- str.Format("%d", dateTime.wYear); // four-digit number
- if (partLength<=2)
- str.Delete(0, 2); // two-digit number
-
- strOut+=str;
- }
- else // everything else pass to output
- strOut+=c;
- }
-
- return strOut;
-}
-
-CStdString CDateTime::GetAsLocalizedDateTime(bool longDate/*=false*/, bool withSeconds/*=true*/) const
-{
- return GetAsLocalizedDate(longDate)+" "+GetAsLocalizedTime("", withSeconds);
-}
-
-CDateTime CDateTime::GetAsUTCDateTime() const
-{
- TIME_ZONE_INFORMATION tz;
-
- CDateTime time(m_time);
- switch(GetTimeZoneInformation(&tz))
- {
- case TIME_ZONE_ID_DAYLIGHT:
- time += CDateTimeSpan(0, 0, tz.Bias + tz.DaylightBias, 0);
- break;
- case TIME_ZONE_ID_STANDARD:
- time += CDateTimeSpan(0, 0, tz.Bias + tz.StandardBias, 0);
- break;
- case TIME_ZONE_ID_UNKNOWN:
- time += CDateTimeSpan(0, 0, tz.Bias, 0);
- break;
- }
-
- return time;
-}
-
-static const char *DAY_NAMES[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
-static const char *MONTH_NAMES[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-
-CStdString CDateTime::GetAsRFC1123DateTime() const
-{
- CDateTime time(GetAsUTCDateTime());
- CStdString result;
- result.Format("%s, %02i %s %04i %02i:%02i:%02i GMT", DAY_NAMES[time.GetDayOfWeek()], time.GetDay(), MONTH_NAMES[time.GetMonth()-1], time.GetYear(), time.GetHour(), time.GetMinute(), time.GetSecond());
- return result;
-}
+++ /dev/null
-#pragma once
-
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "utils/Archive.h"
-
-/*! \brief TIME_FORMAT enum/bitmask used for formatting time strings
- Note the use of bitmasking, e.g.
- TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS
- \sa StringUtils::SecondsToTimeString
- */
-enum TIME_FORMAT { TIME_FORMAT_GUESS = 0,
- TIME_FORMAT_SS = 1,
- TIME_FORMAT_MM = 2,
- TIME_FORMAT_MM_SS = 3,
- TIME_FORMAT_HH = 4,
- TIME_FORMAT_HH_SS = 5, // not particularly useful
- TIME_FORMAT_HH_MM = 6,
- TIME_FORMAT_HH_MM_SS = 7,
- TIME_FORMAT_XX = 8, // AM/PM
- TIME_FORMAT_HH_MM_XX = 14};
-
-class CDateTime;
-
-class CDateTimeSpan
-{
-public:
- CDateTimeSpan();
- CDateTimeSpan(const CDateTimeSpan& span);
- CDateTimeSpan(int day, int hour, int minute, int second);
-
- bool operator >(const CDateTimeSpan& right) const;
- bool operator >=(const CDateTimeSpan& right) const;
- bool operator <(const CDateTimeSpan& right) const;
- bool operator <=(const CDateTimeSpan& right) const;
- bool operator ==(const CDateTimeSpan& right) const;
- bool operator !=(const CDateTimeSpan& right) const;
-
- CDateTimeSpan operator +(const CDateTimeSpan& right) const;
- CDateTimeSpan operator -(const CDateTimeSpan& right) const;
-
- const CDateTimeSpan& operator +=(const CDateTimeSpan& right);
- const CDateTimeSpan& operator -=(const CDateTimeSpan& right);
-
- void SetDateTimeSpan(int day, int hour, int minute, int second);
- void SetFromPeriod(const CStdString &period);
- void SetFromTimeString(const CStdString& time);
-
- int GetDays() const;
- int GetHours() const;
- int GetMinutes() const;
- int GetSeconds() const;
-
-private:
- void ToULargeInt(ULARGE_INTEGER& time) const;
- void FromULargeInt(const ULARGE_INTEGER& time);
-
-private:
- FILETIME m_timeSpan;
-
- friend class CDateTime;
-};
-
-/// \brief DateTime class, which uses FILETIME as it's base.
-class CDateTime : public IArchivable
-{
-public:
- CDateTime();
- CDateTime(const CDateTime& time);
- CDateTime(const SYSTEMTIME& time);
- CDateTime(const FILETIME& time);
- CDateTime(const time_t& time);
- CDateTime(const tm& time);
- CDateTime(int year, int month, int day, int hour, int minute, int second);
- virtual ~CDateTime() {}
-
- void SetFromDateString(const CStdString &date);
-
- static CDateTime GetCurrentDateTime();
- static CDateTime GetUTCDateTime();
-
- const CDateTime& operator =(const SYSTEMTIME& right);
- const CDateTime& operator =(const FILETIME& right);
- const CDateTime& operator =(const time_t& right);
- const CDateTime& operator =(const tm& right);
-
- bool operator >(const CDateTime& right) const;
- bool operator >=(const CDateTime& right) const;
- bool operator <(const CDateTime& right) const;
- bool operator <=(const CDateTime& right) const;
- bool operator ==(const CDateTime& right) const;
- bool operator !=(const CDateTime& right) const;
-
- bool operator >(const FILETIME& right) const;
- bool operator >=(const FILETIME& right) const;
- bool operator <(const FILETIME& right) const;
- bool operator <=(const FILETIME& right) const;
- bool operator ==(const FILETIME& right) const;
- bool operator !=(const FILETIME& right) const;
-
- bool operator >(const SYSTEMTIME& right) const;
- bool operator >=(const SYSTEMTIME& right) const;
- bool operator <(const SYSTEMTIME& right) const;
- bool operator <=(const SYSTEMTIME& right) const;
- bool operator ==(const SYSTEMTIME& right) const;
- bool operator !=(const SYSTEMTIME& right) const;
-
- bool operator >(const time_t& right) const;
- bool operator >=(const time_t& right) const;
- bool operator <(const time_t& right) const;
- bool operator <=(const time_t& right) const;
- bool operator ==(const time_t& right) const;
- bool operator !=(const time_t& right) const;
-
- bool operator >(const tm& right) const;
- bool operator >=(const tm& right) const;
- bool operator <(const tm& right) const;
- bool operator <=(const tm& right) const;
- bool operator ==(const tm& right) const;
- bool operator !=(const tm& right) const;
-
- CDateTime operator +(const CDateTimeSpan& right) const;
- CDateTime operator -(const CDateTimeSpan& right) const;
-
- const CDateTime& operator +=(const CDateTimeSpan& right);
- const CDateTime& operator -=(const CDateTimeSpan& right);
-
- CDateTimeSpan operator -(const CDateTime& right) const;
-
- operator FILETIME() const;
-
- virtual void Archive(CArchive& ar);
-
- void Reset();
-
- int GetDay() const;
- int GetMonth() const;
- int GetYear() const;
- int GetHour() const;
- int GetMinute() const;
- int GetSecond() const;
- int GetDayOfWeek() const;
- int GetMinuteOfDay() const;
-
- void SetDateTime(int year, int month, int day, int hour, int minute, int second);
- void SetDate(int year, int month, int day);
- void SetTime(int hour, int minute, int second);
- void SetFromDBDate(const CStdString &date);
- void SetFromDBTime(const CStdString &time);
- void SetFromW3CDate(const CStdString &date);
-
- /*! \brief set from a database datetime format YYYY-MM-DD HH:MM:SS
- \sa GetAsDBDateTime()
- */
- void SetFromDBDateTime(const CStdString &dateTime);
-
- void GetAsSystemTime(SYSTEMTIME& time) const;
- void GetAsTime(time_t& time) const;
- void GetAsTm(tm& time) const;
- void GetAsTimeStamp(FILETIME& time) const;
-
- CDateTime GetAsUTCDateTime() const;
- CStdString GetAsDBDateTime() const;
- CStdString GetAsDBDate() const;
- CStdString GetAsLocalizedDate(bool longDate=false, bool withShortNames=true) const;
- CStdString GetAsLocalizedTime(const CStdString &format, bool withSeconds=true) const;
- CStdString GetAsLocalizedDateTime(bool longDate=false, bool withSeconds=true) const;
- CStdString GetAsRFC1123DateTime() const;
-
- void SetValid(bool yesNo);
- bool IsValid() const;
-
-private:
- bool ToFileTime(const SYSTEMTIME& time, FILETIME& fileTime) const;
- bool ToFileTime(const time_t& time, FILETIME& fileTime) const;
- bool ToFileTime(const tm& time, FILETIME& fileTime) const;
-
- void ToULargeInt(ULARGE_INTEGER& time) const;
- void FromULargeInt(const ULARGE_INTEGER& time);
-
-private:
- FILETIME m_time;
-
- typedef enum _STATE
- {
- invalid=0,
- valid
- } STATE;
-
- STATE m_state;
-};
#include "guilib/GUIListItem.h"
#include "utils/Archive.h"
#include "utils/ISerializable.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "SortFileItem.h"
#include "utils/LabelFormatter.h"
#include "GUIPassword.h"
#include "threads/CriticalSection.h"
#include "guilib/IMsgTargetCallback.h"
#include "inttypes.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include <list>
#include <map>
AutoSwitch.cpp \
BackgroundInfoLoader.cpp \
CueDocument.cpp \
- DateTime.cpp \
DynamicDll.cpp \
Favourites.cpp \
FileItem.cpp \
Util.cpp \
ViewDatabase.cpp \
XBApplicationEx.cpp \
+ XBDateTime.cpp \
xbmc.cpp \
LIB=xbmc.a
#include "TextureDatabase.h"
#include "utils/log.h"
#include "utils/Crc32.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "dbwrappers/dataset.h"
CTextureDatabase::CTextureDatabase()
--- /dev/null
+/*
+ * Copyright (C) 2005-2008 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "XBDateTime.h"
+#include "LangInfo.h"
+#include "guilib/LocalizeStrings.h"
+
+#define SECONDS_PER_DAY 86400UL
+#define SECONDS_PER_HOUR 3600UL
+#define SECONDS_PER_MINUTE 60UL
+#define SECONDS_TO_FILETIME 10000000UL
+
+/////////////////////////////////////////////////
+//
+// CDateTimeSpan
+//
+
+CDateTimeSpan::CDateTimeSpan()
+{
+ m_timeSpan.dwHighDateTime=0;
+ m_timeSpan.dwLowDateTime=0;
+}
+
+CDateTimeSpan::CDateTimeSpan(const CDateTimeSpan& span)
+{
+ m_timeSpan.dwHighDateTime=span.m_timeSpan.dwHighDateTime;
+ m_timeSpan.dwLowDateTime=span.m_timeSpan.dwLowDateTime;
+}
+
+CDateTimeSpan::CDateTimeSpan(int day, int hour, int minute, int second)
+{
+ SetDateTimeSpan(day, hour, minute, second);
+}
+
+bool CDateTimeSpan::operator >(const CDateTimeSpan& right) const
+{
+ return CompareFileTime(&m_timeSpan, &right.m_timeSpan)>0;
+}
+
+bool CDateTimeSpan::operator >=(const CDateTimeSpan& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTimeSpan::operator <(const CDateTimeSpan& right) const
+{
+ return CompareFileTime(&m_timeSpan, &right.m_timeSpan)<0;
+}
+
+bool CDateTimeSpan::operator <=(const CDateTimeSpan& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTimeSpan::operator ==(const CDateTimeSpan& right) const
+{
+ return CompareFileTime(&m_timeSpan, &right.m_timeSpan)==0;
+}
+
+bool CDateTimeSpan::operator !=(const CDateTimeSpan& right) const
+{
+ return !operator ==(right);
+}
+
+CDateTimeSpan CDateTimeSpan::operator +(const CDateTimeSpan& right) const
+{
+ CDateTimeSpan left(*this);
+
+ ULARGE_INTEGER timeLeft;
+ left.ToULargeInt(timeLeft);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeLeft.QuadPart+=timeRight.QuadPart;
+
+ left.FromULargeInt(timeLeft);
+
+ return left;
+}
+
+CDateTimeSpan CDateTimeSpan::operator -(const CDateTimeSpan& right) const
+{
+ CDateTimeSpan left(*this);
+
+ ULARGE_INTEGER timeLeft;
+ left.ToULargeInt(timeLeft);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeLeft.QuadPart-=timeRight.QuadPart;
+
+ left.FromULargeInt(timeLeft);
+
+ return left;
+}
+
+const CDateTimeSpan& CDateTimeSpan::operator +=(const CDateTimeSpan& right)
+{
+ ULARGE_INTEGER timeThis;
+ ToULargeInt(timeThis);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeThis.QuadPart+=timeRight.QuadPart;
+
+ FromULargeInt(timeThis);
+
+ return *this;
+}
+
+const CDateTimeSpan& CDateTimeSpan::operator -=(const CDateTimeSpan& right)
+{
+ ULARGE_INTEGER timeThis;
+ ToULargeInt(timeThis);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeThis.QuadPart-=timeRight.QuadPart;
+
+ FromULargeInt(timeThis);
+
+ return *this;
+}
+
+void CDateTimeSpan::ToULargeInt(ULARGE_INTEGER& time) const
+{
+ time.u.HighPart=m_timeSpan.dwHighDateTime;
+ time.u.LowPart=m_timeSpan.dwLowDateTime;
+}
+
+void CDateTimeSpan::FromULargeInt(const ULARGE_INTEGER& time)
+{
+ m_timeSpan.dwHighDateTime=time.u.HighPart;
+ m_timeSpan.dwLowDateTime=time.u.LowPart;
+}
+
+void CDateTimeSpan::SetDateTimeSpan(int day, int hour, int minute, int second)
+{
+ ULARGE_INTEGER time;
+ ToULargeInt(time);
+
+ time.QuadPart=(LONGLONG)day*SECONDS_PER_DAY*SECONDS_TO_FILETIME;
+ time.QuadPart+=(LONGLONG)hour*SECONDS_PER_HOUR*SECONDS_TO_FILETIME;
+ time.QuadPart+=(LONGLONG)minute*SECONDS_PER_MINUTE*SECONDS_TO_FILETIME;
+ time.QuadPart+=(LONGLONG)second*SECONDS_TO_FILETIME;
+
+ FromULargeInt(time);
+}
+
+void CDateTimeSpan::SetFromTimeString(const CStdString& time) // hh:mm
+{
+ int hour = atoi(time.Mid(0,2).c_str());
+ int minutes = atoi(time.Mid(3,2).c_str());
+ SetDateTimeSpan(0,hour,minutes,0);
+}
+
+int CDateTimeSpan::GetDays() const
+{
+ ULARGE_INTEGER time;
+ ToULargeInt(time);
+
+ return (int)(time.QuadPart/SECONDS_TO_FILETIME)/SECONDS_PER_DAY;
+}
+
+int CDateTimeSpan::GetHours() const
+{
+ ULARGE_INTEGER time;
+ ToULargeInt(time);
+
+ return (int)((time.QuadPart/SECONDS_TO_FILETIME)%SECONDS_PER_DAY)/SECONDS_PER_HOUR;
+}
+
+int CDateTimeSpan::GetMinutes() const
+{
+ ULARGE_INTEGER time;
+ ToULargeInt(time);
+
+ return (int)((time.QuadPart/SECONDS_TO_FILETIME%SECONDS_PER_DAY)%SECONDS_PER_HOUR)/SECONDS_PER_MINUTE;
+}
+
+int CDateTimeSpan::GetSeconds() const
+{
+ ULARGE_INTEGER time;
+ ToULargeInt(time);
+
+ return (int)(((time.QuadPart/SECONDS_TO_FILETIME%SECONDS_PER_DAY)%SECONDS_PER_HOUR)%SECONDS_PER_MINUTE)%SECONDS_PER_MINUTE;
+}
+
+void CDateTimeSpan::SetFromPeriod(const CStdString &period)
+{
+ long days = atoi(period.c_str());
+ // find the first non-space and non-number
+ int pos = period.find_first_not_of("0123456789 ", 0);
+ if (pos >= 0)
+ {
+ CStdString units = period.Mid(pos, 3);
+ if (units.CompareNoCase("wee") == 0)
+ days *= 7;
+ else if (units.CompareNoCase("mon") == 0)
+ days *= 31;
+ }
+
+ SetDateTimeSpan(days, 0, 0, 0);
+}
+
+/////////////////////////////////////////////////
+//
+// CDateTime
+//
+
+CDateTime::CDateTime()
+{
+ Reset();
+}
+
+CDateTime::CDateTime(const SYSTEMTIME &time)
+{
+ // we store internally as a FILETIME
+ m_state = ToFileTime(time, m_time) ? valid : invalid;
+}
+
+CDateTime::CDateTime(const FILETIME &time)
+{
+ m_time=time;
+ SetValid(true);
+}
+
+CDateTime::CDateTime(const CDateTime& time)
+{
+ m_time=time.m_time;
+ m_state=time.m_state;
+}
+
+CDateTime::CDateTime(const time_t& time)
+{
+ m_state = ToFileTime(time, m_time) ? valid : invalid;
+}
+
+CDateTime::CDateTime(const tm& time)
+{
+ m_state = ToFileTime(time, m_time) ? valid : invalid;
+}
+
+CDateTime::CDateTime(int year, int month, int day, int hour, int minute, int second)
+{
+ SetDateTime(year, month, day, hour, minute, second);
+}
+
+CDateTime CDateTime::GetCurrentDateTime()
+{
+ // get the current time
+ SYSTEMTIME time;
+ GetLocalTime(&time);
+
+ return CDateTime(time);
+}
+
+CDateTime CDateTime::GetUTCDateTime()
+{
+ TIME_ZONE_INFORMATION tz;
+
+ CDateTime time(GetCurrentDateTime());
+ switch(GetTimeZoneInformation(&tz))
+ {
+ case TIME_ZONE_ID_DAYLIGHT:
+ time += CDateTimeSpan(0, 0, tz.Bias + tz.DaylightBias, 0);
+ break;
+ case TIME_ZONE_ID_STANDARD:
+ time += CDateTimeSpan(0, 0, tz.Bias + tz.StandardBias, 0);
+ break;
+ case TIME_ZONE_ID_UNKNOWN:
+ time += CDateTimeSpan(0, 0, tz.Bias, 0);
+ break;
+ }
+
+ return time;
+}
+
+const CDateTime& CDateTime::operator =(const SYSTEMTIME& right)
+{
+ m_state = ToFileTime(right, m_time) ? valid : invalid;
+
+ return *this;
+}
+
+const CDateTime& CDateTime::operator =(const FILETIME& right)
+{
+ m_time=right;
+ SetValid(true);
+
+ return *this;
+}
+
+const CDateTime& CDateTime::operator =(const time_t& right)
+{
+ m_state = ToFileTime(right, m_time) ? valid : invalid;
+
+ return *this;
+}
+
+const CDateTime& CDateTime::operator =(const tm& right)
+{
+ m_state = ToFileTime(right, m_time) ? valid : invalid;
+
+ return *this;
+}
+
+bool CDateTime::operator >(const CDateTime& right) const
+{
+ return operator >(right.m_time);
+}
+
+bool CDateTime::operator >=(const CDateTime& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTime::operator <(const CDateTime& right) const
+{
+ return operator <(right.m_time);
+}
+
+bool CDateTime::operator <=(const CDateTime& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTime::operator ==(const CDateTime& right) const
+{
+ return operator ==(right.m_time);
+}
+
+bool CDateTime::operator !=(const CDateTime& right) const
+{
+ return !operator ==(right);
+}
+
+bool CDateTime::operator >(const FILETIME& right) const
+{
+ return CompareFileTime(&m_time, &right)>0;
+}
+
+bool CDateTime::operator >=(const FILETIME& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTime::operator <(const FILETIME& right) const
+{
+ return CompareFileTime(&m_time, &right)<0;
+}
+
+bool CDateTime::operator <=(const FILETIME& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTime::operator ==(const FILETIME& right) const
+{
+ return CompareFileTime(&m_time, &right)==0;
+}
+
+bool CDateTime::operator !=(const FILETIME& right) const
+{
+ return !operator ==(right);
+}
+
+bool CDateTime::operator >(const SYSTEMTIME& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator >(time);
+}
+
+bool CDateTime::operator >=(const SYSTEMTIME& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTime::operator <(const SYSTEMTIME& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator <(time);
+}
+
+bool CDateTime::operator <=(const SYSTEMTIME& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTime::operator ==(const SYSTEMTIME& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator ==(time);
+}
+
+bool CDateTime::operator !=(const SYSTEMTIME& right) const
+{
+ return !operator ==(right);
+}
+
+bool CDateTime::operator >(const time_t& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator >(time);
+}
+
+bool CDateTime::operator >=(const time_t& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTime::operator <(const time_t& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator <(time);
+}
+
+bool CDateTime::operator <=(const time_t& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTime::operator ==(const time_t& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator ==(time);
+}
+
+bool CDateTime::operator !=(const time_t& right) const
+{
+ return !operator ==(right);
+}
+
+bool CDateTime::operator >(const tm& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator >(time);
+}
+
+bool CDateTime::operator >=(const tm& right) const
+{
+ return operator >(right) || operator ==(right);
+}
+
+bool CDateTime::operator <(const tm& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator <(time);
+}
+
+bool CDateTime::operator <=(const tm& right) const
+{
+ return operator <(right) || operator ==(right);
+}
+
+bool CDateTime::operator ==(const tm& right) const
+{
+ FILETIME time;
+ ToFileTime(right, time);
+
+ return operator ==(time);
+}
+
+bool CDateTime::operator !=(const tm& right) const
+{
+ return !operator ==(right);
+}
+
+CDateTime CDateTime::operator +(const CDateTimeSpan& right) const
+{
+ CDateTime left(*this);
+
+ ULARGE_INTEGER timeLeft;
+ left.ToULargeInt(timeLeft);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeLeft.QuadPart+=timeRight.QuadPart;
+
+ left.FromULargeInt(timeLeft);
+
+ return left;
+}
+
+CDateTime CDateTime::operator -(const CDateTimeSpan& right) const
+{
+ CDateTime left(*this);
+
+ ULARGE_INTEGER timeLeft;
+ left.ToULargeInt(timeLeft);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeLeft.QuadPart-=timeRight.QuadPart;
+
+ left.FromULargeInt(timeLeft);
+
+ return left;
+}
+
+const CDateTime& CDateTime::operator +=(const CDateTimeSpan& right)
+{
+ ULARGE_INTEGER timeThis;
+ ToULargeInt(timeThis);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeThis.QuadPart+=timeRight.QuadPart;
+
+ FromULargeInt(timeThis);
+
+ return *this;
+}
+
+const CDateTime& CDateTime::operator -=(const CDateTimeSpan& right)
+{
+ ULARGE_INTEGER timeThis;
+ ToULargeInt(timeThis);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeThis.QuadPart-=timeRight.QuadPart;
+
+ FromULargeInt(timeThis);
+
+ return *this;
+}
+
+CDateTimeSpan CDateTime::operator -(const CDateTime& right) const
+{
+ CDateTimeSpan left;
+
+ ULARGE_INTEGER timeLeft;
+ left.ToULargeInt(timeLeft);
+
+ ULARGE_INTEGER timeThis;
+ ToULargeInt(timeThis);
+
+ ULARGE_INTEGER timeRight;
+ right.ToULargeInt(timeRight);
+
+ timeLeft.QuadPart=timeThis.QuadPart-timeRight.QuadPart;
+
+ left.FromULargeInt(timeLeft);
+
+ return left;
+}
+
+CDateTime::operator FILETIME() const
+{
+ return m_time;
+}
+
+void CDateTime::Archive(CArchive& ar)
+{
+ if (ar.IsStoring())
+ {
+ ar<<(int)m_state;
+ if (m_state==valid)
+ {
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+ ar<<st;
+ }
+ }
+ else
+ {
+ Reset();
+ int state;
+ ar >> (int &)state;
+ m_state = CDateTime::STATE(state);
+ if (m_state==valid)
+ {
+ SYSTEMTIME st;
+ ar>>st;
+ ToFileTime(st, m_time);
+ }
+ }
+}
+
+void CDateTime::Reset()
+{
+ SetDateTime(1601, 1, 1, 0, 0, 0);
+ SetValid(false);
+}
+
+void CDateTime::SetValid(bool yesNo)
+{
+ m_state=yesNo ? valid : invalid;
+}
+
+bool CDateTime::IsValid() const
+{
+ return m_state==valid;
+}
+
+bool CDateTime::ToFileTime(const SYSTEMTIME& time, FILETIME& fileTime) const
+{
+ return SystemTimeToFileTime(&time, &fileTime)==TRUE;
+}
+
+bool CDateTime::ToFileTime(const time_t& time, FILETIME& fileTime) const
+{
+ LONGLONG ll = Int32x32To64(time, 10000000)+0x19DB1DED53E8000LL;
+
+ fileTime.dwLowDateTime = (DWORD)(ll & 0xFFFFFFFF);
+ fileTime.dwHighDateTime = (DWORD)(ll >> 32);
+
+ return true;
+}
+
+bool CDateTime::ToFileTime(const tm& time, FILETIME& fileTime) const
+{
+ SYSTEMTIME st;
+ ZeroMemory(&st, sizeof(SYSTEMTIME));
+
+ st.wYear=time.tm_year+1900;
+ st.wMonth=time.tm_mon+1;
+ st.wDayOfWeek=time.tm_wday;
+ st.wDay=time.tm_mday;
+ st.wHour=time.tm_hour;
+ st.wMinute=time.tm_min;
+ st.wSecond=time.tm_sec;
+
+ return SystemTimeToFileTime(&st, &fileTime)==TRUE;
+}
+
+void CDateTime::ToULargeInt(ULARGE_INTEGER& time) const
+{
+ time.u.HighPart=m_time.dwHighDateTime;
+ time.u.LowPart=m_time.dwLowDateTime;
+}
+
+void CDateTime::FromULargeInt(const ULARGE_INTEGER& time)
+{
+ m_time.dwHighDateTime=time.u.HighPart;
+ m_time.dwLowDateTime=time.u.LowPart;
+}
+
+void CDateTime::SetFromDateString(const CStdString &date)
+{
+ if (date.IsEmpty())
+ {
+ SetValid(false);
+ return;
+ }
+
+ const char* months[] = {"january","february","march","april","may","june","july","august","september","october","november","december",NULL};
+ int j=0;
+ int iDayPos = date.Find("day");
+ int iPos = date.Find(" ");
+ if (iDayPos < iPos && iDayPos > -1)
+ {
+ iDayPos = iPos+1;
+ iPos = date.Find(" ",iPos+1);
+ }
+ else
+ iDayPos = 0;
+
+ CStdString strMonth = date.Mid(iDayPos,iPos-iDayPos);
+ if (strMonth.IsEmpty()) // assume dbdate format
+ {
+ SetFromDBDate(date);
+ return;
+ }
+
+ int iPos2 = date.Find(",");
+ CStdString strDay = date.Mid(iPos,iPos2-iPos);
+ CStdString strYear = date.Mid(date.Find(" ",iPos2)+1);
+ while (months[j] && stricmp(strMonth.c_str(),months[j]) != 0)
+ j++;
+ if (!months[j])
+ return;
+
+ SetDateTime(atol(strYear.c_str()),j+1,atol(strDay.c_str()),0,0,0);
+}
+
+int CDateTime::GetDay() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wDay;
+}
+
+int CDateTime::GetMonth() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wMonth;
+}
+
+int CDateTime::GetYear() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wYear;
+}
+
+int CDateTime::GetHour() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wHour;
+}
+
+int CDateTime::GetMinute() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wMinute;
+}
+
+int CDateTime::GetSecond() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wSecond;
+}
+
+int CDateTime::GetDayOfWeek() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ return st.wDayOfWeek;
+}
+
+int CDateTime::GetMinuteOfDay() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+ return st.wHour*60+st.wMinute;
+}
+
+void CDateTime::SetDateTime(int year, int month, int day, int hour, int minute, int second)
+{
+ SYSTEMTIME st;
+ ZeroMemory(&st, sizeof(SYSTEMTIME));
+
+ st.wYear=year;
+ st.wMonth=month;
+ st.wDay=day;
+ st.wHour=hour;
+ st.wMinute=minute;
+ st.wSecond=second;
+
+ m_state = ToFileTime(st, m_time) ? valid : invalid;
+}
+
+void CDateTime::SetDate(int year, int month, int day)
+{
+ SetDateTime(year, month, day, 0, 0, 0);
+}
+
+void CDateTime::SetTime(int hour, int minute, int second)
+{
+ // 01.01.1601 00:00:00 is 0 as filetime
+ SetDateTime(1601, 1, 1, hour, minute, second);
+}
+
+void CDateTime::GetAsSystemTime(SYSTEMTIME& time) const
+{
+ FileTimeToSystemTime(&m_time, &time);
+}
+
+#define UNIX_BASE_TIME 116444736000000000LL /* nanoseconds since epoch */
+void CDateTime::GetAsTime(time_t& time) const
+{
+ LONGLONG ll;
+ ll = ((LONGLONG)m_time.dwHighDateTime << 32) + m_time.dwLowDateTime;
+ time=(time_t)((ll - UNIX_BASE_TIME) / 10000000);
+}
+
+void CDateTime::GetAsTm(tm& time) const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ time.tm_year=st.wYear-1900;
+ time.tm_mon=st.wMonth-1;
+ time.tm_wday=st.wDayOfWeek;
+ time.tm_mday=st.wDay;
+ time.tm_hour=st.wHour;
+ time.tm_min=st.wMinute;
+ time.tm_sec=st.wSecond;
+
+ mktime(&time);
+}
+
+void CDateTime::GetAsTimeStamp(FILETIME& time) const
+{
+ ::LocalFileTimeToFileTime(&m_time, &time);
+}
+
+CStdString CDateTime::GetAsDBDate() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ CStdString date;
+ date.Format("%04i-%02i-%02i", st.wYear, st.wMonth, st.wDay);
+
+ return date;
+}
+
+CStdString CDateTime::GetAsDBDateTime() const
+{
+ SYSTEMTIME st;
+ GetAsSystemTime(st);
+
+ CStdString date;
+ date.Format("%04i-%02i-%02i %02i:%02i:%02i", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
+
+ return date;
+}
+
+void CDateTime::SetFromW3CDate(const CStdString &dateTime)
+{
+ CStdString date, time, zone;
+
+ int posT = dateTime.Find("T");
+ if(posT >= 0)
+ {
+ date = dateTime.Left(posT);
+ CStdString::size_type posZ = dateTime.find_first_of("+-Z", posT);
+ if(posZ == CStdString::npos)
+ time = dateTime.Mid(posT+1);
+ else
+ {
+ time = dateTime.Mid(posT+1, posZ-posT-1);
+ zone = dateTime.Mid(posZ);
+ }
+ }
+ else
+ date = dateTime;
+
+ int year = 0, month = 1, day = 1, hour = 0, min = 0, sec = 0;
+
+ if (date.size() >= 4)
+ year = atoi(date.Mid(0,4).c_str());
+
+ if (date.size() >= 10)
+ {
+ month = atoi(date.Mid(5,2).c_str());
+ day = atoi(date.Mid(8,2).c_str());
+ }
+
+ if (time.length() >= 5)
+ {
+ hour = atoi(time.Mid(0,2).c_str());
+ min = atoi(time.Mid(3,2).c_str());
+ }
+
+ if (time.length() >= 8)
+ sec = atoi(time.Mid(6,2).c_str());
+
+ SetDateTime(year, month, day, hour, min, sec);
+}
+
+void CDateTime::SetFromDBDateTime(const CStdString &dateTime)
+{
+ // assumes format YYYY-MM-DD HH:MM:SS
+ if (dateTime.size() == 19)
+ {
+ int year = atoi(dateTime.Mid(0,4).c_str());
+ int month = atoi(dateTime.Mid(5,2).c_str());
+ int day = atoi(dateTime.Mid(8,2).c_str());
+ int hour = atoi(dateTime.Mid(11,2).c_str());
+ int min = atoi(dateTime.Mid(14,2).c_str());
+ int sec = atoi(dateTime.Mid(17,2).c_str());
+ SetDateTime(year, month, day, hour, min, sec);
+ }
+}
+
+void CDateTime::SetFromDBDate(const CStdString &date)
+{
+ // assumes format:
+ // YYYY-MM-DD or DD-MM-YYYY
+ int year = 0, month = 0, day = 0;
+ if (date.size() > 2 && (date[2] == '-' || date[2] == '.'))
+ {
+ day = atoi(date.Mid(0,2).c_str());
+ month = atoi(date.Mid(3,2).c_str());
+ year = atoi(date.Mid(6,4).c_str());
+ }
+ else
+ {
+ year = atoi(date.Mid(0,4).c_str());
+ month = atoi(date.Mid(5,2).c_str());
+ day = atoi(date.Mid(8,2).c_str());
+ }
+ SetDate(year, month, day);
+}
+
+void CDateTime::SetFromDBTime(const CStdString &time)
+{
+ // assumes format:
+ // HH:MM:SS
+ int hour, minute, second;
+
+ hour = atoi(time.Mid(0,2).c_str());
+ minute = atoi(time.Mid(3,2).c_str());
+ second = atoi(time.Mid(6,2).c_str());
+
+ SetTime(hour, minute, second);
+}
+
+CStdString CDateTime::GetAsLocalizedTime(const CStdString &format, bool withSeconds) const
+{
+ CStdString strOut;
+ const CStdString& strFormat = format.IsEmpty() ? g_langInfo.GetTimeFormat() : format;
+
+ SYSTEMTIME dateTime;
+ GetAsSystemTime(dateTime);
+
+ // Prefetch meridiem symbol
+ const CStdString& strMeridiem=g_langInfo.GetMeridiemSymbol(dateTime.wHour > 11 ? CLangInfo::MERIDIEM_SYMBOL_PM : CLangInfo::MERIDIEM_SYMBOL_AM);
+
+ int length=strFormat.GetLength();
+ for (int i=0; i<length; ++i)
+ {
+ char c=strFormat[i];
+ if (c=='\'')
+ {
+ // To be able to display a "'" in the string,
+ // find the last "'" that doesn't follow a "'"
+ int pos=i+1;
+ while(((pos=strFormat.Find(c,pos+1))>-1 && pos<strFormat.GetLength()) && strFormat[pos+1]=='\'') {}
+
+ CStdString strPart;
+ if (pos>-1)
+ {
+ // Extract string between ' '
+ strPart=strFormat.Mid(i+1, pos-i-1);
+ i=pos;
+ }
+ else
+ {
+ strPart=strFormat.Mid(i+1, length-i-1);
+ i=length;
+ }
+
+ strPart.Replace("''", "'");
+
+ strOut+=strPart;
+ }
+ else if (c=='h' || c=='H') // parse hour (H="24 hour clock")
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the hour mask, eg. HH
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ int hour=dateTime.wHour;
+ if (c=='h')
+ { // recalc to 12 hour clock
+ if (hour > 11)
+ hour -= (12 * (hour > 12));
+ else
+ hour += (12 * (hour < 1));
+ }
+
+ // Format hour string with the length of the mask
+ CStdString str;
+ if (partLength==1)
+ str.Format("%d", hour);
+ else
+ str.Format("%02d", hour);
+
+ strOut+=str;
+ }
+ else if (c=='m') // parse minutes
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the minute mask, eg. mm
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ // Format minute string with the length of the mask
+ CStdString str;
+ if (partLength==1)
+ str.Format("%d", dateTime.wMinute);
+ else
+ str.Format("%02d", dateTime.wMinute);
+
+ strOut+=str;
+ }
+ else if (c=='s') // parse seconds
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the seconds mask, eg. ss
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ if (withSeconds)
+ {
+ // Format seconds string with the length of the mask
+ CStdString str;
+ if (partLength==1)
+ str.Format("%d", dateTime.wSecond);
+ else
+ str.Format("%02d", dateTime.wSecond);
+
+ strOut+=str;
+ }
+ else
+ strOut.Delete(strOut.GetLength()-1,1);
+ }
+ else if (c=='x') // add meridiem symbol
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the meridiem mask
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ strOut+=strMeridiem;
+ }
+ else // everything else pass to output
+ strOut+=c;
+ }
+
+ return strOut;
+}
+
+CStdString CDateTime::GetAsLocalizedDate(bool longDate/*=false*/, bool withShortNames/*=true*/) const
+{
+ CStdString strOut;
+
+ const CStdString& strFormat=g_langInfo.GetDateFormat(longDate);
+
+ SYSTEMTIME dateTime;
+ GetAsSystemTime(dateTime);
+
+ int length=strFormat.GetLength();
+
+ for (int i=0; i<length; ++i)
+ {
+ char c=strFormat[i];
+ if (c=='\'')
+ {
+ // To be able to display a "'" in the string,
+ // find the last "'" that doesn't follow a "'"
+ int pos=i+1;
+ while(((pos=strFormat.Find(c,pos+1))>-1 && pos<strFormat.GetLength()) && strFormat[pos+1]=='\'') {}
+
+ CStdString strPart;
+ if (pos>-1)
+ {
+ // Extract string between ' '
+ strPart=strFormat.Mid(i+1, pos-i-1);
+ i=pos;
+ }
+ else
+ {
+ strPart=strFormat.Mid(i+1, length-i-1);
+ i=length;
+ }
+ strPart.Replace("''", "'");
+ strOut+=strPart;
+ }
+ else if (c=='D') // parse days
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the day mask, eg. DDDD
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ // Format string with the length of the mask
+ CStdString str;
+ if (partLength==1) // single-digit number
+ str.Format("%d", dateTime.wDay);
+ else if (partLength==2) // two-digit number
+ str.Format("%02d", dateTime.wDay);
+ else // Day of week string
+ {
+ int wday = dateTime.wDayOfWeek;
+ if (wday < 1 || wday > 7) wday = 7;
+ str = g_localizeStrings.Get((withShortNames ? 40 : 10) + wday);
+ }
+ strOut+=str;
+ }
+ else if (c=='M') // parse month
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the month mask, eg. MMMM
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ // Format string with the length of the mask
+ CStdString str;
+ if (partLength==1) // single-digit number
+ str.Format("%d", dateTime.wMonth);
+ else if (partLength==2) // two-digit number
+ str.Format("%02d", dateTime.wMonth);
+ else // Month string
+ {
+ int wmonth = dateTime.wMonth;
+ if (wmonth < 1 || wmonth > 12) wmonth = 12;
+ str = g_localizeStrings.Get((withShortNames ? 50 : 20) + wmonth);
+ }
+ strOut+=str;
+ }
+ else if (c=='Y') // parse year
+ {
+ int partLength=0;
+
+ int pos=strFormat.find_first_not_of(c,i+1);
+ if (pos>-1)
+ {
+ // Get length of the year mask, eg. YYYY
+ partLength=pos-i;
+ i=pos-1;
+ }
+ else
+ {
+ // mask ends at the end of the string, extract it
+ partLength=length-i;
+ i=length;
+ }
+
+ // Format string with the length of the mask
+ CStdString str;
+ str.Format("%d", dateTime.wYear); // four-digit number
+ if (partLength<=2)
+ str.Delete(0, 2); // two-digit number
+
+ strOut+=str;
+ }
+ else // everything else pass to output
+ strOut+=c;
+ }
+
+ return strOut;
+}
+
+CStdString CDateTime::GetAsLocalizedDateTime(bool longDate/*=false*/, bool withSeconds/*=true*/) const
+{
+ return GetAsLocalizedDate(longDate)+" "+GetAsLocalizedTime("", withSeconds);
+}
+
+CDateTime CDateTime::GetAsUTCDateTime() const
+{
+ TIME_ZONE_INFORMATION tz;
+
+ CDateTime time(m_time);
+ switch(GetTimeZoneInformation(&tz))
+ {
+ case TIME_ZONE_ID_DAYLIGHT:
+ time += CDateTimeSpan(0, 0, tz.Bias + tz.DaylightBias, 0);
+ break;
+ case TIME_ZONE_ID_STANDARD:
+ time += CDateTimeSpan(0, 0, tz.Bias + tz.StandardBias, 0);
+ break;
+ case TIME_ZONE_ID_UNKNOWN:
+ time += CDateTimeSpan(0, 0, tz.Bias, 0);
+ break;
+ }
+
+ return time;
+}
+
+static const char *DAY_NAMES[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+static const char *MONTH_NAMES[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+CStdString CDateTime::GetAsRFC1123DateTime() const
+{
+ CDateTime time(GetAsUTCDateTime());
+ CStdString result;
+ result.Format("%s, %02i %s %04i %02i:%02i:%02i GMT", DAY_NAMES[time.GetDayOfWeek()], time.GetDay(), MONTH_NAMES[time.GetMonth()-1], time.GetYear(), time.GetHour(), time.GetMinute(), time.GetSecond());
+ return result;
+}
--- /dev/null
+#pragma once
+
+/*
+ * Copyright (C) 2005-2008 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "utils/Archive.h"
+
+/*! \brief TIME_FORMAT enum/bitmask used for formatting time strings
+ Note the use of bitmasking, e.g.
+ TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS
+ \sa StringUtils::SecondsToTimeString
+ */
+enum TIME_FORMAT { TIME_FORMAT_GUESS = 0,
+ TIME_FORMAT_SS = 1,
+ TIME_FORMAT_MM = 2,
+ TIME_FORMAT_MM_SS = 3,
+ TIME_FORMAT_HH = 4,
+ TIME_FORMAT_HH_SS = 5, // not particularly useful
+ TIME_FORMAT_HH_MM = 6,
+ TIME_FORMAT_HH_MM_SS = 7,
+ TIME_FORMAT_XX = 8, // AM/PM
+ TIME_FORMAT_HH_MM_XX = 14};
+
+class CDateTime;
+
+class CDateTimeSpan
+{
+public:
+ CDateTimeSpan();
+ CDateTimeSpan(const CDateTimeSpan& span);
+ CDateTimeSpan(int day, int hour, int minute, int second);
+
+ bool operator >(const CDateTimeSpan& right) const;
+ bool operator >=(const CDateTimeSpan& right) const;
+ bool operator <(const CDateTimeSpan& right) const;
+ bool operator <=(const CDateTimeSpan& right) const;
+ bool operator ==(const CDateTimeSpan& right) const;
+ bool operator !=(const CDateTimeSpan& right) const;
+
+ CDateTimeSpan operator +(const CDateTimeSpan& right) const;
+ CDateTimeSpan operator -(const CDateTimeSpan& right) const;
+
+ const CDateTimeSpan& operator +=(const CDateTimeSpan& right);
+ const CDateTimeSpan& operator -=(const CDateTimeSpan& right);
+
+ void SetDateTimeSpan(int day, int hour, int minute, int second);
+ void SetFromPeriod(const CStdString &period);
+ void SetFromTimeString(const CStdString& time);
+
+ int GetDays() const;
+ int GetHours() const;
+ int GetMinutes() const;
+ int GetSeconds() const;
+
+private:
+ void ToULargeInt(ULARGE_INTEGER& time) const;
+ void FromULargeInt(const ULARGE_INTEGER& time);
+
+private:
+ FILETIME m_timeSpan;
+
+ friend class CDateTime;
+};
+
+/// \brief DateTime class, which uses FILETIME as it's base.
+class CDateTime : public IArchivable
+{
+public:
+ CDateTime();
+ CDateTime(const CDateTime& time);
+ CDateTime(const SYSTEMTIME& time);
+ CDateTime(const FILETIME& time);
+ CDateTime(const time_t& time);
+ CDateTime(const tm& time);
+ CDateTime(int year, int month, int day, int hour, int minute, int second);
+ virtual ~CDateTime() {}
+
+ void SetFromDateString(const CStdString &date);
+
+ static CDateTime GetCurrentDateTime();
+ static CDateTime GetUTCDateTime();
+
+ const CDateTime& operator =(const SYSTEMTIME& right);
+ const CDateTime& operator =(const FILETIME& right);
+ const CDateTime& operator =(const time_t& right);
+ const CDateTime& operator =(const tm& right);
+
+ bool operator >(const CDateTime& right) const;
+ bool operator >=(const CDateTime& right) const;
+ bool operator <(const CDateTime& right) const;
+ bool operator <=(const CDateTime& right) const;
+ bool operator ==(const CDateTime& right) const;
+ bool operator !=(const CDateTime& right) const;
+
+ bool operator >(const FILETIME& right) const;
+ bool operator >=(const FILETIME& right) const;
+ bool operator <(const FILETIME& right) const;
+ bool operator <=(const FILETIME& right) const;
+ bool operator ==(const FILETIME& right) const;
+ bool operator !=(const FILETIME& right) const;
+
+ bool operator >(const SYSTEMTIME& right) const;
+ bool operator >=(const SYSTEMTIME& right) const;
+ bool operator <(const SYSTEMTIME& right) const;
+ bool operator <=(const SYSTEMTIME& right) const;
+ bool operator ==(const SYSTEMTIME& right) const;
+ bool operator !=(const SYSTEMTIME& right) const;
+
+ bool operator >(const time_t& right) const;
+ bool operator >=(const time_t& right) const;
+ bool operator <(const time_t& right) const;
+ bool operator <=(const time_t& right) const;
+ bool operator ==(const time_t& right) const;
+ bool operator !=(const time_t& right) const;
+
+ bool operator >(const tm& right) const;
+ bool operator >=(const tm& right) const;
+ bool operator <(const tm& right) const;
+ bool operator <=(const tm& right) const;
+ bool operator ==(const tm& right) const;
+ bool operator !=(const tm& right) const;
+
+ CDateTime operator +(const CDateTimeSpan& right) const;
+ CDateTime operator -(const CDateTimeSpan& right) const;
+
+ const CDateTime& operator +=(const CDateTimeSpan& right);
+ const CDateTime& operator -=(const CDateTimeSpan& right);
+
+ CDateTimeSpan operator -(const CDateTime& right) const;
+
+ operator FILETIME() const;
+
+ virtual void Archive(CArchive& ar);
+
+ void Reset();
+
+ int GetDay() const;
+ int GetMonth() const;
+ int GetYear() const;
+ int GetHour() const;
+ int GetMinute() const;
+ int GetSecond() const;
+ int GetDayOfWeek() const;
+ int GetMinuteOfDay() const;
+
+ void SetDateTime(int year, int month, int day, int hour, int minute, int second);
+ void SetDate(int year, int month, int day);
+ void SetTime(int hour, int minute, int second);
+ void SetFromDBDate(const CStdString &date);
+ void SetFromDBTime(const CStdString &time);
+ void SetFromW3CDate(const CStdString &date);
+
+ /*! \brief set from a database datetime format YYYY-MM-DD HH:MM:SS
+ \sa GetAsDBDateTime()
+ */
+ void SetFromDBDateTime(const CStdString &dateTime);
+
+ void GetAsSystemTime(SYSTEMTIME& time) const;
+ void GetAsTime(time_t& time) const;
+ void GetAsTm(tm& time) const;
+ void GetAsTimeStamp(FILETIME& time) const;
+
+ CDateTime GetAsUTCDateTime() const;
+ CStdString GetAsDBDateTime() const;
+ CStdString GetAsDBDate() const;
+ CStdString GetAsLocalizedDate(bool longDate=false, bool withShortNames=true) const;
+ CStdString GetAsLocalizedTime(const CStdString &format, bool withSeconds=true) const;
+ CStdString GetAsLocalizedDateTime(bool longDate=false, bool withSeconds=true) const;
+ CStdString GetAsRFC1123DateTime() const;
+
+ void SetValid(bool yesNo);
+ bool IsValid() const;
+
+private:
+ bool ToFileTime(const SYSTEMTIME& time, FILETIME& fileTime) const;
+ bool ToFileTime(const time_t& time, FILETIME& fileTime) const;
+ bool ToFileTime(const tm& time, FILETIME& fileTime) const;
+
+ void ToULargeInt(ULARGE_INTEGER& time) const;
+ void FromULargeInt(const ULARGE_INTEGER& time);
+
+private:
+ FILETIME m_time;
+
+ typedef enum _STATE
+ {
+ invalid=0,
+ valid
+ } STATE;
+
+ STATE m_state;
+};
#include "AddonDatabase.h"
#include "addons/AddonManager.h"
#include "utils/log.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "addons/Service.h"
#include "dbwrappers/dataset.h"
#include "Addon.h"
#include "AddonManager.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "URL.h"
#include "utils/Job.h"
#include "threads/CriticalSection.h"
*
*/
#include "addons/Addon.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "utils/ScraperParser.h"
typedef enum
bool Win32DllLoader::ResolveImport(const char *dllName, const char *functionName, void **fixup)
{
char *dll = GetName();
-#ifdef HAVE_LIBPYTHON2_6
- if (strstr(dll, "python26.dll")
-#else
- if (strstr(dll, "python24.dll")
-#endif
- || strstr(dll, ".pyd"))
+#if !defined(USE_EXTERNAL_PYTHON)
+ if (strstr(dll, "python24.dll") || strstr(dll, ".pyd"))
{ // special case for python
if (FunctionNeedsWrapping(win32_python_exports, functionName, fixup))
return true;
}
+#endif
return FunctionNeedsWrapping(win32_exports, functionName, fixup);
}
*/
#include "guilib/GUIDialog.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
class CGUIDialogSeekBar : public CGUIDialog
{
#include "IDirectory.h"
#include "MythSession.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
namespace XFILE
{
*/
#include "MythFile.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "FileItem.h"
#include "utils/URIUtils.h"
#include "DllLibCMyth.h"
#include "IFile.h"
#include "ILiveTV.h"
#include "MythSession.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "video/VideoInfoTag.h"
#include <queue>
#include "MythSession.h"
#include "video/VideoInfoTag.h"
#include "settings/AdvancedSettings.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "FileItem.h"
#include "URL.h"
#include "utils/URIUtils.h"
#include "dialogs/GUIDialogKeyboard.h"
#include "dialogs/GUIDialogNumeric.h"
#include "LocalizeStrings.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "utils/md5.h"
#ifdef __APPLE__
+++ /dev/null
-SRCS=XBPython.cpp \
- XBPythonDll.cpp \
- XBPythonDllFuncs.S \
- XBPyThread.cpp \
-
-LIB=python.a
-
-include ../../../Makefile.include
--include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(patsubst %.S,,$(SRCS))))
--- /dev/null
+SRCS=XBPython.cpp \
+ XBPyThread.cpp
+
+ifneq (@USE_EXTERNAL_PYTHON@,1)
+SRCS+=XBPythonDllFuncs.S \
+ XBPythonDll.cpp
+endif
+
+LIB=python.a
+
+INCLUDES+= @PYTHON_CPPFLAGS@
+
+include @abs_top_srcdir@/Makefile.include
+-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(pathsubst %.S,,$(SRCS))))
*
*/
+#if (defined HAVE_CONFIG_H) && (!defined WIN32)
+ #include "config.h"
+#endif
+
// python.h should always be included first before any other includes
+#include <Python.h>
+#include <osdefs.h>
+
#include "system.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #include <python2.6/osdefs.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #include <python2.5/osdefs.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #include <python2.4/osdefs.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
- #include "python/Include/osdefs.h"
-#endif
#include "XBPythonDll.h"
#include "filesystem/SpecialProtocol.h"
#include "guilib/GUIWindowManager.h"
{
// we want to use sys.path so it includes site-packages
// if this fails, default to using Py_GetPath
- PyObject *sysMod(PyImport_ImportModule("sys")); // must call Py_DECREF when finished
+ PyObject *sysMod(PyImport_ImportModule((char*)"sys")); // must call Py_DECREF when finished
PyObject *sysModDict(PyModule_GetDict(sysMod)); // borrowed ref, no need to delete
PyObject *pathObj(PyDict_GetItemString(sysModDict, "path")); // borrowed ref, no need to delete
{
if (m_type == 'F')
{
+#ifdef USE_EXTERNAL_PYTHON
// run script from file
- FILE *fp = fopen_utf8(_P(m_source).c_str(), "r");
+ // We need to have python open the file because on Windows the DLL that python
+ // is linked against may not be the DLL that xbmc is linked against so
+ // passing a FILE* to python from an fopen has the potential to crash.
+ PyObject* file = PyFile_FromString((char *) _P(m_source).c_str(), (char*)"r");
+ FILE *fp = PyFile_AsFile(file);
+#else
+ FILE *fp = fopen_utf8(_P(m_source).c_str(), "r");
+#endif
+
if (fp)
{
PyObject *f = PyString_FromString(_P(m_source).c_str());
PyDict_SetItemString(moduleDict, "__file__", f);
Py_DECREF(f);
PyRun_File(fp, _P(m_source).c_str(), m_Py_file_input, moduleDict, moduleDict);
+
+#ifdef USE_EXTERNAL_PYTHON
+ // Get a reference to the main module
+ // and global dictionary
+ PyObject* main_module = PyImport_AddModule((char*)"__main__");
+ PyObject* global_dict = PyModule_GetDict(main_module);
+
+ // Extract a reference to the function "func_name"
+ // from the global dictionary
+ PyObject* expression = PyDict_GetItemString(global_dict, "xbmcclosefilehack");
+
+ if (!PyObject_CallFunction(expression,(char*)"(O)",file))
+ CLog::Log(LOGERROR,"Failed to close the script file %s",_P(m_source).c_str());
+#else
fclose(fp);
+#endif
}
else
CLog::Log(LOGERROR, "%s not found!", m_source);
if (m_threadState)
{
PyEval_AcquireLock();
- PyThreadState* old = PyThreadState_Swap(m_threadState);
+ PyThreadState* old = PyThreadState_Swap((PyThreadState*)m_threadState);
PyObject *m;
m = PyImport_AddModule((char*)"xbmc");
if(!m || PyObject_SetAttrString(m, (char*)"abortRequested", PyBool_FromLong(1)))
CLog::Log(LOGERROR, "XBPyThread::stop - failed to set abortRequested");
- for(PyThreadState* state = m_threadState->interp->tstate_head; state; state = state->next)
+ for(PyThreadState* state = ((PyThreadState*)m_threadState)->interp->tstate_head; state; state = state->next)
{
Py_XDECREF(state->async_exc);
state->async_exc = PyExc_SystemExit;
#ifndef XBPYTHREAD_H_
#define XBPYTHREAD_H_
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
#include "threads/Thread.h"
class XBPython;
void stop();
protected:
- XBPython *m_pExecuter;
- PyThreadState *m_threadState;
+ XBPython *m_pExecuter;
+ void *m_threadState;
char m_type;
char *m_source;
*
*/
-// python.h should always be included first before any other includes
#if (defined HAVE_CONFIG_H) && (!defined WIN32)
#include "config.h"
#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+
+// python.h should always be included first before any other includes
+#include <Python.h>
+
+#include "system.h"
#include "cores/DllLoader/DllLoaderContainer.h"
#include "GUIPassword.h"
#include "Util.h"
#ifndef _LINUX
-#if (defined USE_EXTERNAL_PYTHON) && (defined HAVE_LIBPYTHON2_6)
-#define PYTHON_DLL "special://xbmcbin/system/python/python26.dll"
-#else
+#if !defined(USE_EXTERNAL_PYTHON)
#define PYTHON_DLL "special://xbmcbin/system/python/python24.dll"
#endif
#else
"\t\txbmc.output('.')\n"
"\tdef flush(self):\n"
"\t\txbmc.output('.')\n"
- "\n"
"import sys\n"
"sys.stdout = xbmcout()\n"
"sys.stderr = xbmcout()\n"
+ "def xbmcclosefilehack(f):\n"
+// "\txbmc.output(\"Closing Script File.\")\n"
+ "\tf.close()\n"
+ "\n"
"print '-->Python Interpreter Initialized<--'\n"
"") == -1)
{
m_iDllScriptCounter++;
if (!m_bInitialized)
{
+#if !defined(USE_EXTERNAL_PYTHON)
m_pDll = DllLoaderContainer::LoadModule(PYTHON_DLL, NULL, true);
if (!m_pDll || !python_load_dll(*m_pDll))
Finalize();
return;
}
+#endif
// first we check if all necessary files are installed
#ifndef _LINUX
!FileExist("special://xbmc/system/python/DLLs/bz2.pyd") ||
!FileExist("special://xbmc/system/python/DLLs/pyexpat.pyd") ||
!FileExist("special://xbmc/system/python/DLLs/select.pyd") ||
-#ifndef HAVE_LIBPYTHON2_6
- !FileExist("special://xbmc/system/python/DLLs/zlib.pyd") ||
-#endif
!FileExist("special://xbmc/system/python/DLLs/unicodedata.pyd"))
{
CLog::Log(LOGERROR, "Python: Missing files, unable to execute script");
}
setenv("PYTHONCASEOK", "1", 1); //This line should really be removed
CLog::Log(LOGDEBUG, "Python wrapper library linked with system Python library");
+#elif defined(_WIN32)
+ // because the third party build of python is compiled with vs2008 we need
+ // a hack to set the PYTHONPATH
+ // buf is corrupted after putenv and might need a strdup but it seems to
+ // work this way
+ CStdString buf;
+ buf = "PYTHONPATH=" + _P("special://xbmc/system/python/DLLs") + ";" + _P("special://xbmc/system/python/Lib");
+ pgwin32_putenv(buf.c_str());
+ buf = "PYTHONOPTIMIZE=1";
+ pgwin32_putenv(buf.c_str());
+ buf = "PYTHONHOME=" + _P("special://xbmc/system/python");
+ pgwin32_putenv(buf.c_str());
+ buf = "OS=win32";
+ pgwin32_putenv(buf.c_str());
+
#endif /* USE_EXTERNAL_PYTHON */
- Py_Initialize();
- // If this is not the first time we initialize Python, the interpreter
- // lock already exists and we need to lock it as PyEval_InitThreads
- // would not do that in that case.
-#if defined(__APPLE__) && defined(USE_EXTERNAL_PYTHON)
- // grrr, we hang at PyEval_ThreadsInitialized after unloading/loading python
- PyEval_InitThreads();
-#else
if (PyEval_ThreadsInitialized())
PyEval_AcquireLock();
else
PyEval_InitThreads();
-#endif
+
+ Py_Initialize();
+ PyEval_ReleaseLock();
+
+ // If this is not the first time we initialize Python, the interpreter
+ // lock already exists and we need to lock it as PyEval_InitThreads
+ // would not do that in that case.
+ PyEval_AcquireLock();
char* python_argv[1] = { (char*)"" } ;
PySys_SetArgv(1, python_argv);
{
if (m_bInitialized)
{
- CLog::Log(LOGINFO, "Python, unloading python24.dll because no scripts are running anymore");
+ CLog::Log(LOGINFO, "Python, unloading python shared library because no scripts are running anymore");
PyEval_AcquireLock();
- PyThreadState_Swap(m_mainThreadState);
+ PyThreadState_Swap((PyThreadState*)m_mainThreadState);
Py_Finalize();
PyEval_ReleaseLock();
-#if !(defined(__APPLE__) && defined(USE_EXTERNAL_PYTHON))
+#if !((defined(__APPLE__) || defined(_WIN32)) && defined(USE_EXTERNAL_PYTHON))
UnloadExtensionLibs();
#endif
// first free all dlls loaded by python, after that python24.dll (this is done by UnloadPythonDlls
-#if !(defined(__APPLE__) && defined(USE_EXTERNAL_PYTHON))
+#if !((defined(__APPLE__) || defined(_WIN32)) && defined(USE_EXTERNAL_PYTHON))
DllLoaderContainer::UnloadPythonDlls();
#endif
#if defined(_LINUX) && !(defined(__APPLE__) && defined(USE_EXTERNAL_PYTHON))
}
}
-PyThreadState *XBPython::getMainThreadState()
+void* XBPython::getMainThreadState()
{
CSingleLock lock(m_critSection);
return m_mainThreadState;
// returns -1 if no scripts exist with specified filename
int getScriptId(const CStdString &strFile);
- PyThreadState *getMainThreadState();
+ void* getMainThreadState();
bool m_bLogin;
CCriticalSection m_critSection;
bool FileExist(const char* strFile);
int m_nextid;
- PyThreadState* m_mainThreadState;
+ void* m_mainThreadState;
ThreadIdentifier m_ThreadId;
bool m_bInitialized;
HANDLE m_hEvent;
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
+#include "system.h"
#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/pyconfig.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
+#include <Python.h>
#else
#include "python/Include/pyconfig.h"
#endif
#if (defined HAVE_CONFIG_H) && (!defined WIN32)
#include "config.h"
#endif
+
+#if (!defined USE_EXTERNAL_PYTHON)
#define DATA_OBJECT(data) unsigned long pointer_##data;
#define _Py_NoneStruct (*((PyObject*)pointer__Py_NoneStruct))
#define PyExc_RuntimeError ((PyObject*)(*(long*)pointer_PyExc_RuntimeError))
#define PyExc_ReferenceError ((PyObject*)(*(long*)pointer_PyExc_ReferenceError))
+#if defined(_WIN32) && defined(Py_TRACE_REFS)
+#define _Py_RefTotal (*((Py_ssize_t*)pointer__Py_RefTotal))
+#endif
+
#if (defined USE_EXTERNAL_PYTHON) && (!defined HAVE_LIBPYTHON2_4)
/* Upstream Python rename Py_InitModule4 for 64-bit systems for Python
versions higher than 2.4 */
extern DATA_OBJECT(PyExc_RuntimeError)
extern DATA_OBJECT(PyExc_ReferenceError)
+#if defined(_WIN32) && defined(Py_TRACE_REFS)
+ extern DATA_OBJECT(_Py_RefTotal)
+#endif
+
bool python_load_dll(LibraryLoader& dll);
#ifdef __cplusplus
}
#endif
+#endif
#include "config.h"
#endif
#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/pyconfig.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
+#include <pyconfig.h>
#else
#include "python/Include/pyconfig.h"
#endif
*
*/
-#include "GUIPythonWindow.h"
#include "pyutil.h"
+#include "GUIPythonWindow.h"
#include "window.h"
#include "control.h"
#include "action.h"
using namespace PYXBMC;
-PyXBMCAction::PyXBMCAction(PyObject*& callback)
+PyXBMCAction::PyXBMCAction(void*& callback)
: param(0), pCallbackWindow(NULL), pObject(NULL), controlId(0), type(0)
{
// this is ugly, but we can't grab python lock
// callback can become null while we are trying
// to grab python lock above, so anything using
// this should allow that situation
- pCallbackWindow = callback;
- Py_XINCREF(callback);
+ void* tmp = callback; // copy the referenced value
+ pCallbackWindow = (PyObject*)tmp; // assign internally
+ Py_XINCREF((PyObject*)callback);
PyEval_ReleaseLock();
}
PyXBMCAction::~PyXBMCAction() {
- Py_XDECREF(pObject);
- Py_XDECREF(pCallbackWindow);
+ Py_XDECREF((PyObject*)pObject);
+ Py_XDECREF((PyObject*)pCallbackWindow);
}
CGUIPythonWindow::CGUIPythonWindow(int id)
inf->pObject = Action_FromAction(action);
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnAction, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnAction, inf);
PulseActionEvent();
}
return ret;
Control* pControl = *it;
if (pControl->iControlId == iControl)
{
- inf->pObject = (PyObject*)pControl;
- Py_INCREF(inf->pObject);
+ inf->pObject = pControl;
+ Py_INCREF((PyObject*)inf->pObject);
break;
}
++it;
if (inf->pObject)
{
// currently we only accept messages from a button or controllist with a select action
- if ((ControlList_CheckExact(inf->pObject) && (message.GetParam1() == ACTION_SELECT_ITEM || message.GetParam1() == ACTION_MOUSE_LEFT_CLICK)) ||
- ControlButton_CheckExact(inf->pObject) || ControlRadioButton_CheckExact(inf->pObject) ||
- ControlCheckMark_CheckExact(inf->pObject))
+ if ((ControlList_CheckExact((PyObject*)inf->pObject) && (message.GetParam1() == ACTION_SELECT_ITEM || message.GetParam1() == ACTION_MOUSE_LEFT_CLICK)) ||
+ ControlButton_CheckExact((PyObject*)inf->pObject) || ControlRadioButton_CheckExact((PyObject*)inf->pObject) ||
+ ControlCheckMark_CheckExact((PyObject*)inf->pObject))
{
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnControl, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnControl, inf);
PulseActionEvent();
// return true here as we are handling the event
return CGUIWindow::OnMessage(message);
}
-void CGUIPythonWindow::SetCallbackWindow(PyThreadState *state, PyObject *object)
+void CGUIPythonWindow::SetCallbackWindow(void *state, void *object)
{
pCallbackWindow = object;
m_threadState = state;
if (action->pCallbackWindow)
{
PyXBMCAction* action = (PyXBMCAction*)arg;
- PyObject *ret = PyObject_CallMethod(action->pCallbackWindow, (char*)"onControl", (char*)"(O)", action->pObject);
+ PyObject *ret = PyObject_CallMethod((PyObject*)action->pCallbackWindow, (char*)"onControl", (char*)"(O)", (PyObject*)action->pObject);
if (ret) {
Py_DECREF(ret);
}
{
Action *pAction= (Action *)action->pObject;
- PyObject *ret = PyObject_CallMethod(action->pCallbackWindow, (char*)"onAction", (char*)"(O)", pAction);
+ PyObject *ret = PyObject_CallMethod((PyObject*)action->pCallbackWindow, (char*)"onAction", (char*)"(O)", (PyObject*)pAction);
if (ret) {
Py_DECREF(ret);
}
*/
#include "guilib/GUIWindow.h"
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
class PyXBMCAction
{
public:
int param;
- PyObject* pCallbackWindow;
- PyObject* pObject;
+ void* pCallbackWindow;
+ void* pObject;
int controlId; // for XML window
#if defined(_LINUX) || defined(_WIN32)
int type; // 0=Action, 1=Control;
#endif
- PyXBMCAction(PyObject*& callback);
+ PyXBMCAction(void*& callback);
virtual ~PyXBMCAction() ;
};
virtual ~CGUIPythonWindow(void);
virtual bool OnMessage(CGUIMessage& message);
virtual bool OnAction(const CAction &action);
- void SetCallbackWindow(PyThreadState *state, PyObject *object);
+ void SetCallbackWindow(void* state, void *object);
void WaitForActionEvent(unsigned int timeout);
void PulseActionEvent();
protected:
- PyObject* pCallbackWindow;
- PyThreadState* m_threadState;
+ void* pCallbackWindow;
+ void* m_threadState;
HANDLE m_actionEvent;
};
*
*/
-#include "GUIPythonWindowXML.h"
#include "pyutil.h"
+#include "GUIPythonWindowXML.h"
#include "window.h"
#include "control.h"
#include "action.h"
inf->pObject = Action_FromAction(action);
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnAction, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnAction, inf);
PulseActionEvent();
}
return ret;
CGUIMediaWindow::OnMessage(message);
if(pCallbackWindow)
{
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnInit, new PyXBMCAction(pCallbackWindow));
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnInit, new PyXBMCAction(pCallbackWindow));
PulseActionEvent();
}
return true;
PyXBMCAction* inf = new PyXBMCAction(pCallbackWindow);
inf->controlId = iControl;
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnFocus, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnFocus, inf);
PulseActionEvent();
}
}
PyXBMCAction* inf = new PyXBMCAction(pCallbackWindow);
inf->controlId = iControl;
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnClick, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnClick, inf);
PulseActionEvent();
return true;
}
inf->pObject = Action_FromAction(CAction(ACTION_CONTEXT_MENU));
// aquire lock?
- PyXBMC_AddPendingCall(m_threadState, Py_XBMC_Event_OnAction, inf);
+ PyXBMC_AddPendingCall((PyThreadState*)m_threadState, Py_XBMC_Event_OnAction, inf);
PulseActionEvent();
return true;
}
PyXBMCAction* action = (PyXBMCAction*)arg;
if (action->pCallbackWindow)
{
- PyObject *ret = PyObject_CallMethod(action->pCallbackWindow, (char*)"onClick", (char*)"(i)", action->controlId);
+ PyObject *ret = PyObject_CallMethod((PyObject*)action->pCallbackWindow, (char*)"onClick", (char*)"(i)", action->controlId);
if (ret)
{
Py_DECREF(ret);
PyXBMCAction* action = (PyXBMCAction*)arg;
if (action->pCallbackWindow)
{
- PyObject *ret = PyObject_CallMethod(action->pCallbackWindow, (char*)"onFocus", (char*)"(i)", action->controlId);
+ PyObject *ret = PyObject_CallMethod((PyObject*)action->pCallbackWindow, (char*)"onFocus", (char*)"(i)", action->controlId);
if (ret)
{
Py_DECREF(ret);
PyXBMCAction* action = (PyXBMCAction*)arg;
if (action->pCallbackWindow)
{
- PyObject *ret = PyObject_CallMethod(action->pCallbackWindow, (char*)"onInit", (char*)"()"); //, (char*)"O", &self);
+ PyObject *ret = PyObject_CallMethod((PyObject*)action->pCallbackWindow, (char*)"onInit", (char*)"()"); //, (char*)"O", &self);
if (ret)
{
Py_XDECREF(ret);
return 0;
}
-void CGUIPythonWindowXML::SetCallbackWindow(PyThreadState *state, PyObject *object)
+void CGUIPythonWindowXML::SetCallbackWindow(void *state, void *object)
{
pCallbackWindow = object;
m_threadState = state;
int GetListSize();
int GetCurrentListPosition();
void SetCurrentListPosition(int item);
- void SetCallbackWindow(PyThreadState* state, PyObject *object);
+ void SetCallbackWindow(void* state, void* object);
virtual bool OnClick(int iItem);
void SetProperty(const CStdString &strProperty, const CStdString &strValue);
void ClearScriptStrings();
virtual bool Update(const CStdString &strPath);
void SetupShares();
- PyObject* pCallbackWindow;
- PyThreadState* m_threadState;
+ void* pCallbackWindow;
+ void* m_threadState;
HANDLE m_actionEvent;
bool m_bRunning;
CStdString m_scriptPath;
+++ /dev/null
-SRCS=action.cpp \
- control.cpp \
- controlbutton.cpp \
- controlcheckmark.cpp \
- controlfadelabel.cpp \
- controlgroup.cpp \
- controlimage.cpp \
- controllabel.cpp \
- controllist.cpp \
- controlprogress.cpp \
- controlradiobutton.cpp \
- controlslider.cpp \
- controlspin.cpp \
- controltextbox.cpp \
- dialog.cpp \
- GUIPythonWindow.cpp \
- GUIPythonWindowDialog.cpp \
- GUIPythonWindowXML.cpp \
- GUIPythonWindowXMLDialog.cpp \
- infotagmusic.cpp \
- infotagvideo.cpp \
- keyboard.cpp \
- listitem.cpp \
- player.cpp \
- pyplaylist.cpp \
- PythonAddon.cpp \
- PythonPlayer.cpp \
- pyutil.cpp \
- window.cpp \
- winxml.cpp \
- winxmldialog.cpp \
- xbmcaddonmodule.cpp \
- xbmcguimodule.cpp \
- xbmcmodule.cpp \
- xbmcplugin.cpp \
- xbmcvfsmodule.cpp \
-
-LIB=xbmcmodule.a
-
-include ../../../../Makefile.include
--include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
--- /dev/null
+SRCS=action.cpp \
+ control.cpp \
+ controlbutton.cpp \
+ controlcheckmark.cpp \
+ controlfadelabel.cpp \
+ controlgroup.cpp \
+ controlimage.cpp \
+ controllabel.cpp \
+ controllist.cpp \
+ controlprogress.cpp \
+ controlradiobutton.cpp \
+ controlslider.cpp \
+ controlspin.cpp \
+ controltextbox.cpp \
+ dialog.cpp \
+ GUIPythonWindow.cpp \
+ GUIPythonWindowDialog.cpp \
+ GUIPythonWindowXML.cpp \
+ GUIPythonWindowXMLDialog.cpp \
+ infotagmusic.cpp \
+ infotagvideo.cpp \
+ keyboard.cpp \
+ listitem.cpp \
+ player.cpp \
+ pyplaylist.cpp \
+ PythonAddon.cpp \
+ PythonPlayer.cpp \
+ pyutil.cpp \
+ window.cpp \
+ winxml.cpp \
+ winxmldialog.cpp \
+ xbmcaddonmodule.cpp \
+ xbmcguimodule.cpp \
+ xbmcmodule.cpp \
+ xbmcplugin.cpp \
+ xbmcvfsmodule.cpp \
+
+LIB=xbmcmodule.a
+
+INCLUDES+= @PYTHON_CPPFLAGS@
+
+include @abs_top_srcdir@/Makefile.include
+-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "addons/IAddon.h"
#pragma once
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "cores/IPlayer.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "listitem.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "listitem.h"
#include "guilib/GUIColorManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUIButtonControl.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUICheckMarkControl.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUIFadeLabelControl.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "guilib/GUIControlGroup.h"
#include "guilib/GUIFontManager.h"
#include "control.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUIImage.h"
#include "control.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUILabelControl.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUIListContainer.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "guilib/GUIProgressControl.h"
#include "control.h"
#include "pyutil.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUIRadioButtonControl.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "guilib/GUISliderControl.h"
#include "control.h"
#include "pyutil.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUISpinControl.h"
#include "control.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "guilib/GUITextBox.h"
#include "guilib/GUIFontManager.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
#include "dialog.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+
#include "../XBPythonDll.h"
#include "Application.h"
#include "settings/Settings.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "window.h"
#pragma once
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "music/tags/MusicInfoTag.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "video/VideoInfoTag.h"
#pragma once
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include <string>
#pragma once
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "listitem.h"
#include "pyutil.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "FileItem.h"
#define ListItem_Check(op) PyObject_TypeCheck(op, &ListItem_Type)
*
*/
+#include "pyutil.h"
#include "Application.h"
#include "GUIInfoManager.h"
#include "PlayListPlayer.h"
#include "player.h"
#include "pyplaylist.h"
-#include "pyutil.h"
#include "infotagvideo.h"
#include "infotagmusic.h"
#include "listitem.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "PythonPlayer.h"
#include "cores/playercorefactory/PlayerCoreFactory.h"
*
*/
-#include "system.h"
+#include <Python.h>
+
+#include "pyutil.h"
#include "PlayListPlayer.h"
#include "utils/URIUtils.h"
#include "pyplaylist.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/structmember.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/structmember.h"
-#endif
#include "../XBPythonDll.h"
#include "playlists/PlayListFactory.h"
-#include "pyutil.h"
#include "listitem.h"
#include "playlists/PlayList.h"
#include "video/VideoInfoTag.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "FileItem.h"
#define PlayList_Check(op) PyObject_TypeCheck(op, &PlayList_Type)
*
*/
-#include "utils/StdString.h"
+#include <Python.h>
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
#include "../XBPythonDll.h"
+#include "utils/StdString.h"
#ifdef __cplusplus
extern "C" {
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "GUIPythonWindow.h"
#include "GUIPythonWindowXML.h"
*
*/
-#include "system.h"
+#include <Python.h>
+
#include "winxml.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
#include "../XBPythonDll.h"
#include "pyutil.h"
#include "GUIPythonWindowXML.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "window.h"
#pragma once
*
*/
-#include "system.h"
-#include "winxml.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
+
+#include "winxml.h"
#include "pyutil.h"
#include "GUIPythonWindowXMLDialog.h"
#include "addons/Skin.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
#include "PythonAddon.h"
#include "pyutil.h"
*
*/
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #include <python2.6/structmember.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #include <python2.5/structmember.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #include <python2.4/structmember.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
- #include "python/Include/structmember.h"
-#endif
+#include <Python.h>
+#include <structmember.h>
+
#include "../XBPythonDll.h"
#include "control.h"
#include "window.h"
*
*/
-#include "system.h"
-#if (defined USE_EXTERNAL_PYTHON)
- #if (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
- #elif (defined HAVE_LIBPYTHON2_4)
- #include <python2.4/Python.h>
- #else
- #error "Could not determine version of Python to use."
- #endif
-#else
- #include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "player.h"
#include "pyplaylist.h"
*
*/
+// include for constants
+#include "pyutil.h"
+
#include "filesystem/PluginDirectory.h"
#include "listitem.h"
#include "FileItem.h"
-// include for constants
-#include "pyutil.h"
-
using namespace std;
using namespace XFILE;
using namespace ADDON;
*
*/
-#include "system.h"
-#if (defined USE_EXTERNAL_PYTHON)
-#if (defined HAVE_LIBPYTHON2_6)
-#include <python2.6/Python.h>
-#elif (defined HAVE_LIBPYTHON2_5)
-#include <python2.5/Python.h>
-#elif (defined HAVE_LIBPYTHON2_4)
-#include <python2.4/Python.h>
-#else
-#error "Could not determine version of Python to use."
-#endif
-#else
-#include "python/Include/Python.h"
-#endif
+#include <Python.h>
+
#include "../XBPythonDll.h"
#include "filesystem/File.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
#include "threads/SingleLock.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "addons/AddonManager.h"
#ifdef _WIN32
*/
#include "PictureInfoTag.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "Util.h"
#include "utils/Variant.h"
#include "utils/XMLUtils.h"
#include "video/VideoDatabase.h"
#include "Util.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "guilib/LocalizeStrings.h"
using namespace std;
#ifndef __STRINGUTILS_H_
#define __STRINGUTILS_H_
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "utils/StdString.h"
#include <vector>
#include <stdint.h>
*/
#include "TimeUtils.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#ifdef __APPLE__
#if defined(__ppc__) || defined(__arm__)
#include "GUIUserMessages.h"
#include "dialogs/GUIDialogProgress.h"
#include "dialogs/GUIDialogSelect.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "LangInfo.h"
#include "guilib/LocalizeStrings.h"
#include "filesystem/Directory.h"
#include "threads/Thread.h"
#include "VideoInfoTag.h"
#include "addons/Scraper.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "filesystem/FileCurl.h"
// forward definitions
#include "addons/Scraper.h"
#include "NfoFile.h"
#include "VideoInfoDownloader.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
class CIMDB;
class CRegExp;
#include "threads/SingleLock.h"
#include "utils/log.h"
#include "utils/TimeUtils.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "input/ButtonTranslator.h"
#include <stdio.h>
extern "C" char * strptime(const char *buf, const char *fmt, struct tm *tm);
extern "C" int strverscmp (const char *s1, const char *s2);
extern "C" char * strcasestr(const char* haystack, const char* needle);
+extern int pgwin32_putenv(const char *envval);
#endif // _WIN32
+++ /dev/null
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-#include "interfaces/python/XBPythonDll.h"
-#include "cores/DllLoader/DllLoader.h"
-
-template<byte count>
-struct SVaPassNext{
- SVaPassNext<count-1> big;
- DWORD dw;
-};
-template<> struct SVaPassNext<0>{};
-//SVaPassNext - is generator of structure of any size at compile time.
-
-class CVaPassNext{
- public:
- SVaPassNext<50> svapassnext;
- CVaPassNext(va_list & args){
- try{//to avoid access violation
- memcpy(&svapassnext, args, sizeof(svapassnext));
- } catch (...) {}
- }
-};
-#define va_pass(valist) CVaPassNext(valist).svapassnext
-
-// macro to make life a bit simpler
-
-#define DLL_FUNCTION(function) #function, (void**)&p_##function
-#define DLL_VA_FUNCTION(function) #function, (void**)&p_va_##function
-
-// use these if the dll exports pointers
-#define DLL_POINTER_DATA(data) #data, (void**)&data
-#define DATA_POINTER(data) unsigned long data;
-
-// use these if the dll exports data structs
-#define DLL_OBJECT_DATA(data) #data, (void**)&pointer_##data
-
-#define _Py_NoneStruct (*((PyObject*)pointer__Py_NoneStruct))
-#define PyString_Type (*((PyTypeObject*)pointer_PyString_Type))
-#define PyList_Type (*((PyTypeObject*)pointer_PyList_Type))
-#define PyLong_Type (*((PyTypeObject*)pointer_PyLong_Type))
-#define PyInt_Type (*((PyTypeObject*)pointer_PyInt_Type))
-#define PyUnicode_Type (*((PyTypeObject*)pointer_PyUnicode_Type))
-#define PyTuple_Type (*((PyTypeObject*)pointer_PyTuple_Type))
-#define PyDict_Type (*((PyTypeObject*)pointer_PyDict_Type))
-
-#define DLL_ORD_FUNCTION(ord, function) "hapdbg.dll", ord, (void**)&p_##function
-
-#define FUNCTION(function) \
- void* (__cdecl* p_##function)(); \
- void* function() { return p_##function(); }
-
-#define FUNCTION4(function) \
- void* (__cdecl* p_##function)(void* a); \
- void* function(void* a) { return p_##function(a); }
-
-#define FUNCTION8(function) \
- void* (__cdecl* p_##function)(void* a, void* b); \
- void* function(void* a, void* b) { return p_##function(a, b); }
-
-#define VA_FUNC_START(x) \
- void* ret; \
- va_list va; \
- va_start(va, x); \
- ret =
-
-#define VA_FUNC_END \
- va_end(va); \
- return ret;
-
-#define VA_FUNCTION8(function) \
- void* (__cdecl* p_va_##function)(void* a, ...); \
- void* function(void* a, ...) { VA_FUNC_START(a) p_va_##function(a, va_pass(va)); VA_FUNC_END }
-
-#define VA_FUNCTION12(function) \
- void* (__cdecl* p_va_##function)(void* a, void* b, ...); \
- void* function(void* a, void* b, ...) { VA_FUNC_START(b) p_va_##function(a, b, va_pass(va)); VA_FUNC_END }
-
-#define VA_FUNCTION16(function) \
- void* (__cdecl* p_va_##function)(void* a, void* b, void* c, ...); \
- void* function(void* a, void* b, void* c, ...) { VA_FUNC_START(c) p_va_##function(a, b, c, va_pass(va)); VA_FUNC_END }
-
-#define VA_FUNCTION20(function) \
- void* (__cdecl* p_va_##function)(void* a, void* b, void* c, void* d, ...); \
- void* function(void* a, void* b, void* c, void* d, ...) { VA_FUNC_START(d) p_va_##function(a, b, c, d, va_pass(va)); VA_FUNC_END }
-
-#define FUNCTION12(function) \
- void* (__cdecl* p_##function)(void* a, void* b, void* c); \
- void* function(void* a, void* b, void* c) { return p_##function(a, b, c); }
-
-#define FUNCTION16(function) \
- void* (__cdecl* p_##function)(void* a, void* b, void* c, void* d); \
- void* function(void* a, void* b, void* c, void* d) { return p_##function(a, b, c, d); }
-
-#define FUNCTION20(function) \
- void* (__cdecl* p_##function)(void* a, void* b, void* c, void* d, void* e); \
- void* function(void* a, void* b, void* c, void* d, void* e) { return p_##function(a, b, c, d, e); }
-
-#define FUNCTION28(function) \
- void* (__cdecl* p_##function)(void* a, void* b, void* c, void* d, void* e, void* f, void* g); \
- void* function(void* a, void* b, void* c, void* d, void* e, void* f, void* g) { return p_##function(a, b, c, d, e, f, g); }
-
-extern "C"
-{
- /*****************************************
- * python24.dll
- */
-
- FUNCTION(PyEval_ReleaseLock)
- FUNCTION(PyEval_AcquireLock)
- FUNCTION(PyThreadState_Get)
- FUNCTION4(PyRun_SimpleString)
- FUNCTION(PyEval_InitThreads)
- FUNCTION(PyEval_ThreadsInitialized)
- FUNCTION(Py_Initialize)
- FUNCTION(Py_IsInitialized)
- FUNCTION(Py_Finalize)
- FUNCTION(Py_NewInterpreter)
- FUNCTION4(Py_EndInterpreter)
- FUNCTION4(PyThreadState_Swap)
- FUNCTION8(PyErr_SetString)
- FUNCTION4(PyThreadState_New)
- FUNCTION(PyErr_Print)
- FUNCTION(PyErr_Occurred)
- FUNCTION8(PyRun_SimpleFile)
- FUNCTION4(PySys_SetPath)
- FUNCTION(Py_GetPath)
- FUNCTION4(PyThreadState_Delete)
- FUNCTION4(PyThreadState_Clear)
-
- VA_FUNCTION8(Py_BuildValue)
- /*void* Py_BuildValue(void* a, ...)
- {
- void* ret;
- va_list va;
- va_start(va, a);
- ret = Py_VaBuildValue(a, va);
- va_end(va);
- return ret;
- }*/
-
- VA_FUNCTION12(PyArg_Parse)
- VA_FUNCTION12(PyArg_ParseTuple)
- /*void* PyArg_ParseTuple(void* a, void* b, ...)
- {
- void* ret;
- va_list va;
- va_start(va, b);
- ret = PyArg_VaParse(a, b, va);
- va_end(va);
- return ret;
- }*/
-
- FUNCTION8(PyType_IsSubtype)
- VA_FUNCTION20(PyArg_ParseTupleAndKeywords)
- /*void* PyArg_ParseTupleAndKeywords(void* a, void* b, void* c, void* d, ...)
- {
- void* ret;
- va_list va;
- va_start(va, d);
- ret = PyArg_VaParseTupleAndKeywords(a, b, c, d, va);
- va_end(va);
- return ret;
- }*/
-
- FUNCTION4(PyString_AsString)
- FUNCTION8(Py_AddPendingCall)
- FUNCTION8(PyList_GetItem)
- FUNCTION4(PyList_Size)
- FUNCTION4(PyList_New)
- FUNCTION8(PyList_Append)
- FUNCTION4(_PyObject_New)
- FUNCTION4(PyLong_AsLong)
- FUNCTION4(PyLong_AsLongLong)
-
- VA_FUNCTION12(PyErr_Format)
- /*void* PyErr_Format(void* a, void* b, ...)
- {
- void* ret;
- va_list va;
- va_start(va, b);
- ret = PyErr_VaFormat(a, b, va);
- va_end(va);
- return ret;
- }*/
-#ifndef _LINUX
- FUNCTION4(PyUnicodeUCS2_AsUTF8String)
- FUNCTION12(PyUnicodeUCS2_DecodeUTF8)
-#else
- FUNCTION4(PyUnicodeUCS4_AsUTF8String)
- FUNCTION12(PyUnicodeUCS4_DecodeUTF8)
-#endif
- FUNCTION(Py_MakePendingCalls)
- FUNCTION(PyEval_SaveThread)
- FUNCTION4(PyEval_RestoreThread)
- FUNCTION4(PyLong_FromLong)
- FUNCTION12(PyModule_AddStringConstant)
- FUNCTION12(PyModule_AddObject)
- FUNCTION20(Py_InitModule4)
- FUNCTION4(PyInt_AsLong)
- FUNCTION4(PyFloat_AsDouble)
- FUNCTION4(PyString_FromString)
- FUNCTION4(PyBool_FromLong)
- FUNCTION12(PyModule_AddIntConstant)
-
- //void* (__cdecl* p_va_PyObject_CallFunction)(void* a, void* b, ...);
- VA_FUNCTION12(PyObject_CallFunction) // va arg
- /*
- void* PyObject_CallFunction(void* a, void* b, ...)
- {
- void* ret;
- va_list va;
- va_start(va, b);
- ret = p_va_PyObject_CallFunction(a, b, va_pass(va));
- va_end(va);
- return ret;
- }*/
-
- //void* (__cdecl* p_va_PyObject_CallMethod)(void* a, void* b, void* c, ...);
- VA_FUNCTION16(PyObject_CallMethod)
- /*void* PyObject_CallMethod(void* a, void* b, void* c, ...)
- {
- void* ret;
- va_list va;
- va_start(va, c);
- ret = p_va_PyObject_CallMethod(a, b, c, va_pass(va));
- va_end(va);
- return ret;
- }*/
- FUNCTION12(PyDict_SetItemString)
- FUNCTION(PyDict_New)
- FUNCTION4(PyModule_GetDict)
- FUNCTION4(PyImport_Import)
- FUNCTION4(PyInt_FromLong)
- FUNCTION8(PyDict_GetItemString)
- //FUNCTION8(PyDict_GetItem)
- //FUNCTION4(PyDict_Keys)
- FUNCTION16(PyDict_Next)
- FUNCTION4(PyDict_Size)
- FUNCTION4(PyType_Ready)
- FUNCTION12(PyType_GenericNew)
- FUNCTION4(PyTuple_New)
- FUNCTION12(PyTuple_SetItem)
- FUNCTION8(PySys_SetArgv)
- FUNCTION12(PyObject_RichCompare)
- FUNCTION12(PyErr_Fetch)
- FUNCTION4(PyImport_AddModule)
- FUNCTION4(PyImport_ImportModule)
- FUNCTION4(PyObject_Str)
- FUNCTION20(PyRun_File)
- FUNCTION16(PyRun_String)
- FUNCTION4(PyErr_ExceptionMatches)
- FUNCTION(PyErr_Clear)
- FUNCTION12(PyObject_SetAttrString)
-
-#if (defined USE_EXTERNAL_PYTHON) && (defined HAVE_LIBPYTHON2_6)
- FUNCTION8(PyRun_SimpleStringFlags)
- FUNCTION20(PyRun_StringFlags)
- FUNCTION28(PyRun_FileExFlags)
-#endif
-
- // PyFloat_FromDouble(double)
- void* (__cdecl* p_PyFloat_FromDouble)(double a); \
- void* PyFloat_FromDouble(double a) { return p_PyFloat_FromDouble(a); }
-
- DATA_OBJECT(PyExc_SystemExit)
- DATA_OBJECT(PyExc_SystemError)
- DATA_OBJECT(PyExc_ValueError)
- DATA_OBJECT(PyExc_Exception)
- DATA_OBJECT(PyExc_TypeError)
- DATA_OBJECT(PyExc_KeyboardInterrupt)
- DATA_OBJECT(PyExc_RuntimeError)
- DATA_OBJECT(PyExc_ReferenceError)
-
- DATA_OBJECT(_Py_NoneStruct)
- DATA_OBJECT(_Py_NotImplementedStruct)
- DATA_OBJECT(_Py_TrueStruct)
- DATA_OBJECT(_Py_ZeroStruct)
- DATA_OBJECT(PyString_Type)
- DATA_OBJECT(PyList_Type)
- DATA_OBJECT(PyLong_Type)
- DATA_OBJECT(PyInt_Type)
- DATA_OBJECT(PyUnicode_Type)
- DATA_OBJECT(PyTuple_Type)
- DATA_OBJECT(PyDict_Type)
-
- bool python_load_dll(LibraryLoader& dll)
- {
- bool bResult;
-
- bResult = (
- dll.ResolveExport(DLL_FUNCTION(PyEval_ReleaseLock)) &&
- dll.ResolveExport(DLL_FUNCTION(PyEval_AcquireLock)) &&
- dll.ResolveExport(DLL_FUNCTION(PyThreadState_Get)) &&
- dll.ResolveExport(DLL_FUNCTION(PyRun_SimpleString)) &&
- dll.ResolveExport(DLL_FUNCTION(PyEval_InitThreads)) &&
- dll.ResolveExport(DLL_FUNCTION(PyEval_ThreadsInitialized)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_Initialize)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_IsInitialized)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_Finalize)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_NewInterpreter)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_EndInterpreter)) &&
- dll.ResolveExport(DLL_FUNCTION(PyThreadState_Swap)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_SetString)) &&
- dll.ResolveExport(DLL_FUNCTION(PyThreadState_New)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_Print)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_Occurred)) &&
- dll.ResolveExport(DLL_FUNCTION(PyRun_SimpleFile)) &&
- dll.ResolveExport(DLL_FUNCTION(PySys_SetPath)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_GetPath)) &&
- dll.ResolveExport(DLL_FUNCTION(PyThreadState_Delete)) &&
- dll.ResolveExport(DLL_FUNCTION(PyThreadState_Clear)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(Py_BuildValue)) &&
- dll.ResolveExport(DLL_FUNCTION(PyType_IsSubtype)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyArg_ParseTupleAndKeywords)) &&
- dll.ResolveExport(DLL_FUNCTION(PyString_AsString)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_AddPendingCall)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyObject_CallMethod)) &&
- dll.ResolveExport(DLL_FUNCTION(PyList_GetItem)) &&
- dll.ResolveExport(DLL_FUNCTION(PyList_Size)) &&
- dll.ResolveExport(DLL_FUNCTION(PyList_New)) &&
- dll.ResolveExport(DLL_FUNCTION(PyList_Append)) &&
- dll.ResolveExport(DLL_FUNCTION(_PyObject_New)) &&
- dll.ResolveExport(DLL_FUNCTION(PyLong_AsLong)) &&
- dll.ResolveExport(DLL_FUNCTION(PyLong_AsLongLong)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyErr_Format)) &&
-#ifndef _LINUX
- dll.ResolveExport(DLL_FUNCTION(PyUnicodeUCS2_AsUTF8String)) &&
- dll.ResolveExport(DLL_FUNCTION(PyUnicodeUCS2_DecodeUTF8)) &&
-#else
- dll.ResolveExport(DLL_FUNCTION(PyUnicodeUCS4_AsUTF8String)) &&
- dll.ResolveExport(DLL_FUNCTION(PyUnicodeUCS4_DecodeUTF8)) &&
-#endif
- dll.ResolveExport(DLL_FUNCTION(Py_MakePendingCalls)) &&
- dll.ResolveExport(DLL_FUNCTION(PyEval_SaveThread)) &&
- dll.ResolveExport(DLL_FUNCTION(PyEval_RestoreThread)) &&
- dll.ResolveExport(DLL_FUNCTION(PyLong_FromLong)) &&
- dll.ResolveExport(DLL_FUNCTION(PyModule_AddStringConstant)) &&
- dll.ResolveExport(DLL_FUNCTION(PyModule_AddObject)) &&
- dll.ResolveExport(DLL_FUNCTION(Py_InitModule4)) &&
- dll.ResolveExport(DLL_FUNCTION(PyInt_AsLong)) &&
- dll.ResolveExport(DLL_FUNCTION(PyFloat_AsDouble)) &&
- dll.ResolveExport(DLL_FUNCTION(PyString_FromString)) &&
- dll.ResolveExport(DLL_FUNCTION(PyBool_FromLong)) &&
- dll.ResolveExport(DLL_FUNCTION(PyModule_AddIntConstant)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyObject_CallFunction)) &&
- dll.ResolveExport(DLL_FUNCTION(PyDict_SetItemString)) &&
- dll.ResolveExport(DLL_FUNCTION(PyDict_New)) &&
- dll.ResolveExport(DLL_FUNCTION(PyModule_GetDict)) &&
- dll.ResolveExport(DLL_FUNCTION(PyImport_Import)) &&
- dll.ResolveExport(DLL_FUNCTION(PyFloat_FromDouble)) &&
- dll.ResolveExport(DLL_FUNCTION(PyInt_FromLong)) &&
- dll.ResolveExport(DLL_FUNCTION(PyDict_GetItemString)) &&
- //dll.ResolveExport(DLL_FUNCTION(PyDict_GetItem)) &&
- //dll.ResolveExport(DLL_FUNCTION(PyDict_Keys)) &&
- dll.ResolveExport(DLL_FUNCTION(PyDict_Next)) &&
- dll.ResolveExport(DLL_FUNCTION(PyDict_Size)) &&
- dll.ResolveExport(DLL_FUNCTION(PyType_Ready)) &&
- dll.ResolveExport(DLL_FUNCTION(PyType_GenericNew)) &&
- dll.ResolveExport(DLL_FUNCTION(PyTuple_New)) &&
- dll.ResolveExport(DLL_FUNCTION(PyTuple_SetItem)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyArg_Parse)) &&
- dll.ResolveExport(DLL_VA_FUNCTION(PyArg_ParseTuple)) &&
- dll.ResolveExport(DLL_FUNCTION(PySys_SetArgv)) &&
- dll.ResolveExport(DLL_FUNCTION(PyObject_RichCompare)) &&
-
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_SystemExit)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_SystemError)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_ValueError)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_Exception)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_TypeError)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_KeyboardInterrupt)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_RuntimeError)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyExc_ReferenceError)) &&
-
- dll.ResolveExport(DLL_OBJECT_DATA(_Py_NoneStruct)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(_Py_NotImplementedStruct)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(_Py_TrueStruct)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(_Py_ZeroStruct)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyString_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyList_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyLong_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyInt_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyUnicode_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyTuple_Type)) &&
- dll.ResolveExport(DLL_OBJECT_DATA(PyDict_Type)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_Fetch)) &&
- dll.ResolveExport(DLL_FUNCTION(PyImport_AddModule)) &&
- dll.ResolveExport(DLL_FUNCTION(PyImport_ImportModule)) &&
- dll.ResolveExport(DLL_FUNCTION(PyObject_Str)) &&
- dll.ResolveExport(DLL_FUNCTION(PyRun_File)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_Clear)) &&
- dll.ResolveExport(DLL_FUNCTION(PyObject_SetAttrString)) &&
- dll.ResolveExport(DLL_FUNCTION(PyErr_ExceptionMatches)) &&
-#if (defined USE_EXTERNAL_PYTHON) && (defined HAVE_LIBPYTHON2_6)
- dll.ResolveExport(DLL_FUNCTION(PyRun_SimpleStringFlags)) &&
- dll.ResolveExport(DLL_FUNCTION(PyRun_StringFlags)) &&
- dll.ResolveExport(DLL_FUNCTION(PyRun_FileExFlags)) &&
-#endif
- dll.ResolveExport(DLL_FUNCTION(PyRun_String)));
-
- return bResult;
- }
-}
switch (dliNotify)
{
case dliNotePreLoadLibrary:
- if (stricmp(pdli->szDll, "libmicrohttpd-5.dll") == 0)
- {
- CStdString strDll = CSpecialProtocol::TranslatePath(DLL_PATH_LIBMICROHTTP);
- HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
- return (FARPROC)hMod;
- }
- if (stricmp(pdli->szDll, "ssh.dll") == 0)
- {
- CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/ssh.dll");
- HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
- return (FARPROC)hMod;
- }
- if (stricmp(pdli->szDll, "sqlite3.dll") == 0)
- {
- CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/sqlite3.dll");
- HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
- return (FARPROC)hMod;
- }
- if (stricmp(pdli->szDll, "libsamplerate-0.dll") == 0)
- {
- CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/libsamplerate-0.dll");
- HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
- return (FARPROC)hMod;
- }
- break;
+ if (stricmp(pdli->szDll, "libmicrohttpd-5.dll") == 0)
+ {
+ CStdString strDll = CSpecialProtocol::TranslatePath(DLL_PATH_LIBMICROHTTP);
+ HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
+ return (FARPROC)hMod;
+ }
+ if (stricmp(pdli->szDll, "ssh.dll") == 0)
+ {
+ CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/ssh.dll");
+ HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
+ return (FARPROC)hMod;
+ }
+ if (stricmp(pdli->szDll, "sqlite3.dll") == 0)
+ {
+ CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/sqlite3.dll");
+ HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
+ return (FARPROC)hMod;
+ }
+ if (stricmp(pdli->szDll, "libsamplerate-0.dll") == 0)
+ {
+ CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/libsamplerate-0.dll");
+ HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
+ return (FARPROC)hMod;
+ }
+ break;
}
return NULL;
}
#include "WIN32Util.h"
#include "shellapi.h"
#include "dbghelp.h"
-#include "DateTime.h"
+#include "XBDateTime.h"
#include "threads/Thread.h"
#include "Application.h"
--- /dev/null
+/*-------------------------------------------------------------------------
+ *
+ * win32env.c
+ * putenv() and unsetenv() for win32, that updates both process
+ * environment and the cached versions in (potentially multiple)
+ * MSVCRT.
+ *
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/port/win32env.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+//#include "windows.h"
+
+int
+pgwin32_putenv(const char *envval)
+{
+ char *envcpy;
+ char *cp;
+
+ /*
+ * Each version of MSVCRT has its own _putenv() call in the runtime
+ * library.
+ *
+ * mingw always uses MSVCRT.DLL, but if we are in a Visual C++
+ * environment, attempt to update the environment in all MSVCRT modules
+ * that are currently loaded, to work properly with any third party
+ * libraries linked against a different MSVCRT but still relying on
+ * environment variables.
+ *
+ * Also separately update the system environment that gets inherited by
+ * subprocesses.
+ */
+#ifdef _MSC_VER
+ typedef int (_cdecl * PUTENVPROC) (const char *name);
+ static struct
+ {
+ char *modulename;
+ HMODULE hmodule;
+ PUTENVPROC putenvFunc;
+ } rtmodules[] =
+ {
+ {
+ "msvcrt", 0, NULL
+ }, /* Visual Studio 6.0 / mingw */
+ {
+ "msvcr70", 0, NULL
+ }, /* Visual Studio 2002 */
+ {
+ "msvcr71", 0, NULL
+ }, /* Visual Studio 2003 */
+ {
+ "msvcr80", 0, NULL
+ }, /* Visual Studio 2005 */
+ {
+ "msvcr90", 0, NULL
+ }, /* Visual Studio 2008 */
+ {
+ NULL, 0, NULL
+ }
+ };
+ int i;
+
+ for (i = 0; rtmodules[i].modulename; i++)
+ {
+ if (rtmodules[i].putenvFunc == NULL)
+ {
+ if (rtmodules[i].hmodule == 0)
+ {
+ /* Not attempted before, so try to find this DLL */
+ rtmodules[i].hmodule = GetModuleHandle(rtmodules[i].modulename);
+ if (rtmodules[i].hmodule == NULL)
+ {
+ /*
+ * Set to INVALID_HANDLE_VALUE so we know we have tried
+ * this one before, and won't try again.
+ */
+ rtmodules[i].hmodule = ((HMODULE)(LONG_PTR)-1);
+ continue;
+ }
+ else
+ {
+ rtmodules[i].putenvFunc = (PUTENVPROC) GetProcAddress(rtmodules[i].hmodule, "_putenv");
+ if (rtmodules[i].putenvFunc == NULL)
+ {
+ CloseHandle(rtmodules[i].hmodule);
+ rtmodules[i].hmodule = ((HMODULE)(LONG_PTR)-1);
+ continue;
+ }
+ }
+ }
+ else
+ {
+ /*
+ * Module loaded, but we did not find the function last time.
+ * We're not going to find it this time either...
+ */
+ continue;
+ }
+ }
+ /* At this point, putenvFunc is set or we have exited the loop */
+ rtmodules[i].putenvFunc(envval);
+ }
+#endif /* _MSC_VER */
+
+ /*
+ * Update the process environment - to make modifications visible to child
+ * processes.
+ *
+ * Need a copy of the string so we can modify it.
+ */
+ envcpy = strdup(envval);
+ if (!envcpy)
+ return -1;
+ cp = strchr(envcpy, '=');
+ if (cp == NULL)
+ {
+ free(envcpy);
+ return -1;
+ }
+ *cp = '\0';
+ cp++;
+ if (strlen(cp))
+ {
+ /*
+ * Only call SetEnvironmentVariable() when we are adding a variable,
+ * not when removing it. Calling it on both crashes on at least
+ * certain versions of MingW.
+ */
+ if (!SetEnvironmentVariable(envcpy, cp))
+ {
+ free(envcpy);
+ return -1;
+ }
+ }
+ free(envcpy);
+
+ /* Finally, update our "own" cache */
+ return _putenv(envval);
+}
+
+void
+pgwin32_unsetenv(const char *name)
+{
+ char *envbuf;
+
+ envbuf = (char *) malloc(strlen(name) + 2);
+ if (!envbuf)
+ return;
+
+ sprintf(envbuf, "%s=", name);
+ pgwin32_putenv(envbuf);
+ free(envbuf);
+}