Skip to content

Commit 12a3604

Browse files
iljukhaputdimkanovikov
authored andcommitted
Fix BugSplat integration
Fix crashpad_handler paths and update symbol upload conditions for master branch
1 parent f99c7c8 commit 12a3604

File tree

7 files changed

+44
-10
lines changed

7 files changed

+44
-10
lines changed

.github/workflows/build_starc_linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
npm i -g node-dump-syms
108108
109109
- name: Upload Symbols for .so files
110+
if: github.ref == 'refs/heads/master'
110111
uses: BugSplat-Git/symbol-upload@main
111112
with:
112113
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -120,6 +121,7 @@ jobs:
120121
dumpSyms: true
121122

122123
- name: Upload Symbols for starcapp
124+
if: github.ref == 'refs/heads/master'
123125
uses: BugSplat-Git/symbol-upload@main
124126
with:
125127
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -251,6 +253,7 @@ jobs:
251253
npm i -g node-dump-syms
252254
253255
- name: Upload Symbols for .so files
256+
if: github.ref == 'refs/heads/master'
254257
uses: BugSplat-Git/symbol-upload@main
255258
with:
256259
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -264,6 +267,7 @@ jobs:
264267
dumpSyms: true
265268

266269
- name: Upload Symbols for starcapp
270+
if: github.ref == 'refs/heads/master'
267271
uses: BugSplat-Git/symbol-upload@main
268272
with:
269273
username: "${{ secrets.BUGSPLAT_USER }}"

.github/workflows/build_starc_mac.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
make -j4
7575
7676
- name: Upload debug symbols
77+
if: github.ref == 'refs/heads/master'
7778
uses: BugSplat-Git/symbol-upload@main
7879
with:
7980
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -183,6 +184,7 @@ jobs:
183184
make -j4
184185
185186
- name: Upload debug symbols
187+
if: github.ref == 'refs/heads/master'
186188
uses: BugSplat-Git/symbol-upload@main
187189
with:
188190
username: "${{ secrets.BUGSPLAT_USER }}"

.github/workflows/build_starc_windows.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
npm i -g node-dump-syms
110110
111111
- name: Upload debug symbols from _build folder
112+
if: github.ref == 'refs/heads/master'
112113
uses: BugSplat-Git/symbol-upload@main
113114
with:
114115
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -122,6 +123,7 @@ jobs:
122123
dumpSyms: true
123124

124125
- name: Upload debug symbols from _build/plugins folder
126+
if: github.ref == 'refs/heads/master'
125127
uses: BugSplat-Git/symbol-upload@main
126128
with:
127129
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -267,6 +269,7 @@ jobs:
267269
npm i -g node-dump-syms
268270
269271
- name: Upload debug symbols from _build folder
272+
if: github.ref == 'refs/heads/master'
270273
uses: BugSplat-Git/symbol-upload@main
271274
with:
272275
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -280,6 +283,7 @@ jobs:
280283
dumpSyms: true
281284

282285
- name: Upload debug symbols from _build/plugins folder
286+
if: github.ref == 'refs/heads/master'
283287
uses: BugSplat-Git/symbol-upload@main
284288
with:
285289
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -427,6 +431,7 @@ jobs:
427431
npm i -g node-dump-syms
428432
429433
- name: Upload debug symbols from _build folder
434+
if: github.ref == 'refs/heads/master'
430435
uses: BugSplat-Git/symbol-upload@main
431436
with:
432437
username: "${{ secrets.BUGSPLAT_USER }}"
@@ -440,6 +445,7 @@ jobs:
440445
dumpSyms: true
441446

442447
- name: Upload debug symbols from _build/plugins folder
448+
if: github.ref == 'refs/heads/master'
443449
uses: BugSplat-Git/symbol-upload@main
444450
with:
445451
username: "${{ secrets.BUGSPLAT_USER }}"

build/linux/make-starc-app-image.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
APP_IMAGE_DIR="appdir"
1111
mkdir $APP_IMAGE_DIR/lib
1212
mkdir $APP_IMAGE_DIR/plugins
13+
mkdir $APP_IMAGE_DIR/crashpad
1314
ls -l $APP_IMAGE_DIR
1415

1516
#
@@ -21,6 +22,17 @@ cp $APP_BIN_DIR/starcapp $APP_IMAGE_DIR/starc
2122
cp $APP_BIN_DIR/libcorelib.so.1 $APP_IMAGE_DIR/lib/
2223
cp $APP_BIN_DIR/plugins/*.so $APP_IMAGE_DIR/plugins/
2324

25+
#
26+
# Copy crashpad_handler
27+
#
28+
if [ ! -f "$APP_BIN_DIR/crashpad/crashpad_handler" ]; then
29+
echo "Error: crashpad_handler not found in $APP_BIN_DIR/crashpad/"
30+
echo "Make sure crashpad was built and copied during the build process."
31+
exit 1
32+
fi
33+
cp $APP_BIN_DIR/crashpad/crashpad_handler $APP_IMAGE_DIR/crashpad/
34+
chmod +x $APP_IMAGE_DIR/crashpad/crashpad_handler
35+
2436
#
2537
# Copy flathub required files
2638
#

build/mac/create_dmg.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ cp -R ../../src/_build/starcapp.app Story\ Architect.app
77
find Story\ Architect.app -name "*.dSYM" -print0 | xargs -0 rm -rf
88
macdeployqt Story\ Architect.app
99

10+
#
11+
# проверяем наличие crashpad_handler
12+
#
13+
if [ ! -f "Story Architect.app/Contents/MacOS/crashpad/crashpad_handler" ]; then
14+
echo "Error: crashpad_handler not found in Story Architect.app/Contents/MacOS/crashpad/"
15+
echo "Make sure crashpad was built and copied during the build process."
16+
exit 1
17+
fi
18+
chmod +x "Story Architect.app/Contents/MacOS/crashpad/crashpad_handler"
19+
1020
#
1121
# подпишем app-файл
1222
#

src/3rd_party/crashpad_paths/crashpad_paths.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ CrashpadPaths::CrashpadPaths()
7575
QString CrashpadPaths::getAttachmentPath()
7676
{
7777
#if defined(Q_OS_MACOS)
78-
return m_exeDir + "/../../../attachment.txt";
78+
return m_exeDir + "/../Resources/attachment.txt";
7979
#elif defined(Q_OS_WINDOWS)
8080
return m_exeDir + "\\..\\attachment.txt";
8181
#elif defined(Q_OS_LINUX)
@@ -88,7 +88,7 @@ QString CrashpadPaths::getAttachmentPath()
8888
QString CrashpadPaths::getHandlerPath()
8989
{
9090
#if defined(Q_OS_MAC)
91-
return m_exeDir + "/../../../crashpad/crashpad_handler";
91+
return m_exeDir + "/crashpad/crashpad_handler";
9292
#elif defined(Q_OS_WINDOWS)
9393
return m_exeDir + "\\crashpad\\crashpad_handler.exe";
9494
#elif defined(Q_OS_LINUX)
@@ -101,7 +101,7 @@ QString CrashpadPaths::getHandlerPath()
101101
QString CrashpadPaths::getReportsPath()
102102
{
103103
#if defined(Q_OS_MAC)
104-
return m_exeDir + "/../../../crashpad";
104+
return m_exeDir + "/crashpad";
105105
#elif defined(Q_OS_WINDOWS)
106106
return m_exeDir + "\\crashpad";
107107
#elif defined(Q_OS_LINUX)
@@ -114,7 +114,7 @@ QString CrashpadPaths::getReportsPath()
114114
QString CrashpadPaths::getMetricsPath()
115115
{
116116
#if defined(Q_OS_MAC)
117-
return m_exeDir + "/../../../crashpad";
117+
return m_exeDir + "/crashpad";
118118
#elif defined(Q_OS_WINDOWS)
119119
return m_exeDir + "\\crashpad";
120120
#elif defined(Q_OS_LINUX)

src/core/core.pro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ win32 {
9696
# Копируем crashpad_handler в директорию сборки
9797
#
9898
macx {
99-
QMAKE_POST_LINK += "mkdir -p $$OUT_PWD/crashpad"
100-
QMAKE_POST_LINK += " && cp $$CRASHPAD_HANDLER_SRC $$OUT_PWD/crashpad/crashpad_handler"
99+
QMAKE_POST_LINK += "mkdir -p $$DESTDIR/../MacOS/crashpad"
100+
QMAKE_POST_LINK += " && cp $$CRASHPAD_HANDLER_SRC $$DESTDIR/../MacOS/crashpad/crashpad_handler"
101101
}
102102
win32 {
103-
QMAKE_POST_LINK += "mkdir $$shell_path($$OUT_PWD)\\crashpad"
104-
QMAKE_POST_LINK += " & copy /y $$shell_path($$CRASHPAD_HANDLER_SRC) $$shell_path($$OUT_PWD)\\crashpad\\crashpad_handler.exe"
103+
QMAKE_POST_LINK += "mkdir $$shell_path($$DESTDIR)\\..\\crashpad"
104+
QMAKE_POST_LINK += " & copy /y $$shell_path($$CRASHPAD_HANDLER_SRC) $$shell_path($$DESTDIR)\\..\\crashpad\\crashpad_handler.exe"
105105
}
106106
linux {
107-
QMAKE_POST_LINK += "mkdir -p $$OUT_PWD/crashpad"
108-
QMAKE_POST_LINK += " && cp $$CRASHPAD_HANDLER_SRC $$OUT_PWD/crashpad/crashpad_handler"
107+
QMAKE_POST_LINK += "mkdir -p $$DESTDIR/../crashpad"
108+
QMAKE_POST_LINK += " && cp $$CRASHPAD_HANDLER_SRC $$DESTDIR/../crashpad/crashpad_handler"
109109
}
110110
#
111111

0 commit comments

Comments
 (0)