Skip to content

Commit

Permalink
fix checking for wrong file
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaDev5 committed Jan 7, 2025
1 parent 5a9dc98 commit 7d14efe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugin-dev/Source/Sentry/Sentry.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,16 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
string crashpadBuildPath = Path.Combine(buildPath, "crashpad_build");
if(Target.Configuration == UnrealTargetConfiguration.Debug)
{
if (!File.Exists(Path.Combine(crashpadBuildPath, "handler", "Debug", "crashpad_handler.exe")))
if (!File.Exists(Path.Combine(buildOutputPath, "crashpad_handler.exe")))
{
Console.WriteLine("Copying crashpad_handler.exe");
File.Copy(Path.Combine(crashpadBuildPath, "handler", "Debug", "crashpad_handler.exe"),
Path.Combine(buildOutputPath, "crashpad_handler.exe"));
}
else
{
Console.WriteLine("crashpad_handler.exe already exists");
}

RuntimeDependencies.Add(Path.Combine(buildOutputPath, "crashpad_handler.exe"));
PublicAdditionalLibraries.Add(Path.Combine(crashpadBuildPath, "handler", "Debug", "crashpad_handler_lib.lib"));
Expand All @@ -596,11 +601,16 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
}
else
{
if (!File.Exists(Path.Combine(crashpadBuildPath, "handler", "Release", "crashpad_handler.exe")))
if (!File.Exists(Path.Combine(buildOutputPath, "crashpad_handler.exe")))
{
Console.WriteLine("Copying crashpad_handler.exe");
File.Copy(Path.Combine(crashpadBuildPath, "handler", "Release", "crashpad_handler.exe"),
Path.Combine(buildOutputPath, "crashpad_handler.exe"));
}
else
{
Console.WriteLine("crashpad_handler.exe already exists");
}

RuntimeDependencies.Add(Path.Combine(buildOutputPath, "crashpad_handler.exe"));
PublicAdditionalLibraries.Add(Path.Combine(crashpadBuildPath, "handler", "Release", "crashpad_handler_lib.lib"));
Expand Down

0 comments on commit 7d14efe

Please sign in to comment.