Merge pull request #1 from nvllsvm/breakpad

Remove breakpad
This commit is contained in:
Ian Walton 2021-04-05 12:10:05 -04:00 committed by GitHub
commit 2b5b84f618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 0 additions and 283 deletions

View File

@ -52,8 +52,6 @@ include(VersionConfiguration)
include(NameConfiguration)
include(PlayerConfiguration)
include(InputConfiguration)
include(FindBreakpad)
include(BreakpadSymbols)
include(ClangTidy)
add_definitions(-DQS_LOG_LINE_NUMBERS -DQS_LOG_SEPARATE_THREAD)

View File

@ -1,44 +0,0 @@
include(CMakeDependentOption)
set(ENABLE_CRASHDUMP ON)
set(CRASHDUMP_SECRET "" CACHE STRING "Secret for the crashdump uploader")
if (NOT CRASHDUMP_SECRET)
message(STATUS "Crashdump secret not supplied, disabling crashdump uploading")
set(ENABLE_CRASHDUMP OFF)
else(NOT CRASHDUMP_SECRET)
message(STATUS "Enabling crashdump uploader")
endif(NOT CRASHDUMP_SECRET)
cmake_dependent_option(GENERATE_SYMBOLS "Should we generate symbols for binaries?" ON "ENABLE_CRASHDUMP" OFF)
function(dumpsyms target symfile)
find_program(DUMP_SYMS dump_syms HINTS /usr/bin/ PATH_SUFFIXES lib bin)
if(GENERATE_SYMBOLS AND NOT DUMP_SYMS)
message(WARNING "dump_syms not found")
endif()
if(GENERATE_SYMBOLS AND DUMP_SYMS)
if(APPLE)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND dsymutil -o ${MAIN_NAME}.dSYM $<TARGET_FILE:${MAIN_TARGET}>
COMMENT Generating ${MAIN_NAME}.dSYM
BYPRODUCTS ${MAIN_NAME}.dSYM/Contents/Resources/DWARF/${target} ${MAIN_NAME}.dSYM/Contents/Info.plist
)
set(EXTRA_DUMPSYMS_ARGS -g "${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.dSYM")
endif(APPLE)
set(TARGET_FILE $<TARGET_FILE:${target}>)
if(WIN32)
set(TARGET_FILE $<TARGET_PDB_FILE:${target}>)
endif(WIN32)
file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} PYTHON_EXE)
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR}/scripts/compress.py SCRIPT_PATH)
add_custom_command(
TARGET ${target} POST_BUILD
BYPRODUCTS ${symfile}.bz2
COMMAND ${DUMP_SYMS} ${EXTRA_DUMPSYMS_ARGS} ${TARGET_FILE} | ${PYTHON_EXE} -u ${SCRIPT_PATH} > ${symfile}.bz2
COMMENT Generating symbols
)
endif(GENERATE_SYMBOLS AND DUMP_SYMS)
endfunction()

View File

@ -1,69 +0,0 @@
###############################################################################
# CMake module to search for the mpv libraries.
#
# WARNING: This module is experimental work in progress.
#
# Based one FindVLC.cmake by:
# Copyright (c) 2011 Michael Jansen <info@michael-jansen.biz>
# Modified by Tobias Hieta <tobias@hieta.se>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
###############################################################################
#
### Global Configuration Section
#
SET(_BREAKPAD_REQUIRED_VARS BREAKPAD_INCLUDE_DIR BREAKPAD_LIBRARY)
#
### BREAKPAD uses pkgconfig.
#
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_BREAKPAD QUIET breakpad-client)
endif(PKG_CONFIG_FOUND)
#
### Look for the include files.
#
find_path(
BREAKPAD_INCLUDE_DIR
NAMES google_breakpad/common/breakpad_types.h
PATH_SUFFIXES breakpad
HINTS
${PC_BREAKPAD_INCLUDEDIR}
${PC_BREAKPAD_INCLUDE_DIRS} # Unused for BREAKPAD but anyway
DOC "BREAKPAD include directory"
)
mark_as_advanced(BREAKPAD_INCLUDE_DIR)
set(BREAKPAD_INCLUDE_DIRS ${BREAKPAD_INCLUDE_DIR})
#
### Look for the libraries (BREAKPAD)
#
find_library(
BREAKPAD_LIBRARY
NAMES breakpad_client
HINTS
${PC_BREAKPAD_LIBDIR}
${PC_BREAKPAD_LIBRARY_DIRS} # Unused for BREAKPAD but anyway
PATH_SUFFIXES lib${LIB_SUFFIX}
)
get_filename_component(_BREAKPAD_LIBRARY_DIR ${BREAKPAD_LIBRARY} PATH)
mark_as_advanced(BREAKPAD_LIBRARY)
set(BREAKPAD_LIBRARY_DIRS _BREAKPAD_CORE_LIBRARY_DIR _BREAKPAD_LIBRARY_DIR)
list(REMOVE_DUPLICATES BREAKPAD_LIBRARY_DIRS)
mark_as_advanced(BREAKPAD_LIBRARY_DIRS)
#
### Check if everything was found and if the version is sufficient.
#
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
BREAKPAD
REQUIRED_VARS ${_BREAKPAD_REQUIRED_VARS}
VERSION_VAR BREAKPAD_VERSION_STRING
)

View File

@ -27,52 +27,6 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE
OF THE POSSIBILITY OF SUCH DAMAGE.
Google breakpad:
----------------
Copyright (c) 2006, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------
Copyright 2001-2004 Unicode, Inc.
Disclaimer
This source code is provided as is by Unicode, Inc. No claims are
made as to fitness for any particular purpose. No warranties of any
kind are expressed or implied. The recipient agrees to determine
applicability of information provided. If this file has been
purchased on magnetic or optical media from Unicode, Inc., the
sole remedy for any claim will be exchange of defective media
within 90 days of receipt.
Limitations on Rights to Redistribute This Code
Unicode, Inc. hereby grants the right to freely use the information
supplied in this file in the creation of products supporting the
Unicode Standard, and to make copies of this file in any form
for internal or external distribution as long as this notice
remains attached.
Broadcom RPI decoder:
---------------------

View File

@ -14,17 +14,6 @@ set(CMAKE_AUTOMOC ON)
add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
find_package(Breakpad)
if(BREAKPAD_FOUND)
include_directories(${BREAKPAD_INCLUDE_DIR})
set(BREAKPAD_LIBRARIES ${BREAKPAD_LIBRARY})
if(UNIX)
# cmake issue: breakpad-client.pc adds this, but cmake discards it
set(BREAKPAD_LIBRARIES ${BREAKPAD_LIBRARIES} -lpthread)
endif()
endif()
add_subdirectory(shared)
add_subdirectory(core)
add_subdirectory(display)
@ -33,7 +22,6 @@ add_subdirectory(utils)
add_subdirectory(ui)
add_subdirectory(input)
add_subdirectory(system)
add_subdirectory(breakpad)
add_subdirectory(settings)
add_subdirectory(power)
@ -187,7 +175,6 @@ target_link_libraries(${MAIN_TARGET}
${EXTRA_LIBS}
${X11_LIBRARIES}
${X11_Xrandr_LIB}
${BREAKPAD_LIBRARIES}
${ICU_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${RPI_LIBS}
@ -200,6 +187,4 @@ set(EXE "${MAIN_NAME}.app")
set(LIBPATH ${CMAKE_FIND_ROOT_PATH})
set(SOURCE_ROOT ${CMAKE_SOURCE_DIR})
dumpsyms(${MAIN_TARGET} ${CMAKE_BINARY_DIR}/${MAIN_TARGET}.symbols)
include(CompleteBundle)

View File

@ -1,8 +0,0 @@
#ifndef BREAKPAD_H
#define BREAKPAD_H
#include <QString>
void installBreakPadHandler(const QString& name, const QString& destPath);
#endif

View File

@ -1,7 +0,0 @@
#include "QsLog.h"
#include "BreakPad.h"
void installBreakPadHandler(const QString& name, const QString& destPath)
{
QLOG_WARN() << "No crash reporting compiled.";
}

View File

@ -1,9 +0,0 @@
#include <client/linux/handler/exception_handler.h>
#include "BreakPad.h"
void installBreakPadHandler(const QString& name, const QString& destPath)
{
google_breakpad::MinidumpDescriptor desc(destPath.toStdString());
new google_breakpad::ExceptionHandler(desc, 0, 0, 0, true, -1);
}

View File

@ -1,17 +0,0 @@
#include <client/mac/handler/exception_handler.h>
#include "BreakPad.h"
/////////////////////////////////////////////////////////////////////////////////////////
static inline bool BreakPad_MinidumpCallback(const char *dump_dir, const char *minidump_id, void *context, bool succeeded)
{
fprintf(stderr, "****** Jellyfin Media Player CRASHED, CRASH REPORT WRITTEN: %s\n", dump_dir);
return succeeded;
}
/////////////////////////////////////////////////////////////////////////////////////////
void installBreakPadHandler(const QString& name, const QString& destPath)
{
Q_UNUSED(name);
new google_breakpad::ExceptionHandler(destPath.toStdString(), nullptr, BreakPad_MinidumpCallback, nullptr, true, nullptr);
}

View File

@ -1,22 +0,0 @@
#include <client/windows/handler/exception_handler.h>
#include "BreakPad.h"
/////////////////////////////////////////////////////////////////////////////////////////
bool BreakPad_MinidumpCallback(const wchar_t* dump_path,
const wchar_t* minidump_id,
void* context,
EXCEPTION_POINTERS* exinfo,
MDRawAssertionInfo* assertion,
bool succeeded)
{
return succeeded;
}
/////////////////////////////////////////////////////////////////////////////////////////
void installBreakPadHandler(const QString& name, const QString& destPath)
{
new google_breakpad::ExceptionHandler(destPath.toStdWString().c_str(), NULL, BreakPad_MinidumpCallback, NULL,
google_breakpad::ExceptionHandler::HANDLER_EXCEPTION |
google_breakpad::ExceptionHandler::HANDLER_PURECALL);
}

View File

@ -1,16 +0,0 @@
add_sources(BreakPad.h)
if(BREAKPAD_FOUND)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# requires Linux kernel and glibc
add_sources(BreakPadLinux.cpp)
elseif(APPLE)
add_sources(BreakPadOSX.cpp)
elseif(WIN32)
add_sources(BreakPadWin32.cpp)
else()
add_sources(BreakPadDummy.cpp)
endif()
else()
add_sources(BreakPadDummy.cpp)
endif()

View File

@ -1,24 +0,0 @@
//
// Created by Tobias Hieta on 26/08/15.
//
#ifndef KONVERGO_CRASHDUMPS_H
#define KONVERGO_CRASHDUMPS_H
#include "BreakPad.h"
#include "Paths.h"
#include "Version.h"
static void setupCrashDumper()
{
QDir dir(Paths::cacheDir("crashdumps/incoming/" + Version::GetCanonicalVersionString()));
dir.mkpath(dir.absolutePath());
#ifdef NDEBUG
installBreakPadHandler("Jellyfin Media Player", dir.path());
#else
QLOG_INFO() << "This is a debug build. Not installing crash handler.";
#endif
}
#endif //KONVERGO_CRASHDUMPS_H

View File

@ -16,7 +16,6 @@
#include "player/CodecsComponent.h"
#include "player/PlayerComponent.h"
#include "player/OpenGLDetect.h"
#include "breakpad/CrashDumps.h"
#include "Version.h"
#include "settings/SettingsComponent.h"
#include "settings/SettingsSection.h"
@ -164,9 +163,6 @@ int main(int argc, char *argv[])
PFMoveToApplicationsFolderIfNecessary();
#endif
// init breakpad.
setupCrashDumper();
UniqueApplication* uniqueApp = new UniqueApplication();
if (!uniqueApp->ensureUnique())
return EXIT_SUCCESS;