Skip to content

Commit

Permalink
chore: move sentry_native to modules/ & bump (#32)
Browse files Browse the repository at this point in the history
* chore: Move `sentry-native` to `modules/` directory and bump ref

* chore: Bump `sentry-native`

* Fix crashpad_handler path
  • Loading branch information
limbonaut authored Nov 28, 2024
1 parent 4c5b36d commit 8bb0a69
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "sentry-native"]
path = sentry-native
path = modules/sentry-native
url = https://github.com/getsentry/sentry-native.git
[submodule "modules/gdUnit4"]
path = modules/gdUnit4
Expand Down
18 changes: 9 additions & 9 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ if env["platform"] in ["linux", "macos"]:
return result.returncode

sentry_native = env.Command(
["sentry-native/install/lib/libsentry.a", BIN_DIR + "/crashpad_handler"],
["sentry-native/src"],
["modules/sentry-native/install/lib/libsentry.a", BIN_DIR + "/crashpad_handler"],
["modules/sentry-native/src"],
[
build_sentry_native,
Copy(
BIN_DIR + "/crashpad_handler",
"sentry-native/install/bin/crashpad_handler",
"modules/sentry-native/install/bin/crashpad_handler",
),
],
)
Expand All @@ -60,28 +60,28 @@ elif env["platform"] == "windows":
return result.returncode

sentry_native = env.Command(
["sentry-native/install/lib/sentry.lib", BIN_DIR + "/crashpad_handler.exe"],
["sentry-native/src/"],
["modules/sentry-native/install/lib/sentry.lib", BIN_DIR + "/crashpad_handler.exe"],
["modules/sentry-native/src/"],
[
build_sentry_native,
Copy(
BIN_DIR + "/crashpad_handler.exe",
"sentry-native/install/bin/crashpad_handler.exe",
"modules/sentry-native/install/bin/crashpad_handler.exe",
),
],
)
Depends(sentry_native, "godot-cpp") # Force sentry-native to be built sequential to godot-cpp (not in parallel)
Default(sentry_native)
Clean(sentry_native, ["sentry-native/build", "sentry-native/install"])
Clean(sentry_native, ["modules/sentry-native/build", "modules/sentry-native/install"])

# Include relative to project source root.
env.Append(CPPPATH=["src/"])

# Include sentry-native libs (static).
if env["platform"] in ["linux", "macos", "windows"]:
env.Append(CPPDEFINES=["SENTRY_BUILD_STATIC", "NATIVE_SDK"])
env.Append(CPPPATH=["sentry-native/include"])
env.Append(LIBPATH=["sentry-native/install/lib/"])
env.Append(CPPPATH=["modules/sentry-native/include"])
env.Append(LIBPATH=["modules/sentry-native/install/lib/"])
env.Append(
LIBS=[
"sentry",
Expand Down
1 change: 1 addition & 0 deletions modules/sentry-native
Submodule sentry-native added at 99b153
2 changes: 1 addition & 1 deletion scripts/build-sentry-native.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Push-Location sentry-native
Push-Location modules\sentry-native
cmake -B build -DSENTRY_BUILD_SHARED_LIBS=OFF -DSENTRY_BUILD_RUNTIMESTATIC=ON -DSENTRY_BACKEND=crashpad -DSENTRY_SDK_NAME="sentry.native.godot" -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --target sentry --parallel --config RelWithDebInfo
cmake --build build --target crashpad_handler --parallel --config RelWithDebInfo
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-sentry-native.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

cd sentry-native
cd modules/sentry-native
cmake -B build -DSENTRY_BUILD_SHARED_LIBS=OFF -DSENTRY_BACKEND=crashpad -DSENTRY_SDK_NAME="sentry.native.godot" -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --target sentry --parallel --config RelWithDebInfo
cmake --build build --target crashpad_handler --parallel --config RelWithDebInfo
cmake --install build --prefix install --config RelWithDebInfo
cd ..
cd ../..
1 change: 0 additions & 1 deletion sentry-native
Submodule sentry-native deleted from dbb958

0 comments on commit 8bb0a69

Please sign in to comment.