From 0e2f466454663eaa99a9553b85bef61ef8ec4a89 Mon Sep 17 00:00:00 2001 From: Aaron Junker Date: Tue, 29 Jul 2025 17:29:07 +0200 Subject: [PATCH] Fix building in release mode and some other stuff --- .pipelines/ESRPSigning_core.json | 8 ++++++-- doc/devdocs/modules/shortcut_guide.md | 2 +- installer/PowerToysSetup/ShortcutGuide.wxs | 17 ++++++++--------- .../generateAllFileComponents.ps1 | 4 ++-- .../ShortcutGuide.Ui/Models/ShortcutEntry.cs | 4 ++-- .../ShortcutGuideXAML/MainWindow.xaml.cs | 3 --- .../ShortcutGuideModuleInterface.vcxproj | 3 ++- src/runner/main.cpp | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index 6f8f817492..74b5cea145 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -216,8 +216,12 @@ "WinUI3Apps\\PowerToys.RegistryPreview.dll", "WinUI3Apps\\PowerToys.RegistryPreview.exe", - "PowerToys.ShortcutGuide.exe", - "PowerToys.ShortcutGuideModuleInterface.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.exe", + "WinUI3Apps\\PowerToys.ShortcutGuide.dll", + "WinUI3Apps\\PowerToys.ShortcutGuideModuleInterface.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.IndexYmlGenerator.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.IndexYmlGenerator.exe", + "WinUI3Apps\\ShortcutGuide.CPPProject.dll", "PowerToys.ZoomIt.exe", "PowerToys.ZoomItModuleInterface.dll", diff --git a/doc/devdocs/modules/shortcut_guide.md b/doc/devdocs/modules/shortcut_guide.md index 005d793cfe..64bc483b09 100644 --- a/doc/devdocs/modules/shortcut_guide.md +++ b/doc/devdocs/modules/shortcut_guide.md @@ -58,7 +58,7 @@ This file contains one function with the following signature: __declspec(dllexport) bool IsCurrentWindowExcludedFromShortcutGuide() ``` -This function checks if the current window is excluded from the Shortcut Guide overlay. It returns `true` if the current window is excluded, otherwise it returns `false`. +This function checks if the current window is excluded from the Shortcut Guide overlay. It returns `true` if the current window is excluded otherwise it returns `false`. #### [`tasklist_positions.cpp`](/src/modules/ShortcutGuide/ShortcutGuide.CPPProject/tasklist_positions.cpp) diff --git a/installer/PowerToysSetup/ShortcutGuide.wxs b/installer/PowerToysSetup/ShortcutGuide.wxs index 729a805861..ed03201f50 100644 --- a/installer/PowerToysSetup/ShortcutGuide.wxs +++ b/installer/PowerToysSetup/ShortcutGuide.wxs @@ -4,26 +4,25 @@ - - + + - - - + + - + - + - + - + diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 index a8365d8649..207fb8bb38 100644 --- a/installer/PowerToysSetup/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -305,8 +305,8 @@ Generate-FileComponents -fileListName "ValueGeneratorImagesCmpFiles" -wxsFilePat ## Plugins #ShortcutGuide -Generate-FileList -fileDepsJson "" -fileListName ShortcutGuideSvgFiles -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\Assets\ShortcutGuide\" -Generate-FileComponents -fileListName "ShortcutGuideSvgFiles" -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -regroot $registryroot +Generate-FileList -fileDepsJson "" -fileListName ShortcutGuideAssetsFiles -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\ShortcutGuide\" +Generate-FileComponents -fileListName "ShortcutGuideAssetsFiles" -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -regroot $registryroot #Settings Generate-FileList -fileDepsJson "" -fileListName SettingsV2AssetsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs index 7f268338e5..9b20d165f6 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs @@ -212,8 +212,8 @@ namespace ShortcutGuide.Models /// /// Transforms a key string into a visual representation in the stack panel. /// - /// The string reprensentation of the key. - /// The stackpanel to add the key to. + /// The string representation of the key. + /// The StackPanel to add the key to. private static void AddKeyToStackPanel(string key, StackPanel shortcutStackPanel) { switch (key) diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs index 96a04578bd..9ad157db1a 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs @@ -62,9 +62,6 @@ namespace ShortcutGuide var windowStyle = GetWindowLongW(hwnd, GWL_STYLE); windowStyle &= ~WS_CAPTION; _ = SetWindowLongW(hwnd, GWL_STYLE, windowStyle); -#if !DEBUG - SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); -#endif Activated += Window_Activated; diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj index be903fbe3e..5b37ae1303 100644 --- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj +++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj @@ -10,6 +10,7 @@ {2d604c07-51fc-46bb-9eb7-75aecc7f5e81} ShortcutGuideModuleInterface ShortcutGuideModuleInterface + 10.0.26100.0 @@ -37,7 +38,7 @@ - ..\..\..\..\$(Platform)\$(Configuration)\ + ..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\ PowerToys.ShortcutGuideModuleInterface diff --git a/src/runner/main.cpp b/src/runner/main.cpp index 527cf15bbb..e4331f365a 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -153,7 +153,7 @@ int runner(bool isProcessElevated, bool openSettings, std::string settingsWindow L"PowerToys.KeyboardManager.dll", L"PowerToys.Launcher.dll", L"WinUI3Apps/PowerToys.PowerRenameExt.dll", - L"PowerToys.ShortcutGuideModuleInterface.dll", + L"WinUI3Apps/PowerToys.ShortcutGuideModuleInterface.dll", L"PowerToys.ColorPicker.dll", L"PowerToys.AwakeModuleInterface.dll", L"PowerToys.FindMyMouse.dll",