259 Commits

Author SHA1 Message Date
leileizhang
9a998b2056
[UI Tests] Enhance UI Test Automation and Pipeline Support for CmdPal Module (#40871)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
<!-- 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 pull request introduces enhancements to UI test automation,
improvements to pipeline configuration, and project structure updates.
The goal is to improve flexibility, maintainability, and efficiency in
PowerToys’ CI/CD processes.

### UI Test Enhancements:
Delayed Text Input Support
- UI tests now support character-by-character text input with
configurable delays.
- This serves as a workaround for a known CmdPal bug where input is
swallowed too quickly. The delay mitigates the issue until it is fixed
in CmdPal.
 
Centralized Environment Management
- Introduced a new class to centralize environment variable access for
UI test configuration.

CmdPal Launch Handling in Pipelines

- Adjusted test logic to handle CmdPal module startup specifically in CI
pipelines



### Pipeline Configuration Updates:
Build Artifact Customization

- Included test-related folders in pipeline build outputs for better
traceability.

Support for Build ID Targeting

- Added support for specifying PowerToys build IDs in test pipelines,
with conditional logic for specific or latest build selection.
<img width="264" height="44" alt="image"
src="https://github.com/user-attachments/assets/0d68a51e-e41a-4868-a1c3-f4233c56b0ee"
/>


### Project Structure Updates:
Added Peek.UITests back to the solution which removed by
https://github.com/microsoft/PowerToys/pull/40754

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

- [ ] Closes: #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the 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
2025-07-31 13:55:23 +08:00
Yu Leng
46d380c2b6
[CmdPal][UnitTest] Refactor system command unit test (#40874)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
<!-- 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
Ok... The AI generated and migrated ut's quality is very poor. We need
to refactor it.

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

- [x] Closes: #40875
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2025-07-30 17:19:40 +08:00
Yu Leng
e1474c1f30
[Tests] Fix PowerToys.sln to make cmdpal unit tests listed in the Test folder (#40804)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
<!-- 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. Just change the sln to show cmdpal unit test in the Tests folder.
2. Move cmdpal UITest into Tests folder

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

- [ ] Closes: #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the 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: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2025-07-25 15:35:36 +08:00
Gleb Khmyznikov
474756036e
[Tests] More consistent naming (#40754)
- [x] **Tests:** Added/updated and all pass
- [x] **Dev docs:** Added/updated

<img width="460" height="1017" alt="image"
src="https://github.com/user-attachments/assets/e72bf221-0875-48c3-b790-4ab1182c7d3a"
/>

I haven't touched the Run module, since we may deprecate it.

Closes: #40788
2025-07-24 17:53:22 +02:00
leileizhang
28c41d0838
[UI tests] Add basic UI Tests for Text Extractor (#40769)
<!-- 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
Text Extractor can be opened on all machines.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #40672 
- [ ] **Communication:** I've discussed this with core contributors
already. If the 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
2025-07-24 10:52:27 +08:00
leileizhang
155275918f
[Unit tests] Add unit tests for CmdPal Calc (#40770)
<!-- 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
Move calculator tests from PowerToys Run to CmdPal
<img width="800" height="496" alt="image"
src="https://github.com/user-attachments/assets/ca9b7f15-aef8-4ddf-a041-315df45351de"
/>

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

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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
2025-07-24 10:09:43 +08:00
Shawn Yuan
37c80b40bf
[UITest] Added UITest for advancedPaste (#40745)
<!-- 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
Added UITest for advancedPaste
Also add test init code for color picker and settings.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the 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

---------

Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
2025-07-23 17:18:04 +08:00
Yu Leng
2a53fd137a
[cmdpal] Migrate some plugin's unit tests from PT run to cmdpal. (#40462)
<!-- 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
Migrate blow plugin's from UT to cmdpal:
1. TimeDate
2. WindowWalker
3. System
4. Registry

This PR is mostly helped by Copilot. Please feel free to change cases in
the future.

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

- [x] **Closes:** #40461
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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: Yu Leng <yuleng@microsoft.com>
2025-07-22 17:25:07 +08:00
leileizhang
8479d0f084
[UI tests] Add full UI test coverage for Peek based on release checklist (#40734)
<!-- 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 full UI test coverage for Peek based on release checklist

### Peek
 * Open different files to check that they're shown properly
   - [x] Image
   - [x] Text or dev file
   - [x] Markdown file
   - [ ] PDF
   - [x] Archive files (.zip, .tar, .rar)
- [x] Any other not mentioned file (.exe for example) to verify the
unsupported file view is shown

 * Pinning/unpinning
- [x] Pin the window, switch between images of different size, verify
the window stays at the same place and the same size.
- [x] Pin the window, close and reopen Peek, verify the new window is
opened at the same place and the same size as before.
- [x] Unpin the window, switch to a different file, verify the window is
moved to the default place.
- [x] Unpin the window, close and reopen Peek, verify the new window is
opened on the default place.

* Open with a default program
   - [x] By clicking a button.
   - [x] By pressing enter. 

- [x] Switch between files in the folder using `LeftArrow` and
`RightArrow`, verify you can switch between all files in the folder.
- [x] Open multiple files, verify you can switch only between selected
files.

<img width="519" height="266" alt="image"
src="https://github.com/user-attachments/assets/f27c555d-9939-476f-9ecc-50d598285aef"
/>


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

- [x] **Closes:**
#[40676](https://github.com/microsoft/PowerToys/issues/40676)
- [ ] **Communication:** I've discussed this with core contributors
already. If the 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
2025-07-22 09:00:39 +08:00
Yu Leng
ca473b488b
[CmdPal][UI Tests] Add basic test cases for cmdpal (#40694)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
<!-- 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. Create some basic cmdpal test cases.
2. Add ui tests support for cmdpal modules.


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

- [x] **Closes:** #40695
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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: Yu Leng <yuleng@microsoft.com>
2025-07-18 16:22:37 +08:00
Mike Griese
cc16b61eb7
Create a Microsoft.CmdPal.Core.ViewModels project (#40560)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
_targets #40504_ 

Major refactoring for #40113

This moves a large swath of the codebase to a `.Core` project. "Core"
doesn't have any explicit dependencies on "extensions", settings or the
current `MainListPage`. It's just a filterable list of stuff. This
should let us make this component a bit more reusable.

This is half of a PR. As I did this, I noticed a particular bit of code
for TopLevelVViewModels and CommandPaletteHost that was _very rough_.
Solving it in this PR would make "move everything to a new project" much
harder to review. So I'm submitting two PRs simultaneously, so we can
see the changes separately, then merge together.
2025-07-15 12:21:44 -05:00
Pedro Lamas
071f5d7bcc
Adds BgcodeThumbnailProvider and BgcodePreviewHandler (#38667)
<!-- 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

- [X] **Closes:** #30352
- [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
- [ ] **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
- [ ] [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


![image](https://github.com/user-attachments/assets/62c0cbbb-fbca-4bb3-82fe-696ba40da83d)


![image](https://github.com/user-attachments/assets/3f2f1346-91fb-4f49-85b9-8cd6e19e68e9)

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

- Close PowerToys if installed in your machine
- Full build the solution: PowerToys.sln
- Start PowerToys from PowerToys\x64\Debug\PowerToys.exe or
PowerToys\x64\Release\PowerToys.exe
- Toggle the "Binary G-code thumbnail previewer" setting to enable
- Open HelperFiles folder on the tests and check if the icon changes to
an image
- Check explorer preview to see if image is also shown there

---------

Co-authored-by: leileizhang <leilzh@microsoft.com>
2025-07-10 17:20:30 +08:00
Yu Leng
802bc3bd34
[UI automation test] Add basic tests case for powerrename module. (#40393)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
<!-- 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. Add command args support in ui test core
2. Add command line parse logic in powerrename
3. Add some test cases.

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

- [ ] **Closes:** #xxx
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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: Yu Leng <yuleng@microsoft.com>
2025-07-09 14:32:40 +08:00
Yu Leng
1020c5abae
[AOT] move some LibraryImport define to common to avoid dup code (#40006)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
<!-- 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
To avoid dup code, try to move some LibraryImport define to common
folder.
This can make other modules/extensions easy to use.

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

- [x] **Closes:** #xxx
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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: Yu Leng <yuleng@microsoft.com>
2025-06-19 13:45:44 +08:00
XiaofengWang
350b9b78fe
UI Test Automation (#39777)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
### Summary

This pull request includes the following updates:

1. Improvements and stabilization of the UI automation framework  
2. Setup of the UI automation pipeline  
3. Add UI test cases for FancyZones  
4. Add UI test cases for MouseUtils  
5. Improvements of Hosts Editor UI tests

---

### Related Links

- **Current Release checklist coverage**:  
 
https://github.com/microsoft/PowerToys/blob/feature/UITestAutomation/src/common/UITestAutomation/Doc/ui-automation-cover-list.md

- **UI Automation pipeline**:  
 
https://microsoft.visualstudio.com/Dart/_build?definitionId=161438&_a=summary

---------

Signed-off-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
Co-authored-by: Jerry Xu <n.xu@outlook.com>
Co-authored-by: Zhaopeng Wang <zhaopengwang@microsoft.com>
Co-authored-by: Xiaofeng Wang (from Dev Box) <xiaofengwang@microsoft.com>
Co-authored-by: Mengyuan <162882040+chenmy77@users.noreply.github.com>
Co-authored-by: yaqingmi <miyaqing01@gmail.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Yaqing Mi (from Dev Box) <yaqingmi@microsoft.com>
Co-authored-by: Kai Tao <69313318+vanzue@users.noreply.github.com>
Co-authored-by: zhaopeng wang <33367956+wang563681252@users.noreply.github.com>
Co-authored-by: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com>
Co-authored-by: RokyZevon <12629919+RokyZevon@users.noreply.github.com>
Co-authored-by: Yu Leng <42196638+moooyo@users.noreply.github.com>
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com>
Co-authored-by: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
Co-authored-by: ruslanlap <106077551+ruslanlap@users.noreply.github.com>
Co-authored-by: Muhammad Danish <mdanishkhdev@gmail.com>
Co-authored-by: Bennett Blodinger <benwa@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Ionuț Manța <ionut@janeasystems.com>
Co-authored-by: Hao Liu <liuhaobupt@163.com>
Co-authored-by: OlegHarchevkin <40352094+OlegKharchevkin@users.noreply.github.com>
Co-authored-by: dcog989 <89043002+dcog989@users.noreply.github.com>
Co-authored-by: PesBandi <127593627+PesBandi@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: vanzue <vanzue@outlook.com>
Co-authored-by: Typpi <20943337+Nick2bad4u@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
Co-authored-by: Abhyudit <64366765+bitmap4@users.noreply.github.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Ved Nig <vednig12@outlook.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Aung Khaing Khant <aungkhaingkhant.dev@gmail.com>
Co-authored-by: Aung Khaing Khant <aungkhaingkhant@advent-soft.com>
Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: Shawn Yuan <128874481+shuaiyuanxx@users.noreply.github.com>
Co-authored-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
Co-authored-by: cryolithic <cryolithic@gmail.com>
Co-authored-by: Lemonyte <49930425+lemonyte@users.noreply.github.com>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
Co-authored-by: Corey Hayward <72159232+CoreyHayward@users.noreply.github.com>
Co-authored-by: Jerry Xu <nxu@microsoft.com>
Co-authored-by: Shawn Yuan <shuaiyuan@microsoft.com>
Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2025-06-17 17:56:48 +08:00
leileizhang
2d1676b7df
[CmdPal][AOT] Using ExprTk to make the Cal extension AOT-compatible (#39972)
<!-- 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 replaces the original Mages-based expression evaluation engine
with a WinRT-wrapped version of Exprtk in the CmdPalCalculator module.

### Key Changes
**Expression Engine:**

- All expression parsing and evaluation now use Exprtk (via a WinRT
wrapper) instead of Mages.

**Base Conversion Handling:**

- Since Exprtk does not support non-decimal (binary, octal, hexadecimal)
input natively, added logic to convert all such inputs to decimal before
evaluation.

**Code Structure:**

- The overall logic and API surface remain unchanged except for the
engine and base conversion handling.
- All previous Mages references and dependencies have been removed.

<!-- 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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2025-06-13 12:27:53 +08:00
Kai Tao
8506b47544
Workspaceslib ut (#40007)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
This pull request introduces a new unit testing framework for the
`WorkspacesLib` module, adds test coverage for various utilities, and
integrates the new test project into the build system. Key changes
include adding the `WorkspacesLibUnitTests` project, implementing tests
for `AppUtils`, `JsonUtils`, and `PwaHelper`, and updating the build
configuration to include the new test project.

### Unit Tests Added:
* **`AppUtilsTests`**:
- Added comprehensive tests for methods such as `GetCurrentFolder`,
`IsEdge`, `IsChrome`, and `IsSteamGame` to validate their behavior under
various conditions.
* **`JsonUtilsTests`**:
- Implemented tests for reading and writing workspace data, including
scenarios for invalid JSON, non-existent files, and valid workspace
lists.
* **`PwaHelperTests`**:
- Added tests to ensure the stability of `PwaHelper` methods, such as
`GetEdgeAppId`, `GetChromeAppId`, and `SearchPwaName`, even with invalid
or empty inputs.

### Build System Updates:
* **New Test Project Integration**:
- Added the `WorkspacesLibUnitTests` project to the solution file
`PowerToys.sln` with appropriate dependencies.
- Updated build configurations to include the new test project for both
Debug and Release builds across architectures.
[[1]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R2208-R2215)
[[2]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R2841)

### Pipeline Adjustments:
* **Test Discovery**:
- Updated the pipeline configuration in
`.pipelines/v2/templates/job-build-project.yml` to discover the new
`WorkspacesLibUnitTests.dll` during test runs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-13 10:51:22 +08:00
Mengyuan
02a9269435
[Fuzz] Add Fuzz testing for FancyZones (#38165)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
* Add FancyZones.FuzzTests Module for fuzzing grid from json element

* remove unuse test cs

* fix spell error

* remove specific modify in job-fuzz.yml

* add Testably.Abstractions.FileSystem.Interface.dll

* fix spell error

* add dependency dll

* add annotations

* fix pipeline error  need to import 'Common.Dotnet.CsWinRT.props'
2025-05-28 14:56:37 +08:00
leileizhang
4be6129835
[Fuzzing] Add PowerRename Fuzzing and C++ Project Setup Guidance (#38922)
* add fuzz

* update solution

* update pipeline

* update solution

* remove arm64

* use reference

* revert the code

* add fuzzing readme

* update solution

* fix spell-check

* Parent reference don't need update

* remove fuzzing config

* add debug config

* update the config
2025-04-23 17:05:29 +08:00
Stefan Markovic
c7789abf04
CmdPal: Add low-level keyboard hook for global hotkey (#38250)
Some checks are pending
Spell checking / Check Spelling (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
Adds the ability to make the global CmdPal hotkey a low-level hook. This is needed for `win+space`, `win+r`, et al. 

I've only added this to the root hotkey. Other hotkeys will still use the normal `RegisterHotkey` ones. We can re-evaluate this for 0.2+.



Originally: https://github.com/zadjii-msft/PowerToys/issues/349

Solves: https://github.com/microsoft/PowerToys/issues/38297

---------

Co-authored-by: Mike Griese <migrie@microsoft.com>
2025-04-16 05:36:01 -05:00
Mike Griese
2b5181b4c9
Rename the [Ee]xts dir to ext (#38852)
Some checks are pending
Spell checking / Check Spelling (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
**WARNING:** This PR will probably blow up all in-flight PRs

at some point in the early days of CmdPal, two of us created seperate
`Exts` and `exts` dirs. Depending on what the casing was on the branch
that you checked one of those out from, it'd get stuck like that on your
PC forever.

Windows didn't care, so we never noticed.

But GitHub does care, and now browsing the source on GitHub is basically
impossible.

Closes #38081
2025-04-15 06:07:22 -05:00
Mike Griese
f68f408be3
Add the Command Palette module (#37908)
Windows Command Palette ("CmdPal") is the next iteration of PowerToys Run. With extensibility at its core, the Command Palette is your one-stop launcher to start _anything_.

By default, CmdPal is bound to <kbd>Win+Alt+Space</kbd>.

![cmdpal-pr-002](https://github.com/user-attachments/assets/5077ec04-1009-478a-92d6-0a30989d44ac)
![cmdpal-pr-003](https://github.com/user-attachments/assets/63b4762a-9c19-48eb-9242-18ea48240ba0)

----

This brings the current preview version of CmdPal into the upstream PowerToys repo. There are still lots of bugs to work out, but it's reached the state we're ready to start sharing it with the world. From here, we can further collaborate with the community on the features that are important, and ensuring that we've got a most robust API to enable developers to build whatever extensions they want. 

Most of the built-in PT Run modules have already been ported to CmdPal's extension API. Those include:
* Installed apps
* Shell commands
* File search (powered by the indexer)
* Windows Registry search
* Web search
* Windows Terminal Profiles
* Windows Services
* Windows settings


There are a couple new extensions built-in
* You can now search for packages on `winget` and install them right from the palette. This also powers searching for extensions for the palette
* The calculator has an entirely new implementation. This is currently less feature complete than the original PT Run one - we're looking forward to updating it to be more complete for future ingestion in Windows
* "Bookmarks" allow you to save shortcuts to files, folders, and webpages as top-level commands in the palette. 

We've got a bunch of other samples too, in this repo and elsewhere

### PowerToys specific notes

CmdPal will eventually graduate out of PowerToys to live as its own application, which is why it's implemented just a little differently than most other modules. Enabling CmdPal will install its `msix` package. 

The CI was minorly changed to support CmdPal version numbers independent of PowerToys itself. It doesn't make sense for us to start CmdPal at v0.90, and in the future, we want to be able to rev CmdPal independently of PT itself. 


Closes #3200, closes #3600, closes #7770, closes #34273, closes #36471, closes #20976, closes #14495
  
  
-----

TODOs et al


**Blocking:**
- [ ] Images and descriptions in Settings and OOBE need to be properly defined, as mentioned before
  - [ ] Niels is on it
- [x] Doesn't start properly from PowerToys unless the fix PR is merged.
  - https://github.com/zadjii-msft/PowerToys/pull/556 merged
- [x] I seem to lose focus a lot when I press on some limits, like between the search bar and the results.
  - This is https://github.com/zadjii-msft/PowerToys/issues/427
- [x] Turned off an extension like Calculator and it was still working.
  - Need to get rid of that toggle, it doesn't do anything currently
- [x] `ListViewModel.<FetchItems>` crash
  - Pretty confident that was fixed in https://github.com/zadjii-msft/PowerToys/pull/553

**Not blocking / improvements:**
- Show the shortcut through settings, as mentioned before, or create a button that would open CmdPalette settings.
- When PowerToys starts, CmdPalette is always shown if enabled. That's weird when just starting PowerToys/ logging in to the computer with PowerToys auto-start activated. I think this should at least be a setting.
- Needing to double press a result for it to do the default action seems quirky. If one is already selected, I think just pressing should be enough for it to do the action.
  - This is currently a setting, though we're thinking of changing the setting even more: https://github.com/zadjii-msft/PowerToys/issues/392
- There's no URI extension. Was surprised when typing a URL that it only proposed a web search.
- [x] There's no System commands extension. Was expecting to be able to quickly restart the computer by typing restart but it wasn't there.
  - This is in PR https://github.com/zadjii-msft/PowerToys/pull/452  
  
---------

Co-authored-by: joadoumie <98557455+joadoumie@users.noreply.github.com>
Co-authored-by: Jordi Adoumie <jordiadoumie@microsoft.com>
Co-authored-by: Mike Griese <zadjii@gmail.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Michael Hawker <24302614+michael-hawker@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Kristen Schau <47155823+krschau@users.noreply.github.com>
Co-authored-by: Eric Johnson <ericjohnson327@gmail.com>
Co-authored-by: Ethan Fang <ethanfang@microsoft.com>
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
2025-03-19 01:39:57 -07:00
chenmy77
a00f56e317
[Fuzz] Add Fuzz testing for RegistryPreview (#37607)
Some checks are pending
Spell checking / Check Spelling (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
* Add fuzz test cases

* add fuzz tests framework in registrypreview

* add registrypreview fuzzing code

* add annotations and change net7.0--net8.0

* merge main into code

* add registry fuzz sln

* change fuzzing tests scope

* remove unuse annotations

* fix typos

* change public parser to internel and private

* fix linelower error and modify filenametext to registryContent

* Revert "fix linelower error and modify filenametext to registryContent"

This reverts commit e8269b8af275dc0487cb6e1f630b45e6a2086727.

* add fuzz tests in sln

* modify typos

* clean code

Co-authored-by: leileizhang <leilzh@microsoft.com>

* add annotations

---------

Co-authored-by: leileizhang <leilzh@microsoft.com>
2025-03-13 10:23:02 +08:00
Jerry Xu
959a54bcd9
Revert "[Hosts] Add UITest Cases for Hosts Module" (#37619)
* Revert "[Hosts] Add UITest Cases for Hosts Module (#37600)"

This reverts commit c656dcc9c590dad0bffb5527825d30edbef14aa8.

* Matching all UITest projects and UITestAutomation project

* Add back Hosts UITests

---------

Co-authored-by: Jerry Xu <nxu@microsoft.com>
2025-02-26 07:55:15 +08:00
leileizhang
9f008a65d6
[Build] Revert "[Hosts] Add UITest Cases for Hosts Module (#37600)" to fix CI issue (#37606)
Revert "[Hosts] Add UITest Cases for Hosts Module (#37600)"

This reverts commit c656dcc9c590dad0bffb5527825d30edbef14aa8.
2025-02-24 16:30:33 +00:00
Jerry Xu
c656dcc9c5
[Hosts] Add UITest Cases for Hosts Module (#37600)
* Add UI-Tests for Host Module
2025-02-24 19:32:13 +08:00
dreamstart
9453e38881
UITestAutomation Framework (#37461)
* Add UITestAutomation framework

* add code comments

* Optimized code format

* Optimized code format

* Update commons and add keyboard manager ui test project

* Optimized code format

* test scope and fix fancyzone exe path

* Add readme

* Optimize helper functions and UI test method

* Fix spelling errors and restore module UI tests

* Restore Indent

* Update NOTICE.md

* Update comments to Session and Elements

* Update comments for Button and Window

* delete unnecessary code

* change FindElementByName to FindElmenet

* Update comments for ModuleConfigData

* Update readme and comments

* Remove extra comments

* change public property

* Optimize code readability

* add default Attach Function

* change attach function name

* Update comments to XML format

* Hide by internal functions

* Update readme

* Refine the framework

* Fix process start position and update readme

* Remove Enum PowerToysModuleWindow

* Update attach comments

* Update ModuleConfigData comments

---------

Co-authored-by: Zhaopeng Wang (from Dev Box) <zhaopengwang@microsoft.com>
Co-authored-by: Xiaofeng Wang (from Dev Box) <xiaofengwang@microsoft.com>
Co-authored-by: urnotdfs <709586527@qq.com>
2025-02-20 13:25:20 +08:00
chenmy77
a1a02889d5
[Fuzz] Add fuzz testing for Hosts (#37516)
* add hostsfile fuzztests templates code

* modify  typos of hostsfile

* add hosts file

* add hosts fuzz to pipeline

* modify varify depjson rule

* fuzz validIPv4

* update  .net7 to .net 8

* add valid6/validhosts tests on hosts

* catch all exception

* update onefuzzconfig.json to add 3 test cases

* add fuzz writeasync tests and fill exception

* add writeasync onefuzz config

* add dll of writeasync in job dependencies

* for testing az

* change file

* use mock filesystem in hosts tests projct

* fix spell erro

* fix spell erro and change notations

* update test

* fix space erro in code

* install python

* update

* test

* use powershell

* remove unused dll in oneconfig.json


* change download artifacts

* update

* test

* add

* test

* merge

* az

* change

* update

* test cli

* add debug

* test large

* fix

* use templete

* remove pdb file filter in job test project

* fix x64 python install

* for testing

* add

* fix

* use 3.11.1

* change for test

* revert some testing file

* update the file name for spelling check

* use azure cli zip

* use aka.ms

* rename the zip file

* remove test artifactname

* add exception and job dependencies

* Remove the limitation of fuzzing only on hosts

* add fuzz readme

* remove unused changes and space

* fix x86 in sln and remove newtonsoft.json.dll in oneconfig.json

* readd wrapper.dll in oneconfig.json

* drop randomsplit when fuzz writeasync and remove unuseful package

---------
2025-02-20 10:39:42 +08:00
Hao Liu
68afc6623f
[KeyboardManager WinUI3] Create WinUI3 project and wrapper for Keyboard Manager Editor (#37427)
* Set up KBM WinUI3 Editor UI project

* Test invoking the KBM library via wrapper for WinUI3 C# UI

* Set up Editor Library Wrapper and enable logging

* fix spelling

* update spacing and remove unused file

* fix formatting

* update sln

* update wrapper project config

* import common props

* update UI reference

* gate the new editor with the experimentation toggle in settings
2025-02-18 17:10:15 +08:00
Jaime Bernardo
21fd5092b3
[New utility]Sysinternals ZoomIt (#35880)
* ZoomIt initial code dump

* Change vcxproj to normalize dependency versions

* Fix code quality to build

* Add to PowerToys solution

* Clean out C-style casts

* Fix some more analyzer errors

* Constexpr a function

* Disable some warnings locally that it seemed better not to touch

* Add ZoomIt module interface

* Add GPO

* Add Settings page with Enable button

* Output as PowerToys.ZoomIt.exe

* Extract ZoomIt Settings definition to its own header

* Make ZoomItModuleInterface build with ZoomItSettings too

* WinRT C++ interop for ZoomItSettings

* From Registry To PowerToys Json

* Properly fix const_cast analyzer error

* Initial Settings page loading from registry

* Zoom mode settings

* Save settings

* Add file picker and DemoType file support

* Remaining DemoType settings

* Have ZoomIt properly reloading Settings and exiting

* Remove context menu entries for Options and Exit

* ZoomIt simple Break Options

* Break advanced options

* Simple Record settings

* Record Microphone setting

* Fix break background file picker title

* Font setting

* Fix build issues after merge

* Add ZoomIt conflict warning to Settings

* Exclude Eula from spell checking

* Fix spellcheck errors

* Fix spell check for accelerated menu items

* Remove cursor files from spellcheck. They're binary

* Fix forbidden patterns

* Fix XAML style

* Fix C# analyzers

* Fix signing

* Also sign module interface dll

* Use actual ZoomIt icon

* Add OOBE page for ZoomIt

* ZoomIt image for Settings

* Flyout and Dashboard entries

* Fix type speed slider labels

* Correctly load default Font

* Correctly register shortcuts on ZoomIt startup first run

* Fix modifier keys not changing until restart

* Show MsgBox on taken shortcut

* Start PowerToys Settings

* Normalize ZoomIt file properties with rest of PowerToys

* Add attribution

* Add ZoomIt team to Community.md

* More copyright adjustments

* Fix spellcheck

* Fix MsgBox simultaneous instance to the front

* Add mention of capturevideosample code use

* Add ZoomIt to process lists

* Add telemetry

* Add logging

* React to gpo

* Normalize code to space identation

* Fix installer build

* Localize percent setting

* Fix XAML styling

* Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>

* Fix spellcheck

* One more spellcheck fix

* Integrate LiveDraw feature changes from upstream

* Fix name reuse in same scope

* Fix c-style casts

* Also register LIVEDRAW_HOTKEY

* Fix newLiveZoomToggleKey

* Update LiveZoom description in Settings to take LiveDraw into account

* Fix spellcheck

* Fix more spellcheck

* Fix Sysinternals capitalization

* Fix ARM64 Debug build

* Support Sysinternals build (#36873)

* Remove unneeded files

* Make build compatible with Sysinternals

* Separate PowerToys ZoomIt product name (#36887)

* Separate PowerToys ZoomIt product name

To help maintain the Sysinternals branding in the standalone version.

* Clarify branding-related includes

* Remove ZoomIt.sln

* Add foxmsft to spell-check names

* Add ZoomIt to README

* Add ZoomIt to GH templates

* Add ZoomIt events to DATA_AND_PRIVACY.md

* Remove publish_config.json

* Remove publish_config.json from vcxproj too

---------

Co-authored-by: Mark Russinovich <markruss@microsoft.com>
Co-authored-by: Alex Mihaiuc <69110671+foxmsft@users.noreply.github.com>
Co-authored-by: John Stephens <johnstep@microsoft.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2025-01-16 20:52:24 +00:00
Jaime Bernardo
12bb5c2131
[VCM]Deprecate the Video Conference Mute utility (#36772)
* Remove all VideoConferenceMute related code and files

* Clean up vcm driver registry keys

* Also remove the Webcam report tool

* Also clean out video conference on the installer

* Fix spellcheck

* Remove comment about video conf

* Update gpo files revision

* Revert removing the VCM policies

* Deprecate VCM GPO policy

* Change deprecation message to show first supported version

* Tweak supported strings in the adml
2025-01-16 15:17:34 +00:00
Clint Rutkas
90e75a19f0
[CQ]Continued to move stuff out of root - Solution.props (#36244)
Some checks are pending
Spell checking / Check Spelling (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
2025-01-06 10:52:45 +00:00
leileizhang
43bc811c59
[Fuzz] Add fuzz testing for AdvancedPaste and new pipeline for onboarding OneFuzz (#36329)
* add fuzz

* install .net8

* add spelling check

* refine the pipeline

* add readme and update the test code

* fix spelling error

* change to weekly run
2024-12-19 08:31:10 +08:00
Ani
bf3474b134
[AdvancedPaste]Add Semantic Kernel opt-in to allow chaining of paste actions (#35902)
* [AdvancedPaste] Semantic Kernel support

* Changed log-line with potentially sensitive info

* Spellcheck issues

* Various improvements for Semantic Kernel

* Spellcheck issue

* Refactored Clipboard routines

* Added integration tests for KernelService

* Extra telemetry for AdvancedPaste

* Added 'Hotkey' suffix to AdvancedPaste_Settings telemetry event

* Added IsSavedQuery

* Added KernelQueryCache

* Refactoring

* Added KernelQueryCache to BugReportTool delete list

* Added opt-n for Semantic Kernel

* Fixed bug with KernelQueryCache

* Ability to view last AI chat message on error

* Improved kernel query cache

* Used System.IO.Abstractions and improved tests

* Fixed under-count of token usage

* Used Semantic Kernel icon

* Cleanup

* Add missing EndProject line

* Fix dependency version conflicts

* Fix NOTICE.md

* Correct place of SemanticKernel in NOTICE.md

* Unlinked CustomPreview toggle from AI

* Added Microsoft.Bcl.AsyncInterfaces dependency to AdvancedPaste

* Fixed NOTICE.md order

* Moved Custom Preview to behaviour section

* Made Image to Text raise error on empty output

* Added AIServiceBatchIntegrationTests

* Updated AIServiceBatchIntegrationTests

* Added prompt moderation

* Moved GPO Infobar to better location
2024-12-11 09:28:44 +00:00
leileizhang
fe610d4d0e
[AOT compatible] Add Common MSBuild Props for AOT Compatibility Validation to Be Imported by Projects for Future AOT Support (#36176)
Some checks are pending
Spell checking / Spell checking (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
[AOT compatible] Add Common MSBuild Props for AOT compatibility validation to be imported by projects for future support
2024-12-03 09:00:28 +08:00
Christian Gaarden Gaardmark
084402a2bd
[New+]Windows 10 support (#35832)
Some checks are pending
Spell checking / Spell checking (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
2024-11-27 14:22:05 +00:00
Laszlo Nemeth
6b3bbf7e8f
[Workspaces] Implement PWA recognition, launch. (#35913)
Some checks are pending
Spell checking / Spell checking (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run
* [Workspaces] PWA: first steps: implement PWA app searcher, add basic controls to the editor

* spell checker

* Snapshot tool: adding command line args for edge

* PWA: add icon handling, add launch of PWA

* Impllement Aumid getters and comparison to connect PWA windows and processes. Update LauncherUI, Launcher

* Minor fixes, simplifications

* Spell checker

* Removing manual PWA selection, spell checker

* Fix merge conflict

* Trying to convince spell checker, that "PEB" is a correct word.

* XAML format fix

* Extending snapshot tool by logs for better testablility

* spell checker fix

* extending logs

* extending logs

* Removing some logs, modifying search criteria for pwa helper process search

* extending PWA detection for the case the directory with the app-id is missing

* Fix issue when pwaAppId is null

* fix missing pwa-app-id handling in the editor. Removed unused property (code cleaning) and updating json parser in Launcher

* Code cleaning: Moving duplicate code to a common project

* Fix issue: adding new Guid as app id if it is empty

* Code cleanup: moving Pwa related code from snapshotUtils to PwaHelper

* Code cleaning

* Code cleanup: Move common Application model to Csharp Library

* code cleanup

* modifying package name

* Ading project reference to Common.UI

* Code cleaning, fixing references

---------

Co-authored-by: donlaci <donlaci@yahoo.com>
2024-11-20 20:15:18 +01:00
Stefan Markovic
133aa85f2b
[General]Add an option for telemetry opt-in and visualization(#34078)
* Data diagnostics opt-in

* [c++] Drop DROP_PII flag

* Bump telemtry package to 2.0.2

* Drop DropPii from custom actions

* Cleanup

* Do not start manually C# EtwTrace. FZ engine exit event.

* ImageResizer, PowerRename, FileLocksmith prev handlers

* Revert C# handlers exe logging

* Revert "Revert C# handlers exe logging"

This reverts commit 4c75a3953b085aeffaefe8e9e20c39cebb899ea1.

* Do not recreate EtwTrace

* consume package

* xaml formatting

* Fix deps.json audit

* Update telem package paths

* Address PR comments

* Fix AdvancedPaste close on PT close

* Override etl file name for explorer loaded dlls
Start/stop tracer when needed for explorer loaded dlls to prevent explorer overload

* Fix setting desc

* Fix missing events

* Add infobar to restart when enable data viewing

* Flush on timer every 30s

* [Settings] Update View Data diagnostic description text
[New+] Add tracer

* Show Restart info bar for both enable/disable data viewer

* Fix newplus

* Fix stuck on restart and terminate AdvPaste exe on destroy()

* [Installer] Add tracer

* Address PR comment

* Add missing tracers

* Exclude etw dir from BugReport

* Fix bad merge

* [Hosts] Proper exit on initial dialog

* [OOBE] Make Data diagnostic setting visible without scroll

* [OOBE] Add hiperlynk to open general settings

* Disable data view on disabling data diagnostics

* Don't disable View data button

* Fix disabling data viewing

* Add missing dot

* Revert formatting
2024-10-24 21:04:32 +01:00
Davide Giacometti
f9127b63a5
[RegistryPreview] Adopt Monaco Editor (#35122) 2024-10-24 21:55:51 +02:00
Michael Clayton
dc7c7ef2b7
[MouseJump][CQ]Refactor "common" classes into a separate project (#34333)
* [Mouse Jump] - moving common code to MouseJump.Common project - #25482

* [Mouse Jump] - fixing warnings in MouseJump.Common - #25482

* [MouseJump] - cherrypick 5653b4 - Exclude MouseJump Common tests from the checks

# Conflicts:
#	src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj

* [mOuSEjUMP] - cherry pick 61aab9 - Fix ci build issues

# Conflicts:
#	src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj

* [Mouse Jump] - remove project type guids - #25482

* [Mouse Jump] - simplify mousejump *.csproj files - #25482

* [Mouse Jump] - fixing broken tests - #25482

* [Mouse Jump] - fixing broken build - #25482

* [Mouse Jump] - editing MouseJump.Common.UnitTests.csproj - #25482

* [Mouse Jump] - editing MouseJump.Common.csproj (UseWindowsForms=true) - #25482

* [Mouse Jump] - fixing spellcheck - #25482

* [MouseJump] - enabled implicit usings - #25482

* [Mouse Jump] - re-add csproj attributes - #27511

* ci: Fix signing of Common dll

---------

Co-authored-by: Clayton <mike.clayton@delinian.com>
2024-10-21 17:38:07 +01:00
Michael Clayton
5cba82f929
[MWB][CQ]Refactoring "Common" classes - Common.Log.cs (#35156)
* [MouseWithoutBorders] - split "Common.Log.cs" into "Logger.cs"

* [MouseWithoutBorders] - fix references to Logger

* [MouseWithoutBorders] - add MouseWithoutBorders.UnitTests

* [MouseWithoutBorders] - fixing broken tests

* [MouseWithoutBorders] - fixing spelling

* [MouseWithoutBorders] - fixing spelling

* [MouseWithoutBorders] - fixing resource filename casing

* [MouseWithoutBorders] - fixing resource filename casing

* [MouseWithoutBorders] - fixing resource filename casing

* [MouseWithoutBorders] - fixing resource filename casing

* [MouseWithoutBorders] - fixed compile error

* [MouseWithoutBorders] - fixed failing test

* [MouseWithoutBorders] - fixed failing build

* [MouseWithoutBorders] - ignore flakey test
2024-10-18 17:32:08 +01:00
Stefan Markovic
5b616c9eed
[General]Support language selection (#34971)
* Language setting

* spellcheck

* Set FileLocksmithContextMenu package version in AppManifest.xml

* Fix ambigious symbol build error

* Fix ambigious symbol build error #2

* Revert unneeded changes

* Improve perf

* try fix ci build
2024-09-25 21:20:15 +01:00
Seraphima Zykova
1e18e83af6
[Workspaces] Handle admin windows repositioning. (#34965) 2024-09-25 11:13:38 +02:00
Christian Gaarden Gaardmark
3f44ad186d
New Utility: New+ (#33136)
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2024-09-19 17:12:24 +01:00
Seraphima Zykova
579619952d
[New Module] Workspaces (#34324)
* spell checker

* Adding OOBE Projects page

* changed the default hotkey

* module interface

* rename projects editor

* bug report tool

* installer

* gpo

* exit event constant

* extend search for projects by search over the containing apps' names

* [Projects] fix grammatical issue #43 (1 app - many apps)

* [Projects] Editor: Main page: fix layout if there are many apps, launch button not disappearing on the right side

* dsc

* github

* pipeline

* guid prefix

* [Projects] fixing general settings gpo handling in runner + minor changes

* arm build fix

* Do not allow saving project if name or applist is empty. Also minor UI changes

* version

* editor version

* spellcheck

* editor dll signing

* update projects names to filter them out

* shortcut saving fix

* [Projects] Editor: brining the highlighted app's icon into the foreground. + minor UI fixes

* spell checker

* spellcheck

* [Projects] re-implementing icon size calculation to have similar sized icons for every app.

* [projects] Adding info message for cases: there are no projects or no results for the search

* [Projects] Adding Edit button to the popup. + minor changes

* [Projects] Making popup having rounded corners

* changed "no projects" text color and position

* remove opening the first proj

* fix placing windows of the same app in the project

* [Projects] bringing back the breadcrumb on the editor page. Make it clickable.

* [Projects] optimizing click handlers

* [Projects] Removing not selected apps on save

* moved on thread executor to common

* moved display utils

* added convert rect

* unsigned monitor number

* set awareness

* app placement

* [Projects] Re-implementing preview drawing - one common image

* [Projects] fix boundary calculation, use DPI aware values

* fix launching with command line args

* Fix ARM64 CI build

* launch packaged apps using names when possible

* spell-check

* update packaged apps path

* projects editor single instance

* [Projects] Add Select all checkbox, Delete selected button

* Add Checkbox for per monitor selection

* modifying highlight in preview

* spell checker

* logs

* exclude help windows

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/49

* Add intermediate step to project creation

* minor bugfix

* mutex fix

* modifying highlight for minimized apps

* Fixing bug: re-draw the preview on app deletion in the editor

* Adding helper class for getting the right bounds for screens

* spell checker

* spell checker

* Minor fixes in the capture dialog

* get dpi unaware screen bounds

* refactoring: added utils

* changed window filter

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/2

* clean up

* refactoring

* projects common lib

* localizable default project prefix

* launcher resources

* clean up

* change snapshot project saving

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* changed project data

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* changed project creation save-cancel handles

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* spell-check

* Remove checkboxes, delete feature

* remove unused from the project

* get command line args in the snapshot

* minimized settings snap fix

* set window property after launching

* FZ: ignore projects launched windows

* Implementing major new features: remove button, position manipulation, arguments, admin, minimized, maximized

* modifying colors

* launcher project filters

* clean up

* Hide Admin checkbox

* hide WIP

* spell-check

* Revert "Hide Admin checkbox"

This reverts commit 3036df9d7fe48de6418b0ebeff6422d535cb25e2.

* get app elevated property

* Implementing Launch and Edit feature

* fixing: update of listed projects on the main page after hitting save in editor

* Fix for packaged app's icons

* fixing scroll speed issue

* change scroll speed to 15

* launch elevated apps

* minor fixes

* minor fix

* enhancing shortcut handling

* can-launch-elevated check

* projects module interface telemetry

* Implementing store of setting "order by".

* minor string correction

* moved projects data parsing

* telemetry

* add move apps checkbox

* notification about elevated apps

* restart unelevated

* move existing windows

* keep opened windows at the same positions

* handle powertoys settings

* use common theme

* fix corrupted data: project id and monitor id

* project launch on "launch and edit"

* clean up

* show screen numbers instead of monitor names

* launcher error messages

* fix default shortcut

* Adding launch button to projects settings, dashboard and flyout

* Adding new app which is launched when launching a project. It shows the status of the launch process

* spell checker

* Renaming Projects to App Layouts. Replacing only string values, not the variable names

* Re-ordering modules after Renaming Projects + spell checker

* setting window size according to the screen (making it bigger)

* commenting out feature "move apps if exist"

* spell checker

* Add ProjectsLauncherUI to signing

* opening apps in minimized state which are placed on a monitor, which is not found at the moment of launching

* consistent file name

* removed unused sln

* telemetry: create event

* WindowPosition comparison

* telemetry: edit event

* fix muted Launch as admin checkbox

* telemetry: delete event

* updated Edit telemetry event

* added invoke point to launcher args

* added utils

* parse invoke point

* replaced tuple with struct

* telemetry: launch event

* MonitorRect comparison

* resources

* rename: folders

* remove outdated

* rename: window property

* rename: files and folders

* rename: common data structures

* rename: telemetry namespace

* rename: workspaces data

* rename ProjectsLib -> WorkspacesLib

* rename: gpo

* rename: settings

* rename: launcher UI

* rename: other

* rename: pt run

* rename: fz

* rename: module interface

* rename: icon

* rename: snapshot tool

* rename: editor

* rename: common files

* rename: launcher

* rename: editor resources

* fix empty file crash

* rename: json

* rename: module interface

* fix custom actions build

* added launch editor event constant

* xaml formatting

* Add missing method defition to interop::Constants idl
Remove Any CPU config

* more .sln cleanup

* [Run][PowerToys] Fix Workspaces utility (#34336)

polished workspaces utility

* build fix - align CppWinRT version

* address PR comment: fix isdigit

* indentation

* address PR comment: rename function

* address PR comment: changed version for workspaces and revision

* added supported version definition

* addressPR comment: use BringToForeground

* address PR comments: updated projects

* address PR comment: uncomment gpo in settings

* address PR comment: rename oobe view

* update OOBE image with current module name

* moved AppUtils

* launching with AppUserModel.ID

* fixed module order in settings

* fix xaml formatting

* [Workspaces] Close launcher if there are failed launches. Plus adding new spinner gif

* fix topmost LauncherUI

* clean up

* UI closing

* BugReportTool - omit cmd arg data

* Delete icon on workspace removal

* Adding cancellation to launcher UI.

* reordered launching

* fix terminating UI

* Removing old shortcut on workspace renaming

* Sentence case labels

* get process path without waiting

* comment out unused

* remove unused argument

* logs

* New icon

* fix launch and edit for the new project

* fix launch and edit: save new project

* Update exe icons

---------

Co-authored-by: donlaci <laszlo@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2024-08-23 09:28:13 +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
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
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
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