-
Notifications
You must be signed in to change notification settings - Fork 2k
[Extensibility] Resizetizer: Enable external backend processing #36653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
8696c89
f94cfe0
b55f592
ec48b80
de0c762
326f64a
61c131a
45c7e9c
546a585
9019808
7eefa8f
da316d8
c7d518f
dfb0539
fa4720c
7fef2c1
5ee75fb
8d63ac1
2eefa6d
4f7ec2f
881f5ca
500cc32
26f818e
8145eba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,7 +113,14 @@ | |
|
|
||
| <PropertyGroup Condition="'$(_ResizetizerIsAndroidApp)' == 'True' Or '$(_ResizetizerIsiOSApp)' == 'True' Or '$(_ResizetizerIsWPFApp)' == 'True' Or '$(_ResizetizerIsWindowsAppSdk)' == 'True' Or '$(_ResizetizerIsTizenApp)' == 'True'"> | ||
| <_ResizetizerIsCompatibleApp>True</_ResizetizerIsCompatibleApp> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- External backends opt in by setting ResizetizerPlatformType in their targets. --> | ||
| <PropertyGroup Condition="'$(_ResizetizerIsCompatibleApp)' != 'True' And '$(ResizetizerPlatformType)' != ''"> | ||
|
kubaflo marked this conversation as resolved.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ Logic — External opt-in schedules splash processing but silently produces no output Flagged by: 2/3 reviewers after dispute This new compatibility branch also activates the existing Issue #35022 explicitly lists " |
||
| <_ResizetizerIsCompatibleApp>True</_ResizetizerIsCompatibleApp> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(_ResizetizerIsCompatibleApp)' == 'True'"> | ||
| <ResizetizeDependsOnTargets> | ||
| $(ResizetizeDependsOnTargets); | ||
| ResizetizeCollectItems; | ||
|
|
@@ -254,7 +261,7 @@ | |
|
|
||
| <!-- Collect images from referenced projects --> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
| <Target Name="ResizetizeCollectItems" | ||
| Condition="'$(_ResizetizerIsCompatibleApp)' == 'True' And '$(DisableResizetizer)' != 'true'" | ||
| Condition="'$(DisableResizetizer)' != 'true'" | ||
| BeforeTargets="$(ResizetizeCollectItemsBeforeTargets)" | ||
| AfterTargets="$(ResizetizeCollectItemsAfterTargets)"> | ||
|
|
||
|
kubaflo marked this conversation as resolved.
|
||
|
|
@@ -375,6 +382,7 @@ | |
| <_MauiAssetItemMetadata Condition="'$(_ResizetizerIsiOSApp)' == 'True'">Link</_MauiAssetItemMetadata> | ||
| <_MauiAssetItemMetadata Condition="'$(_ResizetizerIsWindowsAppSdk)' == 'True'">TargetPath</_MauiAssetItemMetadata> | ||
| <_MauiAssetItemMetadata Condition="'$(_ResizetizerIsTizenApp)' == 'True'">TizenTpkFileName</_MauiAssetItemMetadata> | ||
| <_MauiAssetItemMetadata Condition="'$(_MauiAssetItemMetadata)' == ''">Link</_MauiAssetItemMetadata> | ||
|
kubaflo marked this conversation as resolved.
|
||
| </PropertyGroup> | ||
| <GetMauiAssetPath | ||
| ProjectDirectory="$(MSBuildProjectDirectory)" | ||
|
|
@@ -395,8 +403,17 @@ | |
| <ItemGroup Condition="'$(_ResizetizerIsTizenApp)' == 'True'"> | ||
| <TizenResource Include="@(_MauiAssetItemWithMetadata)" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <MauiProcessedAsset Include="@(_MauiAssetItemWithMetadata)" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <!-- External backends add packaging targets to ResizetizerAfterAssetProcessingTargets. --> | ||
| <Target Name="ResizetizerAfterAssetProcessing" | ||
| AfterTargets="ProcessMauiAssets" | ||
| DependsOnTargets="$(ResizetizerAfterAssetProcessingTargets)" | ||
| Condition="'$(EnableMauiAssetProcessing)' == 'true'" /> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
|
|
||
| <Target Name="ProcessMauiSplashScreens" | ||
| Condition="'$(EnableMauiSplashScreenProcessing)' == 'true'" | ||
| Inputs="$(MSBuildThisFileFullPath);$(_ResizetizerTaskAssemblyName);$(_MauiSplashInputsFile);@(MauiSplashScreen)" | ||
|
|
@@ -533,6 +550,7 @@ | |
|
|
||
| <ItemGroup> | ||
| <_MauiFontCopied Include="$(_MauiIntermediateFonts)*" /> | ||
| <MauiProcessedFont Include="@(MauiFont->'$(_MauiIntermediateFonts)%(Filename)%(Extension)')" /> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
| </ItemGroup> | ||
|
|
||
| <!-- iOS --> | ||
|
|
@@ -606,6 +624,12 @@ | |
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <!-- External backends add packaging targets to ResizetizerAfterFontProcessingTargets. --> | ||
| <Target Name="ResizetizerAfterFontProcessing" | ||
| AfterTargets="ProcessMauiFonts" | ||
| DependsOnTargets="$(ResizetizerAfterFontProcessingTargets)" | ||
| Condition="'$(EnableMauiFontProcessing)' == 'true'" /> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
|
|
||
| <Target Name="_ReadResizetizeImagesOutputs"> | ||
| <ReadLinesFromFile File="$(_ResizetizerOutputsFile)" Condition="Exists ('$(_ResizetizerOutputsFile)')"> | ||
| <Output TaskParameter="Lines" ItemName="_ResizetizerOutputs" /> | ||
|
|
@@ -657,6 +681,38 @@ | |
| Files="@(_ResizetizerImagesToDelete)" | ||
| /> | ||
|
|
||
| <ItemGroup> | ||
| <MauiProcessedImage Include="@(_ResizetizerCollectedImages)" /> | ||
|
kubaflo marked this conversation as resolved.
kubaflo marked this conversation as resolved.
|
||
| </ItemGroup> | ||
|
kubaflo marked this conversation as resolved.
|
||
|
|
||
| <!-- Touch/create our stamp file for outputs --> | ||
| <Touch Files="$(_ResizetizerStampFile)" AlwaysCreate="True" /> | ||
| <WriteLinesToFile | ||
| File="$(_ResizetizerOutputsFile)" | ||
| Lines="@(_ResizetizerCollectedImages->'%(Identity)')" | ||
| Overwrite="true" | ||
| WriteOnlyWhenDifferent="true" | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
| /> | ||
|
|
||
| <!-- Include our images and stamp file as filewrites so they don't get rm'd --> | ||
| <ItemGroup> | ||
| <FileWrites Include="@(_ResizetizerCollectedImages)" /> | ||
| <FileWrites Include="$(_ResizetizerStampFile)" /> | ||
| <FileWrites Include="$(_ResizetizerOutputsFile)" /> | ||
| </ItemGroup> | ||
|
kubaflo marked this conversation as resolved.
|
||
| </Target> | ||
|
|
||
| <!-- External backends add packaging targets to ResizetizerAfterImageProcessingTargets. --> | ||
| <Target Name="ResizetizerAfterImageProcessing" | ||
| AfterTargets="ResizetizeImages" | ||
| BeforeTargets="_ResizetizeInjectPlatformItems" | ||
| DependsOnTargets="$(ResizetizerAfterImageProcessingTargets)" | ||
| Condition="'$(EnableMauiImageProcessing)' == 'true'" /> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
|
|
||
| <Target Name="_ResizetizeInjectPlatformItems" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ Regression — Preserve the existing Flagged by: 2/3 reviewers after dispute This extraction makes Keep |
||
| AfterTargets="ResizetizeImages" | ||
| Condition="'$(EnableMauiImageProcessing)' == 'true' And ('$(_ResizetizerIsAndroidApp)' == 'True' Or '$(_ResizetizerIsiOSApp)' == 'True' Or '$(_ResizetizerIsWindowsAppSdk)' == 'True' Or '$(_ResizetizerIsWPFApp)' == 'True' Or '$(_ResizetizerIsTizenApp)' == 'True')"> | ||
|
|
||
| <!-- iOS --> | ||
| <ItemGroup Condition="'$(_ResizetizerIsiOSApp)' == 'True'"> | ||
| <!-- Batch the collectd items into BundleResource which iOS expects --> | ||
|
kubaflo marked this conversation as resolved.
Outdated
|
||
|
|
@@ -729,20 +785,6 @@ | |
| <FileWrites Include="@(_ResizetizerCollectedImages)" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Touch/create our stamp file for outputs --> | ||
| <Touch Files="$(_ResizetizerStampFile)" AlwaysCreate="True" /> | ||
| <WriteLinesToFile | ||
| File="$(_ResizetizerOutputsFile)" | ||
| Lines="@(_ResizetizerCollectedImages->'%(Identity)')" | ||
| Overwrite="true" | ||
| WriteOnlyWhenDifferent="true" | ||
| /> | ||
|
|
||
| <!-- Include our images and stamp file as filewrites so they don't get rm'd --> | ||
| <ItemGroup> | ||
| <FileWrites Include="$(_ResizetizerStampFile)" /> | ||
| <FileWrites Include="$(_ResizetizerOutputsFile)" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <!-- | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.