Skip to content

Commit

Permalink
powertoys in devhome
Browse files Browse the repository at this point in the history
  • Loading branch information
Darshak Bhatti committed May 2, 2024
1 parent 7afd354 commit 347c479
Show file tree
Hide file tree
Showing 88 changed files with 3,034 additions and 526 deletions.
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Try {
& $msbuildPath $msbuildArgs

if (-not($IsAzurePipelineBuild) -And $isAdmin) {
Invoke-SignPackage "$appxPackageDir\DevHome-$platform.msix"
Invoke-SignPackage "$appxPackageDir\DevHome\DevHome-$platform.msix"
}
}
}
Expand Down
269 changes: 91 additions & 178 deletions DevHome.sln

Large diffs are not rendered by default.

41 changes: 40 additions & 1 deletion Packaging/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,45 @@
</uap:Extension>
</Extensions>
</Application>
<Application Id="DevHome.HostsFileEditor" Executable="DevHome.HostsFileEditor\DevHome.HostsFileEditor.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="ms-resource:HostsFileEditorAppDisplayName" Description="ms-resource:HostsFileEditorAppDescription" BackgroundColor="transparent" Square150x150Logo="Assets\HostsFileEditor\Square150x150Logo.png" Square44x44Logo="Assets\HostsFileEditor\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\HostsFileEditor\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\HostsFileEditor\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="DevHome.HostsFileEditorApp.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
<Application Id="DevHome.RegistryPreview" Executable="DevHome.RegistryPreview\DevHome.RegistryPreview.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="ms-resource:RegistryPreviewAppDisplayName" Description="ms-resource:RegistryPreviewAppDescription" BackgroundColor="transparent" Square150x150Logo="Assets\RegistryPreview\Square150x150Logo.png" Square44x44Logo="Assets\RegistryPreview\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\RegistryPreview\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\RegistryPreview\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="DevHome.RegistryPreviewApp.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
<Application Id="DevHome.EnvironmentVariables" Executable="DevHome.EnvironmentVariables\DevHome.EnvironmentVariables.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="ms-resource:EnvironmentVariablesAppDisplayName" Description="ms-resource:EnvironmentVariablesAppDescription" BackgroundColor="transparent" Square150x150Logo="Assets\EnvironmentVariables\Square150x150Logo.png" Square44x44Logo="Assets\EnvironmentVariables\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\EnvironmentVariables\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\EnvironmentVariables\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="DevHome.EnvironmentVariablesApp.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
Expand All @@ -314,4 +353,4 @@
<genTemplate:Item Name="platform" Value="WinUI" />
<genTemplate:Item Name="appmodel" Value="Desktop" />
</genTemplate:Metadata>
</Package>
</Package>
21 changes: 5 additions & 16 deletions Packaging/Packaging.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
Expand Down Expand Up @@ -77,31 +69,26 @@
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>

<!-- To build with the correct logo assets, only include the ones for the current build ring.
<!-- To build with the correct logo assets, only include the ones for the current build ring.
Place them in a common location, so references to them don't need to adjust for build ring. -->
<ItemGroup>
<Content Include ="..\src\Assets\*" />
<Content Include="..\src\Assets\*" />
<Content Remove="..\src\Assets\Preview\*" />
<Content Remove="..\src\Assets\Canary\*" />
<Content Remove="..\src\Assets\Dev\*" />
</ItemGroup>

<ItemGroup Condition="'$(BuildRing)' == 'Dev'">
<Content Include="..\src\Assets\Dev\**" Link="Assets\Logos\%(Filename)%(Extension)" CopyToOutputDirectory="Always" />
<Content Include="..\src\Assets\Dev\DevHome_Dev.ico" Link="Assets\DevHome.ico" CopyToOutputDirectory="Always" />
</ItemGroup>

<ItemGroup Condition="'$(BuildRing)' == 'Canary'">
<Content Include="..\src\Assets\Canary\**" Link="Assets\Logos\%(Filename)%(Extension)" CopyToOutputDirectory="Always" />
<Content Include="..\src\Assets\Canary\DevHome_Canary.ico" Link="Assets\DevHome.ico" CopyToOutputDirectory="Always" />
</ItemGroup>

<ItemGroup Condition="'$(BuildRing)' == 'Stable'">
<Content Include="..\src\Assets\Preview\**" Link="Assets\Logos\%(Filename)%(Extension)" CopyToOutputDirectory="Always" />
<Content Include="..\src\Assets\Preview\DevHome_Preview.ico" Link="Assets\DevHome.ico" CopyToOutputDirectory="Always" />
</ItemGroup>

<ItemGroup>
<None Remove="..\src\Assets\WhatsNewPage\DarkTheme\Extensions.png" />
<None Remove="..\src\Assets\WhatsNewPage\DarkTheme\ExtensionsBig.png" />
Expand All @@ -112,7 +99,6 @@
<ItemGroup>
<PRIResource Include="..\src\Strings\en-us\Resources.resw" />
</ItemGroup>

<ItemGroup>
<None Include="Packaging_TemporaryKey.pfx" />
</ItemGroup>
Expand All @@ -122,5 +108,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\DevHome.csproj" />
<ProjectReference Include="..\tools\Utilities\HostsUtility\DevHome.HostsFileEditor.csproj" />
<ProjectReference Include="..\tools\Utilities\RegPreviewUtility\DevHome.RegistryPreview.csproj" />
<ProjectReference Include="..\tools\Utilities\EnvVariablesUtility\DevHome.EnvironmentVariables.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion common/DevHome.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.Management.Automation" Version="7.2.8" />
<PackageReference Include="WinUIEx" Version="1.8.0" />
<PackageReference Include="WinUIEx" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 14 additions & 1 deletion common/Helpers/Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

using System;
using System.IO;
using Microsoft.Extensions.Configuration;
using Serilog;
using Windows.Storage;

namespace DevHome.Common;
Expand All @@ -17,5 +19,16 @@ public class Logging

private static readonly Lazy<string> _logFolderRoot = new(() => Path.Combine(ApplicationData.Current.TemporaryFolder.Path, LogFolderName));

public static readonly string LogFolderRoot = _logFolderRoot.Value;
public static readonly string LogFolderRoot = _logFolderRoot.Value;

public static void SetupLogging(string jsonFileName, string appName)
{
Environment.SetEnvironmentVariable("DEVHOME_LOGS_ROOT", Path.Join(LogFolderRoot, appName));
var configuration = new ConfigurationBuilder()
.AddJsonFile(jsonFileName)
.Build();
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.CreateLogger();
}
}
Loading

0 comments on commit 347c479

Please sign in to comment.