From f6a63582a26336b7ec285e1e9acb128ba494b715 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:46:34 +0100 Subject: [PATCH] [CmdNotFound]Disable on Arm64 as there is no MSI installer for PowerShell 7.4 yet (#30759) * [Command Not Found] Disable on Arm64 * Hide deps * Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw Co-authored-by: Jaime Bernardo * Update Resources.resw --------- Co-authored-by: Jaime Bernardo Co-authored-by: Clint Rutkas --- .../SettingsXAML/Views/CmdNotFoundPage.xaml | 45 ++++++++++++------- .../Settings.UI/Strings/en-us/Resources.resw | 25 ++++++----- .../ViewModels/CmdNotFoundViewModel.cs | 6 +++ 3 files changed, 48 insertions(+), 28 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml index 43f064ce7d3..2832874f7be 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml @@ -17,7 +17,10 @@ TrueValue="Collapsed" /> - + - - - - - - - - - + + + + + + + + + + + + - + @@ -104,7 +115,7 @@ - + diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 73314466091..25fc9390fc4 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -3677,16 +3677,16 @@ Activate by holding the key for the character you want to add an accent to, then Command Not Found "Command Not Found" is a product name - + Installed - + Detected - + Not detected - + The following components are required @@ -3695,11 +3695,11 @@ Activate by holding the key for the character you want to add an accent to, then WinGet Client PowerShell module - + Command Not Found "Command Not Found" is a product name - + Add this module to the PowerShell 7 profile script so that it is enabled with every new session @@ -3708,16 +3708,16 @@ Activate by holding the key for the character you want to add an accent to, then PowerShell 7 is required to use this module - + Refresh - + Check if your PowerShell configuration is compatible and configured correctly - + Install - + Uninstall @@ -3998,4 +3998,7 @@ Activate by holding the key for the character you want to add an accent to, then Text size of result titles - \ No newline at end of file + + Command Not Found is not supported on the ARM64 architecture currently. We are actively working on a solution. + + diff --git a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs index 712194b453e..85b5c3bf2e5 100644 --- a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.IO; using System.Reflection; +using System.Runtime.InteropServices; using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Helpers; @@ -123,6 +124,11 @@ public bool IsEnabledGpoConfigured get => _enabledStateIsGPOConfigured; } + public bool IsArm64Arch + { + get => RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.Arm64; + } + public string RunPowerShellScript(string powershellExecutable, string powershellArguments, bool hidePowerShellWindow = false) { string outputLog = string.Empty;