mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[New Utility]Mouse Jump(#23566)
* #23216 - initial MouseJump commit * #23216 - Mouse Jump - fix spelling, removing Interop folder * #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln * #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln * #23216 - Mouse Jump - switch MS Logger to NLog for nuget package allow-listing * #23216 added MouseJumpUI.UnitTests.dll to "MS Tests" step in build-powertoys-steps.yml * [MouseJump] fixed screenshot coords (x & y were transposed) (#23216) * [MouseJump] close form rather than hide on deactivate (#23216) * [MouseJump] added UI dll for signing (#23216) * [MouseJump] close form rather than hide on deactivate (#23216) * [MouseJump] removed redundant line * [MouseJump] configure dpi awareness, add NLog.config (microsoft#23216) * [MouseJump] fix spellchecker errors (microsoft#23216) * [MouseJump] fixing comment style warning (microsoft#23216) * [MouseJump] simplified dpi config (microsoft#23216) * [MouseJump] fixed edge case issue with moving cursor (microsoft#23216) * [MouseJump] fixed typo (microsoft#23216) * [MouseJump] added attribution (microsoft#23216) * [Mouse Jump] fix attribution link and spelling (microsoft#23216) * Add MouseJump to installer * Fix centralized version control * Add Quick Access enable/disable entry * Fix analyzer error in GPO * Fix botched merge * Disabled by default and remove boilerplate code * Add GPO definitions * Add GPO implications when starting standalone * Update hotkey when it's changed in Settings * Use standard Logger * Add OOBE strings for Mouse Jump * Add telemetry * Update installer * Add signing * Add to bug report tool * Address PR feedback
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
||||
|
||||
<?define MouseJumpUIComponentFiles=PowerToys.MouseJumpUI.deps.json;PowerToys.MouseJumpUI.dll;PowerToys.MouseJumpUI.exe;PowerToys.MouseJumpUI.runtimeconfig.json;WinRT.Runtime.dll;PowerToys.ManagedCommon.dll;PowerToys.GPOWrapper.dll;PowerToys.ManagedTelemetry.dll;Ijwhost.dll;System.Management.dll?>
|
||||
|
||||
<Fragment>
|
||||
<!-- MouseUtils -->
|
||||
<DirectoryRef Id="MouseUtilsInstallFolder" FileSource="$(var.BinDir)modules\$(var.MouseUtilsProjectName)">
|
||||
@@ -16,12 +18,26 @@
|
||||
<Component Id="Module_MousePointerCrosshairs" Win64="yes">
|
||||
<File Source="$(var.BinDir)modules\$(var.MouseUtilsProjectName)\PowerToys.MousePointerCrosshairs.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="Module_MouseJump" Win64="yes">
|
||||
<File Source="$(var.BinDir)modules\$(var.MouseUtilsProjectName)\PowerToys.MouseJump.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- MouseJump UI -->
|
||||
<?foreach File in $(var.MouseJumpUIComponentFiles)?>
|
||||
<Component Id="MouseJumpUIComp_$(var.File)" Win64="yes" Directory="MouseJumpUIFolder">
|
||||
<File Id="MouseJumpUIFile_$(var.File)" Source="$(var.BinDir)modules\$(var.MouseUtilsProjectName)\MouseJumpUI\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
|
||||
<ComponentGroup Id="MouseUtilsComponentGroup" Directory="INSTALLFOLDER">
|
||||
<ComponentRef Id="Module_FindMyMouse"/>
|
||||
<ComponentRef Id="Module_MouseHighlighter"/>
|
||||
<ComponentRef Id="Module_MousePointerCrosshairs" />
|
||||
<ComponentRef Id="Module_MouseJump" />
|
||||
<?foreach File in $(var.MouseJumpUIComponentFiles)?>
|
||||
<ComponentRef Id="MouseJumpUIComp_$(var.File)" />
|
||||
<?endforeach?>
|
||||
</ComponentGroup>
|
||||
|
||||
</Fragment>
|
||||
|
||||
@@ -477,6 +477,7 @@
|
||||
|
||||
<!-- Mouse Utils -->
|
||||
<Directory Id="MouseUtilsInstallFolder" Name="$(var.MouseUtilsProjectName)">
|
||||
<Directory Id="MouseJumpUIFolder" Name="MouseJumpUI" />
|
||||
</Directory>
|
||||
|
||||
<!-- PastePlain -->
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<?define SettingsV2Files=WinUIEx.dll;backup_restore_settings.json;Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Labs.WinUI.SettingsControls.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.CodeDom.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;System.Management.dll;PowerToys.GPOWrapper.dll;System.Text.Json.dll;WindowsBase.dll;PowerToys.AllExperiments.dll?>
|
||||
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PastePlain.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?>
|
||||
<?define SettingsV2OOBEAssetsModulesFiles=ColorPicker.gif;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;FancyZones.gif;FileExplorer.png;FileLocksmith.gif;ImageResizer.gif;KBM.gif;MouseUtils.gif;PastePlain.gif;PowerAccent.gif;PowerOCR.gif;PowerRename.gif;Run.gif;ScreenRuler.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png;OOBEPTHeroShort.png?>
|
||||
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;Experimentation.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;Hosts.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseCrosshairs.png;MouseUtils.png;PastePlain.png;PowerAccent.png;PowerOcr.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ScreenRuler.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
|
||||
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;Experimentation.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;Hosts.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseJump.png;MouseCrosshairs.png;MouseUtils.png;PastePlain.png;PowerAccent.png;PowerOcr.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ScreenRuler.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
|
||||
<?define SettingsV2MicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
|
||||
|
||||
<!-- These files are needed for release builds to contain the experimentation DLLs -->
|
||||
|
||||
@@ -1036,6 +1036,7 @@ const std::wstring PTInteropConsumers[] =
|
||||
L"modules\\FileLocksmith",
|
||||
L"modules\\Hosts",
|
||||
L"modules\\FileExplorerPreview",
|
||||
L"modules\\MouseUtils\\MouseJumpUI",
|
||||
};
|
||||
|
||||
UINT __stdcall CreatePTInteropHardlinksCA(MSIHANDLE hInstall)
|
||||
@@ -1079,7 +1080,8 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
HRESULT hr = S_OK;
|
||||
UINT er = ERROR_SUCCESS;
|
||||
std::wstring installationFolder, dotnetRuntimeFilesSrcDir, colorPickerDir, powerOCRDir, launcherDir, fancyZonesDir,
|
||||
imageResizerDir, settingsDir, awakeDir, measureToolDir, powerAccentDir, fileExplorerAddOnsDir, hostsDir, fileLocksmithDir;
|
||||
imageResizerDir, settingsDir, awakeDir, measureToolDir, powerAccentDir, fileExplorerAddOnsDir, hostsDir, fileLocksmithDir,
|
||||
mouseJumpDir;
|
||||
|
||||
hr = WcaInitialize(hInstall, "CreateDotnetRuntimeHardlinksCA");
|
||||
ExitOnFailure(hr, "Failed to initialize");
|
||||
@@ -1100,6 +1102,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
fileExplorerAddOnsDir = installationFolder + L"modules\\FileExplorerPreview\\";
|
||||
hostsDir = installationFolder + L"modules\\Hosts\\";
|
||||
fileLocksmithDir = installationFolder + L"modules\\FileLocksmith\\";
|
||||
mouseJumpDir = installationFolder + L"modules\\MouseUtils\\MouseJumpUI\\";
|
||||
|
||||
for (auto file : dotnetRuntimeFiles)
|
||||
{
|
||||
@@ -1116,6 +1119,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (fileExplorerAddOnsDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (hostsDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (fileLocksmithDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (mouseJumpDir + file).c_str(), ec);
|
||||
|
||||
if (ec.value() != S_OK)
|
||||
{
|
||||
@@ -1139,6 +1143,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (powerAccentDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (fileExplorerAddOnsDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (hostsDir + file).c_str(), ec);
|
||||
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (mouseJumpDir + file).c_str(), ec);
|
||||
|
||||
if (ec.value() != S_OK)
|
||||
{
|
||||
@@ -1233,7 +1238,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
UINT er = ERROR_SUCCESS;
|
||||
std::wstring installationFolder, colorPickerDir, powerOCRDir, launcherDir, fancyZonesDir,
|
||||
imageResizerDir, settingsDir, awakeDir, measureToolDir, powerAccentDir, fileExplorerAddOnsDir,
|
||||
hostsDir, fileLocksmithDir;
|
||||
hostsDir, fileLocksmithDir, mouseJumpDir;
|
||||
|
||||
hr = WcaInitialize(hInstall, "DeleteDotnetRuntimeHardlinksCA");
|
||||
ExitOnFailure(hr, "Failed to initialize");
|
||||
@@ -1253,6 +1258,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
fileExplorerAddOnsDir = installationFolder + L"modules\\FileExplorerPreview\\";
|
||||
hostsDir = installationFolder + L"modules\\Hosts\\";
|
||||
fileLocksmithDir = installationFolder + L"modules\\FileLocksmith\\";
|
||||
mouseJumpDir = installationFolder + L"modules\\MouseUtils\\MouseJumpUI\\";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1270,6 +1276,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
DeleteFile((fileExplorerAddOnsDir + file).c_str());
|
||||
DeleteFile((hostsDir + file).c_str());
|
||||
DeleteFile((fileLocksmithDir + file).c_str());
|
||||
DeleteFile((mouseJumpDir + file).c_str());
|
||||
}
|
||||
|
||||
for (auto file : dotnetRuntimeWPFFiles)
|
||||
@@ -1283,6 +1290,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
|
||||
DeleteFile((powerAccentDir + file).c_str());
|
||||
DeleteFile((fileExplorerAddOnsDir + file).c_str());
|
||||
DeleteFile((hostsDir + file).c_str());
|
||||
DeleteFile((mouseJumpDir + file).c_str());
|
||||
}
|
||||
}
|
||||
catch (std::exception e)
|
||||
@@ -1316,13 +1324,14 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
||||
}
|
||||
processes.resize(bytes / sizeof(processes[0]));
|
||||
|
||||
std::array<std::wstring_view, 9> processesToTerminate = {
|
||||
std::array<std::wstring_view, 10> processesToTerminate = {
|
||||
L"PowerToys.PowerLauncher.exe",
|
||||
L"PowerToys.Settings.exe",
|
||||
L"PowerToys.Awake.exe",
|
||||
L"PowerToys.FancyZones.exe",
|
||||
L"PowerToys.FancyZonesEditor.exe",
|
||||
L"PowerToys.FileLocksmithUI.exe",
|
||||
L"PowerToys.MouseJumpUI.exe",
|
||||
L"PowerToys.ColorPickerUI.exe",
|
||||
L"PowerToys.AlwaysOnTop.exe",
|
||||
L"PowerToys.exe"
|
||||
|
||||
Reference in New Issue
Block a user