Skip to content

Commit

Permalink
Update widget asset locations (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
krschau authored Jan 31, 2024
1 parent db103eb commit abd3718
Show file tree
Hide file tree
Showing 23 changed files with 126 additions and 139 deletions.
10 changes: 2 additions & 8 deletions CoreWidgetProvider/CoreWidgetProvider.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)ToolingVersions.props"/>
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down Expand Up @@ -37,11 +37,8 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Widgets\Templates\SSHWalletTemplate.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<Content Include="Widgets\Templates\SystemMemoryTemplate.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand All @@ -57,9 +54,6 @@
</ItemGroup>

<ItemGroup>
<Content Update="Widgets\Assets\ssh_wallet_icon.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Widgets\Assets\arrow.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
215 changes: 104 additions & 111 deletions src/DevHome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,131 +2,124 @@
<!-- Licensed under the MIT License. -->

<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>DevHome</RootNamespace>
<ApplicationIcon>Assets/DevHome.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile Condition="'$(BuildingInsideVisualStudio)' != 'True'">Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
<BuildRing Condition="'$(BuildRing)'==''">Dev</BuildRing>
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\Preview\CPUScreenshotDark.png" />
<None Remove="Assets\Preview\CPUScreenshotLight.png" />
<None Remove="Assets\Preview\GPUScreenshotDark.png" />
<None Remove="Assets\Preview\GPUScreenshotLight.png" />
<None Remove="Assets\Preview\MemoryScreenshotDark.png" />
<None Remove="Assets\Preview\MemoryScreenshotLight.png" />
<None Remove="Assets\Preview\NetworkScreenshotDark.png" />
<None Remove="Assets\Preview\NetworkScreenshotLight.png" />
<None Remove="Assets\Preview\SSHScreenshotDark.png" />
<None Remove="Assets\Preview\SSHScreenshotLight.png" />
<None Remove="Assets\WhatsNewPage\DarkTheme\Extensions.png" />
<None Remove="Assets\WhatsNewPage\DarkTheme\ExtensionsBig.png" />
<None Remove="Assets\WhatsNewPage\LightTheme\Extensions.png" />
<None Remove="Assets\WhatsNewPage\LightTheme\ExtensionsBig.png" />
<None Remove="Styles\WindowTitleBar_ThemeResources.xaml" />
</ItemGroup>
<Import Project="$(SolutionDir)ToolingVersions.props" />

<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>DevHome</RootNamespace>
<ApplicationIcon>Assets/DevHome.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile Condition="'$(BuildingInsideVisualStudio)' != 'True'">Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
<BuildRing Condition="'$(BuildRing)'==''">Dev</BuildRing>
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="WinUIEx" Version="1.8.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.8" GeneratePathProperty="true">
<ExcludeAssets>contentFiles</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="Assets\WhatsNewPage\DarkTheme\Extensions.png" />
<None Remove="Assets\WhatsNewPage\DarkTheme\ExtensionsBig.png" />
<None Remove="Assets\WhatsNewPage\LightTheme\Extensions.png" />
<None Remove="Assets\WhatsNewPage\LightTheme\ExtensionsBig.png" />
<None Remove="Styles\WindowTitleBar_ThemeResources.xaml" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\common\DevHome.Common.csproj" />
<ProjectReference Include="..\CoreWidgetProvider\CoreWidgetProvider.csproj" />
<ProjectReference Include="..\settings\DevHome.Settings\DevHome.Settings.csproj" />
<ProjectReference Include="..\tools\Dashboard\DevHome.Dashboard\DevHome.Dashboard.csproj" />
<ProjectReference Include="..\tools\Experiments\src\DevHome.Experiments.csproj" />
<ProjectReference Include="..\tools\SetupFlow\DevHome.SetupFlow\DevHome.SetupFlow.csproj" />
<ProjectReference Include="..\tools\ExtensionLibrary\DevHome.ExtensionLibrary\DevHome.ExtensionLibrary.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="NavConfig.jsonc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Page Update="Styles\WindowTitleBar_ThemeResources.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Styles\BreadcrumbBar.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
</ItemGroup>
<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="WinUIEx" Version="1.8.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.8" GeneratePathProperty="true">
<ExcludeAssets>contentFiles</ExcludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\common\DevHome.Common.csproj" />
<ProjectReference Include="..\CoreWidgetProvider\CoreWidgetProvider.csproj" />
<ProjectReference Include="..\settings\DevHome.Settings\DevHome.Settings.csproj" />
<ProjectReference Include="..\tools\Dashboard\DevHome.Dashboard\DevHome.Dashboard.csproj" />
<ProjectReference Include="..\tools\Experiments\src\DevHome.Experiments.csproj" />
<ProjectReference Include="..\tools\SetupFlow\DevHome.SetupFlow\DevHome.SetupFlow.csproj" />
<ProjectReference Include="..\tools\ExtensionLibrary\DevHome.ExtensionLibrary\DevHome.ExtensionLibrary.csproj" />
</ItemGroup>

<PropertyGroup>
<DefineConstants Condition="'$(BuildRing)'=='Canary'">$(DefineConstants);CANARY_BUILD</DefineConstants>
<DefineConstants Condition="'$(BuildRing)'=='Stable'">$(DefineConstants);STABLE_BUILD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="NavConfig.jsonc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Page Update="Styles\WindowTitleBar_ThemeResources.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Styles\BreadcrumbBar.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
</ItemGroup>

<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<ProjectCapability Include="Msix" />
</ItemGroup>

<!-- PowerShell requires the content files from their nuget package to be next to System.Management.Automation.dll
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>

<PropertyGroup>
<DefineConstants Condition="'$(BuildRing)'=='Canary'">$(DefineConstants);CANARY_BUILD</DefineConstants>
<DefineConstants Condition="'$(BuildRing)'=='Stable'">$(DefineConstants);STABLE_BUILD</DefineConstants>
</PropertyGroup>

<!-- PowerShell requires the content files from their nuget package to be next to System.Management.Automation.dll
This won't happen automatically for 'dotnet publish -r <RID>'
Here we explicitly exclude the content files, copy them manually to the output directory
and then add them as payload to the package to the right location.
https://github.com/PowerShell/PowerShell/issues/15274#issuecomment-984028028
-->
<Target Name="PwshFiles" AfterTargets="BeforeBuild">
<ItemGroup>
<RefFiles Include="$(PkgMicrosoft_PowerShell_SDK)\contentFiles\any\any\ref\*.*" />
<WinModuleFiles Include="$(PkgMicrosoft_PowerShell_SDK)\contentFiles\any\any\runtimes\win\lib\net6.0\Modules\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(RefFiles)" DestinationFolder="$(TargetDir)\ref\" />
<Copy SourceFiles="@(WinModuleFiles)" DestinationFolder="$(TargetDir)\Modules\%(RecursiveDir)\" />
</Target>
<Target Name="PwshFiles" AfterTargets="BeforeBuild">
<ItemGroup>
<RefFiles Include="$(PkgMicrosoft_PowerShell_SDK)\contentFiles\any\any\ref\*.*" />
<WinModuleFiles Include="$(PkgMicrosoft_PowerShell_SDK)\contentFiles\any\any\runtimes\win\lib\net6.0\Modules\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(RefFiles)" DestinationFolder="$(TargetDir)\ref\" />
<Copy SourceFiles="@(WinModuleFiles)" DestinationFolder="$(TargetDir)\Modules\%(RecursiveDir)\" />
</Target>

<Target Name="ExtraAppxFilesInPackage" AfterTargets="_ComputeAppxPackagePayload">
<Target Name="ExtraAppxFilesInPackage" AfterTargets="_ComputeAppxPackagePayload">

<!-- If the binary is not here, then it was a 'dotnet publish' or 'dotnet build' -->
<PropertyGroup Condition="!Exists('$(TargetDir)\System.Management.Automation.dll')">
<ModulePath>runtimes\win\lib\net6.0\</ModulePath>
</PropertyGroup>
<!-- If the binary is not here, then it was a 'dotnet publish' or 'dotnet build' -->
<PropertyGroup Condition="!Exists('$(TargetDir)\System.Management.Automation.dll')">
<ModulePath>runtimes\win\lib\net6.0\</ModulePath>
</PropertyGroup>

<ItemGroup>
<AdditionalPackageFile Include="$(TargetDir)\ref\*.*">
<PackagePath>ref</PackagePath>
</AdditionalPackageFile>
<AdditionalPackageFile Include="$(TargetDir)\Modules\**\*.*">
<PackagePath>$(ModulePath)Modules</PackagePath>
</AdditionalPackageFile>
</ItemGroup>
<ItemGroup>
<AdditionalPackageFile Include="$(TargetDir)\ref\*.*">
<PackagePath>ref</PackagePath>
</AdditionalPackageFile>
<AdditionalPackageFile Include="$(TargetDir)\Modules\**\*.*">
<PackagePath>$(ModulePath)Modules</PackagePath>
</AdditionalPackageFile>
</ItemGroup>

<ItemGroup>
<AppxPackagePayload Include="%(AdditionalPackageFile.Identity)" KeepDuplicates="false">
<TargetPath>%(AdditionalPackageFile.PackagePath)\%(AdditionalPackageFile.RecursiveDir)%(AdditionalPackageFile.Filename)%(AdditionalPackageFile.Extension)</TargetPath>
</AppxPackagePayload>
</ItemGroup>
</Target>
<ItemGroup>
<AppxPackagePayload Include="%(AdditionalPackageFile.Identity)" KeepDuplicates="false">
<TargetPath>%(AdditionalPackageFile.PackagePath)\%(AdditionalPackageFile.RecursiveDir)%(AdditionalPackageFile.Filename)%(AdditionalPackageFile.Extension)</TargetPath>
</AppxPackagePayload>
</ItemGroup>
</Target>
</Project>
Loading

0 comments on commit abd3718

Please sign in to comment.