Permalink
Browse files

Merge branch 'linuxport' into v0.5

  • Loading branch information...
2 parents 91232d4 + 04b55c0 commit ca5b2149ffd360c554bde7f6fda3a8b802c00730 @elan elan committed Jun 1, 2008
@@ -589,7 +589,7 @@ void CGraphicContext::SetVideoResolution(RESOLUTION &res, BOOL NeedZ, bool force
res = g_videoConfig.GetSafeMode();
}
#ifdef _WIN32PC
- if (res>=DESKTOP || g_advancedSettings.m_fullScreen)
+ if (g_advancedSettings.m_fullScreen)
#else
if (res>=DESKTOP)
#endif
@@ -2677,6 +2677,10 @@
/>
</FileConfiguration>
</File>
+ <File
+ RelativePath="..\..\xbmc\utils\md5.h"
+ >
+ </File>
<File
RelativePath="..\..\xbmc\MediaManager.cpp"
>
@@ -5613,14 +5617,6 @@
<Filter
Name="libScrobbler"
>
- <File
- RelativePath="..\..\xbmc\lib\libscrobbler\md5.c"
- >
- </File>
- <File
- RelativePath="..\..\xbmc\lib\libscrobbler\md5.h"
- >
- </File>
<File
RelativePath="..\..\xbmc\lib\libscrobbler\scrobbler.cpp"
>
@@ -114,6 +114,7 @@ rem CONFIG START
md BUILD_WIN32\Xbmc
Echo .svn>exclude.txt
+ Echo .so>>exclude.txt
Echo Thumbs.db>>exclude.txt
Echo Desktop.ini>>exclude.txt
Echo dsstdfx.bin>>exclude.txt
@@ -133,20 +134,24 @@ rem CONFIG START
Echo userdata\visualisations\>>exclude.txt
rem other platform stuff
Echo lib-osx>>exclude.txt
+ Echo players\mplayer>>exclude.txt
Echo FileZilla Server.xml>>exclude.txt
Echo asound.conf>>exclude.txt
Echo voicemasks.xml>>exclude.txt
xcopy %EXE% BUILD_WIN32\Xbmc > NUL
xcopy ..\..\userdata BUILD_WIN32\Xbmc\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
- xcopy ..\..\*.txt BUILD_WIN32 /EXCLUDE:exclude.txt > NUL
- copy ..\..\LICENSE.GPL BUILD_WIN32 > NUL
- copy sources.xml BUILD_WIN32\Xbmc > NUL
+ copy ..\..\copying.txt BUILD_WIN32\Xbmc > NUL
+ copy ..\..\LICENSE.GPL BUILD_WIN32\Xbmc > NUL
+ xcopy dependencies\*.* BUILD_WIN32\Xbmc /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ copy sources.xml BUILD_WIN32\Xbmc\userdata > NUL
xcopy ..\..\credits BUILD_WIN32\Xbmc\credits /Q /I /Y /EXCLUDE:exclude.txt > NUL
xcopy ..\..\language BUILD_WIN32\Xbmc\language /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
- xcopy ..\..\screensavers BUILD_WIN32\Xbmc\screensavers /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
- xcopy ..\..\visualisations BUILD_WIN32\Xbmc\visualisations /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ rem screensavers currently are xbox only
+ rem xcopy ..\..\screensavers BUILD_WIN32\Xbmc\screensavers /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ xcopy ..\..\visualisations\*_win32.vis BUILD_WIN32\Xbmc\visualisations /Q /I /Y /EXCLUDE:exclude.txt > NUL
+ xcopy ..\..\visualisations\projectM BUILD_WIN32\Xbmc\visualisations\projectM /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
@@ -187,7 +192,7 @@ rem CONFIG START
set DIETEXT=Failed to create %XBMC_SETUPFILE%.
goto DIE
)
- del BUILD_WIN32\Xbmc\sources.xml > NUL
+ del BUILD_WIN32\Xbmc\userdata\sources.xml > NUL
ECHO ------------------------------------------------------------
ECHO Done!
ECHO Setup is located at %CD%\%XBMC_SETUPFILE%
@@ -87,10 +87,9 @@ Section "XBMC" SecXBMC
;ADD YOUR OWN FILES HERE...
SetOutPath "$INSTDIR"
File "${xbmc_root}\Xbmc\XBMC.exe"
- File "${xbmc_root}\copying.txt"
- File "${xbmc_root}\keymapping.txt"
- File "${xbmc_root}\LICENSE.GPL"
- File "dependencies\*.*"
+ File "${xbmc_root}\Xbmc\copying.txt"
+ File "${xbmc_root}\Xbmc\LICENSE.GPL"
+ File "${xbmc_root}\Xbmc\*.dll"
SetOutPath "$INSTDIR\credits"
File /r /x *.so ${xbmc_root}\Xbmc\credits\*.*
SetOutPath "$INSTDIR\media"
@@ -187,7 +186,7 @@ Section "-hidden section"
;setup sources.xml
SetOutPath "$APPDATA\XBMC\UserData"
SetOverwrite off
- File "${xbmc_root}\Xbmc\sources.xml"
+ File "${xbmc_root}\Xbmc\userdata\sources.xml"
SetOverwrite on
;setup sources.xml for plugins
@@ -288,7 +287,6 @@ Section "Uninstall"
;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\XBMC.exe"
Delete "$INSTDIR\copying.txt"
- Delete "$INSTDIR\keymapping.txt"
Delete "$INSTDIR\LICENSE.GPL"
Delete "$INSTDIR\glew32.dll"
Delete "$INSTDIR\jpeg.dll"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -3027,7 +3027,7 @@ void CApplication::SetQuiet(bool bQuiet)
#ifndef HAS_XBOX_D3D
void CApplication::Render()
{
- if (!m_AppActive && !m_bStop) {Sleep(1); return;}
+ if (!m_AppActive && !m_bStop) {Sleep(1); ResetScreenSaver(); return;}
#ifdef __APPLE__
// Make sure the system mouse cursor is hidden. I'm not sure if this
@@ -69,8 +69,9 @@ typedef std::list<HANDLE>::iterator HeapObjectListIter;
typedef std::map<uintptr_t, AllocLenCaller> VAllocList;
typedef std::map<uintptr_t, AllocLenCaller>::iterator VAllocListIter;
-typedef struct _DllTrackInfo
+class DllTrackInfo : public CCriticalSection
{
+public:
DllLoader* pDll;
uintptr_t lMinAddr;
uintptr_t lMaxAddr;
@@ -90,7 +91,7 @@ typedef struct _DllTrackInfo
HeapObjectList heapobjectList;
VAllocList virtualList;
-} DllTrackInfo;
+};
typedef std::list<DllTrackInfo*> TrackedDllList;
typedef std::list<DllTrackInfo*>::iterator TrackedDllsIter;
@@ -38,6 +38,7 @@ extern "C" inline void tracker_memory_track(uintptr_t caller, void* data_addr, s
DllTrackInfo* pInfo = tracker_get_dlltrackinfo(caller);
if (pInfo)
{
+ CSingleLock lock(*pInfo);
AllocLenCaller temp;
temp.size = size;
temp.calleraddr = caller;
@@ -47,7 +48,13 @@ extern "C" inline void tracker_memory_track(uintptr_t caller, void* data_addr, s
extern "C" inline bool tracker_memory_free(DllTrackInfo* pInfo, void* data_addr)
{
- if (!pInfo || pInfo->dataList.erase((uintptr_t)data_addr) < 1)
+ bool bFreeFailed = !pInfo;
+ if (!bFreeFailed)
+ {
+ CSingleLock lock(*pInfo);
+ bFreeFailed = pInfo->dataList.erase((uintptr_t)data_addr) < 1;
+ }
+ if (bFreeFailed)
{
// unable to delete the pointer from one of the trackers, but track_free is called!!
// This will happen when memory is freed by another dll then the one which allocated the memory.
@@ -57,6 +64,7 @@ extern "C" inline bool tracker_memory_free(DllTrackInfo* pInfo, void* data_addr)
for (TrackedDllsIter it = g_trackedDlls.begin(); it != g_trackedDlls.end(); ++it)
{
// try to free the pointer from this list, and break if success
+ CSingleLock lock(*(*it));
if ((*it)->dataList.erase((uintptr_t)data_addr) > 0) return true;
}
return false;
@@ -66,6 +74,7 @@ extern "C" inline bool tracker_memory_free(DllTrackInfo* pInfo, void* data_addr)
extern "C" void tracker_memory_free_all(DllTrackInfo* pInfo)
{
+ CSingleLock lock(*pInfo);
if (!pInfo->dataList.empty() || !pInfo->virtualList.empty())
{
CLog::Log(LOGDEBUG,"%s (base %p): Detected memory leaks: %d leaks", pInfo->pDll->GetFileName(), pInfo->pDll->hModule, pInfo->dataList.size() + pInfo->virtualList.size());
@@ -164,8 +173,6 @@ extern "C" void* __cdecl track_realloc(void* p, size_t s)
{
uintptr_t loc = (uintptr_t)_ReturnAddress();
- DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
-
void* q = realloc(p, s);
if (!q)
{
@@ -174,8 +181,10 @@ extern "C" void* __cdecl track_realloc(void* p, size_t s)
return NULL;
}
+ DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
if (pInfo)
{
+ CSingleLock lock(*pInfo);
if (p != q) tracker_memory_free(pInfo, p);
AllocLenCaller temp;
temp.size = s;
@@ -229,6 +238,7 @@ extern "C" void tracker_heapobjects_free_all(DllTrackInfo* pInfo)
{
CLog::Log(LOGDEBUG,"%s: Detected heapobject leaks: %d leaks", pInfo->pDll->GetFileName(), pInfo->heapobjectList.size());
+ CSingleLock lock(*pInfo);
for (HeapObjectListIter it = pInfo->heapobjectList.begin(); it != pInfo->heapobjectList.end(); ++it)
{
try
@@ -261,6 +271,7 @@ track_HeapCreate(
if( pInfo && hHeap )
{
+ CSingleLock lock(*pInfo);
pInfo->heapobjectList.push_back(hHeap);
}
@@ -283,6 +294,7 @@ track_HeapDestroy(
{
if (*it == hHeap)
{
+ CSingleLock lock(*pInfo);
pInfo->heapobjectList.erase(it);
break;
}
@@ -301,7 +313,10 @@ BOOL WINAPI track_VirtualFreeEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize
{
DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
if (pInfo)
+ {
+ CSingleLock lock(*pInfo);
pInfo->virtualList.erase((uintptr_t)lpAddress);
+ }
}
return VirtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType);
}
@@ -316,6 +331,7 @@ LPVOID WINAPI track_VirtualAllocEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwS
DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
if(pInfo)
{
+ CSingleLock lock(*pInfo);
// make sure we get the base address for this allocation
MEMORY_BASIC_INFORMATION info;
if(VirtualQueryEx(hProcess, address, &info, sizeof(info)))
@@ -338,6 +354,7 @@ LPVOID WINAPI track_VirtualAlloc( LPVOID lpAddress, SIZE_T dwSize, DWORD flAlloc
DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
if(pInfo)
{
+ CSingleLock lock(*pInfo);
// make sure we get the base address for this allocation
MEMORY_BASIC_INFORMATION info;
if(VirtualQuery(address, &info, sizeof(info)))
@@ -359,7 +376,10 @@ BOOL WINAPI track_VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
{
DllTrackInfo* pInfo = tracker_get_dlltrackinfo(loc);
if (pInfo)
+ {
+ CSingleLock lock(*pInfo);
pInfo->virtualList.erase((uintptr_t)lpAddress);
+ }
}
return VirtualFree(lpAddress, dwSize, dwFreeType);
}
@@ -45,6 +45,8 @@ class DllLibFaad : public DllDynamic, DllLibFaadInterface
DECLARE_DLL_WRAPPER(DllLibFaad, Q:\\system\\players\\dvdplayer\\libfaad-osx.so)
#elif !defined(_LINUX)
DECLARE_DLL_WRAPPER(DllLibFaad, Q:\\system\\players\\dvdplayer\\libfaad.dll)
+#elif defined(__x86_64__)
+ DECLARE_DLL_WRAPPER(DllLibFaad, Q:\\system\\players\\dvdplayer\\libfaad-x86_64-linux.so)
#else
DECLARE_DLL_WRAPPER(DllLibFaad, Q:\\system\\players\\dvdplayer\\libfaad-i486-linux.so)
#endif
@@ -44,6 +44,8 @@ class DllLibMad : public DllDynamic, DllLibMadInterface
DECLARE_DLL_WRAPPER(DllLibMad, Q:\\system\\players\\dvdplayer\\libmad.dll)
#elif defined(__APPLE__)
DECLARE_DLL_WRAPPER(DllLibMad, Q:\\system\\players\\dvdplayer\\libmad-osx.so)
+#elif defined(__x86_64__)
+ DECLARE_DLL_WRAPPER(DllLibMad, Q:\\system\\players\\dvdplayer\\libmad-x86_64-linux.so)
#else
DECLARE_DLL_WRAPPER(DllLibMad, Q:\\system\\players\\dvdplayer\\libmad-i486-linux.so)
#endif
@@ -56,6 +56,8 @@ class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface
DECLARE_DLL_WRAPPER(DllLibMpeg2, Q:\\system\\players\\dvdplayer\\libmpeg2-osx.so)
#elif !defined(_LINUX)
DECLARE_DLL_WRAPPER(DllLibMpeg2, Q:\\system\\players\\dvdplayer\\libmpeg2.dll)
+#elif defined(__x86_64__)
+ DECLARE_DLL_WRAPPER(DllLibMpeg2, Q:\\system\\players\\dvdplayer\\libmpeg2-x86_64-linux.so)
#else
DECLARE_DLL_WRAPPER(DllLibMpeg2, Q:\\system\\players\\dvdplayer\\libmpeg2-i486-linux.so)
#endif
@@ -105,6 +105,8 @@ class DllDvdNav : public DllDynamic, DllDvdNavInterface
DECLARE_DLL_WRAPPER(DllDvdNav, Q:\\system\\players\\dvdplayer\\libdvdnav-osx.so)
#elif !defined(_LINUX)
DECLARE_DLL_WRAPPER(DllDvdNav, Q:\\system\\players\\dvdplayer\\libdvdnav.dll)
+#elif defined(__x86_64__)
+ DECLARE_DLL_WRAPPER(DllDvdNav, Q:\\system\\players\\dvdplayer\\libdvdnav-x86_64-linux.so)
#else
DECLARE_DLL_WRAPPER(DllDvdNav, Q:\\system\\players\\dvdplayer\\libdvdnav-i486-linux.so)
#endif
@@ -35,17 +35,15 @@ class DllMadCodec : public DllDynamic, DllMadCodecInterface
{
#ifndef _LINUX
DECLARE_DLL_WRAPPER(DllMadCodec, Q:\\system\\players\\PAPlayer\\MADCodec.dll)
-#elif __APPLE__
+#elif defined(__APPLE__)
DECLARE_DLL_WRAPPER(DllMadCodec,
Q:\\system\\players\\paplayer\\MADCodec-osx.so)
-#else /* _LINUX and !__APPLE__ */
-#ifdef __x86_64__
+#elif defined(__x86_64__)
DECLARE_DLL_WRAPPER(DllMadCodec,
Q:\\system\\players\\paplayer\\MADCodec-x86_64-linux.so)
-#else /* !__x86_64__ */
+#else
DECLARE_DLL_WRAPPER(DllMadCodec,
Q:\\system\\players\\paplayer\\MADCodec-i486-linux.so)
-#endif /* !__x86_64__ */
#endif /* _LINUX */
DEFINE_METHOD2(IAudioDecoder*, CreateAudioDecoder, (unsigned int p1, IAudioOutput **p2))
BEGIN_METHOD_RESOLVE()
Oops, something went wrong.

0 comments on commit ca5b214

Please sign in to comment.