Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add devdocs for tools #24903

Merged
merged 15 commits into from
Mar 24, 2023
1 change: 1 addition & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ EXTENDEDVERBS
eyetracker
fabricbot
fancymouse
fancyzone
fancyzones
FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR
Expand Down
31 changes: 31 additions & 0 deletions doc/devdocs/tools/bug-report-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# [Bug report tool](/tools/BugReportTool/)

This tool is used to collect logs and system information for bug reports. The bug report is then saved as a zip file on the desktop.

## Launching

It can launch from the PowerToys tray icon by clicking "Report Bug", by clicking the bug report icon in the PowerToys flyout or by running the executable directly.

## Included files

The bug report includes the following files:

* Settings files of the modules.
* Logs of the modules and the runner.
* Update log files.
* `compatibility-tab-info.txt` - Information about [compatibility settings](https://support.microsoft.com/windows/make-older-apps-or-programs-compatible-with-windows-783d6dd7-b439-bdb0-0490-54eea0f45938) set for certain PowerToys executables both in the user and system scope.
* `context-menu-packages.txt` - Information about the packages that are registered for the new Windows 11 context menu.
* `dotnet-installation-info.txt` - Information about the installed .NET versions.
* `EventViewer-*.xml` - These files contain event logs from the Windows Event Viewer for the executable specified in the file name.
* `gpo-configuration-info.txt` - Information about the configured [GPO](/doc/gpo/README.md).
* `installationFolderStructure.txt` - Information about the folder structure of the installation. All lines with files have the following structure: `FileName Version MD5Hash`.
* `last_version_run.json` - Information about the last version of PowerToys that was run.
* `log_settings.json` - Information about the log level settings.
* `monitor-report-info.txt` - Information about the monitors connected to the system. This file is created by the [monitor info report tool](/doc/devdocs/tools/monitor-info-report.md).
* `oobe_settings.json` - Information about the OOBE settings.
* `registry-report-info.txt` - Information about the registry keys that are used by PowerToys.
* `settings_placement.json` - Information about the placement of the settings window.
* `settings-telemetry.json` - Information about the last time telemetry data was sent.
* `UpdateState.json` - Information about the last update check and the current status of the update download.
* `windows-settings.txt` - Information about the Windows language settings.
* `windows-version.txt` - Information about the Windows version.
31 changes: 31 additions & 0 deletions doc/devdocs/tools/build-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# [Build tools](/tools/build/)

These build tools help building PowerToys projects.

## [build-essentials.ps1](/tools/build/build-essentials.ps1)

A script that builds certain specified PowerToys projects. You can edit the `$ProjectsToBuild` variable to specify which projects to build.

## [convert-resx-to-rc.ps1](/tools/build/convert-resx-to-rc.ps1)

This script converts a .resx file to a .rc file, so it can be used in a C++ project. More information on localization can be found in the [localization guide](/doc/devdocs/localization.md).

## [convert-stringtable-to-resx.ps1](/tools/build/convert-stringtable-to-resx.ps1)

This script converts a stringtable to a .resx file, so it can be used in a C# project. More information about this script can be found in the [localization guide](/doc/devdocs/localization.md).

## [move-and-rename-resx.ps1](/tools/build/move-and-rename-resx.ps1)

This script is used by the pipeline to move the .resx files to the correct location, so that they can be localized into different languages.

## [move-uwp-resw.ps1](/tools/build/move-uwp-resw.ps1)

This script is used by the pipeline to move the .resw files to the correct location, so that they can be localized into different languages.

## [versionSetting.ps1](/tools/build/versionSetting.ps1)

Sets `version.prop` file with the version number.
stefansjfw marked this conversation as resolved.
Show resolved Hide resolved

## [video_conference_make_cab.ps1](/tools/build/video_conference_make_cab.ps1)

This script creates a cab file for the Video Conference Mute driver.
5 changes: 5 additions & 0 deletions doc/devdocs/tools/clean-up-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# [CleanUp_tool](/tools/CleanUp_tool/) and [CleanUp_tool_powershell_script](/tools/CleanUp_tool_powershell_script/)
stefansjfw marked this conversation as resolved.
Show resolved Hide resolved

This tool, respective this powershell script, is used to clean up the PowerToys installation. It cleans the `AppData` folder and the registry.

This tool is currently very outdated and just cleans up the registry keys of some few modules.
5 changes: 5 additions & 0 deletions doc/devdocs/tools/fancyzone-hit-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# [FancyZone hit test tool](/tools/FancyZone_HitTest/)

![Image of the FancyZones hit test tool](/doc/images/tools/fancyzone-hit-test.png)

This tool tests the FancyZones layout selection logic. It displays a window with 5 zones. By hovering the mouse over the zones, the zone under the mouse cursor is highlighted. The sidebar shows different metrics that are used to determine which zone is under the mouse cursor.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Testing tool for drawing zone layout
# [FancyZones_DrawLayoutTest](/tools/FancyZones_DrawLayoutTest/)

This test tool is created in order to debug issues related to the drawing of zone layout on screen.

Currently, only column layout is supported with modifiable number of zones. Pressing **w** key toggles zone appearance on primary screen (multi monitor support not yet in place). Pressing **q** key exits application.

Application is DPI unaware which means that application does not scale for DPI changes and it always assumes to have a scale factor of 100% (96 DPI). Scaling will be automatically performed by the system.
Application is DPI unaware which means that application does not scale for DPI changes and it always assumes to have a scale factor of 100% (96 DPI). Scaling will be automatically performed by the system.
13 changes: 13 additions & 0 deletions doc/devdocs/tools/fancyzones-zonable-tester.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# [FancyZones_zonable_tester](/tools/FancyZones_zonable_tester/)

![Image of the FancyZones zonable tester](/doc/images/tools/fancyzones-zonable-tester.png)

This command line application tests if the window where the mouse cursor is located is zonable. It also adds additional information about the window to the console output:

* The HWND (window handle) of the window
* The process ID of the window
* The HWND of the window in the foreground
* The style of the window
* The exStyle of the window
* The window class
* The path of the process that created the window
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Tools

## [Monitor info report](tools\monitor_info_report)
# [Monitor info report tool](/tools/MonitorReportTool)

A small diagnostic tool which helps identifying WinAPI bugs related to the physical monitor detection. When launched, it creates a log file like this:

```
```text
GetSystemMetrics = 2
GetMonitorInfo OK
EnumDisplayDevices OK:
Expand All @@ -20,4 +18,5 @@ EnumDisplayDevices OK:
DeviceString = Generic PnP Monitor
EnumDisplayMonitors OK
```
and also duplicates the info to `stdout`.

and also duplicates the info to `stdout`.
21 changes: 21 additions & 0 deletions doc/devdocs/tools/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PowerToys tools

Tools in PowerToys are standalone apps and scripts that run outside of the PowerToys runner. They help developers and users to debug and test PowerToys features.

The source code of the tools can be found in the [tools folder](/tools). The compiled tools are saved under `{PowerToysInstallPath}\tools`.

## Overview of the tools

Following tools are currently available:

* [BugReportTool](bug-report-tool.md) - A tool to collect logs and system information for bug reports.
* [Build tools](build-tools.md) - A set of scripts that help building PowerToys.
* [Clean up tool](clean-up-tool.md) - A tool to clean up the PowerToys installation.
* [FancyZones hit test](fancyzone-hit-test.md) - A tool to test FancyZones layout selection logic.
* [FancyZones draw layout test](fancyzones-draw-layout-test.md) - A tool to test FancyZones layout drawing logic.
* [FancyZones zonable tester](fancyzones-zonable-tester.md) - A tool to test if a window is zonable.
* [Monitor info report](monitor-info-report.md) - A small diagnostic tool which helps identifying WinAPI bugs related to the physical monitor detection.
* [project template](/tools/project_template/README.md) - A Visual Studio project template for a new PowerToys project.
* [StylesReportTool](styles-report-tool.md) - A tool to collect information about an open window.
* [Verification scripts](verification-scripts.md) - A set of scripts that help verifying the PowerToys installation.
* [WebcamReportTool](webcam-report-tool.md) - A tool to collect information about the connected webcams.
12 changes: 12 additions & 0 deletions doc/devdocs/tools/styles-report-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# [Styles Report Tool](/tools/StylesReportTool/)

The Styles Report Tool is a tool to collect information about an open window. Run the tool, bring the window to the foreground and press Ctrl+Alt+S. The tool will create a file on your desktop called `window_styles.txt` with the information about the window.

## Collected information

* Process name
* Window class
* Window style parameters
* Window exStyle parameters
* DWM attributes
* Infos about the Virtual Desktop the window is on
25 changes: 25 additions & 0 deletions doc/devdocs/tools/verification-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# [Verification Scripts](/tools/Verification%20scripts/)

This folder contains powershell scripts that help verifying the PowerToys installation.

## [Check preview handler registration](/tools/Verification%20scripts/Check%20preview%20handler%20registration.ps1)

This script checks the preview handler registration for the following file types:

* .markdown
* .mdtext
* .mdtxt
* .mdown
* .mkdn
* .mdwn
* .mkd
* .md
* .svg
* .svgz
* .pdf
* .gcode
* .stl
* .txt
* .ini

The tool shows the user handler and the machine handler for each file type and displays the App GUID of the corresponding handler.
6 changes: 6 additions & 0 deletions doc/devdocs/tools/webcam-report-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# [WebcamReportTool](/tools/WebcamReportTool/)

This command line application generates a report about the connected webcams on the desktop called "WebcamReport.txt". The report contains the following information about every webcam:

* Name
* Supported formats
Binary file added doc/images/tools/fancyzone-hit-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/tools/fancyzones-zonable-tester.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.