Compare commits

..

367 Commits

Author SHA1 Message Date
donlaci
d34d4e2d54 spell checker 2024-08-23 14:47:43 +02:00
donlaci
8588dff066 creating temporal workspace for launch. 2024-08-23 14:31:23 +02:00
Seraphima
cbf6624ddd Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-22 20:11:33 +02:00
Seraphima
010fccd12a fix launch and edit: save new project 2024-08-22 20:11:18 +02:00
Seraphima
b68b7724c9 fix launch and edit for the new project 2024-08-22 19:02:38 +02:00
Niels Laute
ab47d91b5f New icon 2024-08-22 18:44:34 +02:00
Seraphima
f6282773c1 logs 2024-08-22 16:43:19 +02:00
Seraphima
868ba040d8 remove unused argument 2024-08-22 16:40:02 +02:00
Seraphima
179b4ed197 comment out unused 2024-08-22 16:39:05 +02:00
Seraphima
dc5bc12896 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-22 16:37:41 +02:00
Seraphima
558ea132d1 get process path without waiting 2024-08-22 16:37:33 +02:00
Niels Laute
919fe830a2 Sentence case labels 2024-08-22 16:26:41 +02:00
Seraphima
f665966db6 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-22 15:07:24 +02:00
donlaci
40a2510c52 Removing old shortcut on workspace renaming 2024-08-22 15:05:05 +02:00
Seraphima
cec9a73a6b fix terminating UI 2024-08-22 14:41:42 +02:00
Seraphima
02f792b13e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-22 13:32:26 +02:00
Seraphima
b7743d28b5 reordered launching 2024-08-22 13:32:17 +02:00
donlaci
f180d51367 Adding cancellation to launcher UI. 2024-08-22 10:36:50 +02:00
donlaci
8911a6eb63 Delete icon on workspace removal 2024-08-22 09:58:45 +02:00
Stefan Markovic
c38412c7cb Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-21 17:23:37 +02:00
Stefan Markovic
3bc0a518fc BugReportTool - omit cmd arg data 2024-08-21 17:20:53 +02:00
Seraphima
e49c1e1d60 UI closing 2024-08-21 16:57:44 +02:00
Seraphima
fcf5c5c05c clean up 2024-08-21 11:34:29 +02:00
Seraphima
56d87133af fix topmost LauncherUI 2024-08-21 11:34:26 +02:00
donlaci
2093dd4cde [Workspaces] Close launcher if there are failed launches. Plus adding new spinner gif 2024-08-21 11:13:22 +02:00
Seraphima
7beae3e470 fix xaml formatting 2024-08-20 22:06:49 +02:00
Seraphima
34f4514ebb fixed module order in settings 2024-08-20 21:39:27 +02:00
Seraphima
62d7b40ab0 launching with AppUserModel.ID 2024-08-20 21:16:14 +02:00
Seraphima
cd0b8aa6d9 moved AppUtils 2024-08-20 19:52:09 +02:00
Seraphima
7b23e5ba99 update OOBE image with current module name 2024-08-19 18:52:29 +02:00
Seraphima
d3faa86600 address PR comment: rename oobe view 2024-08-19 18:09:20 +02:00
Seraphima
2bc3d1228d address PR comment: uncomment gpo in settings 2024-08-19 18:05:10 +02:00
Seraphima
169c231509 address PR comments: updated projects 2024-08-19 18:02:03 +02:00
Seraphima
690dce5482 addressPR comment: use BringToForeground 2024-08-19 15:10:25 +02:00
Seraphima
a20fd15800 added supported version definition 2024-08-19 14:47:04 +02:00
Seraphima
8c30da743c address PR comment: changed version for workspaces and revision 2024-08-19 14:31:54 +02:00
Seraphima
601eab5c88 address PR comment: rename function 2024-08-19 14:26:23 +02:00
Seraphima
e23cf3c914 indentation 2024-08-19 14:19:55 +02:00
Seraphima
e17747cc1e address PR comment: fix isdigit 2024-08-19 14:16:56 +02:00
Stefan Markovic
817bec9c4c Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-18 14:36:24 +02:00
Stefan Markovic
ca49cab49b build fix - align CppWinRT version 2024-08-18 14:35:50 +02:00
Davide Giacometti
ff225044f9 [Run][PowerToys] Fix Workspaces utility (#34336)
polished workspaces utility
2024-08-18 14:24:36 +02:00
Stefan Markovic
aee1eb82a2 more .sln cleanup 2024-08-18 12:26:41 +02:00
Stefan Markovic
1f58a9e8c9 Add missing method defition to interop::Constants idl
Remove Any CPU config
2024-08-18 11:44:53 +02:00
Stefan Markovic
114ddbeeba xaml formatting 2024-08-17 10:15:32 +02:00
Seraphima
e12bf70081 added launch editor event constant 2024-08-16 18:49:48 +02:00
Seraphima
24533e4344 fix custom actions build 2024-08-16 18:49:26 +02:00
Seraphima
fa50208973 Merge remote-tracking branch 'microsoft/main' into dev/feature/projects 2024-08-16 18:09:44 +02:00
Seraphima
2d4d49f783 rename: module interface 2024-08-16 18:03:46 +02:00
Seraphima
af85be3b90 rename: json 2024-08-16 17:56:53 +02:00
Seraphima
33442e8853 fix empty file crash 2024-08-16 17:54:06 +02:00
Seraphima
ec049aa27b rename: editor resources 2024-08-16 17:53:58 +02:00
Seraphima
71d40b96cd rename: launcher 2024-08-16 17:36:27 +02:00
Seraphima
f6afee9012 rename: common files 2024-08-16 17:27:32 +02:00
Seraphima
d8b4798476 rename: editor 2024-08-16 17:27:12 +02:00
Seraphima
344506b1db rename: snapshot tool 2024-08-16 17:10:40 +02:00
Seraphima
23b6a4bedb rename: icon 2024-08-16 16:59:28 +02:00
Seraphima
c28afa1fc8 rename: module interface 2024-08-16 16:58:22 +02:00
Seraphima
2d812fa6d8 rename: fz 2024-08-16 16:42:31 +02:00
Seraphima
dc39ec771e rename: pt run 2024-08-16 16:40:14 +02:00
Seraphima
a4e07a7b5d rename: other 2024-08-16 16:39:39 +02:00
Seraphima
4825c62c50 rename: launcher UI 2024-08-16 15:55:15 +02:00
Seraphima
74c891b0f3 rename: settings 2024-08-16 15:32:16 +02:00
Seraphima
d1266cf080 rename: gpo 2024-08-16 15:07:07 +02:00
Seraphima
26119ea0e0 rename ProjectsLib -> WorkspacesLib 2024-08-16 14:18:51 +02:00
Seraphima
5420beb700 rename: workspaces data 2024-08-16 14:06:04 +02:00
Seraphima
b72ec989fa rename: telemetry namespace 2024-08-16 14:00:30 +02:00
Seraphima
8675a93f69 rename: common data structures 2024-08-16 13:56:35 +02:00
Seraphima
877d5c0506 rename: files and folders 2024-08-16 13:51:25 +02:00
Seraphima
6820e0cd80 rename: window property 2024-08-16 12:06:00 +02:00
Seraphima
98eaffc475 remove outdated 2024-08-16 11:57:17 +02:00
Seraphima
bc86e4fb04 rename: folders 2024-08-16 11:57:00 +02:00
Seraphima
95d9521cce resources 2024-08-16 11:23:05 +02:00
Seraphima
19c660a8ff MonitorRect comparison 2024-08-16 11:22:56 +02:00
Seraphima
8bd74accc0 telemetry: launch event 2024-08-16 11:22:43 +02:00
Seraphima
443f709899 replaced tuple with struct 2024-08-16 11:20:26 +02:00
Seraphima
86b1bff927 parse invoke point 2024-08-16 11:17:43 +02:00
Jeremy Sinclair
1cbf512ed0 [Build] Set NuGet Audit Mode to Direct to revert changes made with VS 17.12 (#34314)
[Build] Set NuGet Audit Mode to Direct 

Setting NuGet Audit Mode to Direct since VS 17.12 sets default mode to transitive packages.
2024-08-16 11:16:43 +02:00
Seraphima
00aa8b4b88 added utils 2024-08-16 11:15:58 +02:00
Seraphima
6db620c79f added invoke point to launcher args 2024-08-16 10:57:23 +02:00
Seraphima
b72e6bb7d6 updated Edit telemetry event 2024-08-15 20:48:42 +02:00
Davide Giacometti
c58a4f4668 [Settings][Find My Mouse] Improve UX for disabled animations (#34289)
* Improve UX for disabled animations

* bump cache
2024-08-15 17:29:25 +02:00
Seraphima
b67b7a4ee7 telemetry: delete event 2024-08-15 15:43:52 +02:00
Seraphima
65be209c2d fix muted Launch as admin checkbox 2024-08-15 15:37:54 +02:00
Seraphima
3b7f7f6851 telemetry: edit event 2024-08-15 15:31:35 +02:00
Seraphima
f10610e1e1 WindowPosition comparison 2024-08-15 13:50:03 +02:00
Seraphima
903c64b29a telemetry: create event 2024-08-15 13:32:18 +02:00
Masaru Iritani
2979dc7d15 [KBM] Convert RemapBufferRow to a struct with descriptive field names (#32545)
Use struct for RemapBufferRow

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2024-08-15 10:05:16 +02:00
Stefan Markovic
67d99a8377 Bump cswinrt and ignore PowerToys dlls in verifyDepsJsonLibraryVersions.ps1 (#34297) 2024-08-14 18:07:43 +02:00
Vaibhav Sharma
f56abb83c1 [PT-Run] Resolving the confusion between ounces (#33962)
## Summary of the Pull Request
- Replaced "ounce" to "usounce" and "imperialounce" for two different
results

## PR Checklist

- [x] **Closes:** #32841 
- [x] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end user facing strings can be localized
- [x] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
- [x] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [x] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [x] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [x] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [x] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
- Convert `ounce` to `usounce` and `imperialounce` and show the
converted results

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Manual validation
2024-08-13 10:06:02 +02:00
Seraphima
13e8743802 removed unused sln 2024-08-12 19:40:05 +02:00
Seraphima
05ddd019af consistent file name 2024-08-12 19:39:38 +02:00
Clint Rutkas
165b2cc9b2 Making CSWinRt into prop file for c# (#34225)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

more breaking out stuff

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-08-09 09:18:56 -07:00
Jaime Bernardo
5abd763df5 [Build]Clean the WPARAM warning on IDL (#34223)
## Summary of the Pull Request
Cleans a build warning about WPARAM when building the idl file. Seems
like typedef is not liked too much when compiling for winrt/Cpp.
2024-08-08 18:52:57 +01:00
Clint Rutkas
4ea34c23b2 Shifting from solution dir to actual local path (#34204)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

learning from https://github.com/microsoft/PowerToys/pull/34177/ that
solution dir could have rippling effects from other the dart pipeline.
This shifts those over to relative paths

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-08-08 07:29:21 -07:00
Jaime Bernardo
fb5ed13386 [Refactor]Port C++/CX to C++/WinRT (#34198)
## Summary of the Pull Request
Removes all C++/CX code, replacing it with C++/WinRT.

## Detailed Description of the Pull Request / Additional comments
Removes all C++/CX code.
Renames interop namespaces to be better consumed by CsWinRT.
Standardizes all projects on net8.0-windows10.0.20348.0, which is a
requirement for C++/WinRT usage.
FileLocksmithLibInterop brought to stdcpplatest and static analysis
errors were corrected.
Removed now unneeded string conversion code from
FileLocksmithLibInterop.
Changed interop KeyboardHook to use a single hook across all instances.
Required because on C++/WinRT we don't have the .NET runtime to bind a
object instance to a delegate and be able to pass it to a C function
pointer argument (still no idea why this worked correctly on C++/CX to
be honest). This change actually makes us create less low level keyboard
hooks.
Changed some code that depended on arrays since WinRT/C++ returns null
instead of an empty array through the interface.

## Validation Steps Performed
Built and tested runtime.
2024-08-08 15:26:43 +01:00
donlaci
55d8631650 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-08-08 16:00:17 +02:00
donlaci
666d0c2840 opening apps in minimized state which are placed on a monitor, which is not found at the moment of launching 2024-08-08 15:47:44 +02:00
ARCHISMAN DAS
b16e82c837 changed the tool tip of the info button next to the replacement text box in the PowerRename window. (#34192)
changed the tool tip of the info button next to the replacement text box
in the PowerRename window from "Help for Date and Time of the file
creation" to "Replace Name Syntax Help" for better understanding of this
feature.

- [x] **Closes:** #33907
- [x] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [x] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

---------

Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2024-08-07 16:24:37 +02:00
Davide Giacometti
3e133ae8bd Dependencies cleanup (#34011)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

- Removed `Vanara.PInvoke.*` packages used in Quick Accent in favor of
`Microsoft.Windows.CsWin32` that is already in use for other utilities.
- Removed `Microsoft.Windows.SDK.Contracts` package instanned only on
MWB. This is not needed:
https://learn.microsoft.com/windows/apps/desktop/modernize/desktop-to-uwp-enhance#modify-a-net-project-to-use-windows-runtime-apis
- Cleaned up obsolete packages from `Directory.Packages.props`: I
realized that uninstalling a NuGet package from all projects doesn't
remove it from `Directory.Packages.props`.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

- Manually tested Quick Accent
2024-08-07 14:16:38 +02:00
Davide Giacometti
3798a101a6 [PreviewPane] Fix form positioning issues (#34035)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

This PR aims to fix some positioning issues of the form used as preview
handler.
It fixes the following issues:
1. The floating window, detached from Explorer that sometimes appears:
#33491 #27475 #24985
2. The **CoreWebView2 members cannot be accessed after the WebView2
control is disposed** crash: #27276
3. `PowerToys.*.PreviewHandler.exe` process leak

### Repro steps for issue 1
- Navigate through files in a folder invoking their preview handler
- Minimize/Restore Explorer quickly (spam WIN+D usually works)
- 2 weird issues happen:
  - Some `PowerToys.*.PreviewHandler.exe` processes are leaked
- Some `PowerToys.*.PreviewHandler.exe` are started with a `NULL` `HWND`

![Screenshot 2024-07-27
**200207](https://github.com/user-attachments/assets/5cb6c857-ad93-422a-8c5b-47bd1c492dce)

This happens because
[IPreviewHandler::DoPreview](https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ipreviewhandler-dopreview)
is called multiple times and sometimes before calling
[IPreviewHandler::SetWindow](https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ipreviewhandler-setwindow).

When the managed previewer try to set the parent of the form to the
`NULL` `HWND`, the desktop window is used instead, resulting in the
floating preview window being displayed.
Reference:
https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-setparent#parameters


5d77874382/src/modules/previewpane/common/controls/FormHandlerControl.cs (L136)

### Repro steps for issue 2
- Preview a file
- Restart `explorer.exe` process
- Make sure `PowerToys.*.PreviewHandler.exe` is leaked and still running
- Preview the same file again
- Preview is displayed (another process is launched)
- Minimize Explorer

What happens here is that the form of the old process have an invalid
`HWND` as parent but receive the `SetRect` for some reason.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:** #33491 #27475 #24985 #27276
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

- Don't start preview pane process when `HWND` is `NULL`
- Terminate the preview pane process when setting parent fails
- Prevent leaking processes closing them when a new preview is requested
- Fixed an issue where PDF and SVG previews weren't updated after
restoring Explorer
- Added some error handling in the `UpdateWindowBounds` method of the
managed preview
- Terminate the preview pane when the `SetRect` event is received but
the parent `HWND` has become invalid

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

- Manually tested all preview panes also using multiple Explorer windows
- Validated that when Explorer is minimized/restored the preview is
updated
- Tested the preview pane resize
- Validated that no window, no taskbar icon and no errors appear on both
repro steps
2024-08-07 13:41:51 +02:00
Davide Giacometti
761e18a245 [Run] Improve default browser detection (#34132)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

- Some users are reporting that the WebSearch plugin is opening Explorer
instead of the browser.
- A user reported that the registry value we are using to detect the
command pattern to start the browser contains the string `Microsoft Edge
HTML Document`:
https://github.com/microsoft/PowerToys/issues/21400#issuecomment-2262764771
- Can't find the reason why that string is here but rather than dealing
with this string, if the pattern isn't "something valid" to be launched,
use Edge. The code is already falling back to Edge in other error cases.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:** #21400
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

- Small QoL improvements to the code
- Logged the command in case of error
- Fall back to Edge if command isn't a valid path or URI

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

- Tested WebSearch plugin changing the value of
`HKEY_CLASSES_ROOT\MSEdgeHTM\shell\open\command`:
- `"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
--single-argument %1`
- `shell:AppsFolder\Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe!App %1`
  - `Microsoft Edge HTML Document`
2024-08-07 09:38:40 +02:00
Jaime Bernardo
ed18f10fa9 Add ProjectsLauncherUI to signing 2024-08-06 22:34:59 +01:00
donlaci
ef511d6318 spell checker 2024-08-06 17:13:20 +02:00
donlaci
f80eaf7b23 commenting out feature "move apps if exist" 2024-08-06 14:44:33 +02:00
donlaci
ad88f71398 setting window size according to the screen (making it bigger) 2024-08-06 14:32:21 +02:00
donlaci
26b7a48278 Re-ordering modules after Renaming Projects + spell checker 2024-08-06 12:32:01 +02:00
donlaci
b407bf0f2b Renaming Projects to App Layouts. Replacing only string values, not the variable names 2024-08-06 12:16:21 +02:00
Clint Rutkas
fd706dec90 Consolidation for self contained, built on #34055 (#34134)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

First step on self containment. Once #34055 goes in, this number of
modified files should go way down.

Common.Selfcontained.props is the new item and
src/dsc/PowerToys.Settings.DSC.Schema.Generator/PowerToys.Settings.DSC.Schema.Generator.csproj
would be an example of a file that had SelfContained set to true prior
and now that logic was moved into a single file.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-08-05 14:29:11 -07:00
Clint Rutkas
12098cb17f Moving Version to Directory.Build.props (#34055)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

In prep for WinAppSdk, trying to consolidate items. Version.prop is one
of the first items.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-08-05 06:32:05 -07:00
donlaci
82cfa4cbfe spell checker 2024-08-05 14:38:49 +02:00
donlaci
ac5d9dbef2 Adding new app which is launched when launching a project. It shows the status of the launch process 2024-08-05 14:02:32 +02:00
Ani
77c90b8d98 [PTRun]Reverted start position to slightly off-center(#34083)
## Summary of the Pull Request
Reverted start-position to slightly off-center while still addressing
multi-monitor/multi-DPI scenarios.
2024-07-31 16:14:45 +01:00
Jaime Bernardo
3a080f5efd 0.83 changelog (#34048)
Readme update for the 0.83 release.
This will be copy / pasted for release notes.

---------

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
2024-07-30 12:21:30 -07:00
Den Delimarsky
e8ad4fa804 [Awake]Fix DAISY build issues (#34054)
This PR addresses some post-merge issues caught by @davidegiacometti,
including:

1. Separator in the context menu shown when not running from inside
PowerToys.
2. "Keep display on" setting not persisting across switches between
modes.
3. Awake not launching in standalone mode.

Additionally:

1. Exits are now properly handled in **timed** and **expirable**
keep-awake modes when running standalone. This ensures that Awake exists
after completion and doesn't switch to an in-actionable passive mode.
2. Tray tooltips now cover how much time is left on the timer.
3. Fixes #29354
4. Avoids a nasty memory leak because of re-instantiating of `Icon`
objects for every tray update.
5. Adds DPI awareness to the context menu (#16123)
2024-07-30 16:08:37 +01:00
donlaci
2af86355ac Adding launch button to projects settings, dashboard and flyout 2024-07-30 13:03:52 +02:00
Clint Rutkas
5d77874382 Correcting CppWinRT references (#34025)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

From the WinAppSdk 1.6 test upgrade, we caught a linking issue when we
retargetted to 22000. This is a screenshot from only touching
Cpp.Build.props without the fixes but the retarget.

![image](https://github.com/user-attachments/assets/03c0b592-d600-41f9-b8b4-c3976423003a)


![image](https://github.com/user-attachments/assets/b7928481-3ff2-44ba-889c-0370ef977643)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-07-26 16:23:39 -07:00
stan-sz
5b1e5107ee [Deps]Use MSTest meta package instead of individual test packages (#34019)
## Summary of the Pull Request
This is a follow up on #33964 where using the MSTest meta package brings
in all necessary test dependencies as well as enabled MSTest.Analyzers
for common test code misconfigurations. Coverlet package has not been
used, thus removing.
2024-07-26 11:57:06 +01:00
Den Delimarsky
1be3b6c087 [Awake]Refactor and update version - DAISY023_04102024 (#32378)
Improves the following:

- Consolidates different code paths for easier maintenance.
- Removes the dependency on Windows Forms and creates the system tray
icon and handling through native Win32 APIs (massive thank you to
@BrianPeek for helping write the window creation logic and diagnosing
threading issues).
- Changing modes in Awake now triggers icon changes in the tray
(#11996). Massive thank you to @niels9001 for creating the icons.

Fixes the following:

- When in the UI and you select `0` as hours and `0` as minutes in
`TIMED` awake mode, the UI becomes non-responsive whenever you try to
get back to timed after it rolls back to `PASSIVE`. (#33630)
- Adds the option to keep track of Awake state through tray tooltip.
(#12714)

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-07-25 17:09:17 +01:00
Fefe_du_973
63625a1cee [ColorPicker]Fixed Scrolling through the history in the color picker editor with a mouse wheel (#33551)
## Summary of the Pull Request
Fixed Scrolling through the history in the color picker editor with a
mouse wheel

## Detailed Description of the Pull Request / Additional comments
I added a mousewheel event listener on the HistoryColors ListView, then
I added two functions in the ColorEditorView.xaml.cs to handle the
Event, it checks the number of color in the history and handles the
scroll control accordingly
2024-07-25 17:06:12 +01:00
seraphima
e16f3ab4e5 fix default shortcut 2024-07-25 15:26:07 +02:00
seraphima
6686c5b5f5 launcher error messages 2024-07-25 15:17:02 +02:00
Heiko
4fee37c35a [AdvPaste]CSV parser: Handle control characters (quotation marks) correctly (#33986)
## Summary of the Pull Request

This PR fixes the csv parsing related to quotation marks according to
csv standard rules:
- An empty data value can be written as `""`. => Remove both quotation
marks.
- Enclosing data by starting and ending with `"` if they contain the
delimiter. => First and last quotation mark has to be removed.
- Escape quotation mark with second quotation mark. => Replace pairs of
two with a single one.

### Input
```csv
A,B,,"","my ""nice"" string","""zz""","""""double quotes"""""
```

### Before this PR (Wrong result)
```json
[
  [
    "A",
    "B",
    "",
    "\"\"",
    "\"my \"\"nice\"\" string\"",
    "\"\"\"zz\"\"\"",
    "\"\"\"\"\"double quotes\"\"\"\"\""
  ]
]
```

### After this PR (Correct result)
```json
[
  [
    "A",
    "B",
    "",
    "",
    "my \"nice\" string",
    "\"zz\"",
    "\"\"double quotes\"\""
  ]
]
```
2024-07-25 14:05:07 +01:00
Ani
d40367a860 [FileLocksmith]Show process files in modal dialog to fix crash (#33804)
## Summary of the Pull Request
To prevent a crash, show the individual files of a process within a
modal dialog rather than as inline text. Please see the linked issue for
more details.

## Detailed Description of the Pull Request / Additional comments
- Removed inline list of process files.
- Added "Show files" button to expander to show list of process files as
a modal dialog. This dialog has the same design as the one used to
display the list of selected folders within the same application.
- Added unhandled exception hander to application similar to our other
applications.


![image](https://github.com/user-attachments/assets/52eddfcc-5e10-40a3-94b2-68bbfb607f1d)

![image](https://github.com/user-attachments/assets/ff996e32-36f6-41a9-a9f0-6dda7a93d09a)
2024-07-25 13:46:20 +01:00
Ani
84def18ed5 [Peek][PreviewPane]Show Copy entry in right-click copy menu (#33845)
## Summary of the Pull Request
Fixes two bugs:
- Peek: Missing "Copy" menu-item for all WebView2 previewers.
- PreviewPane: Missing "Copy" menu-item for markdown files only.

## Detailed Description of the Pull Request / Additional comments
The issues are:
- Peek: 
- When not using Monaco (markdown, html) - the default WebView2 context
menu has been disabled. I have enabled it and then disabled ALL
menu-items other than "Copy" (such as "Back").
- When using Monaco + Release (other code files) - current code tries to
use the Monaco context menu, but it is somehow disabled at runtime. I
spent MANY hours trying to find out why but without success. It works
fine when I view the generated html + js files in a browser or in a
Debug build or in PreviewPane. But I couldn't find the root cause.
Trying to fix it by enabling the WebView2 context menu instead doesn't
work as for whatever reason, WebView2 doesn't generate a "Copy"
menu-item (it thinks there's no selected text when there is). So in this
case, the only thing I could get to work was generating context
menu-items via WebView2 callbacks that call JS functions. As a bonus,
this way of doing it also allows "Toggle text wrapping" to work.
- PreviewPane:
- Markdown - the default WebView2 context menu has been disabled. Like
for Peek, I have enabled it and then disabled ALL menu-items other than
"Copy" (such as "Back").
- Monaco (other code files) - this already just works fine, so I've left
it as is. I *could* make it work the same way as I've done for Peek for
consistency, but I've chosen to leave it as is since it works.
  

![image](https://github.com/user-attachments/assets/d758ada7-bb62-4f40-bef7-ad08ffb83786)

![image](https://github.com/user-attachments/assets/4e0baa7e-632f-412a-b2b1-b9f666277ca7)
2024-07-25 13:30:52 +01:00
seraphima
f922f56890 show screen numbers instead of monitor names 2024-07-25 12:10:03 +02:00
seraphima
193581a9ac clean up 2024-07-25 12:01:56 +02:00
seraphima
78c3f95179 project launch on "launch and edit" 2024-07-25 11:57:40 +02:00
seraphima
0212892c94 fix corrupted data: project id and monitor id 2024-07-25 11:57:12 +02:00
seraphima
50792b9520 use common theme 2024-07-25 11:51:45 +02:00
David Federman
ac14ad3458 Update MSBuildCache to 0.1.283-preview (#33988)
Update MSBuildCache to 0.1.283-preview

Notable change is this one, which should avoid under-builds when the
build tooling updates: https://github.com/microsoft/MSBuildCache/pull/77

Full release notes:
*
[0.1.283-preview](https://github.com/microsoft/MSBuildCache/releases/tag/v0.1.283-preview)
*
[0.1.273-preview](https://github.com/microsoft/MSBuildCache/releases/tag/v0.1.273-preview)
2024-07-24 12:18:24 -07:00
Davide Giacometti
0a9e889b1b [Build][Installer]Fix NU1503 build warnings (#33938)
## Summary of the Pull Request

This PR aims for fix some CI build warnings.
## Detailed Description of the Pull Request / Additional comments

### Warning NU1503
Fix warning NU1503 for wix toolset projects marking them as restorable
and adding an empty restore target.
### No test result files matching '[ '**/*.trx' ]' were found.
Skip publishing of test results for ARM64 since pipeline isn't running
ARM64 tests

![image](https://github.com/user-attachments/assets/10a64ca2-2bff-42a8-ade9-07bd5ad88e3c)
2024-07-24 16:49:08 +01:00
seraphima
885c4ffd77 handle powertoys settings 2024-07-24 14:39:47 +02:00
seraphima
d3c9fe8ea5 keep opened windows at the same positions 2024-07-23 23:39:37 +02:00
seraphima
475a059ef6 move existing windows 2024-07-23 22:40:35 +02:00
walex999
7479ef6e65 fixed typo in readme (#33979)
There was a typo in the readme
replaced : finding
with : find

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2024-07-23 10:28:00 -07:00
Vaibhav Sharma
3652e3627a [AdvPaste]Fix CSV parser supporting escape delimiter by enclosing in double quotes (#33874)
## Summary of the Pull Request
This PR fixes the CSV parser support for escaping delimiter by enclosing
it in quotes

## Detailed Description of the Pull Request / Additional comments
- This PR introduces a fix for the support of adding a delimiter to the
string and supporting it by enclosing it in `"`
2024-07-23 14:29:33 +01:00
Clint Rutkas
07c4972c2c [Deps]Upgrade testing frameworks to latest (#33964)
Upgrading testing frameworks to latest
2024-07-23 11:18:58 +01:00
Clint Rutkas
9e3ac70897 [Deps]Upgrade Microsoft.Data.Sqlite to 8.0.7 (#33963)
Updating to latest sqlite, can hold until .84

VS Code workspaces is the only item that uses this.
2024-07-23 11:04:25 +01:00
seraphima
39086f702e restart unelevated 2024-07-22 20:37:49 +02:00
Ahmada Yusril
1b27500231 [PTRun][ValueGenerator]Add result entries showing how to use (#33490)
## Summary of the Pull Request
Added usage suggestion in PTRun Value Generator. 

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Added dropdown and give a basic description about the usage of value
generator

![image](https://github.com/microsoft/PowerToys/assets/24465401/2f9e01d1-1f5a-42b5-9234-f768b27124db)

Using fuzzy match to filter relevant queries

![image](https://github.com/microsoft/PowerToys/assets/24465401/dd0594bb-328a-4a8d-9d7c-e3b5732a8573)

---------

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2024-07-22 16:31:32 +01:00
Heiko
16a1fb7981 [MWB][Enterprise] Add new policies and improve settings UI for the Transfer File setting (#33571)
## Summary of the Pull Request

### Improve settings page for TransferFile setting
The TransferFile setting depends on ShareClipboard setting. This is now
visually shown.

**Before the change:**

![image](https://github.com/microsoft/PowerToys/assets/61519853/735ad7bd-4f45-4914-8bbc-bc47170a9b47)
**After the change**

![image](https://github.com/microsoft/PowerToys/assets/61519853/78fb74c3-29a0-4779-8f0c-9df6c4161be1)


### New policies are added for MWB
Name | Supported states | Id | Behavior
------------ | ------------- | ------------ | -------------
Clipboard sharing enabled | disabled | MwbClipboardSharingEnabled |
Disables the feature if set to disabled.
File transfer enabled | disabled | MwbFileTransferEnabled | Disables the
feature if set to disabled.
Original user interface enabled | disabled | MwbUseOriginalUserInterface
| Disables the feature if set to disabled. |
Disallow blocking screensaver on other machines | enabled |
MwbDisallowBlockingScreensaver | Disables the feature if set to enabled.
|
Connect only in same subnet | enabled & disabled | MwbSameSubnetOnly |
Enables the feature if set to enabled.<br />Disables the feature if set
to disabled. |
Validate remote machine IP Address | enabled & disabled |
MwbValidateRemoteIp | Enables the feature if set to enabled.<br
/>Disables the feature if set to disabled.
Disable user defined IP Address mapping rules | enabled |
MwbDisableUserDefinedIpMappingRules | If enabled the user can't define
IP Address mapping rules.
Predefined IP Address mappings | enabled with multi-line text value |
MwbPolicyDefinedIpMappingRules | Allows admins to force define IP
Address mapping rules.

#### User Interface screenshots

![image](https://github.com/microsoft/PowerToys/assets/61519853/3d8a46c5-13f3-4a47-80a1-c0d242d8541c)

![image](https://github.com/microsoft/PowerToys/assets/61519853/44f4dc60-5106-45bf-9bb4-aa0bde9ef6fa)

![image](https://github.com/microsoft/PowerToys/assets/61519853/569be956-e889-442c-bdc9-e319ad3c19e3)
2024-07-22 15:49:45 +01:00
Heiko
ca97e01d59 [PTRun][System]Support automatic logon after reboot (#33740)
## Summary of the Pull Request
Adds support for auto-logon after reboot when using the reboot command
in system plugin.

The behavior after reboot depends on the system setting for auto-logon
after reboot/updates.

https://learn.microsoft.com/windows-server/administration/windows-commands/shutdown
2024-07-22 15:43:42 +01:00
Vaibhav Sharma
70d3d5f16e [PTRun][Registry]Allow interchangeable use of / instead of \ (#33309)
## Summary of the Pull Request
As the title suggests, the PR adds the feature of using / instead of \
in the Registry plugin of PT Run.
2024-07-22 15:14:10 +01:00
seraphima
ed98a94d2a notification about elevated apps 2024-07-20 12:57:12 +02:00
Dustin L. Howett
af6916a538 README: switch status badges over to shine-oss (#33929)
We are moving away from the `ms` organization.
2024-07-19 10:44:15 -07:00
donlaci
04ff5373d9 add move apps checkbox 2024-07-19 14:00:01 +02:00
Clint Rutkas
0c00106d5a Update CODEOWNERS
trying without ./
2024-07-18 15:10:04 -07:00
Clint Rutkas
96642b6525 Update CODEOWNERS w/ correct casing on markdown files (#33919)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-07-18 15:07:08 -07:00
Clint Rutkas
9bea986f3d Update CODEOWNERS (#33918)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

Adjusting to root folder the main items. i was able to mod
code_of_conduct.md without a lock down.

https://github.com/microsoft/PowerToys/pull/33915

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-07-18 14:07:17 -07:00
Craig Loewen
6fdc86ed2d Removed similar issues bot GitHub Action (#33909)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

Remove the GitHub action version of the Similar issues bot. This was the
prototype version, we have now developed a more robust version in
partnership with GitHub (currently in the form of a GitHub app) and are
installing that on the repo instead.
2024-07-18 10:27:24 -07:00
seraphima
3fb51eea9e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-18 17:51:14 +02:00
seraphima
a208742012 telemetry 2024-07-18 17:50:00 +02:00
seraphima
3320dc2d0d moved projects data parsing 2024-07-18 17:11:51 +02:00
Ani
78d53ffb10 [PTRun]Fixed unstable startup position after moving to PerMonitorV2 (#33784)
## Summary of the Pull Request
Fixes an issue where PowerToys Run can sometimes start up in an
inconvenient position in a multi-monitor / multi-DPI setup.
2024-07-18 15:16:19 +01:00
Davide Giacometti
7d8af7bbbb [Build]Remove wildcards items in vcxproj (#33862)
## Summary of the Pull Request

Fix the solution warnings related to wildcards items in vcxproj.

## Detailed Description of the Pull Request / Additional comments

https://learn.microsoft.com/cpp/build/reference/vcxproj-files-and-wildcards#list-all-items-explicitly
Since wildcards where used for assets that doesn't change frequently I
have added `ReplaceWildcardsInProjectItems` for CPP projects. This will
make VS automatically expand wildcards.
2024-07-18 14:48:46 +01:00
Heiko
7808033436 [PTRun][DateTime]Setting for First week of year and First day of week (#33406)
## Summary of the Pull Request

This PR implements two new plugin settings:
- **First week of year**

![image](https://github.com/microsoft/PowerToys/assets/61519853/c866ffc2-2a21-438c-9a1a-5f4c7f68a22e)

- **First day of week**

![image](https://github.com/microsoft/PowerToys/assets/61519853/b2ec125b-d87c-40c5-8793-743a1ffae237)

## Detailed Description of the Pull Request / Additional comments

For both settings the users can decide to be in sync with the system
settings (default) or to use their own setting. The order of days for
the `first day of week` setting is based on the current system culture.

PT Run respects these settings for the relevant results:
- calendar week
- week of month
- number of day in week
2024-07-18 14:29:01 +01:00
donlaci
4c12db9fa6 minor string correction 2024-07-18 14:54:56 +02:00
donlaci
abc5a80a1e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-18 14:47:37 +02:00
donlaci
548bfdfcee Implementing store of setting "order by". 2024-07-18 14:46:21 +02:00
seraphima
ea6f5c8d88 projects module interface telemetry 2024-07-18 14:28:50 +02:00
seraphima
93c81bb93e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-18 13:05:49 +02:00
seraphima
81fb58ed20 can-launch-elevated check 2024-07-18 13:00:31 +02:00
donlaci
23aa46a4a5 enhancing shortcut handling 2024-07-18 12:50:38 +02:00
Muhammad Danish
98cfeb0776 [ci]Case insensitively replace version prefix for winget's PackageVersion (#33810) 2024-07-18 11:39:51 +01:00
Davide Giacometti
a3e193e56e [Runner]Handle release tag with uppercase V during update (#33822)
## Summary of the Pull Request

The latest fix pushed with tag `V0.82.1` (uppercase V) isn't detected by
the PT internal updater.
Handle release tag with uppercase V during update.
2024-07-18 11:37:01 +01:00
Clint Rutkas
d668a659b5 [Build]Remove /Zm compiler limitation from KBM common (#33747)
## Summary of the Pull Request

This looks to have been added years ago for some reason. It used to be
2000 and was pushed to 200. If a user needed to do the /Zm flag,
shouldn't they pick what they want?
2024-07-18 10:57:25 +01:00
donlaci
ae7eb60b0c minor fix 2024-07-17 21:12:09 +02:00
8LWXpg
fb8765b54d [PTRun][Docs] Add GitHubRepo and ProcessKiller third-party plugins (#33830)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

Add [GitHubRepo](https://github.com/8LWXpg/PowerToysRun-GitHubRepo) and
[ProcessKiller](https://github.com/8LWXpg/PowerToysRun-ProcessKiller)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-07-17 11:58:56 -07:00
Anthony Mason
b9f6ef6ee4 Add RDP plugin to thirdPartyRunPlugins.md (#33827)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Add RDP plugin  information to thirdPartyRunPlugins.md.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end user facing strings can be localized
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2024-07-17 11:33:28 -07:00
donlaci
6c09b251b5 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-17 18:48:44 +02:00
donlaci
e5c8305c5c minor fixes 2024-07-17 18:48:13 +02:00
seraphima
3c422438e8 launch elevated apps 2024-07-17 17:32:14 +02:00
Ani
7457ff5202 [Settings]Fix crash on dashboard when KBM settings update (#33872)
## Summary of the Pull Request
Fixed crash of Settings when KBM settings update by any mechanism.

## Detailed Description of the Pull Request / Additional comments
To show updated KBM remappings on the dashboard, the Settings app
watches for changes to the KBM settings file and reloads the file on
change. Reloading the file can fail (most likely because the writing
process takes an exclusive lock and isn't yet done writing) and the
process crashes when this happens. This change guards against this.
2024-07-17 16:09:00 +01:00
seraphima
82e0749779 change scroll speed to 15 2024-07-17 17:08:55 +02:00
Vaibhav Sharma
fb36e6ced9 [PTRun][UnitConverter]Accept kilometers per hour abbreviations (#33594)
## Summary of the Pull Request
This PR introduces abbreviations for the units - `kph` that gets
converted to `km/h` and `cph` that gets converted to `cm/h`.
2024-07-17 16:00:05 +01:00
octastylos-pseudodipteros
f1ca65ca78 [QuickAccent]Add Bulgarian (#33550)
## Summary of the Pull Request
Adds Bulgarian to Quick Accent

## Detailed Description of the Pull Request / Additional comments
Adds Cyrillic letter short I (й)
2024-07-17 15:44:42 +01:00
seraphima
4fc83786e3 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-17 16:41:49 +02:00
donlaci
513dd0cbf4 fixing scroll speed issue 2024-07-17 16:32:48 +02:00
Heiko
b7c8bb201b [Settings]Adjust Action Keyword info bar padding on PowerToys Run plugins (#33693)
## Summary of the Pull Request

There is a layout bug that cause the info bar to overlap the space
between the settings cards.

### Before the fix

![image](https://github.com/microsoft/PowerToys/assets/61519853/3435e036-cc02-4663-ac94-4612afd6be9d)


### After the fix

![image](https://github.com/microsoft/PowerToys/assets/61519853/95bce0f8-c194-4300-80c0-294d237b5e8c)
2024-07-17 15:31:42 +01:00
Heiko
c1e8b70a64 [Settings]Align glyphs in the MWB shortcut settings section (#33586)
## Summary of the Pull Request

Add icon to `Easy Mouse` feature.
Fix icon of `Switch Between Machine Shortcut`.
2024-07-17 15:21:38 +01:00
Heiko
0ddff0fcf7 [MWB]Disable settings from old UI that we do not support (#33564)
## Summary of the Pull Request

This PR disables the check boxes for settings that we do not support in
the PowerToys implementation.

![image](https://github.com/microsoft/PowerToys/assets/61519853/da3dadf0-8ba4-4f0f-b491-9ca21b54c20a)

![image](https://github.com/microsoft/PowerToys/assets/61519853/8b561b9f-f4b5-4a5b-b61e-710d5b0f2b61)
2024-07-17 14:51:38 +01:00
Heiko
c87d8c37e1 [Settings]Fix MWB infobars to hide when the module is disabled (#33562)
## Summary of the Pull Request

This PR fixes two bugs for the info bars on the MWB settings page:
- The bars are shown if module is disabled.
- Some bars can be closed.
- Some bars are reacting to tab stop on closed state.
2024-07-17 14:42:22 +01:00
Heiko
c24000ec41 [Enterprise]Reorganize ADMX to make it easier to find some policies (#33529)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

1. The "Allow Experimentation" policy is moved into a new category
"General Settings".

![image](https://github.com/microsoft/PowerToys/assets/61519853/09c77ed5-3e50-470d-bec6-41da1cc363f3)

2. The order of utility policies is changed that the global policy shows
at the top on opening the edit dialog.

![image](https://github.com/microsoft/PowerToys/assets/61519853/34317791-6b2d-487c-b341-bdebdd81e58c)
The oder change does not take any effect in the HTML reports.

![image](https://github.com/microsoft/PowerToys/assets/61519853/0c84cabb-139d-4854-8f73-641d523ca555)

**These changes do not break configured Group Policies. But the changes
WILL BREAK EXISTING INTUNE POLICY CONFIGURATION SETS. **
2024-07-17 14:15:44 +01:00
seraphima
672206d17b Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-17 15:11:43 +02:00
donlaci
9f93e238c3 Fix for packaged app's icons 2024-07-17 14:58:19 +02:00
seraphima
158f4ee222 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-17 14:31:09 +02:00
donlaci
5aa4580bdb fixing: update of listed projects on the main page after hitting save in editor 2024-07-17 13:32:40 +02:00
ARCHISMAN DAS
2ca70e31c9 [Settings]Fix spacing in the update available card (#33198) 2024-07-17 11:32:42 +01:00
Jaime Bernardo
d27ac581ac [Deps]Set System.Text.Json version to 8.0.4 (#33867)
## Summary of the Pull Request

Sets the System.Text.Json version to 8.0.4
2024-07-16 16:17:53 +01:00
Clint Rutkas
5159c76976 [Deps]Upgrade Microsoft.Windows.Compatibility to 8.0.7 (#33851) 2024-07-16 11:57:51 +01:00
donlaci
dcc0634fb1 Implementing Launch and Edit feature 2024-07-16 09:37:40 +02:00
seraphima
d218e36a77 get app elevated property 2024-07-16 07:17:50 +02:00
seraphima
89d6aed118 Revert "Hide Admin checkbox"
This reverts commit 3036df9d7f.
2024-07-15 20:20:26 +02:00
Jaime Bernardo
8d2ee4a8d2 [Docs]Update README for correct 0.82.1 links (#33849)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
We renamed the tag for lower-case v.
2024-07-15 17:57:19 +01:00
seraphima
a7e5c0330b spell-check 2024-07-15 16:47:39 +02:00
seraphima
b5251c27e9 Merge branches 'dev/feature/projects' and 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-15 16:44:56 +02:00
seraphima
16a71e2acd hide WIP 2024-07-15 16:44:52 +02:00
donlaci
3036df9d7f Hide Admin checkbox 2024-07-15 16:37:00 +02:00
seraphima
12308babc7 Merge remote-tracking branch 'microsoft/main' into dev/feature/projects 2024-07-15 15:43:21 +02:00
seraphima
5576c7b23f clean up 2024-07-13 21:07:37 +02:00
Clint Rutkas
5bcc6fbd86 Updated hashes for 82.1 (#33809)
updated hashes
2024-07-12 20:05:20 -07:00
seraphima
8620d80047 launcher project filters 2024-07-11 14:01:15 +02:00
seraphima
be202df44b Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-11 13:35:41 +02:00
donlaci
3fa5aae70c modifying colors 2024-07-11 13:25:47 +02:00
donlaci
dae91d2874 Implementing major new features: remove button, position manipulation, arguments, admin, minimized, maximized 2024-07-11 12:45:19 +02:00
seraphima
2e2e47a039 FZ: ignore projects launched windows 2024-07-10 19:03:36 +02:00
seraphima
06ecbd58b8 set window property after launching 2024-07-10 19:02:52 +02:00
seraphima
fc8918e538 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-09 20:19:48 +02:00
seraphima
f93aa42b19 minimized settings snap fix 2024-07-09 20:19:06 +02:00
seraphima
cbedf45796 get command line args in the snapshot 2024-07-09 20:18:42 +02:00
seraphima
7b8e229544 remove unused from the project 2024-07-09 20:15:57 +02:00
donlaci
d7467e24ae Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-07-09 15:22:57 +02:00
donlaci
c493d27dd3 Remove checkboxes, delete feature 2024-07-09 15:22:10 +02:00
seraphima
b48c8aa80b spell-check 2024-07-09 11:35:32 +02:00
seraphima
deb1680f91 changed project creation save-cancel handles
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
2024-07-04 16:01:07 +02:00
seraphima
647ea2db1e changed project data
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
2024-07-04 16:00:24 +02:00
seraphima
6516af8a7a change snapshot project saving
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
2024-07-04 15:58:14 +02:00
seraphima
d0775dac28 clean up 2024-07-04 12:25:22 +02:00
seraphima
9906141322 launcher resources 2024-07-04 12:24:47 +02:00
seraphima
353aeb268b localizable default project prefix 2024-07-04 12:01:00 +02:00
seraphima
83ee449b1b projects common lib 2024-07-04 11:42:37 +02:00
seraphima
9a3519cd0a refactoring 2024-07-03 14:50:39 +02:00
seraphima
54ed4834a8 clean up 2024-07-02 15:48:06 +02:00
seraphima
c00ed8f996 changed window filter
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/2
2024-07-02 15:47:24 +02:00
seraphima
db8935dca3 refactoring: added utils 2024-07-02 14:26:47 +02:00
seraphima
10a3f1162f get dpi unaware screen bounds 2024-07-01 19:53:26 +02:00
donlaci
fd5e4590d7 Minor fixes in the capture dialog 2024-06-29 11:37:42 +02:00
donlaci
907a6f5ec9 spell checker 2024-06-28 18:07:37 +02:00
donlaci
3ea27571f3 spell checker 2024-06-28 18:03:02 +02:00
donlaci
ed423d8264 Adding helper class for getting the right bounds for screens 2024-06-28 17:58:28 +02:00
donlaci
9733c1035b Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-28 16:15:48 +02:00
donlaci
477094057d Fixing bug: re-draw the preview on app deletion in the editor 2024-06-28 16:15:06 +02:00
seraphima
1912f1c533 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-28 16:12:08 +02:00
donlaci
550f7ec08d modifying highlight for minimized apps 2024-06-28 16:11:10 +02:00
seraphima
aae69ab125 mutex fix 2024-06-28 15:41:26 +02:00
seraphima
8344060e5e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-28 15:40:57 +02:00
donlaci
54a8f47df7 minor bugfix 2024-06-28 15:25:04 +02:00
donlaci
d9e92eca01 Add intermediate step to project creation 2024-06-28 15:00:48 +02:00
seraphima
2643f00fa1 exclude help windows
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/49
2024-06-28 14:50:10 +02:00
seraphima
8f076cb5da Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-28 14:49:30 +02:00
seraphima
9b8d86858f logs 2024-06-28 14:49:20 +02:00
donlaci
c94c0431f4 spell checker 2024-06-28 13:07:30 +02:00
donlaci
64c5439b60 modifying highlight in preview 2024-06-28 13:02:32 +02:00
donlaci
e0bdba9772 Add Checkbox for per monitor selection 2024-06-27 20:10:44 +02:00
donlaci
c4a93d2482 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-27 18:59:12 +02:00
donlaci
4960af8a13 [Projects] Add Select all checkbox, Delete selected button 2024-06-27 18:58:16 +02:00
seraphima
a6b223083c projects editor single instance 2024-06-27 14:02:49 +02:00
seraphima
dc9af4bc30 update packaged apps path 2024-06-26 17:40:57 +02:00
seraphima
18e1d851fe spell-check 2024-06-26 16:20:56 +02:00
seraphima
663b0281c2 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-26 15:56:37 +02:00
seraphima
3c694e428c launch packaged apps using names when possible 2024-06-26 15:56:30 +02:00
Jaime Bernardo
98ef8c4e70 Fix ARM64 CI build 2024-06-26 11:21:13 +01:00
seraphima
c89b4bb9fd fix launching with command line args 2024-06-24 16:34:17 +02:00
donlaci
17a607fda0 [Projects] fix boundary calculation, use DPI aware values 2024-06-24 10:38:08 +02:00
donlaci
371a05ac5e [Projects] Re-implementing preview drawing - one common image 2024-06-24 09:34:47 +02:00
seraphima
65e75d1c42 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-23 23:15:32 +02:00
seraphima
15ae5a03dc app placement 2024-06-23 23:15:26 +02:00
seraphima
f39e4bb058 set awareness 2024-06-23 23:15:06 +02:00
seraphima
0679664d4c unsigned monitor number 2024-06-23 23:14:57 +02:00
seraphima
5e012b8891 added convert rect 2024-06-23 23:11:24 +02:00
seraphima
77c59faa8a moved display utils 2024-06-23 23:10:54 +02:00
seraphima
ed7d3ec973 moved on thread executor to common 2024-06-23 13:17:29 +02:00
donlaci
26bbefa004 [Projects] Removing not selected apps on save 2024-06-20 13:31:56 +02:00
donlaci
e6b56c4152 [Projects] optimizing click handlers 2024-06-20 13:25:32 +02:00
donlaci
4c4630ef75 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-20 13:23:18 +02:00
donlaci
6fc164df98 [Projects] bringing back the breadcrumb on the editor page. Make it clickable. 2024-06-20 13:22:02 +02:00
seraphima
5f42c6ef66 fix placing windows of the same app in the project 2024-06-20 12:54:47 +02:00
seraphima
1e28cb8c40 remove opening the first proj 2024-06-20 12:54:39 +02:00
seraphima
0c83e632ed changed "no projects" text color and position 2024-06-20 11:29:13 +02:00
donlaci
852d67b569 [Projects] Making popup having rounded corners 2024-06-20 11:02:04 +02:00
donlaci
01d6c916d6 [Projects] Adding Edit button to the popup. + minor changes 2024-06-19 15:17:25 +02:00
donlaci
90979cbecb [projects] Adding info message for cases: there are no projects or no results for the search 2024-06-19 14:58:29 +02:00
donlaci
20a7dd4a7f Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-19 12:29:17 +02:00
donlaci
ba19333ad7 [Projects] re-implementing icon size calculation to have similar sized icons for every app. 2024-06-19 12:28:09 +02:00
seraphima
6eafa57c68 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-19 11:17:20 +02:00
seraphima
8c450f3457 spellcheck 2024-06-19 11:16:58 +02:00
donlaci
0137bc9697 spell checker 2024-06-19 11:11:27 +02:00
donlaci
e4ccde49f7 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-19 11:03:55 +02:00
donlaci
0efe6c91e8 [Projects] Editor: brining the highlighted app's icon into the foreground. + minor UI fixes 2024-06-19 11:02:41 +02:00
seraphima
a62d95c8fa shortcut saving fix 2024-06-19 00:06:57 +02:00
seraphima
ba13f5c0c4 update projects names to filter them out 2024-06-18 22:10:48 +02:00
seraphima
bd50d6961d editor dll signing 2024-06-18 16:44:23 +02:00
seraphima
fbb9f4188f spellcheck 2024-06-17 20:40:16 +02:00
seraphima
ae91aa3869 editor version 2024-06-17 20:40:07 +02:00
seraphima
4cccbecf54 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-17 19:57:14 +02:00
seraphima
0e74b2ee6b version 2024-06-17 19:57:09 +02:00
donlaci
f7cab16fb6 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-17 15:22:34 +02:00
donlaci
bfb569e894 Do not allow saving project if name or applist is empty. Also minor UI changes 2024-06-17 15:21:13 +02:00
seraphima
ce39ef2360 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-17 14:09:35 +02:00
seraphima
0c3108bca1 arm build fix 2024-06-17 14:09:31 +02:00
donlaci
28bf6de36c [Projects] fixing general settings gpo handling in runner + minor changes 2024-06-17 10:31:34 +02:00
seraphima
3de23f1c82 guid prefix 2024-06-14 16:26:20 +02:00
seraphima
198b7a6890 Merge remote-tracking branch 'microsoft/main' into dev/feature/projects 2024-06-14 12:52:38 +02:00
seraphima
f9fe9cc204 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-14 12:15:10 +02:00
seraphima
5d09e2e821 pipeline 2024-06-14 12:14:44 +02:00
seraphima
9914d31d6b github 2024-06-14 12:14:13 +02:00
seraphima
add5078f43 dsc 2024-06-14 12:13:41 +02:00
donlaci
68a66ff03d [Projects] Editor: Main page: fix layout if there are many apps, launch button not disappearing on the right side 2024-06-14 11:50:56 +02:00
donlaci
9cac577b7f [Projects] fix grammatical issue #43 (1 app - many apps) 2024-06-14 10:50:26 +02:00
donlaci
cc9b7d62df extend search for projects by search over the containing apps' names 2024-06-14 10:36:09 +02:00
seraphima
27d0620cac exit event constant 2024-06-13 23:11:26 +02:00
seraphima
6a353e0941 gpo 2024-06-13 23:07:43 +02:00
seraphima
73146e844e installer 2024-06-13 22:55:36 +02:00
seraphima
07ab6191d0 bug report tool 2024-06-13 21:52:04 +02:00
seraphima
4a672e2ed5 rename projects editor 2024-06-13 21:30:26 +02:00
seraphima
f869f99144 module interface 2024-06-13 21:30:03 +02:00
seraphima
2493fd6a1a changed the default hotkey 2024-06-13 21:29:08 +02:00
donlaci
64c0ca77bf Adding OOBE Projects page 2024-06-13 17:32:34 +02:00
donlaci
0bdfa32cd0 spell checker 2024-06-13 13:31:06 +02:00
donlaci
8f69109689 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-13 13:24:25 +02:00
donlaci
5abba947d8 adding GPO role + wrappers + GPO-check methods 2024-06-13 13:20:21 +02:00
seraphima
12bc9d7206 spelling 2024-06-13 12:34:08 +02:00
seraphima
a5c21d3432 snapshot logger 2024-06-12 22:00:11 +02:00
seraphima
6bfe924234 remove quotation marks 2024-06-12 21:47:31 +02:00
seraphima
3cc3701465 launcher logger 2024-06-12 21:45:39 +02:00
seraphima
71c7241fe1 common dependencies 2024-06-12 19:31:43 +02:00
seraphima
ae6cb122c8 init projects 2024-06-12 17:52:28 +02:00
seraphima
6fba21d9ad update data folders 2024-06-12 17:52:04 +02:00
seraphima
7e93d1f767 updated app names in editor 2024-06-12 17:45:27 +02:00
seraphima
e08aa76085 changed editor output path 2024-06-12 17:42:38 +02:00
seraphima
e5bbeb738e updated SnapshotTool project 2024-06-12 17:24:50 +02:00
seraphima
404a189c87 update Launcher project 2024-06-12 17:24:19 +02:00
seraphima
26dd8ea18e Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-12 14:13:10 +02:00
seraphima
80f4611b0a shortcut icons 2024-06-12 13:16:34 +02:00
seraphima
a5b69d9be5 optimized launching 2024-06-11 15:43:42 +02:00
donlaci
927ac511c8 First steps toward integration of the projects utility to PT 2024-06-11 13:32:40 +02:00
seraphima
07e0ef8a2c Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-10 15:58:59 +02:00
donlaci
1cf5d88507 minor adjustments on the not found warning icon 2024-06-10 15:57:28 +02:00
seraphima
1a33257314 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-10 14:19:34 +02:00
donlaci
6c7b99fbbc Adding not found icon + logic for not present detection. Moving icon drawing into drawhelper class. adjusting "selected cursor" size for preview drawing 2024-06-10 10:19:57 +02:00
seraphima
29e0bad3ea changed waiting time 2024-06-06 16:47:48 +02:00
seraphima
67a336bc46 checkbox default style 2024-06-05 19:10:50 +02:00
seraphima
40f2572b22 save-cancel buttons style 2024-06-05 19:10:38 +02:00
seraphima
cdb40a91fa remove unused 2024-06-05 19:10:23 +02:00
seraphima
3dea02a981 updated light theme colors 2024-06-05 18:58:30 +02:00
seraphima
4b371726c2 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-05 16:30:37 +02:00
seraphima
93bda77554 removed unused package 2024-06-05 16:30:25 +02:00
seraphima
47ccfde156 removed log 2024-06-05 16:30:14 +02:00
seraphima
782a2e1b1e check single-instance apps running 2024-06-05 16:28:00 +02:00
seraphima
5c600ebc92 moved app utils 2024-06-05 16:27:40 +02:00
donlaci
b07b15cf42 Modifying preview drawing colors for light theme. 2024-06-05 13:58:39 +02:00
donlaci
910b259ce1 fixing colors of the remove button (dark and light mode) 2024-06-05 12:53:59 +02:00
seraphima
3d75b8471c Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-06-05 11:28:45 +02:00
seraphima
f5cc0cba40 detecting and placing new windows 2024-06-05 11:28:35 +02:00
donlaci
449078be8e minor modification in light mode colors 2024-06-05 09:53:01 +02:00
donlaci
690b537e9f spell check 2024-06-04 12:55:05 +02:00
donlaci
af49b36d20 adding shortcut icon drawing. Minor changes 2024-06-04 12:45:50 +02:00
seraphima
9867395b5b moved utils to common 2024-06-03 16:49:08 +02:00
donlaci
cb2a4ec6e9 corrections in the snippet tool.
extending icon handling in the editor: for packaged apps look for the exe in the current path
adding shortcut icon creation.
2024-05-31 19:09:45 +02:00
donlaci
7e80c1bf73 spell checker 2024-05-29 13:51:28 +02:00
donlaci
24add7d4f8 adding dependent projects to the projects solution 2024-05-28 19:43:32 +02:00
donlaci
e11deec96f Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-05-28 18:26:36 +02:00
donlaci
feba2e6f17 adding logs 2024-05-28 18:21:30 +02:00
seraphima
c18c70afdb spellcheck 2024-05-27 21:44:42 +02:00
seraphima
aa788dad04 Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects 2024-05-27 17:01:06 +02:00
seraphima
42905045b4 launch 2024-05-27 16:33:56 +02:00
seraphima
ccaf327baa run launcher 2024-05-27 16:33:30 +02:00
seraphima
6f813d9e66 app name fix 2024-05-27 16:33:13 +02:00
seraphima
2b71d97449 removed hwnd from json 2024-05-27 16:23:03 +02:00
seraphima
9f61f0793d updated app data 2024-05-27 15:15:34 +02:00
seraphima
cc553a60d5 get packaged app info 2024-05-27 15:07:53 +02:00
donlaci
3cd57eee63 creating drawing helper class to separate drawing functionallity 2024-05-24 15:36:01 +02:00
seraphima
6f6c32f989 update packages 2024-05-24 13:50:27 +02:00
seraphima
15c3956eda spelling 2024-05-21 17:48:58 +02:00
seraphima
ce19c4e5ff spelling 2024-05-21 17:45:07 +02:00
seraphima
c157e64f28 Projects 2024-05-21 16:55:15 +02:00
539 changed files with 19092 additions and 3933 deletions

6
.github/CODEOWNERS vendored
View File

@@ -4,7 +4,7 @@
/.github/actions/spell-check/
# locking down pipeline folder
/.pipelines @crutkas @DHowett @ethanfangg
/.pipelines/ @crutkas @DHowett @ethanfangg
# locking down nuget config
nuget.config @crutkas @DHowett @ethanfangg
@@ -12,5 +12,5 @@ packages.config @crutkas @DHowett @ethanfangg
# locking down files that should not change
LICENSE @crutkas @DHowett @ethanfangg
SECURITY.MD @crutkas @DHowett @ethanfangg
CODE_OF_CONDUCT.MD @crutkas @DHowett @ethanfangg
SECURITY.md @crutkas @DHowett @ethanfangg
CODE_OF_CONDUCT.md @crutkas @DHowett @ethanfangg

View File

@@ -76,6 +76,7 @@ body:
- System tray interaction
- TextExtractor
- Video Conference Mute
- Workspaces
- Welcome / PowerToys Tour window
validations:
required: true

View File

@@ -50,6 +50,7 @@ body:
- System tray interaction
- TextExtractor
- Video Conference Mute
- Workspaces
- Welcome / PowerToys Tour window
validations:
required: true

View File

@@ -28,6 +28,7 @@ videoconference
# USERS
8LWXpg
Adoumie
Advaith
alekhyareddy
@@ -143,6 +144,7 @@ TBM
tilovell
Triet
waaverecords
Xpg
ycv
Yuniardi
yuyoyuppe

View File

@@ -56,11 +56,14 @@ APPBARDATA
appdata
APPEXECLINK
Appium
applayout
Applicationcan
APPLICATIONFRAMEHOST
appmanifest
APPNAME
appref
appsettings
appsfolder
appwindow
appwiz
APSTUDIO
@@ -200,6 +203,7 @@ CMINVOKECOMMANDINFO
CMINVOKECOMMANDINFOEX
CMock
CMONITORS
cmph
cmpgt
cne
CNF
@@ -220,7 +224,6 @@ comdlg
comexp
cominterop
commandline
COMMANDTITLE
commctrl
commdlg
compmgmt
@@ -241,9 +244,11 @@ CONTEXTMENUHANDLER
CONTROLL
CONTROLPARENT
copiedcolorrepresentation
COREWINDOW
cotaskmem
COULDNOT
countof
cph
CPower
cppblog
cppruntime
@@ -406,6 +411,7 @@ dxgi
dxgidebug
dxgiformat
dxguid
easeofaccess
ecount
EData
Edid
@@ -428,8 +434,8 @@ ENDSESSION
ENTERSIZEMOVE
ENU
EOAC
epu
EPO
epu
ERASEBKGND
EREOF
EResize
@@ -484,7 +490,6 @@ FILEFLAGSMASK
FILELOCKSMITH
FILELOCKSMITHCONTEXTMENU
FILELOCKSMITHEXT
FILELOCKSMITHLIB
FILELOCKSMITHLIBINTEROP
FILEMUSTEXIST
FILEOP
@@ -500,6 +505,7 @@ findfast
FIXEDFILEINFO
flac
flyouts
FMask
FOF
FOFX
FOLDERID
@@ -521,7 +527,6 @@ GCLP
gdi
gdiplus
GDISCALED
gdnbaselines
GEmoji
GETCLIENTAREAANIMATION
GETDESKWALLPAPER
@@ -541,7 +546,6 @@ gpedit
gpo
GPOCA
gpp
GPT
gpu
GSM
gtm
@@ -673,6 +677,7 @@ imageresizerinput
imageresizersettings
imagingdevices
ime
imperialounce
inetcpl
Infobar
INFOEXAMPLE
@@ -701,7 +706,6 @@ INSTALLSTARTMENUSHORTCUT
INSTALLSTATE
Inste
Intelli
interactable
Interlop
INTRESOURCE
INVALIDARG
@@ -730,7 +734,6 @@ IWeb
IWIC
iwr
IYUV
JArray
jfi
jfif
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
@@ -760,8 +763,8 @@ keyremaps
keyvault
KILLFOCUS
killrunner
kmph
Knownfolders
ksh
KSPROPERTY
Kybd
languagesjson
@@ -797,7 +800,6 @@ LOADFROMFILE
LOBYTE
LOCALDISPLAY
LOCALPACKAGE
localport
LOCALSYSTEM
LOCATIONCHANGE
LOGFONT
@@ -811,6 +813,7 @@ LOWORD
lparam
LPBITMAPINFOHEADER
LPCITEMIDLIST
lpcmi
LPCMINVOKECOMMANDINFO
LPCREATESTRUCT
LPCRECT
@@ -835,9 +838,11 @@ lptpm
LPTR
LPTSTR
LPW
lpwcx
lpwndpl
LReader
LRESULT
LSTATUS
lstrcmp
lstrcmpi
lstrlen
@@ -852,10 +857,10 @@ lwin
LZero
majortype
makecab
MAKELANGID
MAKEINTRESOURCE
MAKEINTRESOURCEA
MAKEINTRESOURCEW
MAKELANGID
makepri
manifestdependency
MAPPEDTOSAMEKEY
@@ -875,7 +880,6 @@ mdwn
MEDIASUBTYPE
mediatype
mef
MENUBREAK
MENUITEMINFO
MENUITEMINFOW
MERGECOPY
@@ -1038,6 +1042,7 @@ NOSEARCH
NOSENDCHANGING
NOSIZE
NOTIFICATIONSDLL
NOTIFYICONDATA
NOTIFYICONDATAW
NOTIMPL
notlike
@@ -1074,7 +1079,6 @@ oldtheme
oleaut
OLECHAR
onebranch
OOBEPT
opencode
OPENFILENAME
opensource
@@ -1098,7 +1102,6 @@ OVERLAPPEDWINDOW
overlaywindow
Oversampling
OWNDC
OWNERDRAW
Packagemanager
PACL
PAINTSTRUCT
@@ -1112,7 +1115,6 @@ PARTIALCONFIRMATIONDIALOGTITLE
PATCOPY
pathcch
PATHMUSTEXIST
Pathto
PATINVERT
PATPAINT
PAUDIO
@@ -1161,6 +1163,7 @@ ploca
plocm
pluginsmodel
PMSIHANDLE
pnid
Pnp
Popups
POPUPWINDOW
@@ -1212,6 +1215,8 @@ projectname
PROPBAG
PROPERTYKEY
propkey
propsys
PROPVARIANT
propvarutil
prvpane
psapi
@@ -1253,8 +1258,6 @@ QUERYENDSESSION
QUERYOPEN
QUEUESYNC
QUNS
qwertyuiopasdfghjklzxcvbnm
qwrtyuiopsghjklzxvnm
raf
RAII
RAlt
@@ -1271,7 +1274,6 @@ RECTDESTINATION
rectp
RECTSOURCE
recyclebin
redirectedfrom
Redist
redistributable
reencode
@@ -1353,8 +1355,6 @@ runas
rundll
rungameid
RUNLEVEL
runsettings
runspace
runtimeclass
runtimeobject
runtimepack
@@ -1375,12 +1375,14 @@ SCID
Scip
scipbe
Scode
screensaver
screenshots
scrollviewer
sddl
SDKDDK
sdns
searchterm
SEARCHUI
secpol
SENDCHANGE
sendinput
@@ -1564,7 +1566,9 @@ SYSKEYUP
SYSLIB
SYSMENU
SYSTEMAPPS
systemsettings
SYSTEMTIME
SYSTEMWOW
tapp
TApplication
TApplied
@@ -1587,7 +1591,6 @@ TDevice
telem
telephon
templatenamespace
testhost
testprocess
TEXCOORD
TEXTEXTRACTOR
@@ -1612,7 +1615,6 @@ tlb
tlbimp
TMPVAR
TNP
toggleswitch
Toolhelp
toolkitconverters
Toolset
@@ -1642,9 +1644,11 @@ TYPESHORTCUT
UAC
UAL
uap
UCallback
udit
uefi
uesc
UFlags
UHash
UIA
UIEx
@@ -1676,12 +1680,16 @@ urlmon
Usb
USEDEFAULT
USEFILEATTRIBUTES
USEPOSITION
USERDATA
Userenv
USESHOWWINDOW
USESIZE
USESTDHANDLES
usounce
USRDLL
UType
uuidv
uwp
uxtheme
vabdq
@@ -1717,6 +1725,7 @@ vih
VIRTUALDESK
visiblecolorformats
Visibletrue
visualeffects
VKey
vmovl
vorrq
@@ -1743,6 +1752,7 @@ vswhere
Vtbl
WANTPALM
wbem
Wbemidl
wbemuuid
WBounds
Wca
@@ -1830,6 +1840,9 @@ WNDCLASSEXW
WNDCLASSW
WNDPROC
workarounds
WORKSPACESEDITOR
WORKSPACESLAUNCHER
WORKSPACESSNAPSHOTTOOL
wox
wparam
wpf

View File

@@ -24,7 +24,7 @@ jobs:
$installerMachineX64Url = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'PowerToysSetup.*x64' | Select -ExpandProperty browser_download_url
$installerUserArmUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'PowerToysUserSetup.*arm64' | Select -ExpandProperty browser_download_url
$installerMachineArmUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'PowerToysSetup.*arm64' | Select -ExpandProperty browser_download_url
$ver = $targetRelease.tag_name.Trim("v")
$ver = $targetRelease.tag_name -ireplace '^v'
# getting latest wingetcreate file
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe

View File

@@ -1,33 +0,0 @@
name: GitGudSimilarIssues comments
on:
issues:
types: [opened]
jobs:
getSimilarIssues:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.getBody.outputs.message }}
steps:
- id: getBody
uses: craigloewen-msft/GitGudSimilarIssues@main
with:
issueTitle: ${{ github.event.issue.title }}
issueBody: ${{ github.event.issue.body }}
repo: ${{ github.repository }}
similarityTolerance: "0.75"
add-comment:
needs: getSimilarIssues
runs-on: ubuntu-latest
permissions:
issues: write
if: needs.getSimilarIssues.outputs.message != ''
steps:
- name: Add comment
run: gh issue comment "$NUMBER" --repo "$REPO" --body "$BODY"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
REPO: ${{ github.repository }}
BODY: ${{ needs.getSimilarIssues.outputs.message }}

View File

@@ -189,6 +189,14 @@
"WinUI3Apps\\PowerToys.PowerRenameContextMenu.dll",
"WinUI3Apps\\PowerRenameContextMenuPackage.msix",
"PowerToys.WorkspacesSnapshotTool.exe",
"PowerToys.WorkspacesLauncher.exe",
"PowerToys.WorkspacesEditor.exe",
"PowerToys.WorkspacesEditor.dll",
"PowerToys.WorkspacesLauncherUI.exe",
"PowerToys.WorkspacesLauncherUI.dll",
"PowerToys.WorkspacesModuleInterface.dll",
"WinUI3Apps\\PowerToys.RegistryPreviewExt.dll",
"WinUI3Apps\\PowerToys.RegistryPreviewUILib.dll",
"WinUI3Apps\\PowerToys.RegistryPreview.dll",

View File

@@ -246,7 +246,7 @@ steps:
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/*.trx'
condition: always()
condition: ne(variables['BuildPlatform'],'arm64')
# Native dlls
- task: VSTest@2

View File

@@ -41,7 +41,13 @@ Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZone
$dllName = Split-Path $_.Name -leaf
if([bool]($_.Value.PSObject.Properties.name -match 'fileVersion')) {
$dllFileVersion = $_.Value.fileVersion
if ([string]::IsNullOrEmpty($dllFileVersion) -and $dllName.StartsWith('PowerToys.'))` {
# After VS 17.11 update some of PowerToys dlls have no fileVersion in deps.json even though the
# version is correctly set. This is a workaround to skip our dlls as we are confident that all of
# our dlls share the same version across the dependencies.
continue
}
# Add the entry to the dictionary of dictionary of lists
if(-Not $referencedFileVersionsPerDll.ContainsKey($dllName)) {
$referencedFileVersionsPerDll[$dllName] = @{ $dllFileVersion = New-Object System.Collections.Generic.List[System.String] }

View File

@@ -33,6 +33,7 @@
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
<PreferredToolArchitecture Condition="'$(PROCESSOR_ARCHITECTURE)' == 'ARM64' or '$(PROCESSOR_ARCHITEW6432)' == 'ARM64'">arm64</PreferredToolArchitecture>
<VcpkgEnabled>false</VcpkgEnabled>
<ReplaceWildcardsInProjectItems>true</ReplaceWildcardsInProjectItems>
<ExternalIncludePath>$(MSBuildThisFileFullPath)\..\deps\;$(MSBuildThisFileFullPath)\..\packages\;$(ExternalIncludePath)</ExternalIncludePath>
<!-- Enable control flow guard for C++ projects that don't consume any C++ files -->
<!-- This covers the case where a .dll exports a .lib, but doesn't have any ClCompile entries. -->

View File

@@ -1,27 +1,28 @@
<Project>
<Import Project="src\Version.props" />
<PropertyGroup>
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
<AssemblyCopyright>Copyright (C) Microsoft Corporation. All rights reserved.</AssemblyCopyright>
<AssemblyProduct>PowerToys</AssemblyProduct>
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
<Company>Microsoft Corporation</Company>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<NeutralLanguage>en-US</NeutralLanguage>
<Platforms>x64;ARM64</Platforms>
<PackageTags>PowerToys</PackageTags>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Recommended</AnalysisMode>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
<NuGetAuditMode>direct</NuGetAuditMode>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
<PlatformTarget>$(Platform)</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<Version>$(Version).0</Version>
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
@@ -34,7 +35,7 @@
<PackageReference Include="StyleCop.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</PackageReference>
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
@@ -85,7 +86,7 @@
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
<!-- Change this to bust the cache -->
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202407100737</MSBuildCacheCacheUniverse>
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408150737</MSBuildCacheCacheUniverse>
<!--
Visual Studio telemetry reads various ApplicationInsights.config files and other files after the project is finished, likely in a detached process.

View File

@@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
@@ -17,44 +17,36 @@
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
<PackageVersion Include="ControlzEx" Version="6.0.0" />
<PackageVersion Include="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
<PackageVersion Include="HelixToolkit" Version="2.24.0" />
<PackageVersion Include="HelixToolkit.Core.Wpf" Version="2.24.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.57" />
<PackageVersion Include="hyjiacan.pinyin4net" Version="4.1.1" />
<PackageVersion Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" />
<PackageVersion Include="LazyCache" Version="2.4.0" />
<PackageVersion Include="Mages" Version="2.0.2" />
<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.0" />
<PackageVersion Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.7" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2365.46" />
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.1" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.7" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.8" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
<!-- Moq to stay below v4.20 due to behavior change. need to be sure fixed -->
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.2.0" />
<PackageVersion Include="MSTest.TestFramework" Version="3.2.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="MSTest" Version="3.5.0" />
<PackageVersion Include="NLog" Version="5.0.4" />
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.8" />
<PackageVersion Include="NLog.Schema" Version="5.2.8" />
@@ -79,17 +71,16 @@
<PackageVersion Include="System.IO.Abstractions" Version="17.2.3" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageVersion Include="System.Management" Version="8.0.0" />
<PackageVersion Include="System.Reactive" Version="6.0.0-preview.9" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="System.Runtime.Caching" Version="8.0.0" />
<!-- Package System.Security.Cryptography.ProtectedData added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Data.OleDb but the 8.0.1 version wasn't published to nuget. -->
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="8.0.0" />
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
<PackageVersion Include="UnitsNet" Version="5.50.0" />
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
<PackageVersion Include="WinUIEx" Version="2.2.0" />
<PackageVersion Include="WPF-UI" Version="3.0.0" />
</ItemGroup>
@@ -98,4 +89,4 @@
<PackageVersion Include="Microsoft.VariantAssignment.Client" Version="2.4.17140001" />
<PackageVersion Include="Microsoft.VariantAssignment.Contract" Version="3.0.16990001" />
</ItemGroup>
</Project>
</Project>

View File

@@ -1318,28 +1318,25 @@ EXHIBIT A -Mozilla Public License.
- Mages 2.0.2
- Markdig.Signed 0.34.0
- Microsoft.CodeAnalysis.NetAnalyzers 8.0.0
- Microsoft.Data.Sqlite 8.0.0
- Microsoft.Data.Sqlite 8.0.7
- Microsoft.Extensions.DependencyInjection 8.0.0
- Microsoft.Extensions.Hosting 8.0.0
- Microsoft.Extensions.Hosting.WindowsServices 8.0.0
- Microsoft.Extensions.Logging 8.0.0
- Microsoft.Extensions.Logging.Abstractions 8.0.0
- Microsoft.NET.Test.Sdk 17.8.0
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
- Microsoft.Web.WebView2 1.0.2365.46
- Microsoft.Win32.SystemEvents 8.0.0
- Microsoft.Windows.Compatibility 8.0.1
- Microsoft.Windows.Compatibility 8.0.7
- Microsoft.Windows.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.0.4
- Microsoft.Windows.CsWinRT 2.0.8
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
- Microsoft.Windows.SDK.Contracts 10.0.19041.1
- Microsoft.WindowsAppSDK 1.5.240428000
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
- ModernWpfUI 0.9.4
- Moq 4.18.4
- MSTest.TestAdapter 3.2.0
- MSTest.TestFramework 3.2.0
- MSTest 3.5.0
- NLog.Extensions.Logging 5.3.8
- NLog.Schema 5.2.8
- ReverseMarkdown 4.1.0
@@ -1359,15 +1356,14 @@ EXHIBIT A -Mozilla Public License.
- System.IO.Abstractions 17.2.3
- System.IO.Abstractions.TestingHelpers 17.2.3
- System.Management 8.0.0
- System.Reactive 6.0.0-preview.9
- System.Reactive 6.0.1
- System.Runtime.Caching 8.0.0
- System.Security.Cryptography.ProtectedData 8.0.0
- System.ServiceProcess.ServiceController 8.0.0
- System.Text.Encoding.CodePages 8.0.0
- System.Text.Json 8.0.4
- UnicodeInformation 2.6.0
- UnitsNet 5.50.0
- UTF.Unknown 2.5.1
- Vanara.PInvoke.Shell32 3.4.11
- Vanara.PInvoke.User32 3.4.11
- WinUIEx 2.2.0
- WPF-UI 3.0.0

View File

@@ -171,19 +171,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
src\.editorconfig = src\.editorconfig
.vsconfig = .vsconfig
src\Common.Dotnet.CsWinRT.props = src\Common.Dotnet.CsWinRT.props
src\Common.SelfContained.props = src\Common.SelfContained.props
Cpp.Build.props = Cpp.Build.props
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
Solution.props = Solution.props
src\Version.props = src\Version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Settings.UI.Library", "src\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj", "{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerToys.Interop", "src\common\interop\PowerToys.Interop.vcxproj", "{F055103B-F80B-4D0C-BF48-057C55620033}"
ProjectSection(ProjectDependencies) = postProject
{CC6E41AC-8174-4E8A-8D22-85DD7F4851DF} = {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Plugin.Folder", "src\modules\launcher\Plugins\Microsoft.Plugin.Folder\Microsoft.Plugin.Folder.csproj", "{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerLauncher.Telemetry", "src\modules\launcher\PowerLauncher.Telemetry\PowerLauncher.Telemetry.csproj", "{08C8C05F-0362-41BC-818C-724572DF8B06}"
@@ -278,6 +277,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{B39DC643
src\common\utils\modulesRegistry.h = src\common\utils\modulesRegistry.h
src\common\utils\MsiUtils.h = src\common\utils\MsiUtils.h
src\common\utils\MsWindowsSettings.h = src\common\utils\MsWindowsSettings.h
src\common\utils\OnThreadExecutor.h = src\common\utils\OnThreadExecutor.h
src\common\utils\os-detect.h = src\common\utils\os-detect.h
src\common\utils\package.h = src\common\utils\package.h
src\common\utils\ProcessWaiter.h = src\common\utils\ProcessWaiter.h
@@ -457,7 +457,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithExt", "src\mod
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileLocksmithUI", "src\modules\FileLocksmith\FileLocksmithUI\FileLocksmithUI.csproj", "{E69B044A-2F8A-45AA-AD0B-256C59421807}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithLibInterop", "src\modules\FileLocksmith\FileLocksmithLibInterop\FileLocksmithLibInterop.vcxproj", "{C604B37E-9D0E-4484-8778-E8B31B0E1B3A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerToys.FileLocksmithLib.Interop", "src\modules\FileLocksmith\FileLocksmithLibInterop\FileLocksmithLibInterop.vcxproj", "{C604B37E-9D0E-4484-8778-E8B31B0E1B3A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPOWrapper", "src\common\GPOWrapper\GPOWrapper.vcxproj", "{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}"
EndProject
@@ -582,6 +582,39 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerToys.Settings.DSC.Sche
{020A7474-3601-4160-A159-D7B70B77B15F} = {020A7474-3601-4160-A159-D7B70B77B15F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerToys.Interop", "src\common\interop\PowerToys.Interop.vcxproj", "{F055103B-F80B-4D0C-BF48-057C55620033}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workspaces", "Workspaces", "{A2221D7E-55E7-4BEA-90D1-4F162D670BBF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workspaces-common", "workspaces-common", "{BE126CBB-AE12-406A-9837-A05ACFCA57A7}"
ProjectSection(SolutionItems) = preProject
src\modules\Workspaces\workspaces-common\GuidUtils.h = src\modules\Workspaces\workspaces-common\GuidUtils.h
src\modules\Workspaces\workspaces-common\InvokePoint.h = src\modules\Workspaces\workspaces-common\InvokePoint.h
src\modules\Workspaces\workspaces-common\MonitorEnumerator.h = src\modules\Workspaces\workspaces-common\MonitorEnumerator.h
src\modules\Workspaces\workspaces-common\MonitorUtils.h = src\modules\Workspaces\workspaces-common\MonitorUtils.h
src\modules\Workspaces\workspaces-common\VirtualDesktop.h = src\modules\Workspaces\workspaces-common\VirtualDesktop.h
src\modules\Workspaces\workspaces-common\WindowEnumerator.h = src\modules\Workspaces\workspaces-common\WindowEnumerator.h
src\modules\Workspaces\workspaces-common\WindowFilter.h = src\modules\Workspaces\workspaces-common\WindowFilter.h
src\modules\Workspaces\workspaces-common\WindowUtils.h = src\modules\Workspaces\workspaces-common\WindowUtils.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowProperties", "WindowProperties", "{14CB58B7-D280-4A7A-95DE-4B2DF14EA000}"
ProjectSection(SolutionItems) = preProject
src\modules\Workspaces\WindowProperties\WorkspacesWindowPropertyUtils.h = src\modules\Workspaces\WindowProperties\WorkspacesWindowPropertyUtils.h
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesLib", "src\modules\Workspaces\WorkspacesLib\WorkspacesLib.vcxproj", "{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkspacesLauncherUI", "src\modules\Workspaces\WorkspacesLauncherUI\WorkspacesLauncherUI.csproj", "{9C53CC25-0623-4569-95BC-B05410675EE3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesModuleInterface", "src\modules\Workspaces\WorkspacesModuleInterface\WorkspacesModuleInterface.vcxproj", "{45285DF2-9742-4ECA-9AC9-58951FC26489}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesSnapshotTool", "src\modules\Workspaces\WorkspacesSnapshotTool\WorkspacesSnapshotTool.vcxproj", "{3D63307B-9D27-44FD-B033-B26F39245B85}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkspacesEditor", "src\modules\Workspaces\WorkspacesEditor\WorkspacesEditor.csproj", "{367D7543-7DBA-4381-99F1-BF6142A996C4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesLauncher", "src\modules\Workspaces\WorkspacesLauncher\WorkspacesLauncher.vcxproj", "{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@@ -952,16 +985,6 @@ Global
{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.ActiveCfg = Release|x64
{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.Build.0 = Release|x64
{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x86.ActiveCfg = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM64.Build.0 = Debug|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x86.ActiveCfg = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM64.ActiveCfg = Release|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM64.Build.0 = Release|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.ActiveCfg = Release|x64
{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|ARM64.ActiveCfg = Debug|ARM64
{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|ARM64.Build.0 = Debug|ARM64
{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.ActiveCfg = Debug|x64
@@ -2598,6 +2621,90 @@ Global
{1D6893CB-BC0C-46A8-A76C-9728706CA51A}.Release|x64.Build.0 = Release|x64
{1D6893CB-BC0C-46A8-A76C-9728706CA51A}.Release|x86.ActiveCfg = Release|x64
{1D6893CB-BC0C-46A8-A76C-9728706CA51A}.Release|x86.Build.0 = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM64.Build.0 = Debug|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x86.ActiveCfg = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x86.Build.0 = Debug|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM64.ActiveCfg = Release|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM64.Build.0 = Release|ARM64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.ActiveCfg = Release|x64
{F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.Build.0 = Release|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|ARM64.Build.0 = Debug|ARM64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|x64.ActiveCfg = Debug|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|x64.Build.0 = Debug|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|x86.ActiveCfg = Debug|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|x86.Build.0 = Debug|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|ARM64.ActiveCfg = Release|ARM64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|ARM64.Build.0 = Release|ARM64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|x64.ActiveCfg = Release|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|x64.Build.0 = Release|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|x86.ActiveCfg = Release|x64
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Release|x86.Build.0 = Release|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|ARM64.Build.0 = Debug|ARM64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|x64.ActiveCfg = Debug|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|x64.Build.0 = Debug|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|x86.ActiveCfg = Debug|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Debug|x86.Build.0 = Debug|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|ARM64.ActiveCfg = Release|ARM64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|ARM64.Build.0 = Release|ARM64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|x64.ActiveCfg = Release|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|x64.Build.0 = Release|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|x86.ActiveCfg = Release|x64
{9C53CC25-0623-4569-95BC-B05410675EE3}.Release|x86.Build.0 = Release|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|ARM64.ActiveCfg = Debug|ARM64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|ARM64.Build.0 = Debug|ARM64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|x64.ActiveCfg = Debug|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|x64.Build.0 = Debug|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|x86.ActiveCfg = Debug|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Debug|x86.Build.0 = Debug|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|ARM64.ActiveCfg = Release|ARM64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|ARM64.Build.0 = Release|ARM64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|x64.ActiveCfg = Release|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|x64.Build.0 = Release|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|x86.ActiveCfg = Release|x64
{45285DF2-9742-4ECA-9AC9-58951FC26489}.Release|x86.Build.0 = Release|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|ARM64.ActiveCfg = Debug|ARM64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|ARM64.Build.0 = Debug|ARM64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|x64.ActiveCfg = Debug|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|x64.Build.0 = Debug|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|x86.ActiveCfg = Debug|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Debug|x86.Build.0 = Debug|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|ARM64.ActiveCfg = Release|ARM64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|ARM64.Build.0 = Release|ARM64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|x64.ActiveCfg = Release|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|x64.Build.0 = Release|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|x86.ActiveCfg = Release|x64
{3D63307B-9D27-44FD-B033-B26F39245B85}.Release|x86.Build.0 = Release|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|ARM64.ActiveCfg = Debug|ARM64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|ARM64.Build.0 = Debug|ARM64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|x64.ActiveCfg = Debug|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|x64.Build.0 = Debug|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|x86.ActiveCfg = Debug|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Debug|x86.Build.0 = Debug|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|ARM64.ActiveCfg = Release|ARM64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|ARM64.Build.0 = Release|ARM64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|x64.ActiveCfg = Release|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|x64.Build.0 = Release|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|x86.ActiveCfg = Release|x64
{367D7543-7DBA-4381-99F1-BF6142A996C4}.Release|x86.Build.0 = Release|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|ARM64.ActiveCfg = Debug|ARM64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|ARM64.Build.0 = Debug|ARM64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|x64.ActiveCfg = Debug|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|x64.Build.0 = Debug|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|x86.ActiveCfg = Debug|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Debug|x86.Build.0 = Debug|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|ARM64.ActiveCfg = Release|ARM64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|ARM64.Build.0 = Release|ARM64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|x64.ActiveCfg = Release|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|x64.Build.0 = Release|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|x86.ActiveCfg = Release|x64
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2644,7 +2751,6 @@ Global
{748417CA-F17E-487F-9411-CAFB6D3F4877} = {2F305555-C296-497E-AC20-5FA1B237996A}
{217DF501-135C-4E38-BFC8-99D4821032EA} = {2F305555-C296-497E-AC20-5FA1B237996A}
{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A} = {C3081D9A-1586-441A-B5F4-ED815B3719C1}
{F055103B-F80B-4D0C-BF48-057C55620033} = {5A7818A8-109C-4E1C-850D-1A654E234B0E}
{787B8AA6-CA93-4C84-96FE-DF31110AD1C4} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
{08C8C05F-0362-41BC-818C-724572DF8B06} = {C140A3EF-6DBF-4084-9D4C-4EB5A99FEE68}
{5D00D290-4016-4CFE-9E41-1E7C724509BA} = {1AFB6476-670D-4E80-A464-657E01DFF482}
@@ -2814,6 +2920,16 @@ Global
{3A9A791E-94A9-49F8-8401-C11CE288D5FB} = {D1D6BC88-09AE-4FB4-AD24-5DED46A791DD}
{C0974915-8A1D-4BF0-977B-9587D3807AB7} = {D1D6BC88-09AE-4FB4-AD24-5DED46A791DD}
{1D6893CB-BC0C-46A8-A76C-9728706CA51A} = {557C4636-D7E1-4838-A504-7D19B725EE95}
{F055103B-F80B-4D0C-BF48-057C55620033} = {5A7818A8-109C-4E1C-850D-1A654E234B0E}
{A2221D7E-55E7-4BEA-90D1-4F162D670BBF} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
{BE126CBB-AE12-406A-9837-A05ACFCA57A7} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{14CB58B7-D280-4A7A-95DE-4B2DF14EA000} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{9C53CC25-0623-4569-95BC-B05410675EE3} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{45285DF2-9742-4ECA-9AC9-58951FC26489} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{3D63307B-9D27-44FD-B033-B26F39245B85} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{367D7543-7DBA-4381-99F1-BF6142A996C4} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
{2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}

173
README.md
View File

@@ -8,8 +8,8 @@
| Architecture | Solution (Main) | Solution (Stable) | Installer (Main) |
|--------------|-----------------|-------------------|------------------|
| x64 | [![Build Status for Main](https://dev.azure.com/ms/PowerToys/_apis/build/status/microsoft.PowerToys?branchName=main&jobName=Build%20x64%20Release)](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=main&jobName=Build%20x64%20Release) | [![Build Status for Stable](https://dev.azure.com/ms/PowerToys/_apis/build/status/microsoft.PowerToys?branchName=stable&jobName=Build%20x64%20Release)](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=stable) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_x64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
| ARM64 | [![Build Status for Main](https://dev.azure.com/ms/PowerToys/_apis/build/status/microsoft.PowerToys?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=main) | [![Build Status for Main](https://dev.azure.com/ms/PowerToys/_apis/build/status/microsoft.PowerToys?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=stable) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_arm64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
| x64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=stable&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=stable) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_x64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
| ARM64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_arm64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
## About
@@ -41,19 +41,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
<!-- items that need to be updated release to release -->
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.83%22
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.82%22
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.82.0/PowerToysUserSetup-0.82.0-x64.exe
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.82.0/PowerToysUserSetup-0.82.0-arm64.exe
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.82.0/PowerToysSetup-0.82.0-x64.exe
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.82.0/PowerToysSetup-0.82.0-arm64.exe
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.84%22
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.83%22
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysUserSetup-0.83.0-x64.exe
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysUserSetup-0.83.0-arm64.exe
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysSetup-0.83.0-x64.exe
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysSetup-0.83.0-arm64.exe
| Description | Filename | sha256 hash |
|----------------|----------|-------------|
| Per user - x64 | [PowerToysUserSetup-0.82.0-x64.exe][ptUserX64] | 295E2A4622C7E347D3E1BAEA6B36BECC328B566496678F1F87DE3F8A12A7F89A |
| Per user - ARM64 | [PowerToysUserSetup-0.82.0-arm64.exe][ptUserArm64] | 55D25D068C6148F0A15C7806B9F813224ABA9C461943F42BB2A8B0E22D28240C |
| Machine wide - x64 | [PowerToysSetup-0.82.0-x64.exe][ptMachineX64] | 01B59C00BB43C25BEFEF274755875717AB4DEAB57C0354AB96CF5B1DA4837C9A |
| Machine wide - ARM64 | [PowerToysSetup-0.82.0-arm64.exe][ptMachineArm64] | 1F642B50962516127793C4D3556BF4FC24B9738BAC2F362CAA3BFF8B0C3AF97F |
| Per user - x64 | [PowerToysUserSetup-0.83.0-x64.exe][ptUserX64] | C78E24F21C611F2BD774D8460ADD4B9AC8519085CA1253941CB46129331AB8C8 |
| Per user - ARM64 | [PowerToysUserSetup-0.83.0-arm64.exe][ptUserArm64] | BA1C16003D55587D523A41B960D4A03718123CA37577D5F2A75E151D7653E6D3 |
| Machine wide - x64 | [PowerToysSetup-0.83.0-x64.exe][ptMachineX64] | 7EC435A10849187D21A383E56A69213C1FF110B7FECA65900D9319D2F8162F35 |
| Machine wide - ARM64 | [PowerToysSetup-0.83.0-arm64.exe][ptMachineArm64] | 5E147424D1D12DFCA88DC4AA0657B7CC1F3B02812F1EBA3E564FAF691908D840 |
This is our preferred method.
@@ -99,131 +99,112 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
### 0.82 - June 2024 Update
### 0.83 - July 2024 Update
In this release, we focused on stability and improvements.
**Highlights**
- New feature added to PowerRename to allow using sequences of random characters and UUIDs when renaming files. Thanks [@jhirvioja](https://github.com/jhirvioja)!
- Improvements in the Paste As JSON feature to better handle other CSV delimiters and converting from ini files. Thanks [@htcfreek](https://github.com/htcfreek)!
- Fixed UI issues that were reported after upgrading to WPF UI on Color Picker and PowerToys Run.
- Bug fixes and stability.
- Awake Quality of Life changes, including changing the tray icon to reflect the current mode. Thanks [@dend](https://github.com/dend)!
- Changes to general GPO policies and new policies for Mouse Without Borders. The names for some intune policy configuration sets might need to be updated as seen in https://github.com/MicrosoftDocs/windows-dev-docs/pull/5045/files . Thanks [@htcfreek](https://github.com/htcfreek)!
### General
- Reordered GPO policies, making it easier to find some policies. Thanks [@htcfreek](https://github.com/htcfreek)!
### Advanced Paste
- Fixed an issue causing external applications triggering Advanced Paste. (This was a hotfix for 0.81)
- Added a GPO rule to disallow using online models in Advanced Paste. (This was a hotfix for 0.81)
- Improved CSV delimiter handling and plain text parsing for the Paste as JSON feature. Thanks [@htcfreek](https://github.com/htcfreek)!
- Added support to convert from ini in the Paste as JSON feature. Thanks [@htcfreek](https://github.com/htcfreek)!
- Fixed a memory leak caused by images not being properly cleaned out from clipboard history.
- Added an option to hide the UI when it loses focus. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Improved telemetry to get better data about token usage and if clipboard history is a popular feature. Thanks [@craigloewen-msft](https://github.com/craigloewen-msft)!
- Fixed CSV parser to support double quotes and escape delimiters when pasting as JSON. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
- Improved double quote handling in the CSV parser when pasting as JSON. Thanks [@htcfreek](https://github.com/htcfreek)!
### Awake
- Different modes will now show different icons in the system tray. Thanks [@dend](https://github.com/dend), and [@niels9001](https://github.com/niels9001) for the icon design!
- Removed the dependency on Windows Forms and used native Win32 APIs instead for the tray icon. Thanks [@dend](https://github.com/dend) and [@BrianPeek](https://github.com/BrianPeek)!
- Fixed an issue where the UI would become non-responsive after selecting no time for the timed mode. Thanks [@dend](https://github.com/dend)!
- Refactored code for easier maintenance. Thanks [@dend](https://github.com/dend)!
- The tray icon will now be shown when running Awake standalone to signal mode. Thanks [@dend](https://github.com/dend)!
- The tray icon tooltip shows how much time is left on the timer. Thanks [@dend](https://github.com/dend)!
- Added DPI awareness to the tray icon context menu. Thanks [@dend](https://github.com/dend)!
### Color Picker
- Fixed the opaque background corners in the picker that were introduced after the upgrade to WPFUI.
### Developer Files Preview (Monaco)
- Improved the syntax highlight for .gitignore files. Thanks [@PesBandi](https://github.com/PesBandi)!
- Checking for the sticky scroll option in code behind was being done twice. Removed one of the checks. Thanks [@downarowiczd](https://github.com/downarowiczd)!
### Environment Variables Editor
- Added clarity to the UI section tooltips. Thanks [@anson-poon](https://github.com/anson-poon)!
- Added support to using the mouse wheel to scroll through the color history. Thanks [@Fefedu973](https://github.com/Fefedu973)!
### File Explorer add-ons
- Fixed a crash when the preview handlers received a 64-bit handle from the OS. Thanks [@z4pf1sh](https://github.com/z4pf1sh)!
- Fixed a crash when trying to update window bounds and File Explorer already disposed the preview.
- Allow copying from the right-click menu in Monaco and Markdown previewers.
### Find My Mouse
### File Locksmith
- Added the option to have to use the Windows + Control keys to activate. Thanks [@Gentoli](https://github.com/Gentoli)!
### Hosts File Editor
- Improved spacing definitions in the UI so that hosts name are not hidden when resizing and icons are well aligned. Thanks [@htcfreek](https://github.com/htcfreek)!
- Changed the additional lines dialog to show the horizontal scrollbar instead of wrapping contents. Thanks [@htcfreek](https://github.com/htcfreek)!
- Improved the duplication check's logic to improve performance and take into account features that were introduced after it. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed a crash when there were a big number of entries being shown by moving the opened files of a process to another dialog.
### Installer
- Fixed the remaining install failures when the folders the DSC module is to be installed in isn't accessible by the WiX installer for user scope installations.
- Fixed an issue causing ARM 64 uninstall process to not correctly finding powershell 7 to run uninstall scripts.
- Fixed the path where DSC module files were installed for the user-scope installer. (This was a hotfix for 0.82)
### Mouse Without Borders
- Disabled non supported options in the old Mouse Without Borders UI. Thanks [@htcfreek](https://github.com/htcfreek)!
- Added new GPO policies to control the use of some features. Thanks [@htcfreek](https://github.com/htcfreek)!
### Peek
- Prevent activating Peek when the user is renaming a file. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Added support to preview special folders like Recycle Bin and My PC instead of throwing an error.
- Fixed a crash caused by double releasing a COM object from the module interface.
### Power Rename
- Improved apostrophe character handling for the Capitalize and Titlecase renaming flags. Thanks [@anthonymonforte](https://github.com/anthonymonforte)!
- Added a feature to allow using sequences of random characters or UUIDs when renaming files. Thanks [@jhirvioja](https://github.com/jhirvioja)!
- Allow copying from the right-click menu in Dev files and Markdown previews.
### PowerToys Run
- Improved the plugin descriptions for consistency in the UI. Thanks [@HydroH](https://github.com/HydroH)!
- Fixed UI scaling for different dpi scenarios.
- Fixed crash on a racing condition when updating UWP icon paths in the Program plugin. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed PowerToys Run hanging when trying to close an unresponsive window in the WindowWalker plugin. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
- Fixed the example in the UnitConverter description to reduce confusion with the inches abbreviation (now uses "to" instead of "in"). Thanks [@acekirkpatrick](https://github.com/acekirkpatrick)!
- Brought the acrylic background back and applied a proper fix to the titlebar accent showing through transparency.
- Fixed an issue causing the transparency from the UI disappearing after some time.
- Fixed a crash on Windows 11 build 22000. (This was a hotfix for 0.82)
- Blocked a transparency fix code from running on Windows 10, since it was causing graphical glitches. (This was a hotfix for 0.82)
- Accept speed abbreviations like kilometers per hour (kmph) in the Unit Converter plugin. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
- Added settings to configure behavior of the "First week of year" and "First day of week" calculations in the DateTime plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
- Fixed wrong initial position of the PowerToys Run when switching between monitors with different dpi values.
- Started allowing interchangeable use of / and \ in the registry plugin paths.
- Added support to automatic sign-in after rebooting with the System plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
- Added suggested use example results to the Value Generator plugin. Thanks [@azlkiniue](https://github.com/azlkiniue)!
### Quick Accent
- Added support for the Crimean Tatar character set. Thanks [@cor-bee](https://github.com/cor-bee)!
- Added the Numero symbol and double acute accent character. Thanks [@PesBandi](https://github.com/PesBandi)!
- Added the International Phonetic Alphabet characters. Thanks [@PesBandi](https://github.com/PesBandi)!
- Fixed the character description center positioning. Thanks [@PesBandi](https://github.com/PesBandi)!
- Added feminine and masculine ordinal indicator characters to the Portuguese character set. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)!
- Added support for the Bulgarian character set. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)!
### Screen Ruler
### Runner
- Updated the default activation hotkey to Win+Control+Shift+M, in order to not conflict with the Windows shortcut that restores minimized windows (Win+Shift+M). Thanks [@nx-frost](https://github.com/nx-frost)!
- Add code to handle release tags with an upper V when trying to detect new updates. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
### Settings
- Disabled the UI to enable/disable clipboard history in the Advanced Paste settings page when clipboard history is disabled by GPO in the system. (This was a hotfix for 0.81)
- Updated Advanced Paste's Settings and OOBE page to clarify that the AI use is optional and opt-in. (This was a hotfix for 0.81)
- Corrected a spelling fix in Advanced Paste's settings page. Thanks [@htcfreek](https://github.com/htcfreek)!
- Added localization support for the "Configure OpenAI Key" button in Advanced Paste's settings page. Thanks [@zetaloop](https://github.com/zetaloop)!
- Fixed extra GPO warnings being shown in Advanced Paste's settings page even if the module is disabled. Thanks [@htcfreek](https://github.com/htcfreek)!
- Fixed a crash when a PowerToys Run plugin icon path is badly formed.
- Disabled the experimentation paths in code behind to improve performance, since there's no current experimentation going on.
- Fixed the UI spacing in the "update available" card. Thanks [@Agnibaan](https://github.com/Agnibaan)!
- Fixed the information bars in the Mouse Without Borders settings page to hide when the module is disabled. Thanks [@htcfreek](https://github.com/htcfreek)!
- Improved consistency of the icons used in the Mouse Without Borders settings page. Thanks [@htcfreek](https://github.com/htcfreek)!
- Improved action keyword information bar padding in the PowerToys Run plugins section. Thanks [@htcfreek](https://github.com/htcfreek)!
- Fixed a crash in the dashboard when Keyboard Manager Editor settings file became locked.
### Documentation
- Adjusted the readme and release notes to clarify use of AI on Advanced Paste. (This was a hotfix for 0.81)
- Added the Edge Workspaces plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@quachpas](https://github.com/quachpas)!
- Removed the deprecated Guid plugin from PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@abduljawada](https://github.com/abduljawada)!
- Added the PowerHexInspector plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@NaroZeol](https://github.com/NaroZeol)!
- Fixed a broken link in the communication-with-modules.md file. Thanks [@PesBandi](https://github.com/PesBandi)!
- Updated COMMUNITY.md with missing and former members.
- Added the RDP plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@anthony81799](https://github.com/anthony81799)!
- Added the GitHubRepo and ProcessKiller plugins to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@8LWXpg](https://github.com/8LWXpg)!
- Fixed a typo in the 0.82.0 release notes in README. Thanks [@walex999](https://github.com/walex999)!
### Development
- Fixed ci UI tests to point to the correct Visual Studio vstest location after a Visual Studio upgrade. (This was a hotfix for 0.81)
- Updated System.Drawing.Common to 8.0.6 to fix CI builds after the .NET 8.0.6 upgrade was released.
- Removed an incorrect file reference to long removed documentation from the solution file. Thanks [@Kissaki](https://github.com/Kissaki)!
- Upgraded Windows App SDK to 1.5.3.
- Removed use of the BinaryFormatter API from Mouse Without Borders, which is expected to be deprecated in .NET 9.
- The user scope installer is now sent to the Microsoft store instead of the machine scope installer.
- Refactored Mouse Jump's internal code to allow for a future introduction of customizable appearance features. Thanks [@mikeclayton](https://github.com/mikeclayton)!
- Removed a noisy error from spell check ci runs.
- Improved the ci agent pool selection code.
- Updated Xamlstyler.console to 3.2404.2. Thanks [@Jvr2022](https://github.com/Jvr2022)!
- Updated UnitsNet to 5.50.0 Thanks [@Jvr2022](https://github.com/Jvr2022)!
- Replaced LPINPUT with std::vector of INPUT instances in Keyboard Manager internal code. Thanks [@masaru-iritani](https://github.com/masaru-iritani)!
- Improved the Microsoft Store submission ci action to use the proper cli and authentication.
- Disabled FancyZone UI tests, to unblock PRs. We plan to bring them back in the future. (This was a hotfix for 0.82)
- Fixed an issue where flakiness in CI was causing the installer custom actions DLL from being signed. (This was a hotfix for 0.82)
- Upgraded the Microsoft.Windows.Compatibility dependency to 8.0.7.
- Upgraded the System.Text.Json dependency to 8.0.4.
- Upgraded the Microsoft.Data.Sqlite dependency to 8.0.7.
- Upgraded the MSBuildCache dependency to 0.1.283-preview. Thanks [@dfederm](https://github.com/dfederm)!
- Removed an unneeded /Zm compiler flag from Keyboard Manager Editor common build flags.
- Fixed the winget publish action to handle upper case V in the tag name. Thanks [@mdanish-kh](https://github.com/mdanish-kh)!
- Removed wildcard items from vcxproj files. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Removed the similar issues bot GitHub actions. Thanks [@craigloewen-msft](https://github.com/craigloewen-msft)!
- Fixed CODEOWNERS to better protect changes in some files.
- Switched machines being used in CI and pointed status badges in README to the new machines.
- Fixed NU1503 build warnings when building PowerToys. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Use the MSTest meta dependency for running the tests instead of the individual testing packages. Thanks [@stan-sz](https://github.com/stan-sz)!
- Added missing CppWinRT references.
#### What is being planned for version 0.83
#### What is being planned for version 0.84
For [v0.83][github-next-release-work], we'll work on the items below:
For [v0.84][github-next-release-work], we'll work on the items below:
- Stability / bug fixes
- New utility: Dev Projects

View File

@@ -4,7 +4,6 @@
- [ ] Microsoft plugin project name pattern: `Microsoft.PowerToys.Run.Plugin.{PluginName}`
- [ ] Community plugin project name pattern: `Community.PowerToys.Run.Plugin.{PluginName}`
- [ ] The plugin target framework should be `net8.0-windows`
- [ ] The project file should import `Version.props` and specify `<Version>$(Version).0</Version>`
- [ ] If the plugin uses any 3rd party dependencies the project file should import `DynamicPlugin.props`
- [ ] The plugin has to contain a `plugin.json` file of the following format in its root folder:

View File

@@ -71,12 +71,14 @@ The following formats are currently available:
- All available settings for the plugin are defined in the [`TimeDateSettings`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeDateSettings.cs) class of the plugin. The settings can be accessed everywhere in the plugin code via the static class instance `TimeDateSettings.Instance`.
- We have the following settings that the user can configure to change the behavior of the plugin:
| Key | Default value | Name | Description |
|--------------|-----------|------------|------------|
| `OnlyDateTimeNowGlobal` | `true` | Show only 'Time', 'Date', and 'Now' result for system time on global queries | Regardless of this setting, for global queries the first word of the query has to be a complete match. |
| `TimeWithSeconds` | `false` | Show time with seconds | This setting applies to the 'Time' and 'Now' result. |
| `DateWithWeekday` | `false` | Show date with weekday and name of month | This setting applies to the 'Date' and 'Now' result. |
| `HideNumberMessageOnGlobalQuery` | `false` | Hide 'Invalid number input' error message on global queries | |
| Key | Type | Default value | Name | Description |
|--------------|--------------|-----------|------------|------------|
| `CalendarFirstWeekRule` | Combo box | `-1` (Use system settings) | First week of the year | Configure the calendar rule for the first week of the year. |
| `FirstDayOfWeek` | Combo box | `-1` (Use system settings) | First day of the week | |
| `OnlyDateTimeNowGlobal` | Checkbox | `true` | Show only 'Time', 'Date', and 'Now' result for system time on global queries | Regardless of this setting, for global queries the first word of the query has to be a complete match. |
| `TimeWithSeconds` | Checkbox | `false` | Show time with seconds | This setting applies to the 'Time' and 'Now' result. |
| `DateWithWeekday` | Checkbox | `false` | Show date with weekday and name of month | This setting applies to the 'Date' and 'Now' result. |
| `HideNumberMessageOnGlobalQuery` | Checkbox | `false` | Hide 'Invalid number input' error message on global queries | |
## Classes
@@ -97,6 +99,7 @@ The following formats are currently available:
### [`TimeAndDateHelper.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs)
- The [`TimeAndDateHelper`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs) class contains methods to format/convert date and time formats/strings.
- And it contains methods to return the `first week day` and `first week of the year rule` based on the current plugin settings.
### [`TimeDateSettings.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeDateSettings.cs)
- The [`TimeDateSettings`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeDateSettings.cs) class provides access to all optional plugin settings.
@@ -129,11 +132,6 @@ On global queries the high score returned by `FuzzySearch` has negative impacts
## [Unit Tests](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests)
We have a [Unit Test project](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests) that executes various test to ensure that the plugin works as expected.
### [`TimeDateResultTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeDateResultTests.cs)
- The [`TimeDateResultTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeDateResultTests.cs) class contains tests to validate that the time and date values are correctly formatted/calculated.
- That we can execute the tests at any time on any machine, we use a specified date/time value and set the thread culture always to `en-us` while executing the tests.
- Some tests contain checks that calculate the expected result at runtime instead of using an expected value written fix in the code. This is done to get valid results on every machine at any time.
### [`ImageTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/ImageTests.cs)
- The [`ImageTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/ImageTests.cs) class contains tests to validate that each result shows the expected and correct image.
- That we can execute the tests at any time on any machine, we set the thread culture always to `en-us` while executing the tests.
@@ -147,4 +145,13 @@ We have a [Unit Test project](/src/modules/launcher/Plugins/Microsoft.PowerToys.
### [`StringParserTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/StringParserTests.cs)
- The [`StringParserTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/StringParserTests.cs) class contains tests to validate that the typed string gets converted correctly into a `DateTime` object.
- That we can execute the tests at any time on any machine, we set the thread culture always to `en-us` while executing the tests.
- That we can execute the tests at any time on any machine, we set the thread culture always to `en-us` while executing the tests.
### [`TimeAndDateHelperTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeAndDateHelperTests.cs)
- The [`TimeAndDateHelperTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeAndDateHelperTests.cs) class contains tests to validate important methods form the `TimeAndDateHelper` class that are not used for string parsing.
### [`TimeDateResultTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeDateResultTests.cs)
- The [`TimeDateResultTests.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests/TimeDateResultTests.cs) class contains tests to validate that the time and date values are correctly formatted/calculated.
- That we can execute the tests at any time on any machine, we use a specified date/time value and set the thread culture always to `en-us` while executing the tests.
- Some tests use custom settings for the first day of week and the first week of year. (This is done in the tests for the affected results to validate them for different settings/cultures.)
- Some tests contain checks that calculate the expected result at runtime instead of using an expected value written fix in the code. This is done to get valid results on every machine at any time.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,21 +1,34 @@
---
last-update: 3-20-2022
last-update: 7-16-2024
---
# PowerToys Awake Changelog
## Builds
The build ID can be found in `Program.cs` in the `BuildId` variable - it is a unique identifier for the current builds that allows better diagnostics (we can look up the build ID from the logs) and offers a way to triage Awake-specific issues faster independent of the PowerToys version. The build ID does not carry any significance beyond that within the PowerToys code base.
The build ID can be found in `Core\Constants.cs` in the `BuildId` variable - it is a unique identifier for the current builds that allows better diagnostics (we can look up the build ID from the logs) and offers a way to triage Awake-specific issues faster independent of the PowerToys version. The build ID does not carry any significance beyond that within the PowerToys code base.
The build ID moniker is made up of two components - a reference to a [Halo](https://en.wikipedia.org/wiki/Halo_(franchise)) character, and the date when the work on the specific build started in the format of `MMDDYYYY`.
| Build ID | Build Date |
|:----------------------------------------------------------|:-----------------|
| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 |
| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 |
| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 |
| `ARBITER_01312022` | January 31, 2022 |
### `DAISY023_04102024` (April 10, 2024)
>[!NOTE]
>See pull request: [Awake Update - `DAISY023_04102024`](https://github.com/microsoft/PowerToys/pull/32378)
- [#33630](https://github.com/microsoft/PowerToys/issues/33630) When in the UI and you select `0` as hours and `0` as minutes in `TIMED` awake mode, the UI becomes non-responsive whenever you try to get back to timed after it rolls back to `PASSIVE`.
- [#12714](https://github.com/microsoft/PowerToys/issues/12714) Adds the option to keep track of Awake state through tray tooltip.
- [#11996](https://github.com/microsoft/PowerToys/issues/11996) Adds custom icons support for mode changes in Awake.
- Removes the dependency on `System.Windows.Forms` and instead uses native Windows APIs to create the tray icon.
- Removes redundant/unused code that impacted application performance.
- Updates dependent packages to their latest versions (`Microsoft.Windows.CsWinRT` and `System.Reactive`).
### `ATRIOX_04132023` (April 13, 2023)
- Moves from using `Task.Run` to spin up threads to actually using a blocking queue that properly sets thread parameters on the same thread.

View File

@@ -36,6 +36,8 @@ Contact the developers of a plugin directly for assistance with a specific plugi
| [WebSearchShortcut](https://github.com/Daydreamer-riri/PowerToys-Run-WebSearchShortcut) | [Riri](https://github.com/Daydreamer-riri) | Select a specific search engine to perform searches. |
| [UnicodeInput](https://github.com/nathancartlidge/powertoys-run-unicode) | [nathancartlidge](https://github.com/nathancartlidge) | Copy Unicode characters to the clipboard |
| [PowerHexInspector](https://github.com/NaroZeol/PowerHexInspector) | [NaroZeol](https://github.com/NaroZeol) | Peek other forms of an input number |
| [GitHubRepo](https://github.com/8LWXpg/PowerToysRun-GitHubRepo) | [8LWXpg](https://github.com/8LWXpg) | Search and open GitHub repositories |
| [ProcessKiller](https://github.com/8LWXpg/PowerToysRun-ProcessKiller) | [8LWXpg](https://github.com/8LWXpg) | Search and kill processes |
## Extending software plugins
@@ -47,6 +49,7 @@ Below are community created plugins that target a website or software. They are
| [Edge Workspaces](https://github.com/quachpas/PowerToys-Run-EdgeWorkspaces) | [quachpas](https://github.com/quachpas) | Open Microsoft Edge workspaces|
| [Everything](https://github.com/lin-ycv/EverythingPowerToys) | [Yu Chieh (Victor) Lin](https://github.com/Lin-ycv) | Get search results from Everything |
| [GitKraken](https://github.com/davidegiacometti/PowerToys-Run-GitKraken) | [davidegiacometti](https://github.com/davidegiacometti) | Open GitKraken repositories |
| [RDP](https://github.com/anthony81799/PowerToysRun-RDP)) | [anthony81799](https://github.com/anthony81799) | Open Remote Desktop connections |
| [Visual Studio Recents](https://github.com/davidegiacometti/PowerToys-Run-VisualStudio) | [davidegiacometti](https://github.com/davidegiacometti) | Open Visual Studio recents |
| [WinGet](https://github.com/bostrot/PowerToysRunPluginWinget) | [bostrot](https://github.com/bostrot) | Search and install packages from WinGet |
| [Scoop](https://github.com/Quriz/PowerToysRunScoop) | [Quriz](https://github.com/Quriz) | Search and install packages from Scoop |

View File

@@ -18,6 +18,7 @@
<?define AdvancedPasteProjectName="AdvancedPaste"?>
<?define RegistryPreviewProjectName="RegistryPreview"?>
<?define PeekProjectName="Peek"?>
<?define WorkspacesProjectName="Workspaces"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.Platform) = x64?>

View File

@@ -51,8 +51,8 @@
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="DSCModulesReference" Value="" KeyPath="yes"/>
</RegistryKey>
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psd1" Id="PTConfReference.psd1" />
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psm1" Id="PTConfReference.psm1" />
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version).0\Microsoft.PowerToys.Configure.psd1" Id="PTConfReference.psd1" />
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version).0\Microsoft.PowerToys.Configure.psm1" Id="PTConfReference.psm1" />
</Component>
</DirectoryRef>
@@ -63,11 +63,11 @@
<Directory Id="WindowsPowerShellFolder" Name="WindowsPowerShell">
<Directory Id="PowerShellModulesFolder" Name="Modules">
<Directory Id="PowerToysDscFolder" Name="Microsoft.PowerToys.Configure">
<Directory Id="PowerToysDscVerFolder" Name="$(var.Version)">
<Directory Id="PowerToysDscVerFolder" Name="$(var.Version).0">
<Component Id="PowerToysDSC" Win64="yes" Guid="C52AECA0-DA73-49B8-BB49-31EF6640FF1F">
<!-- Don't fail installation because of DSC. Files are marked as not vital. -->
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psd1" Id="PTConf.psd1" />
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psm1" Id="PTConf.psm1" />
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version).0\Microsoft.PowerToys.Configure.psd1" Id="PTConf.psd1" />
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version).0\Microsoft.PowerToys.Configure.psm1" Id="PTConf.psm1" />
</Component>
</Directory>
</Directory>

View File

@@ -25,11 +25,9 @@
<?if $(sys.BUILDARCH) = x64 ?>
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140_1_app.dll" />
<?endif ?>
<!-- Latest CppWinRT upgrade made Keyboard Manager Editor depend on additional VC Runtime libraries. -->
<!-- These are not in the Keyboard Manager Editor build output. So we copy them from the base build directory. -->
<File Source="$(var.BinDir)vcruntime140.dll" />
<File Source="$(var.BinDir)vcruntime140_1.dll" />
<File Source="$(var.BinDir)msvcp140.dll" />
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140.dll" />
<File Source="$(var.BinDir)KeyboardManagerEditor\vcruntime140_1.dll" />
<File Source="$(var.BinDir)KeyboardManagerEditor\msvcp140.dll" />
</Component>
</DirectoryRef>

View File

@@ -3,9 +3,9 @@
DefaultTargets="Build"
InitialTargets="EnsureNuGetPackageBuildImports"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\wix.props"
Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" />
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
<PropertyGroup>
<DefineConstants>Version=$(Version)</DefineConstants>
<Name>PowerToysBootstrapper</Name>
@@ -76,4 +76,12 @@
<Error Condition="!Exists('..\wix.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\wix.props'))" />
</Target>
<!-- Prevents NU1503 -->
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<Target Name="Restore" />
</Project>

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" />
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
<!-- THIS IS AN INNER LOOP OPTIMIZATION
@@ -185,4 +186,12 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<Target Name="BeforeBuild">
<HeatDirectory Directory="..\..\src\common\FilePreviewCommon\Assets\Monaco\monacoSRC" PreprocessorVariable="var.MonacoSRCHarvestPath" OutputFile="MonacoSRC.wxs" ComponentGroupName="MonacoSRCHeatGenerated" DirectoryRefId="MonacoPreviewHandlerMonacoSRCFolder" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" RunAsSeparateProcess="true" SuppressFragments="false" SuppressRegistry="false" SuppressRootDirectory="true"/>
</Target>
<!-- Prevents NU1503 -->
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<Target Name="Restore" />
</Project>

View File

@@ -449,6 +449,15 @@
</RegistryKey>
<File Id="PowerOCR_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)\$(var.Language)\PowerToys.PowerOCR.resources.dll" />
</Component>
<Component
Id="WorkspacesEditor_$(var.IdSafeLanguage)_Component"
Directory="Resource$(var.IdSafeLanguage)INSTALLFOLDER"
Guid="$(var.CompGUIDPrefix)21">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="WorkspacesEditor_$(var.IdSafeLanguage)_Component" Value="" KeyPath="yes"/>
</RegistryKey>
<File Id="WorkspacesEditor_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)\$(var.Language)\PowerToys.WorkspacesEditor.resources.dll" />
</Component>
<?undef IdSafeLanguage?>
<?undef CompGUIDPrefix?>
<?endforeach?>

View File

@@ -357,7 +357,7 @@ UINT __stdcall InstallDSCModuleCA(MSIHANDLE hInstall)
ExitOnFailure(hr, "Unable to determine Powershell modules path");
}
const auto modulesPath = baseModulesPath / L"Microsoft.PowerToys.Configure" / get_product_version(false);
const auto modulesPath = baseModulesPath / L"Microsoft.PowerToys.Configure" / (get_product_version(false) + L".0");
std::error_code errorCode;
fs::create_directories(modulesPath, errorCode);
@@ -411,7 +411,7 @@ UINT __stdcall UninstallDSCModuleCA(MSIHANDLE hInstall)
}
const auto powerToysModulePath = baseModulesPath / L"Microsoft.PowerToys.Configure";
const auto versionedModulePath = powerToysModulePath / get_product_version(false);
const auto versionedModulePath = powerToysModulePath / (get_product_version(false) + L".0");
std::error_code errorCode;
@@ -1223,7 +1223,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
}
processes.resize(bytes / sizeof(processes[0]));
std::array<std::wstring_view, 32> processesToTerminate = {
std::array<std::wstring_view, 36> processesToTerminate = {
L"PowerToys.PowerLauncher.exe",
L"PowerToys.Settings.exe",
L"PowerToys.AdvancedPaste.exe",
@@ -1255,6 +1255,10 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
L"PowerToys.MouseWithoutBordersService.exe",
L"PowerToys.CropAndLock.exe",
L"PowerToys.EnvironmentVariables.exe",
L"PowerToys.WorkspacesSnapshotTool.exe",
L"PowerToys.WorkspacesLauncher.exe",
L"PowerToys.WorkspacesLauncherUI.exe",
L"PowerToys.WorkspacesEditor.exe",
L"PowerToys.exe",
};

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.271-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.271-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.271-preview" />
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.283-preview" />
</packages>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Some items may be set in Directory.Build.props in root -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>
<!-- Common from the debug / release items -->
<PropertyGroup>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningsNotAsErrors>CA1720</WarningsNotAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<ErrorReport>prompt</ErrorReport>
<DefineConstants>RELEASE;TRACE</DefineConstants>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Some items may be set in Directory.Build.props in root -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SelfContained>true</SelfContained>
</PropertyGroup>
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@@ -1,16 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetName>PowerToys.AllExperiments</TargetName>
<MockDirectory>.\Microsoft.VariantAssignment\</MockDirectory>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />

View File

@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWPF>true</UseWPF>
<AssemblyName>PowerToys.Common.UI</AssemblyName>
</PropertyGroup>

View File

@@ -31,6 +31,7 @@ namespace Common.UI
EnvironmentVariables,
Dashboard,
AdvancedPaste,
Workspaces,
}
private static string SettingsWindowNameToString(SettingsWindow value)
@@ -77,6 +78,8 @@ namespace Common.UI
return "Dashboard";
case SettingsWindow.AdvancedPaste:
return "AdvancedPaste";
case SettingsWindow.Workspaces:
return "Workspaces";
default:
{
return string.Empty;

View File

@@ -24,15 +24,18 @@
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\;..\..\common;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="DisplayUtils.h" />
<ClInclude Include="MonitorEnumerator.h" />
<ClInclude Include="monitors.h" />
<ClInclude Include="dpi_aware.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="DisplayUtils.cpp" />
<ClCompile Include="monitors.cpp" />
<ClCompile Include="dpi_aware.cpp" />
</ItemGroup>

View File

@@ -0,0 +1,143 @@
#include "DisplayUtils.h"
#include <algorithm>
#include <cwctype>
#include <iterator>
#include <dpi_aware.h>
#include <MonitorEnumerator.h>
#include <utils/OnThreadExecutor.h>
namespace DisplayUtils
{
std::wstring remove_non_digits(const std::wstring& input)
{
std::wstring result;
std::copy_if(input.begin(), input.end(), std::back_inserter(result), [](wchar_t ch) { return std::iswdigit(ch); });
return result;
}
std::pair<std::wstring, std::wstring> SplitDisplayDeviceId(const std::wstring& str) noexcept
{
// format: \\?\DISPLAY#{device id}#{instance id}#{some other id}
// example: \\?\DISPLAY#GSM1388#4&125707d6&0&UID8388688#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
// output: { GSM1388, 4&125707d6&0&UID8388688 }
size_t nameStartPos = str.find_first_of('#');
size_t uidStartPos = str.find('#', nameStartPos + 1);
size_t uidEndPos = str.find('#', uidStartPos + 1);
if (nameStartPos == std::string::npos || uidStartPos == std::string::npos || uidEndPos == std::string::npos)
{
return { str, L"" };
}
return { str.substr(nameStartPos + 1, uidStartPos - nameStartPos - 1), str.substr(uidStartPos + 1, uidEndPos - uidStartPos - 1) };
}
std::pair<bool, std::vector<DisplayUtils::DisplayData>> GetDisplays()
{
bool success = true;
std::vector<DisplayUtils::DisplayData> result{};
auto allMonitors = MonitorEnumerator::Enumerate();
OnThreadExecutor dpiUnawareThread;
dpiUnawareThread.submit(OnThreadExecutor::task_t{ [&] {
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE);
SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR_MIXED);
} }).wait();
for (auto& monitorData : allMonitors)
{
MONITORINFOEX monitorInfo = monitorData.second;
MONITORINFOEX dpiUnawareMonitorInfo{};
dpiUnawareThread.submit(OnThreadExecutor::task_t{ [&] {
dpiUnawareMonitorInfo.cbSize = sizeof(dpiUnawareMonitorInfo);
if (!GetMonitorInfo(monitorData.first, &dpiUnawareMonitorInfo))
{
return;
}
} }).wait();
UINT dpi = 0;
if (DPIAware::GetScreenDPIForMonitor(monitorData.first, dpi) != S_OK)
{
success = false;
break;
}
DisplayUtils::DisplayData data{
.monitor = monitorData.first,
.dpi = dpi,
.monitorRectDpiAware = monitorInfo.rcMonitor,
.monitorRectDpiUnaware = dpiUnawareMonitorInfo.rcMonitor,
};
bool foundActiveMonitor = false;
DISPLAY_DEVICE displayDevice{ .cb = sizeof(displayDevice) };
DWORD displayDeviceIndex = 0;
while (EnumDisplayDevicesW(monitorInfo.szDevice, displayDeviceIndex, &displayDevice, EDD_GET_DEVICE_INTERFACE_NAME))
{
/*
* if (WI_IsFlagSet(displayDevice.StateFlags, DISPLAY_DEVICE_ACTIVE) &&
WI_IsFlagClear(displayDevice.StateFlags, DISPLAY_DEVICE_MIRRORING_DRIVER))
*/
if (((displayDevice.StateFlags & DISPLAY_DEVICE_ACTIVE) == DISPLAY_DEVICE_ACTIVE) &&
(displayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) == 0)
{
// Find display devices associated with the display.
foundActiveMonitor = true;
break;
}
displayDeviceIndex++;
}
if (foundActiveMonitor)
{
auto deviceId = SplitDisplayDeviceId(displayDevice.DeviceID);
data.id = deviceId.first;
data.instanceId = deviceId.second;
try
{
std::wstring numberStr = displayDevice.DeviceName; // \\.\DISPLAY1\Monitor0
numberStr = numberStr.substr(0, numberStr.find_last_of('\\')); // \\.\DISPLAY1
numberStr = remove_non_digits(numberStr);
data.number = std::stoi(numberStr);
}
catch (...)
{
success = false;
break;
}
}
else
{
success = false;
// Use the display name as a fallback value when no proper device was found.
data.id = monitorInfo.szDevice;
data.instanceId = L"";
try
{
std::wstring numberStr = monitorInfo.szDevice; // \\.\DISPLAY1
numberStr = remove_non_digits(numberStr);
data.number = std::stoi(numberStr);
}
catch (...)
{
success = false;
break;
}
}
result.push_back(data);
}
return { success, result };
}
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include <Windows.h>
#include <string>
#include <vector>
namespace DisplayUtils
{
struct DisplayData
{
HMONITOR monitor{};
std::wstring id;
std::wstring instanceId;
unsigned int number{};
unsigned int dpi{};
RECT monitorRectDpiAware{};
RECT monitorRectDpiUnaware{};
};
std::pair<bool, std::vector<DisplayData>> GetDisplays();
};

View File

@@ -0,0 +1,35 @@
#pragma once
#include <functional>
#include <vector>
#include <Windows.h>
class MonitorEnumerator
{
public:
static std::vector<std::pair<HMONITOR, MONITORINFOEX>> Enumerate()
{
MonitorEnumerator inst;
EnumDisplayMonitors(NULL, NULL, Callback, reinterpret_cast<LPARAM>(&inst));
return inst.m_monitors;
}
private:
MonitorEnumerator() = default;
~MonitorEnumerator() = default;
static BOOL CALLBACK Callback(HMONITOR monitor, HDC /*hdc*/, LPRECT /*pRect*/, LPARAM param)
{
MonitorEnumerator* inst = reinterpret_cast<MonitorEnumerator*>(param);
MONITORINFOEX mi;
mi.cbSize = sizeof(mi);
if (GetMonitorInfo(monitor, &mi))
{
inst->m_monitors.push_back({monitor, mi});
}
return TRUE;
}
std::vector<std::pair<HMONITOR, MONITORINFOEX>> m_monitors;
};

View File

@@ -1,7 +1,9 @@
#include "dpi_aware.h"
#include "monitors.h"
#include <ShellScalingApi.h>
#include <array>
#include <cmath>
namespace DPIAware
{
@@ -60,6 +62,24 @@ namespace DPIAware
}
}
void Convert(HMONITOR monitor_handle, RECT& rect)
{
if (monitor_handle == NULL)
{
const POINT ptZero = { 0, 0 };
monitor_handle = MonitorFromPoint(ptZero, MONITOR_DEFAULTTOPRIMARY);
}
UINT dpi_x, dpi_y;
if (GetDpiForMonitor(monitor_handle, MDT_EFFECTIVE_DPI, &dpi_x, &dpi_y) == S_OK)
{
rect.left = static_cast<long>(std::round(rect.left * static_cast<float>(dpi_x) / DEFAULT_DPI));
rect.right = static_cast<long>(std::round(rect.right * static_cast<float>(dpi_x) / DEFAULT_DPI));
rect.top = static_cast<long>(std::round(rect.top * static_cast<float>(dpi_y) / DEFAULT_DPI));
rect.bottom = static_cast<long>(std::round(rect.bottom * static_cast<float>(dpi_y) / DEFAULT_DPI));
}
}
void ConvertByCursorPosition(float& width, float& height)
{
HMONITOR targetMonitor = nullptr;

View File

@@ -12,6 +12,7 @@ namespace DPIAware
HRESULT GetScreenDPIForPoint(POINT p, UINT& dpi);
HRESULT GetScreenDPIForCursor(UINT& dpi);
void Convert(HMONITOR monitor_handle, float& width, float& height);
void Convert(HMONITOR monitor_handle, RECT& rect);
void ConvertByCursorPosition(float& width, float& height);
void InverseConvert(HMONITOR monitor_handle, float& width, float& height);
void EnableDPIAwarenessForThisProcess();

View File

@@ -9,7 +9,7 @@
// `theme` can be "vs" for light theme or "vs-dark" for dark theme
// `lang` is the language of the file
// `wrap` if the editor is wrapping or not
var theme = ("[[PT_THEME]]" == "dark") ? "vs-dark" : "vs";
var lang = "[[PT_LANG]]";
var wrap = ([[PT_WRAP]] == 1) ? true : false;
@@ -19,11 +19,29 @@
var stickyScroll = ([[PT_STICKY_SCROLL]] == 1) ? true : false;
var fontSize = [[PT_FONT_SIZE]];
var contextMenu = ([[PT_CONTEXTMENU]] == 1) ? true : false;
var editor;
// Code taken from https://stackoverflow.com/a/30106551/14774889
var code = decodeURIComponent(atob(base64code).split('').map(function(c) {
var code = decodeURIComponent(atob(base64code).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
function runToggleTextWrapCommand() {
if (wrap) {
editor.updateOptions({ wordWrap: 'off' })
} else {
editor.updateOptions({ wordWrap: 'on' })
}
wrap = !wrap;
}
function runCopyCommand() {
editor.focus();
document.execCommand('copy');
}
</script>
<!-- Set browser to Edge-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -33,32 +51,33 @@
<title>Previewer for developer Files</title>
<style>
/* Fits content to window size */
html, body{
padding:0;
html, body {
padding: 0;
}
#container,.monaco-editor {
position:fixed;
height:100%;
left:0;
top:0;
right:0;
bottom:0;
#container, .monaco-editor {
position: fixed;
height: 100%;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.overflowingContentWidgets{
.overflowingContentWidgets {
/*Hides alert box */
display:none!important
}
display: none !important
}
</style>
</head>
<body oncontextmenu="onContextMenu()">
<body>
<!-- Container for the editor -->
<div id="container"></div>
<!-- Script -->
<script src="http://[[PT_URL]]/monacoSRC/min/vs/loader.js"></script>
<script src="http://[[PT_URL]]/monacoSpecialLanguages.js" type="module"></script>
<script type="module">
var editor;
<script type="module">
import { registerAdditionalLanguages } from 'http://[[PT_URL]]/monacoSpecialLanguages.js';
import { customTokenColors } from 'http://[[PT_URL]]/customTokenColors.js';
require.config({ paths: { vs: 'http://[[PT_URL]]/monacoSRC/min/vs' } });
@@ -80,8 +99,9 @@
language: lang, // Sets language of the code
readOnly: true, // Sets to readonly
theme: 'theme', // Sets editor theme
minimap: {enabled: false}, // Disables minimap
minimap: { enabled: false }, // Disables minimap
lineNumbersMinChars: '3', // Width of the line numbers
contextmenu: contextMenu,
scrollbar: {
// Deactivate shadows
shadows: false,
@@ -90,7 +110,7 @@
vertical: 'auto',
horizontal: 'auto',
},
stickyScroll: {enabled: stickyScroll},
stickyScroll: { enabled: stickyScroll },
fontSize: fontSize,
wordWrap: (wrap ? 'on' : 'off') // Word wraps
});
@@ -117,12 +137,7 @@
// Method that will be executed when the action is triggered.
// @param editor The editor instance is passed in as a convenience
run: function (ed) {
if (wrap) {
editor.updateOptions({ wordWrap: 'off' })
} else {
editor.updateOptions({ wordWrap: 'on' })
}
wrap = !wrap;
runToggleTextWrapCommand();
}
});
@@ -151,4 +166,4 @@
}
</script>
</body>
</html>
</html>

View File

@@ -1,13 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<Description>PowerToys FilePreviewCommon</Description>
<AssemblyName>PowerToys.FilePreviewCommon</AssemblyName>
<UseWindowsForms>true</UseWindowsForms>

View File

@@ -1,4 +1,4 @@
#include "pch.h"
#include "pch.h"
#include "GPOWrapper.h"
#include "GPOWrapper.g.cpp"
@@ -176,4 +176,44 @@ namespace winrt::PowerToys::GPOWrapper::implementation
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getAllowedAdvancedPasteOnlineAIModelsValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredWorkspacesEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredWorkspacesEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbClipboardSharingEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbClipboardSharingEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbFileTransferEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbFileTransferEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbUseOriginalUserInterfaceValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbUseOriginalUserInterfaceValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbDisallowBlockingScreensaverValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbDisallowBlockingScreensaverValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbSameSubnetOnlyValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbSameSubnetOnlyValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbValidateRemoteIpValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbValidateRemoteIpValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredMwbDisableUserDefinedIpMappingRulesValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredMwbDisableUserDefinedIpMappingRulesValue());
}
winrt::hstring GPOWrapper::GetConfiguredMwbPolicyDefinedIpMappingRules()
{
// Assuming powertoys_gpo::getConfiguredMwbPolicyDefinedIpMappingRules() returns a std::wstring
std::wstring rules = powertoys_gpo::getConfiguredMwbPolicyDefinedIpMappingRules();
// Convert std::wstring to winrt::hstring
return to_hstring(rules.c_str());
}
}

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "GPOWrapper.g.h"
#include <common/utils/gpo.h>
@@ -50,6 +50,15 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
static GpoRuleConfigured GetAllowedAdvancedPasteOnlineAIModelsValue();
static GpoRuleConfigured GetConfiguredWorkspacesEnabledValue();
static GpoRuleConfigured GetConfiguredMwbClipboardSharingEnabledValue();
static GpoRuleConfigured GetConfiguredMwbFileTransferEnabledValue();
static GpoRuleConfigured GetConfiguredMwbUseOriginalUserInterfaceValue();
static GpoRuleConfigured GetConfiguredMwbDisallowBlockingScreensaverValue();
static GpoRuleConfigured GetConfiguredMwbSameSubnetOnlyValue();
static GpoRuleConfigured GetConfiguredMwbValidateRemoteIpValue();
static GpoRuleConfigured GetConfiguredMwbDisableUserDefinedIpMappingRulesValue();
static winrt::hstring GPOWrapper::GetConfiguredMwbPolicyDefinedIpMappingRules();
};
}

View File

@@ -54,6 +54,15 @@ namespace PowerToys
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
static GpoRuleConfigured GetAllowedAdvancedPasteOnlineAIModelsValue();
static GpoRuleConfigured GetConfiguredWorkspacesEnabledValue();
static GpoRuleConfigured GetConfiguredMwbClipboardSharingEnabledValue();
static GpoRuleConfigured GetConfiguredMwbFileTransferEnabledValue();
static GpoRuleConfigured GetConfiguredMwbUseOriginalUserInterfaceValue();
static GpoRuleConfigured GetConfiguredMwbDisallowBlockingScreensaverValue();
static GpoRuleConfigured GetConfiguredMwbSameSubnetOnlyValue();
static GpoRuleConfigured GetConfiguredMwbValidateRemoteIpValue();
static GpoRuleConfigured GetConfiguredMwbDisableUserDefinedIpMappingRulesValue();
static String GetConfiguredMwbPolicyDefinedIpMappingRules();
}
}
}

View File

@@ -61,5 +61,10 @@ namespace PowerToys.GPOWrapperProjection
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetRunPluginEnabledValue(pluginID);
}
public static GpoRuleConfigured GetConfiguredWorkspacesEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredWorkspacesEnabledValue();
}
}
}

View File

@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetName>PowerToys.GPOWrapperProjection</TargetName>
@@ -19,12 +18,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GPOWrapper\GPOWrapper.vcxproj">
</ProjectReference>
<ProjectReference Include="..\GPOWrapper\GPOWrapper.vcxproj" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Globalization;
using System.IO.Abstractions;
using System.Reflection;
using interop;
using PowerToys.Interop;
namespace ManagedCommon
{

View File

@@ -1,17 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<Description>PowerToys ManagedCommon</Description>
<AssemblyName>PowerToys.ManagedCommon</AssemblyName>
</PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.Interop</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.IO.Abstractions" />
<PackageReference Include="System.Management" />

View File

@@ -30,5 +30,6 @@ namespace ManagedCommon
MeasureTool,
ShortcutGuide,
PowerOCR,
Workspaces,
}
}

View File

@@ -1,12 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<Description>PowerToys Telemetry</Description>
<AssemblyName>PowerToys.ManagedTelemetry</AssemblyName>
</PropertyGroup>

View File

@@ -58,6 +58,15 @@ namespace UnitTestsVersionHelper
Assert::AreEqual(25ull, sut->minor);
Assert::AreEqual(1ull, sut->revision);
}
TEST_METHOD (stringConstructorShouldProperlyInitializationVersionNumbersWithUppercaseV)
{
auto sut = VersionHelper::fromString(L"V2.25.1");
Assert::IsTrue(sut.has_value());
Assert::AreEqual(2ull, sut->major);
Assert::AreEqual(25ull, sut->minor);
Assert::AreEqual(1ull, sut->revision);
}
TEST_METHOD (emptyStringNotAccepted)
{
auto sut = VersionHelper::fromString("");

View File

@@ -0,0 +1,39 @@
#include "pch.h"
#include "CommonManaged.h"
#include "CommonManaged.g.cpp"
#include <common/version/version.h>
#include "../../modules/videoconference/VideoConferenceShared/MicrophoneDevice.h"
#include "../../modules/videoconference/VideoConferenceShared/VideoCaptureDeviceList.h"
namespace winrt::PowerToys::Interop::implementation
{
hstring CommonManaged::GetProductVersion()
{
return hstring{ get_product_version() };
}
winrt::Windows::Foundation::Collections::IVector<hstring> CommonManaged::GetAllActiveMicrophoneDeviceNames()
{
auto names = std::vector<winrt::hstring>();
for (const auto& device : MicrophoneDevice::getAllActive())
{
names.push_back(device->name().data());
}
return winrt::multi_threaded_vector(std::move(names));
}
winrt::Windows::Foundation::Collections::IVector<hstring> CommonManaged::GetAllVideoCaptureDeviceNames()
{
auto names = std::vector<winrt::hstring>();
VideoCaptureDeviceList vcdl;
vcdl.EnumerateDevices();
for (UINT32 i = 0; i < vcdl.Count(); ++i)
{
auto name = vcdl.GetDeviceName(i).data();
if (name != L"PowerToys VideoConference Mute")
{
names.push_back(name);
}
}
return winrt::multi_threaded_vector(std::move(names));
}
}

View File

@@ -0,0 +1,20 @@
#pragma once
#include "CommonManaged.g.h"
namespace winrt::PowerToys::Interop::implementation
{
struct CommonManaged : CommonManagedT<CommonManaged>
{
CommonManaged() = default;
static hstring GetProductVersion();
static winrt::Windows::Foundation::Collections::IVector<hstring> GetAllActiveMicrophoneDeviceNames();
static winrt::Windows::Foundation::Collections::IVector<hstring> GetAllVideoCaptureDeviceNames();
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct CommonManaged : CommonManagedT<CommonManaged, implementation::CommonManaged>
{
};
}

View File

@@ -0,0 +1,11 @@
namespace PowerToys
{
namespace Interop
{
[default_interface] static runtimeclass CommonManaged {
static String GetProductVersion();
static Windows.Foundation.Collections.IVector<String> GetAllActiveMicrophoneDeviceNames();
static Windows.Foundation.Collections.IVector<String> GetAllVideoCaptureDeviceNames();
}
}
}

View File

@@ -0,0 +1,150 @@
#include "pch.h"
#include "Constants.h"
#include "Constants.g.cpp"
#include "shared_constants.h"
#include <ShlObj.h>
namespace winrt::PowerToys::Interop::implementation
{
uint32_t Constants::VK_WIN_BOTH()
{
return CommonSharedConstants::VK_WIN_BOTH;
}
hstring Constants::AppDataPath()
{
PWSTR local_app_path;
winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &local_app_path));
winrt::hstring result{ local_app_path };
CoTaskMemFree(local_app_path);
result = result + L"\\" + CommonSharedConstants::APPDATA_PATH;
return result;
}
hstring Constants::PowerLauncherSharedEvent()
{
return CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT;
}
hstring Constants::PowerLauncherCentralizedHookSharedEvent()
{
return CommonSharedConstants::POWER_LAUNCHER_CENTRALIZED_HOOK_SHARED_EVENT;
}
hstring Constants::RunSendSettingsTelemetryEvent()
{
return CommonSharedConstants::RUN_SEND_SETTINGS_TELEMETRY_EVENT;
}
hstring Constants::RunExitEvent()
{
return CommonSharedConstants::RUN_EXIT_EVENT;
}
hstring Constants::FZEExitEvent()
{
return CommonSharedConstants::FZE_EXIT_EVENT;
}
hstring Constants::FZEToggleEvent()
{
return CommonSharedConstants::FANCY_ZONES_EDITOR_TOGGLE_EVENT;
}
hstring Constants::ColorPickerSendSettingsTelemetryEvent()
{
return CommonSharedConstants::COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT;
}
hstring Constants::ShowColorPickerSharedEvent()
{
return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT;
}
hstring Constants::ShowAdvancedPasteSharedEvent()
{
return CommonSharedConstants::SHOW_ADVANCED_PASTE_SHARED_EVENT;
}
hstring Constants::AdvancedPasteMarkdownEvent()
{
return CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_EVENT;
}
hstring Constants::AdvancedPasteJsonEvent()
{
return CommonSharedConstants::ADVANCED_PASTE_JSON_EVENT;
}
hstring Constants::ShowPowerOCRSharedEvent()
{
return CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT;
}
hstring Constants::MouseJumpShowPreviewEvent()
{
return CommonSharedConstants::MOUSE_JUMP_SHOW_PREVIEW_EVENT;
}
hstring Constants::AwakeExitEvent()
{
return CommonSharedConstants::AWAKE_EXIT_EVENT;
}
hstring Constants::ShowPeekEvent()
{
return CommonSharedConstants::SHOW_PEEK_SHARED_EVENT;
}
hstring Constants::PowerAccentExitEvent()
{
return CommonSharedConstants::POWERACCENT_EXIT_EVENT;
}
hstring Constants::ShortcutGuideTriggerEvent()
{
return CommonSharedConstants::SHORTCUT_GUIDE_TRIGGER_EVENT;
}
hstring Constants::RegistryPreviewTriggerEvent()
{
return CommonSharedConstants::REGISTRY_PREVIEW_TRIGGER_EVENT;
}
hstring Constants::MeasureToolTriggerEvent()
{
return CommonSharedConstants::MEASURE_TOOL_TRIGGER_EVENT;
}
hstring Constants::GcodePreviewResizeEvent()
{
return CommonSharedConstants::GCODE_PREVIEW_RESIZE_EVENT;
}
hstring Constants::QoiPreviewResizeEvent()
{
return CommonSharedConstants::QOI_PREVIEW_RESIZE_EVENT;
}
hstring Constants::DevFilesPreviewResizeEvent()
{
return CommonSharedConstants::DEV_FILES_PREVIEW_RESIZE_EVENT;
}
hstring Constants::MarkdownPreviewResizeEvent()
{
return CommonSharedConstants::MARKDOWN_PREVIEW_RESIZE_EVENT;
}
hstring Constants::PdfPreviewResizeEvent()
{
return CommonSharedConstants::PDF_PREVIEW_RESIZE_EVENT;
}
hstring Constants::SvgPreviewResizeEvent()
{
return CommonSharedConstants::SVG_PREVIEW_RESIZE_EVENT;
}
hstring Constants::ShowHostsSharedEvent()
{
return CommonSharedConstants::SHOW_HOSTS_EVENT;
}
hstring Constants::ShowHostsAdminSharedEvent()
{
return CommonSharedConstants::SHOW_HOSTS_ADMIN_EVENT;
}
hstring Constants::CropAndLockThumbnailEvent()
{
return CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT;
}
hstring Constants::CropAndLockReparentEvent()
{
return CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT;
}
hstring Constants::ShowEnvironmentVariablesSharedEvent()
{
return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_EVENT;
}
hstring Constants::ShowEnvironmentVariablesAdminSharedEvent()
{
return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT;
}
hstring Constants::WorkspacesLaunchEditorEvent()
{
return CommonSharedConstants::WORKSPACES_LAUNCH_EDITOR_EVENT;
}
}

View File

@@ -0,0 +1,51 @@
#pragma once
#include "Constants.g.h"
namespace winrt::PowerToys::Interop::implementation
{
struct Constants : ConstantsT<Constants>
{
Constants() = default;
static uint32_t VK_WIN_BOTH();
static hstring AppDataPath();
static hstring PowerLauncherSharedEvent();
static hstring PowerLauncherCentralizedHookSharedEvent();
static hstring RunSendSettingsTelemetryEvent();
static hstring RunExitEvent();
static hstring FZEExitEvent();
static hstring FZEToggleEvent();
static hstring ColorPickerSendSettingsTelemetryEvent();
static hstring ShowColorPickerSharedEvent();
static hstring ShowAdvancedPasteSharedEvent();
static hstring AdvancedPasteMarkdownEvent();
static hstring AdvancedPasteJsonEvent();
static hstring ShowPowerOCRSharedEvent();
static hstring MouseJumpShowPreviewEvent();
static hstring AwakeExitEvent();
static hstring ShowPeekEvent();
static hstring PowerAccentExitEvent();
static hstring ShortcutGuideTriggerEvent();
static hstring RegistryPreviewTriggerEvent();
static hstring MeasureToolTriggerEvent();
static hstring GcodePreviewResizeEvent();
static hstring QoiPreviewResizeEvent();
static hstring DevFilesPreviewResizeEvent();
static hstring MarkdownPreviewResizeEvent();
static hstring PdfPreviewResizeEvent();
static hstring SvgPreviewResizeEvent();
static hstring ShowHostsSharedEvent();
static hstring ShowHostsAdminSharedEvent();
static hstring CropAndLockThumbnailEvent();
static hstring CropAndLockReparentEvent();
static hstring ShowEnvironmentVariablesSharedEvent();
static hstring ShowEnvironmentVariablesAdminSharedEvent();
static hstring WorkspacesLaunchEditorEvent();
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct Constants : ConstantsT<Constants, implementation::Constants>
{
};
}

View File

@@ -0,0 +1,42 @@
namespace PowerToys
{
namespace Interop
{
[default_interface] static runtimeclass Constants {
static UInt32 VK_WIN_BOTH {get; };
static String AppDataPath();
static String PowerLauncherSharedEvent();
static String PowerLauncherCentralizedHookSharedEvent();
static String RunSendSettingsTelemetryEvent();
static String RunExitEvent();
static String FZEExitEvent();
static String FZEToggleEvent();
static String ColorPickerSendSettingsTelemetryEvent();
static String ShowColorPickerSharedEvent();
static String ShowAdvancedPasteSharedEvent();
static String AdvancedPasteMarkdownEvent();
static String AdvancedPasteJsonEvent();
static String ShowPowerOCRSharedEvent();
static String MouseJumpShowPreviewEvent();
static String AwakeExitEvent();
static String ShowPeekEvent();
static String PowerAccentExitEvent();
static String ShortcutGuideTriggerEvent();
static String RegistryPreviewTriggerEvent();
static String MeasureToolTriggerEvent();
static String GcodePreviewResizeEvent();
static String QoiPreviewResizeEvent();
static String DevFilesPreviewResizeEvent();
static String MarkdownPreviewResizeEvent();
static String PdfPreviewResizeEvent();
static String SvgPreviewResizeEvent();
static String ShowHostsSharedEvent();
static String ShowHostsAdminSharedEvent();
static String CropAndLockThumbnailEvent();
static String CropAndLockReparentEvent();
static String ShowEnvironmentVariablesSharedEvent();
static String ShowEnvironmentVariablesAdminSharedEvent();
static String WorkspacesLaunchEditorEvent();
}
}
}

View File

@@ -1,94 +1,89 @@
#include "pch.h"
#include "HotkeyManager.h"
#include "HotkeyManager.g.cpp"
using namespace interop;
HotkeyManager::HotkeyManager()
namespace winrt::PowerToys::Interop::implementation
{
keyboardEventCallback = gcnew KeyboardEventCallback(this, &HotkeyManager::KeyboardEventProc);
isActiveCallback = gcnew IsActiveCallback(this, &HotkeyManager::IsActiveProc);
filterKeyboardCallback = gcnew FilterKeyboardEvent(this, &HotkeyManager::FilterKeyboardProc);
keyboardHook = gcnew KeyboardHook(
keyboardEventCallback,
isActiveCallback,
filterKeyboardCallback);
hotkeys = gcnew Dictionary<HOTKEY_HANDLE, HotkeyCallback ^>();
pressedKeys = gcnew Hotkey();
keyboardHook->Start();
}
HotkeyManager::~HotkeyManager()
{
delete keyboardHook;
}
// When all Shortcut keys are pressed, fire the HotkeyCallback event.
void HotkeyManager::KeyboardEventProc(KeyboardEvent ^ /*ev*/)
{
// pressedKeys always stores the latest keyboard state
auto pressedKeysHandle = GetHotkeyHandle(pressedKeys);
if (hotkeys->ContainsKey(pressedKeysHandle))
HotkeyManager::HotkeyManager()
{
hotkeys[pressedKeysHandle]->Invoke();
// After invoking the hotkey send a dummy key to prevent Start Menu from activating
INPUT dummyEvent[1] = {};
dummyEvent[0].type = INPUT_KEYBOARD;
dummyEvent[0].ki.wVk = 0xFF;
dummyEvent[0].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, dummyEvent, sizeof(INPUT));
keyboardEventCallback = KeyboardEventCallback{ this, &HotkeyManager::KeyboardEventProc };
isActiveCallback = IsActiveCallback{ this, &HotkeyManager::IsActiveProc };
filterKeyboardCallback = FilterKeyboardEvent{ this, &HotkeyManager::FilterKeyboardProc };
keyboardHook = KeyboardHook{ keyboardEventCallback, isActiveCallback, filterKeyboardCallback };
keyboardHook.Start();
}
}
// Hotkeys are intended to be global, therefore they are always active no matter the
// context in which the keypress occurs.
bool HotkeyManager::IsActiveProc()
{
return true;
}
// When all Shortcut keys are pressed, fire the HotkeyCallback event.
void HotkeyManager::KeyboardEventProc(KeyboardEvent ev)
{
// pressedKeys always stores the latest keyboard state
auto pressedKeysHandle = GetHotkeyHandle(pressedKeys);
if (hotkeys.find(pressedKeysHandle) != hotkeys.end())
{
hotkeys[pressedKeysHandle]();
// KeyboardEvent callback is only fired for relevant key events.
bool HotkeyManager::FilterKeyboardProc(KeyboardEvent ^ ev)
{
// Updating the pressed keys here so we know if the keypress event should be propagated or not.
pressedKeys->Win = (GetAsyncKeyState(VK_LWIN) & 0x8000) || (GetAsyncKeyState(VK_RWIN) & 0x8000);
pressedKeys->Ctrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
pressedKeys->Alt = GetAsyncKeyState(VK_MENU) & 0x8000;
pressedKeys->Shift = GetAsyncKeyState(VK_SHIFT) & 0x8000;
pressedKeys->Key = static_cast<unsigned char>(ev->key);
// After invoking the hotkey send a dummy key to prevent Start Menu from activating
INPUT dummyEvent[1] = {};
dummyEvent[0].type = INPUT_KEYBOARD;
dummyEvent[0].ki.wVk = 0xFF;
dummyEvent[0].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, dummyEvent, sizeof(INPUT));
}
}
// Convert to hotkey handle
auto pressedKeysHandle = GetHotkeyHandle(pressedKeys);
// Check if any hotkey matches the pressed keys if the current key event is a key down event
if ((ev->message == WM_KEYDOWN || ev->message == WM_SYSKEYDOWN) && hotkeys->ContainsKey(pressedKeysHandle))
// Hotkeys are intended to be global, therefore they are always active no matter the
// context in which the keypress occurs.
bool HotkeyManager::IsActiveProc()
{
return true;
}
bool HotkeyManager::FilterKeyboardProc(KeyboardEvent ev)
{
// Updating the pressed keys here so we know if the keypress event should be propagated or not.
pressedKeys.Win = (GetAsyncKeyState(VK_LWIN) & 0x8000) || (GetAsyncKeyState(VK_RWIN) & 0x8000);
pressedKeys.Ctrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
pressedKeys.Alt = GetAsyncKeyState(VK_MENU) & 0x8000;
pressedKeys.Shift = GetAsyncKeyState(VK_SHIFT) & 0x8000;
pressedKeys.Key = static_cast<unsigned char>(ev.key);
return false;
}
// Convert to hotkey handle
auto pressedKeysHandle = GetHotkeyHandle(pressedKeys);
// NOTE: Replaces old hotkey if one already present.
HOTKEY_HANDLE HotkeyManager::RegisterHotkey(Hotkey ^ hotkey, HotkeyCallback ^ callback)
{
auto handle = GetHotkeyHandle(hotkey);
hotkeys[handle] = callback;
return handle;
}
// Check if any hotkey matches the pressed keys if the current key event is a key down event
if ((ev.message == WM_KEYDOWN || ev.message == WM_SYSKEYDOWN) && hotkeys.find(pressedKeysHandle)!=hotkeys.end())
{
return true;
}
void HotkeyManager::UnregisterHotkey(HOTKEY_HANDLE handle)
{
hotkeys->Remove(handle);
}
return false;
}
HOTKEY_HANDLE HotkeyManager::GetHotkeyHandle(Hotkey ^ hotkey)
{
HOTKEY_HANDLE handle = hotkey->Key;
handle |= hotkey->Win << 8;
handle |= hotkey->Ctrl << 9;
handle |= hotkey->Shift << 10;
handle |= hotkey->Alt << 11;
return handle;
uint16_t HotkeyManager::RegisterHotkey(winrt::PowerToys::Interop::Hotkey const& _hotkey, winrt::PowerToys::Interop::HotkeyCallback const& _callback)
{
auto handle = GetHotkeyHandle(_hotkey);
hotkeys[handle] = _callback;
return handle;
}
void HotkeyManager::UnregisterHotkey(uint16_t _handle)
{
auto iter = hotkeys.find(_handle);
if (iter != hotkeys.end()) {
hotkeys.erase(iter);
}
}
void HotkeyManager::Close()
{
}
uint16_t HotkeyManager::GetHotkeyHandle(Hotkey hotkey)
{
uint16_t handle = hotkey.Key;
handle |= hotkey.Win << 8;
handle |= hotkey.Ctrl << 9;
handle |= hotkey.Shift << 10;
handle |= hotkey.Alt << 11;
return handle;
}
}

View File

@@ -1,54 +1,33 @@
#pragma once
#include <Windows.h>
#include "KeyboardHook.h"
#include "HotkeyManager.g.h"
namespace interop
namespace winrt::PowerToys::Interop::implementation
{
public
ref struct Hotkey
struct HotkeyManager : HotkeyManagerT<HotkeyManager>
{
bool Win;
bool Ctrl;
bool Shift;
bool Alt;
unsigned char Key;
Hotkey()
{
Win = false;
Ctrl = false;
Shift = false;
Alt = false;
Key = 0;
}
};
public
delegate void HotkeyCallback();
typedef unsigned short HOTKEY_HANDLE;
public
ref class HotkeyManager
{
public:
HotkeyManager();
~HotkeyManager();
HOTKEY_HANDLE RegisterHotkey(Hotkey ^ hotkey, HotkeyCallback ^ callback);
void UnregisterHotkey(HOTKEY_HANDLE handle);
uint16_t RegisterHotkey(winrt::PowerToys::Interop::Hotkey const& _hotkey, winrt::PowerToys::Interop::HotkeyCallback const& _callback);
void UnregisterHotkey(uint16_t _handle);
void Close();
private:
KeyboardHook ^ keyboardHook;
Dictionary<HOTKEY_HANDLE, HotkeyCallback ^> ^ hotkeys;
Hotkey ^ pressedKeys;
KeyboardEventCallback ^ keyboardEventCallback;
IsActiveCallback ^ isActiveCallback;
FilterKeyboardEvent ^ filterKeyboardCallback;
KeyboardHook keyboardHook{ nullptr };
std::map<uint16_t, HotkeyCallback> hotkeys;
Hotkey pressedKeys{ };
KeyboardEventCallback keyboardEventCallback;
IsActiveCallback isActiveCallback;
FilterKeyboardEvent filterKeyboardCallback;
void KeyboardEventProc(KeyboardEvent ^ ev);
void KeyboardEventProc(KeyboardEvent ev);
bool IsActiveProc();
bool FilterKeyboardProc(KeyboardEvent ^ ev);
HOTKEY_HANDLE GetHotkeyHandle(Hotkey ^ hotkey);
bool FilterKeyboardProc(KeyboardEvent ev);
uint16_t GetHotkeyHandle(Hotkey hotkey);
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct HotkeyManager : HotkeyManagerT<HotkeyManager, implementation::HotkeyManager>
{
};
}

View File

@@ -0,0 +1,23 @@
namespace PowerToys
{
namespace Interop
{
struct Hotkey
{
Boolean Win;
Boolean Ctrl;
Boolean Shift;
Boolean Alt;
UInt8 Key;
};
delegate void HotkeyCallback();
[default_interface] runtimeclass HotkeyManager : Windows.Foundation.IClosable
{
HotkeyManager();
UInt16 RegisterHotkey(Hotkey _hotkey, HotkeyCallback _callback);
void UnregisterHotkey(UInt16 _handle);
}
}
}

View File

@@ -1,73 +1,99 @@
#include "pch.h"
#include "KeyboardHook.h"
#include <exception>
#include <msclr/marshal.h>
#include <msclr/marshal_cppstd.h>
#include "KeyboardHook.g.cpp"
#include <common/debug_control.h>
#include <common/utils/winapi_error.h>
using namespace interop;
using namespace System::Runtime::InteropServices;
using namespace System;
using namespace System::Diagnostics;
KeyboardHook::KeyboardHook(
KeyboardEventCallback ^ keyboardEventCallback,
IsActiveCallback ^ isActiveCallback,
FilterKeyboardEvent ^ filterKeyboardEvent)
namespace winrt::PowerToys::Interop::implementation
{
this->keyboardEventCallback = keyboardEventCallback;
this->isActiveCallback = isActiveCallback;
this->filterKeyboardEvent = filterKeyboardEvent;
}
std::mutex KeyboardHook::instancesMutex;
std::unordered_set<KeyboardHook*> KeyboardHook::instances;
KeyboardHook::~KeyboardHook()
{
// Unregister low level hook procedure
UnhookWindowsHookEx(hookHandle);
}
KeyboardHook::KeyboardHook(winrt::PowerToys::Interop::KeyboardEventCallback const& keyboardEventCallback, winrt::PowerToys::Interop::IsActiveCallback const& isActiveCallback, winrt::PowerToys::Interop::FilterKeyboardEvent const& filterKeyboardEvent)
{
this->keyboardEventCallback = keyboardEventCallback;
this->isActiveCallback = isActiveCallback;
this->filterKeyboardEvent = filterKeyboardEvent;
}
void KeyboardHook::Start()
{
hookProc = gcnew HookProcDelegate(this, &KeyboardHook::HookProc);
void KeyboardHook::Close()
{
std::unique_lock lock { instancesMutex };
auto iter = instances.find(this);
if (iter != instances.end())
{
instances.erase(iter);
}
if (instances.size() < 1 && hookHandle != nullptr)
{
if (UnhookWindowsHookEx(hookHandle))
{
hookHandle = nullptr;
}
}
}
void KeyboardHook::Start()
{
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
const bool hookDisabled = IsDebuggerPresent();
const bool hookDisabled = IsDebuggerPresent();
#else
const bool hookDisabled = false;
const bool hookDisabled = false;
#endif
if (!hookDisabled)
{
// register low level hook procedure
hookHandle = SetWindowsHookEx(
WH_KEYBOARD_LL,
(HOOKPROC)(void*)Marshal::GetFunctionPointerForDelegate(hookProc),
0,
0);
if (hookHandle == nullptr)
if (!hookDisabled)
{
DWORD errorCode = GetLastError();
show_last_error_message(L"SetWindowsHookEx", errorCode, L"PowerToys - Interop");
std::unique_lock lock { instancesMutex };
assert(instances.find(this) == instances.end());
// register low level hook procedure
instances.insert(this);
if (hookHandle == nullptr)
{
hookHandle = SetWindowsHookEx(
WH_KEYBOARD_LL,
HookProc,
0,
0);
if (hookHandle == nullptr)
{
DWORD errorCode = GetLastError();
show_last_error_message(L"SetWindowsHookEx", errorCode, L"PowerToys - Interop");
}
}
}
}
LRESULT KeyboardHook::HookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode == HC_ACTION)
{
std::vector<KeyboardHook*> instances_copy;
{
/* Use a copy of instances, to iterate through the copy without needing to maintain the lock */
std::unique_lock lock{ instancesMutex };
instances_copy.reserve(instances.size());
std::copy(instances.begin(), instances.end(), std::back_inserter(instances_copy));
}
for (auto const& s_instance : instances_copy)
{
if (s_instance->isActiveCallback())
{
KeyboardEvent ev;
ev.message = wParam;
ev.key = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->vkCode;
ev.dwExtraInfo = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->dwExtraInfo;
// Ignore the keyboard hook if the FilterkeyboardEvent returns false.
if ((s_instance->filterKeyboardEvent != nullptr && !s_instance->filterKeyboardEvent(ev)))
{
continue;
}
s_instance->keyboardEventCallback(ev);
return 1;
}
}
}
return CallNextHookEx(NULL, nCode, wParam, lParam);
}
}
LRESULT __clrcall KeyboardHook::HookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode == HC_ACTION && isActiveCallback->Invoke())
{
KeyboardEvent ^ ev = gcnew KeyboardEvent();
ev->message = wParam;
ev->key = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->vkCode;
ev->dwExtraInfo = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->dwExtraInfo;
// Ignore the keyboard hook if the FilterkeyboardEvent returns false.
if ((filterKeyboardEvent != nullptr && !filterKeyboardEvent->Invoke(ev)))
{
return CallNextHookEx(hookHandle, nCode, wParam, lParam);
}
keyboardEventCallback->Invoke(ev);
return 1;
}
return CallNextHookEx(hookHandle, nCode, wParam, lParam);
}

View File

@@ -1,48 +1,35 @@
#pragma once
#include "KeyboardHook.g.h"
#include <mutex>
#include <unordered_set>
#include <cinttypes>
using namespace System::Threading;
using namespace System::Collections::Generic;
namespace interop
namespace winrt::PowerToys::Interop::implementation
{
public
ref struct KeyboardEvent
struct KeyboardHook : KeyboardHookT<KeyboardHook>
{
WPARAM message;
int key;
uint64_t dwExtraInfo;
};
public
delegate void KeyboardEventCallback(KeyboardEvent ^ ev);
public
delegate bool IsActiveCallback();
public
delegate bool FilterKeyboardEvent(KeyboardEvent ^ ev);
public
ref class KeyboardHook
{
public:
KeyboardHook(
KeyboardEventCallback ^ keyboardEventCallback,
IsActiveCallback ^ isActiveCallback,
FilterKeyboardEvent ^ filterKeyboardEvent);
~KeyboardHook();
// KeyboardHook() = default;
KeyboardHook(winrt::PowerToys::Interop::KeyboardEventCallback const& keyboardEventCallback, winrt::PowerToys::Interop::IsActiveCallback const& isActiveCallback, winrt::PowerToys::Interop::FilterKeyboardEvent const& filterKeyboardEvent);
void Start();
void Close();
private:
delegate LRESULT HookProcDelegate(int nCode, WPARAM wParam, LPARAM lParam);
KeyboardEventCallback ^ keyboardEventCallback;
IsActiveCallback ^ isActiveCallback;
FilterKeyboardEvent ^ filterKeyboardEvent;
HHOOK hookHandle;
HookProcDelegate ^ hookProc;
winrt::PowerToys::Interop::KeyboardEventCallback keyboardEventCallback;
winrt::PowerToys::Interop::IsActiveCallback isActiveCallback;
winrt::PowerToys::Interop::FilterKeyboardEvent filterKeyboardEvent;
LRESULT __clrcall HookProc(int nCode, WPARAM wParam, LPARAM lParam);
// This class used to be C++/CX, which meant it ran on .NET runtime and was able to send function pointer for delegates as hook procedures for SetWindowsHookEx which kept an object reference.
// There doesn't seem to be a way to do this outside of the .NET runtime that allows us to get a proper C-style function.
// The alternative when porting to C++/winrt is to keep track of every instance and use a single proc instead of one per object. This should also make it lighter.
static std::mutex instancesMutex;
static std::unordered_set<KeyboardHook*> instances;
static inline HHOOK hookHandle = nullptr;
static LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam);
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct KeyboardHook : KeyboardHookT<KeyboardHook, implementation::KeyboardHook>
{
};
}

View File

@@ -0,0 +1,21 @@
namespace PowerToys
{
namespace Interop
{
struct KeyboardEvent
{
UInt64 message;
Int32 key;
UInt64 dwExtraInfo;
};
[version(1.0), uuid(7b820173-a54a-4a38-b810-810e05c14344)] delegate void KeyboardEventCallback(KeyboardEvent ev);
[version(1.0), uuid(e3a8bb91-0dfd-4d77-8472-75a47b7af8f8)] delegate Boolean IsActiveCallback();
[version(1.0), uuid(94b900ee-d9e8-4630-9064-737eeb9c18ad)] delegate Boolean FilterKeyboardEvent(KeyboardEvent ev);
[default_interface] runtimeclass KeyboardHook: Windows.Foundation.IClosable {
KeyboardHook(KeyboardEventCallback keyboardEventCallback, IsActiveCallback isActiveCallback, FilterKeyboardEvent filterKeyboardEvent);
void Start();
}
}
}

View File

@@ -0,0 +1,19 @@
#include "pch.h"
#include "LayoutMapManaged.h"
#include "LayoutMapManaged.g.cpp"
namespace winrt::PowerToys::Interop::implementation
{
hstring LayoutMapManaged::GetKeyName(uint32_t key)
{
return hstring{ _map->GetKeyName(key) };
}
uint32_t LayoutMapManaged::GetKeyValue(hstring const& name)
{
return _map->GetKeyFromName(std::wstring(name));
}
void LayoutMapManaged::Updatelayout()
{
_map->UpdateLayout();
}
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include "LayoutMapManaged.g.h"
#include "keyboard_layout.h"
namespace winrt::PowerToys::Interop::implementation
{
struct LayoutMapManaged : LayoutMapManagedT<LayoutMapManaged>
{
LayoutMapManaged() = default;
hstring GetKeyName(uint32_t key);
uint32_t GetKeyValue(hstring const& name);
void Updatelayout();
private:
std::unique_ptr<LayoutMap> _map = std::make_unique<LayoutMap>();
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct LayoutMapManaged : LayoutMapManagedT<LayoutMapManaged, implementation::LayoutMapManaged>
{
};
}

View File

@@ -0,0 +1,12 @@
namespace PowerToys
{
namespace Interop
{
[default_interface] runtimeclass LayoutMapManaged {
LayoutMapManaged();
String GetKeyName(UInt32 key);
UInt32 GetKeyValue(String name);
void Updatelayout();
}
}
}

View File

@@ -0,0 +1,3 @@
EXPORTS
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Version.props" />
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup>
<AssemblyTitle>PowerToys.Interop</AssemblyTitle>
</PropertyGroup>
@@ -25,16 +25,25 @@
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{F055103B-F80B-4D0C-BF48-057C55620033}</ProjectGuid>
<TargetFramework>net8.0-windows</TargetFramework>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>PowerToysInterop</RootNamespace>
<RootNamespace>PowerToys.Interop</RootNamespace>
<ProjectName>PowerToys.Interop</ProjectName>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
<MinimalCoreWin>true</MinimalCoreWin>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>false</AppContainerApplication>
<AppxPackage>false</AppxPackage>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>NetCore</CLRSupport>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -55,93 +64,122 @@
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>PowerToysInterop;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<PreprocessorDefinitions>_WINRT_DLL;WINRT_LEAN_AND_MEAN;PowerToysInterop;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)src\common\interop;../../;../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<OmitDefaultLibName>false</OmitDefaultLibName>
<AdditionalOptions>/Zc:twoPhase- </AdditionalOptions>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>%(AdditionalOptions) /bigobj /Zc:twoPhase- </AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WindowsApp.lib;shell32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<ModuleDefinitionFile>PowerToys.Interop.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<AssemblyVersionFiles Include="Generated Files\AssemblyInfo.cpp" />
</ItemGroup>
<Target Name="GenerateAssemblyInfo" BeforeTargets="PrepareForBuild">
<ItemGroup>
<HeaderLines Include="#include &quot;../pch.h&quot;" />
<HeaderLines Include="using namespace System%3b" />
<HeaderLines Include="using namespace System::Reflection%3b" />
<HeaderLines Include="using namespace System::Runtime::CompilerServices%3b" />
<HeaderLines Include="using namespace System::Runtime::InteropServices%3b" />
<HeaderLines Include="using namespace System::Security::Permissions%3b" />
<HeaderLines Include="[assembly: AssemblyTitleAttribute(L&quot;$(AssemblyTitle)&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyDescriptionAttribute(&quot;&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyConfigurationAttribute(&quot;&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyCompanyAttribute(&quot;$(AssemblyCompany)&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyCopyrightAttribute(&quot;$(AssemblyCopyright)&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyProductAttribute(&quot;$(AssemblyTitle)&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyTrademarkAttribute(&quot;&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyCultureAttribute(&quot;&quot;)]%3b" />
<HeaderLines Include="[assembly: AssemblyVersionAttribute(&quot;$(Version).0&quot;)]%3b" />
<HeaderLines Include="[assembly: ComVisible(false)]%3b" />
<HeaderLines Include="[assembly:CLSCompliantAttribute(true)]%3b" />
</ItemGroup>
<WriteLinesToFile File="Generated Files\AssemblyInfo.cpp" Lines="@(HeaderLines)" Overwrite="true" Encoding="Unicode" WriteOnlyWhenDifferent="true" />
</Target>
<ItemGroup>
<ClInclude Include="..\..\modules\videoconference\VideoConferenceShared\MicrophoneDevice.h" />
<ClInclude Include="..\..\modules\videoconference\VideoConferenceShared\VideoCaptureDeviceList.h" />
<ClInclude Include="HotkeyManager.h" />
<ClInclude Include="KeyboardHook.h" />
<ClInclude Include="async_message_queue.h" />
<ClInclude Include="CommonManaged.h">
<DependentUpon>CommonManaged.idl</DependentUpon>
</ClInclude>
<ClInclude Include="Constants.h">
<DependentUpon>KeyboardListener.idl</DependentUpon>
</ClInclude>
<ClInclude Include="HotkeyManager.h">
<DependentUpon>HotkeyManager.idl</DependentUpon>
</ClInclude>
<ClInclude Include="KeyboardHook.h">
<DependentUpon>KeyboardHook.idl</DependentUpon>
</ClInclude>
<ClInclude Include="keyboard_layout.h" />
<ClInclude Include="keyboard_layout_impl.h" />
<ClInclude Include="LayoutMapManaged.h">
<DependentUpon>LayoutMapManaged.idl</DependentUpon>
</ClInclude>
<ClInclude Include="pch.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="shared_constants.h" />
<ClInclude Include="TwoWayPipeMessageIPCManaged.h">
<DependentUpon>TwoWayPipeMessageIPCManaged.idl</DependentUpon>
</ClInclude>
<ClInclude Include="two_way_pipe_message_ipc.h" />
<ClInclude Include="two_way_pipe_message_ipc_impl.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\modules\videoconference\VideoConferenceShared\MicrophoneDevice.cpp">
<CompileAsManaged>false</CompileAsManaged>
<ClCompile Include="..\..\modules\videoconference\VideoConferenceShared\MicrophoneDevice.cpp" />
<ClCompile Include="..\..\modules\videoconference\VideoConferenceShared\VideoCaptureDeviceList.cpp" />
<ClCompile Include="CommonManaged.cpp">
<DependentUpon>CommonManaged.idl</DependentUpon>
</ClCompile>
<ClCompile Include="..\..\modules\videoconference\VideoConferenceShared\VideoCaptureDeviceList.cpp">
<CompileAsManaged>false</CompileAsManaged>
<ClCompile Include="Constants.cpp">
<DependentUpon>KeyboardListener.idl</DependentUpon>
</ClCompile>
<ClCompile Include="Generated Files\AssemblyInfo.cpp" />
<ClCompile Include="HotkeyManager.cpp" />
<ClCompile Include="interop.cpp" />
<ClCompile Include="KeyboardHook.cpp" />
<ClCompile Include="keyboard_layout.cpp">
<CompileAsManaged>false</CompileAsManaged>
<ClCompile Include="HotkeyManager.cpp">
<DependentUpon>HotkeyManager.idl</DependentUpon>
</ClCompile>
<ClCompile Include="two_way_pipe_message_ipc.cpp">
<CompileAsManaged>false</CompileAsManaged>
<ClCompile Include="KeyboardHook.cpp">
<DependentUpon>KeyboardHook.idl</DependentUpon>
</ClCompile>
<ClCompile Include="keyboard_layout.cpp" />
<ClCompile Include="LayoutMapManaged.cpp">
<DependentUpon>LayoutMapManaged.idl</DependentUpon>
</ClCompile>
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="TwoWayPipeMessageIPCManaged.cpp">
<DependentUpon>TwoWayPipeMessageIPCManaged.idl</DependentUpon>
</ClCompile>
<ClCompile Include="two_way_pipe_message_ipc.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="interop.rc" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="PowerToys.Interop.def" />
</ItemGroup>
<ItemGroup>
<None Include="PropertySheet.props" />
</ItemGroup>
<ItemGroup>
<Midl Include="CommonManaged.idl" />
<Midl Include="Constants.idl" />
<Midl Include="HotkeyManager.idl" />
<Midl Include="KeyboardHook.idl" />
<Midl Include="LayoutMapManaged.idl" />
<Midl Include="TwoWayPipeMessageIPCManaged.idl" />
</ItemGroup>
<ImportGroup Label="ExtensionTargets" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View File

@@ -18,12 +18,6 @@
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="KeyboardHook.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="HotkeyManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -36,23 +30,38 @@
<ClInclude Include="shared_constants.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Constants.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="keyboard_layout.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="keyboard_layout_impl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="LayoutMapManaged.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CommonManaged.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="two_way_pipe_message_ipc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="two_way_pipe_message_ipc_impl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="async_message_queue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="HotkeyManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Constants.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="interop.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Generated Files\AssemblyInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="KeyboardHook.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="HotkeyManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="two_way_pipe_message_ipc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="keyboard_layout.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -62,6 +71,30 @@
<ClCompile Include="..\..\modules\videoconference\VideoConferenceShared\VideoCaptureDeviceList.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Constants.cpp">
<Filter>Header Files</Filter>
</ClCompile>
<ClCompile Include="LayoutMapManaged.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CommonManaged.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="two_way_pipe_message_ipc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="HotkeyManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Constants.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="interop.rc">
@@ -69,9 +102,33 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
<None Include="packages.config" />
<None Include="PowerToys.Interop.def">
<Filter>Source Files</Filter>
</None>
<None Include="PropertySheet.props" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Midl Include="HotkeyManager.idl">
<Filter>Source Files</Filter>
</Midl>
<Midl Include="Constants.idl">
<Filter>Source Files</Filter>
</Midl>
<Midl Include="LayoutMapManaged.idl">
<Filter>Source Files</Filter>
</Midl>
<Midl Include="CommonManaged.idl">
<Filter>Source Files</Filter>
</Midl>
<Midl Include="KeyboardHook.idl">
<Filter>Source Files</Filter>
</Midl>
<Midl Include="TwoWayPipeMessageIPCManaged.idl">
<Filter>Source Files</Filter>
</Midl>
</ItemGroup>
<ItemGroup>
<Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<!--
To customize common C++/WinRT project properties:
* right-click the project node
* expand the Common Properties item
* select the C++/WinRT property page
For more advanced scenarios, and complete documentation, please see:
https://github.com/Microsoft/cppwinrt/tree/master/nuget
-->
<PropertyGroup />
<ItemDefinitionGroup />
</Project>

View File

@@ -0,0 +1,37 @@
#include "pch.h"
#include "TwoWayPipeMessageIPCManaged.h"
#include "TwoWayPipeMessageIPCManaged.g.cpp"
#include "two_way_pipe_message_ipc_impl.h"
#include <functional>
namespace winrt::PowerToys::Interop::implementation
{
TwoWayPipeMessageIPCManaged::TwoWayPipeMessageIPCManaged(hstring const& inputPipeName, hstring const& outputPipeName, winrt::PowerToys::Interop::TwoWayPipeIPCReadCallback const& _callback)
{
this->_callback = _callback;
if (_callback != nullptr)
{
_internalReadCallback = [this](const std::wstring& msg) {
this->_callback(msg);
};
}
_pipe = new TwoWayPipeMessageIPC(std::wstring{ inputPipeName }, std::wstring{ outputPipeName }, _internalReadCallback);
}
void TwoWayPipeMessageIPCManaged::Send(hstring const& msg)
{
_pipe->send(std::wstring{ msg });
}
void TwoWayPipeMessageIPCManaged::Start()
{
_pipe->start(nullptr);
}
void TwoWayPipeMessageIPCManaged::End()
{
_pipe->end();
}
void TwoWayPipeMessageIPCManaged::Close()
{
delete _pipe;
}
}

View File

@@ -0,0 +1,28 @@
#pragma once
#include "TwoWayPipeMessageIPCManaged.g.h"
#include "two_way_pipe_message_ipc.h"
namespace winrt::PowerToys::Interop::implementation
{
struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged>
{
TwoWayPipeMessageIPCManaged() = default;
TwoWayPipeMessageIPCManaged(hstring const& inputPipeName, hstring const& outputPipeName, winrt::PowerToys::Interop::TwoWayPipeIPCReadCallback const& _callback);
void Send(hstring const& msg);
void Start();
void End();
void Close();
private:
TwoWayPipeMessageIPC* _pipe;
TwoWayPipeIPCReadCallback _callback;
std::function<void(const std::wstring& msg)> _internalReadCallback;
};
}
namespace winrt::PowerToys::Interop::factory_implementation
{
struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged, implementation::TwoWayPipeMessageIPCManaged>
{
};
}

View File

@@ -0,0 +1,14 @@
namespace PowerToys
{
namespace Interop
{
delegate void TwoWayPipeIPCReadCallback(String message);
[default_interface] runtimeclass TwoWayPipeMessageIPCManaged : Windows.Foundation.IClosable
{
TwoWayPipeMessageIPCManaged(String inputPipeName, String outputPipeName, TwoWayPipeIPCReadCallback _callback);
void Send(String msg);
void Start();
void End();
}
}
}

View File

@@ -4,8 +4,8 @@
using System;
using System.Threading;
using interop;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PowerToys.Interop;
namespace Microsoft.Interop.Tests
{

View File

@@ -1,11 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.Interop.Tests</RootNamespace>
<AssemblyName>Microsoft.Interop.Tests</AssemblyName>
@@ -14,47 +12,18 @@
<AssemblyTitle>interop-tests</AssemblyTitle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\$(Platform)\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\$(Platform)\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\$(Platform)\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\$(Platform)\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<ErrorReport>prompt</ErrorReport>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.Interop</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="MSTest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PowerToys.Interop.vcxproj" />
</ItemGroup>
</Project>

View File

@@ -1,299 +0,0 @@
#include "pch.h"
#include <msclr/marshal.h>
#include <msclr/marshal_cppstd.h>
#include <functional>
#include "keyboard_layout.h"
#include "two_way_pipe_message_ipc.h"
#include "shared_constants.h"
// We cannot use C++/WinRT APIs when compiled with /clr (we'll get a runtime crash). os-detect API is used
// in both native C++ and C++/CX.
// We also cannot compile it as a library, since we use different cppruntime linkage in C++/CX and native C++.
// Therefore the simplest way is to compile these functions as native using the pragmas below.
#pragma managed(push, off)
#include "../utils/os-detect.h"
// TODO: move to a separate library in common
#include "../../modules/videoconference/VideoConferenceShared/MicrophoneDevice.h"
#include "../../modules/videoconference/VideoConferenceShared/VideoCaptureDeviceList.h"
#pragma managed(pop)
#include <common/version/version.h>
using namespace System;
using namespace System::Runtime::InteropServices;
using System::Collections::Generic::List;
// https://learn.microsoft.com/cpp/dotnet/how-to-wrap-native-class-for-use-by-csharp?view=vs-2019
namespace interop
{
public
ref class LayoutMapManaged
{
public:
LayoutMapManaged() :
_map(new LayoutMap) {}
~LayoutMapManaged()
{
delete _map;
}
String ^ GetKeyName(DWORD key)
{
return gcnew String(_map->GetKeyName(key).c_str());
}
DWORD GetKeyValue(String ^ name)
{
return _map->GetKeyFromName(msclr::interop::marshal_as<std::wstring>(name));
}
void Updatelayout()
{
_map->UpdateLayout();
}
protected:
!LayoutMapManaged()
{
delete _map;
}
private:
LayoutMap* _map;
};
public
ref class TwoWayPipeMessageIPCManaged
{
public:
delegate void ReadCallback(String ^ message);
TwoWayPipeMessageIPCManaged(String ^ inputPipeName, String ^ outputPipeName, ReadCallback ^ callback)
{
_wrapperCallback = gcnew InternalReadCallback(this, &TwoWayPipeMessageIPCManaged::ReadCallbackHelper);
_callback = callback;
TwoWayPipeMessageIPC::callback_function cb = nullptr;
if (callback != nullptr)
{
cb = (TwoWayPipeMessageIPC::callback_function)(void*)Marshal::GetFunctionPointerForDelegate(_wrapperCallback);
}
_pipe = new TwoWayPipeMessageIPC(
msclr::interop::marshal_as<std::wstring>(inputPipeName),
msclr::interop::marshal_as<std::wstring>(outputPipeName),
cb);
}
~TwoWayPipeMessageIPCManaged()
{
delete _pipe;
}
void Send(String ^ msg)
{
_pipe->send(msclr::interop::marshal_as<std::wstring>(msg));
}
void Start()
{
_pipe->start(nullptr);
}
void End()
{
_pipe->end();
}
protected:
!TwoWayPipeMessageIPCManaged()
{
delete _pipe;
}
private:
delegate void InternalReadCallback(const std::wstring& msg);
TwoWayPipeMessageIPC* _pipe;
ReadCallback ^ _callback;
InternalReadCallback ^ _wrapperCallback;
void ReadCallbackHelper(const std::wstring& msg)
{
_callback(gcnew String(msg.c_str()));
}
};
public
ref class CommonManaged
{
public:
static String ^ GetProductVersion() {
return gcnew String(get_product_version().c_str());
}
static List<String ^> ^ GetAllActiveMicrophoneDeviceNames() {
auto names = gcnew List<String ^>();
for (const auto& device : MicrophoneDevice::getAllActive())
{
names->Add(gcnew String(device->name().data()));
}
return names;
}
static List<String ^> ^
GetAllVideoCaptureDeviceNames() {
auto names = gcnew List<String ^>();
VideoCaptureDeviceList vcdl;
vcdl.EnumerateDevices();
for (UINT32 i = 0; i < vcdl.Count(); ++i)
{
auto name = gcnew String(vcdl.GetDeviceName(i).data());
if (name != L"PowerToys VideoConference Mute")
{
names->Add(name);
}
}
return names;
}
};
public
ref class Constants
{
public:
literal int VK_WIN_BOTH = CommonSharedConstants::VK_WIN_BOTH;
static String ^ AppDataPath() {
auto localPath = Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData);
auto powerToysPath = gcnew String(CommonSharedConstants::APPDATA_PATH);
return System::IO::Path::Combine(localPath, powerToysPath);
}
static String ^ PowerLauncherSharedEvent() {
return gcnew String(CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT);
}
static String ^ PowerLauncherCentralizedHookSharedEvent() {
return gcnew String(CommonSharedConstants::POWER_LAUNCHER_CENTRALIZED_HOOK_SHARED_EVENT);
}
static String ^ RunSendSettingsTelemetryEvent() {
return gcnew String(CommonSharedConstants::RUN_SEND_SETTINGS_TELEMETRY_EVENT);
}
static String ^ RunExitEvent() {
return gcnew String(CommonSharedConstants::RUN_EXIT_EVENT);
}
static String ^ FZEExitEvent() {
return gcnew String(CommonSharedConstants::FZE_EXIT_EVENT);
}
static String ^ FZEToggleEvent() {
return gcnew String(CommonSharedConstants::FANCY_ZONES_EDITOR_TOGGLE_EVENT);
}
static String ^ ColorPickerSendSettingsTelemetryEvent() {
return gcnew String(CommonSharedConstants::COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT);
}
static String ^ ShowColorPickerSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT);
}
static String ^ ShowAdvancedPasteSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_ADVANCED_PASTE_SHARED_EVENT);
}
static String ^ AdvancedPasteMarkdownEvent() {
return gcnew String(CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_EVENT);
}
static String ^ AdvancedPasteJsonEvent() {
return gcnew String(CommonSharedConstants::ADVANCED_PASTE_JSON_EVENT);
}
static String ^ ShowPowerOCRSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT);
}
static String ^ MouseJumpShowPreviewEvent() {
return gcnew String(CommonSharedConstants::MOUSE_JUMP_SHOW_PREVIEW_EVENT);
}
static String ^ AwakeExitEvent() {
return gcnew String(CommonSharedConstants::AWAKE_EXIT_EVENT);
}
static String^ ShowPeekEvent() {
return gcnew String(CommonSharedConstants::SHOW_PEEK_SHARED_EVENT);
}
static String ^ PowerAccentExitEvent() {
return gcnew String(CommonSharedConstants::POWERACCENT_EXIT_EVENT);
}
static String ^ ShortcutGuideTriggerEvent() {
return gcnew String(CommonSharedConstants::SHORTCUT_GUIDE_TRIGGER_EVENT);
}
static String ^ RegistryPreviewTriggerEvent() {
return gcnew String(CommonSharedConstants::REGISTRY_PREVIEW_TRIGGER_EVENT);
}
static String ^ MeasureToolTriggerEvent() {
return gcnew String(CommonSharedConstants::MEASURE_TOOL_TRIGGER_EVENT);
}
static String ^ GcodePreviewResizeEvent() {
return gcnew String(CommonSharedConstants::GCODE_PREVIEW_RESIZE_EVENT);
}
static String ^ QoiPreviewResizeEvent() {
return gcnew String(CommonSharedConstants::QOI_PREVIEW_RESIZE_EVENT);
}
static String ^ DevFilesPreviewResizeEvent() {
return gcnew String(CommonSharedConstants::DEV_FILES_PREVIEW_RESIZE_EVENT);
}
static String ^ MarkdownPreviewResizeEvent() {
return gcnew String(CommonSharedConstants::MARKDOWN_PREVIEW_RESIZE_EVENT);
}
static String ^ PdfPreviewResizeEvent() {
return gcnew String(CommonSharedConstants::PDF_PREVIEW_RESIZE_EVENT);
}
static String ^ SvgPreviewResizeEvent() {
return gcnew String(CommonSharedConstants::SVG_PREVIEW_RESIZE_EVENT);
}
static String ^ ShowHostsSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_HOSTS_EVENT);
}
static String ^ ShowHostsAdminSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_HOSTS_ADMIN_EVENT);
}
static String ^ CropAndLockThumbnailEvent() {
return gcnew String(CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT);
}
static String ^ CropAndLockReparentEvent() {
return gcnew String(CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT);
}
static String ^ ShowEnvironmentVariablesSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_EVENT);
}
static String ^ ShowEnvironmentVariablesAdminSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT);
}
};
}

View File

@@ -0,0 +1 @@
#include "pch.h"

View File

@@ -3,13 +3,12 @@
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.
#ifndef PCH_H
#define PCH_H
#pragma once
#define WIN32_LEAN_AND_MEAN
// add headers that you want to pre-compile here
#include <unknwn.h>
#include <winrt/base.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <Windows.h>
#include <Endpointvolume.h>
#endif //PCH_H

View File

@@ -41,6 +41,8 @@ namespace CommonSharedConstants
const wchar_t FANCY_ZONES_EDITOR_TOGGLE_EVENT[] = L"Local\\FancyZones-ToggleEditorEvent-1e174338-06a3-472b-874d-073b21c62f14";
const wchar_t WORKSPACES_LAUNCH_EDITOR_EVENT[] = L"Local\\Workspaces-LaunchEditorEvent-a55ff427-cf62-4994-a2cd-9f72139296bf";
const wchar_t SHOW_HOSTS_EVENT[] = L"Local\\Hosts-ShowHostsEvent-5a0c0aae-5ff5-40f5-95c2-20e37ed671f0";
const wchar_t SHOW_HOSTS_ADMIN_EVENT[] = L"Local\\Hosts-ShowHostsAdminEvent-60ff44e2-efd3-43bf-928a-f4d269f98bec";
@@ -96,6 +98,8 @@ namespace CommonSharedConstants
const wchar_t SHOW_ENVIRONMENT_VARIABLES_EVENT[] = L"Local\\PowerToysEnvironmentVariables-ShowEnvironmentVariablesEvent-1021f616-e951-4d64-b231-a8f972159978";
const wchar_t SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT[] = L"Local\\PowerToysEnvironmentVariables-EnvironmentVariablesAdminEvent-8c95d2ad-047c-49a2-9e8b-b4656326cfb2";
const wchar_t WORKSPACES_EXIT_EVENT[] = L"Local\\PowerToys-Workspaces-ExitEvent-29a1566f-f4f8-4d56-9435-d2a437f727c6";
// Max DWORD for key code to disable keys.
const DWORD VK_DISABLED = 0x100;
}

View File

@@ -1,8 +1,9 @@
#pragma once
#include <functional>
class TwoWayPipeMessageIPC
{
public:
typedef void (*callback_function)(const std::wstring&);
typedef std::function<void(const std::wstring&)>callback_function;
TwoWayPipeMessageIPC(
std::wstring _input_pipe_name,
std::wstring _output_pipe_name,

View File

@@ -69,6 +69,10 @@ struct LogSettings
inline const static std::string environmentVariablesLoggerName = "environment-variables";
inline const static std::wstring cmdNotFoundLogPath = L"Logs\\cmd-not-found-log.txt";
inline const static std::string cmdNotFoundLoggerName = "cmd-not-found";
inline const static std::string workspacesLauncherLoggerName = "workspaces-launcher";
inline const static std::wstring workspacesLauncherLogPath = L"workspaces-launcher-log.txt";
inline const static std::string workspacesSnapshotToolLoggerName = "workspaces-snapshot-tool";
inline const static std::wstring workspacesSnapshotToolLogPath = L"workspaces-snapshot-tool-log.txt";
inline const static int retention = 30;
std::wstring logLevel;
LogSettings();

View File

@@ -0,0 +1,72 @@
#pragma once
#include <future>
#include <thread>
#include <functional>
#include <queue>
#include <atomic>
// OnThreadExecutor allows its caller to off-load some work to a persistently running background thread.
// This might come in handy if you use the API which sets thread-wide global state and the state needs
// to be isolated.
class OnThreadExecutor final
{
public:
using task_t = std::packaged_task<void()>;
OnThreadExecutor() :
_shutdown_request{ false },
_worker_thread{ [this] { worker_thread(); } }
{
}
~OnThreadExecutor()
{
_shutdown_request = true;
_task_cv.notify_one();
_worker_thread.join();
}
std::future<void> submit(task_t task)
{
auto future = task.get_future();
std::lock_guard lock{ _task_mutex };
_task_queue.emplace(std::move(task));
_task_cv.notify_one();
return future;
}
void cancel()
{
std::lock_guard lock{ _task_mutex };
_task_queue = {};
_task_cv.notify_one();
}
private:
void worker_thread()
{
while (!_shutdown_request)
{
task_t task;
{
std::unique_lock task_lock{ _task_mutex };
_task_cv.wait(task_lock, [this] { return !_task_queue.empty() || _shutdown_request; });
if (_shutdown_request)
{
return;
}
task = std::move(_task_queue.front());
_task_queue.pop();
}
task();
}
}
std::mutex _task_mutex;
std::condition_variable _task_cv;
std::atomic_bool _shutdown_request;
std::queue<std::packaged_task<void()>> _task_queue;
std::thread _worker_thread;
};

View File

@@ -2,6 +2,7 @@
#include <Windows.h>
#include <optional>
#include <vector>
namespace powertoys_gpo {
enum gpo_rule_configured_t {
@@ -59,6 +60,7 @@ namespace powertoys_gpo {
const std::wstring POLICY_CONFIGURE_ENABLED_ENVIRONMENT_VARIABLES = L"ConfigureEnabledUtilityEnvironmentVariables";
const std::wstring POLICY_CONFIGURE_ENABLED_QOI_PREVIEW = L"ConfigureEnabledUtilityFileExplorerQOIPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_QOI_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerQOIThumbnails";
const std::wstring POLICY_CONFIGURE_ENABLED_WORKSPACES = L"ConfigureEnabledUtilityWorkspaces";
// The registry value names for PowerToys installer and update policies.
const std::wstring POLICY_DISABLE_PER_USER_INSTALLATION = L"PerUserInstallationDisabled";
@@ -71,11 +73,25 @@ namespace powertoys_gpo {
const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation";
const std::wstring POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS = L"PowerLauncherAllPluginsEnabledState";
const std::wstring POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS = L"AllowPowerToysAdvancedPasteOnlineAIModels";
const std::wstring POLICY_MWB_CLIPBOARD_SHARING_ENABLED = L"MwbClipboardSharingEnabled";
const std::wstring POLICY_MWB_FILE_TRANSFER_ENABLED = L"MwbFileTransferEnabled";
const std::wstring POLICY_MWB_USE_ORIGINAL_USER_INTERFACE = L"MwbUseOriginalUserInterface";
const std::wstring POLICY_MWB_DISALLOW_BLOCKING_SCREENSAVER = L"MwbDisallowBlockingScreensaver";
const std::wstring POLICY_MWB_SAME_SUBNET_ONLY = L"MwbSameSubnetOnly";
const std::wstring POLICY_MWB_VALIDATE_REMOTE_IP = L"MwbValidateRemoteIp";
const std::wstring POLICY_MWB_DISABLE_USER_DEFINED_IP_MAPPING_RULES = L"MwbDisableUserDefinedIpMappingRules";
const std::wstring POLICY_MWB_POLICY_DEFINED_IP_MAPPING_RULES = L"MwbPolicyDefinedIpMappingRules";
inline std::optional<std::wstring> readRegistryStringValue(HKEY hRootKey, const std::wstring& subKey, const std::wstring& value_name)
inline std::optional<std::wstring> readRegistryStringValue(HKEY hRootKey, const std::wstring& subKey, const std::wstring& value_name, const bool is_multi_line_text = false)
{
// Set value type
DWORD reg_value_type = REG_SZ;
DWORD reg_flags = RRF_RT_REG_SZ;
if (is_multi_line_text)
{
reg_value_type = REG_MULTI_SZ;
reg_flags = RRF_RT_REG_MULTI_SZ;
}
DWORD string_buffer_capacity;
// Request required buffer capacity / string length
@@ -97,8 +113,26 @@ namespace powertoys_gpo {
return std::nullopt;
}
// Convert buffer to std::wstring, delete buffer and return REG_SZ value
std::wstring string_value = temp_buffer;
// Convert buffer to std::wstring
std::wstring string_value = L"";
if (reg_value_type == REG_MULTI_SZ)
{
// If it is REG_MULTI_SZ handle this way
wchar_t* currentString = temp_buffer;
while (*currentString != L'\0')
{
// If first entry then assign the string, else add to the string
string_value = (string_value == L"") ? currentString : (string_value + L"\r\n" + currentString);
currentString += wcslen(currentString) + 1; // Move to the next string
}
}
else
{
// If it is REG_SZ handle this way
string_value = temp_buffer;
}
// delete buffer, return string value
delete temp_buffer;
return string_value;
}
@@ -366,6 +400,11 @@ namespace powertoys_gpo {
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE);
}
inline gpo_rule_configured_t getConfiguredWorkspacesEnabledValue()
{
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_WORKSPACES);
}
inline gpo_rule_configured_t getConfiguredVideoConferenceMuteEnabledValue()
{
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE);
@@ -475,4 +514,59 @@ namespace powertoys_gpo {
{
return getUtilityEnabledValue(POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS);
}
inline gpo_rule_configured_t getConfiguredMwbClipboardSharingEnabledValue()
{
return getUtilityEnabledValue(POLICY_MWB_CLIPBOARD_SHARING_ENABLED);
}
inline gpo_rule_configured_t getConfiguredMwbFileTransferEnabledValue()
{
return getUtilityEnabledValue(POLICY_MWB_FILE_TRANSFER_ENABLED);
}
inline gpo_rule_configured_t getConfiguredMwbUseOriginalUserInterfaceValue()
{
return getUtilityEnabledValue(POLICY_MWB_USE_ORIGINAL_USER_INTERFACE);
}
inline gpo_rule_configured_t getConfiguredMwbDisallowBlockingScreensaverValue()
{
return getUtilityEnabledValue(POLICY_MWB_DISALLOW_BLOCKING_SCREENSAVER);
}
inline gpo_rule_configured_t getConfiguredMwbSameSubnetOnlyValue()
{
return getUtilityEnabledValue(POLICY_MWB_SAME_SUBNET_ONLY);
}
inline gpo_rule_configured_t getConfiguredMwbValidateRemoteIpValue()
{
return getUtilityEnabledValue(POLICY_MWB_VALIDATE_REMOTE_IP);
}
inline gpo_rule_configured_t getConfiguredMwbDisableUserDefinedIpMappingRulesValue()
{
return getUtilityEnabledValue(POLICY_MWB_DISABLE_USER_DEFINED_IP_MAPPING_RULES);
}
inline std::wstring getConfiguredMwbPolicyDefinedIpMappingRules()
{
// Important: HKLM has priority over HKCU
auto mapping_rules = readRegistryStringValue(HKEY_LOCAL_MACHINE, POLICIES_PATH, POLICY_MWB_POLICY_DEFINED_IP_MAPPING_RULES, true);
if (!mapping_rules.has_value())
{
mapping_rules = readRegistryStringValue(HKEY_CURRENT_USER, POLICIES_PATH, POLICY_MWB_POLICY_DEFINED_IP_MAPPING_RULES, true);
}
// return value
if (mapping_rules.has_value())
{
return mapping_rules.value();
}
else
{
return std::wstring ();
}
}
}

View File

@@ -18,7 +18,8 @@ struct Constants;
template<>
struct Constants<char>
{
static inline const char* V = "v";
static inline const char* LOWER_V = "v";
static inline const char* UPPER_V = "V";
static inline const char* DOT = ".";
static inline const char SPACE = ' ';
};
@@ -26,7 +27,8 @@ struct Constants<char>
template<>
struct Constants<wchar_t>
{
static inline const wchar_t* V = L"v";
static inline const wchar_t* LOWER_V = L"v";
static inline const wchar_t* UPPER_V = L"V";
static inline const wchar_t* DOT = L".";
static inline const wchar_t SPACE = L' ';
};
@@ -36,7 +38,8 @@ std::optional<VersionHelper> fromString(std::basic_string_view<CharT> str)
{
try
{
str = left_trim<CharT>(trim<CharT>(str), Constants<CharT>::V);
str = left_trim<CharT>(trim<CharT>(str), Constants<CharT>::LOWER_V);
str = left_trim<CharT>(trim<CharT>(str), Constants<CharT>::UPPER_V);
std::basic_string<CharT> spacedStr{ str };
replace_chars<CharT>(spacedStr, Constants<CharT>::DOT, Constants<CharT>::SPACE);

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Version.props" />
<Target Name="GenerateVersionData" BeforeTargets="PrepareForBuild">
<ItemGroup>
<HeaderLines Include="#pragma once" />

View File

@@ -57,6 +57,8 @@ properties:
EnableQoiThumbnail: false
PowerOcr:
Enabled: false
Workspaces:
Enabled: false
ShortcutGuide:
Enabled: false
VideoConference:

View File

@@ -57,6 +57,8 @@ properties:
EnableQoiThumbnail: true
PowerOcr:
Enabled: true
Workspaces:
Enabled: true
ShortcutGuide:
Enabled: true
VideoConference:

View File

@@ -220,7 +220,7 @@ class {{module.Name}} {
}
var enumsBlock = string.Join(DoubleNewLine, enumsToEmit.Select(EmitEnumDefinition));
var version = interop.CommonManaged.GetProductVersion().Replace("v", string.Empty);
var version = PowerToys.Interop.CommonManaged.GetProductVersion().Replace("v", string.Empty);
var outputResult = string.Empty;
outputResult += $$"""
@@ -393,7 +393,7 @@ class {{module.Name}} {
public static string EmitManifestFileContents()
{
var version = interop.CommonManaged.GetProductVersion().Replace("v", string.Empty);
var version = PowerToys.Interop.CommonManaged.GetProductVersion().Replace("v", string.Empty) + ".0";
var generatedDate = DateTime.Now.ToString("dd.MM.yyyy", CultureInfo.InvariantCulture);
return $$"""

View File

@@ -1,40 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
<Import Project="..\..\Common.SelfContained.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<RootNamespace>PowerToys.Settings.DSC.Schema</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<WindowsPackageType>None</WindowsPackageType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<SelfContained>true</SelfContained>
</PropertyGroup>
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<NoWarn></NoWarn>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningsNotAsErrors>CA1720</WarningsNotAsErrors>
<Optimize>False</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<NoWarn></NoWarn>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningsNotAsErrors>CA1720</WarningsNotAsErrors>
<Optimize>true</Optimize>
</PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.10" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.12" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyNamespaces>
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
</policyNamespaces>
<resources minRequiredRevision="1.10"/><!-- Last changed with PowerToys v0.81.1 -->
<resources minRequiredRevision="1.12"/><!-- Last changed with PowerToys v0.84.0 -->
<supportedOn>
<definitions>
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
@@ -19,6 +19,8 @@
<definition name="SUPPORTED_POWERTOYS_0_78_0" displayName="$(string.SUPPORTED_POWERTOYS_0_78_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_81_0" displayName="$(string.SUPPORTED_POWERTOYS_0_81_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_81_1" displayName="$(string.SUPPORTED_POWERTOYS_0_81_1)"/>
<definition name="SUPPORTED_POWERTOYS_0_83_0" displayName="$(string.SUPPORTED_POWERTOYS_0_83_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_84_0" displayName="$(string.SUPPORTED_POWERTOYS_0_84_0)"/>
</definitions>
</supportedOn>
<categories>
@@ -32,10 +34,17 @@
<category name="AdvancedPaste" displayName="$(string.AdvancedPaste)">
<parentCategory ref="PowerToys" />
</category>
<category name="MouseWithoutBorders" displayName="$(string.MouseWithoutBorders)">
<parentCategory ref="PowerToys" />
</category>
<category name="GeneralSettings" displayName="$(string.GeneralSettings)">
<parentCategory ref="PowerToys" />
</category>
</categories>
<policies>
<policy name="ConfigureGlobalUtilityEnabledState" class="Both" displayName="$(string.ConfigureGlobalUtilityEnabledState)" explainText="$(string.ConfigureGlobalUtilityEnabledStateDescription)" key="Software\Policies\PowerToys" valueName="ConfigureGlobalUtilityEnabledState">
<!--The name (id) of the policy is different to sort it as first policy in edit dialog. The order is sorted alphabetically based on the "name" property.-->
<policy name="ConfigureAllUtilityGlobalEnabledState" class="Both" displayName="$(string.ConfigureAllUtilityGlobalEnabledState)" explainText="$(string.ConfigureAllUtilityGlobalEnabledStateDescription)" key="Software\Policies\PowerToys" valueName="ConfigureGlobalUtilityEnabledState">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_75_0" />
<enabledValue>
@@ -356,6 +365,16 @@
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityWorkspaces" class="Both" displayName="$(string.ConfigureEnabledUtilityWorkspaces)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityWorkspaces">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_84_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityQuickAccent" class="Both" displayName="$(string.ConfigureEnabledUtilityQuickAccent)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityQuickAccent">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
@@ -467,7 +486,7 @@
</disabledValue>
</policy>
<policy name="AllowExperimentation" class="Both" displayName="$(string.AllowExperimentation)" explainText="$(string.AllowExperimentationDescription)" key="Software\Policies\PowerToys" valueName="AllowExperimentation">
<parentCategory ref="PowerToys" />
<parentCategory ref="GeneralSettings" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_68_0" />
<enabledValue>
<decimal value="1" />
@@ -503,5 +522,83 @@
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbClipboardSharingEnabled" class="Both" displayName="$(string.MwbClipboardSharingEnabled)" explainText="$(string.MwbClipboardSharingEnabledDescription)" key="Software\Policies\PowerToys" valueName="MwbClipboardSharingEnabled">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbFileTransferEnabled" class="Both" displayName="$(string.MwbFileTransferEnabled)" explainText="$(string.MwbFileTransferEnabledDescription)" key="Software\Policies\PowerToys" valueName="MwbFileTransferEnabled">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbUseOriginalUserInterface" class="Both" displayName="$(string.MwbUseOriginalUserInterface)" explainText="$(string.MwbUseOriginalUserInterfaceDescription)" key="Software\Policies\PowerToys" valueName="MwbUseOriginalUserInterface">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbDisallowBlockingScreensaver" class="Both" displayName="$(string.MwbDisallowBlockingScreensaver)" explainText="$(string.MwbDisallowBlockingScreensaverDescription)" key="Software\Policies\PowerToys" valueName="MwbDisallowBlockingScreensaver">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbSameSubnetOnly" class="Both" displayName="$(string.MwbSameSubnetOnly)" explainText="$(string.MwbSameSubnetOnlyDescription)" key="Software\Policies\PowerToys" valueName="MwbSameSubnetOnly">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbValidateRemoteIp" class="Both" displayName="$(string.MwbValidateRemoteIp)" explainText="$(string.MwbValidateRemoteIpDescription)" key="Software\Policies\PowerToys" valueName="MwbValidateRemoteIp">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbDisableUserDefinedIpMappingRules" class="Both" displayName="$(string.MwbDisableUserDefinedIpMappingRules)" explainText="$(string.MwbDisableUserDefinedIpMappingRulesDescription)" key="Software\Policies\PowerToys" valueName="MwbDisableUserDefinedIpMappingRules">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="MwbPolicyDefinedIpMappingRules" class="Both" displayName="$(string.MwbPolicyDefinedIpMappingRules)" explainText="$(string.MwbPolicyDefinedIpMappingRulesDescription)" presentation="$(presentation.MwbPolicyDefinedIpMappingRules)" key="Software\Policies\PowerToys">
<parentCategory ref="MouseWithoutBorders" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_83_0" />
<elements>
<!--Max length means here max length per line. We support 65 characters per line. (A string containing the hostname, a space and an IPv6 Address is max. 55 characters long.)-->
<multiText id="MwbPolicyDefinedIpMappingsList" valueName="MwbPolicyDefinedIpMappingRules" maxLength="65" required="true"/>
</elements>
</policy>
</policies>
</policyDefinitions>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.10" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.11" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<displayName>PowerToys</displayName>
<description>PowerToys</description>
<resources>
@@ -10,6 +10,9 @@
<string id="InstallerUpdates">Installer and Updates</string>
<string id="PowerToysRun">PowerToys Run</string>
<string id="AdvancedPaste">Advanced Paste</string>
<string id="Workspaces">Workspaces</string>
<string id="MouseWithoutBorders">Mouse Without Borders</string>
<string id="GeneralSettings">General settings</string>
<string id="SUPPORTED_POWERTOYS_0_64_0">PowerToys version 0.64.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_68_0">PowerToys version 0.68.0 or later</string>
@@ -22,8 +25,10 @@
<string id="SUPPORTED_POWERTOYS_0_78_0">PowerToys version 0.78.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_81_0">PowerToys version 0.81.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_81_1">PowerToys version 0.81.1 or later</string>
<string id="SUPPORTED_POWERTOYS_0_83_0">PowerToys version 0.83.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_84_0">PowerToys version 0.84.0 or later</string>
<string id="ConfigureGlobalUtilityEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
<string id="ConfigureAllUtilityGlobalEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
If you enable this setting, all utilities will be always enabled and the user won't be able to disable it.
@@ -107,6 +112,12 @@ If you don't configure this setting, users are able to enable or disable the plu
You can override this policy for individual plugins using the policy "Configure enabled state for individual plugins".
Note: Changes require a restart of PowerToys Run.
</string>
<string id="ConfigureEnabledUtilityWorkspaces">This policy configures the enabled disable state for the Workspaces utility.
If you enable or don't configure this policy, the user takes control over the enabled state of the Workspaces utility.
If you disable this policy, the user won't be able to enable Enable and use the Workspaces utility.
</string>
<string id="PowerToysRunIndividualPluginEnabledStateDescription">With this policy you can configure an individual enabled state for each PowerToys Run plugin that you add to the list.
@@ -121,13 +132,72 @@ You can set the enabled state for all plugins not configured by this policy usin
Note: Changes require a restart of PowerToys Run.
</string>
<string id="AllowPowerToysAdvancedPasteOnlineAIModelsDescription">This policy configures the enabled disable state for using Advanced Paste online AI models.
<string id="AllowPowerToysAdvancedPasteOnlineAIModelsDescription">This policy allows you to disable Advanced Paste online AI models.
If you enable or don't configure this policy, the user takes control over the enabled state of the Enable paste with AI Advanced Paste setting.
If you disable this policy, the user won't be able to enable Enable paste with AI Advanced Paste setting and use Advanced Paste AI prompt nor set up the Open AI key in PowerToys Settings.
</string>
<string id="ConfigureGlobalUtilityEnabledState">Configure global utility enabled state</string>
<string id="MwbClipboardSharingEnabledDescription">This policy configures if the user can share the clipboard between machines.
If you enable or don't configure this policy, the user takes control over the clipboard sharing setting.
If you disable this policy, the user won't be able to enable the clipboard sharing setting.
</string>
<string id="MwbFileTransferEnabledDescription">This policy configures if the user can transfer files between machines.
If you enable or don't configure this policy, the user takes control over the file sharing setting.
If you disable this policy, the user won't be able to enable the file sharing Settings.
Note: The file sharing feature depends on the clipboard sharing feature. Disabling clipboard sharing automatically disables file sharing too.
</string>
<string id="MwbUseOriginalUserInterfaceDescription">This policy configures if the user can use the old Mouse Without Borders user interface.
If you enable or don't configure this policy, the user takes control over the setting and can enable or disable the old user interface.
If you disable this policy, the user won't be able to enable the old user interface.
</string>
<string id="MwbDisallowBlockingScreensaverDescription">This policy configures if the user is allowed to disable the screensaver on the remote machines.
If you enable this policy, the user won't be able to enable the "block screensaver" screensaver setting and the screensaver is not blocked.
If you disable or don't configure this policy, the user takes control over the setting and can block the screensaver.
</string>
<string id="MwbSameSubnetOnlyDescription">This policy configures if connections are only allowed in the same subnet.
If you enable this policy, the setting is enabled and only connections in the same subnet are allowed.
If you disable this policy, the setting is disabled and all connections are allowed.
If you don't configure this policy, the user takes control over the setting and can enable or disable it.
</string>
<string id="MwbValidateRemoteIpDescription">This policy configures if reverse DNS lookup is used to validate the remote machine IP Address.
If you enable this policy, the setting is enabled and the IP Address is validated.
If you disable this policy, the setting is disabled and the IP Address is not validated.
If you don't configure this policy, the user takes control over the setting and can enable or disable it.
</string>
<string id="MwbDisableUserDefinedIpMappingRulesDescription">This policy configures if the user can define IP Address mapping rules.
If you enable this policy, the setting is disabled and the user can't define rules or use existing ones.
If you disable or don't configure this policy, the user takes control over the setting.
Note: Enabling this policy does not prevent policy defined mapping rules from working.
</string>
<string id="MwbPolicyDefinedIpMappingRulesDescription">This policy allows you to define IP Address mapping rules.
If you enable this policy, you can define IP Address mapping rules that the user can't change or disable.
Please enter one mapping per line in the format: "hostname IP"
If you disable or don't configure this policy, no predefined rules are applied.
</string>
<string id="ConfigureAllUtilityGlobalEnabledState">Configure global utility enabled state</string>
<string id="ConfigureEnabledUtilityAdvancedPaste">Advanced Paste: Configure enabled state</string>
<string id="ConfigureEnabledUtilityAlwaysOnTop">Always On Top: Configure enabled state</string>
<string id="ConfigureEnabledUtilityAwake">Awake: Configure enabled state</string>
@@ -157,6 +227,7 @@ If you disable this policy, the user won't be able to enable Enable paste with A
<string id="ConfigureEnabledUtilityPeek">Peek: Configure enabled state</string>
<string id="ConfigureEnabledUtilityPowerRename">Power Rename: Configure enabled state</string>
<string id="ConfigureEnabledUtilityPowerLauncher">PowerToys Run: Configure enabled state</string>
<string id="ConfigureEnabledUtilityWorkspaces">PowerToys Workspaces: Configure enabled state</string>
<string id="ConfigureEnabledUtilityQuickAccent">Quick Accent: Configure enabled state</string>
<string id="ConfigureEnabledUtilityRegistryPreview">Registry Preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityScreenRuler">Screen Ruler: Configure enabled state</string>
@@ -173,13 +244,24 @@ If you disable this policy, the user won't be able to enable Enable paste with A
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
<string id="ConfigureEnabledUtilityFileExplorerQOIPreview">QOI file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerQOIThumbnails">QOI file thumbnail: Configure enabled state</string>
<string id="AllowPowerToysAdvancedPasteOnlineAIModels">Advanced Paste: Allow using online AI models</string>
<string id="AllowPowerToysAdvancedPasteOnlineAIModels">Allow using online AI models</string>
<string id="MwbClipboardSharingEnabled">Clipboard sharing enabled</string>
<string id="MwbFileTransferEnabled">File transfer enabled</string>
<string id="MwbUseOriginalUserInterface">Original user interface is available</string>
<string id="MwbDisallowBlockingScreensaver">Disallow blocking screensaver on other machines</string>
<string id="MwbSameSubnetOnly">Connect only in same subnet</string>
<string id="MwbValidateRemoteIp">Validate remote machine IP Address</string>
<string id="MwbDisableUserDefinedIpMappingRules">Disable user defined IP Address mapping rules</string>
<string id="MwbPolicyDefinedIpMappingRules">Predefined IP Address mapping rules</string>
</stringTable>
<presentationTable>
<presentation id="PowerToysRunIndividualPluginEnabledState">
<listBox refId="PowerToysRunIndividualPluginEnabledList">List of managed plugins:</listBox>
</presentation>
<presentation id="MwbPolicyDefinedIpMappingRules">
<multiTextBox refId="MwbPolicyDefinedIpMappingsList">List of IP Address mappings:</multiTextBox>
</presentation>
</presentationTable>
</resources>

View File

@@ -1,23 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<Import Project="..\..\..\Common.SelfContained.props" />
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
<UseWinUI>true</UseWinUI>
<ApplicationIcon>Assets\AdvancedPaste\AdvancedPaste.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<SelfContained>true</SelfContained>
<AssemblyName>PowerToys.AdvancedPaste</AssemblyName>
<AssemblyDescription>PowerToys AdvancedPaste</AssemblyDescription>
<RootNamespace>AdvancedPaste</RootNamespace>
@@ -28,14 +25,6 @@
<DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants>
</PropertyGroup>
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
@@ -62,19 +51,19 @@
<PackageReference Include="Azure.AI.OpenAI" />
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="CommunityToolkit.WinUI.Animations" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.CsWin32" />
<PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="ReverseMarkdown" />
<!-- HACK: To align Microsoft.Bcl.AsyncInterfaces.dll version with PowerToys.Settings.csproj. -->
<PackageReference Include="StreamJsonRpc" />
<PackageReference Include="WinUIEx" />
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
<PackageReference Include="System.Text.Json" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

View File

@@ -88,9 +88,9 @@ namespace AdvancedPaste
}
}
NativeEventWaiter.WaitForEventLoop(interop.Constants.ShowAdvancedPasteSharedEvent(), OnAdvancedPasteHotkey);
NativeEventWaiter.WaitForEventLoop(interop.Constants.AdvancedPasteMarkdownEvent(), OnAdvancedPasteMarkdownHotkey);
NativeEventWaiter.WaitForEventLoop(interop.Constants.AdvancedPasteJsonEvent(), OnAdvancedPasteJsonHotkey);
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.ShowAdvancedPasteSharedEvent(), OnAdvancedPasteHotkey);
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.AdvancedPasteMarkdownEvent(), OnAdvancedPasteMarkdownHotkey);
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.AdvancedPasteJsonEvent(), OnAdvancedPasteJsonHotkey);
}
private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)

View File

@@ -24,6 +24,14 @@ namespace AdvancedPaste.Helpers
private static readonly char[] CsvDelimArry = [',', ';', '\t'];
private static readonly Regex CsvSepIdentifierRegex = new Regex(@"^sep=(.)$", RegexOptions.IgnoreCase);
// CSV: Split on every occurrence of the delimiter except if it is enclosed by " and ignore two " as escaped "
private static readonly string CsvDelimSepRegexStr = @"(?=(?:[^""]*""[^""]*"")*(?![^""]*""))";
// CSV: Regex to remove/replace quotation marks
private static readonly Regex CsvRemoveSingleQuotationMarksRegex = new Regex(@"^""(?!"")|(?<!"")""$|^""""$");
private static readonly Regex CsvRemoveStartAndEndQuotationMarksRegex = new Regex(@"^""(?=(""{2})+)|(?<=(""{2})+)""$");
private static readonly Regex CsvReplaceDoubleQuotationMarksRegex = new Regex(@"""{2}");
internal static string ToJsonFromXmlOrCsv(DataPackageView clipboardData)
{
Logger.LogTrace();
@@ -131,7 +139,7 @@ namespace AdvancedPaste.Helpers
{
if (string.IsNullOrEmpty(jsonText))
{
var csv = new List<string[]>();
var csv = new List<IEnumerable<string>>();
string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
@@ -146,10 +154,12 @@ namespace AdvancedPaste.Helpers
continue;
}
// A CSV line is valid, if the delimiter occurs more or equal times in every line compared to the first data line. (More because sometimes the delimiter occurs in a data string.)
if (line.Count(x => x == delim) >= delimCount)
// A CSV line is valid, if the delimiter occurs equal times in every line compared to the first data line
// and if every line contains no or an even count of quotation marks.
if (Regex.Count(line, delim + CsvDelimSepRegexStr) == delimCount && int.IsEvenInteger(line.Count(x => x == '"')))
{
csv.Add(line.Split(delim));
string[] dataCells = Regex.Split(line, delim + CsvDelimSepRegexStr, RegexOptions.IgnoreCase);
csv.Add(dataCells.Select(x => ReplaceQuotationMarksInCsvData(x)));
}
else
{
@@ -205,7 +215,7 @@ namespace AdvancedPaste.Helpers
// We get the count from the second line, as the first one only contains the character definition and not a CSV data line.
char delimChar = matchChar.Groups[1].Value.Trim()[0];
delimiter = delimChar;
delimiterCount = csvLines[1].Count(x => x == delimChar);
delimiterCount = Regex.Count(csvLines[1], delimChar + CsvDelimSepRegexStr, RegexOptions.IgnoreCase);
}
}
@@ -214,19 +224,19 @@ namespace AdvancedPaste.Helpers
// Try to select the correct delimiter based on the first two CSV lines from a list of predefined delimiters.
foreach (char c in CsvDelimArry)
{
int cntFirstLine = csvLines[0].Count(x => x == c);
int cntFirstLine = Regex.Count(csvLines[0], c + CsvDelimSepRegexStr, RegexOptions.IgnoreCase);
int cntNextLine = 0; // Default to 0 that the 'second line' check is always true.
// Additional count if we have more than one line
if (csvLines.Length >= 2)
{
cntNextLine = csvLines[1].Count(x => x == c);
cntNextLine = Regex.Count(csvLines[1], c + CsvDelimSepRegexStr, RegexOptions.IgnoreCase);
}
// The delimiter is found if the count is bigger as from the last selected delimiter
// and if the next csv line does not exist or has the same number or more occurrences of the delimiter.
// and if the next csv line does not exist or has the same number of occurrences of the delimiter.
// (We check the next line to prevent false positives.)
if (cntFirstLine > delimiterCount && (cntNextLine == 0 || cntNextLine >= cntFirstLine))
if (cntFirstLine > delimiterCount && (cntNextLine == 0 || cntNextLine == cntFirstLine))
{
delimiter = c;
delimiterCount = cntFirstLine;
@@ -240,5 +250,26 @@ namespace AdvancedPaste.Helpers
throw new FormatException("Invalid CSV format: Failed to detect the delimiter.");
}
}
/// <summary>
/// Remove and replace quotation marks used as control sequences. (Enclosing quotation marks and escaping quotation marks.)
/// </summary>
/// <param name="str">CSV cell data to manipulate.</param>
/// <returns>Manipulated string.</returns>
private static string ReplaceQuotationMarksInCsvData(string str)
{
// Remove first and last single quotation mark (enclosing quotation marks) and remove quotation marks of an empty data set ("").
str = CsvRemoveSingleQuotationMarksRegex.Replace(str, string.Empty);
// Remove first quotation mark if followed by pairs of quotation marks
// and remove last quotation mark if precede by pairs of quotation marks.
// (Removes enclosing quotation marks around the cell data for data like /"""abc"""/.)
str = CsvRemoveStartAndEndQuotationMarksRegex.Replace(str, string.Empty);
// Replace pairs of two quotation marks with a single quotation mark. (Escaped quotation marks.)
str = CsvReplaceDoubleQuotationMarksRegex.Replace(str, "\"");
return str;
}
}
}

View File

@@ -1,22 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<Import Project="..\..\..\Common.SelfContained.props" />
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RootNamespace>EnvironmentVariables</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<Platforms>x64;ARM64</Platforms>
<EnableMsixTooling>true</EnableMsixTooling>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>None</WindowsPackageType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<SelfContained>true</SelfContained>
<DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants>
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
<AssemblyName>PowerToys.EnvironmentVariables</AssemblyName>
@@ -47,14 +45,6 @@
<Message Text="Copied CopyPRIFileToOutputDir files" Importance="High" />
</Target>
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
@@ -71,11 +61,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="WinUIEx" />
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
<PackageReference Include="System.Text.Json" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

View File

@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Condition="exists('..\..\..\Version.props')" Project="..\..\..\Version.props" />
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0-windows10.0.20348</TargetFramework>
<RootNamespace>EnvironmentVariablesUILib</RootNamespace>
<UseWinUI>true</UseWinUI>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
@@ -19,7 +19,6 @@
<PropertyGroup>
<!-- Properties for nuget package. -->
<Authors>Microsoft Corporation</Authors>
<Description>Implements the UI control for the PowerToys Environment Variables Utility</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
@@ -38,25 +37,7 @@
<Content Remove="Assets\**\*.ico" Pack="false" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
@@ -68,6 +49,8 @@
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" />
<PackageReference Include="System.IO.Abstractions" />
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
<PackageReference Include="System.Text.Json" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
<Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(SolutionDir)tools\build\convert-resx-to-rc.ps1 $(MSBuildThisFileDirectory) resource.base.h resource.h FileLocksmithContextMenu.base.rc FileLocksmithContextMenu.rc" />
</Target>
@@ -98,7 +99,30 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Com
<None Include="Resources.resx" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\FileLocksmith\**" CopyToOutputDirectory="PreserveNewest" />
<None Include="Assets\FileLocksmith\FileLocksmith.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\LargeTile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\SmallTile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\SplashScreen.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\Square150x150Logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\Square44x44Logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\storelogo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Assets\FileLocksmith\Wide310x150Logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\SettingsAPI\SettingsAPI.vcxproj">
@@ -118,11 +142,14 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Com
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View File

@@ -37,10 +37,38 @@
<None Include="Resources.resx">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\FileLocksmith.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\LargeTile.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\SmallTile.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\SplashScreen.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\Square44x44Logo.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\Square150x150Logo.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\storelogo.png">
<Filter>Resource Files</Filter>
</None>
<None Include="Assets\FileLocksmith\Wide310x150Logo.png">
<Filter>Resource Files</Filter>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="FileLocksmithContextMenu.base.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.231216.1" targetFramework="native" />
</packages>

Some files were not shown because too many files have changed in this diff Show More