Pack the plugin icon into the release ZIP

DalamudPackager's default targets do not enable the HandleImages /
ImagesPath flags, so the images/ directory was silently excluded
from the build output even after the .csproj started copying
icon.png next to the DLL. The local Dalamud plugin loader then
fell back to the placeholder question-mark icon because there was
nothing to load at <plugindir>/images/icon.png.

Override the default by dropping a DalamudPackager.targets next to
the csproj — its presence disables the SDK's default target, which
is guarded on `!Exists($(PackagerTargetFile))`. The override
mirrors the SDK property list verbatim and adds HandleImages=true
plus ImagesPath=$(ProjectDir)images so the packager actually walks
the images directory and copies its contents into both the dev
plugin output and the release ZIP.

Verified: latest.zip now contains images/icon.png at the expected
path; both dev plugins and Custom-Repo installs will render the
Hellion logo locally without depending on the remote IconUrl.
This commit is contained in:
2026-05-01 23:35:19 +02:00
parent cb90c6ab93
commit 81d3c9ca6b
2 changed files with 87 additions and 0 deletions
+11
View File
@@ -62,6 +62,17 @@
<Folder Include="images\" />
</ItemGroup>
<!-- Copy images/icon.png next to the built DLL so Dalamud's local
plugin loader finds it at <plugindir>/images/icon.png. The
DalamudPackager.targets file in this directory then includes
the same path inside the release ZIP — see that file for the
full packaging override. -->
<ItemGroup>
<None Include="images\icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!--This doesn't work until Plogon is updated to include NodeJS-->
<!-- <Target Name="NodeJS Compile" BeforeTargets="BeforeCompile">-->
<!-- <Exec Command="npm install" WorkingDirectory="Http\Frontend"/>-->