Refactor plugin third-party layout to UE standard

Plugin was non-autonomous: Build.cs referenced ../../../../Dependencies
(SDK installed externally) and copied dpwin64.dll into the project's
Binaries at build time, requiring manual DLL placement. Migrate to the
canonical UE third-party pattern so the plugin self-contains everything
and UBT handles staging.

- Embed minimal SDK files inside the plugin: dris.h, dpwin64.lib in
  Source/ThirdParty/DinkeyPro/, dpwin64.dll in Binaries/ThirdParty/DinkeyPro/Win64/.
- Switch from runtime GetProcAddress to import-lib delay-load (better
  protection: calls go through PE import table instead of named lookup).
- Load DLL via IPluginManager::FindPlugin()->GetBaseDir() — no more
  ProjectDir-based path, no more manual File.Copy in Build.cs.
- Drop Win32 dead code; plugin is Win64-only per the .uplugin whitelist.
- Update .gitignore to keep Binaries/ThirdParty/ tracked while ignoring
  build artifacts under Binaries/Win64/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 07:42:58 +02:00
parent 57f144a4bc
commit 2915e04380
7 changed files with 157 additions and 134 deletions

11
.gitignore vendored
View File

@@ -1,8 +1,11 @@
# Unreal generated / per-machine
Unreal/PS_Dinkey/.vs/
Unreal/PS_Dinkey/Binaries/Win64/PS_DinkeyEditor.target
Unreal/PS_Dinkey/Binaries/
Unreal/PS_Dinkey/DerivedDataCache/
Unreal/PS_Dinkey/Intermediate/
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Binaries/Win64/UE4Editor.modules
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Binaries/
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Intermediate/
Unreal/PS_Dinkey/Saved/
# Plugin generated — but keep Binaries/ThirdParty (DLLs shipped with the plugin)
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Binaries/*
!Unreal/PS_Dinkey/Plugins/PS_Dinkey/Binaries/ThirdParty/
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Intermediate/