Skip to content

Commit 86d91fa

Browse files
committed
final touches
1 parent 0f32cbe commit 86d91fa

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ modules/sentry-native-ndk
4646
# Android SDK files
4747
package-dev/Plugins/Android/Sentry~/*
4848

49+
# Windows SDK files
50+
package-dev/Plugins/Windows/Sentry~/*
51+
package-dev/Plugins/Windows/SentryNative~/*
52+
4953
# CLI
5054
package-dev/Editor/sentry-cli
5155

build/native-sdks.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@
111111

112112
<Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake -B build -D SENTRY_BACKEND=crashpad -D SENTRY_SDK_NAME=sentry.native.unity -D SENTRY_BUILD_RUNTIMESTATIC=ON -S ." />
113113
<Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake --build build --target sentry --config RelWithDebInfo --parallel" />
114-
<Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake --build build --target crashpad_handler --config Release --parallel" />
114+
<Exec WorkingDirectory="$(SentryNativeRoot)" Command="cmake --build build --target crashpad_handler --config RelWithDebInfo --parallel" />
115115

116116
<MakeDir Directories="$(SentryWindowsArtifactsDestination)" />
117117

118118
<ItemGroup>
119-
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/Release/crashpad_handler.exe" />
120-
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/Release/crashpad_handler.pdb" />
119+
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/RelWithDebInfo/crashpad_handler.exe" />
120+
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/RelWithDebInfo/crashpad_handler.pdb" />
121121
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/RelWithDebInfo/crashpad_wer.dll" />
122122
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/crashpad_build/handler/RelWithDebInfo/crashpad_wer.pdb" />
123123
<NativeSdkArtifacts Include="$(SentryNativeRoot)build/RelWithDebInfo/sentry.dll" />

src/Sentry.Unity.Native/SentryNativeBridge.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ is RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer
9999
Logger?.LogDebug("Setting EnableMetrics: {0}", options.EnableMetrics);
100100
sentry_options_set_enable_metrics(cOptions, options.EnableMetrics ? 1 : 0);
101101

102+
var shutdownMs = (ulong)Math.Max(0, options.ShutdownTimeout.TotalMilliseconds);
103+
Logger?.LogDebug("Setting ShutdownTimeout: {0} ms", shutdownMs);
104+
sentry_options_set_shutdown_timeout(cOptions, shutdownMs);
105+
102106
if (options.UnityInfo.IL2CPP)
103107
{
104108
Logger?.LogDebug("Setting the native logger");
@@ -178,6 +182,9 @@ internal static string GetDatabasePath(SentryUnityOptions options, IApplication?
178182
[DllImport(SentryLib)]
179183
private static extern void sentry_options_set_enable_metrics(IntPtr options, int enable_metrics);
180184

185+
[DllImport(SentryLib)]
186+
private static extern void sentry_options_set_shutdown_timeout(IntPtr options, ulong shutdown_timeout);
187+
181188
[UnmanagedFunctionPointer(CallingConvention.Cdecl, SetLastError = true)]
182189
private delegate void sentry_logger_function_t(int level, IntPtr message, IntPtr argsAddress, IntPtr userData);
183190

0 commit comments

Comments
 (0)