[DSC] Implement Microsoft.PowerToys.Configure DSCResource & winget support (#30918)

* [DSC] Microsoft.PowerToys.Configure module + winget configuration file support

* f: fix for an incorrect directory id reference

* f: update comment

* f: address review comments

* f: file locksmith bug fix

* f: add explorer preview switches in samples

* f: remove debug

* Sign DSC files

* f: implement docs/samples generator

* [ci]Sign FancyZonesEditorCommon.dll

* Sign DSC files in the Generated folder

* f: address review comments

* f: update usable options

* f: add autogenerated sample

* [Installer] Don't use same GUID for different components

* [Installer]Don't remove folders shared by other modules

* Allow configuring PTRun MaximumNumberOfResults

* Remove all settings DSC sample. Just random data

* Allow configuring Hosts Run as Administrator

* Revert "[Installer]Don't remove folders shared by other modules"

This reverts commit 6da3d6cfd5.

* Add all PTRun plugins and Global and keyboard to DSC sample

* Fix issues with context menu modules not disabling

* Fix default enabled values when setting with DSC

* Fix tests regarding default modules in Settings

* Fix merge error

* Restart PowerToys process if we stopped it

---------

Co-authored-by: Andrey Nekrasov <1828123+yuyoyuppe@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Andrey Nekrasov
2024-04-02 01:09:47 +02:00
committed by GitHub
parent 818d3e3035
commit f23fa3f592
81 changed files with 2608 additions and 265 deletions

View File

@@ -15,6 +15,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
{
private Action notifyEnabledChangedAction;
// Default values for enabled modules should match their expected "enabled by default" values.
// Otherwise, a run of DSC on clean settings will not match the expected default result.
public EnabledModules()
{
}
@@ -55,7 +57,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
private bool fileExplorerPreview = true;
[JsonPropertyName("File Explorer Preview")]
public bool FileExplorerPreview
public bool PowerPreview
{
get => fileExplorerPreview;
set
@@ -116,7 +118,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool keyboardManager = true;
private bool keyboardManager; // defaulting to off
[JsonPropertyName("Keyboard Manager")]
public bool KeyboardManager
@@ -183,7 +185,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool awake;
private bool awake = true;
[JsonPropertyName("Awake")]
public bool Awake
@@ -199,7 +201,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool mouseWithoutBorders = true;
private bool mouseWithoutBorders; // defaulting to off
[JsonPropertyName("MouseWithoutBorders")]
public bool MouseWithoutBorders
@@ -247,7 +249,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool mouseJump = true;
private bool mouseJump; // defaulting to off
[JsonPropertyName("MouseJump")]
public bool MouseJump
@@ -279,7 +281,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool mousePointerCrosshairs = true;
private bool mousePointerCrosshairs; // defaulting to off
[JsonPropertyName("MousePointerCrosshairs")]
public bool MousePointerCrosshairs
@@ -295,7 +297,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool powerAccent;
private bool powerAccent; // defaulting to off
[JsonPropertyName("QuickAccent")]
public bool PowerAccent
@@ -311,10 +313,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library
}
}
private bool powerOCR = true;
private bool powerOCR; // defaulting to off
[JsonPropertyName("TextExtractor")]
public bool PowerOCR
public bool PowerOcr
{
get => powerOCR;
set