@@ -500,11 +500,11 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
500
500
PrivateIncludePaths . Add ( Path . Combine ( ModuleDirectory , "Private" , "Desktop" ) ) ;
501
501
502
502
PublicDefinitions . Add ( "USE_SENTRY_NATIVE=1" ) ;
503
- PublicDefinitions . Add ( "SENTRY_BUILD_STATIC=1" ) ;
504
503
505
504
if ( bForceBreakpad )
506
505
{
507
506
PublicDefinitions . Add ( "USE_SENTRY_BREAKPAD=1" ) ;
507
+ PublicDefinitions . Add ( "SENTRY_BUILD_STATIC=1" ) ;
508
508
}
509
509
}
510
510
#if UE_5_0_OR_LATER
@@ -561,12 +561,37 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
561
561
string buildPath = Path . Combine ( intermediatePath , "Win64" , "build" ) ;
562
562
if ( Target . Configuration == UnrealTargetConfiguration . Debug )
563
563
{
564
+ RuntimeDependencies . Add ( Path . Combine ( buildPath , "Debug" , "sentry.dll" ) ) ;
565
+ PublicDelayLoadDLLs . Add ( "sentry.dll" ) ;
564
566
PublicAdditionalLibraries . Add ( Path . Combine ( buildPath , "Debug" , "sentry.lib" ) ) ;
565
567
}
566
568
else
567
- {
569
+ {
570
+ RuntimeDependencies . Add ( Path . Combine ( buildPath , "Release" , "sentry.dll" ) ) ;
571
+ PublicDelayLoadDLLs . Add ( "sentry.dll" ) ;
568
572
PublicAdditionalLibraries . Add ( Path . Combine ( buildPath , "Release" , "sentry.lib" ) ) ;
569
573
}
574
+
575
+ if ( ! PublicDefinitions . Contains ( "USE_SENTRY_BREAKPAD=1" ) )
576
+ {
577
+ string crashpadBuildPath = Path . Combine ( buildPath , "crashpad_build" , "handler" ) ;
578
+ if ( Target . Configuration == UnrealTargetConfiguration . Debug )
579
+ {
580
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_handler.exe" ) ) ;
581
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_wer.dll" ) ) ;
582
+ PublicDelayLoadDLLs . Add ( "crashpad_wer.dll" ) ;
583
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_handler_lib.lib" ) ) ;
584
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_wer.lib" ) ) ;
585
+ }
586
+ else
587
+ {
588
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_handler.exe" ) ) ;
589
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_wer.dll" ) ) ;
590
+ PublicDelayLoadDLLs . Add ( "crashpad_wer.dll" ) ;
591
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_handler_lib.lib" ) ) ;
592
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_wer.lib" ) ) ;
593
+ }
594
+ }
570
595
}
571
596
#if UE_5_0_OR_LATER
572
597
else if ( Target . Platform = = UnrealTargetPlatform . Linux || Target . Platform == UnrealTargetPlatform . LinuxArm64 )
@@ -577,12 +602,30 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
577
602
string buildPath = Path. Combine ( intermediatePath , "Linux" , "build" ) ;
578
603
if ( Target . Configuration == UnrealTargetConfiguration . Debug )
579
604
{
605
+ RuntimeDependencies . Add ( Path . Combine ( buildPath , "Debug" , "sentry.so" ) ) ;
580
606
PublicAdditionalLibraries . Add ( Path . Combine ( buildPath , "Debug" , "sentry.a" ) ) ;
581
607
}
582
608
else
583
609
{
610
+ RuntimeDependencies . Add ( Path . Combine ( buildPath , "Release" , "sentry.so" ) ) ;
584
611
PublicAdditionalLibraries . Add ( Path . Combine ( buildPath , "Release" , "sentry.a" ) ) ;
585
612
}
613
+
614
+ string crashpadBuildPath = Path . Combine ( buildPath , "crashpad_build" , "handler" ) ;
615
+ if ( Target . Configuration == UnrealTargetConfiguration . Debug )
616
+ {
617
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_handler" ) ) ;
618
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_wer.so" ) ) ;
619
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_handler_lib.a" ) ) ;
620
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Debug" , "crashpad_wer.a" ) ) ;
621
+ }
622
+ else
623
+ {
624
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_handler.exe" ) ) ;
625
+ RuntimeDependencies . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_wer.so" ) ) ;
626
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_handler_lib.a" ) ) ;
627
+ PublicAdditionalLibraries . Add ( Path . Combine ( crashpadBuildPath , "Release" , "crashpad_wer.a" ) ) ;
628
+ }
586
629
}
587
630
else if ( Target . Platform = = XboxXPlatform || Target . Platform == XboxOnePlatform )
588
631
{
0 commit comments