forked from backtrace-labs/backtrace-crashpad-cocoapod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
46 lines (37 loc) · 1.01 KB
/
build.sh
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
set -x
set -e
### Setup
rm -rf Sources
rm -rf vendor
mkdir vendor
cd vendor
### Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:${PWD}/depot_tools
fetch Crashpad
gclient sync
### Build Crashpad
cd crashpad
gn gen out/Default
ninja -C out/Default
cd ..
### Replace Crashpad's library with Backtrace's fork
mkdir backtrace-crashpad
cd backtrace-crashpad
git clone https://github.com/backtrace-labs/crashpad.git
cd crashpad
git checkout backtrace
cd .. && cd ..
### Update Crashpad with Backtrace's fork
cp -r backtrace-crashpad/crashpad/. crashpad
### Rebuild Crashpad
cd crashpad
gclient sync
gn gen out/Default
ninja -C out/Default
cd ..
cd .. # go to vendor's parent directory
### Move generated files to `Sources` directory
rsync -zarv --prune-empty-dirs --include "*/" --include="*.a" --include="*.h" --include="out/Default/crashpad_handler" --include="out/Default/crashpad_database_util" --exclude="*" vendor/crashpad Sources
### Clean up
rm -rf vendor