1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +02:00

Enable building breakpad on windows

This commit is contained in:
Dominik Schmidt 2011-09-24 01:33:46 +02:00
parent 18d9360ad3
commit e4e9f1bec8
7 changed files with 73 additions and 65 deletions

View File

@ -1,8 +1,6 @@
ADD_SUBDIRECTORY( qxt )
ADD_SUBDIRECTORY( liblastfm2 )
ADD_SUBDIRECTORY( breakpad )
IF( APPLE )
ADD_SUBDIRECTORY( SPMediaKeyTap )
ENDIF()
IF( UNIX )
ADD_SUBDIRECTORY( breakpad )
ENDIF()

View File

@ -15,58 +15,67 @@ if(${CMAKE_BUILD_TYPE} MATCHES "Release")
endif(${CMAKE_BUILD_TYPE} MATCHES "Release")
IF(UNIX)
IF(APPLE)
IF(APPLE)
SET( breakpadSources
client/mac/crash_generation/crash_generation_client.cc
client/mac/crash_generation/crash_generation_server.cc
client/mac/handler/breakpad_nlist_64.cc
client/mac/handler/dynamic_images.cc
client/mac/handler/exception_handler.cc
client/mac/handler/minidump_generator.cc
client/mac/handler/protected_memory_allocator.cc
# client/mac/Framework/Breakpad.mm
# client/mac/Framework/OnDemandServer.mm
common/mac/file_id.cc
common/mac/macho_id.cc
common/mac/macho_reader.cc
common/mac/macho_utilities.cc
common/mac/macho_walker.cc
common/mac/string_utilities.cc
common/md5.c
common/mac/dump_syms.mm
common/mac/MachIPC.mm
common/mac/SimpleStringDictionary.mm
)
ELSE(APPLE)
SET( breakpadSources
client/linux/crash_generation/crash_generation_client.cc
client/linux/crash_generation/crash_generation_server.cc
client/linux/minidump_writer/minidump_writer.cc
client/linux/minidump_writer/linux_dumper.cc
client/linux/handler/exception_handler.cc
common/linux/dump_symbols.cc
common/linux/file_id.cc
common/linux/libcurl_wrapper.cc
common/linux/google_crashdump_uploader.cc
common/linux/synth_elf.cc
common/linux/http_upload.cc
common/linux/guid_creator.cc
common/linux/elf_symbols_to_module.cc
common/string_conversion.cc
common/convert_UTF.c
client/minidump_file_writer.cc
)
ENDIF(APPLE)
SET( breakpadSources
client/mac/crash_generation/crash_generation_client.cc
client/mac/crash_generation/crash_generation_server.cc
client/mac/handler/breakpad_nlist_64.cc
client/mac/handler/dynamic_images.cc
client/mac/handler/exception_handler.cc
client/mac/handler/minidump_generator.cc
client/mac/handler/protected_memory_allocator.cc
# client/mac/Framework/Breakpad.mm
# client/mac/Framework/OnDemandServer.mm
common/mac/file_id.cc
common/mac/macho_id.cc
common/mac/macho_reader.cc
common/mac/macho_utilities.cc
common/mac/macho_walker.cc
common/mac/string_utilities.cc
common/string_conversion.cc
common/convert_UTF.c
common/md5.c
common/mac/dump_syms.mm
common/mac/MachIPC.mm
common/mac/SimpleStringDictionary.mm
client/minidump_file_writer.cc
LIST(APPEND breakpadSources
client/minidump_file_writer.cc
common/convert_UTF.c
common/string_conversion.cc
)
ELSE(APPLE)
SET( breakpadSources
client/linux/crash_generation/crash_generation_client.cc
client/linux/crash_generation/crash_generation_server.cc
client/linux/minidump_writer/minidump_writer.cc
client/linux/minidump_writer/linux_dumper.cc
client/linux/handler/exception_handler.cc
common/linux/dump_symbols.cc
common/linux/file_id.cc
common/linux/libcurl_wrapper.cc
common/linux/google_crashdump_uploader.cc
common/linux/synth_elf.cc
common/linux/http_upload.cc
common/linux/guid_creator.cc
common/linux/elf_symbols_to_module.cc
common/string_conversion.cc
common/convert_UTF.c
client/minidump_file_writer.cc
)
ENDIF(APPLE)
ENDIF(UNIX)
include_directories(.)
add_definitions(-fPIC)
add_library(tomahawk_breakpad STATIC ${breakpadSources})
target_link_libraries(tomahawk_breakpad)
IF(WIN32)
ADD_DEFINITIONS( -DUNICODE )
SET( breakpadSources
client/windows/handler/exception_handler.cc
client/windows/crash_generation/crash_generation_client.cc
common/windows/guid_string.cc
)
ENDIF(WIN32)
INCLUDE_DIRECTORIES(.)
ADD_DEFINITIONS( -fPIC )
ADD_LIBRARY( tomahawk_breakpad STATIC ${breakpadSources} )
TARGET_LINK_LIBRARIES( tomahawk_breakpad )

View File

@ -30,8 +30,8 @@
#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__
#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__
#include <Windows.h>
#include <DbgHelp.h>
#include <windows.h>
#include <dbghelp.h>
#include <string>
#include <utility>
#include "common/windows/string_utils-inl.h"

View File

@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ObjBase.h>
#include <objbase.h>
#include <algorithm>
#include <cassert>
@ -866,10 +866,11 @@ BOOL CALLBACK ExceptionHandler::MinidumpWriteDumpCallback(
return TRUE;
// Stop receiving cancel callbacks.
case CancelCallback:
callback_output->CheckCancel = FALSE;
callback_output->Cancel = FALSE;
return TRUE;
//FIXME: CancelCallback is missing in our mingw headers currently, but it's present in trunk, so we need to comment this in as soon as mingw is updated in opensuse (domme)
// case CancelCallback:
// callback_output->CheckCancel = FALSE;
// callback_output->Cancel = FALSE;
// return TRUE;
}
// Ignore other callback types.
return FALSE;

View File

@ -57,8 +57,8 @@
#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__
#include <stdlib.h>
#include <Windows.h>
#include <DbgHelp.h>
#include <windows.h>
#include <dbghelp.h>
#include <rpc.h>
#pragma warning( push )

View File

@ -32,7 +32,7 @@
#ifndef COMMON_WINDOWS_GUID_STRING_H__
#define COMMON_WINDOWS_GUID_STRING_H__
#include <Guiddef.h>
#include <guiddef.h>
#include <string>

View File

@ -57,7 +57,7 @@ typedef uint64_t u_int64_t;
#else /* !_WIN32 */
#include <WTypes.h>
#include <wtypes.h>
typedef unsigned __int8 u_int8_t;
typedef unsigned __int16 u_int16_t;