Compare commits
389 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
136562b766 | ||
|
|
76ab389e88 | ||
|
|
d323611ecb | ||
|
|
797bedd8c2 | ||
|
|
036819e629 | ||
|
|
67d1985fd4 | ||
|
|
2532c247b7 | ||
|
|
29ea95a6b0 | ||
|
|
6fafb0150e | ||
|
|
de67fff731 | ||
|
|
7799783c9a | ||
|
|
c854565e30 | ||
|
|
52e9d37b93 | ||
|
|
e94cb34a25 | ||
|
|
f541e7105e | ||
|
|
4060e29c63 | ||
|
|
d913285523 | ||
|
|
d98d1193fc | ||
|
|
e23b406364 | ||
|
|
0b27fc39e6 | ||
|
|
704ca4eae2 | ||
|
|
1fc3cfee68 | ||
|
|
8fb446ad47 | ||
|
|
66ff661ff5 | ||
|
|
57e69080c9 | ||
|
|
d78f7a9303 | ||
|
|
47cb34d26b | ||
|
|
8354797406 | ||
|
|
87ae1c6a9b | ||
|
|
5fb7d43aff | ||
|
|
115c391191 | ||
|
|
c73fa4b0f6 | ||
|
|
f5894ac3c2 | ||
|
|
bcbeda5102 | ||
|
|
8891c305e3 | ||
|
|
c62f98db95 | ||
|
|
96bca43089 | ||
|
|
9ffd42d477 | ||
|
|
c57f051863 | ||
|
|
ab04874c11 | ||
|
|
481a47b638 | ||
|
|
df2ef04558 | ||
|
|
c3ad095553 | ||
|
|
3f2dbfbbd2 | ||
|
|
8eca70c338 | ||
|
|
ba7302a197 | ||
|
|
d15b0a0285 | ||
|
|
3796a5ef97 | ||
|
|
5a48376a77 | ||
|
|
61669a73d9 | ||
|
|
5a2385c66b | ||
|
|
d7721065dc | ||
|
|
025f2507f4 | ||
|
|
563fb3ff5c | ||
|
|
9646ec5edd | ||
|
|
cc990a1181 | ||
|
|
c4ddb7d351 | ||
|
|
ab0047a9b7 | ||
|
|
39ec10cbba | ||
|
|
65b6513207 | ||
|
|
beb4494534 | ||
|
|
983ff901f2 | ||
|
|
5d66473a4f | ||
|
|
ff1e04b957 | ||
|
|
53c4c6cbb8 | ||
|
|
47736603af | ||
|
|
b6e5a5e655 | ||
|
|
84018f5b61 | ||
|
|
592d3afe6d | ||
|
|
2bd2ec7a2e | ||
|
|
f25d2b3a86 | ||
|
|
886cea56f3 | ||
|
|
ed21efc003 | ||
|
|
c379cca2e5 | ||
|
|
efa04b4cd8 | ||
|
|
35a214603f | ||
|
|
3acc96cab1 | ||
|
|
14247fa75a | ||
|
|
6efec9d280 | ||
|
|
063253d5e7 | ||
|
|
f773604dec | ||
|
|
25d43354b3 | ||
|
|
b59ec5e78b | ||
|
|
f7ad935dfb | ||
|
|
1a210ae684 | ||
|
|
92c666692d | ||
|
|
761f0a78f4 | ||
|
|
0027a0af40 | ||
|
|
4f45cf1386 | ||
|
|
9dfa685fb1 | ||
|
|
40d2ef4f0a | ||
|
|
8e5a877997 | ||
|
|
d1b3f77feb | ||
|
|
a5b7234d6f | ||
|
|
398991f3c1 | ||
|
|
d01b93ae5f | ||
|
|
b31d9761fa | ||
|
|
1ba403db7b | ||
|
|
96cd135f82 | ||
|
|
c85cd4ac24 | ||
|
|
177546bab6 | ||
|
|
29e2c982d4 | ||
|
|
bc301f269a | ||
|
|
d09253e532 | ||
|
|
034079b441 | ||
|
|
22f0e2615f | ||
|
|
45bab578c4 | ||
|
|
e8de6f0ace | ||
|
|
13c2ce3f31 | ||
|
|
3bf9a3833a | ||
|
|
c035bf2d37 | ||
|
|
2b9ab05888 | ||
|
|
a8153dd8db | ||
|
|
ebe70a52d1 | ||
|
|
2282e72d03 | ||
|
|
5a590512bd | ||
|
|
6131181ea4 | ||
|
|
78946c11ea | ||
|
|
f59abe23c3 | ||
|
|
74412766fa | ||
|
|
39b0401c55 | ||
|
|
5f0e8d3d8e | ||
|
|
01ca13cccb | ||
|
|
6a9badd31b | ||
|
|
7db5d6a307 | ||
|
|
bb2049411b | ||
|
|
653ae777d5 | ||
|
|
ec803d63c8 | ||
|
|
412d80efe3 | ||
|
|
b1d662a5b1 | ||
|
|
12d9d59d85 | ||
|
|
b13e719ab3 | ||
|
|
451aea87aa | ||
|
|
d55cac80bf | ||
|
|
a1ecdc9bfa | ||
|
|
0e8c1cb0fd | ||
|
|
1c724280f5 | ||
|
|
9ff8246a9d | ||
|
|
2c45956030 | ||
|
|
1c267a55d5 | ||
|
|
f60bdc3dd4 | ||
|
|
030dfc2370 | ||
|
|
3295ea84a4 | ||
|
|
ef2041b919 | ||
|
|
4634085402 | ||
|
|
411140c3ea | ||
|
|
638cd1dd48 | ||
|
|
e3e6b23b7c | ||
|
|
ac5a3e7a65 | ||
|
|
106c316442 | ||
|
|
db229cf1bf | ||
|
|
94f66b812a | ||
|
|
a314106b7e | ||
|
|
8d72bc0ea4 | ||
|
|
1533c9315f | ||
|
|
70405045d7 | ||
|
|
3d623506a8 | ||
|
|
11df74c292 | ||
|
|
a935d69408 | ||
|
|
cffe0196e2 | ||
|
|
ac2a9deb75 | ||
|
|
282e0adfe2 | ||
|
|
ce60bcedb0 | ||
|
|
c9fd409650 | ||
|
|
8a908aa33f | ||
|
|
f9a5242e75 | ||
|
|
7dabcc00ed | ||
|
|
18f4e9db31 | ||
|
|
593ab6b014 | ||
|
|
656c33e942 | ||
|
|
4330338285 | ||
|
|
44c41d52b2 | ||
|
|
449a3f479f | ||
|
|
159a7c4947 | ||
|
|
30f442d774 | ||
|
|
e8685de7f7 | ||
|
|
4c08b591f1 | ||
|
|
16528888df | ||
|
|
738b5f5707 | ||
|
|
17343210c0 | ||
|
|
43aa2f5cd9 | ||
|
|
423cd20922 | ||
|
|
69d5ef36e2 | ||
|
|
0dd17cc175 | ||
|
|
16e56c4edb | ||
|
|
f46b876fd6 | ||
|
|
1181ab67ba | ||
|
|
014c26be25 | ||
|
|
99eb9429fd | ||
|
|
d3b10d0d4d | ||
|
|
d9597d5ad5 | ||
|
|
55272e5ea2 | ||
|
|
d17fc86fa4 | ||
|
|
0b391584d4 | ||
|
|
e3e02aa30b | ||
|
|
403f53a397 | ||
|
|
bfd79e1af2 | ||
|
|
5745a984aa | ||
|
|
d2f1f67a22 | ||
|
|
d98cb50d7a | ||
|
|
cc4864976a | ||
|
|
92fa8b7421 | ||
|
|
aad2e8012b | ||
|
|
b3eae80ece | ||
|
|
b58d5b6066 | ||
|
|
f1b6e6570c | ||
|
|
8e758507b1 | ||
|
|
2601d8b702 | ||
|
|
fa0545e4b3 | ||
|
|
690208fd4e | ||
|
|
3272575f70 | ||
|
|
fad3142a47 | ||
|
|
1f74dcff14 | ||
|
|
62c7183922 | ||
|
|
ef73b0a07f | ||
|
|
ec7d42d1fd | ||
|
|
256a17f2c9 | ||
|
|
165ffed9e6 | ||
|
|
b89d6d78ef | ||
|
|
6890561723 | ||
|
|
849ce04def | ||
|
|
a29baf19d0 | ||
|
|
10d6a1fa54 | ||
|
|
6ea181c286 | ||
|
|
2d890603c6 | ||
|
|
d1ca30a28f | ||
|
|
35fccf8af8 | ||
|
|
f5baa56e05 | ||
|
|
d2c1be5c2d | ||
|
|
fd6525a9de | ||
|
|
ba03a134da | ||
|
|
9184c64ecb | ||
|
|
653a9664e4 | ||
|
|
51d0cedb29 | ||
|
|
fa6d1bb23c | ||
|
|
0f3b154699 | ||
|
|
d6e2b096ca | ||
|
|
2104a1250e | ||
|
|
ca99f60964 | ||
|
|
147c08bd71 | ||
|
|
ad440f70fa | ||
|
|
bb22155482 | ||
|
|
5c1999b3d0 | ||
|
|
87f0fcfd52 | ||
|
|
f6d53bc337 | ||
|
|
720fad80c3 | ||
|
|
196055e50e | ||
|
|
73125574e6 | ||
|
|
27a35a0388 | ||
|
|
8c6085b933 | ||
|
|
bef14f551e | ||
|
|
e56c2eb6ca | ||
|
|
165365473f | ||
|
|
3bdd9a850f | ||
|
|
b84ea020f2 | ||
|
|
90efc5740f | ||
|
|
c78e6588ad | ||
|
|
a21a3827fd | ||
|
|
2effbd0baf | ||
|
|
7ed03c8b90 | ||
|
|
59ce90e924 | ||
|
|
da38e6a23d | ||
|
|
698e5ec6ea | ||
|
|
7f25e3ba97 | ||
|
|
1a3500cad3 | ||
|
|
31c30a7602 | ||
|
|
014f3b9873 | ||
|
|
49cbcf01c6 | ||
|
|
f8cc129f04 | ||
|
|
236c1208e6 | ||
|
|
4c70e75bfc | ||
|
|
e8c5f3a882 | ||
|
|
302df56ee1 | ||
|
|
ccfc4d68f3 | ||
|
|
071ea1dc97 | ||
|
|
670033c4da | ||
|
|
fa7e4cc817 | ||
|
|
67c8d80190 | ||
|
|
792ce53992 | ||
|
|
b0a25f59d9 | ||
|
|
d76234c112 | ||
|
|
6fdfd3b9e7 | ||
|
|
38350a1ae4 | ||
|
|
ce2bba751c | ||
|
|
f149736a20 | ||
|
|
40330be123 | ||
|
|
93af4fc6b0 | ||
|
|
b574d4e388 | ||
|
|
eb4b429e19 | ||
|
|
21929b1db2 | ||
|
|
a5197ee039 | ||
|
|
e974981725 | ||
|
|
9ae4dd3dfe | ||
|
|
d0e4dabe90 | ||
|
|
a3c569137e | ||
|
|
3edb360d79 | ||
|
|
f5285b48b1 | ||
|
|
c01b76e098 | ||
|
|
6adb47c447 | ||
|
|
b0b2d3a727 | ||
|
|
8410d7b08e | ||
|
|
e6408a0c37 | ||
|
|
e96c82b171 | ||
|
|
ee31813a0d | ||
|
|
ac62fd6204 | ||
|
|
25fbcc144c | ||
|
|
30cb7e62fd | ||
|
|
7c7ccc3a07 | ||
|
|
fb3f4fa0a8 | ||
|
|
2b62244806 | ||
|
|
f5dc197e8b | ||
|
|
e6060048bd | ||
|
|
f83ff068ae | ||
|
|
b21a6b76e0 | ||
|
|
70527022d9 | ||
|
|
8cddd595d4 | ||
|
|
96b79d5f06 | ||
|
|
1c7b07d614 | ||
|
|
0d59de5767 | ||
|
|
e3613c54e9 | ||
|
|
5956e6d9c1 | ||
|
|
ec895f271b | ||
|
|
751f30e316 | ||
|
|
cee8253cd3 | ||
|
|
ae4cb6e372 | ||
|
|
398f976f3e | ||
|
|
5f049beb04 | ||
|
|
a8d67a1c60 | ||
|
|
26aa9727a1 | ||
|
|
3cef696a65 | ||
|
|
397b1533f0 | ||
|
|
5680a34ec1 | ||
|
|
84a197299f | ||
|
|
4307882fa8 | ||
|
|
d2dfbff832 | ||
|
|
8cc58d0b89 | ||
|
|
971fc462ab | ||
|
|
8d2256d359 | ||
|
|
8f3b863edd | ||
|
|
4cc6c5ec35 | ||
|
|
cf53614721 | ||
|
|
efe84e58d7 | ||
|
|
cf59ad76fb | ||
|
|
2216cda2f1 | ||
|
|
595b15fcd9 | ||
|
|
a104c7f0f8 | ||
|
|
059392d257 | ||
|
|
5a1b3da394 | ||
|
|
92d7c2926c | ||
|
|
8f39697e3d | ||
|
|
ff328381af | ||
|
|
3bb3c06456 | ||
|
|
1cbcd41b17 | ||
|
|
5ebd9eb577 | ||
|
|
850d9ee095 | ||
|
|
5db1f91b01 | ||
|
|
ac6b9712ad | ||
|
|
df93f4ba99 | ||
|
|
7c20d46eeb | ||
|
|
fe432fcca8 | ||
|
|
5b1638ea59 | ||
|
|
87a1d4088b | ||
|
|
038c346500 | ||
|
|
0bcaa13056 | ||
|
|
c0e62372e6 | ||
|
|
84169cce10 | ||
|
|
c2c163ac4e | ||
|
|
ecb5d2ae1c | ||
|
|
3d619f1670 | ||
|
|
3265549911 | ||
|
|
d5c3a3e5e8 | ||
|
|
30dff09d7e | ||
|
|
85f7d19eb2 | ||
|
|
6adda5c29c | ||
|
|
4a03756b5b | ||
|
|
b1554ebf37 | ||
|
|
b6307b4fd6 | ||
|
|
6f22c7ad19 | ||
|
|
bc9add783c | ||
|
|
ee67221068 | ||
|
|
71e528139c | ||
|
|
c674fe1f04 | ||
|
|
d047e95bb5 | ||
|
|
791518d6c4 | ||
|
|
83afd55e0e | ||
|
|
7870a66790 | ||
|
|
c923e96f3e | ||
|
|
dd79834137 | ||
|
|
8995f0af55 |
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: Bug report
|
||||
name: 🐛 Bug report
|
||||
about: Report errors or unexpected behavior
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: Issue-Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
@@ -12,26 +12,26 @@ assignees: ''
|
||||
Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.
|
||||
-->
|
||||
|
||||
# Environment
|
||||
## ℹ Computer information
|
||||
|
||||
```
|
||||
Windows build number: [run "ver" at a command prompt]
|
||||
PowerToys version:
|
||||
PowerToy module for which you are reporting the bug (if applicable):
|
||||
```
|
||||
- Windows build number: [run "winver"]
|
||||
- PowerToys version:
|
||||
- PowerToy module:
|
||||
|
||||
# Steps to reproduce
|
||||
## 📝 Provide detailed reproduction steps (if any)
|
||||
|
||||
<!-- A description of how to trigger this bug. -->
|
||||
1. …
|
||||
2. …
|
||||
3. …
|
||||
|
||||
# Expected behavior
|
||||
### ✔️ Expected result
|
||||
|
||||
<!-- A description of what you're expecting, possibly containing screenshots or reference material. -->
|
||||
_What is the expected result of the above steps?_
|
||||
|
||||
# Actual behavior
|
||||
### ❌ Actual result
|
||||
|
||||
<!-- What's actually happening? -->
|
||||
_What is the actual result of the above steps?_
|
||||
|
||||
# Screenshots
|
||||
## 📷 Screenshots
|
||||
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
_Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form_
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: "\U0001F6A8 Microsoft Security Response Center (MSRC)"
|
||||
url: https://msrc.microsoft.com/create-report
|
||||
about: Report security bugs
|
||||
- name: "\U0001F4DA PowerToys user documentation"
|
||||
url: https://github.com/microsoft/PowerToys/wiki
|
||||
about: Documentation for users of PowerToys
|
||||
- name: "\U0001F4DA PowerToys dev documentation"
|
||||
url: https://github.com/microsoft/PowerToys/tree/master/doc/devdocs
|
||||
about: Documentation for people interested in developing for PowerToys
|
||||
@@ -1,10 +1,14 @@
|
||||
---
|
||||
name: Documentation Issue
|
||||
name: "\U0001F4DA Documentation Issue"
|
||||
about: Report issues in our documentation
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: Issue-Docs
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Briefly describe which document needs to be corrected and why. -->
|
||||
|
||||
## 📝 Provide a description of requested docs changes
|
||||
|
||||
_What is the purpose and what should be changed?_
|
||||
|
||||
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,21 +1,16 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
name: "⭐ Feature request"
|
||||
about: Propose something new.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Summary of the new feature/enhancement
|
||||
## 📝 Provide a description of the new feature
|
||||
|
||||
<!--
|
||||
A clear and concise description of what the problem is that the new feature would solve.
|
||||
Describe why and how a user would use this new functionality (if applicable).
|
||||
-->
|
||||
_What is the expected behavior of the proposed feature? What is the scenario this woudl be used?_
|
||||
|
||||
# Proposed technical implementation details (optional)
|
||||
---
|
||||
|
||||
<!--
|
||||
A clear and concise description of what you want to happen.
|
||||
-->
|
||||
If you'd like to see this feature implemented, add a 👍 reaction to this post.
|
||||
|
||||
13
.github/pull_request_template.md
vendored
@@ -1,10 +1,7 @@
|
||||
<!-- 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
|
||||
|
||||
<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? -->
|
||||
## References
|
||||
_What is this about?_
|
||||
|
||||
<!-- Please review the items on the PR checklist before submitting-->
|
||||
## PR Checklist
|
||||
* [ ] Applies to #xxx
|
||||
* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/PowerToys) and sign the CLA
|
||||
@@ -12,8 +9,10 @@
|
||||
* [ ] Requires documentation to be updated
|
||||
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #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
|
||||
## Info on Pull Request
|
||||
|
||||
_What does this include?_
|
||||
|
||||
<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
|
||||
## Validation Steps Performed
|
||||
|
||||
_How does someone test & validate?_
|
||||
|
||||
3
.gitignore
vendored
@@ -340,4 +340,5 @@ src/common/Telemetry/*.etl
|
||||
|
||||
# Don't ignore MergeModules
|
||||
!**/MergeModules/Release/
|
||||
!**/MergeModules/Debug/
|
||||
!**/MergeModules/Debug/
|
||||
/src/modules/previewpane/SvgThumbnailProvider/$(SolutionDir)$(Platform)/$(Configuration)/modules/FileExplorerPreview/SvgThumbnailProvider.xml
|
||||
|
||||
10
.pipelines/build-bootstrapper.cmd
Normal file
@@ -0,0 +1,10 @@
|
||||
cd /D "%~dp0"
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
pushd .
|
||||
cd ..
|
||||
set SolutionDir=%cd%
|
||||
popd
|
||||
SET IsPipeline=1
|
||||
call msbuild ../src/bootstrapper/bootstrapper.vcxproj /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true /p:BuildProjectReferences=false /p:SolutionDir=%SolutionDir%\ || exit /b 1
|
||||
|
||||
@@ -2,4 +2,4 @@ cd /D "%~dp0"
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
SET IsPipeline=1
|
||||
call msbuild ../installer/PowerToysSetup.sln /p:Configuration=Release /p:Platform=x64 || exit /b 1
|
||||
call msbuild ../installer/PowerToysSetup.sln /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true || exit /b 1
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
cd /D "%~dp0"
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
call msbuild ../PowerToys.sln /p:Configuration=Release /p:Platform=x64 || exit /b 1
|
||||
call msbuild ../src/common/notifications/notifications_dll.vcxproj /p:Configuration=Release /p:Platform=x64 || exit /b 1
|
||||
call msbuild ../src/common/notifications_winrt/notifications.vcxproj /p:Configuration=Release /p:Platform=x64 || exit /b 1
|
||||
call msbuild -m ../PowerToys.sln /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true || exit /b 1
|
||||
SET PTRoot=..
|
||||
call "..\installer\PowerToysSetup\publish.cmd"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
parameters:
|
||||
configuration: 'Release'
|
||||
platform: ''
|
||||
additionalBuildArguments: ''
|
||||
additionalBuildArguments: '-m /p:CIBuild=true'
|
||||
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}${{ parameters.configuration }}
|
||||
|
||||
@@ -32,18 +32,30 @@ steps:
|
||||
platform: '$(BuildPlatform)'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
msbuildArgs: ${{ parameters.additionalBuildArguments }}
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
# directly not doing WinAppDriver testing
|
||||
- task: VSTest@2
|
||||
inputs:
|
||||
platform: '$(BuildPlatform)'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
testSelector: 'testAssemblies'
|
||||
testAssemblyVer2: |
|
||||
**\PreviewPaneUnitTests.dll
|
||||
**\UnitTests-SvgPreviewHandler.dll
|
||||
**\UnitTests-PreviewHandlerCommon.dll
|
||||
**\powerpreviewTest.dll
|
||||
!**\*PowerToysTests.dll
|
||||
!**\*TestAdapter.dll
|
||||
!**\obj\**
|
||||
**\ImageResizer.Test.dll
|
||||
**\KeyboardManagerTest.dll
|
||||
**\Microsoft.Plugin.Program.UnitTests.dll
|
||||
**\PowerRenameUnitTests.dll
|
||||
**\UnitTests-CommonLib.dll
|
||||
**\PreviewPaneUnitTests.dll #this is the markdown tests
|
||||
**\UnitTests-PreviewHandlerCommon.dll
|
||||
**\UnitTests-SvgPreviewHandler.dll
|
||||
**\Wox.Test.dll
|
||||
**\powerpreviewTest.dll
|
||||
# Can't get working, says no tests
|
||||
# #**\Microsoft.PowerToys.Settings.UnitTest.exe
|
||||
# crashes CI
|
||||
#**\interop-tests.dll
|
||||
#**\UnitTests-FancyZones.dll
|
||||
|
||||
@@ -50,36 +50,39 @@ build:
|
||||
to: 'Build_Output'
|
||||
include:
|
||||
- 'action_runner.exe'
|
||||
- 'modules\ar\ImageResizer.resources.dll'
|
||||
- 'modules\bg\ImageResizer.resources.dll'
|
||||
- 'modules\ca\ImageResizer.resources.dll'
|
||||
- 'modules\cs\ImageResizer.resources.dll'
|
||||
- 'modules\de\ImageResizer.resources.dll'
|
||||
- 'modules\es\ImageResizer.resources.dll'
|
||||
- 'modules\eu-ES\ImageResizer.resources.dll'
|
||||
- 'modules\fr\ImageResizer.resources.dll'
|
||||
- 'modules\he\ImageResizer.resources.dll'
|
||||
- 'modules\hu\ImageResizer.resources.dll'
|
||||
- 'modules\it\ImageResizer.resources.dll'
|
||||
- 'modules\nb-NO\ImageResizer.resources.dll'
|
||||
- 'modules\nl\ImageResizer.resources.dll'
|
||||
- 'modules\pl\ImageResizer.resources.dll'
|
||||
- 'modules\pt-BR\ImageResizer.resources.dll'
|
||||
- 'modules\ru\ImageResizer.resources.dll'
|
||||
- 'modules\sk\ImageResizer.resources.dll'
|
||||
- 'modules\tr\ImageResizer.resources.dll'
|
||||
- 'modules\zh-Hans\ImageResizer.resources.dll'
|
||||
- 'modules\ColorPicker\ColorPicker.dll'
|
||||
- 'modules\ColorPicker\ColorPicker.exe'
|
||||
- 'modules\ImageResizer\ar\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\bg\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\ca\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\cs\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\de\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\es\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\eu-ES\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\fr\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\he\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\hu\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\it\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\nb-NO\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\nl\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\pl\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\pt-BR\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\ru\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\sk\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\tr\ImageResizer.resources.dll'
|
||||
- 'modules\ImageResizer\zh-Hans\ImageResizer.resources.dll'
|
||||
- 'modules\FancyZones\fancyzones.dll'
|
||||
- 'modules\FancyZones\FancyZonesEditor.exe'
|
||||
- 'modules\FileExplorerPreview\MarkdownPreviewHandler.dll'
|
||||
- 'modules\FileExplorerPreview\powerpreview.dll'
|
||||
- 'modules\FileExplorerPreview\PreviewHandlerCommon.dll'
|
||||
- 'modules\FileExplorerPreview\SvgPreviewHandler.dll'
|
||||
- 'modules\ImageResizer.exe'
|
||||
- 'modules\ImageResizerExt.dll'
|
||||
- 'modules\KeyboardManager.dll'
|
||||
- 'modules\FileExplorerPreview\SVGThumbnailProvider.dll'
|
||||
- 'modules\ImageResizer\ImageResizer.exe'
|
||||
- 'modules\ImageResizer\ImageResizerExt.dll'
|
||||
- 'modules\KeyboardManager\KeyboardManager.dll'
|
||||
- 'modules\launcher\Microsoft.PowerToys.Settings.UI.Lib.dll'
|
||||
- 'modules\launcher\Plugins\Microsoft.Plugin.Calculator\Microsoft.Plugin.Caculator.dll'
|
||||
- 'modules\launcher\Plugins\Microsoft.Plugin.Calculator\Microsoft.Plugin.Calculator.dll'
|
||||
- 'modules\launcher\Plugins\Microsoft.Plugin.Calculator\Wox.Infrastructure.dll'
|
||||
- 'modules\launcher\Plugins\Microsoft.Plugin.Calculator\Wox.Plugin.dll'
|
||||
- 'modules\launcher\Plugins\Microsoft.Plugin.Folder\Microsoft.Plugin.Folder.dll'
|
||||
@@ -107,8 +110,8 @@ build:
|
||||
- 'modules\launcher\Wox.Infrastructure.dll'
|
||||
- 'modules\launcher\Wox.Plugin.dll'
|
||||
- 'modules\Microsoft.Launcher.dll'
|
||||
- 'modules\PowerRenameExt.dll'
|
||||
- 'modules\shortcut_guide.dll'
|
||||
- 'modules\PowerRename\PowerRenameExt.dll'
|
||||
- 'modules\ShortcutGuide\ShortcutGuide.dll'
|
||||
- 'Notifications.dll'
|
||||
- 'os-detection.dll'
|
||||
- 'PowerToys.exe'
|
||||
@@ -132,20 +135,31 @@ build:
|
||||
- 'PowerToysSetup-*.msi'
|
||||
signing_options:
|
||||
sign_inline: true # This does signing a soon as this command completes
|
||||
|
||||
package:
|
||||
commands:
|
||||
- !!buildcommand
|
||||
name: 'Build MSIX package'
|
||||
command: 'installer\msix\build_msix_cdpx.cmd'
|
||||
name: 'Build Power Toys Bootstrapper'
|
||||
command: '.pipelines\build-bootstrapper.cmd'
|
||||
artifacts:
|
||||
- from: 'installer\msix\bin'
|
||||
to: 'Build_MSIX_Package_Output'
|
||||
- from: 'x64/Release'
|
||||
to: 'Build_Installer_Output'
|
||||
include:
|
||||
- '*.msix'
|
||||
- '*.msixbundle'
|
||||
- 'PowerToysSetup-*.exe'
|
||||
signing_options:
|
||||
profile: '400'
|
||||
sign_inline: true # This does signing a soon as this command completes
|
||||
|
||||
|
||||
#package:
|
||||
# commands:
|
||||
# - !!buildcommand
|
||||
# name: 'Build MSIX package'
|
||||
# command: 'installer\msix\build_msix_cdpx.cmd'
|
||||
# artifacts:
|
||||
# - from: 'installer\msix\bin'
|
||||
# to: 'Build_MSIX_Package_Output'
|
||||
# include:
|
||||
# - '*.msix'
|
||||
# - '*.msixbundle'
|
||||
# signing_options:
|
||||
# profile: '400'
|
||||
|
||||
static_analysis_options:
|
||||
binskim_options:
|
||||
|
||||
31
NOTICE.md
@@ -1,6 +1,34 @@
|
||||
# NOTICES AND INFORMATION
|
||||
This software incorporates material from third parties.
|
||||
|
||||
## PowerToy: Color Picker
|
||||
|
||||
### Martin Chrzan's Color Picker
|
||||
|
||||
**Source**: https://github.com/martinchrzan/ColorPicker
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 martinchrzan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
## PowerToy: ImageResizer
|
||||
|
||||
### Brice Lams's Image Resizer License
|
||||
@@ -33,7 +61,8 @@ THE SOFTWARE.
|
||||
|
||||
### Wox License
|
||||
|
||||
**Source**: https://github.com/Wox-launcher/Wox
|
||||
**Fork project source**: https://github.com/jjw24/Wox/
|
||||
**Base project source**: https://github.com/Wox-launcher/Wox
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
1187
PowerToys.sln
99
README.md
@@ -4,41 +4,30 @@
|
||||
|
||||
Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. Inspired by the [Windows 95 era PowerToys project](https://en.wikipedia.org/wiki/Microsoft_PowerToys), this reboot provides power users with ways to squeeze more efficiency out of the Windows 10 shell and customize it for individual workflows. A great overview of the Windows 95 PowerToys can be found [here](https://socket3.wordpress.com/2016/10/22/using-windows-95-powertoys/).
|
||||
|
||||
[What's Happening](#whats-happening) | [Downloading & Release notes][github-release-link] | [Contributing to PowerToys](#contributing)
|
||||
[What's Happening](#whats-happening) | [Downloading & Release notes][github-release-link] | [Contributing to PowerToys](#contributing) | [Known issues](#known-issues)
|
||||
|
||||
## Build status
|
||||
|
||||
[](https://dev.azure.com/ms/PowerToys/_build?definitionId=219)
|
||||
| Branch | Status x64 |
|
||||
|---|---|
|
||||
| Master | [](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=master) |
|
||||
| Stable | [](https://dev.azure.com/ms/PowerToys/_build/latest?definitionId=219&branchName=stable) |
|
||||
| Installer | [](https://github-private.visualstudio.com/microsoft/_build/latest?definitionId=61&branchName=master) |
|
||||
|
||||
## Current PowerToy Utilities
|
||||
|
||||
### FancyZones
|
||||
|
||||
[<img align="left" src="./doc/images/overview/FancyZones_small.png" />](/src/modules/fancyzones/) [FancyZones](/src/modules/fancyzones/) is a window manager that makes it easy to create complex window layouts and quickly position windows into those layouts.
|
||||
[<img align="left" src="./doc/images/overview/FancyZones_small.png" />](https://aka.ms/PowerToysOverview_FancyZones) [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) is a window manager that makes it easy to create complex window layouts and quickly position windows into those layouts.
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### Shortcut Guide
|
||||
### File Explorer Add-ons (Preview Panes)
|
||||
|
||||
[<img align="left" src="./doc/images/overview/Shortcut guide_small.png" />](/src/modules/shortcut_guide) [Windows key shortcut guide](/src/modules/shortcut_guide) appears when a user holds the Windows key down for more than one second and shows the available shortcuts for the current state of the desktop.
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### PowerRename
|
||||
|
||||
[<img align="left" src="./doc/images/overview/PowerRename_small.PNG" />](/src/modules/powerrename) [PowerRename](/src/modules/powerrename) is a Windows Shell Extension for advanced bulk renaming using search and replace or regular expressions. PowerRename allows simple search and replace or more advanced regular expression matching. While you type in the search and replace input fields, the preview area will show what the items will be renamed to. PowerRename then calls into the Windows Explorer file operations engine to perform the rename. This has the benefit of allowing the rename operation to be undone after PowerRename exits. This code is based on [Chris Davis's SmartRename](https://github.com/chrdavis/SmartRename).
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### File Explorer (Preview Panes)
|
||||
|
||||
[<img align="left" src="./doc/images/overview/PowerPreview_small.PNG" />](/src/modules/previewpane) [File Explorer](/src/modules/previewpane) add-ons right now are just limited to Preview Pane additions for File Explorer. Preview Pane is an existing feature in the File Explorer. To enable it, you just click the View tab in the ribbon and then click "Preview Pane".
|
||||
[<img align="left" src="./doc/images/overview/PowerPreview_small.png" />](https://aka.ms/PowerToysOverview_FileExplorerAddOns) [File Explorer](https://aka.ms/PowerToysOverview_FileExplorerAddOns) add-ons right now are just limited to Preview Pane additions for File Explorer. Preview Pane is an existing feature in the File Explorer. To enable it, you just click the View tab in the ribbon and then click "Preview Pane".
|
||||
|
||||
PowerToys will now enable two types of files to be previewed: Markdown (.md) & SVG (.svg)
|
||||
<br>
|
||||
@@ -46,7 +35,7 @@ PowerToys will now enable two types of files to be previewed: Markdown (.md) & S
|
||||
|
||||
### Image Resizer
|
||||
|
||||
[<img align="left" src="./doc/images/overview/ImageResizer_small.png" />](/src/modules/imageresizer) [Image Resizer](/src/modules/imageresizer) is a Windows Shell Extension for quickly resizing images. With a simple right click from File Explorer, resize one or many images instantly. This code is based on [Brice Lambson's Image Resizer](https://github.com/bricelam/ImageResizer).
|
||||
[<img align="left" src="./doc/images/overview/ImageResizer_small.png" />](https://aka.ms/PowerToysOverview_ImageResizer) [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) is a Windows Shell Extension for quickly resizing images. With a simple right click from File Explorer, resize one or many images instantly. This code is based on [Brice Lambson's Image Resizer](https://github.com/bricelam/ImageResizer).
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
@@ -54,16 +43,29 @@ PowerToys will now enable two types of files to be previewed: Markdown (.md) & S
|
||||
|
||||
### Keyboard Manager
|
||||
|
||||
[<img align="left" src="./doc/images/overview/KBM_small.png" />](src/modules/keyboardmanager/) [Keyboard Manager](src/modules/keyboardmanager/) allows you to customize the keyboard to be more productive by remapping keys and creating your own keyboard shortcuts. This PowerToy requires Windows 10 1903 (build 18362) or later.
|
||||
[<img align="left" src="./doc/images/overview/KBM_small.png" />](https://aka.ms/PowerToysOverview_KeyboardManager) [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) allows you to customize the keyboard to be more productive by remapping keys and creating your own keyboard shortcuts. This PowerToy requires Windows 10 1903 (build 18362) or later.
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### PowerRename
|
||||
|
||||
[<img align="left" src="./doc/images/overview/PowerRename_small.png" />](https://aka.ms/PowerToysOverview_PowerRename) [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) is a Windows Shell Extension for advanced bulk renaming using search and replace or regular expressions. PowerRename allows simple search and replace or more advanced regular expression matching. While you type in the search and replace input fields, the preview area will show what the items will be renamed to. PowerRename then calls into the Windows Explorer file operations engine to perform the rename. This has the benefit of allowing the rename operation to be undone after PowerRename exits. This code is based on [Chris Davis's SmartRename](https://github.com/chrdavis/SmartRename).
|
||||
<br>
|
||||
|
||||
### PowerToys Run
|
||||
|
||||
[<img align="left" src="./doc/images/overview/PowerLauncher_small.png" />](src/modules/launcher/) [PowerToys Run](src/modules/launcher/) is a new toy in PowerToys that can help you search and launch your app instantly with a simple alt-space and start typing! It is open source and modular for additional plugins. Window Walker is now inside too! This PowerToy requires Windows 10 1903 (build 18362) or later.
|
||||
[<img align="left" src="./doc/images/overview/PowerLauncher_small.png" />](https://aka.ms/PowerToysOverview_PowerToysRun) [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) is a new toy in PowerToys that can help you search and launch your app instantly with a simple alt-space and start typing! It is open source and modular for additional plugins. Window Walker is now inside too! This PowerToy requires Windows 10 1903 (build 18362) or later.
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### Shortcut Guide
|
||||
|
||||
[<img align="left" src="./doc/images/overview/ShortcutGuide_small.png" />](https://aka.ms/PowerToysOverview_ShortcutGuide) [Windows key shortcut guide](https://aka.ms/PowerToysOverview_ShortcutGuide) appears when a user holds the Windows key down for more than one second and shows the available shortcuts for the current state of the desktop.
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
@@ -71,13 +73,13 @@ PowerToys will now enable two types of files to be previewed: Markdown (.md) & S
|
||||
|
||||
## Installing and running Microsoft PowerToys
|
||||
|
||||
**Requirements:**
|
||||
- Microsoft PowerToys requires Windows 10 1803 (build 17134) or later.
|
||||
- Have [.NET Core 3.1 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-desktop-3.1.4-windows-x64-installer). The installer will prompt this but we want to directly make people aware.
|
||||
**Requirements**
|
||||
- Windows 10 1803 (build 17134) or later.
|
||||
- Have [.NET Core 3.1 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-desktop-3.1.4-windows-x64-installer). The installer will prompt this but we want to directly make people aware.
|
||||
|
||||
### Via Github with MSI [Recommended]
|
||||
### Via GitHub with MSI [Recommended]
|
||||
|
||||
Install from the [Microsoft PowerToys GitHub releases page][github-release-link]. Click on `Assets` to show the files available in the release and then click on `PowerToysSetup-0.18.1-x64.msi` to download the PowerToys installer.
|
||||
Install from the [Microsoft PowerToys GitHub releases page][github-release-link]. Click on `Assets` to show the files available in the release and then click on `PowerToysSetup-0.19.2-x64.msi` to download the PowerToys installer.
|
||||
|
||||
**Note:** After installing, you will have to start PowerToys for the first time. We will improve install experience this moving forward but due to a possible install dependency, we can't start after install currently.
|
||||
|
||||
@@ -108,6 +110,12 @@ To upgrade PowerToys, run the following command from the command line / PowerShe
|
||||
choco upgrade powertoys
|
||||
```
|
||||
|
||||
### Known issues
|
||||
|
||||
- PT Run, Newly installed apps can't be found [#3553](https://github.com/microsoft/PowerToys/issues/3553). We will address this in 0.20.
|
||||
- PT Run, CPU / Memory, still investigating [#3208](https://github.com/microsoft/PowerToys/issues/3208). We have 2 leads and fixed one item.
|
||||
- WinKey remapping for PT Run can be quirky [#4578](https://github.com/microsoft/PowerToys/issues/4578)
|
||||
|
||||
### Processor support
|
||||
|
||||
We currently support the matrix below.
|
||||
@@ -118,26 +126,29 @@ We currently support the matrix below.
|
||||
|
||||
## What's Happening
|
||||
|
||||
### May 2020 Update
|
||||
### June 2020 Update
|
||||
|
||||
Our goals for 0.18 release cycle was three big items, PowerToys Run, Keyboard manager, and migrating to the new settings system. This is also the first time we'll test out the auto-updating system.
|
||||
Our goals for 0.19 release cycle had one big goal, add in stability / quality fixes. We've addressed over 100 issues across all our utilities. We've improved our installer experience and parts will start coming online in 0.19 and 0.20. In this release, it will be the last time during upgrade you'll see Windows Explorer flash on you. For 0.20, the .NET Core install experience much smoother.
|
||||
|
||||
Feedback is critical. We know there are areas for improvement on PT Run. We would love feedback so we can improve. We also would love to know if you want us to be more aggressive on auto-upgrading.
|
||||
We'd also stress feedback is critical. We know there are areas for improvement on PowerToys Run. We would love feedback so we can improve. We also would love to know if you want us to be more aggressive on auto-upgrading.
|
||||
|
||||
- We shipped [v0.18][github-release-link]!
|
||||
- New Utilities
|
||||
- PowerToys Run, our new application launcher (use alt-space to activate)
|
||||
- Keyboard manager, a quick easy way to remap your keyboard
|
||||
- Fixed [#243](https://github.com/microsoft/PowerToys/issues/243)'s setting issue
|
||||
- Improved performance on FancyZones [#1264](https://github.com/microsoft/PowerToys/issues/1264)
|
||||
- Lots of bug fixes!
|
||||
Lastly, we'd like to thank everyone who filed a bug, gave feedback or made a pull-request. The PowerToys team is extremely grateful to have the support of an amazing active community.
|
||||
|
||||
For [0.19](https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F4), we are proactively working on:
|
||||
- We shipped [v0.19][github-release-link]!
|
||||
- Big push for PowerToys Run search quality fixes
|
||||
- PowerToys Run can now remap to any key shortcut (minus restricted ones such as WinKey+L)
|
||||
- Improved FancyZones on Virtual Desktops and multi-thread design
|
||||
- Installer after 0.19 will no longer restart Windows Explorer
|
||||
- Fixed [#2012 - Uninstalling with old control panel fails](https://github.com/microsoft/PowerToys/issues/2012)
|
||||
- Fixed [#3384 - PowerToys Settings window is empty](https://github.com/microsoft/PowerToys/issues/3384)
|
||||
- Over 100 bug fixes!
|
||||
|
||||
- Enable PT Run to be mapped to Win-Keys
|
||||
- Stability / tech debt fixes
|
||||
- Performance improvements with FancyZones
|
||||
- A testing utility for FancyZones to be sure we can test different window configurations.
|
||||
For [0.20](https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F6), we are proactively working on:
|
||||
|
||||
- Stability
|
||||
- Start work on FZ Editor V2
|
||||
- Start work on OOBE improvements
|
||||
- Keyboard manager improvements
|
||||
|
||||
### Version 1.0 plan
|
||||
|
||||
@@ -149,7 +160,7 @@ Please read the [developer docs](/doc/devdocs) for a detailed breakdown.
|
||||
|
||||
## Contributing
|
||||
|
||||
This project welcomes contributions of all times. Help spec'ing, design, documentation, finding bugs are ways everyone can help on top of coding features / bug fixes. We are excited to work with the power user community to build a set of tools for helping you get the most out of Windows.
|
||||
This project welcomes contributions of all types. Help spec'ing, design, documentation, finding bugs are ways everyone can help on top of coding features / bug fixes. We are excited to work with the power user community to build a set of tools for helping you get the most out of Windows.
|
||||
|
||||
We ask that **before you start work on a feature that you would like to contribute**, please read our [Contributor's Guide](contributing.md). We will be happy to work with you to figure out the best approach, provide guidance and mentorship throughout feature development, and help avoid any wasted or duplicate effort.
|
||||
|
||||
|
||||
41
SECURITY.md
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.2 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [many more](https://opensource.microsoft.com/).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [definition](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
* Full paths of source file(s) related to the manifestation of the issue
|
||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
||||
* Any special configuration required to reproduce the issue
|
||||
* Step-by-step instructions to reproduce the issue
|
||||
* Proof-of-concept or exploit code (if possible)
|
||||
* Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
||||
40
community.md
@@ -2,6 +2,8 @@
|
||||
|
||||
The PowerToys team is extremely grateful to have the support of an amazing active community. The work you do is incredibly important. PowerToys wouldn’t be near what it is without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thanks and to recognize your work. This is a living document dedicated to highlighting the high impact community members and their contributions.
|
||||
|
||||
Names are in alphabetical order based on first name.
|
||||
|
||||
## High impact community members
|
||||
|
||||
### [@Niels9001](https://github.com/niels9001/) - [Niels Laute](https://nielslaute.com/)
|
||||
@@ -10,4 +12,40 @@ Niels has helped drive large sums of our update toward a new [consistent and mod
|
||||
|
||||
### [@riverar](https://github.com/riverar) - [Rafael Rivera](https://withinrafael.com/)
|
||||
|
||||
Rafael has helped do the [upgrade from CppWinRT 1.x to 2.0](https://github.com/microsoft/PowerToys/issues/1907). He directly provided feedback to the CppWinRT team for bugs from this migration as well.
|
||||
Rafael has helped do the [upgrade from CppWinRT 1.x to 2.0](https://github.com/microsoft/PowerToys/issues/1907). He directly provided feedback to the CppWinRT team for bugs from this migration as well.
|
||||
|
||||
## Open source projects
|
||||
|
||||
As PowerToys creates new utilities, some will be based off existing technology. We'll continue to do our best to contribute back to these projects but their efforts were the base of some of our projects. We want to be sure their work is directly recognized.
|
||||
|
||||
### [@jjw24](https://github.com/jjw24/) - Jeremy Wu
|
||||
|
||||
Their fork of Wox was the base of PowerToys Run.
|
||||
|
||||
### [WoX Launcher](https://github.com/Wox-launcher/Wox/)
|
||||
|
||||
Initial base of jjw24's fork, which makes it the base of PowerToys Run.
|
||||
|
||||
## Microsoft community members
|
||||
|
||||
We would like to also directly call out some extremely helpful Microsoft employees that have directly contributed to PowerToys. This isn't their day job and was work they did out of passion. We want to say thank you and recognize your work.
|
||||
|
||||
### [@betsegaw](https://github.com/betsegaw/) - [Betsegaw Tadele](http://www.dreamsofameaningfullife.com/)
|
||||
|
||||
Window Walker, inside PowerToys Run, is from Beta.
|
||||
|
||||
### [@TheMrJukes](https://github.com/TheMrJukes/) - Bret Anderson
|
||||
|
||||
The base of FancyZones and a lot of performance adjustments are from the hard work of Bret.
|
||||
|
||||
### [@bricelam](https://github.com/bricelam/) - [Brice Lambson](https://bricelam.net/)
|
||||
|
||||
Image Resizer is from Brice.
|
||||
|
||||
### [@chrdavis](https://github.com/chrdavis/) - Chris Davis
|
||||
|
||||
PowerRename is from Chris's SmartRename and icon rendering for SVGs in File Explorer
|
||||
|
||||
### [@martinchrzan](https://github.com/martinchrzan/) - Martin Chrzan
|
||||
|
||||
Color Picker is from Martin.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#### [`dllmain.cpp`](/src/modules/example_powertoy/dllmain.cpp)
|
||||
Contains DLL boilerplate code and implementation of the [PowerToys interface](/src/modules/interface/).
|
||||
|
||||
#### [`trace.cpp`](/src/modules/example_powertoy/trace.cpp)
|
||||
Contains code for telemetry.
|
||||
@@ -67,18 +67,6 @@ The returned PowerToy should be in the disabled state. The runner will call the
|
||||
|
||||
In case of errors returns `nullptr`.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() {
|
||||
return new ExamplePowertoy();
|
||||
}
|
||||
|
||||
ExamplePowertoy::ExamplePowertoy() {
|
||||
init_settings();
|
||||
}
|
||||
```
|
||||
|
||||
## get_name
|
||||
|
||||
```cpp
|
||||
@@ -87,13 +75,6 @@ virtual const wchar_t* get_name()
|
||||
|
||||
Returns the name of the PowerToy, it will be cached by the runner.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
```cpp
|
||||
virtual const wchar_t* get_name() override {
|
||||
return L"Example Powertoy";
|
||||
}
|
||||
```
|
||||
|
||||
## get_events
|
||||
|
||||
```cpp
|
||||
@@ -106,17 +87,6 @@ Returns a null-terminated table of the names of the events the PowerToy wants to
|
||||
|
||||
A nullptr can be returned to signal that the PowerToy does not want to subscribe to any event.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual const wchar_t** get_events() override {
|
||||
static const wchar_t* events[] = { ll_keyboard,
|
||||
win_hook_event,
|
||||
nullptr };
|
||||
return events;
|
||||
}
|
||||
```
|
||||
|
||||
## get_config
|
||||
|
||||
```
|
||||
@@ -129,44 +99,6 @@ If `buffer` is a null pointer or the buffer size is not large enough sets the re
|
||||
|
||||
Returns true if successful.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual bool get_config(wchar_t* buffer, int* buffer_size) override {
|
||||
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);
|
||||
|
||||
// Create a Settings object.
|
||||
PowerToysSettings::Settings settings(hinstance, get_name());
|
||||
settings.set_description(L"Serves as an example powertoy, with example settings.");
|
||||
|
||||
// Add an overview link to show in the Settings.
|
||||
settings.set_overview_link(L"https://github.com/microsoft/PowerToys");
|
||||
|
||||
// Add a video link to show in the Settings.
|
||||
settings.set_video_link(L"https://www.youtube.com/watch?v=d3LHo2yXKoY&t=21462");
|
||||
|
||||
// Add a bool property with a toggle editor.
|
||||
settings.add_bool_toogle(
|
||||
L"test_bool_toggle", // property name.
|
||||
L"This is what a BoolToggle property looks like", // description or resource id of the localized string.
|
||||
test_bool_prop // property value.
|
||||
);
|
||||
|
||||
// More settings
|
||||
...
|
||||
|
||||
// Add a custom action property. When using this settings type, the "call_custom_action()" method should be overriden as well.
|
||||
settings.add_custom_action(
|
||||
L"test_custom_action", // action name.
|
||||
L"This is what a CustomAction property looks like", // label above the field.
|
||||
L"Call a custom action", // button text.
|
||||
L"Press the button to call a custom action in the Example PowerToy" // display values / extended info.
|
||||
);
|
||||
|
||||
return settings.serialize_to_buffer(buffer, buffer_size);
|
||||
}
|
||||
```
|
||||
|
||||
## set_config
|
||||
|
||||
```cpp
|
||||
@@ -175,31 +107,6 @@ virtual void set_config(const wchar_t* config)
|
||||
|
||||
After the user has changed the module settings in the Settings editor, the runner calls this method to pass to the module the updated values. It's a good place to save the settings as well.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual void set_config(const wchar_t* config) override {
|
||||
try {
|
||||
// Parse the PowerToysValues object from the received json string.
|
||||
PowerToysSettings::PowerToyValues _values =
|
||||
PowerToysSettings::PowerToyValues::from_json_string(config);
|
||||
|
||||
// Update the bool property.
|
||||
if (_values.is_bool_value(L"test bool_toggle")) {
|
||||
test_bool_prop = _values.get_bool_value(L"test bool_toggle");
|
||||
}
|
||||
|
||||
// More settings
|
||||
...
|
||||
|
||||
save_settings();
|
||||
}
|
||||
catch (std::exception ex) {
|
||||
// Improper JSON.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## call_custom_action
|
||||
|
||||
```cpp
|
||||
@@ -209,31 +116,6 @@ Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.
|
||||
Calls a custom action in response to the user pressing the custom action button in the Settings editor.
|
||||
This can be used to spawn custom editors defined by the PowerToy.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual void call_custom_action(const wchar_t* action) override {
|
||||
try {
|
||||
// Parse the action values, including name.
|
||||
PowerToysSettings::CustomActionObject action_object =
|
||||
PowerToysSettings::CustomActionObject::from_json_string(action);
|
||||
|
||||
if (action_object.get_name() == L"test_custom_action") {
|
||||
|
||||
// Custom action code to increase and show a counter.
|
||||
++this->test_custom_action_num_calls;
|
||||
std::wstring msg(L"I have been called ");
|
||||
msg += std::to_wstring(this->test_custom_action_num_calls);
|
||||
msg += L" time(s).";
|
||||
MessageBox(NULL, msg.c_str(), L"Custom action call.", MB_OK | MB_TOPMOST);
|
||||
}
|
||||
}
|
||||
catch (std::exception ex) {
|
||||
// Improper JSON.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## enable
|
||||
|
||||
```cpp
|
||||
@@ -242,14 +124,6 @@ Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.
|
||||
|
||||
Enables the PowerToy.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual void enable() {
|
||||
m_enabled = true;
|
||||
}
|
||||
```
|
||||
|
||||
## disable
|
||||
|
||||
```cpp
|
||||
@@ -258,14 +132,6 @@ Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.
|
||||
|
||||
Disables the PowerToy, should free as much memory as possible.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual void disable() {
|
||||
m_enabled = false;
|
||||
}
|
||||
```
|
||||
|
||||
## is_enabled
|
||||
|
||||
```cpp
|
||||
@@ -274,13 +140,6 @@ Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.
|
||||
|
||||
Returns the PowerToy state.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual bool is_enabled() override {
|
||||
return m_enabled;
|
||||
}
|
||||
```
|
||||
## signal_event
|
||||
|
||||
```cpp
|
||||
@@ -294,24 +153,6 @@ The data argument and return value meaning are event-specific:
|
||||
|
||||
Please note that some of the events are currently being signalled from a separate thread.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override {
|
||||
if (wcscmp(name, ll_keyboard) == 0) {
|
||||
auto& event = *(reinterpret_cast<LowlevelKeyboardEvent*>(data));
|
||||
// Return 1 if the keypress is to be suppressed (not forwarded to Windows),
|
||||
// otherwise return 0.
|
||||
return 0;
|
||||
} else if (wcscmp(name, win_hook_event) == 0) {
|
||||
auto& event = *(reinterpret_cast<WinHookEvent*>(data));
|
||||
// Return value is ignored
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
## register_system_menu_helper
|
||||
|
||||
```cpp
|
||||
@@ -338,14 +179,6 @@ Item name is passed as an argument, so that module can distinguish between diffe
|
||||
```
|
||||
Destroy the PowerToy and free all memory.
|
||||
|
||||
Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.cpp):
|
||||
|
||||
```cpp
|
||||
virtual void destroy() override {
|
||||
delete this;
|
||||
}
|
||||
```
|
||||
|
||||
## Powertoys system menu helper interface
|
||||
|
||||
Interface for helper class responsible for handling all system menu related actions.
|
||||
@@ -393,15 +226,15 @@ Process action taken on specific system menu item.
|
||||
|
||||
# Code organization
|
||||
|
||||
### [`powertoy_module_interface.h`](/src/modules/example_powertoy/powertoy_module_interface.h)
|
||||
### [`powertoy_module_interface.h`](/src/modules/interface/powertoy_module_interface.h)
|
||||
Contains the PowerToys interface definition.
|
||||
|
||||
### [`powertoy_system_menu.h`](/src/modules/example_powertoy/powertoy_system_module.h)
|
||||
### [`powertoy_system_menu.h`](/src/modules/interface/powertoy_system_module.h)
|
||||
Contains the PowerToys system menu helper interface definition.
|
||||
|
||||
### [`lowlevel_keyboard_event_data.h`](/src/modules/example_powertoy/lowlevel_keyboard_event_data.h)
|
||||
### [`lowlevel_keyboard_event_data.h`](/src/modules/interface/lowlevel_keyboard_event_data.h)
|
||||
Contains the `LowlevelKeyboardEvent` structure that's passed to `signal_event` for `ll_keyboard` events.
|
||||
|
||||
### [`win_hook_event_data.h`](/src/modules/example_powertoy/win_hook_event_data.h)
|
||||
### [`win_hook_event_data.h`](/src/modules/interface/win_hook_event_data.h)
|
||||
Contains the `WinHookEvent` structure that's passed to `signal_event` for `win_hook_event` events.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- [Coding style](style.md).
|
||||
- Try to package new ideas/components into libraries that have nicely defined interfaces.
|
||||
- Package new ideas into classes or refactor existing ideas into a class as you extend.
|
||||
- When adding new classes/methos/changing existing code: add new unit tests or update the existing tests.
|
||||
- When adding new classes/methods/changing existing code: add new unit tests or update the existing tests.
|
||||
|
||||
## Github Workflow
|
||||
|
||||
@@ -30,7 +30,7 @@ General project organization:
|
||||
|
||||
Documentation for the project.
|
||||
|
||||
### The [`Wiki`](/wiki)
|
||||
### The [`Wiki`](https://github.com/microsoft/PowerToys/wiki)
|
||||
|
||||
The Wiki contains the current specs for the project.
|
||||
|
||||
@@ -46,32 +46,44 @@ Contains the source code of the PowerToys runner and of all of the PowerToys mod
|
||||
|
||||
Various tools used by PowerToys. Includes the Visual Studio 2019 project template for new PowerToys.
|
||||
|
||||
## Building code
|
||||
## Compiling PowerToys
|
||||
|
||||
### Build Prerequisites
|
||||
### Prerequisites for Compiling PowerToys
|
||||
|
||||
- Windows 10 1803 (build 10.0.17134.0) or above to build and run PowerToys.
|
||||
- Visual Studio 2019 Community edition or higher, with the 'Desktop Development with C++' component and the Windows 10 SDK version 10.0.18362.0 or higher.
|
||||
1. Windows 10 April 2018 Update (version 1803) or newer
|
||||
2. Visual Studio Community/Professional/Enterprise 2019
|
||||
3. Run the command below in cmd/terminal to install all the workloads and components for VS.<br />
|
||||
**Note:** the script assumes VS is installed and Community edition. Please update path accordingly if Professional/Enterprise.
|
||||
|
||||
### Building the Code
|
||||
```shell
|
||||
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^
|
||||
modify --installpath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\community" ^
|
||||
--add Microsoft.VisualStudio.Workload.NativeDesktop ^
|
||||
--add Microsoft.VisualStudio.Workload.ManagedDesktop ^
|
||||
--add Microsoft.VisualStudio.Workload.Universal ^
|
||||
--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ^
|
||||
--add Microsoft.VisualStudio.ComponentGroup.UWP.VC ^
|
||||
--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre ^
|
||||
--add Microsoft.VisualStudio.Component.VC.ATL.Spectre
|
||||
```
|
||||
|
||||
### Compiling Source Code
|
||||
|
||||
- Open `powertoys.sln` in Visual Studio, in the `Solutions Configuration` drop-down menu select `Release` or `Debug`, from the `Build` menu choose `Build Solution`.
|
||||
- The PowerToys binaries will be in your repo under `x64\Release`.
|
||||
- If you want to copy the `PowerToys.exe` binary to a different location, you'll also need to copy the `modules` and the `svgs` folders.
|
||||
|
||||
### Building the .msi Installer
|
||||
## Building the Installer (.MSI)
|
||||
|
||||
* From the `installer` folder open `PowerToysSetup.sln` in Visual Studio, in the `Solutions Configuration` drop-down menu select `Release` or `Debug`, from the `Build` menu choose `Build Solution`.
|
||||
* The resulting `PowerToysSetup.msi` installer will be available in the `installer\PowerToysSetup\x64\Release\` folder.
|
||||
### Prerequisites Building the Installer (.MSI)
|
||||
|
||||
#### Prerequisites to Build the MSI Installer
|
||||
1. Install the [WiX Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WiXToolset).
|
||||
2. Install the [WiX Toolset build tools](https://wixtoolset.org/releases/).
|
||||
|
||||
* Install the [WiX Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WiXToolset).
|
||||
* Install the [WiX Toolset build tools](https://wixtoolset.org/releases/).
|
||||
### Compiling Installer (.MSI)
|
||||
|
||||
### Building the MSIX Installer
|
||||
|
||||
Please follow the [installer instructions](./installer/readme.md) which include items such as creating the self-signed cert for testing.
|
||||
- From the `installer` folder open `PowerToysSetup.sln` in Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`, from the `Build` menu choose `Build Solution`.
|
||||
- The resulting `PowerToysSetup.msi` installer will be available in the `installer\PowerToysSetup\x64\Release\` folder.
|
||||
|
||||
## Debugging
|
||||
|
||||
@@ -79,8 +91,8 @@ The following configuration issue only applies if the user is a member of the Ad
|
||||
|
||||
Some PowerToys modules require being run with the highest permission level if the current user is a member of the Administrators group. The highest permission level is required to be able to perform some actions when an elevated application (e.g. Task Manager) is in the foreground or is the target of an action. Without elevated privileges some PowerToys modules will still work but with some limitations:
|
||||
|
||||
- the `FancyZones` module will be not be able to move an elevated window to a zone.
|
||||
- the `Shortcut Guide` module will not appear if the foreground window belongs to an elevated application.
|
||||
- The `FancyZones` module will be not be able to move an elevated window to a zone.
|
||||
- The `Shortcut Guide` module will not appear if the foreground window belongs to an elevated application.
|
||||
|
||||
To run and debug PowerToys from Visual Studio when the user is a member of the Administrators group, Visual Studio has to be started with elevated privileges. If you want to avoid running Visual Studio with elevated privileges and don't mind the limitations described above, you can do the following: open the `runner` project properties and navigate to the `Linker -> Manifest File` settings, edit the `UAC Execution Level` property and change it from `highestAvailable (level='highestAvailable')` to `asInvoker (/level='asInvoker')`, save the changes.
|
||||
|
||||
@@ -122,7 +134,7 @@ While developing, it's possible to connect the WebView to the development server
|
||||
|
||||
### [`Settings-web`](settings-web.md)
|
||||
This project generates the web UI shown in the [PowerToys Settings](/src/editor).
|
||||
It's a `ReactJS` project created using [UI Fabric](https://developer.microsoft.com/en-us/fabric#/).
|
||||
It's a `ReactJS` project created using [Fluent UI](https://developer.microsoft.com/en-us/fluentui#/).
|
||||
|
||||
## Current modules
|
||||
### [`FancyZones`](modules/fancyzones.md)
|
||||
@@ -134,11 +146,6 @@ PowerRename is a Windows Shell Context Menu Extension for advanced bulk renaming
|
||||
### [`Shortcut Guide`](modules/shortcut_guide.md)
|
||||
The Windows Shortcut Guide, displayed when the WinKey is held for some time.
|
||||
|
||||
### _obsolete_ [`example_powertoy`](modules/example_powertoy.md)
|
||||
An example PowerToy, that demonstrates how to create new ones. Please note, that this is going to become a Visual Studio project template soon.
|
||||
|
||||
This PowerToy serves as a sample to show how to implement the [PowerToys interface](/src/modules/interface/) when creating a PowerToy. It also showcases the currently implemented settings.
|
||||
|
||||
#### Options
|
||||
|
||||
This module has a setting to serve as an example for each of the currently implemented settings property:
|
||||
@@ -149,4 +156,4 @@ This module has a setting to serve as an example for each of the currently imple
|
||||
- ColorPicker property
|
||||
- CustomAction property
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,50 +1,3 @@
|
||||
# PowerToys and running as Administrator
|
||||
# This file has been moved
|
||||
|
||||
## Too long, Didn't Read 😁
|
||||
|
||||
If you're running any application as an administrator (aka elevated) and PowerToys is not, a few things may not work correctly when the elevated applications are in focus or trying to interact with a PowerToys feature like FancyZones.
|
||||
|
||||
## Having PowerToys keep functioning properly
|
||||
|
||||
We understand users will run applications elevated. We do as well. We have two options for you when this scenario happens:
|
||||
|
||||
1. **Recommended:** PowerToys will prompt when we detect a process that is elevated. Go to PowerToys settings inside the General Tab and click "Relaunch as adminstrator".
|
||||
2. Enable "Always run as administrator" in the PowerToys settings.
|
||||
|
||||
## What is "Run as Administrator" / Elevated processes
|
||||
|
||||
This is when a process runs with "elevated" privileges. Typically this would be associated with the administrator accounts on a system.
|
||||
|
||||
Basically it runs with additional access to the operating system. Most things do not need run elevated. A common scenario would be needing to run certain PowerShell commands or edit the registry.
|
||||
|
||||
How do i know my application is "elevated"? If you see this prompt (User Access Control prompt), the application is requesting it:
|
||||
|
||||
![alt text][uac]
|
||||
|
||||
At times also, elevated terminals for instance, they will typically have the phrase "Administrator" appended to the title bar. Be warned, this isn't always the case it will be appended.
|
||||
|
||||
![alt text][elevatedWindow]
|
||||
|
||||
## When does PowerToys need this
|
||||
|
||||
PowerToys in itself does not. It only needs to be elevated when it has to interact with other applications that are running elevated. If those applications are in focus, PowerToys may not function unless it is elevated as well.
|
||||
|
||||
These are the two scenarios we will not work in:
|
||||
|
||||
1. Intercepting certain types of keyboard strokes
|
||||
2. Resizing / Moving windows
|
||||
|
||||
### PowerToys affected
|
||||
|
||||
1. FancyZones
|
||||
- Snapping a window into a zone
|
||||
- Moving the window to a different zone
|
||||
2. Shortcut guide
|
||||
- Display shortcut
|
||||
3. Keyboard remapper
|
||||
- key to key remapping
|
||||
- Global level shortcuts remapping
|
||||
- App-targeted shortcuts remapping
|
||||
|
||||
[uac]: ../images/runAsAdmin/uac.png "User access control (UAC)"
|
||||
[elevatedWindow]: ../images/runAsAdmin/elevatedWindows.png "Run as admin"
|
||||
[PowerToys and running as Administrator](https://aka.ms/powertoysDetectedElevatedHelp)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#### [`main.cpp`](/src/runner/main.cpp)
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletones are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those makred as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletones are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those marked as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
|
||||
#### [`general_settings.cpp`](./general_settings.cpp)
|
||||
#### [`powertoy_module.h`](/src/runner/powertoy_module.h) and [`powertoy_module.cpp`](/src/runner/powertoy_module.cpp)
|
||||
|
||||
@@ -80,7 +80,7 @@ Example module JSON (taken from Shortcut Guide):
|
||||
```
|
||||
produces this settings screen:
|
||||
|
||||

|
||||

|
||||
|
||||
### Helper methods
|
||||
|
||||
@@ -191,7 +191,7 @@ settings.set_icon_key(L"pt-example");
|
||||
settings.add_string(L"string_val", L"Example string label", L"example value");
|
||||
settings.add_int_spinner(L"int_val", L"Example int label", 0, 0, 100, 10);
|
||||
```
|
||||
You can then use `std::wstring serialize()` or `bool serialize_to_buffer(wchar_t* buffer, int* uffer_size)` methods to generate output JSON string.
|
||||
You can then use `std::wstring serialize()` or `bool serialize_to_buffer(wchar_t* buffer, int* buffer_size)` methods to generate output JSON string.
|
||||
|
||||
### Saving settings
|
||||
Use
|
||||
@@ -204,7 +204,7 @@ declared in [`settings_helpers.h`](/src/common/settings_helpers.h).
|
||||
|
||||
### Bool toggle
|
||||
```c++
|
||||
add_bool_toogle(name, description, value)
|
||||
add_bool_toggle(name, description, value)
|
||||
```
|
||||
A simple on-off toggle. Parameters:
|
||||
* `name` - Key for the element in the JSON.
|
||||
@@ -213,7 +213,7 @@ A simple on-off toggle. Parameters:
|
||||
|
||||
This C++:
|
||||
```c++
|
||||
settings.add_bool_toogle(L"bool_name", L"description", true);
|
||||
settings.add_bool_toggle(L"bool_name", L"description", true);
|
||||
```
|
||||
produces this settings element:
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ For a detailed reference of how the settings are implemented in the runner and i
|
||||
</td></tr></table>
|
||||
|
||||
```c++
|
||||
settings.add_bool_toogle(name, description, value)
|
||||
settings.add_bool_toggle(name, description, value)
|
||||
```
|
||||
A simple on-off toggle. Parameters:
|
||||
* `name` - Key for the element in the JSON.
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 9.0 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 8.6 MiB |
|
Before Width: | Height: | Size: 6.5 MiB |
|
Before Width: | Height: | Size: 16 MiB |
|
Before Width: | Height: | Size: 762 KiB |
|
Before Width: | Height: | Size: 405 KiB |
|
Before Width: | Height: | Size: 588 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 858 B |
BIN
doc/images/overview/ColorPicker_large.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
doc/images/overview/ColorPicker_small.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
doc/images/overview/FancyZones_large.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
BIN
doc/images/overview/ImageResizer_large.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 31 KiB |
BIN
doc/images/overview/KBM_large.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 18 KiB |
BIN
doc/images/overview/Original/ColorPicker.png
Normal file
|
After Width: | Height: | Size: 593 KiB |
BIN
doc/images/overview/Original/FancyZones.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
doc/images/overview/Original/ImageResizer.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
doc/images/overview/Original/KBM.png
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
doc/images/overview/Original/PowerLauncher.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
doc/images/overview/Original/PowerPreview.png
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
doc/images/overview/Original/PowerRename.png
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
doc/images/overview/Original/ShortcutGuide.png
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
doc/images/overview/PT_large.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
doc/images/overview/PT_small.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
doc/images/overview/PowerLauncher_large.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 25 KiB |
BIN
doc/images/overview/PowerPreview_large.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 31 KiB |
BIN
doc/images/overview/PowerPreview_small.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
doc/images/overview/PowerRename_large.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
doc/images/overview/PowerRename_small.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB |
BIN
doc/images/overview/ShortcutGuide_large.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
doc/images/overview/ShortcutGuide_small.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 641 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 73 KiB |
@@ -1,15 +1,15 @@
|
||||
# Specs
|
||||
|
||||
All approved specs are inside the [Wiki](https://github.com/microsoft/PowerToys/wiki)
|
||||
All approved specs are inside the [Wiki spec section](https://github.com/microsoft/PowerToys/wiki/Specs)
|
||||
|
||||
## Spec process
|
||||
|
||||
1. A proposed item is either new or requesting additional design
|
||||
2. Spec is written inside the Specs folder and a PR happens with feedback.
|
||||
3. Once spec is signed off, we move it into the [Wiki](https://github.com/microsoft/PowerToys/wiki).
|
||||
3. Once spec is signed off, we move it into the [Wiki spec section](https://github.com/microsoft/PowerToys/wiki/Specs).
|
||||
|
||||
## Thought process behind this
|
||||
|
||||
We want a single wholistic for PowerToys. This includes both source code, docs, and specs. At the same time, we want to ensure items have pull requests and feedback. Since the wiki cannot do PR's, we will do the process above.
|
||||
|
||||
This process will allow specs to be image rich but not impact the primary repository's size as more items come online.
|
||||
This process will allow specs to be image rich but not impact the primary repository's size as more items come online.
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
|
||||
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" >
|
||||
|
||||
<?define FancyZonesProjectName="FancyZones"?>
|
||||
<?define ImageResizerProjectName="ImageResizer"?>
|
||||
<?define KeyboardManagerProjectName="KeyboardManager"?>
|
||||
<?define PowerRenameProjectName="PowerRename"?>
|
||||
<?define ShortcutGuideProjectName="ShortcutGuide"?>
|
||||
<?define ColorPickerProjectName="ColorPicker"?>
|
||||
|
||||
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
|
||||
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
|
||||
<Product Id="*"
|
||||
@@ -198,10 +205,6 @@
|
||||
|
||||
<!-- Close 'PowerToys.exe' before uninstall-->
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" />
|
||||
<!-- Restart explorer.exe if we detect existing PowerRenameExt.dll or ImageResizerExt.dll installation -->
|
||||
<util:CloseApplication Target="explorer.exe" RebootPrompt="no" TerminateProcess="0">
|
||||
EXISTINGPOWERRENAMEEXTPATH OR EXISTINGIMAGERESIZERPATH
|
||||
</util:CloseApplication>
|
||||
<util:CloseApplication CloseMessage="yes" Target="PowerToys.exe" ElevatedCloseMessage="yes" RebootPrompt="no" TerminateProcess="0" />
|
||||
</Product>
|
||||
|
||||
@@ -215,32 +218,36 @@
|
||||
<Directory Id="INSTALLFOLDER" Name="PowerToys">
|
||||
<Directory Id="SvgsInstallFolder" Name="svgs"/>
|
||||
<Directory Id="ModulesInstallFolder" Name="modules">
|
||||
<!-- Resource file directories -->
|
||||
<?foreach Language in ar;bg;ca;cs;de;es;eu-ES;fr;he;hu;it;nb-NO;nl;pl;pt-BR;ru;sk;tr;zh-Hans?>
|
||||
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)">
|
||||
<!-- Resource file directories -->
|
||||
<?foreach Language in ar;bg;ca;cs;de;es;eu-ES;fr;he;hu;it;nb-NO;nl;pl;pt-BR;ru;sk;tr;zh-Hans?>
|
||||
<!--NB: Ids can't contain hyphens-->
|
||||
<?if $(var.Language) = eu-ES?>
|
||||
<?define IdSafeLanguage = eu_ES?>
|
||||
<?define IdSafeLanguage = eu_ES?>
|
||||
<?elseif $(var.Language) = nb-NO?>
|
||||
<?define IdSafeLanguage = nb_NO?>
|
||||
<?define IdSafeLanguage = nb_NO?>
|
||||
<?elseif $(var.Language) = pt-BR?>
|
||||
<?define IdSafeLanguage = pt_BR?>
|
||||
<?define IdSafeLanguage = pt_BR?>
|
||||
<?elseif $(var.Language) = zh-Hans?>
|
||||
<?define IdSafeLanguage = zh_Hans?>
|
||||
<?define IdSafeLanguage = zh_Hans?>
|
||||
<?else?>
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?endif?>
|
||||
<Directory Id="Resources$(var.IdSafeLanguage)Folder" Name="$(var.Language)" />
|
||||
<?undef IdSafeLanguage?>
|
||||
<?endforeach?>
|
||||
<?endforeach?>
|
||||
</Directory>
|
||||
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)"/>
|
||||
<Directory Id="ShortcutGuideInstallFolder" Name="$(var.ShortcutGuideProjectName)"/>
|
||||
<Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview" />
|
||||
<Directory Id="FancyZonesInstallFolder" Name="FancyZones" />
|
||||
<Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" />
|
||||
<Directory Id="KeyboardManagerInstallFolder" Name="$(var.KeyboardManagerProjectName)" />
|
||||
<Directory Id="ColorPickerInstallFolder" Name="$(var.ColorPickerProjectName)">
|
||||
<Directory Id="ColorPickerResourcesFolder" Name="Resources"/>
|
||||
</Directory>
|
||||
<Directory Id="LauncherInstallFolder" Name="launcher">
|
||||
<Directory Id="AssetsFolder" Name="Assets" />
|
||||
<Directory Id="LauncherImagesFolder" Name="Images" />
|
||||
<Directory Id="LauncherUIControlsFolder" Name="Microsoft.Toolkit.Uwp.UI.Controls" />
|
||||
<Directory Id="LauncherXamlUIFolder" Name="Microsoft.UI.Xaml">
|
||||
<Directory Id="XamlUIAssetsFolder" Name="Assets" />
|
||||
</Directory>
|
||||
<Directory Id="LauncherImagesFolder" Name="Images" />
|
||||
<Directory Id="LauncherpinyindbFolder" Name="pinyindb" />
|
||||
<Directory Id="LauncherPluginsFolder" Name="Plugins">
|
||||
<Directory Id="CalculatorPluginFolder" Name="Microsoft.Plugin.Calculator">
|
||||
@@ -281,7 +288,9 @@
|
||||
<Directory Id="SettingsV2ViewsInstallFolder" Name="Views"/>
|
||||
<Directory Id="SettingsV2StylesInstallFolder" Name="Styles"/>
|
||||
<Directory Id="SettingsV2PropertiesInstallFolder" Name="Properties"/>
|
||||
<Directory Id="SettingsV2AssetsInstallFolder" Name="Assets"/>
|
||||
<Directory Id="SettingsV2AssetsInstallFolder" Name="Assets">
|
||||
<Directory Id="SettingsV2AssetsModulesInstallFolder" Name="Modules" />
|
||||
</Directory>
|
||||
<Directory Id="SettingsV2ControlsInstallFolder" Name="Controls"/>
|
||||
<Directory Id="SettingsV2XamlInstallFolder" Name="Microsoft.UI.Xaml">
|
||||
<Directory Id="SettingsV2XamlAssetsInstallFolder" Name="Assets" />
|
||||
@@ -352,9 +361,6 @@
|
||||
<Component Id="powertoysinterop_dll" Guid="B7DD2DF4-C8F2-46FA-9571-D6EF1588ADF3" Win64="yes">
|
||||
<File Id="PowerToysInterop.dll" KeyPath="yes" Checksum="yes" />
|
||||
</Component>
|
||||
<Component Id="osDetection_dll" Guid="AA370C25-4AC8-447B-A2FF-C99365C6BE67" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)os-detection.dll" KeyPath="yes" Checksum="yes" />
|
||||
</Component>
|
||||
<Component Id="vcredist_dlls" Guid="CBE26CB0-3AD0-4336-A7D6-503046BADEBC" Win64="yes">
|
||||
<!-- VCRuntime -->
|
||||
<?foreach File in vcruntime140.dll;vcruntime140_1.dll;concrt140.dll;msvcp140.dll;msvcp140_1.dll;msvcp140_2.dll;msvcp140_codecvt_ids.dll;vccorlib140.dll?>
|
||||
@@ -381,73 +387,142 @@
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="FancyZonesInstallFolder" FileSource="$(var.BinX64Dir)modules\">
|
||||
<Component Id="Module_FancyZones" Guid="C6B5272E-6ED4-4B80-B0E7-2FF0355D8CF4" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\fancyzones.dll" KeyPath="yes" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\FancyZonesEditor.exe" >
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\fancyzones.dll" KeyPath="yes" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\FancyZonesEditor.exe" >
|
||||
<netfx:NativeImage Id="FancyZonesEditor.exe" Platform="64bit" Priority="0" />
|
||||
</File>
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\ControlzEx.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\MahApps.Metro.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\Microsoft.Xaml.Behaviors.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\FancyZonesEditor.exe.config" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Buffers.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Memory.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Numerics.Vectors.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Text.Encodings.Web.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Text.Json.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.Threading.Tasks.Extensions.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FancyZones\System.ValueTuple.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\ControlzEx.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\MahApps.Metro.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\Microsoft.Xaml.Behaviors.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\FancyZonesEditor.exe.config" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Buffers.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Memory.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Numerics.Vectors.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Text.Encodings.Web.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Text.Json.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.Threading.Tasks.Extensions.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\System.ValueTuple.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\ManagedCommon.dll" />
|
||||
<File Id="FancyZones_Telemetry.dll" Source="$(var.BinX64Dir)modules\$(var.FancyZonesProjectName)\Telemetry.dll" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="ModulesInstallFolder" FileSource="$(var.BinX64Dir)modules\">
|
||||
<Component Id="Module_ShortcutGuide" Guid="CBD0AC09-91D3-428E-B2B3-05745ADF3473" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\shortcut_guide.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
|
||||
<Component Id="Module_PowerRename" Guid="E4401D08-27FE-4F96-BA17-0C61FD79E684" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\PowerRenameExt.dll" KeyPath="yes" />
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{0440049F-D1DC-4E46-B27B-98393D79486B}">
|
||||
<RegistryValue Type="string" Value="PowerRename Shell Extension" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="[ModulesInstallFolder]PowerRenameExt.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Apartment" />
|
||||
</RegistryKey>
|
||||
<RegistryKey Root="HKCR" Key="AllFileSystemObjects\ShellEx\ContextMenuHandlers\PowerRenameExt">
|
||||
<RegistryValue Type="string" Value="{0440049F-D1DC-4E46-B27B-98393D79486B}"/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
|
||||
<Component Id="Module_Launcher" Guid="9A343236-B49D-451D-A27D-4C336F460A45" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\Microsoft.Launcher.dll" />
|
||||
</Component>
|
||||
|
||||
<Component Id="Module_KeyboardManager" Guid="9279BD82-786F-4F0B-8E49-DB484EE34C9B" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\KeyboardManager.dll" />
|
||||
<Component Id="Module_PowerPreview_PerUserRegistry" Guid="CD90ADC0-7CD5-4A62-B0AF-23545C1E6DD3" Win64="yes">
|
||||
<!-- Added a separate component for Per-User registry changes -->
|
||||
<!-- Registry Key for Class Registration of Svg Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{ddee2b8a-6807-48a6-bb20-2338174ff779}">
|
||||
<RegistryValue Type="string" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Name="DisplayName" Value="Svg Preview Handler" />
|
||||
<RegistryValue Type="string" Name="AppID" Value="{CF142243-F059-45AF-8842-DBBE9783DB14}" />
|
||||
<RegistryValue Type="string" Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value=""/>
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="mscoree.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Assembly" Value="SvgPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Class" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Both" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgPreviewHandler.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Assembly" Value="SvgPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Class" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgPreviewHandler.dll" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for Class Registration of Svg Thumbnail Provider -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{36B27788-A8BB-4698-A756-DF9F11F64F84}">
|
||||
<RegistryValue Type="string" Value="SvgThumbnailProvider.SvgThumbnailProvider" />
|
||||
<RegistryValue Type="string" Name="DisplayName" Value="Svg Thumbnail Provider" />
|
||||
<RegistryValue Type="string" Name="AppID" Value="{CF142243-F059-45AF-8842-DBBE9783DB14}" />
|
||||
<RegistryValue Type="string" Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value=""/>
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="mscoree.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Assembly" Value="SvgThumbnailProvider, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Class" Value="SvgThumbnailProvider.SvgThumbnailProvider" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Both" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgThumbnailProvider.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Assembly" Value="SvgThumbnailProvider, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Class" Value="SvgThumbnailProvider.SvgThumbnailProvider" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgThumbnailProvider.dll" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for Class Registration of Markdown Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{45769bcc-e8fd-42d0-947e-02beef77a1f5}">
|
||||
<RegistryValue Type="string" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Name="DisplayName" Value="Markdown Preview Handler" />
|
||||
<RegistryValue Type="string" Name="AppID" Value="{CF142243-F059-45AF-8842-DBBE9783DB14}" />
|
||||
<RegistryValue Type="string" Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="mscoree.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Assembly" Value="MarkdownPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Class" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Both" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]MarkdownPreviewHandler.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Assembly" Value="MarkdownPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Class" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]MarkdownPreviewHandler.dll" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for AppID registration -->
|
||||
<RegistryKey Root="HKCR" Key="AppID\{CF142243-F059-45AF-8842-DBBE9783DB14}">
|
||||
<RegistryValue Type="expandable" Name="DllSurrogate" Value="%SystemRoot%\system32\prevhost.exe" />
|
||||
</RegistryKey>
|
||||
<!-- Add Svg preview handler to preview handlers list -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\PreviewHandlers">
|
||||
<RegistryValue Type="string" Name="{ddee2b8a-6807-48a6-bb20-2338174ff779}" Value="Svg Preview Handler" />
|
||||
</RegistryKey>
|
||||
<!-- Add Markdown preview handler to preview handlers list -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\PreviewHandlers">
|
||||
<RegistryValue Type="string" Name="{45769bcc-e8fd-42d0-947e-02beef77a1f5}" Value="Markdown Preview Handler" />
|
||||
</RegistryKey>
|
||||
<!-- Add file type association for Svg Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key=".svg\shellex">
|
||||
<RegistryValue Type="string" Key="{8895b1c6-b41f-4c1c-a562-0d564250836f}" Value="{ddee2b8a-6807-48a6-bb20-2338174ff779}" />
|
||||
</RegistryKey>
|
||||
<!-- Add file type association for Svg Thumbnail Provider -->
|
||||
<RegistryKey Root="HKCR" Key=".svg\shellex">
|
||||
<RegistryValue Type="string" Key="{E357FCCD-A995-4576-B01F-234630154E96}" Value="{36B27788-A8BB-4698-A756-DF9F11F64F84}" />
|
||||
</RegistryKey>
|
||||
<!-- Add file type association for Markdown Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key=".md\shellex">
|
||||
<RegistryValue Type="string" Key="{8895b1c6-b41f-4c1c-a562-0d564250836f}" Value="{45769bcc-e8fd-42d0-947e-02beef77a1f5}" />
|
||||
</RegistryKey>
|
||||
<!-- Update Key to use IE11 for prevhost.exe -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION">
|
||||
<RegistryValue Type="integer" Name="prevhost.exe" Value="11000" />
|
||||
</RegistryKey>
|
||||
<!-- Update Key to use IE11 for dllhost.exe -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION">
|
||||
<RegistryValue Type="integer" Name="dllhost.exe" Value="11000" />
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="ImageResizerInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)">
|
||||
<Component Id="Module_ImageResizer" Guid="96E63289-759C-4A73-A56B-EE7429932F72" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\ImageResizer.exe">
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\ImageResizer.exe">
|
||||
<netfx:NativeImage Id="ImageResizer.exe" Platform="all" Priority="0" />
|
||||
</File>
|
||||
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.Platform.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.Extras.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\System.Windows.Interactivity.dll">
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.Platform.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.Extras.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\System.Windows.Interactivity.dll">
|
||||
<!-- NB: Needed since it's only referenced in XAML. -->
|
||||
<netfx:NativeImage Id="Interactivity" Platform="all" Priority="0"/>
|
||||
</File>
|
||||
<File Source="$(var.BinX64Dir)modules\Newtonsoft.Json.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\ImageResizerExt.dll" KeyPath="yes" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\Newtonsoft.Json.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\ImageResizerExt.dll" KeyPath="yes" />
|
||||
<File Id="ImageResizer_interop" Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\PowerToysInterop.dll" />
|
||||
|
||||
<!-- VCRuntime -->
|
||||
<?foreach File in vcruntime140.dll;vcruntime140_1.dll;concrt140.dll;msvcp140.dll;msvcp140_1.dll;msvcp140_2.dll;msvcp140_codecvt_ids.dll;vccorlib140.dll?>
|
||||
<File Id="ImageResizer_$(var.File)" Source="$(var.RepoDir)installer\VCRuntime\$(var.File)" />
|
||||
<File Id="ImageResizer_$(var.File)" Source="$(var.RepoDir)installer\VCRuntime\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="Module_ImageResizer_Registry" Guid="8B593E2C-2D9B-4EBC-93F7-A2B69707DAC9" Win64="yes">
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}\InprocServer32">
|
||||
<RegistryValue Value="[ModulesInstallFolder]ImageResizerExt.dll" Type="string" />
|
||||
<RegistryValue Value="[ImageResizerInstallFolder]ImageResizerExt.dll" Type="string" />
|
||||
<RegistryValue Name="ThreadingModel" Value="Apartment" Type="string" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for the drag and drop handler -->
|
||||
@@ -509,69 +584,51 @@
|
||||
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
|
||||
Type="string" />
|
||||
</Component>
|
||||
<Component Id="Module_PowerPreview_PerUserRegistry" Guid="CD90ADC0-7CD5-4A62-B0AF-23545C1E6DD3" Win64="yes">
|
||||
<!-- Added a separate component for Per-User registry changes -->
|
||||
<!-- Registry Key for Class Registration of Svg Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{ddee2b8a-6807-48a6-bb20-2338174ff779}">
|
||||
<RegistryValue Type="string" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Name="DisplayName" Value="Svg Preview Handler" />
|
||||
<RegistryValue Type="string" Name="AppID" Value="{CF142243-F059-45AF-8842-DBBE9783DB14}" />
|
||||
<RegistryValue Type="string" Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value=""/>
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="mscoree.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Assembly" Value="SvgPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Class" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Both" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgPreviewHandler.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Assembly" Value="SvgPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Class" Value="SvgPreviewHandler.SvgPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]SvgPreviewHandler.dll" />
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="PowerRenameInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.PowerRenameProjectName)">
|
||||
<Component Id="Module_PowerRename" Guid="E4401D08-27FE-4F96-BA17-0C61FD79E684" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.PowerRenameProjectName)\PowerRenameExt.dll" KeyPath="yes" />
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{0440049F-D1DC-4E46-B27B-98393D79486B}">
|
||||
<RegistryValue Type="string" Value="PowerRename Shell Extension" />
|
||||
<RegistryValue Type="string" Name="ContextMenuOptIn" Value="" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="[PowerRenameInstallFolder]PowerRenameExt.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Apartment" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for Class Registration of Markdown Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key="CLSID\{45769bcc-e8fd-42d0-947e-02beef77a1f5}">
|
||||
<RegistryValue Type="string" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Name="DisplayName" Value="Markdown Preview Handler" />
|
||||
<RegistryValue Type="string" Name="AppID" Value="{CF142243-F059-45AF-8842-DBBE9783DB14}" />
|
||||
<RegistryValue Type="string" Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Value="mscoree.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Assembly" Value="MarkdownPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="Class" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="ThreadingModel" Value="Both" />
|
||||
<RegistryValue Type="string" Key="InprocServer32" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]MarkdownPreviewHandler.dll" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Assembly" Value="MarkdownPreviewHandler, Version=$(var.Version).0, Culture=neutral" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="Class" Value="MarkdownPreviewHandler.MarkdownPreviewHandler" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="RuntimeVersion" Value="v4.0.30319" />
|
||||
<RegistryValue Type="string" Key="InprocServer32\$(var.Version).0" Name="CodeBase" Value="file:///[FileExplorerPreviewInstallFolder]MarkdownPreviewHandler.dll" />
|
||||
</RegistryKey>
|
||||
<!-- Registry Key for AppID registration -->
|
||||
<RegistryKey Root="HKCR" Key="AppID\{CF142243-F059-45AF-8842-DBBE9783DB14}">
|
||||
<RegistryValue Type="expandable" Name="DllSurrogate" Value="%SystemRoot%\system32\prevhost.exe" />
|
||||
</RegistryKey>
|
||||
<!-- Add Svg preview handler to preview handlers list -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\PreviewHandlers">
|
||||
<RegistryValue Type="string" Name="{ddee2b8a-6807-48a6-bb20-2338174ff779}" Value="Svg Preview Handler" />
|
||||
</RegistryKey>
|
||||
<!-- Add Markdown preview handler to preview handlers list -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\PreviewHandlers">
|
||||
<RegistryValue Type="string" Name="{45769bcc-e8fd-42d0-947e-02beef77a1f5}" Value="Markdown Preview Handler" />
|
||||
</RegistryKey>
|
||||
<!-- Add file type association for Svg Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key=".svg\shellex">
|
||||
<RegistryValue Type="string" Key="{8895b1c6-b41f-4c1c-a562-0d564250836f}" Value="{ddee2b8a-6807-48a6-bb20-2338174ff779}" />
|
||||
</RegistryKey>
|
||||
<!-- Add file type association for Markdown Preview Handler -->
|
||||
<RegistryKey Root="HKCR" Key=".md\shellex">
|
||||
<RegistryValue Type="string" Key="{8895b1c6-b41f-4c1c-a562-0d564250836f}" Value="{45769bcc-e8fd-42d0-947e-02beef77a1f5}" />
|
||||
</RegistryKey>
|
||||
<!-- Update Key to use IE11 for prevhost.exe -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION">
|
||||
<RegistryValue Type="integer" Name="prevhost.exe" Value="11000" />
|
||||
<RegistryKey Root="HKCR" Key="AllFileSystemObjects\ShellEx\ContextMenuHandlers\PowerRenameExt">
|
||||
<RegistryValue Type="string" Value="{0440049F-D1DC-4E46-B27B-98393D79486B}"/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
|
||||
<DirectoryRef Id="ShortcutGuideInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.ShortcutGuideProjectName)\">
|
||||
<Component Id="Module_ShortcutGuide" Guid="CBD0AC09-91D3-428E-B2B3-05745ADF3473" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.ShortcutGuideProjectName)\$(var.ShortcutGuideProjectName).dll" KeyPath="yes" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="KeyboardManagerInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.KeyboardManagerProjectName)\">
|
||||
<Component Id="Module_KeyboardManager" Guid="9279BD82-786F-4F0B-8E49-DB484EE34C9B" Win64="yes">
|
||||
<File Source="$(var.BinX64Dir)modules\$(var.KeyboardManagerProjectName)\KeyboardManager.dll" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="ColorPickerInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.ColorPickerProjectName)">
|
||||
<Component Id="Module_ColorPicker" Guid="8A52A69E-37B2-4BEA-9D73-77763066052F" Win64="yes">
|
||||
<?foreach File in ColorPicker.dll;ColorPicker.exe;ColorPicker.exe.config;Microsoft.Bcl.AsyncInterfaces.dll;Microsoft.Expression.Interactions.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;PowerToysInterop.dll;System.Buffers.dll;System.Memory.dll;System.Numerics.Vectors.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;System.Threading.Tasks.Extensions.dll;System.ValueTuple.dll;System.Windows.Interactivity.dll;Telemetry.dll;ManagedCommon.dll;System.Runtime.CompilerServices.Unsafe.dll?>
|
||||
<File Id="ColorPickerFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.ColorPickerProjectName)\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="ColorPickerResourcesFolder" FileSource="$(var.BinX64Dir)modules\$(var.ColorPickerProjectName)\Resources">
|
||||
<Component Id="Module_ColorPicker_Resources" Guid="7544BD0F-1DB6-4C53-89D3-ADAD472FDCC1">
|
||||
<?foreach File in colorPicker.cur;icon.ico?>
|
||||
<File Id="ColorPickerFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.ColorPickerProjectName)\Resources\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="FileExplorerPreviewInstallFolder" FileSource="$(var.RepoDir)\modules\FileExplorerPreview\">
|
||||
<Component Id="Module_PowerPreview" Guid="FF1700D5-1B07-4E07-9A62-4D206645EEA9" Win64="yes">
|
||||
<!-- Component to include PowerPreview Module Source dll's -->
|
||||
@@ -582,6 +639,8 @@
|
||||
<File Source="$(var.BinX64Dir)modules\FileExplorerPreview\Telemetry.dll" />
|
||||
<!-- File to include dll for Svg Preview Handler -->
|
||||
<File Source="$(var.BinX64Dir)modules\FileExplorerPreview\SvgPreviewHandler.dll" />
|
||||
<!-- File to include dll for Svg Preview Handler -->
|
||||
<File Source="$(var.BinX64Dir)modules\FileExplorerPreview\SvgThumbnailProvider.dll" />
|
||||
<!-- Files to include dll's for Markdown Preview Handler and it's dependencies -->
|
||||
<File Source="$(var.BinX64Dir)modules\FileExplorerPreview\MarkdownPreviewHandler.dll" />
|
||||
<File Source="$(var.BinX64Dir)modules\FileExplorerPreview\Markdig.Signed.dll" />
|
||||
@@ -601,7 +660,7 @@
|
||||
<File Source="$(var.BinX64Dir)SettingsUIRunner\Microsoft.PowerToys.Settings.UI.Runner.exe"/>
|
||||
<File Source="$(var.BinX64Dir)SettingsUIRunner\Microsoft.PowerToys.Settings.UI.exe"/>
|
||||
<!-- dll -->
|
||||
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;Microsoft.PowerToys.Settings.UI.Runner.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Runtime.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;Telemetry.dll?>
|
||||
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;Microsoft.PowerToys.Settings.UI.Runner.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Runtime.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;Telemetry.dll;ManagedCommon.dll?>
|
||||
<File Id="SettingsV2_$(var.File)" Source="$(var.BinX64Dir)SettingsUIRunner\$(var.File)" />
|
||||
<?endforeach?>
|
||||
<!-- json -->
|
||||
@@ -639,6 +698,13 @@
|
||||
<File Id="Square44x44Logo" Source="$(var.BinX64Dir)SettingsUIRunner\Assets\Square44x44Logo.scale-200.png" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2AssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)SettingsUIRunner\Assets\Modules">
|
||||
<Component Id="SettingsV2AssetsModules" Guid="A0B961A9-77D0-4223-88A9-E3B41BD9C329" Win64="yes">
|
||||
<?foreach File in ColorPicker.png;FancyZones.png;ImageResizer.png;KBM.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ShortcutGuide.png?>
|
||||
<File Source="$(var.BinX64Dir)SettingsUIRunner\Assets\Modules\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2ControlsInstallFolder" FileSource="$(var.BinX64Dir)SettingsUIRunner\Controls">
|
||||
<Component Id="SettingsV2Controls" Guid="05C55C88-B59A-4450-A07C-EB7626E0781A" Win64="yes">
|
||||
<?foreach File in HotkeySettingsControl.xbf?>
|
||||
@@ -655,7 +721,7 @@
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2StylesInstallFolder" FileSource="$(var.BinX64Dir)SettingsUIRunner\Styles">
|
||||
<Component Id="SettingsV2Styles" Guid="44B5C0E0-76DA-4604-BB86-FCD27A00EB71" Win64="yes">
|
||||
<?foreach File in Page.xbf;TextBlock.xbf;_Colors.xbf;_FontSizes.xbf;_Sizes.xbf;_Thickness.xbf?>
|
||||
<?foreach File in Page.xbf;TextBlock.xbf;_Colors.xbf;_FontSizes.xbf;_Sizes.xbf;_Thickness.xbf;Button.xbf?>
|
||||
<File Id="SettingsV2_Styles_$(var.File)" Source="$(var.BinX64Dir)SettingsUIRunner\Styles\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
@@ -718,7 +784,6 @@
|
||||
<ComponentRef Id="License_rtf" />
|
||||
<ComponentRef Id="Notice_md" />
|
||||
<ComponentRef Id="powertoysinterop_dll" />
|
||||
<ComponentRef Id="osDetection_dll" />
|
||||
<ComponentRef Id="vcredist_dlls" />
|
||||
<ComponentRef Id="PowerToysSvgs" />
|
||||
<ComponentRef Id="Module_ShortcutGuide" />
|
||||
@@ -729,10 +794,12 @@
|
||||
<ComponentRef Id="Module_ImageResizer_Registry" />
|
||||
<ComponentRef Id="Module_PowerPreview" />
|
||||
<ComponentRef Id="Module_PowerPreview_PerUserRegistry" />
|
||||
<ComponentRef Id="Module_Launcher" />
|
||||
<ComponentRef Id="Module_KeyboardManager" />
|
||||
<ComponentRef Id="Module_ColorPicker" />
|
||||
<ComponentRef Id="Module_ColorPicker_Resources"/>
|
||||
<ComponentRef Id="SettingsV2" />
|
||||
<ComponentRef Id="SettingsV2Assets" />
|
||||
<ComponentRef Id="SettingsV2AssetsModules" />
|
||||
<ComponentRef Id="SettingsV2Controls" />
|
||||
<ComponentRef Id="SettingsV2Properties" />
|
||||
<ComponentRef Id="SettingsV2Styles" />
|
||||
@@ -761,7 +828,7 @@
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?endif?>
|
||||
<Component Id="Resources_$(var.IdSafeLanguage)_Component" Directory="Resources$(var.IdSafeLanguage)Folder">
|
||||
<File Id="Resources_ImageResizer_$(var.IdSafeLanguage)_File" Source="$(var.BinX64Dir)modules\$(var.Language)\ImageResizer.resources.dll" />
|
||||
<File Id="Resources_ImageResizer_$(var.IdSafeLanguage)_File" Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\$(var.Language)\ImageResizer.resources.dll" />
|
||||
</Component>
|
||||
<?undef IdSafeLanguage?>
|
||||
<?endforeach?>
|
||||
@@ -770,7 +837,8 @@
|
||||
<Fragment>
|
||||
<ComponentGroup Id="LauncherComponents">
|
||||
<Component Id="launcherInstallComponent" Directory="LauncherInstallFolder" Guid="5E688DB4-C522-4268-BA54-ED1CDFFE9DB6">
|
||||
<?foreach File in App.xbf;ColorCode.Core.dll;ColorCode.UWP.dll;ColorCode.UWP.pri;concrt140_app.dll;ICSharpCode.SharpZipLib.dll;JetBrains.Annotations.dll;LauncherControl.xbf;Mages.Core.dll;Microsoft.Graphics.Canvas.dll;Microsoft.Graphics.Canvas.winmd;Microsoft.Search.Interop.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Parsers.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.pri;Microsoft.Toolkit.Uwp.UI.Animations.dll;Microsoft.Toolkit.Uwp.UI.Animations.pri;Microsoft.Toolkit.Uwp.UI.Controls.dll;Microsoft.Toolkit.Uwp.UI.Controls.pri;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Uwp.UI.pri;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Win32.UI.XamlHost.pri;Microsoft.Toolkit.Win32.UI.XamlHost.winmd;Microsoft.Toolkit.Win32.UI.XamlHost.xml;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.UI.Xaml.pri;Microsoft.UI.Xaml.winmd;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactions.pri;Microsoft.Xaml.Interactivity.dll;Microsoft.Xaml.Interactivity.pri;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;netstandard.dll;Newtonsoft.Json.dll;NHotkey.dll;NHotkey.Wpf.dll;NLog.dll;NLog.Extensions.Logging.dll;NoiseAsset_256x256_PNG.png;Pinyin4Net.dll;PowerLauncher.deps.json;PowerLauncher.dll;PowerLauncher.exe;PowerLauncher.runtimeconfig.json;PowerLauncher.UI.exe;PowerLauncher.UI.xr.xml;resources.pri;ResultList.xbf;SQLite.Interop.dll;System.ComponentModel.Composition.dll;System.Data.OleDb.dll;System.Data.SqlClient.dll;System.Data.SQLite.dll;System.IO.Ports.dll;System.Net.Http.Rtc.dll;System.Numerics.Vectors.WindowsRuntime.dll;System.Private.Reflection.Metadata.Ecma335.dll;System.Private.ServiceModel.dll;System.Reflection.Context.dll;System.Security.Permissions.dll;System.ServiceModel.dll;System.ServiceModel.Duplex.dll;System.ServiceModel.Http.dll;System.ServiceModel.NetTcp.dll;System.ServiceModel.Primitives.dll;System.ServiceModel.Security.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;WindowsInput.dll;Wox.Core.dll;Wox.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToysInterop.dll;Telemetry.dll;PowerLauncher.Telemetry.dll;PropertyChanged.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll?>
|
||||
<File Source="$(var.BinX64Dir)modules\Launcher\Microsoft.Launcher.dll" />
|
||||
<?foreach File in concrt140_app.dll;ICSharpCode.SharpZipLib.dll;JetBrains.Annotations.dll;Mages.Core.dll;Microsoft.Search.Interop.dll;EntityFramework.SqlServer.dll;EntityFramework.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;NLog.dll;NLog.Extensions.Logging.dll;Pinyin4Net.dll;PowerLauncher.deps.json;PowerLauncher.dll;PowerLauncher.exe;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll;sni.dll;System.Data.SQLite.EF6.dll;PowerLauncher.runtimeconfig.json;SQLite.Interop.dll;System.Data.OleDb.dll;System.Data.SqlClient.dll;System.Data.SQLite.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;WindowsInput.dll;Wox.Core.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToysInterop.dll;Telemetry.dll;PowerLauncher.Telemetry.dll;PropertyChanged.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;ControlzEx.dll;MahApps.Metro.dll;ManagedCommon.dll?>
|
||||
<File Id="File_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\$(var.File)" />
|
||||
<?endforeach?>
|
||||
<File Source="$(var.BinX64Dir)SettingsUIRunner\Microsoft.PowerToys.Settings.UI.Lib.dll" />
|
||||
@@ -779,40 +847,27 @@
|
||||
<File Id="File_$(var.File)" Source="$(var.RepoDir)installer\VCRuntime\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="launcherAssetsComponent" Directory="AssetsFolder" Guid="6A86A414-D68B-49F0-A7AD-A342528D7ACD">
|
||||
<?foreach File in LockScreenLogo.scale-200.png;SplashScreen.scale-200.png;Square150x150Logo.scale-200.png;Square44x44Logo.scale-200.png;Square44x44Logo.targetsize-24_altform-unplated.png;StoreLogo.png;Wide310x150Logo.scale-200.png?>
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\Assets\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="launcherImagesComponent" Directory="LauncherImagesFolder" Guid="D254220C-1DD9-4C74-8810-1AAB2F940DE8">
|
||||
<?foreach File in app.png;app_error.png;Browser.png;calculator.png;cancel.png;close.png;cmd.png;color.png;copy.png;down.png;EXE.png;file.png;find.png;folder.png;history.png;image.png;Link.png;lock.png;logoff.png;ok.png;open.png;plugin.png;recyclebin.png;restart.png;search.png;settings.png;shutdown.png;sleep.png;up.png;update.png;warning.png?>
|
||||
<?foreach File in app.dark.png;app.light.png;app_error.dark.png;app_error.light.png;Browser.png;calculator.png;cancel.png;close.png;cmd.png;color.png;copy.png;down.png;EXE.png;file.png;find.png;folder.png;history.png;image.png;Link.png;lock.png;logoff.png;ok.png;open.png;plugin.png;recyclebin.png;restart.png;search.png;settings.png;shutdown.png;sleep.png;up.png;update.png;warning.png?>
|
||||
<File Id="File_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Images\$(var.File)" />
|
||||
<?endforeach?>
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\Images\New Message.png" />
|
||||
</Component>
|
||||
<Component Id="launcherUIControlsComponent" Directory="LauncherUIControlsFolder" Guid="9C6C3785-D6FB-468A-9BEC-130F0403E7F8">
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\Microsoft.Toolkit.Uwp.UI.Controls\Microsoft.Toolkit.Uwp.UI.Controls.xr.xml" />
|
||||
</Component>
|
||||
<Component Id="launcherXamlAssetsComponent" Directory="XamlUIAssetsFolder" Guid="C7ECA65E-73D3-4C02-A6FA-FD1E3215CC48">
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\Microsoft.UI.Xaml\Assets\NoiseAsset_256X256_PNG.png" />
|
||||
</Component>
|
||||
<Component Id="launcherpinyinComponent" Directory="LauncherpinyindbFolder" Guid="F9EA53C7-D6AE-4E62-9800-0D32FBBD9F65">
|
||||
<?foreach File in pinyin_gwoyeu_mapping.xml;pinyin_mapping.xml;unicode_to_hanyu_pinyin.txt?>
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\pinyindb\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="launcherPropertiesComponent" Directory="LauncherPropertiesFolder" Guid="5C18CDB8-DBBB-4D53-A935-943347BC6310">
|
||||
<File Source="$(var.BinX64Dir)modules\launcher\Properties\Default.rd.xml" />
|
||||
</Component>
|
||||
|
||||
<!-- Calculator Plugin -->
|
||||
<Component Id="calculatorComponent" Directory="CalculatorPluginFolder" Guid="19DE1022-583C-4969-9AFC-D43CB944003D">
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Microsoft.Plugin.Caculator.deps.json;Microsoft.Plugin.Caculator.dll;Wox.Plugin.dll?>
|
||||
<File Id="Calculator_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Caculator\$(var.File)" />
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Microsoft.Plugin.Calculator.deps.json;Microsoft.Plugin.Calculator.dll;Wox.Plugin.dll;Telemetry.dll?>
|
||||
<File Id="Calculator_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Calculator\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="calculatorImagesComponent" Directory="CalculatorImagesFolder" Guid="07EC9232-CF9A-4CDB-8D8E-E79DC75096C0">
|
||||
<File Id="calculatorPluginImg" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Caculator\Images\calculator.png" />
|
||||
<File Id="calculatorPluginImg_calculator_light" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Calculator\Images\calculator.light.png" />
|
||||
<File Id="calculatorPluginImg_calculator_dark" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Calculator\Images\calculator.dark.png" />
|
||||
</Component>
|
||||
<Component Id="calculatorLanguagesComponent" Directory="CalculatorLanguagesFolder" Guid="2D8019E7-664F-4529-9FAA-83C8DACF0732">
|
||||
<?foreach LanguageFile in de.xaml;en.xaml;pl.xaml;tr.xaml;zh-cn.xaml;zh-tw.xaml?>
|
||||
@@ -824,24 +879,24 @@
|
||||
<?else?>
|
||||
<?define IdSafeLanguage = $(var.LanguageFile)?>
|
||||
<?endif?>
|
||||
<File Id="File_calc_Plugin_$(var.IdSafeLanguage)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Caculator\Languages\$(var.LanguageFile)" />
|
||||
<File Id="File_calc_Plugin_$(var.IdSafeLanguage)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Calculator\Languages\$(var.LanguageFile)" />
|
||||
<?undef IdSafeLanguage?>
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="calculatorpinyindbComponent" Directory="CalculatorpinyindbFolder" Guid="D5527670-BE9A-4AA9-9D36-1249F2184B5B">
|
||||
<?foreach File in pinyin_gwoyeu_mapping.xml;pinyin_mapping.xml;unicode_to_hanyu_pinyin.txt?>
|
||||
<File Id="CalcPlugin_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Caculator\pinyindb\$(var.File)" />
|
||||
<File Id="CalcPlugin_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Calculator\pinyindb\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
|
||||
<!-- Folder Plugin -->
|
||||
<Component Id="FolderComponent" Directory="FolderPluginFolder" Guid="453D6C29-8F0D-46EC-B210-82E6AF547039">
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Microsoft.Plugin.Folder.deps.json;Microsoft.Plugin.Folder.dll;Wox.Plugin.dll?>
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Microsoft.Plugin.Folder.deps.json;Microsoft.Plugin.Folder.dll;Wox.Plugin.dll;Telemetry.dll?>
|
||||
<File Id="Folder_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Folder\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="FolderImagesComponent" Directory="FolderPluginImagesFolder" Guid="6C5226EB-E312-4768-B4D1-B1D3ACFCCBDF">
|
||||
<?foreach File in copy.png;deletefilefolder.png;file.png;folder.png;user.png?>
|
||||
<?foreach File in copy.dark.png;copy.light.png;delete.dark.png;delete.light.png;file.dark.png;file.light.png;folder.dark.png;folder.light.png;user.dark.png;user.light.png?>
|
||||
<File Id="FolderPlugin_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Folder\Images\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
@@ -867,12 +922,12 @@
|
||||
|
||||
<!-- Program Plugin -->
|
||||
<Component Id="ProgramComponent" Directory="ProgramPluginFolder" Guid="3C5CA6E6-3D36-4F4E-B40E-38AA5E5CB799">
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.Program.deps.json;Microsoft.Plugin.Program.dll?>
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.Program.deps.json;Microsoft.Plugin.Program.dll;Telemetry.dll?>
|
||||
<File Id="Program_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Program\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="ProgramImagesComponent" Directory="ProgramImagesFolder" Guid="30D357F5-406F-47D1-BEFE-6022746469B4">
|
||||
<?foreach File in cmd.png;disable.png;folder.png;program.png;user.png?>
|
||||
<?foreach File in app.dark.png;app.light.png;disable.light.png;disable.dark.png;folder.light.png;folder.dark.png;shell.light.png;shell.dark.png;user.light.png;user.dark.png?>
|
||||
<File Id="Program_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Program\Images\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
@@ -898,13 +953,14 @@
|
||||
|
||||
<!-- Shell Plugin -->
|
||||
<Component Id="ShellComponent" Directory="ShellPluginFolder" Guid="6D3D7294-1804-47C9-83E5-47A8867F3801">
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.Shell.deps.json;Microsoft.Plugin.Shell.dll?>
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.Shell.deps.json;Microsoft.Plugin.Shell.dll;Telemetry.dll?>
|
||||
<File Id="Shell_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Shell\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="ShellImagesComponent" Directory="ShellImagesFolder" Guid="15B5DBAE-E7C1-4BF7-A29E-6CE76242F8F4">
|
||||
<File Id="ShellPluginImg" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Shell\Images\shell.png" />
|
||||
<File Id="ShellPluginUserImg" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Shell\Images\user.png" />
|
||||
<?foreach File in shell.light.png;shell.dark.png;user.light.png;user.dark.png?>
|
||||
<File Id="Shell_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Shell\Images\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="ShellLanguagesComponent" Directory="ShellLanguagesFolder" Guid="4190F789-8A66-46AA-B920-C76CB29277D7">
|
||||
<?foreach LanguageFile in de.xaml;en.xaml;pl.xaml;tr.xaml;zh-cn.xaml;zh-tw.xaml?>
|
||||
@@ -928,12 +984,28 @@
|
||||
|
||||
<!-- Indexer Plugin -->
|
||||
<Component Id="IndexerComponent" Directory="IndexerPluginFolder" Guid="FEA9816A-B4F7-42CC-99AF-B05F3E7F7EBF">
|
||||
<?foreach File in Microsoft.Plugin.Indexer.deps.json;Microsoft.Plugin.Indexer.dll;plugin.json;Wox.Infrastructure.dll?>
|
||||
<?foreach File in Microsoft.Plugin.Indexer.deps.json;Microsoft.Plugin.Indexer.dll;plugin.json;Wox.Infrastructure.dll;Telemetry.dll?>
|
||||
<File Id="Indexer_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Indexer\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="IndexerImagesComponent" Directory="IndexerImagesFolder" Guid="DB2E8D49-D104-425B-9616-952AC8CAB676">
|
||||
<File Id="IndexerPluginImg" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Indexer\Images\WindowsIndexerImg.bmp" />
|
||||
<?foreach File in indexer.dark.png;indexer.light.png;Warning.light.png;Warning.dark.png?>
|
||||
<File Id="Indexer_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Indexer\Images\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="IndexerLanguagesComponent" Directory="IndexerLanguagesFolder" Guid="4B5ED306-7DD5-4EA6-9DBB-CF054929182C">
|
||||
<?foreach LanguageFile in de.xaml;en.xaml;ja.xaml;pl.xaml;tr.xaml;zh-cn.xaml;zh-tw.xaml?>
|
||||
<!--NB: Ids can't contain hyphens-->
|
||||
<?if $(var.LanguageFile) = zh-cn.xaml?>
|
||||
<?define IdSafeLanguage = zh_cn.xaml?>
|
||||
<?elseif $(var.LanguageFile) = zh-tw.xaml?>
|
||||
<?define IdSafeLanguage = zh_tw.xaml?>
|
||||
<?else?>
|
||||
<?define IdSafeLanguage = $(var.LanguageFile)?>
|
||||
<?endif?>
|
||||
<File Id="Indexer_Plugin_$(var.IdSafeLanguage)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.Indexer\Languages\$(var.LanguageFile)" />
|
||||
<?undef IdSafeLanguage?>
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="IndexerpinyindbComponent" Directory="IndexerpinyindbFolder" Guid="48DE333A-80F8-400A-87F4-244DF0A2DB05">
|
||||
<?foreach File in pinyin_gwoyeu_mapping.xml;pinyin_mapping.xml;unicode_to_hanyu_pinyin.txt?>
|
||||
@@ -943,12 +1015,13 @@
|
||||
|
||||
<!-- WindowWalker Plugin -->
|
||||
<Component Id="WindowWalkerComponent" Directory="WindowWalkerPluginFolder" Guid="EB1391C9-B701-421F-80FC-ABB2FEDFAD19">
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.WindowWalker.deps.json;Microsoft.Plugin.WindowWalker.dll?>
|
||||
<?foreach File in plugin.json;Wox.Infrastructure.dll;Wox.Plugin.dll;Microsoft.Plugin.WindowWalker.deps.json;Microsoft.Plugin.WindowWalker.dll;Telemetry.dll?>
|
||||
<File Id="WindowWalker_$(var.File)" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.WindowWalker\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
<Component Id="WindowWalkerImagesComponent" Directory="WindowWalkerImagesFolder" Guid="3944A7F5-77F4-4979-9911-EDE709B2F509">
|
||||
<File Id="WindowWalkerIcon" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.WindowWalker\Images\windowwalker.png" />
|
||||
<File Id="WindowWalkerDarkIcon" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.WindowWalker\Images\windowwalker.dark.png" />
|
||||
<File Id="WindowWalkerLightIcon" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.WindowWalker\Images\windowwalker.light.png" />
|
||||
</Component>
|
||||
<Component Id="WindowWalkerLanguagesComponent" Directory="WindowWalkerLanguagesFolder" Guid="7D9471D9-5C0A-4BD1-9A01-BAB65DD58834">
|
||||
<File Id="WindowWalkerLanguage" Source="$(var.BinX64Dir)modules\launcher\Plugins\Microsoft.Plugin.WindowWalker\Languages\en.xaml" />
|
||||
@@ -961,4 +1034,4 @@
|
||||
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
</Wix>
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <ProjectTelemetry.h>
|
||||
|
||||
#include "../../src/common/updating/updating.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
TRACELOGGING_DEFINE_PROVIDER(
|
||||
@@ -14,7 +16,6 @@ TRACELOGGING_DEFINE_PROVIDER(
|
||||
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
|
||||
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'
|
||||
|
||||
static const wchar_t* POWERTOYS_EXE_COMPONENT = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}";
|
||||
static const wchar_t* POWERTOYS_UPGRADE_CODE = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}";
|
||||
|
||||
// Creates a Scheduled Task to run at logon for the current user.
|
||||
@@ -563,52 +564,6 @@ LExit:
|
||||
return WcaFinalize(er);
|
||||
}
|
||||
|
||||
std::optional<std::wstring> getMsiPackageInstalledPath(const wchar_t* product_upgrade_code, const wchar_t* file_component)
|
||||
{
|
||||
constexpr size_t guid_length = 39;
|
||||
wchar_t product_ID[guid_length];
|
||||
if (const bool found = ERROR_SUCCESS == MsiEnumRelatedProductsW(product_upgrade_code, 0, 0, product_ID); !found)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (const bool installed = INSTALLSTATE_DEFAULT == MsiQueryProductStateW(product_ID); !installed)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
DWORD buf_size = MAX_PATH;
|
||||
wchar_t buf[MAX_PATH];
|
||||
if (ERROR_SUCCESS == MsiGetProductInfoW(product_ID, INSTALLPROPERTY_INSTALLLOCATION, buf, &buf_size) && buf_size)
|
||||
{
|
||||
return buf;
|
||||
}
|
||||
|
||||
DWORD package_path_size = 0;
|
||||
|
||||
if (ERROR_SUCCESS != MsiGetProductInfoW(product_ID, INSTALLPROPERTY_LOCALPACKAGE, nullptr, &package_path_size))
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
std::wstring package_path(++package_path_size, L'\0');
|
||||
|
||||
if (ERROR_SUCCESS != MsiGetProductInfoW(product_ID, INSTALLPROPERTY_LOCALPACKAGE, package_path.data(), &package_path_size))
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
package_path.resize(size(package_path) - 1); // trim additional \0 which we got from MsiGetProductInfoW
|
||||
|
||||
wchar_t path[256];
|
||||
DWORD path_size = 256;
|
||||
MsiGetComponentPathW(product_ID, file_component, path, &path_size);
|
||||
if (!path_size)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
PathCchRemoveFileSpec(path, path_size);
|
||||
return path;
|
||||
}
|
||||
|
||||
UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
@@ -617,7 +572,7 @@ UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall)
|
||||
|
||||
try
|
||||
{
|
||||
if (auto install_path = getMsiPackageInstalledPath(POWERTOYS_UPGRADE_CODE, POWERTOYS_EXE_COMPONENT))
|
||||
if (auto install_path = updating::get_msi_package_installed_path())
|
||||
{
|
||||
MsiSetPropertyW(hInstall, L"INSTALLFOLDER", install_path->data());
|
||||
}
|
||||
|
||||
@@ -54,14 +54,13 @@
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;..\..\$(PlatformShortName)\$(Configuration)\common.lib;..\..\$(PlatformShortName)\$(Configuration)\updating.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(WIX)sdk\$(WixPlatformToolset)\lib\x64;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -77,14 +76,13 @@
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;..\..\$(PlatformShortName)\$(Configuration)\common.lib;..\..\$(PlatformShortName)\$(Configuration)\updating.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(WIX)sdk\$(WixPlatformToolset)\lib\x64;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -95,11 +93,16 @@
|
||||
<UACExecutionLevel>HighestAvailable</UACExecutionLevel>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(CIBuild)'!='true'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CustomAction.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(CIBuild)'!='true'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Version>0.18.2</Version>
|
||||
<Version>0.20.1</Version>
|
||||
<DefineConstants>Version=$(Version);</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
5
nuget.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<configuration>
|
||||
<config>
|
||||
<clear />
|
||||
</config>
|
||||
</configuration>
|
||||
@@ -2,3 +2,6 @@
|
||||
|
||||
# SA1201: Elements should appear in the correct order
|
||||
dotnet_diagnostic.SA1201.severity = none
|
||||
|
||||
# CA1303: Do not pass literals as localized parameters
|
||||
dotnet_diagnostic.CA1303.severity = suggestion
|
||||
@@ -5,4 +5,4 @@ The PowerToys are split into DLLs for each PowerToy module ([`modules`](/src/mod
|
||||
|
||||
The settings window is a separate executable, contained in [`settings`](/src/settings) folder. It utilizes a WebView to display an HTML-based settings window (contained in [`settings-web`](/src/settings-web) folder).
|
||||
|
||||
The [`common`](/src/common) contains code for a static libary with helper functions, used by both the runner and the PowerToys modules.
|
||||
The [`common`](/src/common) contains code for a static library with helper functions, used by both the runner and the PowerToys modules.
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <common/common.h>
|
||||
#include <common/updating/updating.h>
|
||||
#include <common/updating/http_client.h>
|
||||
#include <common/updating/dotnet_installation.h>
|
||||
|
||||
#include <winrt/Windows.ApplicationModel.h>
|
||||
#include <winrt/Windows.Storage.h>
|
||||
@@ -56,18 +58,11 @@ std::optional<fs::path> copy_self_to_temp_dir()
|
||||
return std::move(dst_path);
|
||||
}
|
||||
|
||||
bool install_new_version_stage_1(const bool must_restart = false)
|
||||
bool install_new_version_stage_1(const std::wstring_view installer_filename, const bool must_restart = false)
|
||||
{
|
||||
std::optional<fs::path> installer;
|
||||
for (auto path : fs::directory_iterator{ updating::get_pending_updates_path() })
|
||||
{
|
||||
if (path.path().native().find(updating::installer_filename_pattern) != std::wstring::npos)
|
||||
{
|
||||
installer.emplace(std::move(path));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!installer)
|
||||
const fs::path installer{ updating::get_pending_updates_path() / installer_filename };
|
||||
|
||||
if (!fs::is_regular_file(installer))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -84,7 +79,7 @@ bool install_new_version_stage_1(const bool must_restart = false)
|
||||
|
||||
std::wstring arguments{ UPDATE_NOW_LAUNCH_STAGE2_CMDARG };
|
||||
arguments += L" \"";
|
||||
arguments += installer->c_str();
|
||||
arguments += installer.c_str();
|
||||
arguments += L"\" \"";
|
||||
arguments += get_module_folderpath();
|
||||
arguments += L"\" ";
|
||||
@@ -103,15 +98,42 @@ bool install_new_version_stage_1(const bool must_restart = false)
|
||||
}
|
||||
}
|
||||
|
||||
bool install_new_version_stage_2(std::wstring_view installer_path, std::wstring_view install_path, const bool launch_powertoys)
|
||||
bool install_new_version_stage_2(std::wstring installer_path, std::wstring_view install_path, const bool launch_powertoys)
|
||||
{
|
||||
if (MsiInstallProductW(installer_path.data(), nullptr) != ERROR_SUCCESS)
|
||||
std::transform(begin(installer_path), end(installer_path), begin(installer_path), ::towlower);
|
||||
|
||||
bool success = true;
|
||||
|
||||
if (installer_path.ends_with(L".msi"))
|
||||
{
|
||||
return false;
|
||||
success = MsiInstallProductW(installer_path.data(), nullptr) == ERROR_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If it's not .msi, then it's our .exe installer
|
||||
SHELLEXECUTEINFOW sei{ sizeof(sei) };
|
||||
sei.fMask = { SEE_MASK_FLAG_NO_UI | SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE};
|
||||
sei.lpFile = installer_path.c_str();
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpParameters = L"-silent";
|
||||
|
||||
success = ShellExecuteExW(&sei) == TRUE;
|
||||
// Wait for the install completion
|
||||
if (success)
|
||||
{
|
||||
WaitForSingleObject(sei.hProcess, INFINITE);
|
||||
CloseHandle(sei.hProcess);
|
||||
}
|
||||
}
|
||||
|
||||
std::error_code _;
|
||||
fs::remove(installer_path, _);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (launch_powertoys)
|
||||
{
|
||||
std::wstring new_pt_path{ install_path };
|
||||
@@ -126,56 +148,6 @@ bool install_new_version_stage_2(std::wstring_view installer_path, std::wstring_
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dotnet_is_installed()
|
||||
{
|
||||
auto runtimes = exec_and_read_output(LR"(dotnet --list-runtimes)");
|
||||
if (!runtimes)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
const char DESKTOP_DOTNET_RUNTIME_STRING[] = "Microsoft.WindowsDesktop.App 3.1.";
|
||||
return runtimes->find(DESKTOP_DOTNET_RUNTIME_STRING) != std::string::npos;
|
||||
}
|
||||
|
||||
bool install_dotnet()
|
||||
{
|
||||
const wchar_t DOTNET_DESKTOP_DOWNLOAD_LINK[] = L"https://download.visualstudio.microsoft.com/download/pr/d8cf1fe3-21c2-4baf-988f-f0152996135e/0c00b94713ee93e7ad5b4f82e2b86607/windowsdesktop-runtime-3.1.4-win-x64.exe";
|
||||
const wchar_t DOTNET_DESKTOP_FILENAME[] = L"windowsdesktop-runtime-3.1.4-win-x64.exe";
|
||||
|
||||
auto dotnet_download_path = fs::temp_directory_path() / DOTNET_DESKTOP_FILENAME;
|
||||
winrt::Windows::Foundation::Uri download_link{ DOTNET_DESKTOP_DOWNLOAD_LINK };
|
||||
|
||||
const size_t max_attempts = 3;
|
||||
bool download_success = false;
|
||||
for (size_t i = 0; i < max_attempts; ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
updating::try_download_file(dotnet_download_path, download_link).wait();
|
||||
download_success = true;
|
||||
break;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// couldn't download
|
||||
}
|
||||
}
|
||||
if (!download_success)
|
||||
{
|
||||
MessageBoxW(nullptr,
|
||||
GET_RESOURCE_STRING(IDS_DOTNET_CORE_DOWNLOAD_FAILURE).c_str(),
|
||||
GET_RESOURCE_STRING(IDS_DOTNET_CORE_DOWNLOAD_FAILURE_TITLE).c_str(),
|
||||
MB_OK | MB_ICONERROR);
|
||||
return false;
|
||||
}
|
||||
SHELLEXECUTEINFOW sei{ sizeof(sei) };
|
||||
sei.fMask = { SEE_MASK_NOASYNC };
|
||||
sei.lpFile = dotnet_download_path.c_str();
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpParameters = L"/install /passive";
|
||||
return ShellExecuteExW(&sei) == TRUE;
|
||||
}
|
||||
|
||||
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
int nArgs = 0;
|
||||
@@ -186,31 +158,81 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
}
|
||||
std::wstring_view action{ args[1] };
|
||||
|
||||
if (action == L"-start_PowerLauncher")
|
||||
if (action == L"-run-non-elevated")
|
||||
{
|
||||
HANDLE hMapFile = OpenFileMappingW(FILE_MAP_WRITE, FALSE, POWER_LAUNCHER_PID_SHARED_FILE);
|
||||
if (hMapFile)
|
||||
int nextArg = 2;
|
||||
|
||||
std::wstring_view target;
|
||||
std::wstring_view pidFile;
|
||||
std::wstring params;
|
||||
|
||||
while (nextArg < nArgs)
|
||||
{
|
||||
if (std::wstring_view(args[nextArg]) == L"-target" && nextArg + 1 < nArgs)
|
||||
{
|
||||
target = args[nextArg + 1];
|
||||
nextArg += 2;
|
||||
}
|
||||
else if (std::wstring_view(args[nextArg]) == L"-pidFile" && nextArg + 1 < nArgs)
|
||||
{
|
||||
pidFile = args[nextArg + 1];
|
||||
nextArg += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
params = args[nextArg];
|
||||
nextArg++;
|
||||
}
|
||||
}
|
||||
|
||||
HANDLE hMapFile = NULL;
|
||||
PDWORD pidBuffer = NULL;
|
||||
|
||||
if (!pidFile.empty())
|
||||
{
|
||||
hMapFile = OpenFileMappingW(FILE_MAP_WRITE, FALSE, pidFile.data());
|
||||
if (hMapFile)
|
||||
{
|
||||
pidBuffer = reinterpret_cast<PDWORD>(MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(DWORD)));
|
||||
if (pidBuffer)
|
||||
{
|
||||
*pidBuffer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run_same_elevation(target.data(), params, pidBuffer);
|
||||
|
||||
// cleanup
|
||||
if (!pidFile.empty())
|
||||
{
|
||||
PDWORD pidBuffer = reinterpret_cast<PDWORD>(MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(DWORD)));
|
||||
if (pidBuffer)
|
||||
{
|
||||
*pidBuffer = 0;
|
||||
run_same_elevation(L"modules\\launcher\\PowerLauncher.exe", L"", pidBuffer);
|
||||
FlushViewOfFile(pidBuffer, sizeof(DWORD));
|
||||
UnmapViewOfFile(pidBuffer);
|
||||
}
|
||||
|
||||
FlushFileBuffers(hMapFile);
|
||||
CloseHandle(hMapFile);
|
||||
if (hMapFile)
|
||||
{
|
||||
FlushFileBuffers(hMapFile);
|
||||
CloseHandle(hMapFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (action == L"-install_dotnet")
|
||||
{
|
||||
if (dotnet_is_installed())
|
||||
if (updating::dotnet_is_installed())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return !install_dotnet();
|
||||
const bool success = updating::install_dotnet();
|
||||
|
||||
MessageBoxW(nullptr,
|
||||
GET_RESOURCE_STRING(IDS_DOTNET_CORE_DOWNLOAD_FAILURE).c_str(),
|
||||
GET_RESOURCE_STRING(IDS_DOTNET_CORE_DOWNLOAD_FAILURE_TITLE).c_str(),
|
||||
MB_OK | MB_ICONERROR);
|
||||
|
||||
return !success;
|
||||
}
|
||||
else if (action == L"-uninstall_msi")
|
||||
{
|
||||
@@ -218,11 +240,13 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
}
|
||||
else if (action == UPDATE_NOW_LAUNCH_STAGE1_CMDARG)
|
||||
{
|
||||
return !install_new_version_stage_1();
|
||||
std::wstring_view installerFilename{ args[2] };
|
||||
return !install_new_version_stage_1(installerFilename);
|
||||
}
|
||||
else if (action == UPDATE_NOW_LAUNCH_STAGE1_START_PT_CMDARG)
|
||||
{
|
||||
return !install_new_version_stage_1(true);
|
||||
std::wstring_view installerFilename{ args[2] };
|
||||
return !install_new_version_stage_1(installerFilename, true);
|
||||
}
|
||||
else if (action == UPDATE_NOW_LAUNCH_STAGE2_CMDARG)
|
||||
{
|
||||
@@ -231,4 +255,4 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include "../common/version.h"
|
||||
|
||||
@@ -10,34 +9,34 @@ BEGIN
|
||||
END
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", "PowerToys Action Runner"
|
||||
VALUE "FileDescription", FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_STRING
|
||||
VALUE "InternalName", "PowerToys Action Runner"
|
||||
VALUE "InternalName", INTERNAL_NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||
VALUE "OriginalFilename", "action_runner.exe"
|
||||
VALUE "ProductName", "PowerToys"
|
||||
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_NAME
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||
END
|
||||
END
|
||||
|
||||
@@ -1,6 +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.200316.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -99,6 +99,7 @@
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -127,6 +128,7 @@
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -165,20 +167,20 @@
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<ResourceCompile Include="action_runner.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="action_runner.rc" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\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.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200316.3" targetFramework="native" />
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200703.9" targetFramework="native" />
|
||||
</packages>
|
||||
@@ -1,3 +1,16 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by action_runner.rc
|
||||
|
||||
//////////////////////////////
|
||||
// Non-localizable
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys ActionRunner"
|
||||
#define INTERNAL_NAME "action_runner"
|
||||
#define ORIGINAL_FILENAME "action_runner.exe"
|
||||
|
||||
// Non-localizable
|
||||
//////////////////////////////
|
||||
|
||||
#define IDS_DOTNET_CORE_DOWNLOAD_FAILURE 101
|
||||
#define IDS_DOTNET_CORE_DOWNLOAD_FAILURE_TITLE 102
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="action_runner.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\runner\msi_to_msix_upgrade.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
207
src/bootstrapper/bootstrapper.cpp
Normal file
@@ -0,0 +1,207 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#include <string_view>
|
||||
#include <optional>
|
||||
#include <fstream>
|
||||
|
||||
#include <common/common.h>
|
||||
#include <common/notifications.h>
|
||||
#include <common/RcResource.h>
|
||||
#include <common/updating/updating.h>
|
||||
#include <common/updating/dotnet_installation.h>
|
||||
#include <common/version.h>
|
||||
#include <common/appMutex.h>
|
||||
#include <common/processApi.h>
|
||||
|
||||
#include <wil/resource.h>
|
||||
|
||||
#include <winrt/base.h>
|
||||
#include "resource.h"
|
||||
#include <Msi.h>
|
||||
|
||||
#include <runner/action_runner_utils.h>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
namespace
|
||||
{
|
||||
const wchar_t APPLICATION_ID[] = L"PowerToysInstaller";
|
||||
const wchar_t TOAST_TAG[] = L"PowerToysInstallerProgress";
|
||||
}
|
||||
|
||||
namespace localized_strings
|
||||
{
|
||||
const wchar_t INSTALLER_EXTRACT_ERROR[] = L"Couldn't extract MSI installer!";
|
||||
const wchar_t TOAST_TITLE[] = L"PowerToys Installation";
|
||||
const wchar_t EXTRACTING_INSTALLER[] = L"Extracting PowerToys MSI...";
|
||||
const wchar_t UNINSTALLING_PREVIOUS_VERSION[] = L"Uninstalling previous PowerToys version...";
|
||||
const wchar_t UNINSTALL_PREVIOUS_VERSION_ERROR[] = L"Couldn't uninstall previous PowerToys version!";
|
||||
const wchar_t INSTALLING_DOTNET[] = L"Installing dotnet...";
|
||||
const wchar_t DOTNET_INSTALL_ERROR[] = L"Couldn't install dotnet!";
|
||||
const wchar_t INSTALLING_NEW_VERSION[] = L"Installing new PowerToys version...";
|
||||
const wchar_t NEW_VERSION_INSTALLATION_DONE[] = L"PowerToys installation complete!";
|
||||
const wchar_t NEW_VERSION_INSTALLATION_ERROR[] = L"Couldn't install new PowerToys version.";
|
||||
}
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
std::optional<fs::path> extractEmbeddedInstaller()
|
||||
{
|
||||
auto executableRes = RcResource::create(IDR_BIN_MSIINSTALLER, L"BIN");
|
||||
if (!executableRes)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
auto installerPath = fs::temp_directory_path() / L"PowerToysBootstrappedInstaller-" PRODUCT_VERSION_STRING L".msi";
|
||||
return executableRes->saveAsFile(installerPath) ? std::make_optional(std::move(installerPath)) : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<fs::path> extractIcon()
|
||||
{
|
||||
auto iconRes = RcResource::create(IDR_BIN_ICON, L"BIN");
|
||||
if (!iconRes)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
auto icoPath = fs::temp_directory_path() / L"PowerToysBootstrappedInstaller.ico";
|
||||
return iconRes->saveAsFile(icoPath) ? std::make_optional(std::move(icoPath)) : std::nullopt;
|
||||
}
|
||||
|
||||
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
using namespace localized_strings;
|
||||
winrt::init_apartment();
|
||||
|
||||
// Try killing PowerToys and prevent future processes launch
|
||||
for (auto& handle : getProcessHandlesByName(L"PowerToys.exe", PROCESS_TERMINATE))
|
||||
{
|
||||
TerminateProcess(handle.get(), 0);
|
||||
}
|
||||
auto powerToysMutex = createAppMutex(POWERTOYS_MSI_MUTEX_NAME);
|
||||
|
||||
int n_cmd_args = 0;
|
||||
LPWSTR* cmd_arg_list = CommandLineToArgvW(GetCommandLineW(), &n_cmd_args);
|
||||
const bool silent = n_cmd_args > 1 && std::wstring_view{ L"-silent" } == cmd_arg_list[1];
|
||||
|
||||
auto instanceMutex = createAppMutex(POWERTOYS_BOOTSTRAPPER_MUTEX_NAME);
|
||||
if (!instanceMutex)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
notifications::override_application_id(APPLICATION_ID);
|
||||
|
||||
fs::path iconPath{ L"C:\\" };
|
||||
if (auto extractedIcon = extractIcon())
|
||||
{
|
||||
iconPath = std::move(*extractedIcon);
|
||||
}
|
||||
|
||||
notifications::register_application_id(TOAST_TITLE, iconPath.c_str());
|
||||
|
||||
auto removeShortcut = wil::scope_exit([&] {
|
||||
notifications::unregister_application_id();
|
||||
});
|
||||
|
||||
// Check if there's a newer version installed, and launch its installer if so.
|
||||
const VersionHelper myVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
|
||||
if (const auto installedVersion = updating::get_installed_powertoys_version(); installedVersion && *installedVersion >= myVersion)
|
||||
{
|
||||
auto msi_path = updating::get_msi_package_path();
|
||||
if (!msi_path.empty())
|
||||
{
|
||||
MsiSetInternalUI(INSTALLUILEVEL_FULL, nullptr);
|
||||
MsiInstallProductW(msi_path.c_str(), nullptr);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::mutex progressLock;
|
||||
notifications::progress_bar_params progressParams;
|
||||
progressParams.progress = 0.0f;
|
||||
progressParams.progress_title = EXTRACTING_INSTALLER;
|
||||
notifications::toast_params params{ TOAST_TAG, false, std::move(progressParams) };
|
||||
notifications::show_toast_with_activations({}, TOAST_TITLE, {}, {}, std::move(params));
|
||||
|
||||
auto processToasts = wil::scope_exit([&] {
|
||||
run_message_loop(true, 2);
|
||||
});
|
||||
|
||||
// Worker thread to periodically increase progress and keep the progress toast from losing focus
|
||||
std::thread{ [&] {
|
||||
for (;; Sleep(3000))
|
||||
{
|
||||
std::scoped_lock lock{ progressLock };
|
||||
if (progressParams.progress == 1.f)
|
||||
{
|
||||
break;
|
||||
}
|
||||
progressParams.progress = min(0.99f, progressParams.progress + 0.001f);
|
||||
notifications::update_progress_bar_toast(TOAST_TAG, progressParams);
|
||||
}
|
||||
} }.detach();
|
||||
|
||||
auto updateProgressBar = [&](const float value, const wchar_t* title) {
|
||||
std::scoped_lock lock{ progressLock };
|
||||
progressParams.progress = value;
|
||||
progressParams.progress_title = title;
|
||||
notifications::update_progress_bar_toast(TOAST_TAG, progressParams);
|
||||
};
|
||||
|
||||
const auto installerPath = extractEmbeddedInstaller();
|
||||
if (!installerPath)
|
||||
{
|
||||
notifications::show_toast(INSTALLER_EXTRACT_ERROR, TOAST_TITLE);
|
||||
return 1;
|
||||
}
|
||||
auto removeExtractedInstaller = wil::scope_exit([&] {
|
||||
std::error_code _;
|
||||
fs::remove(*installerPath, _);
|
||||
});
|
||||
|
||||
updateProgressBar(.25f, UNINSTALLING_PREVIOUS_VERSION);
|
||||
const auto package_path = updating::get_msi_package_path();
|
||||
if (!package_path.empty() && !updating::uninstall_msi_version(package_path))
|
||||
{
|
||||
notifications::show_toast(UNINSTALL_PREVIOUS_VERSION_ERROR, TOAST_TITLE);
|
||||
}
|
||||
|
||||
updateProgressBar(.5f, INSTALLING_DOTNET);
|
||||
if (!updating::dotnet_is_installed() && !updating::install_dotnet())
|
||||
{
|
||||
notifications::show_toast(DOTNET_INSTALL_ERROR, TOAST_TITLE);
|
||||
}
|
||||
|
||||
updateProgressBar(.75f, INSTALLING_NEW_VERSION);
|
||||
if (!silent)
|
||||
{
|
||||
MsiSetInternalUI(INSTALLUILEVEL_FULL, nullptr);
|
||||
}
|
||||
const bool installationDone = MsiInstallProductW(installerPath->c_str(), nullptr) == ERROR_SUCCESS;
|
||||
|
||||
updateProgressBar(1.f, installationDone ? NEW_VERSION_INSTALLATION_DONE : NEW_VERSION_INSTALLATION_ERROR);
|
||||
|
||||
if (!installationDone)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
auto newPTPath = updating::get_msi_package_installed_path();
|
||||
if (!newPTPath)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
// Do not launch PowerToys, if we're launched from the action_runner
|
||||
if (!silent)
|
||||
{
|
||||
*newPTPath += L"\\PowerToys.exe";
|
||||
SHELLEXECUTEINFOW sei{ sizeof(sei) };
|
||||
sei.fMask = { SEE_MASK_FLAG_NO_UI | SEE_MASK_NOASYNC | SEE_MASK_NO_CONSOLE };
|
||||
sei.lpFile = newPTPath->c_str();
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpParameters = UPDATE_REPORT_SUCCESS;
|
||||
ShellExecuteExW(&sei);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
48
src/bootstrapper/bootstrapper.rc
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include "../common/version.h"
|
||||
|
||||
MAINICON ICON "../runner/svgs/icon.ico"
|
||||
IDR_BIN_ICON BIN "../runner/svgs/icon.ico"
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DOTNET_CORE_DOWNLOAD_FAILURE "Couldn't download .NET Core Desktop Runtime 3.1.3, please install it manually."
|
||||
IDS_DOTNET_CORE_DOWNLOAD_FAILURE_TITLE "PowerToys installation error"
|
||||
END
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_STRING
|
||||
VALUE "InternalName", INTERNAL_NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_NAME
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||
END
|
||||
END
|
||||
|
||||
#include "Generated Files\installer_resource.rc"
|
||||
141
src/bootstrapper/bootstrapper.vcxproj
Normal file
@@ -0,0 +1,141 @@
|
||||
<?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.200703.9\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<Import Project="..\..\installer\Version.props" />
|
||||
<Target Name="Generate Resource file" BeforeTargets="PrepareForBuild">
|
||||
<ItemGroup>
|
||||
<RCLines Include="IDR_BIN_MSIINSTALLER BIN "..\\..\\installer\\PowerToysSetup\\$(PlatformShortName)\\$(Configuration)\\PowerToysSetup-$(Version)-$(PlatformShortName).msi"" />
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile File="Generated Files\installer_resource.rc" Lines="@(RCLines)" Overwrite="true" Encoding="Unicode" WriteOnlyWhenDifferent="true" />
|
||||
</Target>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<ProjectGuid>{D194E3AA-F824-4CA9-9A58-034DD6B7D022}</ProjectGuid>
|
||||
<RootNamespace>bootstrapper</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>bootstrapper</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<TargetName>PowerToysSetup-$(Version)-$(PlatformShortName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>../;$(IncludePath)</IncludePath>
|
||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>../;$(IncludePath)</IncludePath>
|
||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>WindowsApp.lib;Msi.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>WindowsApp.lib;Msi.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bootstrapper.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\common.vcxproj">
|
||||
<Project>{74485049-c722-400f-abe5-86ac52d929b3}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\common\updating\updating.vcxproj">
|
||||
<Project>{17da04df-e393-4397-9cf0-84dabe11032e}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\runner\updating.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="bootstrapper.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\runner\svgs\icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.200519.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.200519.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
|
||||
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\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.200519.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.200519.2\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200703.9\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
5
src/bootstrapper/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200703.9" targetFramework="native" />
|
||||
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.200519.2" targetFramework="native" />
|
||||
</packages>
|
||||
19
src/bootstrapper/resource.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by bootstrapper.rc
|
||||
|
||||
//////////////////////////////
|
||||
// Non-localizable
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys Bootstrapper"
|
||||
#define INTERNAL_NAME "bootstrapper"
|
||||
#define ORIGINAL_FILENAME "bootstrapper.exe"
|
||||
|
||||
// Non-localizable
|
||||
//////////////////////////////
|
||||
|
||||
#define IDS_DOTNET_CORE_DOWNLOAD_FAILURE 101
|
||||
#define IDS_DOTNET_CORE_DOWNLOAD_FAILURE_TITLE 102
|
||||
|
||||
#define IDR_BIN_MSIINSTALLER 103
|
||||
#define IDR_BIN_ICON 104
|
||||
@@ -28,6 +28,7 @@ function Get-Dirty-Files-From-Git() {
|
||||
$result = New-Object System.Collections.Generic.List[string]
|
||||
$staged, $unstaged, $untracked | % {
|
||||
$_.Split(" ") |
|
||||
where {Test-Path $_ -PathType Leaf} |
|
||||
where {$sourceExtensions.Contains((Get-Item $_).Extension)} |
|
||||
foreach {$result.Add($_)}
|
||||
}
|
||||
39
src/common/ManagedCommon/ManagedCommon.csproj
Normal file
@@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\installer\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Platforms>x64</Platforms>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Version>$(Version).0</Version>
|
||||
<Authors>Microsoft Corporation</Authors>
|
||||
<Product>PowerToys</Product>
|
||||
<Description>PowerToys ManagedCommon</Description>
|
||||
<Copyright>Copyright (C) 2020 Microsoft Corporation</Copyright>
|
||||
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
|
||||
<RepositoryType>Github</RepositoryType>
|
||||
<PackageTags>PowerToys</PackageTags>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ManagedTelemetry\Telemetry\Telemetry.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
14
src/common/ManagedCommon/NativeMethods.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ManagedCommon
|
||||
{
|
||||
internal static class NativeMethods
|
||||
{
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
internal static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int processId);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
internal static extern uint WaitForSingleObject(IntPtr hHandle, uint dwMilliseconds);
|
||||
}
|
||||
}
|
||||
35
src/common/ManagedCommon/RunnerHelper.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.PowerToys.Telemetry.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ManagedCommon
|
||||
{
|
||||
public static class RunnerHelper
|
||||
{
|
||||
public static void WaitForPowerToysRunner(int powerToysPID, Action act)
|
||||
{
|
||||
var stackTrace = new StackTrace();
|
||||
var assembly = Assembly.GetCallingAssembly().GetName();
|
||||
var callingMethod = stackTrace.GetFrame(1).GetMethod().Name;
|
||||
PowerToysTelemetry.Log.WriteEvent(new DebugEvent() { Message = $"[{assembly}][{callingMethod}]WaitForPowerToysRunner waiting for Event powerToysPID={powerToysPID}" });
|
||||
Task.Run(() =>
|
||||
{
|
||||
const uint INFINITE = 0xFFFFFFFF;
|
||||
const uint WAIT_OBJECT_0 = 0x00000000;
|
||||
const uint SYNCHRONIZE = 0x00100000;
|
||||
|
||||
IntPtr powerToysProcHandle = NativeMethods.OpenProcess(SYNCHRONIZE, false, powerToysPID);
|
||||
if (NativeMethods.WaitForSingleObject(powerToysProcHandle, INFINITE) == WAIT_OBJECT_0)
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new DebugEvent() { Message = $"[{assembly}][{callingMethod}]WaitForPowerToysRunner Event Notified powerToysPID={powerToysPID}" });
|
||||
act.Invoke();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
14
src/common/ManagedTelemetry/Telemetry/Events/DebugEvent.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Tracing;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.PowerToys.Telemetry.Events
|
||||
{
|
||||
[EventData]
|
||||
public class DebugEvent : EventBase, IEvent
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance;
|
||||
}
|
||||
}
|
||||