mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Breakpad implementation (#535)
* qBreakpad simple implementation * update chatterino.pro for linux * Add breakpad building script for linux
This commit is contained in:
parent
524be95e8b
commit
10df071077
6 changed files with 38 additions and 1 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -17,3 +17,6 @@
|
||||||
path = lib/websocketpp
|
path = lib/websocketpp
|
||||||
url = https://github.com/zaphoyd/websocketpp.git
|
url = https://github.com/zaphoyd/websocketpp.git
|
||||||
branch = develop
|
branch = develop
|
||||||
|
[submodule "lib/qBreakpad"]
|
||||||
|
path = lib/qBreakpad
|
||||||
|
url = https://github.com/jiakuan/qBreakpad.git
|
||||||
|
|
|
@ -32,6 +32,11 @@
|
||||||
2. Under Tools:
|
2. Under Tools:
|
||||||
- Select Qt Creator, and Qt Creator CDB Debugger Support
|
- Select Qt Creator, and Qt Creator CDB Debugger Support
|
||||||
|
|
||||||
|
### Compile with Breakpad support (Optional)
|
||||||
|
1. Open up lib/qBreakpad/handler/handler.pro
|
||||||
|
2. Build it in whichever mode you wanna build Chatterino (Debug/Profile/Release)
|
||||||
|
3. Copy the newly built qBreakpad.lib to a folder you create: `lib/qBreakpad/build/handler`
|
||||||
|
|
||||||
# Windows (Using MSYS2, not recommended)
|
# Windows (Using MSYS2, not recommended)
|
||||||
Note: This guide is currently out of date and will not work as is.
|
Note: This guide is currently out of date and will not work as is.
|
||||||
Note: This build will have some features missing from the build.
|
Note: This build will have some features missing from the build.
|
||||||
|
|
|
@ -17,6 +17,12 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
PRECOMPILED_HEADER = src/PrecompiledHeader.hpp
|
PRECOMPILED_HEADER = src/PrecompiledHeader.hpp
|
||||||
CONFIG += precompile_header
|
CONFIG += precompile_header
|
||||||
|
|
||||||
|
useBreakpad {
|
||||||
|
LIBS += -L$$PWD/lib/qBreakpad/handler/build
|
||||||
|
include(lib/qBreakpad/qBreakpad.pri)
|
||||||
|
DEFINES += CHATTERINO_USE_BREAKPAD
|
||||||
|
}
|
||||||
|
|
||||||
# https://bugreports.qt.io/browse/QTBUG-27018
|
# https://bugreports.qt.io/browse/QTBUG-27018
|
||||||
equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
|
equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
|
||||||
TARGET = bin/chatterino
|
TARGET = bin/chatterino
|
||||||
|
@ -444,4 +450,4 @@ win32-msvc* {
|
||||||
|
|
||||||
linux {
|
linux {
|
||||||
QMAKE_LFLAGS += -lrt
|
QMAKE_LFLAGS += -lrt
|
||||||
}
|
}
|
1
lib/qBreakpad
Submodule
1
lib/qBreakpad
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a4626c12e9ae6f02fc1ca7a4e399bd8307424103
|
|
@ -23,6 +23,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CHATTERINO_USE_BREAKPAD
|
||||||
|
#include <QBreakpadHandler.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int runGui(QApplication &a, int argc, char *argv[]);
|
int runGui(QApplication &a, int argc, char *argv[]);
|
||||||
void runNativeMessagingHost();
|
void runNativeMessagingHost();
|
||||||
void installCustomPalette();
|
void installCustomPalette();
|
||||||
|
@ -83,6 +87,10 @@ int runGui(QApplication &a, int argc, char *argv[])
|
||||||
|
|
||||||
app->construct();
|
app->construct();
|
||||||
|
|
||||||
|
#ifdef CHATTERINO_USE_BREAKPAD
|
||||||
|
QBreakpadInstance.setDumpPath(app->paths->settingsFolderPath + "/Crashes");
|
||||||
|
#endif
|
||||||
|
|
||||||
auto &pathMan = *app->paths;
|
auto &pathMan = *app->paths;
|
||||||
// Running file
|
// Running file
|
||||||
auto runningPath = pathMan.miscDirectory + "/running_" + pathMan.applicationFilePathHash;
|
auto runningPath = pathMan.miscDirectory + "/running_" + pathMan.applicationFilePathHash;
|
||||||
|
|
14
tools/build-breakpad-linux.sh
Executable file
14
tools/build-breakpad-linux.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd ../lib/qBreakpad
|
||||||
|
|
||||||
|
echo "Updating qBreakpad's breakpad dependency version"
|
||||||
|
cd third_party/breakpad
|
||||||
|
git checkout 7b3afa9258e58a57ffbeb395d445811f92616ae9
|
||||||
|
cd ../../
|
||||||
|
|
||||||
|
cd handler
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake ..
|
||||||
|
echo "Building handler"
|
||||||
|
make -j8 && "Successfully built qBreakpad"
|
Loading…
Reference in a new issue