-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
myQtCrasher.pro
119 lines (97 loc) · 4.46 KB
/
myQtCrasher.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp \
paths.cpp
HEADERS += \
mainwindow.h \
paths.h
FORMS += \
mainwindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
myQtCrasher.qrc
# BugSplat configuration options
BUGSPLAT_DATABASE = fred
BUGSPLAT_APPLICATION = myQtCrasher
BUGSPLAT_VERSION = 1.1
BUGSPLAT_USER = [email protected]
BUGSPLAT_PASSWORD = Flintstone
# Create a dSYM file for dump_syms
CONFIG += force_debug_info
CONFIG += separate_debug_info
# Include directories for Crashpad libraries
INCLUDEPATH += $$PWD/Crashpad/Include/crashpad
INCLUDEPATH += $$PWD/Crashpad/Include/crashpad/third_party/mini_chromium/mini_chromium
INCLUDEPATH += $$PWD/Crashpad/Include/crashpad/out/Default/gen
# Crashpad rules for MacOS
macx {
# Choose either x86_64 or arm64
#ARCH = x86_64
ARCH = arm64
# Crashpad libraries
LIBS += -L$$PWD/Crashpad/Libraries/MacOS/$$ARCH -lcommon
LIBS += -L$$PWD/Crashpad/Libraries/MacOS/$$ARCH -lclient
LIBS += -L$$PWD/Crashpad/Libraries/MacOS/$$ARCH -lbase
LIBS += -L$$PWD/Crashpad/Libraries/MacOS/$$ARCH -lutil
LIBS += -L$$PWD/Crashpad/Libraries/MacOS/$$ARCH -lmig_output
# System libraries
LIBS += -L/usr/lib/ -lbsm
LIBS += -framework AppKit
LIBS += -framework Security
# Copy crashpad_handler, attachment.txt to build directory, and upload symbols
QMAKE_POST_LINK += "mkdir -p $$OUT_PWD/crashpad"
QMAKE_POST_LINK += "&& cp $$PWD/Crashpad/Bin/MacOS/$$ARCH/crashpad_handler $$OUT_PWD/crashpad"
QMAKE_POST_LINK += "&& bash $$PWD/Crashpad/Tools/MacOS/symbols.sh $$PWD $$OUT_PWD $$BUGSPLAT_DATABASE $$BUGSPLAT_APPLICATION $$BUGSPLAT_VERSION $$BUGSPLAT_USER $$BUGSPLAT_PASSWORD"
QMAKE_POST_LINK += "&& cp $$PWD/Crashpad/attachment.txt $$OUT_PWD/attachment.txt"
}
# Crashpad rules for Windows
win32 {
# Build variables
CONFIG(debug, debug|release) {
LIBDIR = $$PWD/Crashpad/Libraries/Windows/MDd
EXEDIR = $$OUT_PWD\debug
}
CONFIG(release, debug|release) {
LIBDIR = $$PWD/Crashpad/Libraries/Windows/MD
EXEDIR = $$OUT_PWD\release
}
# Crashpad libraries
LIBS += -L$$LIBDIR -lcommon
LIBS += -L$$LIBDIR -lclient
LIBS += -L$$LIBDIR -lutil
LIBS += -L$$LIBDIR -lbase
# System libraries
LIBS += -lAdvapi32
# Copy crashpad_handler, attachment.txt to build directory, and upload symbols
QMAKE_POST_LINK += "mkdir $$shell_path($$OUT_PWD)\crashpad"
QMAKE_POST_LINK += "& copy /y $$shell_path($$PWD)\Crashpad\Bin\Windows\crashpad_handler.exe $$shell_path($$OUT_PWD)\crashpad\crashpad_handler.exe"
QMAKE_POST_LINK += "&& $$shell_path($$PWD)\Crashpad\Tools\Windows\symbols.bat $$shell_path($$PWD) $$shell_path($$EXEDIR) $$BUGSPLAT_DATABASE $$BUGSPLAT_APPLICATION $$BUGSPLAT_VERSION $$BUGSPLAT_USER $$BUGSPLAT_PASSWORD"
QMAKE_POST_LINK += "&& copy /y $$shell_path($$PWD)\Crashpad\attachment.txt $$shell_path($$OUT_PWD)\attachment.txt"
}
# Crashpad rules for Linux
linux {
# Crashpad libraries
LIBS += -L$$PWD/Crashpad/Libraries/Linux/ -lcommon
LIBS += -L$$PWD/Crashpad/Libraries/Linux/ -lclient
LIBS += -L$$PWD/Crashpad/Libraries/Linux/ -lutil
LIBS += -L$$PWD/Crashpad/Libraries/Linux/ -lbase
# Copy crashpad_handler, attachment.txt to build directory, and upload symbols
QMAKE_POST_LINK += "mkdir -p $$OUT_PWD/crashpad && cp $$PWD/Crashpad/Bin/Linux/crashpad_handler $$OUT_PWD/crashpad/crashpad_handler"
QMAKE_POST_LINK += "&& $$PWD/Crashpad/Tools/Linux/symbols.sh $$PWD $$OUT_PWD $$BUGSPLAT_DATABASE $$BUGSPLAT_APPLICATION $$BUGSPLAT_VERSION $$BUGSPLAT_USER $$BUGSPLAT_PASSWORD"
QMAKE_POST_LINK += "&& cp $$PWD/Crashpad/attachment.txt $$OUT_PWD/attachment.txt"
}