Skip to content

Commit

Permalink
fix: Find the relative path of the appicon
Browse files Browse the repository at this point in the history
Use AssignLinkMetadata to do that
  • Loading branch information
pictos authored and nickrandolph committed Sep 21, 2023
1 parent 6e8739b commit f2b34e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/.nuspec/Uno.Resizetizer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<ItemGroup>
<_WindowIconExtension Include="$(_UnoResizetizerIntermediateOutputRoot)Uno.Resizetizer.WindowIconExtensions.g.cs"/>
</ItemGroup>

<!-- Finds absolute paths to any UnoImage in this project -->
<!-- App head projects will invoke this target on their project references to collect images -->
<Target Name="GetUnoItems" Outputs="@(ExportedUnoItem)">
Expand Down Expand Up @@ -317,7 +317,7 @@

<!-- Map @(UnoIcon) to @(UnoImage IsAppIcon=true) -->
<ItemGroup>
<UnoImage Include="@(UnoIcon)" IsAppIcon="True" Link="" ProjectDirectory="%(UnoIcon.ProjectDirectory)"/>
<UnoImage Include="@(UnoIcon)" IsAppIcon="True" Link="%(UnoIcon.Link)" />
</ItemGroup>

<!-- Write out item spec and metadata to a file we can use as an inputs for the resize target -->
Expand Down
15 changes: 15 additions & 0 deletions src/.nuspec/Uno.Resizetizer.windows.skia.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
<Project>

<Target
Name="UpdatePathOfUnoIcon"
BeforeTargets="UnoResizetizeCollectItems"
Condition="'$(_UnoResizetizerIsWindowsAppSdk)' == 'True'">

<AssignLinkMetadata Items="@(UnoIcon)">
<Output TaskParameter="OutputItems" ItemName="_UnoIconLinked"/>
</AssignLinkMetadata>

<ItemGroup>
<UnoIcon Remove="@(UnoIcon)"/>
<UnoIcon Include="@(_UnoIconLinked)"/>
</ItemGroup>
</Target>

<Target
Name="GenerateUnoSplashWindowsSkia"
AfterTargets="GenerateUnoSplashScreens"
Expand Down

0 comments on commit f2b34e2

Please sign in to comment.