[General]Reduce installer size by flattening application paths (#27451)

* Flatten everything and succeed build

* Figure out Settings assets

* Remove UseCommonOutputDirectory tag

* Proper settings app path

* [VCM] Fix assets location

* Fix some runtime paths

* [RegistryPreview]Use MRTCore specific pri file

* [Hosts]Use MRTCore specific pri file

* [Settings]Use MRTCore specific pri file

* [Peek]Use MRTCore specific pri file

* [FileLocksmith]Use MRTCore specific pri file

* [ScreenRuler]Use MRTCore specific pri file

* [PowerRename]Use MRTCore specific pri file

* [Peek]Move assets to own folder

* [FileLocksmith] Use own Assets path

* [Hosts]Use own assets folder

* [PowerRename]Use own assets dir

* [MeasureTool] Use its own assets folder

* [ImageResizer]Use its own assets path

* Fix spellcheck

* Fix tab instead of space in project files

* Normalize target frameworks and platforms

* Remove WINRT_NO_MAKE_DETECTION flag. No longer needed?

* Fix AOT and Hosts locations

* Fix Dll version differences on dependency

* Add Common.UI.csproj as refernce to fix dll versions

* Update ControlzEx to normalize dll versions

* Update System.Management version to 7.0.2

* Add GPOWrapper to Registry Preview to fix dll versions

* [PTRun]Reference Microsoft.Extensions.Hosting to fix dll versions

* Fix remaining output paths / dll version conflicts

* [KeyboardManager]Executables still on their own directories

* Fix Monaco paths

* WinAppSDK apps get to play outside again

* Enable VCM settings again

* Fix KBM Editor path again

* [Monaco]Set to own Assets dir

* Fix installer preamble; Fix publish. remove unneeded publishes

* Remove Hardlink functions

* Installer builds again (still needs work to work)

* Readd Monaco to spellcheck excludes

* Fix spellcheck and call publish.cmd again

* [Installer] Remove components that don't need own dirs

* [Installer] Refactor Power Launcher

* [Installer] Refactor Color Picker

* [Installer] Refactor Monaco assets

* [Installer]Generate File script no longer needs to remove files

* [Installer]Refactor FileLocksmith

* [Installer] Refactor Hosts

* [Installer]Refactor Image Resizer

* [Installer]Refactor MouseUtils

* [Installer]Refactor MWB

* [Installer]Refactor MeasureTool

* [Installer]Refactor Peek

* [Installer]Refactor PowerRename and registry fixes

* [Installer]Refactor RegistryPreview

* [Installer]Refactor ShortcutGuide

* [Installer]Refactor Settings

* [Installer]Clean up some unused stuff

* [Installer]Clean up stuff for user install

* [Installer]Fix WinUi3Apps wxs

* [Installer]Fix misplaced folders

* [Installer]Move x86 VCM dll to right path

* Fix monaco language list location

* [Installer]Fix VCM directory reference

* [CI]Fix signing

* [Installer] Fix resources folder for release CI

* [ci]Looks like we still ship NLog on PowerToys Run

* [Settings]Add dependency to avoid dll collision with Experimentation

* [RegistryPreview]Move XAML files to own path

* [RegistryPreview]Fix app icon

* [Hosts]Move XAML files to their own path

* [FileLocksmith]Move XAML files to their own path

* [Peek]Move XAML files to own path

* [ScreenRuler]Move XAML files to its own path

* [Settings]Move XAML to its own path

* [ColorPicker]Move Resources to Assets

* [ShortcutGuide]Move svgs to own Assets path

* [Awake]Move images to assets path

* [Runner]Remove debug checks for PowerToys Run assets

* [PTRun]Move images to its own assets path

* [ImageResizer]Icon for context menu on own assets path

* [PowerRename]Move ico to its own path

* Remove unneeded intermediary directories

* Remove further int dirs

* Move tests to its own output path

* Fix spellcheck

* spellcheck: remove warnings

* [CppAnalyzers]Ignore rule in a tool

* [CI]Check if all deps.json files reference same versions

* fix spellcheck

* [ci]Fix task identation

* [ci]Add script to guard against asset conflicts

* [ci]Add more deps.json audit steps in the release build

* Add xbf to spellcheck expects

* Fix typo in asset conflict check scripts

* Fix some more dependency conflicts

* Downgrade CsWinRT to have the same dll version as sdk

* [ci]Do a recursive check for every deps.json

* Fix spellcheck error inside comment

* [ci]Fix asset script error

* [ci]Name deps.json verify tasks a bit better

* [ci]Improve deps json verify script output

* [ci]Update WinRT version to the same running in CI

* Also upgrade CsWinRT in NOTICE.MD

* [PowerRename]Move XAML files to own path

* [Common]Fix Settings executable path

* [ci]Verify there's no xbf files in app directories

* [installer]Fix firewall path

* [Monaco]Move new files to their proper assets path

* [Monaco]Fix paths for new files after merge

* [Feedback]Removed unneeded build conditions

* [Feedback]Clear vcxproj direct reference to frameworks

* [Feedback]RunPlugins name to hold PTRun plugins

* [Feedback]Remove unneeded foreach

* [Feedback]Shortcut Guide svgs with ** in project file

* [Feedback]Fix spellcheck
This commit is contained in:
Jaime Bernardo
2023-07-20 00:12:46 +01:00
committed by GitHub
parent 1f44085e41
commit 864b862952
762 changed files with 2005 additions and 3118 deletions

View File

@@ -15,7 +15,7 @@
<Properties>
<DisplayName>PowerToys PowerRename Context Menu</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Assets\storelogo.png</Logo>
<Logo>Assets\PowerRename\storelogo.png</Logo>
<uap10:AllowExternalContent>true</uap10:AllowExternalContent>
</Properties>
<Resources>
@@ -30,9 +30,9 @@
</Capabilities>
<Applications>
<Application Id="Microsoft.PowerToys.PowerRenameContextMenu" Executable="PowerRename.exe" uap10:TrustLevel="mediumIL" uap10:RuntimeBehavior="win32App">
<uap:VisualElements AppListEntry="none" DisplayName="PowerToys PowerRename Context Menu" 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 AppListEntry="none" DisplayName="PowerToys PowerRename Context Menu" Description="PowerRenameContextMenu" BackgroundColor="transparent" Square150x150Logo="Assets\PowerRename\Square150x150Logo.png" Square44x44Logo="Assets\PowerRename\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\PowerRename\Wide310x150Logo.png" Square310x310Logo="Assets\PowerRename\LargeTile.png" Square71x71Logo="Assets\PowerRename\SmallTile.png"></uap:DefaultTile>
<uap:SplashScreen Image="Assets\PowerRename\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<desktop4:Extension Category="windows.fileExplorerContextMenus">

View File

@@ -32,7 +32,9 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<TargetName>PowerToys.PowerRenameContextMenu</TargetName>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<!-- Needs a different int dir to avoid conflicts in msix creation. -->
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\TemporaryBuild\obj\$(ProjectName)\</IntDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
@@ -51,7 +53,7 @@
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
<PreBuildEvent>
<Command>del $(OutDir)*.msix /q
<Command>del $(OutDir)\PowerRenameContextMenuPackage.msix /q
MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
@@ -76,7 +78,7 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Comma
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
</Link>
<PreBuildEvent>
<Command>del $(OutDir)*.msix /q
<Command>del $(OutDir)\PowerRenameContextMenuPackage.msix /q
MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
@@ -98,10 +100,7 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv</Comma
<ResourceCompile Include="PowerRenameContextMenu.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<None Include="PowerRenameUI.ico" CopyToOutputDirectory="PreserveNewest" />
<None Include="Assets\PowerRename\**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\logger\logger.vcxproj">

View File

@@ -35,7 +35,7 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Assets\**">
<None Include="Assets\PowerRename\**">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
@@ -45,28 +45,28 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="Assets\SmallTile.png">
<Image Include="Assets\PowerRename\SmallTile.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.png">
<Image Include="Assets\PowerRename\SplashScreen.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square150x150Logo.png">
<Image Include="Assets\PowerRename\Square150x150Logo.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Square44x44Logo.png">
<Image Include="Assets\PowerRename\Square44x44Logo.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\storelogo.png">
<Image Include="Assets\PowerRename\storelogo.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\Wide310x150Logo.png">
<Image Include="Assets\PowerRename\Wide310x150Logo.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\*.png">
<Image Include="Assets\PowerRename\*.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Assets\SplashScreen.png">
<Image Include="Assets\PowerRename\SplashScreen.png">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>

View File

@@ -72,7 +72,7 @@ public:
}
std::wstring iconResourcePath = get_module_folderpath(g_hInst);
iconResourcePath += L"\\";
iconResourcePath += L"\\Assets\\PowerRename\\";
iconResourcePath += L"PowerRenameUI.ico";
return SHStrDup(iconResourcePath.c_str(), icon);
}

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -14,8 +14,8 @@ extern std::function<void(void)> g_itemToggledCallback;
namespace
{
const wchar_t fileImagePath[] = L"ms-appx:///Assets/file.png";
const wchar_t folderImagePath[] = L"ms-appx:///Assets/folder.png";
const wchar_t fileImagePath[] = L"ms-appx:///Assets/PowerRename/file.png";
const wchar_t folderImagePath[] = L"ms-appx:///Assets/PowerRename/folder.png";
}
namespace winrt::PowerRenameUI::implementation

View File

@@ -14,7 +14,7 @@
<Properties>
<DisplayName>PowerRenameUI</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
<Logo>Assets\PowerRename\StoreLogo.png</Logo>
</Properties>
<Dependencies>
@@ -34,10 +34,10 @@
DisplayName="PowerRenameUI"
Description="PowerRenameUI"
BackgroundColor="transparent"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\SplashScreen.png" />
Square150x150Logo="Assets\PowerRename\Square150x150Logo.png"
Square44x44Logo="Assets\PowerRename\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\PowerRename\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\PowerRename\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>

View File

@@ -22,11 +22,11 @@
<WindowsPackageType>None</WindowsPackageType>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<UseWinUI>true</UseWinUI>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<!-- MRT from windows app sdk will search for a pri file with the same name of the module before defaulting to resources.pri -->
<ProjectPriFileName>PowerToys.PowerRename.pri</ProjectPriFileName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\..\deps\spdlog.props" />
@@ -53,7 +53,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -62,7 +62,8 @@
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<WarningLevel>Level4</WarningLevel>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\common\Telemetry;$(ProjectDir)..\..\..\;$(ProjectDir)..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<!-- Need to add $(ProjectDir)\Generated Files\PowerRenameXAML files directly because of https://github.com/microsoft/microsoft-ui-xaml/issues/7652 -->
<AdditionalIncludeDirectories>$(ProjectDir)\Generated Files\PowerRenameXAML;$(ProjectDir)..\..\..\common\Telemetry;$(ProjectDir)..\..\..\;$(ProjectDir)..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
@@ -87,8 +88,8 @@
<Manifest Include="app.manifest" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="ExplorerItem.h">
<DependentUpon>ExplorerItem.xaml</DependentUpon>
<ClInclude Include="PowerRenameXAML\ExplorerItem.h">
<DependentUpon>PowerRenameXAML\ExplorerItem.xaml</DependentUpon>
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="ExplorerItemsSource.h">
@@ -103,24 +104,24 @@
<DependentUpon>PatternSnippet.idl</DependentUpon>
</ClInclude>
<ClInclude Include="pch.h" />
<ClInclude Include="App.xaml.h">
<DependentUpon>App.xaml</DependentUpon>
<ClInclude Include="PowerRenameXAML\App.xaml.h">
<DependentUpon>PowerRenameXAML\App.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="MainWindow.xaml.h">
<DependentUpon>MainWindow.xaml</DependentUpon>
<ClInclude Include="PowerRenameXAML\MainWindow.xaml.h">
<DependentUpon>PowerRenameXAML\MainWindow.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="Utils.h" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml" />
<Page Include="ExplorerItem.xaml">
<ApplicationDefinition Include="PowerRenameXAML\App.xaml" />
<Page Include="PowerRenameXAML\ExplorerItem.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml" />
<Page Include="PowerRenameXAML\MainWindow.xaml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="ExplorerItem.cpp">
<DependentUpon>ExplorerItem.xaml</DependentUpon>
<ClCompile Include="PowerRenameXAML\ExplorerItem.cpp">
<DependentUpon>PowerRenameXAML\ExplorerItem.xaml</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="ExplorerItemsSource.cpp">
@@ -137,21 +138,21 @@
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="App.xaml.cpp">
<DependentUpon>App.xaml</DependentUpon>
<ClCompile Include="PowerRenameXAML\App.xaml.cpp">
<DependentUpon>PowerRenameXAML\App.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="MainWindow.xaml.cpp">
<DependentUpon>MainWindow.xaml</DependentUpon>
<ClCompile Include="PowerRenameXAML\MainWindow.xaml.cpp">
<DependentUpon>PowerRenameXAML\MainWindow.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<Midl Include="App.idl">
<Midl Include="PowerRenameXAML\App.idl">
<SubType>Code</SubType>
<DependentUpon>App.xaml</DependentUpon>
<DependentUpon>PowerRenameXAML\App.xaml</DependentUpon>
</Midl>
<Midl Include="ExplorerItem.idl">
<DependentUpon>ExplorerItem.xaml</DependentUpon>
<Midl Include="PowerRenameXAML\ExplorerItem.idl">
<DependentUpon>PowerRenameXAML\ExplorerItem.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="ExplorerItemsSource.idl">
@@ -160,9 +161,9 @@
<Midl Include="ExplorerItemViewModel.idl">
<SubType>Designer</SubType>
</Midl>
<Midl Include="MainWindow.idl">
<Midl Include="PowerRenameXAML\MainWindow.idl">
<SubType>Code</SubType>
<DependentUpon>MainWindow.xaml</DependentUpon>
<DependentUpon>PowerRenameXAML\MainWindow.xaml</DependentUpon>
</Midl>
<Midl Include="PatternSnippet.idl" />
</ItemGroup>
@@ -176,8 +177,8 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\file.png" />
<Image Include="Assets\folder.png" />
<Image Include="Assets\PowerRename\file.png" />
<Image Include="Assets\PowerRename\folder.png" />
<Image Include="PowerRenameUI.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Image>

View File

@@ -1,17 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ApplicationDefinition Include="App.xaml" />
<ApplicationDefinition Include="PowerRenameXAML\App.xaml">
<Filter>PowerRenameXAML</Filter>
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<Page Include="MainWindow.xaml" />
<Page Include="ExplorerItem.xaml" />
<Page Include="PowerRenameXAML\MainWindow.xaml">
<Filter>PowerRenameXAML</Filter>
</Page>
<Page Include="PowerRenameXAML\ExplorerItem.xaml">
<Filter>PowerRenameXAML</Filter>
</Page>
</ItemGroup>
<ItemGroup>
<Midl Include="App.idl" />
<Midl Include="MainWindow.idl" />
<Midl Include="PowerRenameXAML\App.idl">
<Filter>PowerRenameXAML</Filter>
</Midl>
<Midl Include="PowerRenameXAML\MainWindow.idl">
<Filter>PowerRenameXAML</Filter>
</Midl>
<Midl Include="PatternSnippet.idl" />
<Midl Include="ExplorerItem.idl" />
<Midl Include="PowerRenameXAML\ExplorerItem.idl">
<Filter>PowerRenameXAML</Filter>
</Midl>
<Midl Include="ExplorerItemsSource.idl" />
<Midl Include="ExplorerItemViewModel.idl" />
</ItemGroup>
@@ -30,6 +42,9 @@
<Filter Include="Assets">
<UniqueIdentifier>{27718999-c175-450a-861c-89f911e16a88}</UniqueIdentifier>
</Filter>
<Filter Include="PowerRenameXAML">
<UniqueIdentifier>{B997F68E-02BE-4493-B417-9EC3ED2AEBE5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Manifest Include="app.manifest" />
@@ -38,10 +53,10 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\file.png">
<Image Include="Assets\PowerRename\file.png">
<Filter>Assets</Filter>
</Image>
<Image Include="Assets\folder.png">
<Image Include="Assets\PowerRename\folder.png">
<Filter>Assets</Filter>
</Image>
<Image Include="PowerRenameUI.ico" />

View File

@@ -10,8 +10,8 @@ using namespace Microsoft::Windows::ApplicationModel::Resources;
namespace
{
const wchar_t fileImagePath[] = L"ms-appx:///Assets/file.png";
const wchar_t folderImagePath[] = L"ms-appx:///Assets/folder.png";
const wchar_t fileImagePath[] = L"ms-appx:///Assets/PowerRename/file.png";
const wchar_t folderImagePath[] = L"ms-appx:///Assets/PowerRename/folder.png";
std::wstring PowerRenameItemRenameStatusToString(PowerRenameItemRenameStatus status)
{
@@ -201,7 +201,7 @@ namespace winrt::PowerRenameUI::implementation
std::wstring ExplorerItem::StateToErrorMessage()
{
static auto factory = winrt::get_activation_factory<ResourceManager, IResourceManagerFactory>();
static ResourceManager manager = factory.CreateInstance(L"resources.pri");
static ResourceManager manager = factory.CreateInstance(L"PowerToys.PowerRename.pri");
static auto invalid_char_error = manager.MainResourceMap().GetValue(L"Resources/ErrorMessage_InvalidChar").ValueAsString();
static auto name_too_long_error = manager.MainResourceMap().GetValue(L"Resources/ErrorMessage_FileNameTooLong").ValueAsString();

View File

@@ -6,7 +6,7 @@
#include "winrt/Microsoft.UI.Xaml.Controls.Primitives.h"
#include "ExplorerItem.g.h"
#include "PowerRenameInterfaces.h"
#include "Utils.h"
#include "..\Utils.h"
namespace winrt::PowerRenameUI::implementation
{

View File

@@ -1,4 +1,4 @@
import "ExplorerItem.idl";
import "PowerRenameXAML\ExplorerItem.idl";
import "ExplorerItemsSource.idl";
import "PatternSnippet.idl";

View File

@@ -56,7 +56,7 @@
Width="16"
Margin="4,0,0,0"
HorizontalAlignment="Left"
Source="ms-appx:///Assets/file.png" />
Source="ms-appx:///Assets/PowerRename/file.png" />
<StackPanel
Grid.Column="2"

View File

@@ -164,7 +164,7 @@ namespace winrt::PowerRenameUI::implementation
m_searchRegExShortcuts = winrt::single_threaded_observable_vector<PowerRenameUI::PatternSnippet>();
auto factory = winrt::get_activation_factory<ResourceManager, IResourceManagerFactory>();
ResourceManager manager = factory.CreateInstance(L"resources.pri");
ResourceManager manager = factory.CreateInstance(L"PowerToys.PowerRename.pri");
m_searchRegExShortcuts.Append(winrt::make<PatternSnippet>(L".", manager.MainResourceMap().GetValue(L"Resources/RegExCheatSheet_MatchAny").ValueAsString()));
m_searchRegExShortcuts.Append(winrt::make<PatternSnippet>(L"\\d", manager.MainResourceMap().GetValue(L"Resources/RegExCheatSheet_MatchDigit").ValueAsString()));
@@ -853,7 +853,7 @@ namespace winrt::PowerRenameUI::implementation
HRESULT MainWindow::OpenSettingsApp()
{
std::wstring path = get_module_folderpath(g_hostHInst);
path += L"\\..\\..\\PowerToys.exe";
path += L"\\..\\PowerToys.exe";
std::wstring openSettings = L"--open-settings=PowerRename";

View File

@@ -8,13 +8,12 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{B25AC7A5-FB9F-4789-B392-D5C85E948670}</ProjectGuid>
<RootNamespace>PowerRenameExt</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<TargetName>PowerToys.PowerRenameExt</TargetName>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<PlatformToolset>v143</PlatformToolset>

View File

@@ -21,7 +21,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>

View File

@@ -24,7 +24,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\tests\PowerRename\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -32,7 +32,7 @@
<PreprocessorDefinitions>WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>$(OutDir)PowerRenameLib.lib;Pathcch.lib;comctl32.lib;shlwapi.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(OutDir)\..\..\WinUI3Apps\PowerRenameLib.lib;Pathcch.lib;comctl32.lib;shlwapi.lib;shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@@ -24,7 +24,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\PowerRename\</OutDir>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\tests\PowerRename\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -34,7 +34,7 @@
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(OutDir)PowerRenameLib.lib;comctl32.lib;pathcch.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Pathcch.lib;$(OutDir)PowerRenameLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(OutDir)\..\..\WinUI3Apps\PowerRenameLib.lib;comctl32.lib;pathcch.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Pathcch.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>