Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .pipelines/ESRPSigning_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@
"FileLocksmithContextMenuPackage.msix",
"FileLocksmithCLI.exe",

"WinUI3Apps\\PowerToys.CopyAsUNCExt.dll",
"WinUI3Apps\\PowerToys.CopyAsUNCContextMenu.dll",
"CopyAsUNCContextMenuPackage.msix",

"WinUI3Apps\\Peek.Common.dll",
"WinUI3Apps\\Peek.FilePreviewer.dll",
"WinUI3Apps\\Powertoys.Peek.UI.dll",
Expand Down
29 changes: 14 additions & 15 deletions PowerToys.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/common/Common.UI/Common.UI.csproj">
<Project Path="src/common/Common.UI.Controls/Common.UI.Controls.csproj">
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/common/Common.UI.Controls/Common.UI.Controls.csproj">
<Project Path="src/common/Common.UI/Common.UI.csproj">
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
Expand Down Expand Up @@ -376,6 +376,11 @@
</Project>
<Project Path="src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj" Id="6515f03f-e56d-4db4-b23d-ac4fb80db36f" />
</Folder>
<Folder Name="/modules/CopyAsUNC/">
<Project Path="src/modules/CopyAsUNC/CopyAsUNCContextMenu/CopyAsUNCContextMenu.vcxproj" Id="caa90eba-0776-4e3a-9d71-7e2c95a3c221" />
<Project Path="src/modules/CopyAsUNC/CopyAsUNCExt/CopyAsUNCExt.vcxproj" Id="7d462a53-6ec3-44eb-ae6f-b86ac892c9e3" />
<Project Path="src/modules/CopyAsUNC/CopyAsUNCLib/CopyAsUNCLib.vcxproj" Id="ddb485b8-e771-4b9e-a9b5-bff587daf5ab" />
</Folder>
<Folder Name="/modules/CropAndLock/">
<Project Path="src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj" Id="f5e1146e-b7b3-4e11-85fd-270a500bd78c" />
<Project Path="src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj" Id="3157fa75-86cf-4ee2-8f62-c43f776493c6" />
Expand Down Expand Up @@ -427,7 +432,7 @@
</Project>
</Folder>
<Folder Name="/modules/FileLocksmith/">
<Project Path="src/modules/FileLocksmith/FileLocksmithCLI/FileLocksmithCLI.vcxproj" Id="49D456D3-F485-45AF-8875-45B44F193DDC" />
<Project Path="src/modules/FileLocksmith/FileLocksmithCLI/FileLocksmithCLI.vcxproj" Id="49d456d3-f485-45af-8875-45b44f193ddc" />
<Project Path="src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj" Id="799a50d8-de89-4ed1-8ff8-ad5a9ed8c0ca" />
<Project Path="src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj" Id="57175ec7-92a5-4c1e-8244-e3fbca2a81de" />
<Project Path="src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj" Id="9d52fd25-ef90-4f9a-a015-91efc5daf54f" />
Expand All @@ -438,7 +443,7 @@
</Project>
</Folder>
<Folder Name="/modules/FileLocksmith/Tests/">
<Project Path="src/modules/FileLocksmith/FileLocksmithCLI/tests/FileLocksmithCLIUnitTests.vcxproj" Id="A1B2C3D4-E5F6-7890-1234-567890ABCDEF" />
<Project Path="src/modules/FileLocksmith/FileLocksmithCLI/tests/FileLocksmithCLIUnitTests.vcxproj" Id="a1b2c3d4-e5f6-7890-1234-567890abcdef" />
</Folder>
<Folder Name="/modules/Hosts/">
<Project Path="src/modules/Hosts/Hosts/Hosts.csproj">
Expand All @@ -464,13 +469,13 @@
</Folder>
<Folder Name="/modules/imageresizer/">
<Project Path="src/modules/imageresizer/dll/ImageResizerExt.vcxproj" Id="0b43679e-edfa-4da0-ad30-f4628b308b1b" />
<Project Path="src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj" Id="93b72a06-c8bd-484f-a6f7-c9f280b150bf" />
<Project Path="src/modules/imageresizer/ImageResizerLib/ImageResizerLib.vcxproj" Id="18b3db45-4ffe-4d01-97d6-5223feee1853" />
<Project Path="src/modules/imageresizer/ui/ImageResizerUI.csproj">
<Project Path="src/modules/imageresizer/ImageResizerCLI/ImageResizerCLI.csproj">
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/modules/imageresizer/ImageResizerCLI/ImageResizerCLI.csproj">
<Project Path="src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj" Id="93b72a06-c8bd-484f-a6f7-c9f280b150bf" />
<Project Path="src/modules/imageresizer/ImageResizerLib/ImageResizerLib.vcxproj" Id="18b3db45-4ffe-4d01-97d6-5223feee1853" />
<Project Path="src/modules/imageresizer/ui/ImageResizerUI.csproj">
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
Expand Down Expand Up @@ -713,13 +718,6 @@
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<!-- TEMPORARILY_DISABLED: PowerDisplay
<Project Path="src/modules/powerdisplay/PowerDisplay/PowerDisplay.csproj">
<Platform Solution="*|ARM64" Project="ARM64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/modules/powerdisplay/PowerDisplayModuleInterface/PowerDisplayModuleInterface.vcxproj" Id="d1234567-8901-2345-6789-abcdef012345" />
-->
</Folder>
<Folder Name="/modules/PowerDisplay/Tests/">
<Project Path="src/modules/powerdisplay/PowerDisplay.Lib.UnitTests/PowerDisplay.Lib.UnitTests.csproj">
Expand Down Expand Up @@ -1069,6 +1067,7 @@
<File Path="src/Common.Dotnet.AotCompatibility.props" />
<File Path="src/Common.Dotnet.CsWinRT.props" />
<File Path="src/Common.SelfContained.props" />
<File Path="src/modules/CopyAsUNC/CopyAsUNCLib/CopyAsUNCLib.vcxproj" />
<File Path="src/Monaco.props" />
<File Path="src/Solution.props" />
<File Path="src/Version.props" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
try
{
// Packages to unregister
const std::vector<std::wstring> packagesToRemoveDisplayName{{L"PowerRenameContextMenu"}, {L"ImageResizerContextMenu"}, {L"FileLocksmithContextMenu"}, {L"NewPlusContextMenu"}};
const std::vector<std::wstring> packagesToRemoveDisplayName{{L"PowerRenameContextMenu"}, {L"ImageResizerContextMenu"}, {L"FileLocksmithContextMenu"}, {L"NewPlusContextMenu"}, {L"CopyAsUNCContextMenu"}};

for (auto const &package : packagesToRemoveDisplayName)
{
Expand Down
27 changes: 27 additions & 0 deletions installer/PowerToysSetupVNext/CopyAsUNC.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">

<?include $(sys.CURRENTDIR)\Common.wxi?>

<?define CopyAsUNCAssetsFiles=?>
<?define CopyAsUNCAssetsFilesPath=$(var.BinDir)WinUI3Apps\Assets\CopyAsUNC\?>

<Fragment>
<DirectoryRef Id="WinUI3AppsAssetsFolder">
<Directory Id="CopyAsUNCAssetsInstallFolder" Name="CopyAsUNC" />
</DirectoryRef>
<DirectoryRef Id="CopyAsUNCAssetsInstallFolder" FileSource="$(var.CopyAsUNCAssetsFilesPath)">
<!-- Generated by generateFileComponents.ps1 -->
<!--CopyAsUNCAssetsFiles_Component_Def-->
</DirectoryRef>

<ComponentGroup Id="CopyAsUNCComponentGroup">
<Component Id="RemoveCopyAsUNCFolder" Guid="3E5A1B2C-7F4D-4E8A-9C6B-1D2E3F4A5B6C" Directory="CopyAsUNCAssetsInstallFolder">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveCopyAsUNCFolder" Value="" KeyPath="yes" />
</RegistryKey>
<RemoveFolder Id="RemoveFolderCopyAsUNCAssetsFolder" Directory="CopyAsUNCAssetsInstallFolder" On="uninstall" />
</Component>
</ComponentGroup>

</Fragment>
</Wix>
2 changes: 2 additions & 0 deletions installer/PowerToysSetupVNext/PowerToysInstallerVNext.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
call move /Y ..\..\..\BaseApplications.wxs.bk ..\..\..\BaseApplications.wxs
call move /Y ..\..\..\CmdPal.wxs.bk ..\..\..\CmdPal.wxs
call move /Y ..\..\..\ColorPicker.wxs.bk ..\..\..\ColorPicker.wxs
call move /Y ..\..\..\CopyAsUNC.wxs.bk ..\..\..\CopyAsUNC.wxs
call move /Y ..\..\..\Core.wxs.bk ..\..\..\Core.wxs
call move /Y ..\..\..\DscResources.wxs.bk ..\..\..\DscResources.wxs
call move /Y ..\..\..\EnvironmentVariables.wxs.bk ..\..\..\EnvironmentVariables.wxs
Expand Down Expand Up @@ -114,6 +115,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<Compile Include="BaseApplications.wxs" />
<Compile Include="CmdPal.wxs" />
<Compile Include="ColorPicker.wxs" />
<Compile Include="CopyAsUNC.wxs" />
<Compile Include="EnvironmentVariables.wxs" />
<Compile Include="FileExplorerPreview.wxs" />
<Compile Include="FileLocksmith.wxs" />
Expand Down
1 change: 1 addition & 0 deletions installer/PowerToysSetupVNext/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<ComponentGroupRef Id="WinUI3ApplicationsComponentGroup" />
<ComponentGroupRef Id="AwakeComponentGroup" />
<ComponentGroupRef Id="ColorPickerComponentGroup" />
<ComponentGroupRef Id="CopyAsUNCComponentGroup" />
<ComponentGroupRef Id="FileExplorerPreviewComponentGroup" />
<ComponentGroupRef Id="FileLocksmithComponentGroup" />
<ComponentGroupRef Id="HostsComponentGroup" />
Expand Down
4 changes: 4 additions & 0 deletions installer/PowerToysSetupVNext/generateAllFileComponents.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ Generate-FileList -fileDepsJson "" -fileListName MonacoPreviewHandlerCustomLangu
Generate-FileComponents -fileListName "MonacoPreviewHandlerMonacoAssetsFiles" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs
Generate-FileComponents -fileListName "MonacoPreviewHandlerCustomLanguagesFiles" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs

#CopyAsUNC
Generate-FileList -fileDepsJson "" -fileListName CopyAsUNCAssetsFiles -wxsFilePath $PSScriptRoot\CopyAsUNC.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\CopyAsUNC"
Generate-FileComponents -fileListName "CopyAsUNCAssetsFiles" -wxsFilePath $PSScriptRoot\CopyAsUNC.wxs

#FileLocksmith
Generate-FileList -fileDepsJson "" -fileListName FileLocksmithAssetsFiles -wxsFilePath $PSScriptRoot\FileLocksmith.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\FileLocksmith"
Generate-FileComponents -fileListName "FileLocksmithAssetsFiles" -wxsFilePath $PSScriptRoot\FileLocksmith.wxs
Expand Down
58 changes: 58 additions & 0 deletions src/modules/CopyAsUNC/CopyAsUNCContextMenu/AppxManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5"
xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" IgnorableNamespaces="uap uap2 uap3 rescap desktop desktop4 desktop5 uap10 com">
<Identity Name="Microsoft.PowerToys.CopyAsUNCContextMenu" ProcessorArchitecture="neutral" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0" />
<Properties>
<DisplayName>PowerToys Copy as UNC Context Menu</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Assets\CopyAsUNC\storelogo.png</Logo>
<uap10:AllowExternalContent>true</uap10:AllowExternalContent>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.18950.0" MaxVersionTested="10.0.19000.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources"/>
</Capabilities>
<Applications>
<!-- TODO: CopyAsUNC has no UI executable. Verify with PowerToys team what to use here.
PowerRename uses its own UI exe; since we have none, PowerToys.exe may be appropriate. -->
<Application Id="Microsoft.PowerToys.CopyAsUNCContextMenu" Executable="PowerToys.exe" uap10:TrustLevel="mediumIL" uap10:RuntimeBehavior="win32App">
<uap:VisualElements AppListEntry="none" DisplayName="PowerToys Copy as UNC Context Menu" Description="CopyAsUNCContextMenu" BackgroundColor="transparent" Square150x150Logo="Assets\CopyAsUNC\Square150x150Logo.png" Square44x44Logo="Assets\CopyAsUNC\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\CopyAsUNC\Wide310x150Logo.png" Square310x310Logo="Assets\CopyAsUNC\LargeTile.png" Square71x71Logo="Assets\CopyAsUNC\SmallTile.png"></uap:DefaultTile>
<uap:SplashScreen Image="Assets\CopyAsUNC\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<desktop4:Extension Category="windows.fileExplorerContextMenus">
<desktop4:FileExplorerContextMenus>
<desktop5:ItemType Type="Directory">
<desktop5:Verb Id="CopyAsUNCCommand" Clsid="89A22F51-9ED6-48FE-81FE-5DFD36F8CD32" />
</desktop5:ItemType>
<desktop5:ItemType Type="*">
<desktop5:Verb Id="CopyAsUNCCommand" Clsid="89A22F51-9ED6-48FE-81FE-5DFD36F8CD32" />
</desktop5:ItemType>
</desktop4:FileExplorerContextMenus>
</desktop4:Extension>
<com:Extension Category="windows.comServer" uap10:RuntimeBehavior="packagedClassicApp">
<com:ComServer>
<com:SurrogateServer DisplayName="Context menu verb handler">
<com:Class Id="89A22F51-9ED6-48FE-81FE-5DFD36F8CD32" Path="PowerToys.CopyAsUNCContextMenu.dll" ThreadingModel="STA"/>
</com:SurrogateServer>
</com:ComServer>
</com:Extension>
</Extensions>
</Application>
</Applications>
</Package>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include <windows.h>
#include "Generated Files/resource.h"
#include "../../../common/version/version.h"

#define APSTUDIO_READONLY_SYMBOLS
#include "winres.h"
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION FILE_VERSION
PRODUCTVERSION PRODUCT_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", COMPANY_NAME
VALUE "FileDescription", FILE_DESCRIPTION
VALUE "FileVersion", FILE_VERSION_STRING
VALUE "InternalName", INTERNAL_NAME
VALUE "LegalCopyright", COPYRIGHT_NOTE
VALUE "OriginalFilename", ORIGINAL_FILENAME
VALUE "ProductName", PRODUCT_NAME
VALUE "ProductVersion", PRODUCT_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
Loading