Skip to content

Commit

Permalink
Merge pull request #204 from unoplatform/pj/windows-unpackage-appicon…
Browse files Browse the repository at this point in the history
…-issue

Window Appicon for Windows Unpackage
  • Loading branch information
nickrandolph authored Dec 1, 2023
2 parents f2bbf9d + 7785e38 commit 6461423
Show file tree
Hide file tree
Showing 24 changed files with 103 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ItemGroup>
<EmbeddedResource Include="Package.appxmanifest" />
<Manifest Include="$(ApplicationManifest)" />
<Content Include="..\Resizetizer.Extensions.Sample.Windows\Images\StoreLogo.png" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Package.appxmanifest" />
<Content Include="..\Resizetizer.Extensions.Sample.Windows\Images\StoreLogo.png" />
</ItemGroup>

<ItemGroup>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity
Name="8284486D-9D53-48F2-B1FB-E5689C4B6F72"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />
<Identity
Name="Resizetizer.Extensions.Sample"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />

<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>
<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>
<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
<uap:DefaultTile />
</uap:VisualElements>
</Application>
</Applications>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"profiles": {
"Resizetizer.Extensions.Sample.Windows (Package)": {
"commandName": "MsixPackage"
},
"Resizetizer.Extensions.Sample.Windows (Unpackaged)": {
"commandName": "Project"
"profiles": {
"Resizetizer.Extensions.Sample.Windows (Unpackaged)": {
"commandName": "Project"
},
"Resizetizer.Extensions.Sample.Windows (Package)": {
"commandName": "MsixPackage"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<RootNamespace>Resizetizer.Extensions.Sample.Windows</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<UseRidGraph>true</UseRidGraph>
<EnableMsixTooling>true</EnableMsixTooling>
<!-- Uncomment for Unpackaged builds -->
<!-- <WindowsPackageType>None</WindowsPackageType> -->
<!-- For Unpackaged builds, change version of SDK to previous stable release https://github.com/microsoft/WindowsAppSDK/issues/3591 -->
</PropertyGroup>
<PropertyGroup>
<!-- Bundles the WinAppSDK binaries (Uncomment for unpackaged builds) -->
<!-- <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> -->

<!-- Bundles the WinAppSDK binaries -->
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>

<!-- <SelfContained>true</SelfContained> -->
</PropertyGroup>

Expand All @@ -34,55 +31,31 @@
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
</ItemGroup>

<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<!-- <FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" /> -->
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Resizetizer.Extensions.Sample\Resizetizer.Extensions.Sample.csproj" />
</ItemGroup>

<!--
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
Tools extension to be activated for this project even if the Windows App SDK Nuget
package has not yet been restored.
-->
<!--
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
Tools extension to be activated for this project even if the Windows App SDK Nuget
package has not yet been restored.
-->
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<ProjectCapability Include="Msix"/>
<ProjectCapability Include="Msix" />
</ItemGroup>

<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
Explorer "Package and Publish" context menu entry to be enabled for this project even if
the Windows App SDK Nuget package has not yet been restored.
-->
<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
Explorer "Package and Publish" context menu entry to be enabled for this project even if
the Windows App SDK Nuget package has not yet been restored.
-->
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>

<Import Project="..\Resizetizer.Extensions.Sample.Base\base.props" />
<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerManifestPath>$(_UnoIntermediateManifest)Package.appxmanifest</_ResizetizerManifestPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateSplashScreen)splash_screen.scale-150.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateImages)iconapp.ico</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)Icons\iconappLogo.scale-150.png</_ResizetizerAppIconImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerManifestPath)')" Text="Manifest file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />

<Target Name="ValidateOverrides" BeforeTargets="Restore;_CheckForUnsupportedTargetFramework" Condition="'$(OverrideTargetFramework)' != ''">
<Error Text="OverrideTargetFramework set to '$(OverrideTargetFramework)' is missing Windows target. Set OverrideTargetFramework to $([MSBuild]::Escape('$'))(DotNetVersion)-windows10.0.19041.0 or skip building this project (eg unload the project in Visual Studio)" Condition="!$(OverrideTargetFramework.Contains('windows10'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="Resizetizer.Extensions.Sample.Windows.app"/>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below informs the system that this application is compatible with OS features first introduced in Windows 8.
For more info see https://docs.microsoft.com/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below informs the system that this application is compatible with OS features first introduced in Windows 8.
For more info see https://docs.microsoft.com/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
It is also necessary to support features in unpackaged applications, for example the custom titlebar implementation.-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
</application>
</compatibility>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
</application>
</compatibility>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<!-- <FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" /> -->
</ItemGroup>
<PropertyGroup>
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
</When>
<Otherwise>
<ItemGroup>
Expand Down
11 changes: 6 additions & 5 deletions src/.nuspec/Uno.Resizetizer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -267,22 +267,22 @@
<Target Name="ValidateAvailableItems"
BeforeTargets="UnoResizetizeCollectItems">

<Warning
<Warning
Condition="'%(UnoIcon.Link)' != ''"
Text="The UnoIcon.Link property will be ignored."/>

<Warning
Condition="'@(UnoIcon->Count())' &gt; '1'"
Text="More than one 'UnoIcon' is defined; only the first will be used." />

<Warning
<Warning
Condition="'@(UnoSplashScreen->Count())' &gt; '1'"
Text="More than one 'UnoSplashScreen' is defined; only the first will be used." />

<Warning
Condition="'%(UnoSplashScreen.Link)' != ''"
Text="The UnoSplashScreen.Link property will be ignored."/>

<Error
Condition="'@(UnoSplashScreen)' != '' And '@(UnoSplashScreen)' == '@(UnoIcon)'"
Text="The value of UnoSplashScreen and UnoIcon cannot be the same."/>
Expand Down Expand Up @@ -486,8 +486,9 @@
<ItemGroup Condition="'$(_UnoResizetizerIsWasmApp)' != 'True'">
<Content Include="@(_UnoResizetizerCollectedImages)"
Link="%(_UnoResizetizerCollectedImages.RecursiveDir)%(_UnoResizetizerCollectedImages.Filename)%(_UnoResizetizerCollectedImages.Extension)"
TargetPath="%(_UnoResizetizerCollectedImages.RecursiveDir)%(_UnoResizetizerCollectedImages.Filename)%(_UnoResizetizerCollectedImages.Extension)">
</Content>
TargetPath="%(_UnoResizetizerCollectedImages.RecursiveDir)%(_UnoResizetizerCollectedImages.Filename)%(_UnoResizetizerCollectedImages.Extension)"/>

<Content Update="@(Content)" Condition="'%(Content.Extension)' == '.ico' And '$(_UnoResizetizerIsWindowsAppSdk)' == 'True'" CopyToOutputDirectory="PreserveNewest"/>

<FileWrites Include="@(_UnoResizetizerCollectedImages)"/>
</ItemGroup>
Expand Down

0 comments on commit 6461423

Please sign in to comment.