Skip to content

Commit dc1954e

Browse files
authored
chore: Update script allowing to pre-build plugin dependencies locally (#1144)
* Update Cocoa SDK local build instructions * Fix Windows binaries output path * Update build flow * Make deps build script config similar to console extension setup * Update contributing guide * Fix PR suggestions * Fix PR suggestions
1 parent ea2be42 commit dc1954e

File tree

2 files changed

+273
-60
lines changed

2 files changed

+273
-60
lines changed

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,41 @@ This script links the checked out version of the plugin (the [plugin-dev](./plug
3333
3434
After that, you can generate project files for SentryPlayground.uproject to open it in your IDE and make changes to the SDK as you would with any other Unreal project.
3535

36+
### Building Plugin Dependencies Locally
37+
38+
By default, the initialization scripts download pre-built SDK dependencies from CI. If you need to build platform dependencies locally (e.g., for development or debugging) you can use the `build-deps.ps1` script.
39+
40+
The plugin uses the following platform-specific SDKs:
41+
- **[sentry-native](https://github.com/getsentry/sentry-native.git)** - Windows support (requires Windows)
42+
- **[sentry-cocoa](https://github.com/getsentry/sentry-cocoa.git)** - Mac and iOS support (requires macOS)
43+
- **[sentry-java](https://github.com/getsentry/sentry-java.git)** - Android support (any platform)
44+
45+
To build dependencies locally, first obtain the SDK source code, configure environment variables (optional) and run the build script:
46+
47+
```pwsh
48+
# One-time: Set environment variables
49+
$env:SENTRY_NATIVE_PATH = "D:\projects\sentry-native"
50+
$env:SENTRY_COCOA_PATH = "D:\projects\sentry-cocoa"
51+
$env:SENTRY_JAVA_PATH = "D:\projects\sentry-java"
52+
53+
# Option 1: Build all SDKs for current platform (uses environment variables)
54+
./scripts/build-deps.ps1 -All
55+
56+
# Option 2: Build specific SDKs
57+
./scripts/build-deps.ps1 -Native -Java
58+
./scripts/build-deps.ps1 -Cocoa
59+
60+
# Option 3: Build with custom paths (without setting environment variables)
61+
./scripts/build-deps.ps1 -Native -NativePath "D:\projects\sentry-native"
62+
./scripts/build-deps.ps1 -All -CocoaPath "D:\custom\sentry-cocoa"
63+
```
64+
65+
The script pre-builds the SDK binaries and copies them to `plugin-dev/Source/ThirdParty` directory, replacing any existing binaries.
66+
67+
> [!NOTE]
68+
> - **Windows**: `-All` builds Native + Java (Cocoa requires macOS)
69+
> - **macOS**: `-All` builds Cocoa + Java (Native requires Windows)
70+
3671
### Modifying Plugin Content
3772

3873
All files that belong to the plugin are listed in the snapshot file:

0 commit comments

Comments
 (0)