Test win11 tier1 context menu

This commit is contained in:
Stefan Markovic
2022-05-31 14:27:55 +02:00
parent 368c7756ef
commit 2492517113
75 changed files with 1521 additions and 2 deletions

View File

@@ -84,7 +84,7 @@
<!-- Global props -->
<PropertyGroup Label="Globals" Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<!-- Props that are constant for both Debug and Release configurations -->

View File

@@ -278,8 +278,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{B39DC643
src\common\utils\modulesRegistry.h = src\common\utils\modulesRegistry.h
src\common\utils\MsiUtils.h = src\common\utils\MsiUtils.h
src\common\utils\os-detect.h = src\common\utils\os-detect.h
src\common\utils\process_path.h = src\common\utils\process_path.h
src\common\utils\ProcessWaiter.h = src\common\utils\ProcessWaiter.h
src\common\utils\process_path.h = src\common\utils\process_path.h
src\common\utils\registry.h = src\common\utils\registry.h
src\common\utils\resources.h = src\common\utils\resources.h
src\common\utils\string_utils.h = src\common\utils\string_utils.h
@@ -403,6 +403,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerToys.Settings", "src\s
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRenameUI", "src\modules\powerrename\PowerRenameUILib\PowerRenameUI.vcxproj", "{27718999-C175-450A-861C-89F911E16A88}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRenameContextMenu", "src\modules\powerrename\PowerRenameContextMenu\PowerRenameContextMenu.vcxproj", "{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@@ -1560,6 +1562,18 @@ Global
{27718999-C175-450A-861C-89F911E16A88}.Release|x64.Build.0 = Release|x64
{27718999-C175-450A-861C-89F911E16A88}.Release|x86.ActiveCfg = Release|x64
{27718999-C175-450A-861C-89F911E16A88}.Release|x86.Build.0 = Release|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|ARM64.Build.0 = Debug|ARM64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x64.ActiveCfg = Debug|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x64.Build.0 = Debug|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x86.ActiveCfg = Debug|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x86.Build.0 = Debug|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|ARM64.ActiveCfg = Release|ARM64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|ARM64.Build.0 = Release|ARM64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x64.ActiveCfg = Release|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x64.Build.0 = Release|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x86.ActiveCfg = Release|x64
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1693,6 +1707,7 @@ Global
{8FE5A5EE-1B59-401C-9FB3-B04ECD3E29C1} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
{020A7474-3601-4160-A159-D7B70B77B15F} = {C3081D9A-1586-441A-B5F4-ED815B3719C1}
{27718999-C175-450A-861C-89F911E16A88} = {89E20BCE-EB9C-46C8-8B50-E01A82E6FDC3}
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6} = {89E20BCE-EB9C-46C8-8B50-E01A82E6FDC3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}

View File

@@ -0,0 +1,55 @@
<?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="PowerRenameContextMenu" ProcessorArchitecture="neutral" Publisher="CN=Stefan" Version="1.0.0.0" />
<Properties>
<DisplayName>PowerRenameContextMenu</DisplayName>
<PublisherDisplayName>Stefan Sparse Package</PublisherDisplayName>
<Logo>Assets\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>
<Application Id="PowerRenameContextMenu" Executable="PowerRename.exe" uap10:TrustLevel="mediumIL" uap10:RuntimeBehavior="win32App">
<uap:VisualElements AppListEntry="none" DisplayName="PowerRenameContextMenu" Description="PowerRenameContextMenu" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png"></uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<desktop4:Extension Category="windows.fileExplorerContextMenus">
<desktop4:FileExplorerContextMenus>
<desktop5:ItemType Type="*">
<desktop5:Verb Id="PowerRenameCommand" Clsid="1861E28B-A1F0-4EF4-A1FE-4C8CA88E2174" />
</desktop5:ItemType>
</desktop4:FileExplorerContextMenus>
</desktop4:Extension>
<com:Extension Category="windows.comServer">
<com:ComServer>
<com:SurrogateServer DisplayName="Context menu verb handler">
<com:Class Id="1861E28B-A1F0-4EF4-A1FE-4C8CA88E2174" Path="PowerRenameContextMenu.dll" ThreadingModel="STA"/>
</com:SurrogateServer>
</com:ComServer>
</com:Extension>
</Extensions>
</Application>
</Applications>
</Package>

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,22 @@
// PowerRenameContextMenu.cpp : Defines the exported functions for the DLL.
//
#include "pch.h"
#include "framework.h"
#include "PowerRenameContextMenu.h"
// This is an example of an exported variable
POWERRENAMECONTEXTMENU_API int nPowerRenameContextMenu=0;
// This is an example of an exported function.
POWERRENAMECONTEXTMENU_API int fnPowerRenameContextMenu(void)
{
return 0;
}
// This is the constructor of a class that has been exported.
CPowerRenameContextMenu::CPowerRenameContextMenu()
{
return;
}

View File

@@ -0,0 +1,22 @@
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the POWERRENAMECONTEXTMENU_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// POWERRENAMECONTEXTMENU_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef POWERRENAMECONTEXTMENU_EXPORTS
#define POWERRENAMECONTEXTMENU_API __declspec(dllexport)
#else
#define POWERRENAMECONTEXTMENU_API __declspec(dllimport)
#endif
// This class is exported from the dll
class POWERRENAMECONTEXTMENU_API CPowerRenameContextMenu {
public:
CPowerRenameContextMenu(void);
// TODO: add your methods here.
};
extern POWERRENAMECONTEXTMENU_API int nPowerRenameContextMenu;
POWERRENAMECONTEXTMENU_API int fnPowerRenameContextMenu(void);

View File

@@ -0,0 +1,60 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{1dbbb112-4bb1-444b-8ebb-e66555c76ba6}</ProjectGuid>
<RootNamespace>PowerRenameContextMenu</RootNamespace>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetName>PowerRenameContextMenu</TargetName>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>PowerRenameContextMenu</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>PowerRenameContextMenu</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>PowerRenameContextMenu</TargetName>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;POWERRENAMECONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;POWERRENAMECONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;POWERRENAMECONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>..\..\..\;..\lib\;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
<PreBuildEvent>
<Command>del $(OutDir)*.msix /q
MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;POWERRENAMECONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>..\..\..\;..\lib\;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
<PreBuildEvent>
<Command>del $(OutDir)*.msix /q
MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="PowerRenameContextMenu.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="PowerRenameContextMenu.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PowerRenameContextMenu.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<None Include="PowerRenameUI.ico" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\logger\logger.vcxproj">
<Project>{d9b8fc84-322a-4f9f-bbb9-20915c47ddfd}</Project>
</ProjectReference>
<ProjectReference Include="..\lib\PowerRenameLib.vcxproj">
<Project>{51920f1f-c28c-4adf-8660-4238766796c2}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\..\..\..\deps\spdlog.props" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View File

@@ -0,0 +1,718 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PowerRenameContextMenu.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="PowerRenameContextMenu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PowerRenameContextMenu.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="PowerRenameUI.ico">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\BadgeLogo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\LargeTile.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SmallTile.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.altform-unplated_targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-16.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-24.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-32.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-48.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.targetsize-256.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-100.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-125.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-150.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-200.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.scale-400.png">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@@ -0,0 +1,5 @@
LIBRARY
EXPORTS
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllGetActivationFactory PRIVATE

View File

@@ -0,0 +1,289 @@
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <atlfile.h>
#include <atlstr.h>
#include <shobjidl_core.h>
#include <string>
#include <filesystem>
#include <sstream>
#include <Shlwapi.h>
#include <vector>
#include <wil\resource.h>
#include <wil\win32_helpers.h>
#include <wil\stl.h>
#include <wrl/module.h>
#include <wrl/implements.h>
#include <wrl/client.h>
#include <common/utils/elevation.h>
#include <common/utils/process_path.h>
#include <Settings.h>
#include <trace.h>
#include <mutex>
#include <shellapi.h>
using namespace Microsoft::WRL;
HINSTANCE g_hInst = 0;
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
g_hInst = hModule;
Trace::RegisterProvider();
break;
case DLL_PROCESS_DETACH:
Trace::UnregisterProvider();
break;
}
return TRUE;
}
class __declspec(uuid("1861E28B-A1F0-4EF4-A1FE-4C8CA88E2174")) PowerRenameContextMenuCommand final : public RuntimeClass<RuntimeClassFlags<ClassicCom>, IExplorerCommand, IObjectWithSite>
{
public:
virtual const wchar_t* Title() { return L"PowerRename"; }
virtual const EXPCMDFLAGS Flags() { return ECF_DEFAULT; }
virtual const EXPCMDSTATE State(_In_opt_ IShellItemArray* selection) { return ECS_ENABLED; }
// IExplorerCommand
IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name)
{
return SHStrDup(app_name.c_str(), name);
}
IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon)
{
if (!CSettingsInstance().GetShowIconOnMenu())
{
*icon = nullptr;
return E_NOTIMPL;
}
std::wstring iconResourcePath = get_module_folderpath(g_hInst);
iconResourcePath += L"\\";
iconResourcePath += L"PowerRenameUI.ico";
return SHStrDup(iconResourcePath.c_str(), icon);
}
IFACEMETHODIMP GetToolTip(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* infoTip)
{
*infoTip = nullptr;
return E_NOTIMPL;
}
IFACEMETHODIMP GetCanonicalName(_Out_ GUID* guidCommandName)
{
*guidCommandName = __uuidof(this);
return S_OK;
}
IFACEMETHODIMP GetState(_In_opt_ IShellItemArray* selection, _In_ BOOL okToBeSlow, _Out_ EXPCMDSTATE* cmdState)
{
*cmdState = CSettingsInstance().GetEnabled() ? ECS_ENABLED : ECS_HIDDEN;
return S_OK;
}
IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept
try
{
HWND parent = nullptr;
if (m_site)
{
ComPtr<IOleWindow> oleWindow;
RETURN_IF_FAILED(m_site.As(&oleWindow));
RETURN_IF_FAILED(oleWindow->GetWindow(&parent));
}
std::wostringstream title;
title << Title();
if (selection)
{
DWORD count;
RETURN_IF_FAILED(selection->GetCount(&count));
title << L" (" << count << L" selected items)";
}
else
{
title << L"(no selected items)";
}
std::filesystem::path modulePath{ wil::GetModuleFileNameW<std::wstring>() };
std::wstring path = get_module_folderpath(g_hInst);
path = path + L"\\PowerToys.PowerRename.exe";
std::wstring iconResourcePath = get_module_filename();
MessageBox(parent, iconResourcePath.c_str(), iconResourcePath.c_str(), MB_OK);
RunPowerRename(selection);
return S_OK;
}
CATCH_RETURN();
IFACEMETHODIMP GetFlags(_Out_ EXPCMDFLAGS* flags)
{
*flags = Flags();
return S_OK;
}
IFACEMETHODIMP EnumSubCommands(_COM_Outptr_ IEnumExplorerCommand** enumCommands)
{
*enumCommands = nullptr;
return E_NOTIMPL;
}
// IObjectWithSite
IFACEMETHODIMP SetSite(_In_ IUnknown* site) noexcept
{
m_site = site;
return S_OK;
}
IFACEMETHODIMP GetSite(_In_ REFIID riid, _COM_Outptr_ void** site) noexcept { return m_site.CopyTo(riid, site); }
protected:
ComPtr<IUnknown> m_site;
private:
HRESULT RunPowerRename(IShellItemArray* psiItemArray)
{
HRESULT hr = E_FAIL;
HWND parent = nullptr;
if (m_site)
{
ComPtr<IOleWindow> oleWindow;
RETURN_IF_FAILED(m_site.As(&oleWindow));
RETURN_IF_FAILED(oleWindow->GetWindow(&parent));
}
if (CSettingsInstance().GetEnabled())
{
Trace::Invoked();
// Set the application path based on the location of the dll
std::wstring path = get_module_folderpath(g_hInst);
path = path + L"\\PowerToys.PowerRename.exe";
LPTSTR lpApplicationName = (LPTSTR)path.c_str();
// Create an anonymous pipe to stream filenames
SECURITY_ATTRIBUTES sa;
HANDLE hReadPipe;
HANDLE hWritePipe;
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
if (!CreatePipe(&hReadPipe, &hWritePipe, &sa, 0))
{
hr = HRESULT_FROM_WIN32(GetLastError());
return hr;
}
if (!SetHandleInformation(hWritePipe, HANDLE_FLAG_INHERIT, 0))
{
hr = HRESULT_FROM_WIN32(GetLastError());
return hr;
}
CAtlFile writePipe(hWritePipe);
MessageBox(parent, L"AAAAAAAAAAAAA", path.c_str(), MB_OK);
CString commandLine;
commandLine.Format(_T("\"%s\""), lpApplicationName);
int nSize = commandLine.GetLength() + 1;
LPTSTR lpszCommandLine = new TCHAR[nSize];
_tcscpy_s(lpszCommandLine, nSize, commandLine);
STARTUPINFO startupInfo;
ZeroMemory(&startupInfo, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.hStdInput = hReadPipe;
startupInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
startupInfo.wShowWindow = SW_SHOWNORMAL;
PROCESS_INFORMATION processInformation;
// Start the resizer
CreateProcess(
NULL,
lpszCommandLine,
NULL,
NULL,
TRUE,
0,
NULL,
NULL,
&startupInfo,
&processInformation);
HWND parent2 = nullptr;
if (m_site)
{
RETURN_IF_FAILED(IUnknown_GetWindow(m_site.Get(), &parent2));
MessageBox(parent, path.c_str(), L"IMA SAJT", MB_OK);
}
RunNonElevatedEx(path.c_str(), {}, get_module_folderpath(g_hInst));
MessageBox(parent, path.c_str(), L"asd352432424", MB_OK);
ShellExecute(parent2, L"open", L"C:\\Users\\stefan\\Projects\\PowerToys\\x64\\Debug\\modules\\PowerRename\\PowerToys.PowerRename.exe", nullptr, nullptr, SW_SHOWNORMAL);
delete[] lpszCommandLine;
if (!CloseHandle(processInformation.hProcess))
{
hr = HRESULT_FROM_WIN32(GetLastError());
return hr;
}
if (!CloseHandle(processInformation.hThread))
{
hr = HRESULT_FROM_WIN32(GetLastError());
return hr;
}
MessageBox(parent, path.c_str(), L"CCCCCCCCCCCCCCCC", MB_OK);
//m_pdtobj will be NULL when invoked from the MSIX build as Initialize is never called (IShellExtInit functions aren't called in case of MSIX).
DWORD fileCount = 0;
// Gets the list of files currently selected using the IShellItemArray
psiItemArray->GetCount(&fileCount);
// Iterate over the list of files
for (DWORD i = 0; i < fileCount; i++)
{
IShellItem* shellItem;
psiItemArray->GetItemAt(i, &shellItem);
LPWSTR itemName;
// Retrieves the entire file system path of the file from its shell item
shellItem->GetDisplayName(SIGDN_FILESYSPATH, &itemName);
CString fileName(itemName);
// File name can't contain '?'
fileName.Append(_T("?"));
// Write the file path into the input stream for image resizer
writePipe.Write(fileName, fileName.GetLength() * sizeof(TCHAR));
}
std::wstring asd = L"asdasdasd";
asd += L" " + std::to_wstring( fileCount) + L" SDASDASDAD";
MessageBox(parent, asd.c_str(), L"CCCCCCCCCCCCCCCC", MB_OK);
writePipe.Close();
}
Trace::InvokedRet(hr);
return hr;
}
std::wstring app_name = L"PowerRename";
};
CoCreatableClass(PowerRenameContextMenuCommand)
CoCreatableClassWrlCreatorMapInclude(PowerRenameContextMenuCommand)
STDAPI DllGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IActivationFactory** factory)
{
return Module<ModuleType::InProc>::GetModule().GetActivationFactory(activatableClassId, factory);
}
STDAPI DllCanUnloadNow()
{
return Module<InProc>::GetModule().GetObjectCount() == 0 ? S_OK : S_FALSE;
}
STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_ void** instance)
{
return Module<InProc>::GetModule().GetClassObject(rclsid, riid, instance);
}

View File

@@ -0,0 +1,5 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.220418.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220201.1" targetFramework="native" />
</packages>

View File

@@ -0,0 +1,5 @@
// pch.cpp: source file corresponding to the pre-compiled header
#include "pch.h"
// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.

View File

@@ -0,0 +1,13 @@
// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.
#ifndef PCH_H
#define PCH_H
// add headers that you want to pre-compile here
#include "framework.h"
#endif //PCH_H

View File

@@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by PowerRenameContextMenu.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -64,6 +64,9 @@
<ProjectReference Include="..\..\..\common\Themes\Themes.vcxproj">
<Project>{98537082-0fdb-40de-abd8-0dc5a4269bab}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\common\version\version.vcxproj">
<Project>{cc6e41ac-8174-4e8a-8d22-85dd7f4851df}</Project>
</ProjectReference>
<ProjectReference Include="..\lib\PowerRenameLib.vcxproj">
<Project>{51920f1f-c28c-4adf-8660-4238766796c2}</Project>
</ProjectReference>

View File

@@ -6,10 +6,13 @@
#include <common/SettingsAPI/settings_objects.h>
#include <common/logger/logger.h>
#include <common/utils/logger_helper.h>
#include <common/utils/process_path.h>
#include <common/utils/resources.h>
#include "Generated Files/resource.h"
#include <atomic>
#include <dll/PowerRenameConstants.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Management.Deployment.h>
std::atomic<DWORD> g_dwModuleRefCount = 0;
HINSTANCE g_hInst = 0;
@@ -161,6 +164,66 @@ private:
std::wstring app_key;
public:
bool registerSparsePackage(std::wstring externalLocation, std::wstring sparsePkgPath)
{
bool registration = false;
try
{
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Management::Deployment;
Uri externalUri{ externalLocation };
Uri packageUri{ sparsePkgPath };
// Console.WriteLine("exe Location {0}", externalLocation);
// Console.WriteLine("msix Address {0}", sparsePkgPath);
// Console.WriteLine(" exe Uri {0}", externalUri);
// Console.WriteLine(" msix Uri {0}", packageUri);
PackageManager packageManager;
// Declare use of an external location
AddPackageOptions options;
options.ExternalLocationUri(externalUri);
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> deploymentOperation = packageManager.AddPackageByUriAsync(packageUri, options);
//IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> deploymentOperation = packageManager.AddPackageAsync(packageUri, nullptr, DeploymentOptions::None);
deploymentOperation.get();
int returnValue = 0;
// Check the status of the operation
if (deploymentOperation.Status() == AsyncStatus::Error)
{
auto deploymentResult{ deploymentOperation.GetResults() };
auto asd = deploymentOperation.ErrorCode();
auto asd1 = deploymentResult.ErrorText().c_str();
returnValue = 1;
}
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
{
returnValue = 1;
}
else if (deploymentOperation.Status() == AsyncStatus::Completed)
{
returnValue = 1;
}
else
{
returnValue = 1;
}
return returnValue;
// Other progress and error-handling code omitted for brevity...
}
catch (...)
{
}
return true;
}
// Return the localized display name of the powertoy
virtual PCWSTR get_name() override
{
@@ -176,6 +239,11 @@ public:
// Enable the powertoy
virtual void enable()
{
std::wstring path = get_module_folderpath(g_hInst);
std::wstring packageUri = path + L"\\PowerRenameContextMenuPackage.msix";
//std::wstring externalLocation = L"C:\\Users\\stefan\\Projects\\PowerToys\\x64\\Debug\\modules\\PowerRename";
//std::wstring packageUri = L"C:\\Users\\stefan\\Projects\\PowerToys\\src\\modules\\powerrename\\PowerRenameContextMenu\\MyPackage.msix";
registerSparsePackage(path, packageUri);
Logger::info(L"PowerRename enabled");
m_enabled = true;
save_settings();