mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-08 21:36:54 +01:00
Compare commits
61 Commits
fabricbot-
...
v0.61.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdddea9b04 | ||
|
|
9fb9c6a61e | ||
|
|
a397e72eb0 | ||
|
|
da9c2b649b | ||
|
|
7f6c91e166 | ||
|
|
6d97fb2dc8 | ||
|
|
2979bfbc42 | ||
|
|
c8458dc059 | ||
|
|
6ea274a4e4 | ||
|
|
f0e045d17d | ||
|
|
3caef119a7 | ||
|
|
b395001808 | ||
|
|
e11bafcc93 | ||
|
|
28751d2d36 | ||
|
|
f519a88ee0 | ||
|
|
bb65085727 | ||
|
|
bf2a107d7d | ||
|
|
915663e7db | ||
|
|
31fd6258e0 | ||
|
|
af4dc80ce9 | ||
|
|
996a235e12 | ||
|
|
8e2570033c | ||
|
|
c08135d6e3 | ||
|
|
680f89e0f7 | ||
|
|
98ef328331 | ||
|
|
0c78b12f59 | ||
|
|
98d312a9d4 | ||
|
|
35797e8680 | ||
|
|
ca64239809 | ||
|
|
e6be44623a | ||
|
|
3d8fbd0507 | ||
|
|
de4b66b51e | ||
|
|
45d0e7da2b | ||
|
|
35d0cc5104 | ||
|
|
0fbec1ca02 | ||
|
|
d37bab3d2d | ||
|
|
ad28c41c46 | ||
|
|
db06840338 | ||
|
|
73c259342b | ||
|
|
c36a80dad5 | ||
|
|
cfff0a2af8 | ||
|
|
e887b3b395 | ||
|
|
d4b62d8118 | ||
|
|
32fc88abd2 | ||
|
|
0ad71815bb | ||
|
|
4f1e3b85bf | ||
|
|
202abd351b | ||
|
|
0da616f917 | ||
|
|
0c238a8eea | ||
|
|
d201ae4335 | ||
|
|
35bb4280d0 | ||
|
|
3cb0638c7e | ||
|
|
f4dbdbdd7a | ||
|
|
b7fccc3211 | ||
|
|
e637902892 | ||
|
|
a0eacca17f | ||
|
|
656ac441cd | ||
|
|
9e0781d86c | ||
|
|
81f99264b3 | ||
|
|
28eb4c80f6 | ||
|
|
19bf2e3614 |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -15,3 +15,5 @@
|
||||
*.rc diff
|
||||
|
||||
*.gcode linguist-detectable=false
|
||||
|
||||
*.vsconfig linguist-language=json
|
||||
|
||||
15
.github/actions/spell-check/README.md
vendored
Normal file
15
.github/actions/spell-check/README.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# check-spelling/check-spelling configuration
|
||||
|
||||
File | Purpose | Format | Info
|
||||
-|-|-|-
|
||||
[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
|
||||
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
|
||||
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
|
||||
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
|
||||
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
|
||||
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
|
||||
[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
|
||||
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
|
||||
|
||||
Note: you can replace any of these files with a directory by the same name (minus the suffix)
|
||||
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
|
||||
22
.github/actions/spell-check/advice.md
vendored
22
.github/actions/spell-check/advice.md
vendored
@@ -1,7 +1,17 @@
|
||||
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
|
||||
<details><summary>If the flagged items do not appear to be text</summary>
|
||||
<details><summary>If the flagged items are false positives</summary>
|
||||
|
||||
If items relate to a ...
|
||||
* binary file (or some other file you wouldn't want to check at all).
|
||||
|
||||
Please add a file path to the `excludes.txt` file matching the containing file.
|
||||
|
||||
File paths are Perl 5 Regular Expressions - you can [test](
|
||||
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
|
||||
|
||||
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
|
||||
../tree/HEAD/README.md) (on whichever branch you're using).
|
||||
|
||||
* well-formed pattern.
|
||||
|
||||
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
|
||||
@@ -12,14 +22,4 @@ https://www.regexplanet.com/advanced/perl/) yours before committing to verify it
|
||||
|
||||
Note that patterns can't match multiline strings.
|
||||
|
||||
* binary file.
|
||||
|
||||
Please add a file path to the `excludes.txt` file matching the containing file.
|
||||
|
||||
File paths are Perl 5 Regular Expressions - you can [test](
|
||||
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
|
||||
|
||||
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
|
||||
../tree/HEAD/README.md) (on whichever branch you're using).
|
||||
|
||||
</details>
|
||||
|
||||
1
.github/actions/spell-check/allow.txt
vendored
Normal file
1
.github/actions/spell-check/allow.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
wil
|
||||
9
.github/actions/spell-check/allow/names.txt
vendored
9
.github/actions/spell-check/allow/names.txt
vendored
@@ -1,17 +1,16 @@
|
||||
adamchilders
|
||||
ABradley
|
||||
azchohfi
|
||||
bdoserror
|
||||
crutkas
|
||||
dependabot
|
||||
Deuchert
|
||||
edwinzap
|
||||
eltociear
|
||||
hallatore
|
||||
harvastum
|
||||
jefflord
|
||||
mshtang
|
||||
naveensrinivasan
|
||||
nVidia
|
||||
rcmaehl
|
||||
robmen
|
||||
shandsj
|
||||
skycommand
|
||||
snickler
|
||||
sinclairinat
|
||||
|
||||
46
.github/actions/spell-check/excludes.txt
vendored
46
.github/actions/spell-check/excludes.txt
vendored
@@ -1,13 +1,15 @@
|
||||
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
|
||||
(?:^|/)monacoSRC/
|
||||
(?:^|/)MonacoPreviewHandler/customLanguages/
|
||||
(?:^|/)MonacoPreviewHandler/monaco_languages.json
|
||||
(?:^|/)MonacoPreviewHandler/index.html
|
||||
(?:^|/)MonacoPreviewHandler/generateLanguagesJson.html
|
||||
(?:^|/)MonacoPreviewHandler/monacoSpecialLanguages.js
|
||||
(?:^|/)(?i)COPYRIGHT
|
||||
(?:^|/)(?i)LICEN[CS]E
|
||||
(?:^|/)package(?:-lock)\.json$
|
||||
(?:^|/)go\.sum$
|
||||
(?:^|/)MonacoPreviewHandler/customLanguages/
|
||||
(?:^|/)MonacoPreviewHandler/generateLanguagesJson.html
|
||||
(?:^|/)MonacoPreviewHandler/index.html
|
||||
(?:^|/)MonacoPreviewHandler/monacoSpecialLanguages.js
|
||||
(?:^|/)MonacoPreviewHandler/monaco_languages.json
|
||||
(?:^|/)monacoSRC/
|
||||
(?:^|/)package(?:-lock|)\.json$
|
||||
(?:^|/)timezones\.json$
|
||||
(?:^|/)vendor/
|
||||
(?:^|/)WindowsSettings\.json$
|
||||
/package(?:-lock|)\.json$
|
||||
@@ -16,24 +18,44 @@
|
||||
ignore$
|
||||
[/.][a-z]{2}(?:-[a-zA-Z]{2}|)\.
|
||||
\.ai$
|
||||
\.avi$
|
||||
\.bmp$
|
||||
\.bz2$
|
||||
\.crt$
|
||||
\.dat$
|
||||
\.dll$
|
||||
\.DS_Store$
|
||||
\.eot$
|
||||
\.filters$
|
||||
\.gcode$
|
||||
\.gif$
|
||||
\.gitattributes$
|
||||
\.gitignore$
|
||||
\.graffle$
|
||||
\.gz$
|
||||
\.icns$
|
||||
\.ico$
|
||||
\.jpg$
|
||||
\.jar$
|
||||
\.jpe?g$
|
||||
\.key$
|
||||
\.lcl$
|
||||
\.lock$
|
||||
\.min\.
|
||||
\.map$
|
||||
\.min\..
|
||||
\.mod$
|
||||
\.mp[34]$
|
||||
\.ocf$
|
||||
\.otf$
|
||||
\.pdf$
|
||||
\.pem$
|
||||
\.PNG$
|
||||
\.png$
|
||||
\.psd$
|
||||
\.stl$
|
||||
\.woff$
|
||||
\.svg$
|
||||
\.ttf$
|
||||
\.wav$
|
||||
\.woff2?$
|
||||
\.zip$
|
||||
^doc/devdocs/akaLinks\.md$
|
||||
^installer/PowerToysSetup/WebView2/MicrosoftEdgeWebview2Setup.exe$
|
||||
@@ -49,9 +71,7 @@ ignore$
|
||||
^src/modules/previewpane/UnitTests-MarkdownPreviewHandler/HelperFiles/MarkdownWithHTMLImageTag.txt$
|
||||
^tools/CleanUp_tool/CleanUp_tool\.vcxproj\.filters$
|
||||
^tools/Verification scripts/Check preview handler registration\.ps1$
|
||||
^\.github/
|
||||
^\.github/actions/spell-check/
|
||||
^\.gitmodules$
|
||||
(?:^|/)WindowsSettings\.json$
|
||||
(?:^|/)timezones\.json$
|
||||
^\Q.github/workflows/spelling2.yml\E$
|
||||
^\Q.pipelines/ESRPSigning_core.json\E$
|
||||
|
||||
160
.github/actions/spell-check/expect.txt
vendored
160
.github/actions/spell-check/expect.txt
vendored
@@ -5,6 +5,7 @@ abgr
|
||||
abi
|
||||
ABlocked
|
||||
ABOUTBOX
|
||||
ABradley
|
||||
Abug
|
||||
accctrl
|
||||
Acceleratorkeys
|
||||
@@ -51,6 +52,7 @@ Andreanof
|
||||
anges
|
||||
angularsen
|
||||
ansicolor
|
||||
antialias
|
||||
ANull
|
||||
AOC
|
||||
aocfnapldcnfbofgmbbllojgocaelgdd
|
||||
@@ -76,7 +78,6 @@ apps
|
||||
appwindow
|
||||
appwiz
|
||||
appx
|
||||
appxmanifest
|
||||
APSTUDIO
|
||||
AQS
|
||||
Aqtobe
|
||||
@@ -94,7 +95,6 @@ ARPPRODUCTICON
|
||||
ARRAYSIZE
|
||||
arsinh
|
||||
artanh
|
||||
Artboard
|
||||
Artsakh
|
||||
asdf
|
||||
AShortcut
|
||||
@@ -133,6 +133,7 @@ awakeness
|
||||
awakeversion
|
||||
AWAYMODE
|
||||
AYUV
|
||||
azchohfi
|
||||
backend
|
||||
backtracer
|
||||
BADD
|
||||
@@ -141,18 +142,15 @@ Bashkortostan
|
||||
Bayan
|
||||
bbwe
|
||||
bck
|
||||
Bcl
|
||||
Belarus
|
||||
betadele
|
||||
betsegaw
|
||||
BGR
|
||||
bgra
|
||||
BGSOUNDS
|
||||
bhid
|
||||
Bicubic
|
||||
bigbar
|
||||
bigobj
|
||||
binaryformatter
|
||||
binlog
|
||||
bitmapimage
|
||||
BITMAPINFO
|
||||
@@ -191,7 +189,7 @@ Bto
|
||||
buf
|
||||
BUFSIZE
|
||||
bugreport
|
||||
BUILDARCH
|
||||
BUILDNUMBER
|
||||
buildtask
|
||||
buildtransitive
|
||||
Burkina
|
||||
@@ -244,7 +242,6 @@ CLASSNOTAVAILABLE
|
||||
clickable
|
||||
clickonce
|
||||
CLIENTEDGE
|
||||
CLIENTPULL
|
||||
clientside
|
||||
CLIPCHILDREN
|
||||
Clipperton
|
||||
@@ -269,7 +266,6 @@ cnt
|
||||
Cocklebiddy
|
||||
coclass
|
||||
codebase
|
||||
codecvt
|
||||
CODENAME
|
||||
codeofconduct
|
||||
codereview
|
||||
@@ -300,7 +296,6 @@ comsuppw
|
||||
comsuppwd
|
||||
comutil
|
||||
Concat
|
||||
concrt
|
||||
configs
|
||||
Configurator
|
||||
CONFLICTINGMODIFIERKEY
|
||||
@@ -338,6 +333,7 @@ crlf
|
||||
cron
|
||||
Crossdevice
|
||||
CRSEL
|
||||
crutkas
|
||||
CSearch
|
||||
CSettings
|
||||
csharp
|
||||
@@ -397,7 +393,6 @@ dcomp
|
||||
dcompi
|
||||
DComposition
|
||||
ddf
|
||||
DDLM
|
||||
Deact
|
||||
debian
|
||||
debugbreak
|
||||
@@ -419,10 +414,10 @@ deinitialization
|
||||
DELA
|
||||
deletethis
|
||||
Delimarsky
|
||||
delims
|
||||
dend
|
||||
DENORMAL
|
||||
Deondre
|
||||
dependabot
|
||||
depersist
|
||||
deprioritized
|
||||
deps
|
||||
@@ -440,30 +435,23 @@ devblogs
|
||||
devdocs
|
||||
devenum
|
||||
DEVMON
|
||||
devops
|
||||
devpkey
|
||||
DEVSOURCE
|
||||
dhcp
|
||||
diffing
|
||||
difftime
|
||||
DIIRFLAG
|
||||
dimm
|
||||
directshow
|
||||
dirs
|
||||
DISABLEASACTIONKEY
|
||||
dispid
|
||||
DISPIDAMBIENTDLCONTROL
|
||||
DISPLAYCHANGE
|
||||
DISPLAYCONFIG
|
||||
displayname
|
||||
divyan
|
||||
DLACTIVEXCTLS
|
||||
DLCONTROL
|
||||
Dlg
|
||||
DLGFRAME
|
||||
DLGMODALFRAME
|
||||
dlib
|
||||
DLIMAGES
|
||||
dllexport
|
||||
dllhost
|
||||
dllmain
|
||||
@@ -472,9 +460,9 @@ DNLEN
|
||||
Dns
|
||||
doctype
|
||||
DONOTROUND
|
||||
DONTRESOLVEDLLREFERENCES
|
||||
DONTVALIDATEPATH
|
||||
dotnet
|
||||
DOWNLOADONLY
|
||||
DPICHANGED
|
||||
DPIs
|
||||
DPolicy
|
||||
@@ -497,11 +485,12 @@ DVSD
|
||||
DVSL
|
||||
DVTARGETDEVICE
|
||||
DWINRT
|
||||
dwl
|
||||
dwm
|
||||
dwmapi
|
||||
dwmcorei
|
||||
DWMCOLORIZATIONCOLORCHANGED
|
||||
DWMCOMPOSITIONCHANGED
|
||||
dwmcorei
|
||||
DWMNCRENDERINGCHANGED
|
||||
Dwmp
|
||||
DWMSENDICONICLIVEPREVIEWBITMAP
|
||||
@@ -511,6 +500,7 @@ DWMWCP
|
||||
DWMWINDOWATTRIBUTE
|
||||
DWMWINDOWMAXIMIZEDCHANGE
|
||||
dword
|
||||
DWORDLONG
|
||||
dworigin
|
||||
dwrite
|
||||
dxgi
|
||||
@@ -532,6 +522,7 @@ Emoji
|
||||
emptyrecyclebin
|
||||
ENABLEDPOPUP
|
||||
endforeach
|
||||
endian
|
||||
endif
|
||||
endl
|
||||
endpointvolume
|
||||
@@ -541,16 +532,15 @@ entrypoint
|
||||
ENU
|
||||
enum
|
||||
EOAC
|
||||
eol
|
||||
EOL
|
||||
epicgames
|
||||
epo
|
||||
Eqn
|
||||
ERASEBKGND
|
||||
EREOF
|
||||
EResize
|
||||
ERole
|
||||
ERRORMESSAGE
|
||||
ERRORTITLE
|
||||
ERole
|
||||
ESettings
|
||||
esize
|
||||
esrp
|
||||
@@ -591,7 +581,6 @@ fallthrough
|
||||
fancyzones
|
||||
FANCYZONESDRAWLAYOUTTEST
|
||||
FANCYZONESEDITOR
|
||||
FANCYZONESWINDOWSTYLES
|
||||
Farbraum
|
||||
Faroe
|
||||
FARPROC
|
||||
@@ -617,7 +606,6 @@ Filterkeyboard
|
||||
Filterx
|
||||
finalizer
|
||||
findfast
|
||||
findstr
|
||||
Firefox
|
||||
FIXEDFILEINFO
|
||||
FLASHZONES
|
||||
@@ -630,11 +618,9 @@ FOFX
|
||||
FOLDERID
|
||||
folderpath
|
||||
FORCEMINIMIZE
|
||||
FORCEOFFLINE
|
||||
foreach
|
||||
formatetc
|
||||
FRAMECHANGED
|
||||
FRAMEDOWNLOAD
|
||||
franky
|
||||
frankychen
|
||||
Froml
|
||||
@@ -657,7 +643,6 @@ GBs
|
||||
GCLP
|
||||
gcnew
|
||||
gcode
|
||||
gcodepreviewhandler
|
||||
gdi
|
||||
gdiplus
|
||||
GDISCALED
|
||||
@@ -677,7 +662,7 @@ globals
|
||||
GNumber
|
||||
google
|
||||
GPTR
|
||||
gsuberland
|
||||
GSM
|
||||
gtm
|
||||
gui
|
||||
guiddef
|
||||
@@ -714,7 +699,6 @@ helptext
|
||||
Heure
|
||||
HEVC
|
||||
hfile
|
||||
HFONT
|
||||
hglobal
|
||||
hhk
|
||||
HHmmss
|
||||
@@ -722,6 +706,7 @@ HHOOK
|
||||
hhx
|
||||
Hiber
|
||||
Hiberboot
|
||||
HIBYTE
|
||||
HICON
|
||||
HIDEWINDOW
|
||||
highlighter
|
||||
@@ -773,8 +758,8 @@ hstring
|
||||
hsv
|
||||
htcfreek
|
||||
HTHUMBNAIL
|
||||
Htmdid
|
||||
HTTRANSPARENT
|
||||
HValue
|
||||
Hvci
|
||||
hwb
|
||||
HWINEVENTHOOK
|
||||
@@ -785,6 +770,7 @@ HWNDNEXT
|
||||
HWNDPREV
|
||||
IAction
|
||||
IActivated
|
||||
IActivation
|
||||
IAnimatable
|
||||
IApp
|
||||
IApplication
|
||||
@@ -806,11 +792,8 @@ IComparer
|
||||
ICompositor
|
||||
ICONERROR
|
||||
IContext
|
||||
ICONWARNING
|
||||
ICore
|
||||
ICreate
|
||||
IData
|
||||
IDCANCEL
|
||||
IDD
|
||||
IDelayed
|
||||
IDesktop
|
||||
@@ -821,7 +804,6 @@ IDispatcher
|
||||
IDisposable
|
||||
idl
|
||||
IDLIST
|
||||
IDOK
|
||||
IDOn
|
||||
IDR
|
||||
IDrive
|
||||
@@ -859,13 +841,15 @@ IInspectable
|
||||
IIO
|
||||
IItem
|
||||
IJson
|
||||
IKs
|
||||
Ijwhost
|
||||
IKs
|
||||
IList
|
||||
ILogon
|
||||
IMAGEHLP
|
||||
imageresizer
|
||||
IMAGERESIZERCONTEXTMENU
|
||||
IMAGERESIZEREXT
|
||||
imageresizerinput
|
||||
imageresizersettings
|
||||
imagingdevices
|
||||
IMain
|
||||
@@ -875,7 +859,6 @@ IMedia
|
||||
IMem
|
||||
IMessage
|
||||
imeutil
|
||||
iminstall
|
||||
IMoniker
|
||||
IMouse
|
||||
impl
|
||||
@@ -887,7 +870,6 @@ INFOEXAMPLE
|
||||
Infotip
|
||||
ingbuffer
|
||||
inheritdoc
|
||||
INITDIALOG
|
||||
initguid
|
||||
Inkscape
|
||||
Inlines
|
||||
@@ -929,6 +911,7 @@ IObservable
|
||||
IOle
|
||||
iolewindowcontextsensitivehelp
|
||||
iomanip
|
||||
IOne
|
||||
iostream
|
||||
IPackage
|
||||
IPath
|
||||
@@ -949,7 +932,6 @@ IPublic
|
||||
IQuery
|
||||
IRead
|
||||
IReference
|
||||
IReflect
|
||||
IRegistered
|
||||
IRegistration
|
||||
IRegistry
|
||||
@@ -968,7 +950,6 @@ ISingle
|
||||
ISmart
|
||||
isocpp
|
||||
iss
|
||||
IStorage
|
||||
IStream
|
||||
istreambuf
|
||||
istringstream
|
||||
@@ -994,12 +975,9 @@ IVector
|
||||
IView
|
||||
IVirtual
|
||||
IWbem
|
||||
IWeb
|
||||
IWIC
|
||||
iwindow
|
||||
IWindows
|
||||
IWork
|
||||
IXaml
|
||||
iwr
|
||||
IXml
|
||||
IYUV
|
||||
IZone
|
||||
@@ -1007,6 +985,7 @@ IZoom
|
||||
JArray
|
||||
jarro
|
||||
Jarryd
|
||||
jefflord
|
||||
jfif
|
||||
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
|
||||
jjw
|
||||
@@ -1057,7 +1036,6 @@ Kyrgyzstan
|
||||
Kyzylorda
|
||||
LAlt
|
||||
Lambson
|
||||
lamotile
|
||||
langword
|
||||
Lastdevice
|
||||
Latn
|
||||
@@ -1105,7 +1083,9 @@ lmcons
|
||||
LMEM
|
||||
LMENU
|
||||
lnk
|
||||
LOADLIBRARYASDATAFILE
|
||||
LOADSTRING
|
||||
LOBYTE
|
||||
LOCALAPPDATA
|
||||
LOCALDISPLAY
|
||||
LOCALPACKAGE
|
||||
@@ -1142,6 +1122,7 @@ LPSAFEARRAY
|
||||
LPSTR
|
||||
lpsz
|
||||
lpt
|
||||
LPTHREAD
|
||||
LPTOP
|
||||
lptpm
|
||||
LPTSTR
|
||||
@@ -1167,7 +1148,7 @@ Macquarie
|
||||
Magadan
|
||||
Mainwindow
|
||||
majortype
|
||||
makeappx
|
||||
MAJORVERSION
|
||||
makecab
|
||||
MAKEINTRESOURCE
|
||||
MAKEINTRESOURCEW
|
||||
@@ -1199,7 +1180,6 @@ MCDT
|
||||
MCST
|
||||
MDICHILD
|
||||
MDL
|
||||
mdpreviewhandler
|
||||
mdtext
|
||||
mdtxt
|
||||
mdwn
|
||||
@@ -1212,8 +1192,6 @@ memset
|
||||
MENUBREAK
|
||||
MENUITEMINFO
|
||||
MENUITEMINFOW
|
||||
messageboxes
|
||||
METACHARSET
|
||||
Metadatas
|
||||
metafile
|
||||
mfapi
|
||||
@@ -1238,8 +1216,8 @@ MINIMIZEEND
|
||||
MINIMIZESTART
|
||||
miniz
|
||||
minlevel
|
||||
MINORVERSION
|
||||
Miracast
|
||||
mirophone
|
||||
Mishkeegogamang
|
||||
mjpg
|
||||
mkd
|
||||
@@ -1253,6 +1231,7 @@ mmsystem
|
||||
mockapi
|
||||
MODECHANGE
|
||||
modernwpf
|
||||
MODESPRUNED
|
||||
Moldova
|
||||
Mongala
|
||||
MONITORINFO
|
||||
@@ -1283,22 +1262,18 @@ msdata
|
||||
MSDN
|
||||
msedge
|
||||
MSGFLT
|
||||
mshtmdid
|
||||
MSIFASTINSTALL
|
||||
MSIHANDLE
|
||||
msiquery
|
||||
MSIRESTARTMANAGERCONTROL
|
||||
msix
|
||||
msixbundle
|
||||
MSIXCA
|
||||
MSIXVERSION
|
||||
MSLLHOOKSTRUCT
|
||||
Mso
|
||||
msp
|
||||
msrc
|
||||
mst
|
||||
msvc
|
||||
msvcp
|
||||
MTND
|
||||
Mul
|
||||
multiline
|
||||
@@ -1310,15 +1285,15 @@ Mundrabilla
|
||||
mutex
|
||||
mutexes
|
||||
muxc
|
||||
mvvm
|
||||
MVVM
|
||||
myfile
|
||||
MYICON
|
||||
MYTZ
|
||||
NAMECHANGE
|
||||
nameof
|
||||
namespace
|
||||
namespaceanddescendants
|
||||
Navassa
|
||||
naveensrinivasan
|
||||
NCACTIVATE
|
||||
ncc
|
||||
NCCALCSIZE
|
||||
@@ -1349,10 +1324,8 @@ netcore
|
||||
netcoreapp
|
||||
netcpl
|
||||
netframework
|
||||
NETFX
|
||||
netsetup
|
||||
netsh
|
||||
netstandard
|
||||
Neue
|
||||
newcolor
|
||||
newdev
|
||||
@@ -1401,7 +1374,6 @@ Noronha
|
||||
NOSEARCH
|
||||
NOSENDCHANGING
|
||||
NOSIZE
|
||||
notafter
|
||||
notfound
|
||||
nothrow
|
||||
NOTIFICATIONSDLL
|
||||
@@ -1422,6 +1394,7 @@ NTFS
|
||||
NTSTATUS
|
||||
nuget
|
||||
nuint
|
||||
nullonfailure
|
||||
nullopt
|
||||
nullptr
|
||||
numberbox
|
||||
@@ -1429,14 +1402,13 @@ NUMLOCK
|
||||
NUMPAD
|
||||
Nunavut
|
||||
Nusa
|
||||
Nvidia
|
||||
nushell
|
||||
nwc
|
||||
NWSE
|
||||
Objbase
|
||||
OBJID
|
||||
objidl
|
||||
oblitum
|
||||
octodex
|
||||
odbc
|
||||
odbccp
|
||||
Oem
|
||||
@@ -1467,8 +1439,9 @@ oss
|
||||
ostr
|
||||
ostream
|
||||
ostringstream
|
||||
OSVERSIONINFOEX
|
||||
OSVERSIONINFOEXW
|
||||
otating
|
||||
osvi
|
||||
OUTOFCONTEXT
|
||||
OUTOFMEMORY
|
||||
outpin
|
||||
@@ -1507,8 +1480,6 @@ PCIDLIST
|
||||
PCWSTR
|
||||
pdb
|
||||
pdbonly
|
||||
pde
|
||||
pdfpreviewhandler
|
||||
pdo
|
||||
pdto
|
||||
pdtobj
|
||||
@@ -1550,11 +1521,12 @@ Pohnpei
|
||||
popup
|
||||
POPUPWINDOW
|
||||
posix
|
||||
Postion
|
||||
powercfg
|
||||
powerlauncher
|
||||
powerpreview
|
||||
powerrename
|
||||
POWERRENAMECONTEXTMENU
|
||||
powerrenameinput
|
||||
POWERRENAMETEST
|
||||
powertoy
|
||||
powertoysinterop
|
||||
@@ -1578,7 +1550,6 @@ Prefixer
|
||||
Preinstalled
|
||||
preload
|
||||
PREMULTIPLIED
|
||||
preperty
|
||||
prevhost
|
||||
previewer
|
||||
PREVIEWHANDLERFRAMEINFO
|
||||
@@ -1675,7 +1646,7 @@ rects
|
||||
recyclebin
|
||||
redirectedfrom
|
||||
Redist
|
||||
Redistributable
|
||||
redistributable
|
||||
reencode
|
||||
reencoded
|
||||
refactor
|
||||
@@ -1701,8 +1672,6 @@ remappings
|
||||
REMAPSUCCESSFUL
|
||||
REMAPUNSUCCESSFUL
|
||||
Remotable
|
||||
REMOTEDISPLAY
|
||||
REMOTESESSION
|
||||
Removelnk
|
||||
renamable
|
||||
RENAMEONCOLLISION
|
||||
@@ -1713,7 +1682,7 @@ requerying
|
||||
rescap
|
||||
resgen
|
||||
resheader
|
||||
Resizable
|
||||
resizable
|
||||
resizers
|
||||
resmimetype
|
||||
RESOURCEID
|
||||
@@ -1746,6 +1715,7 @@ robmensching
|
||||
Roboto
|
||||
roslyn
|
||||
Rothera
|
||||
roundf
|
||||
ROUNDSMALL
|
||||
royvou
|
||||
Rpc
|
||||
@@ -1756,11 +1726,8 @@ Rsp
|
||||
rst
|
||||
Rstrtmgr
|
||||
RTB
|
||||
RTCS
|
||||
RTLREADING
|
||||
RTSS
|
||||
ruleset
|
||||
RUNACTIVEXCTLS
|
||||
runas
|
||||
rundll
|
||||
rungameid
|
||||
@@ -1768,6 +1735,7 @@ RUNLEVEL
|
||||
runsettings
|
||||
runtimeclass
|
||||
runtimeconfig
|
||||
runtimeobject
|
||||
runtimes
|
||||
RUS
|
||||
rvalue
|
||||
@@ -1802,9 +1770,7 @@ Segoe
|
||||
Sekan
|
||||
SENDCHANGE
|
||||
sendvirtualinput
|
||||
serializationexception
|
||||
serializer
|
||||
serizalization
|
||||
serverside
|
||||
SETCONTEXT
|
||||
setcursor
|
||||
@@ -1819,8 +1785,6 @@ SETTEXT
|
||||
SETTINGCHANGE
|
||||
settingsheader
|
||||
settingshotkeycontrol
|
||||
settingsv
|
||||
Setttings
|
||||
SETWORKAREA
|
||||
sfgao
|
||||
SFGAOF
|
||||
@@ -1872,7 +1836,8 @@ siex
|
||||
SIGABRT
|
||||
sigdn
|
||||
SIGNINGSCENARIO
|
||||
signtool
|
||||
Signtool
|
||||
sinclairinat
|
||||
SINGLEKEY
|
||||
singlekeyremapcontrol
|
||||
singletones
|
||||
@@ -1886,7 +1851,6 @@ SIZENWSE
|
||||
sizeof
|
||||
sizeread
|
||||
SIZEWE
|
||||
sketchapp
|
||||
SKIPOWNPROCESS
|
||||
sku
|
||||
SLGP
|
||||
@@ -1894,13 +1858,13 @@ sln
|
||||
SMALLICON
|
||||
SMTO
|
||||
snd
|
||||
snickler
|
||||
snwprintf
|
||||
softline
|
||||
somil
|
||||
Soref
|
||||
SOURCECLIENTAREAONLY
|
||||
SOURCEHEADER
|
||||
sourceid
|
||||
sourcesdirectory
|
||||
spam
|
||||
spdisp
|
||||
@@ -1963,6 +1927,7 @@ stl
|
||||
stoi
|
||||
stol
|
||||
stoll
|
||||
storelogo
|
||||
stoul
|
||||
stoull
|
||||
strcmp
|
||||
@@ -1991,13 +1956,11 @@ subquery
|
||||
substr
|
||||
Sul
|
||||
Superbar
|
||||
supressions
|
||||
Suri
|
||||
sut
|
||||
SVE
|
||||
SVGIn
|
||||
SVGIO
|
||||
svgpreviewhandler
|
||||
svgz
|
||||
SWC
|
||||
SWFO
|
||||
@@ -2018,7 +1981,6 @@ SYSICONINDEX
|
||||
SYSKEY
|
||||
syskeydown
|
||||
SYSKEYUP
|
||||
SYSLIB
|
||||
syslog
|
||||
SYSMENU
|
||||
SYSTEMAPPS
|
||||
@@ -2055,7 +2017,6 @@ Tenggara
|
||||
testcase
|
||||
testhost
|
||||
testprocess
|
||||
testtrocess
|
||||
testzones
|
||||
TEXCOORD
|
||||
textblock
|
||||
@@ -2064,7 +2025,6 @@ THH
|
||||
THICKFRAME
|
||||
THISCOMPONENT
|
||||
THotkey
|
||||
thre
|
||||
TILEDWINDOW
|
||||
timedate
|
||||
timediff
|
||||
@@ -2079,7 +2039,6 @@ TMPVAR
|
||||
TNP
|
||||
todo
|
||||
toggleswitch
|
||||
Toolchain
|
||||
toolkitcontrols
|
||||
toolkitconverters
|
||||
Toolset
|
||||
@@ -2102,7 +2061,6 @@ TRK
|
||||
trl
|
||||
trunc
|
||||
Tshuapa
|
||||
tspan
|
||||
TStr
|
||||
Tuva
|
||||
TValue
|
||||
@@ -2119,6 +2077,7 @@ TYPESHORTCUT
|
||||
UAC
|
||||
UAL
|
||||
uap
|
||||
ubuntu
|
||||
udit
|
||||
Udk
|
||||
Udmurtia
|
||||
@@ -2126,7 +2085,7 @@ Udp
|
||||
uefi
|
||||
UHash
|
||||
UIA
|
||||
Uid
|
||||
uid
|
||||
uint
|
||||
uintptr
|
||||
UIPI
|
||||
@@ -2165,9 +2124,9 @@ unregister
|
||||
unregistering
|
||||
unremapped
|
||||
unsubscribe
|
||||
unvirtualized
|
||||
Updatelayout
|
||||
UPGRADINGPRODUCTCODE
|
||||
upto
|
||||
Uptool
|
||||
upvote
|
||||
uri
|
||||
@@ -2194,18 +2153,13 @@ uxtheme
|
||||
UYVY
|
||||
validmodulename
|
||||
vcamp
|
||||
vccorlib
|
||||
vcdl
|
||||
VCINSTALLDIR
|
||||
vcm
|
||||
vcomp
|
||||
vcredist
|
||||
VCRT
|
||||
vcruntime
|
||||
vcvars
|
||||
VDesktop
|
||||
vdi
|
||||
VDId
|
||||
vec
|
||||
VERBSONLY
|
||||
VERBW
|
||||
@@ -2213,8 +2167,8 @@ VERIFYCONTEXT
|
||||
verrsrc
|
||||
VERSIONINFO
|
||||
Versioning
|
||||
VFT
|
||||
vformat
|
||||
VFT
|
||||
vid
|
||||
VIDCAP
|
||||
videoconference
|
||||
@@ -2265,21 +2219,19 @@ wdp
|
||||
wdupenv
|
||||
weakme
|
||||
webcam
|
||||
webserver
|
||||
webpage
|
||||
webserver
|
||||
website
|
||||
webview
|
||||
wekyb
|
||||
Wevtapi
|
||||
wformat
|
||||
wgpocpl
|
||||
Whichdoes
|
||||
whitespaces
|
||||
WIC
|
||||
wifi
|
||||
wiki
|
||||
wikipedia
|
||||
wil
|
||||
wildcards
|
||||
winapi
|
||||
winappdriver
|
||||
@@ -2288,7 +2240,6 @@ Wincodecsdk
|
||||
wincolor
|
||||
windef
|
||||
windir
|
||||
Windowcontrols
|
||||
WINDOWCREATED
|
||||
WINDOWEDGE
|
||||
WINDOWNAME
|
||||
@@ -2296,8 +2247,6 @@ WINDOWPLACEMENT
|
||||
WINDOWPOSCHANGED
|
||||
WINDOWPOSCHANGING
|
||||
Windowsapp
|
||||
windowsappsdk
|
||||
windowsappruntimeinstall
|
||||
WINDOWSBUILDNUMBER
|
||||
Windowscodecs
|
||||
windowsdesktop
|
||||
@@ -2313,6 +2262,7 @@ winexe
|
||||
winforms
|
||||
winfx
|
||||
winget
|
||||
wingetcreate
|
||||
Winhook
|
||||
winkey
|
||||
WINL
|
||||
@@ -2324,6 +2274,7 @@ winrt
|
||||
winsdk
|
||||
winsdkver
|
||||
winspool
|
||||
WINTHRESHOLD
|
||||
winui
|
||||
winxamlmanager
|
||||
wistd
|
||||
@@ -2362,11 +2313,12 @@ wpf
|
||||
wpr
|
||||
wprintf
|
||||
wprp
|
||||
WQL
|
||||
wql
|
||||
wregex
|
||||
WResize
|
||||
writefile
|
||||
Wrk
|
||||
wrl
|
||||
wsf
|
||||
wsh
|
||||
wsl
|
||||
@@ -2386,8 +2338,6 @@ Wwan
|
||||
Wwanpp
|
||||
xamarin
|
||||
XAttribute
|
||||
xbf
|
||||
XBind
|
||||
Xbox
|
||||
XBUTTON
|
||||
XBUTTONDBLCLK
|
||||
@@ -2398,7 +2348,6 @@ XDocument
|
||||
XElement
|
||||
XFile
|
||||
XIncrement
|
||||
XInstance
|
||||
XLoc
|
||||
XNamespace
|
||||
XOffset
|
||||
@@ -2421,6 +2370,7 @@ YVYU
|
||||
Zabaykalsky
|
||||
ZEROINIT
|
||||
ZIndex
|
||||
zipfile
|
||||
zonable
|
||||
ZONECOLOR
|
||||
ZONEHIGHLIGHTCOLOR
|
||||
|
||||
39
.github/actions/spell-check/line_forbidden.patterns
vendored
Normal file
39
.github/actions/spell-check/line_forbidden.patterns
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
|
||||
# \bm_data\b
|
||||
|
||||
# s.b. GitHub
|
||||
\bGithub\b
|
||||
|
||||
# s.b. GitLab
|
||||
\bGitlab\b
|
||||
|
||||
# s.b. JavaScript
|
||||
\bJavascript\b
|
||||
|
||||
# s.b. Microsoft
|
||||
\bMicroSoft\b
|
||||
|
||||
# s.b. another
|
||||
\ban[- ]other\b
|
||||
|
||||
# s.b. greater than
|
||||
\bgreater then\b
|
||||
|
||||
# s.b. less than
|
||||
\bless then\b
|
||||
|
||||
# s.b. otherwise
|
||||
\bother[- ]wise\b
|
||||
|
||||
# s.b. nonexistent
|
||||
\bnon existing\b
|
||||
\b[Nn]o[nt][- ]existent\b
|
||||
|
||||
# s.b. preexisting
|
||||
[Pp]re-existing
|
||||
|
||||
# s.b. preemptively
|
||||
[Pp]re-emptively
|
||||
|
||||
# Reject duplicate words
|
||||
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
|
||||
19
.github/actions/spell-check/patterns.txt
vendored
19
.github/actions/spell-check/patterns.txt
vendored
@@ -1,4 +1,5 @@
|
||||
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
|
||||
|
||||
https?://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]*
|
||||
# GitHub SHAs
|
||||
\bapi.github\.com/repos/[^/]+/[^/]+/[^/]+/[0-9a-f]+\b
|
||||
@@ -43,8 +44,6 @@ Hash="[0-9A-F]{40}"
|
||||
# hex digits including css/html color classes:
|
||||
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23|L")[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b
|
||||
|
||||
# ignore long runs of a single character:
|
||||
\b([A-Za-z])\g{-1}{3,}\b
|
||||
(?:L"[abAB]+", ){3}L"[abAB]+"
|
||||
"Lorem[^"]+?\."
|
||||
TestCase\("[^"]+"
|
||||
@@ -105,3 +104,19 @@ http://tes/
|
||||
|
||||
# tar arguments
|
||||
\b(?:\\n|)tar(?:\s+-[a-zA-Z]+|\s[a-z]+)+
|
||||
|
||||
# fabricbot.json
|
||||
"id": "\S+"
|
||||
"commentPattern": ".*"
|
||||
|
||||
# acceptable duplicates
|
||||
# ls directory listings
|
||||
# /bin/ls -l output
|
||||
[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+
|
||||
# C types
|
||||
\s(long|LONG) \g{-1}\s
|
||||
# javadoc / .net
|
||||
(?:\@(?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s
|
||||
|
||||
# ignore long runs of a single character:
|
||||
\b([A-Za-z])\g{-1}{3,}\b
|
||||
|
||||
10
.github/actions/spell-check/reject.txt
vendored
Normal file
10
.github/actions/spell-check/reject.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
^attache$
|
||||
benefitting
|
||||
occurences?
|
||||
^dependan.*
|
||||
^oer$
|
||||
Sorce
|
||||
^[Ss]pae.*
|
||||
^untill$
|
||||
^untilling$
|
||||
^wether.*
|
||||
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
787
.github/fabricbot.json
vendored
Normal file
787
.github/fabricbot.json
vendored
Normal file
@@ -0,0 +1,787 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssuesOnlyResponder",
|
||||
"version": "1.0",
|
||||
"config": {
|
||||
"taskName": "Add needs triage label to new issues",
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "isAction",
|
||||
"parameters": {
|
||||
"action": "opened"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operator": "not",
|
||||
"operands": [
|
||||
{
|
||||
"name": "isPartOfProject",
|
||||
"parameters": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"operator": "not",
|
||||
"operands": [
|
||||
{
|
||||
"name": "isAssignedToSomeone",
|
||||
"parameters": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Triage"
|
||||
}
|
||||
}
|
||||
],
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issues",
|
||||
"project_card"
|
||||
]
|
||||
},
|
||||
"id": "eUOhvA_62"
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssueCommentResponder",
|
||||
"version": "1.0",
|
||||
"config": {
|
||||
"taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue",
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "isAction",
|
||||
"parameters": {
|
||||
"action": "created"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "isActivitySender",
|
||||
"parameters": {
|
||||
"user": {
|
||||
"type": "author"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "isOpen",
|
||||
"parameters": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Triage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Team-Response"
|
||||
}
|
||||
}
|
||||
],
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issue_comment"
|
||||
]
|
||||
},
|
||||
"id": "kgfxdBIu_9"
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssuesOnlyResponder",
|
||||
"version": "1.0",
|
||||
"config": {
|
||||
"taskName": "Remove no recent activity label from issues",
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"operator": "not",
|
||||
"operands": [
|
||||
{
|
||||
"name": "isAction",
|
||||
"parameters": {
|
||||
"action": "closed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
}
|
||||
],
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issues",
|
||||
"project_card"
|
||||
]
|
||||
},
|
||||
"id": "eR-TaGJJzW",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssueCommentResponder",
|
||||
"version": "1.0",
|
||||
"config": {
|
||||
"taskName": "Remove no recent activity label when an issue is commented on",
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
}
|
||||
],
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issue_comment"
|
||||
]
|
||||
},
|
||||
"id": "tXKeoDht_g",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"taskType": "scheduled",
|
||||
"capabilityId": "ScheduledSearch",
|
||||
"subCapability": "ScheduledSearch",
|
||||
"version": "1.1",
|
||||
"config": {
|
||||
"taskName": "Close stale issues",
|
||||
"frequency": [
|
||||
{
|
||||
"weekDay": 0,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 1,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 2,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 3,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 4,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 5,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 6,
|
||||
"hours": [
|
||||
1,
|
||||
7,
|
||||
13,
|
||||
19
|
||||
]
|
||||
}
|
||||
],
|
||||
"searchTerms": [
|
||||
{
|
||||
"name": "isIssue",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "isOpen",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "noActivitySince",
|
||||
"parameters": {
|
||||
"days": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "closeIssue",
|
||||
"parameters": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "8yr-nVZj9k",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"taskType": "scheduled",
|
||||
"capabilityId": "ScheduledSearch",
|
||||
"subCapability": "ScheduledSearch",
|
||||
"version": "1.1",
|
||||
"config": {
|
||||
"taskName": "Add no recent activity label to issues",
|
||||
"frequency": [
|
||||
{
|
||||
"weekDay": 0,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 1,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 2,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 3,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 4,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 5,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 6,
|
||||
"hours": [
|
||||
2,
|
||||
8,
|
||||
14,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"searchTerms": [
|
||||
{
|
||||
"name": "isIssue",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "isOpen",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "noActivitySince",
|
||||
"parameters": {
|
||||
"days": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "noLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Status-No recent activity"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addReply",
|
||||
"parameters": {
|
||||
"comment": "This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **5 days**. It will be closed if no further activity occurs **within 5 days of this comment**."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "DAhxoYjVcq",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"taskType": "scheduled",
|
||||
"capabilityId": "ScheduledSearch",
|
||||
"subCapability": "ScheduledSearch",
|
||||
"version": "1.1",
|
||||
"config": {
|
||||
"taskName": "Close duplicate issues",
|
||||
"frequency": [
|
||||
{
|
||||
"weekDay": 0,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 1,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 2,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 3,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 4,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 5,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"weekDay": 6,
|
||||
"hours": [
|
||||
3,
|
||||
9,
|
||||
15,
|
||||
21
|
||||
]
|
||||
}
|
||||
],
|
||||
"searchTerms": [
|
||||
{
|
||||
"name": "isIssue",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "isOpen",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "hasLabel",
|
||||
"parameters": {
|
||||
"label": "Resolution-Duplicate"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "noActivitySince",
|
||||
"parameters": {
|
||||
"days": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "addReply",
|
||||
"parameters": {
|
||||
"comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "closeIssue",
|
||||
"parameters": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "xGhARy1H0w"
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "InPrLabel",
|
||||
"subCapability": "InPrLabel",
|
||||
"version": "1.0",
|
||||
"config": {
|
||||
"taskName": "Add 'In-PR' label on issue when an open pull request is targeting it",
|
||||
"inPrLabelText": "Status: In PR",
|
||||
"fixedLabelText": "Status: Fixed",
|
||||
"fixedLabelEnabled": true,
|
||||
"label_fixed": "Resolution-Fix-Committed",
|
||||
"label_inPr": "In progress"
|
||||
},
|
||||
"id": "Rn1tANe62T"
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "EmailCleanser",
|
||||
"subCapability": "EmailCleanser",
|
||||
"version": "1.0",
|
||||
"id": "X0O-6aZ1v3_DAmhUIcNb2",
|
||||
"config": {
|
||||
"taskName": "Clean the email stuff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssueCommentResponder",
|
||||
"version": "1.0",
|
||||
"id": "VyV9JJSA8SbOyeWEwjyfL",
|
||||
"config": {
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "commentContains",
|
||||
"parameters": {
|
||||
"commentPattern": "\\/(bugreport|reportbug)",
|
||||
"isRegex": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"operator": "or",
|
||||
"operands": [
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"permissions": "admin",
|
||||
"association": "MEMBER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "COLLABORATOR"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issue_comment"
|
||||
],
|
||||
"taskName": "Ask for bug report zip file",
|
||||
"actions": [
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Triage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addReply",
|
||||
"parameters": {
|
||||
"comment": "Hi there!<br/><br/>We need a bit more information to really debug this issue. Can you add a \"Report Bug\" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks! <br/>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Team-Response"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssueCommentResponder",
|
||||
"version": "1.0",
|
||||
"id": "bvMkigH2HPgUniYFCNco8",
|
||||
"config": {
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "commentContains",
|
||||
"parameters": {
|
||||
"isRegex": true,
|
||||
"commentPattern": "\\/dup(licate|e)?(\\s+of)?\\s+(#[\\d]+|https)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operator": "or",
|
||||
"operands": [
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "MEMBER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "COLLABORATOR"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issue_comment"
|
||||
],
|
||||
"taskName": "Helper to mark as duplicate",
|
||||
"actions": [
|
||||
{
|
||||
"name": "addReply",
|
||||
"parameters": {
|
||||
"comment": "Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "closeIssue",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Triage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Team-Response"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Resolution-Duplicate"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskType": "trigger",
|
||||
"capabilityId": "IssueResponder",
|
||||
"subCapability": "IssueCommentResponder",
|
||||
"version": "1.0",
|
||||
"id": "mgZxIoqeF7GWUo7-tZF56",
|
||||
"config": {
|
||||
"conditions": {
|
||||
"operator": "and",
|
||||
"operands": [
|
||||
{
|
||||
"name": "commentContains",
|
||||
"parameters": {
|
||||
"commentPattern": "\\/needinfo",
|
||||
"isRegex": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"operator": "or",
|
||||
"operands": [
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "MEMBER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activitySenderHasAssociation",
|
||||
"parameters": {
|
||||
"association": "COLLABORATOR"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"eventType": "issue",
|
||||
"eventNames": [
|
||||
"issue_comment"
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Triage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "removeLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Team-Response"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "addLabel",
|
||||
"parameters": {
|
||||
"label": "Needs-Author-Feedback"
|
||||
}
|
||||
}
|
||||
],
|
||||
"taskName": "Author Response needed"
|
||||
}
|
||||
}
|
||||
],
|
||||
"userGroups": []
|
||||
}
|
||||
6
.github/workflows/msstore-submissions.yml
vendored
6
.github/workflows/msstore-submissions.yml
vendored
@@ -41,14 +41,14 @@ jobs:
|
||||
"packageUrl":"${{ steps.releaseVars.outputs.powerToysInstallerX64Url }}",
|
||||
"languages":["zh-hans", "zh-hant", "en", "cs", "nl", "fr", "pt", "pt-br", "de", "hu", "it", "ja", "ko", "pl", "ru", "es", "tr"],
|
||||
"architectures":["X64"],
|
||||
"installerParameters":"/passive /norestart",
|
||||
"installerParameters":"/quiet /norestart",
|
||||
"isSilentInstall":true
|
||||
},
|
||||
{
|
||||
"packageUrl":"${{ steps.releaseVars.outputs.powerToysInstallerArm64Url }}",
|
||||
"languages":["zh-hans", "zh-hant", "en", "cs", "nl", "fr", "pt", "pt-br", "de", "hu", "it", "ja", "ko", "pl", "ru", "es", "tr"],
|
||||
"architectures":["Arm64"],
|
||||
"installerParameters":"/passive /norestart",
|
||||
"installerParameters":"/quiet /norestart",
|
||||
"isSilentInstall":true
|
||||
}
|
||||
]
|
||||
@@ -57,4 +57,4 @@ jobs:
|
||||
- name: Publish Submission
|
||||
uses: microsoft/store-submission@v1
|
||||
with:
|
||||
command: publish
|
||||
command: publish
|
||||
|
||||
41
.github/workflows/spelling2.yml
vendored
41
.github/workflows/spelling2.yml
vendored
@@ -12,8 +12,9 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
actions: read
|
||||
outputs:
|
||||
internal_state_directory: ${{ steps.spelling.outputs.internal_state_directory }}
|
||||
followup: ${{ steps.spelling.outputs.followup }}
|
||||
runs-on: ubuntu-latest
|
||||
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
|
||||
concurrency:
|
||||
@@ -21,35 +22,19 @@ jobs:
|
||||
# note: If you use only_check_changed_files, you do not want cancel-in-progress
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- name: checkout-merge
|
||||
if: "contains(github.event_name, 'pull_request')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/pull/${{github.event.pull_request.number}}/merge
|
||||
- name: checkout
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
- name: check-spelling
|
||||
id: spelling
|
||||
uses: check-spelling/check-spelling@v0.0.20-alpha3
|
||||
uses: check-spelling/check-spelling@v0.0.20
|
||||
with:
|
||||
config: .github/actions/spell-check
|
||||
suppress_push_for_open_pull_request: 1
|
||||
checkout: true
|
||||
post_comment: 0
|
||||
dictionary_source_prefixes: '{"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/master/dictionaries/"}'
|
||||
extra_dictionaries:
|
||||
cspell:filetypes/filetypes.txt
|
||||
cspell:html/html.txt
|
||||
cspell:css/css.txt
|
||||
check_extra_dictionaries: ''
|
||||
- name: store-comment
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
retention-days: 1
|
||||
name: "check-spelling-comment-${{ github.run_id }}"
|
||||
path: |
|
||||
${{ steps.spelling.outputs.internal_state_directory }}
|
||||
|
||||
comment:
|
||||
name: Comment
|
||||
@@ -58,21 +43,11 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
if: always() && needs.spelling.result == 'failure' && needs.spelling.outputs.internal_state_directory
|
||||
if: (success() || failure()) && needs.spelling.outputs.followup
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: set up
|
||||
run: |
|
||||
mkdir /tmp/data
|
||||
- name: retrieve-comment
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: "check-spelling-comment-${{ github.run_id }}"
|
||||
path: /tmp/data
|
||||
- name: comment
|
||||
uses: check-spelling/check-spelling@v0.0.20-alpha3
|
||||
uses: check-spelling/check-spelling@v0.0.20
|
||||
with:
|
||||
config: .github/actions/spell-check
|
||||
custom_task: comment
|
||||
internal_state_directory: /tmp/data
|
||||
checkout: true
|
||||
task: ${{ needs.spelling.outputs.followup }}
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizer.exe",
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizer.dll",
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizerExt.dll",
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizerContextMenu.dll",
|
||||
"modules\\ImageResizer\\ImageResizerContextMenuPackage.msix",
|
||||
|
||||
"modules\\KeyboardManager\\PowerToys.KeyboardManager.dll",
|
||||
"modules\\KeyboardManager\\KeyboardManagerEditor\\PowerToys.KeyboardManagerEditor.exe",
|
||||
@@ -105,6 +107,8 @@
|
||||
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameExt.dll",
|
||||
"modules\\PowerRename\\PowerToys.PowerRename.exe",
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameContextMenu.dll",
|
||||
"modules\\PowerRename\\PowerRenameContextMenuPackage.msix",
|
||||
|
||||
"modules\\ShortcutGuide\\ShortcutGuide\\PowerToys.ShortcutGuide.exe",
|
||||
"modules\\ShortcutGuide\\ShortcutGuideModuleInterface\\PowerToys.ShortcutGuideModuleInterface.dll",
|
||||
@@ -188,6 +192,7 @@
|
||||
"modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Wpf.dll",
|
||||
"modules\\FileExplorerPreview\\WebView2Loader.dll",
|
||||
"modules\\launcher\\e_sqlite3.dll",
|
||||
"modules\\launcher\\LazyCache.dll",
|
||||
"modules\\launcher\\SQLitePCLRaw.batteries_v2.dll",
|
||||
"modules\\launcher\\SQLitePCLRaw.core.dll",
|
||||
"modules\\launcher\\SQLitePCLRaw.provider.e_sqlite3.dll",
|
||||
|
||||
@@ -471,7 +471,7 @@ jobs:
|
||||
displayName: 'Publish Artifact: Symbols'
|
||||
inputs:
|
||||
PathtoPublish: $(System.ArtifactsDirectory)/Symbols-$(BuildPlatform)/
|
||||
ArtifactName: Symbols-$(BuildPlatform)
|
||||
ArtifactName: Symbols-${{ parameters.versionNumber }}-$(BuildPlatform)
|
||||
|
||||
- task: DeleteFiles@1
|
||||
displayName: 'Remove symbols from ArtifactStagingDirectory'
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
<!-- Global props -->
|
||||
<PropertyGroup Label="Globals" Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Props that are constant for both Debug and Release configurations -->
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
||||
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
|
||||
<RepositoryType>Github</RepositoryType>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
||||
@@ -28,4 +28,18 @@
|
||||
<ForceImportBeforeCppProps>$(MsbuildThisFileDirectory)\Cpp.Build.props</ForceImportBeforeCppProps>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
|
||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
|
||||
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -279,6 +279,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{B39DC643
|
||||
src\common\utils\modulesRegistry.h = src\common\utils\modulesRegistry.h
|
||||
src\common\utils\MsiUtils.h = src\common\utils\MsiUtils.h
|
||||
src\common\utils\os-detect.h = src\common\utils\os-detect.h
|
||||
src\common\utils\package.h = src\common\utils\package.h
|
||||
src\common\utils\ProcessWaiter.h = src\common\utils\ProcessWaiter.h
|
||||
src\common\utils\process_path.h = src\common\utils\process_path.h
|
||||
src\common\utils\registry.h = src\common\utils\registry.h
|
||||
@@ -404,10 +405,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerToys.Settings", "src\s
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRenameUI", "src\modules\powerrename\PowerRenameUILib\PowerRenameUI.vcxproj", "{27718999-C175-450A-861C-89F911E16A88}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRenameContextMenu", "src\modules\powerrename\PowerRenameContextMenu\PowerRenameContextMenu.vcxproj", "{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.PowerToys.Run.Plugin.TimeZone.UnitTests", "src\modules\launcher\Plugins\Microsoft.PowerToys.Run.Plugin.TimeZone.UnitTests\Microsoft.PowerToys.Run.Plugin.TimeZone.UnitTests.csproj", "{C5D46169-5334-48C3-8C28-644C72832E54}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Run.Plugin.OneNote", "src\modules\launcher\Plugins\Microsoft.PowerToys.Run.Plugin.OneNote\Microsoft.PowerToys.Run.Plugin.OneNote.csproj", "{5A1DB2F0-0715-4B3B-98E6-79BC41540045}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerContextMenu", "src\modules\imageresizer\ImageResizerContextMenu\ImageResizerContextMenu.vcxproj", "{93B72A06-C8BD-484F-A6F7-C9F280B150BF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerLib", "src\modules\imageresizer\ImageResizerLib\ImageResizerLib.vcxproj", "{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
@@ -1565,6 +1572,18 @@ Global
|
||||
{27718999-C175-450A-861C-89F911E16A88}.Release|x64.Build.0 = Release|x64
|
||||
{27718999-C175-450A-861C-89F911E16A88}.Release|x86.ActiveCfg = Release|x64
|
||||
{27718999-C175-450A-861C-89F911E16A88}.Release|x86.Build.0 = Release|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x64.Build.0 = Debug|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Debug|x86.Build.0 = Debug|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x64.ActiveCfg = Release|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x64.Build.0 = Release|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x86.ActiveCfg = Release|x64
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6}.Release|x86.Build.0 = Release|x64
|
||||
{C5D46169-5334-48C3-8C28-644C72832E54}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{C5D46169-5334-48C3-8C28-644C72832E54}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{C5D46169-5334-48C3-8C28-644C72832E54}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@@ -1589,6 +1608,30 @@ Global
|
||||
{5A1DB2F0-0715-4B3B-98E6-79BC41540045}.Release|x64.Build.0 = Release|x64
|
||||
{5A1DB2F0-0715-4B3B-98E6-79BC41540045}.Release|x86.ActiveCfg = Release|x64
|
||||
{5A1DB2F0-0715-4B3B-98E6-79BC41540045}.Release|x86.Build.0 = Release|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|x64.Build.0 = Debug|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Debug|x86.Build.0 = Debug|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|x64.Build.0 = Release|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|x86.ActiveCfg = Release|x64
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF}.Release|x86.Build.0 = Release|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|x64.Build.0 = Debug|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Debug|x86.Build.0 = Debug|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x64.ActiveCfg = Release|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x64.Build.0 = Release|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x86.ActiveCfg = Release|x64
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1722,8 +1765,11 @@ Global
|
||||
{8FE5A5EE-1B59-401C-9FB3-B04ECD3E29C1} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
|
||||
{020A7474-3601-4160-A159-D7B70B77B15F} = {C3081D9A-1586-441A-B5F4-ED815B3719C1}
|
||||
{27718999-C175-450A-861C-89F911E16A88} = {89E20BCE-EB9C-46C8-8B50-E01A82E6FDC3}
|
||||
{1DBBB112-4BB1-444B-8EBB-E66555C76BA6} = {89E20BCE-EB9C-46C8-8B50-E01A82E6FDC3}
|
||||
{C5D46169-5334-48C3-8C28-644C72832E54} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
|
||||
{5A1DB2F0-0715-4B3B-98E6-79BC41540045} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
|
||||
{93B72A06-C8BD-484F-A6F7-C9F280B150BF} = {6C7F47CC-2151-44A3-A546-41C70025132C}
|
||||
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853} = {6C7F47CC-2151-44A3-A546-41C70025132C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
||||
|
||||
159
README.md
159
README.md
@@ -26,18 +26,18 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
|
||||
|
||||
### Requirements
|
||||
|
||||
- Windows 11 or Windows 10 v1903 (18362) or newer.
|
||||
- Windows 11 or Windows 10 v2004 (19041) or newer.
|
||||
- Our installer will install the following items:
|
||||
- [.NET 6.0.5 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/6.0#runtime-desktop-6.0.5) or a newer 6.0.x runtime.
|
||||
- [Microsoft Edge WebView2 Runtime](https://go.microsoft.com/fwlink/p/?LinkId=2124703) bootstrapper. This will install the latest version.
|
||||
- [.NET 6.0.6 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/6.0#runtime-desktop-6.0.6) or a newer 6.0.x runtime.
|
||||
- [Microsoft Edge WebView2 Runtime](https://go.microsoft.com/fwlink/p/?LinkId=2124703) bootstrapper. This will install the latest version.
|
||||
- [Microsoft Visual C++ Redistributable](https://docs.microsoft.com/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) installer. This will install one of the latest versions available.
|
||||
|
||||
### Via GitHub with EXE [Recommended]
|
||||
|
||||
[Microsoft PowerToys GitHub releases page][github-release-link], click on `Assets` at the bottom to show the files available in the release. Please use the appropriate the PowerToys installer that matches your machine's architecture. For most people, it is `x64`.
|
||||
|
||||
- **For x64 processors (most common):** click on `PowerToysSetup-0.59.1-x64.exe`
|
||||
- **For ARM64 processors:** `PowerToysSetup-0.59.1-arm64.exe`
|
||||
- **For x64 processors (most common):** click on `PowerToysSetup-0.60.1-x64.exe`
|
||||
- **For ARM64 processors:** `PowerToysSetup-0.60.1-arm64.exe`
|
||||
|
||||
This is our preferred method.
|
||||
|
||||
@@ -72,116 +72,117 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/
|
||||
|
||||
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
|
||||
|
||||
### 0.59 - May 2022 Update
|
||||
### 0.60 - June 2022 Update
|
||||
|
||||
In this release, we focused on wrapping up building for native ARM64 and releasing the first experimental build. Below are some of the highlights!
|
||||
In this release, we focused heavily on stability and improvements. Below are some of the highlights!
|
||||
|
||||
**Highlights**
|
||||
|
||||
- The work for running natively on ARM64 has been wrapped up and a build is released. Thanks [@snickler](https://github.com/snickler)!
|
||||
- Power Rename now is running on WinUI 3.
|
||||
- Keyboard Manager now allows up to 4 modifier keys for shortcuts and has received some quality fixes.
|
||||
- Upgraded the Windows App SDK runtimes to 1.1.0, fixing an issue where Settings wouldn't start with UAC off and improving performance.
|
||||
- The Windows App SDK runtime binaries are being shipped with PowerToys which should resolve the installations issues reported with WinAppSDK.
|
||||
- PowerRename and Image Resizer now appear on the new Windows 11 context menu.
|
||||
- There's a new PowerToys Run plugin for OneNote. Thanks [@palenshus](https://github.com/palenshus)!
|
||||
- FancyZones uses a new zone identification with monitor Id to increase stability and avoid zone resets.
|
||||
- AlwaysOnTop now uses rounded corners for highlighting rounded windows on Windows 11.
|
||||
- Added settings to PowerToys Run to better control the query results order. Thanks [@jefflord](https://github.com/jefflord)!
|
||||
|
||||
### Known issues
|
||||
- There are reports of users who are [unable to open the Settings window](https://github.com/microsoft/PowerToys/issues/18015). This is being caused by incompatibilities with some applications (RTSS RivaTuner Statistics Server and MSI AfterBurner are known examples of this). If you're affected by this, please check the linked issue to verify if any of the presented solutions works for you.
|
||||
- After installing PowerToys, [the new Windows 11 context menu entries for PowerRename and Image Resizer might not appear before a system restart](https://github.com/microsoft/PowerToys/issues/19124). On some Windows 11 dev channel insider builds, the new context menu entries are not registering correctly and the classic context menu entries will be shown instead.
|
||||
- There are reports of users who are [unable to open the Settings window](https://github.com/microsoft/PowerToys/issues/18015). This is being caused by incompatibilities with some applications (RTSS RivaTuner Statistics Server and MSI AfterBurner are known examples of this). If you're affected by this, please check the linked issue to verify if any of the presented solutions works for you.
|
||||
|
||||
### General
|
||||
|
||||
- Some typos were fixed. Thanks [@eltociear](https://github.com/eltociear), [@rcmaehl](https://github.com/rcmaehl) and [@ShyPixie](https://github.com/ShyPixie)!
|
||||
|
||||
### ARM64
|
||||
|
||||
- ARM64 support now fully added!
|
||||
- Fixed PowerRename to work on ARM64.
|
||||
- Fixed File Explorer tools to work on ARM64.
|
||||
- Made changes for the installer projects to build ARM64 installers.
|
||||
- Configured the CI and Release pipelines to build for ARM64.
|
||||
- Added ARM64 build status to the README.
|
||||
- Upgraded the Windows App SDK runtimes to 1.1.1. (This was a hotfix for 0.59)
|
||||
|
||||
### Always on Top
|
||||
|
||||
- Fixed an issue where the borders where sticking around when a window was minimized with Win+D.
|
||||
- Added support for more diverse keyboard shortcuts with a fallback to low level keyboard hooks. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Added rounded corner highlights for rounded corner windows on Windows 11.
|
||||
|
||||
### FancyZones
|
||||
|
||||
- Fixed a bug that was consuming CPU cycles when the default layout was set.
|
||||
- Fixed a bug where apps were not opened in their last known zones due to Virtual Desktop ID changes.
|
||||
- Fixed a bug that was snapping popup menus opened by applications.
|
||||
- Fixed a bug causing windows not to be snapped under some configurations.
|
||||
- Fixed a bug where windows shown on all desktops were not working with FancyZones. (This was a hotfix for 0.59)
|
||||
- When changing zone layouts, windows will match a new size/position if the option is on. (This was a hotfix for 0.59)
|
||||
- Minor UI fix in FancyZones Editor. Thanks [@ZetaSp](https://github.com/ZetaSp)!
|
||||
- Fixed proper canvas layout rendering in FancyZones Editor and the unscaled monitor resolution is now shown.
|
||||
- Fixed an issue with transparency in certain windows causing the window to go blank.
|
||||
|
||||
### Image Resizer
|
||||
|
||||
- No longer tries to change metadata on files that were not actually resized. Thanks [@adamchilders](https://github.com/adamchilders)!
|
||||
- The Image Resizer entry is now shown in the new Windows 11 context menu.
|
||||
|
||||
### File explorer add-ons
|
||||
|
||||
- Fixed a bug where modules depending on WebView2 would be limited to opening files smaller than 2 MB. Now the resulting html is generated into a temporary file before presenting it.
|
||||
- Add a viewBox attribute to svg files that don't have one so that the preview tries to show the whole image.
|
||||
- Remove scrollbar that was showing when rendering svg thumbnails.
|
||||
- Add a viewBox attribute to svg file thumbnails so that it tries to show the whole image, similar to what was done in the preview handler.
|
||||
- Removed access to a remote image in the tests for markdown preview.
|
||||
- Fixed flakiness in the markdown preview test suite with proper component initialization timeouts.
|
||||
- Fixed the leaking WebView2 resources caused by svg thumbnails.
|
||||
|
||||
### Keyboard Manager
|
||||
|
||||
- Now up to four modifier keys can be used in shortcuts. This will allow you to use the Office key (which sends Win+Ctrl+Shift+Alt), for example.
|
||||
- Fixed a bug locking Keyboard Manager when two shortcut mapping were pressed at the same time.
|
||||
- Removed event spam for certain telemetry events.
|
||||
- The Editor title bar is now shown in the immersive dark mode theme. Thanks [@WilliamABradley](https://github.com/WilliamABradley)!
|
||||
|
||||
### Mouse utility
|
||||
|
||||
- The Mouse Pointer Crosshairs default activation shortcut was changed to not collide with a special character combination on some internation keyboards.
|
||||
|
||||
### PowerRename
|
||||
|
||||
- Ported to use WinUI 3 instead of WinUI 2.
|
||||
- Fixed the file enumeration logic to only change enumerations at the end of the file name.
|
||||
- Clicking on regex/date and time cheat sheet appends that item to the selected search or replace text field.
|
||||
- The PowerRename entry is now shown in the new Windows 11 context menu.
|
||||
- The title bar is now shown in the immersive dark mode theme. Thanks [@WilliamABradley](https://github.com/WilliamABradley)!
|
||||
|
||||
### PowerToys Run
|
||||
|
||||
- The Services plugin is able to search for parts of the name, display name or the service type or state. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The Services plugin now supports the startup type 'Automatic (Delayed Autostart)'. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The Services plugin now has tooltips for large service names and other UI improvements. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The TimeDate plugin gave results for queries containing just numbers on global queries. This has been fixed. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- We've introduced a throttle before a query is done to ensure typing is done to increase performance. Thanks [@shandsj](https://github.com/shandsj)!
|
||||
- Fixed a crash in WebSearch when there's an empty pattern setup for the system's default browser.
|
||||
- Fixed a bug where VSCodeWorkspaces was not finding portable installations of VSCode. Thanks [@harvastum](https://github.com/harvastum)!
|
||||
- The Calculator plugin reacts better to invalid input and internal errors. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The Calculator plugin can now be configured to use the US number format instead of the system one. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The Folder plugin supports paths containing "/". Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- A setting was added to disable and configure the input delay on searching queries. (This was a hotfix for 0.59)
|
||||
- Fixed and added logs for default Web Browser detection. (This was a hotfix for 0.59)
|
||||
- The Program plugin can now search .lnk shortcuts by their executable name. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- A new plugin for OneNote was added. Thanks [@palenshus](https://github.com/palenshus)!
|
||||
- Query caching and delayed execution was added to the OneNote plugin. Thanks [@palenshus](https://github.com/palenshus)!
|
||||
- Quality of life fixes for the TimeZone plugin, including fixes for empty subtitles, missing time zones and results not being found when expected. Thanks [@TobiasSekan](https://github.com/TobiasSekan)!
|
||||
- Calls to the obsolete WebRequest API were removed. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Added common names for the share settings in the Settings plugins. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The Calculator Mages engine was updated to 2.0.1, for higher precision. Thanks for the testing and for pushing for the changes [@htcfreek](https://github.com/htcfreek)!
|
||||
- Translation fixes for the Calculator and TimeDate plugins. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- An entry for "Search Settings" was added to the Settings plugin. Thanks [@jefflord](https://github.com/jefflord)!
|
||||
- Removed uses of the deprecated BinaryFormatter, which contained vulnerabilities. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Added settings to better control the query results order. Thanks [@jefflord](https://github.com/jefflord)!
|
||||
- The Terminal plugin now uses a better API to detect installed Terminal packages. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
|
||||
### Settings
|
||||
|
||||
- Now the UI for adding excluded apps for FindMyMouse is disabled when the module is disabled. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Text was improved in the Settings UI for File Explorer. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)!
|
||||
- Settings won't try to launch if everything runs elevated in the machine, and a warning message is shown instead.
|
||||
- Some minor UI fixes. Thanks [@niels9001](https://github.com/niels9001)!
|
||||
- The Settings screen should now open correctly if the OOBE screen was opened first.
|
||||
- The rounded corner settings for FancyZones now only show on Windows 11. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Fixed a UI freeze when entering the Keyboard Manager page with clean settings.
|
||||
- Fixed a UI glitch where a message was being shown that all PowerToys Run plugins were disabled when using the search function. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Upgraded the Windows App SDK runtimes to 1.1.0, fixing an issue where Settings wouldn't start with UAC off and improving performance.
|
||||
|
||||
### Runner
|
||||
|
||||
- Auto-update takes into account if it's running on x64 or arm64 to download the right installer.
|
||||
- Fixed a bug that said an update had failed, even if PowerToys was fully updated. (This was a hotfix for 0.59)
|
||||
- OOBE window is resizable. (This was a hotfix for 0.59)
|
||||
- OOBE can now show release notes through authenticated proxies.
|
||||
- OOBE now hides the x64 and ARM64 installer hashes on the What's New page.
|
||||
- Minor UI fix in the Keyboard Manager page. Thanks [@ZetaSp](https://github.com/ZetaSp)!
|
||||
- Fix in internal data type of CheckBox controls. Thanks [@ghost1372](https://github.com/ghost1372)!
|
||||
- The title bar is now shown in the immersive dark mode theme. Thanks [@WilliamABradley](https://github.com/WilliamABradley)!
|
||||
- Fixed a crash accessing/loading the System.Management API on ARM64 versions of Windows.
|
||||
|
||||
### Installer
|
||||
|
||||
- Updated the .NET dependency to 6.0.5.
|
||||
- The installer is now built using a beta version of Wix 3.14 for arm64 support.
|
||||
- Added the VC++ Redistributable binary as a requirement.
|
||||
- The Windows App SDK runtime binaries are being shipped with PowerToys instead of running its installer. This should fix most of the install issues with 0.58.
|
||||
- Fixed signing of the setup custom actions dll in the new pipeline.
|
||||
- The Visual C++ redistributable was updated to 14.32.31332 and fixed an installer error when a newer version was installed. Thanks [@snickler](https://github.com/snickler)!
|
||||
- Updated the .NET dependency to 6.0.6.
|
||||
|
||||
### Development
|
||||
|
||||
- New action added to GitHub to publish the winget package to PowerToys.
|
||||
- New action added to GitHub to publish for the Microsoft Store. Thanks [azchohfi](https://github.com/azchohfi)!
|
||||
- Documentation for installing the Windows App SDK dependencies and building the installer was updated.
|
||||
- FxCop removed from the PowerToys Run TimeZone plugin and was replaced with NetAnalyzers. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Clean up of the CA1031 warning suppression. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Support for ARM64 binaries was added to the Microsoft Store submission task. Thanks [@azchohfi](https://github.com/azchohfi)!
|
||||
- Added code for a tool to help identify monitor IDs.
|
||||
- Support for ARM64 binaries was added to the winget package creation task.
|
||||
- Updated the Pull Request template to better reflect project changes.
|
||||
- Component Governance checks were re-activated on the new main branch.
|
||||
- CI is failing to run tests calling the newer WebView 2 version, so these were disabled until a fix is found.
|
||||
- Updated the tests SDK to 17.2.0.
|
||||
- Nuget package versions used in the solution were consolidated.
|
||||
- The CodeQL CI task was disabled in the repo, but was causing issues on forks, so it was removed.
|
||||
- A specific Newtonsoft.Json version was specified in tests to avoid a vulnerability present in previous versions.
|
||||
- FabricBot configurations were added to the repository.
|
||||
- Added a dependabot configuration for updating GitHub actions dependencies. Thanks [@naveensrinivasan](https://github.com/naveensrinivasan)!
|
||||
- Updated the check-spelling action and added quality of life fixes to the workflow. Thanks [@jsoref](https://github.com/jsoref)!
|
||||
|
||||
#### Community contributions
|
||||
#### What is being planned for v0.61
|
||||
|
||||
We'd like to directly mention certain contributors (in alphabetical order) for their continued community support this month and helping directly make PowerToys a better piece of software.
|
||||
[@Aaron-Junker](https://github.com/Aaron-Junker), [@CleanCodeDeveloper](https://github.com/CleanCodeDeveloper), [@davidegiacometti](https://github.com/davidegiacometti), [@dend](https://github.com/dend), [@franky920920](https://github.com/franky920920), [@htcfreek](https://github.com/htcfreek), [@jay-o-way](https://github.com/jay-o-way), [@jsoref](https://github.com/jsoref), [@niels9001](https://github.com/niels9001), [@snickler](https://github.com/snickler).
|
||||
|
||||
#### What is being planned for v0.60
|
||||
|
||||
For [v0.60][github-next-release-work], we'll work on below:
|
||||
For [v0.61][github-next-release-work], we'll work on below:
|
||||
|
||||
- Environment Variables Editor PowerToy
|
||||
- Screen Measure PowerToy
|
||||
@@ -189,7 +190,7 @@ For [v0.60][github-next-release-work], we'll work on below:
|
||||
|
||||
## PowerToys Community
|
||||
|
||||
The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldn’t be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work.
|
||||
The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldn’t be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work. Month over month, you directly help make PowerToys a better piece of software.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
@@ -212,5 +213,5 @@ The application logs basic telemetry. Our Telemetry Data page (Coming Soon) has
|
||||
[usingPowerToys-docs-link]: https://aka.ms/powertoys-docs
|
||||
|
||||
<!-- items that need to be updated release to release -->
|
||||
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F33
|
||||
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F32
|
||||
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F34
|
||||
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F33
|
||||
|
||||
@@ -23,7 +23,7 @@ This file contains documentation for all the methods involved in key/shortcut re
|
||||
## HandleShortcutRemapEvent
|
||||
[This method](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/KeyboardEventHandlers.cpp#L178-L739) is used for handling the shortcut to shortcut and shortcut to key remapping logic. The general logic is as follows:
|
||||
- Check if any shortcut remap is currently invoked. This is required to ensure that two remaps don't occur simultaneously at a time, and we send key up events for the shortcuts only if they are actually invoked and not for artificial key up events. In addition to that, while a remap is in the middle of execution, the keyboard state will not match the physical keys, so we do not want a remap <kbd>Ctrl+A</kbd> to <kbd>Ctrl+V</kbd> to also trigger the remap from <kbd>Ctrl+V</kbd> to <kbd>Alt+V</kbd> on pressing <kbd>Ctrl+A</kbd> on the keyboard.
|
||||
- Get the remap table as per the the `activatedApp` argument (i.e. if it is empty, we get the global shortcut remap table and otherwise we get the corresponding app-specific shortcut remap table).
|
||||
- Get the remap table as per the `activatedApp` argument (i.e. if it is empty, we get the global shortcut remap table and otherwise we get the corresponding app-specific shortcut remap table).
|
||||
- Iterate over the list of remaps in descending order of number of keys in the shortcut. This is required **for shortcut to key remaps** to ensure that if a user has both <kbd>Ctrl+A</kbd> and <kbd>Ctrl+Shift+A</kbd> remapped to some keys, and the user presses <kbd>Ctrl+Shift+A</kbd>, then we prefer the <kbd>Ctrl+Shift+A</kbd> remap. This logic would not be required if there were only shortcut to shortcut remaps, as they are invoked only on exact match.
|
||||
- If any shortcut was found to be invoked (from the first step), then we skip till we find the matching shortcut remap. If not we check if the modifiers of the original shortcut are pressed down. If they are, we check if the current key event is a key down event and it matches the action key of the original shortcut. For shortcut to shortcut and for disabling a shortcut [we have an additional step](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/KeyboardEventHandlers.cpp#L208-L212) where we check if any other key is pressed apart from the original shortcut. This is required because for these two features we allow the remaps only if those exact keys are pressed. The method used for this is described in detail [here](keyboardmanagercommon.md#IsKeyboardStateClearExceptShortcut). If a win key was pressed, we store whether it was the left or the right one, in order to determine which key to set for remaps from/to the common Win key code which we added. This is so that pressing and releasing Left Win key results in that Win key getting modified and not the Right Win key.
|
||||
- If the remap is to a key, we send a dummy key event followed by releasing the original shortcut's modifiers and setting the target key (or doing nothing if it is remapped to disable) and we suppress the event.
|
||||
|
||||
@@ -101,7 +101,7 @@ KBM uses two sets of settings files.
|
||||
- `remapShortcuts` is split into `global` and `appSpecific`, where `global` remaps would apply to all applications, whereas `appSpecific` would apply on when the `targetApp` is in focus. `targetApp` must be the process name of the app (with or without it's extension), e.g. `msedge` or `msedge.exe` for Microsoft Edge.
|
||||
|
||||
## Loading settings
|
||||
KBM settings are loaded only on the C++ side only at start up, in the [constructor](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L67-L68). The settings file may get modified from the KBM UI on applying new remappings, but the the file is not read again. The files are read from the PowerToys Settings process whenever a change is made to the file (using a FileWatcher) or whenever the KBM page is opened. The settings are updated only when the user presses the OK button from either of the Remap Keys or Remap Shortcuts windows. This is described in more detail [here](keyboardmanagerui.md#ok-and-cancel-button).
|
||||
KBM settings are loaded only on the C++ side only at start up, in the [constructor](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L67-L68). The settings file may get modified from the KBM UI on applying new remappings, but the file is not read again. The files are read from the PowerToys Settings process whenever a change is made to the file (using a FileWatcher) or whenever the KBM page is opened. The settings are updated only when the user presses the OK button from either of the Remap Keys or Remap Shortcuts windows. This is described in more detail [here](keyboardmanagerui.md#ok-and-cancel-button).
|
||||
|
||||
## Low level keyboard hook handler
|
||||
Since the [`hook_proc`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L330-L349) cannot be a member function in the class, this is declared `static` and a `static pointer` to the `KeyboardManager` project is used ([`keyboardmanager_object_ptr`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L54-L55)).
|
||||
@@ -114,10 +114,10 @@ As seen in the code for `hook_proc`, similar to other keyboard hooks in PowerToy
|
||||
The [`HandleKeyboardHookEvent`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L384-L458) is the method which calls the corresponding remapping methods in the required order. The following checks are executed in order:
|
||||
- **`KeyboardManagerState.AreRemappingsEnabled`:** This returns false while the KBM remap tables are getting updated. If it is in this state, `HandleKeyboardHookEvent` returns `0`, i.e. the key event is not suppressed and is forwarded normally.
|
||||
- **Check for `KEYBOARDMANAGER_SUPPRESS_FLAG`:** If the key event has the suppress flag, the method returns 1 to suppress the key event.
|
||||
- **[`KeyboardManagerState.DetectSingleRemapKeyUIBackend`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L399-L408):** This method is used for handling hook operations for the single key Type UI in the Remap keys window. If the Remap keys window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the left column Type button is clicked on the Remap keys window and and the window is in focus, then the key event is suppressed and the UI is updated with the latest key from the recent key events. This method is described in more detail [here](keyboardmanagercommon.md#DetectSingleRemapKeyUIBackend-and-DetectShortcutUIBackend).
|
||||
- **[`KeyboardManagerState.DetectShortcutUIBackend(data, true)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L410-L419):** This method is used for handling hook operations for the shortcut Type UI in the Remap keys window (when `isRemapKey` arg is `true`). If the Remap keys window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the right column Type button is clicked on the Remap keys window and and the window is in focus, then the key event is suppressed and the UI is updated with the shortcut from the recent key events. This method is described in more detail [here](keyboardmanagercommon.md#DetectSingleRemapKeyUIBackend-and-DetectShortcutUIBackend).
|
||||
- **[`KeyboardManagerState.DetectSingleRemapKeyUIBackend`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L399-L408):** This method is used for handling hook operations for the single key Type UI in the Remap keys window. If the Remap keys window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the left column Type button is clicked on the Remap keys window and the window is in focus, then the key event is suppressed and the UI is updated with the latest key from the recent key events. This method is described in more detail [here](keyboardmanagercommon.md#DetectSingleRemapKeyUIBackend-and-DetectShortcutUIBackend).
|
||||
- **[`KeyboardManagerState.DetectShortcutUIBackend(data, true)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L410-L419):** This method is used for handling hook operations for the shortcut Type UI in the Remap keys window (when `isRemapKey` arg is `true`). If the Remap keys window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the right column Type button is clicked on the Remap keys window and the window is in focus, then the key event is suppressed and the UI is updated with the shortcut from the recent key events. This method is described in more detail [here](keyboardmanagercommon.md#DetectSingleRemapKeyUIBackend-and-DetectShortcutUIBackend).
|
||||
- **`HandleSingleKeyRemapEvent`:** This method handles the single key remap logic. If a remapping takes place, the key event is suppressed. This method is described in more detail [here](keyboardeventhandlers.md#HandleSingleKeyRemapEvent).
|
||||
- **[`KeyboardManagerState.DetectShortcutUIBackend(data, false)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L430-L439):** This method is used for handling hook operations for the shortcut Type UI in the Remap shortcuts window (when `isRemapKey` arg is `false`). If the Remap shortcuts window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the Type button is clicked on the Remap shortcuts window and and the window is in focus, then the key event is suppressed and the UI is updated with the shortcut from the recent key events. **Since this is executed after the single key remap method, all single key remappings are applied when the user is on the Remap shortcuts window.**
|
||||
- **[`KeyboardManagerState.DetectShortcutUIBackend(data, false)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L430-L439):** This method is used for handling hook operations for the shortcut Type UI in the Remap shortcuts window (when `isRemapKey` arg is `false`). If the Remap shortcuts window is open, then `HandleKeyboardHookEvent` returns `0` and the key event is forwarded normally. If the Type button is clicked on the Remap shortcuts window and the window is in focus, then the key event is suppressed and the UI is updated with the shortcut from the recent key events. **Since this is executed after the single key remap method, all single key remappings are applied when the user is on the Remap shortcuts window.**
|
||||
- **`HandleAppSpecificShortcutRemapEvent`:** This method handles the app-specific shortcut remap logic. If a remapping takes place, the key event is suppressed. This method is described in more detail [here](keyboardeventhandlers.md#HandleAppSpecificShortcutRemapEvent). **Since this is executed after the single key remap method, single key remappings have precedence over shortcut remaps and are correspondingly reflected in shortcut remaps.**
|
||||
- **`HandleOSLevelShortcutRemapEvent`:** This method handles the global shortcut remap logic. If a remapping takes place, the key event is suppressed. This method is described in more detail [here](keyboardeventhandlers.md#HandleOSLevelShortcutRemapEvent). The app-specific remap method is executed before this because if a shortcut is remapped to different keys/shortcuts for a particular app and globally, the app-specific variant should be preferred if that app is in focus. **Since this is executed after the single key remap method, single key remappings have precedence over shortcut remaps and are correspondingly reflected in shortcut remaps.**
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Once this second level of validation is done, we proceed with [updating the buff
|
||||
Unlike the Single Key handler, there is a different set of errors that can occur here which are related to making a selection that is considered as a valid shortcut. The `isHybridControl` argument is used to distinguish between the differing behaviors for the two types of columns (shortcut only or shortcut/key column). The errors that can occur for this handler are:
|
||||
- Shortcut must start with modifier (selecting A on the first drop for the left column is invalid)
|
||||
- Shortcut can't have a repeated modifier (Ctrl+Ctrl(left)+A is not a shortcut)
|
||||
- Shortcut can only have upto 2 modifiers (Ctrl+Shift+Alt is not supported as we have enforced a 3 key constraint (**not a backend limitation, there is [an issue](https://github.com/microsoft/PowerToys/issues/3936) requesting to remove this**))
|
||||
- Shortcut can only have up to 2 modifiers (Ctrl+Shift+Alt is not supported as we have enforced a 3 key constraint (**not a backend limitation, there is [an issue](https://github.com/microsoft/PowerToys/issues/3936) requesting to remove this**))
|
||||
- Shortcut must contain an action key (Ctrl+A and change A to None, only for left column)
|
||||
- Shortcut must have at least two keys (Ctrl+A and change Ctrl to None, only for left column)
|
||||
- Disable can't be a modifier or action key (Ctrl+Disable is invalid)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
- [ ] The plugin is a project under `modules\launcher\Plugins`
|
||||
- [ ] Microsoft plugin project name pattern: `Microsoft.PowerToys.Run.Plugin.{PluginName}`
|
||||
- [ ] Community plugin project name pattern: `Community.PowerToys.Run.Plugin.{PluginName}`
|
||||
- [ ] [`GlobalSuppressions.cs`](/src/codeAnalysis/GlobalSuppressions.cs) and [`StyleCop.json`](/src/codeAnalysis/StyleCop.json) have to be included in the plugin project so it follows PowerToys code guidelines
|
||||
- [ ] The project file should import `Version.props` and specify `<Version>$(Version).0</Version>`
|
||||
- [ ] Make sure `*.csproj` specify only x64 platform target
|
||||
- [ ] The plugin has to contain a `plugin.json` file of the following format in its root folder
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# OneNote Plugin
|
||||
The OneNote plugin searches your locally synced OneNote notebooks based on the user query.
|
||||
|
||||

|
||||

|
||||
|
||||
The code itself is very simple, basically just a call into OneNote interop via the https://github.com/scipbe/ScipBe-Common-Office library.
|
||||
|
||||
@@ -9,6 +9,8 @@ The code itself is very simple, basically just a call into OneNote interop via t
|
||||
var pages = OneNoteProvider.FindPages(query.Search);
|
||||
```
|
||||
|
||||
The query results will be cached for 1 day, and if cached results are found they'll be returned in the initial `Query()` call, otherwise OneNote itself will be queried in the `delayedExecution:true` overload.
|
||||
|
||||
If the user actions on a result, it'll open it in the OneNote app, and restore and/or focus the app as well if necessary.
|
||||
|
||||
```csharp
|
||||
@@ -33,4 +35,4 @@ catch (COMException)
|
||||
// OneNote isn't installed, plugin won't do anything.
|
||||
_oneNoteInstalled = false;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -69,16 +69,14 @@ The plugin use only these interfaces (all inside the `Main.cs`):
|
||||
| `Images\reg.light.png` | Symbol for the results for the light theme |
|
||||
| `Properties\Resources.Designer.resx` | File that contain all translatable keys |
|
||||
| `Properties\Resources.resx` | File that contain all translatable strings in the neutral language |
|
||||
| `GlobalSuppressions.cs` | Code suppressions (no real file, linked via *.csproj) |
|
||||
| `Main.cs` | Main class, the only place that implement the WOX interfaces |
|
||||
| `plugin.json` | All meta-data for this plugin |
|
||||
| `StyleCop.json` | Code style (no real file, linked via *.csproj) |
|
||||
|
||||
### Important project values (*.csproj)
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | ------------------------------------------------------------------------------ |
|
||||
| TargetFramework | `net6.0-windows` (.NET 5) or `net6.0-windows10.0.18362.0` (OS version specific)|
|
||||
| TargetFramework | `net6.0-windows` (.NET 5) or `net6.0-windows10.0.19041.0` (OS version specific)|
|
||||
| LangVersion | `8.0` (mean C# 8.0) |
|
||||
| Platforms | `x64` |
|
||||
| Nullable | `true` |
|
||||
@@ -88,13 +86,6 @@ The plugin use only these interfaces (all inside the `Main.cs`):
|
||||
|
||||
### Project dependencies
|
||||
|
||||
#### Packages
|
||||
|
||||
| Package | Version |
|
||||
| ------------------------------------------------------------------------------------- | ------- |
|
||||
| [`Microsoft.CodeAnalysis.FxCopAnalyzers`](https://github.com/dotnet/roslyn-analyzers) | 3.3.0 |
|
||||
| [`StyleCop.Analyzers`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) | 1.1.118 |
|
||||
|
||||
#### Projects
|
||||
|
||||
* `Wox.Infrastructure`
|
||||
|
||||
@@ -115,13 +115,10 @@ The plugin use only these interfaces (all inside the `Main.cs`):
|
||||
| `Images\timeZone.light.png` | Symbol for the results for the light theme |
|
||||
| `Properties\Resources.Designer.resx` | File that contain all translatable keys |
|
||||
| `Properties\Resources.resx` | File that contain all translatable strings in the neutral language |
|
||||
| `GlobalSuppressions.cs` | Code suppressions (no real file, linked via *.csproj) |
|
||||
| `Main.cs` | Main class, the only place that implement the WOX interfaces |
|
||||
| `plugin.json` | All meta-data for this plugin |
|
||||
| `StyleCop.json` | Code style (no real file, linked via *.csproj) |
|
||||
| `timezones.json` | File that contains all time zone information |
|
||||
| `timeZones.schema.json` | JSON schema for `timezones.json` |
|
||||
| `StyleCop.json` | Code style (no real file, linked via *.csproj) |
|
||||
|
||||
1. We need this extra wrapper class to make it possible that the JSON file can have and use a JSON schema file.
|
||||
Because the JSON file must have a object as root type, instead of a array.
|
||||
@@ -138,12 +135,6 @@ Because the JSON file must have a object as root type, instead of a array.
|
||||
|
||||
### Project dependencies
|
||||
|
||||
#### Packages
|
||||
|
||||
| Package | Version |
|
||||
| ------------------------------------------------------------------------------------- | ------- |
|
||||
| [`StyleCop.Analyzers`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) | 1.1.118 |
|
||||
|
||||
#### Projects
|
||||
|
||||
* `Wox.Infrastructure`
|
||||
|
||||
@@ -61,7 +61,7 @@ A full entry for the `WindowsSettings.json` looks like:
|
||||
* The integer value for `IntroducedInBuild` and `DeprecatedInBuild` must be in range of `0` to `4294967295`
|
||||
* The strings for `Name`, `AltNames`, `Areas`, `Type` and `Note` must not contain whitespace(s) or special characters (#, €, $, etc.)
|
||||
* The strings for `Name`, `AltNames`, `Areas`, `Type` and `Note` are used as ids for the resource file under `Properties\Resources.resx`
|
||||
* When you add new strings make sure you have add add all translations for it.
|
||||
* When you add new strings make sure you have added all translations for it.
|
||||
|
||||
## Scores
|
||||
|
||||
@@ -129,10 +129,8 @@ The plugin use only these interfaces (all inside the `Main.cs`):
|
||||
| `Images\WindowsSettings.light.png` | Symbol for the results for the light theme |
|
||||
| `Properties\Resources.Designer.resx` | File that contain all translatable keys |
|
||||
| `Properties\Resources.resx` | File that contain all translatable strings in the neutral language |
|
||||
| `GlobalSuppressions.cs` | Code suppressions (no real file, linked via *.csproj) |
|
||||
| `Main.cs` | Main class, the only place that implement the WOX interfaces |
|
||||
| `plugin.json` | All meta-data for this plugin |
|
||||
| `StyleCop.json` | Code style (no real file, linked via *.csproj) |
|
||||
|
||||
1. We need this extra wrapper class to make it possible that the JSON file can have and use a JSON schema file.
|
||||
Because the JSON file must have a object as root type, instead of a array.
|
||||
@@ -141,7 +139,7 @@ Because the JSON file must have a object as root type, instead of a array.
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| TargetFramework | `net6.0-windows` (.NET 5) or `net6.0-windows10.0.18362.0` (OS version specific) |
|
||||
| TargetFramework | `net6.0-windows` (.NET 5) or `net6.0-windows10.0.19041.0` (OS version specific) |
|
||||
| Platforms | `x64` |
|
||||
| Output | `..\..\..\..\..\x64\Debug\modules\launcher\Plugins\Microsoft.PowerToys.Run.Plugin.WindowsSettings\` |
|
||||
| RootNamespace | `Microsoft.PowerToys.Run.Plugin.WindowsSettings` |
|
||||
@@ -149,12 +147,6 @@ Because the JSON file must have a object as root type, instead of a array.
|
||||
|
||||
### Project dependencies
|
||||
|
||||
#### Packages
|
||||
|
||||
| Package | Version |
|
||||
| ------------------------------------------------------------------------------------- | ------- |
|
||||
| [`StyleCop.Analyzers`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) | 1.1.118 |
|
||||
|
||||
#### Projects
|
||||
|
||||
* `Wox.Infrastructure`
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
<PackagingLayout xmlns="http://schemas.microsoft.com/appx/makeappx/2017">
|
||||
<PackageFamily ID="PowerToys" FlatBundle="true" ManifestPath="appxmanifest.xml" ResourceManager="false">
|
||||
|
||||
<Package ID="PowerToys-x64" ProcessorArchitecture="x64">
|
||||
<Files>
|
||||
<File DestinationPath="License.rtf" SourcePath="..\License.rtf"/>
|
||||
|
||||
<File DestinationPath="action_runner.exe" SourcePath="..\..\x64\Release\action_runner.exe"/>
|
||||
<File DestinationPath="PowerToys.exe" SourcePath="..\..\x64\Release\PowerToys.exe"/>
|
||||
<File DestinationPath="PowerToysSettings.exe" SourcePath="..\..\x64\Release\PowerToysSettings.exe"/>
|
||||
|
||||
<File DestinationPath="modules\PowerToys.FancyZonesEditor.exe" SourcePath="..\..\x64\Release\modules\PowerToys.FancyZonesEditor.exe"/>
|
||||
<File DestinationPath="modules\ControlzEx.dll" SourcePath="..\..\x64\Release\modules\ControlzEx.dll"/>
|
||||
<File DestinationPath="modules\fancyzones.dll" SourcePath="..\..\x64\Release\modules\fancyzones.dll"/>
|
||||
<File DestinationPath="modules\MahApps.Metro.dll" SourcePath="..\..\x64\Release\modules\MahApps.Metro.dll"/>
|
||||
<File DestinationPath="modules\Microsoft.Xaml.Behaviors.dll" SourcePath="..\..\x64\Release\modules\Microsoft.Xaml.Behaviors.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.PowerRenameExt.dll" SourcePath="..\..\x64\Release\modules\PowerToys.PowerRenameExt.dll"/>
|
||||
<File DestinationPath="modules\shortcut_guide.dll" SourcePath="..\..\x64\Release\modules\shortcut_guide.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.ImageResizer.exe" SourcePath="..\..\x64\Release\modules\PowerToys.ImageResizer.exe"/>
|
||||
<File DestinationPath="modules\PowerToys.ImageResizerExt.dll" SourcePath="..\..\x64\Release\modules\PowerToys.ImageResizerExt.dll"/>
|
||||
<File DestinationPath="modules\GalaSoft.MvvmLight.dll" SourcePath="..\..\x64\Release\modules\GalaSoft.MvvmLight.dll"/>
|
||||
<File DestinationPath="modules\GalaSoft.MvvmLight.Platform.dll" SourcePath="..\..\x64\Release\modules\GalaSoft.MvvmLight.Platform.dll"/>
|
||||
<File DestinationPath="modules\GalaSoft.MvvmLight.Extras.dll" SourcePath="..\..\x64\Release\modules\GalaSoft.MvvmLight.Extras.dll"/>
|
||||
<File DestinationPath="modules\System.Windows.Interactivity.dll" SourcePath="..\..\x64\Release\modules\System.Windows.Interactivity.dll"/>
|
||||
<File DestinationPath="modules\Newtonsoft.Json.dll" SourcePath="..\..\x64\Release\modules\Newtonsoft.Json.dll"/>
|
||||
<File DestinationPath="modules\PowerKeys.dll" SourcePath="..\..\x64\Release\modules\PowerKeys.dll"/>
|
||||
<File DestinationPath="modules\System.Text.Json.dll" SourcePath="..\..\x64\Release\modules\System.Text.Json.dll"/>
|
||||
<File DestinationPath="modules\System.Memory.dll" SourcePath="..\..\x64\Release\modules\System.Memory.dll"/>
|
||||
<File DestinationPath="modules\System.Buffers.dll" SourcePath="..\..\x64\Release\modules\System.Buffers.dll"/>
|
||||
<File DestinationPath="modules\System.Runtime.CompilerServices.Unsafe.dll" SourcePath="..\..\x64\Release\modules\System.Runtime.CompilerServices.Unsafe.dll"/>
|
||||
<File DestinationPath="modules\System.Text.Encodings.Web.dll" SourcePath="..\..\x64\Release\modules\System.Text.Encodings.Web.dll"/>
|
||||
<File DestinationPath="modules\System.Threading.Tasks.Extensions.dll" SourcePath="..\..\x64\Release\modules\System.Threading.Tasks.Extensions.dll"/>
|
||||
<File DestinationPath="modules\System.ValueTuple.dll" SourcePath="..\..\x64\Release\modules\System.ValueTuple.dll"/>
|
||||
<File DestinationPath="modules\System.Numerics.Vectors.dll" SourcePath="..\..\x64\Release\modules\System.Numerics.Vectors.dll"/>
|
||||
<File DestinationPath="modules\Microsoft.Bcl.AsyncInterfaces.dll" SourcePath="..\..\x64\Release\modules\Microsoft.Bcl.AsyncInterfaces.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.powerpreview.dll" SourcePath="..\..\x64\Release\modules\PowerToys.powerpreview.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.PreviewHandlerCommon.dll" SourcePath="..\..\x64\Release\modules\PowerToys.PreviewHandlerCommon.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.SvgPreviewHandler.dll" SourcePath="..\..\x64\Release\modules\PowerToys.SvgPreviewHandler.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.MarkdownPreviewHandler.dll" SourcePath="..\..\x64\Release\modules\PowerToys.MarkdownPreviewHandler.dll"/>
|
||||
<File DestinationPath="modules\PowerToys.GcodePreviewHandler.dll" SourcePath="..\..\x64\Release\modules\PowerToys.GcodePreviewHandler.dll"/>
|
||||
<File DestinationPath="modules\Markdig.Signed.dll" SourcePath="..\..\x64\Release\modules\Markdig.Signed.dll"/>
|
||||
<File DestinationPath="modules\HtmlAgilityPack.dll" SourcePath="..\..\x64\Release\modules\HtmlAgilityPack.dll"/>
|
||||
<File DestinationPath="registry.dat" SourcePath="registry.dat"/>
|
||||
|
||||
<File DestinationPath="modules\PowerToys.FancyZonesEditor.exe.config" SourcePath="..\..\x64\Release\modules\PowerToys.FancyZonesEditor.exe.config"/>
|
||||
|
||||
<File DestinationPath="Notifications.dll" SourcePath="..\..\x64\Release\Notifications.dll"/>
|
||||
|
||||
<File DestinationPath="svgs\*" SourcePath="..\..\x64\Release\svgs\*"/>
|
||||
<File DestinationPath="settings-html\**" SourcePath="..\..\x64\Release\settings-html\**"/>
|
||||
<File DestinationPath="Images\*.png" SourcePath="Images\*.png"/>
|
||||
|
||||
<!-- Resource files for ar,bg,ca,cs,de,es,eu-ES,fr,he,hu,it,nb-NO,nl,pl,pt-BR,ru,sk,tr,zh-Hans -->
|
||||
<File DestinationPath="modules\ar\**" SourcePath="..\..\x64\Release\modules\ar\**"/>
|
||||
<File DestinationPath="modules\bg\**" SourcePath="..\..\x64\Release\modules\bg\**"/>
|
||||
<File DestinationPath="modules\ca\**" SourcePath="..\..\x64\Release\modules\ca\**"/>
|
||||
<File DestinationPath="modules\cs\**" SourcePath="..\..\x64\Release\modules\cs\**"/>
|
||||
<File DestinationPath="modules\de\**" SourcePath="..\..\x64\Release\modules\de\**"/>
|
||||
<File DestinationPath="modules\es\**" SourcePath="..\..\x64\Release\modules\es\**"/>
|
||||
<File DestinationPath="modules\eu-ES\**" SourcePath="..\..\x64\Release\modules\eu-ES\**"/>
|
||||
<File DestinationPath="modules\fr\**" SourcePath="..\..\x64\Release\modules\fr\**"/>
|
||||
<File DestinationPath="modules\he\**" SourcePath="..\..\x64\Release\modules\he\**"/>
|
||||
<File DestinationPath="modules\hu\**" SourcePath="..\..\x64\Release\modules\hu\**"/>
|
||||
<File DestinationPath="modules\it\**" SourcePath="..\..\x64\Release\modules\it\**"/>
|
||||
<File DestinationPath="modules\nb-NO\**" SourcePath="..\..\x64\Release\modules\nb-NO\**"/>
|
||||
<File DestinationPath="modules\nl\**" SourcePath="..\..\x64\Release\modules\nl\**"/>
|
||||
<File DestinationPath="modules\pl\**" SourcePath="..\..\x64\Release\modules\pl\**"/>
|
||||
<File DestinationPath="modules\pt-BR\**" SourcePath="..\..\x64\Release\modules\pt-BR\**"/>
|
||||
<File DestinationPath="modules\ru\**" SourcePath="..\..\x64\Release\modules\ru\**"/>
|
||||
<File DestinationPath="modules\sk\**" SourcePath="..\..\x64\Release\modules\sk\**"/>
|
||||
<File DestinationPath="modules\tr\**" SourcePath="..\..\x64\Release\modules\tr\**"/>
|
||||
<File DestinationPath="modules\zh-Hans\**" SourcePath="..\..\x64\Release\modules\zh-Hans\**"/>
|
||||
</Files>
|
||||
</Package>
|
||||
</PackageFamily>
|
||||
</PackagingLayout>
|
||||
@@ -1,121 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2"
|
||||
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
|
||||
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
|
||||
xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2"
|
||||
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
|
||||
xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5" IgnorableNamespaces="desktop4">
|
||||
<Identity Name="Microsoft.PowerToys" Version="0.15.2.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" ProcessorArchitecture="x64" />
|
||||
<Properties>
|
||||
<DisplayName>PowerToys</DisplayName>
|
||||
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
|
||||
<Description>Windows system utilities to maximize productivity</Description>
|
||||
<Logo>Images\logo.png</Logo>
|
||||
</Properties>
|
||||
<Resources>
|
||||
<Resource Language="en-us" />
|
||||
</Resources>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18362.30" />
|
||||
</Dependencies>
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust"/>
|
||||
<rescap:Capability Name="allowElevation"/>
|
||||
</Capabilities>
|
||||
<Applications>
|
||||
<Application Id="PowerToys" Executable="PowerToys.exe" EntryPoint="Windows.FullTrustApplication">
|
||||
<uap:VisualElements DisplayName="PowerToys (Experimental)" Description="Windows system utilities to maximize productivity" Square150x150Logo="Images\logo150.png" Square44x44Logo="Images\logo44.png" BackgroundColor="transparent" />
|
||||
<Extensions>
|
||||
<uap:Extension Category="windows.protocol">
|
||||
<uap:Protocol Name="powertoys">
|
||||
<uap:Logo>images\logo.png</uap:Logo>
|
||||
<uap:DisplayName>Powertoys custom protocol</uap:DisplayName>
|
||||
</uap:Protocol>
|
||||
</uap:Extension>
|
||||
<uap5:Extension Category="windows.startupTask" Executable="PowerToys.exe" EntryPoint="Windows.FullTrustApplication">
|
||||
<uap5:StartupTask TaskId="PowerToysStartupTaskID" Enabled="true" DisplayName="PowerToys" />
|
||||
</uap5:Extension>
|
||||
<com:Extension Category="windows.comServer">
|
||||
<com:ComServer>
|
||||
<com:SurrogateServer DisplayName="ImageResizerExt">
|
||||
<com:Class Id="51B4D7E5-7568-4234-B4BB-47FB3C016A69" Path="modules\PowerToys.ImageResizerExt.dll" ThreadingModel="STA"/>
|
||||
</com:SurrogateServer>
|
||||
</com:ComServer>
|
||||
</com:Extension>
|
||||
<desktop4:Extension Category="windows.fileExplorerContextMenus">
|
||||
<desktop4:FileExplorerContextMenus>
|
||||
<desktop4:ItemType Type="*">
|
||||
<desktop4:Verb Id="FilePowerRename" Clsid="0440049F-D1DC-4E46-B27B-98393D79486B" />
|
||||
</desktop4:ItemType>
|
||||
<desktop5:ItemType Type="Directory">
|
||||
<desktop5:Verb Id="DirectoryPowerRename" Clsid="0440049F-D1DC-4E46-B27B-98393D79486B" />
|
||||
</desktop5:ItemType>
|
||||
<desktop4:ItemType Type="*">
|
||||
<desktop4:Verb Id="ImageResizer" Clsid="51B4D7E5-7568-4234-B4BB-47FB3C016A69" />
|
||||
</desktop4:ItemType>
|
||||
</desktop4:FileExplorerContextMenus>
|
||||
</desktop4:Extension>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap3:FileTypeAssociation Name="mdpreviewhandler" desktop2:AllowSilentDefaultTakeOver="true">
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType>.md</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
<desktop2:DesktopPreviewHandler Clsid="E0907A95-6F9A-4D1B-A97A-7D9D2648881E"/>
|
||||
</uap3:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap3:FileTypeAssociation Name="svgpreviewhandler" desktop2:AllowSilentDefaultTakeOver="true">
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType>.svg</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
<desktop2:DesktopPreviewHandler Clsid="74619BDA-A66B-451D-864C-A7726F5FE650"/>
|
||||
</uap3:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap3:FileTypeAssociation Name="pdfpreviewhandler" desktop2:AllowSilentDefaultTakeOver="true">
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType>.pdf</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
<desktop2:DesktopPreviewHandler Clsid="4F6D533B-4185-43A6-AD75-9B20034B14CA"/>
|
||||
</uap3:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap3:FileTypeAssociation Name="gcodepreviewhandler" desktop2:AllowSilentDefaultTakeOver="true">
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType>.gcode</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
<desktop2:DesktopPreviewHandler Clsid="516CB24F-562F-422F-8B01-6B580474D093"/>
|
||||
</uap3:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
<com:Extension Category="windows.comServer">
|
||||
<com:ComServer>
|
||||
<com:SurrogateServer DisplayName="Preview Handler" AppId="E39A92FE-D89A-417B-9B9D-F0B6BD564B36" SystemSurrogate="PreviewHost">
|
||||
<com:Class Id="74619BDA-A66B-451D-864C-A7726F5FE650" Path="modules\PowerToys.powerpreview.dll" ThreadingModel="Both"/>
|
||||
<com:Class Id="E0907A95-6F9A-4D1B-A97A-7D9D2648881E" Path="modules\PowerToys.powerpreview.dll" ThreadingModel="Both"/>
|
||||
<com:Class Id="4F6D533B-4185-43A6-AD75-9B20034B14CA" Path="modules\PowerToys.powerpreview.dll" ThreadingModel="Both"/>
|
||||
<com:Class Id="516CB24F-562F-422F-8B01-6B580474D093" Path="modules\PowerToys.powerpreview.dll" ThreadingModel="Both"/>
|
||||
</com:SurrogateServer>
|
||||
</com:ComServer>
|
||||
</com:Extension>
|
||||
<Extension Category="windows.backgroundTasks" EntryPoint="PowerToysNotifications.BackgroundHandler">
|
||||
<BackgroundTasks>
|
||||
<Task Type="general" />
|
||||
</BackgroundTasks>
|
||||
</Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Extensions>
|
||||
<Extension Category="windows.activatableClass.inProcessServer">
|
||||
<InProcessServer>
|
||||
<Path>Notifications.dll</Path>
|
||||
<ActivatableClass ActivatableClassId="PowerToysNotifications.BackgroundHandler" ThreadingModel="both"/>
|
||||
</InProcessServer>
|
||||
</Extension>
|
||||
</Extensions>
|
||||
</Package>
|
||||
@@ -1,13 +0,0 @@
|
||||
param (
|
||||
[bool]$debug = 0
|
||||
)
|
||||
|
||||
$PackagingLayoutFile = "PackagingLayout.xml"
|
||||
|
||||
if ($debug) {
|
||||
(Get-Content $PackagingLayoutFile) `
|
||||
-replace 'x64\\Release\\', 'x64\Debug\' `
|
||||
| Out-File -Encoding utf8 "$env:temp\$PackagingLayoutFile"
|
||||
$PackagingLayoutFile = "$env:temp\$PackagingLayoutFile"
|
||||
}
|
||||
makeappx build /v /overwrite /f $PackagingLayoutFile /id "PowerToys-x64" /op bin\
|
||||
@@ -1,14 +0,0 @@
|
||||
cd /D "%~dp0"
|
||||
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
|
||||
powershell -file update_appxmanifest_version.ps1 || exit /b 1
|
||||
|
||||
call makeappx build /v /overwrite /f PackagingLayout.xml /id "PowerToys-x64" /op bin\ || exit /b 1
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
for /f "tokens=3delims=<>" %%i in ('findstr "<Version>" "..\Version.props"') do (
|
||||
set MSIXVERSION=%%i
|
||||
)
|
||||
setlocal DisableDelayedExpansion
|
||||
ren "bin\PowerToys-x64.msix" PowerToysSetup-%MSIXVERSION%-x64.msix
|
||||
@@ -1,5 +0,0 @@
|
||||
$expirationDate = {Get-Date}.Invoke().AddYears(5)
|
||||
$pass = ConvertTo-SecureString -String "12345" -Force -AsPlainText
|
||||
$thumbprint = (New-SelfSignedCertificate -notafter $expirationDate -Type CodeSigningCert -Subject "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" -FriendlyName "PowerToys Test Certificate" -KeyDescription "PowerToys Test Certificate" -KeyFriendlyName "PowerToys Test Key" -KeyUsage "DigitalSignature" -CertStoreLocation Cert:\LocalMachine\My).Thumbprint
|
||||
Export-PfxCertificate -Cert cert:\LocalMachine\My\$thumbprint -FilePath PowerToys_TemporaryKey.pfx -Password $pass
|
||||
Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath PowerToys_TemporaryKey.pfx -Password $pass
|
||||
@@ -1 +0,0 @@
|
||||
Add-AppxPackage .\bin\PowerToys.msixbundle
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
.\uninstall_msix.ps1
|
||||
.\build_msix.ps1
|
||||
.\sign_msix.ps1
|
||||
.\install_msix.ps1
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
signtool sign /debug /a /fd SHA256 /f PowerToys_TemporaryKey.pfx /p 12345 bin\PowerToys-x64.msix
|
||||
signtool sign /debug /a /fd SHA256 /f PowerToys_TemporaryKey.pfx /p 12345 bin\PowerToys.msixbundle
|
||||
@@ -1 +0,0 @@
|
||||
Get-AppxPackage -Name '*PowerToys' | select -ExpandProperty "PackageFullName" | Remove-AppxPackage
|
||||
@@ -1,5 +0,0 @@
|
||||
$version = ([xml](Get-Content ..\Version.props)).Project.PropertyGroup.Version
|
||||
|
||||
(Get-Content appxmanifest.xml) `
|
||||
-replace '(Name="[\.\w]+"\sVersion=")([\d\.]+)"', -join('${1}', $version, '.0"') `
|
||||
| Out-File -Encoding utf8 appxmanifest.xml
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -6,13 +6,13 @@
|
||||
<?define BinDir="$(var.RepoDir)$(var.Platform)\$(var.Configuration)\" ?>
|
||||
<?define PowerToysPlatform="x64"?>
|
||||
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/5681bdf9-0a48-45ac-b7bf-21b7b61657aa/bbdc43bc7bf0d15b97c1a98ae2e82ec0/windowsdesktop-runtime-6.0.5-win-x64.exe"?>
|
||||
<?define Dotnet6PayloadSize="57791288"?>
|
||||
<?define Dotnet6PayloadHash="B5B1819CCA753B070181F50411375B80412860A3"?>
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/dc0e0e83-0115-4518-8b6a-590ed594f38a/65b63e41f6a80decb37fa3c5af79a53d/windowsdesktop-runtime-6.0.7-win-x64.exe"?>
|
||||
<?define Dotnet6PayloadSize="57708544"?>
|
||||
<?define Dotnet6PayloadHash="16DDD34B1E1AEA0D89D3B0A8786026436CD17234"?>
|
||||
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/6b6923b0-3045-4379-a96f-ef5506a65d5b/426A34C6F10EA8F7DA58A8C976B586AD84DD4BAB42A0CFDBE941F1763B7755E5/VC_redist.x64.exe"?>
|
||||
<?define VCRedistPayloadSize="25337776"?>
|
||||
<?define VCRedistPayloadHash="47996AAB6A20DBBA69969C4B36F8FC718877751F"?>
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe"?>
|
||||
<?define VCRedistPayloadSize="25234792"?>
|
||||
<?define VCRedistPayloadHash="D4F9181E70E3F1AA6C8EDFFCC15B3C3D4BABE36B"?>
|
||||
|
||||
<?define PlatformProgramFiles="[ProgramFiles64Folder]"?>
|
||||
<?else?>
|
||||
@@ -20,13 +20,13 @@
|
||||
<?define BinDir="$(var.RepoDir)ARM64\$(var.Configuration)\" ?>
|
||||
<?define PowerToysPlatform="ARM64"?>
|
||||
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/aa74da73-02cb-49fd-93ad-ce93edccb8bc/4ac67827aff545ead4032a940c9094ff/windowsdesktop-runtime-6.0.5-win-arm64.exe"?>
|
||||
<?define Dotnet6PayloadSize="51774400"?>
|
||||
<?define Dotnet6PayloadHash="62C15858951B123AFD4D3E14F8BE4829A7CAFF18"?>
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/f33cf7ce-bf03-428c-8aa7-e32ef6d7ddc6/e61dc60fce686844c41ec2901ad5b01e/windowsdesktop-runtime-6.0.7-win-arm64.exe"?>
|
||||
<?define Dotnet6PayloadSize="51539968"?>
|
||||
<?define Dotnet6PayloadHash="F98232B9B572848B8425462F9458E92710BBF55F"?>
|
||||
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/6b6923b0-3045-4379-a96f-ef5506a65d5b/6114C0A7A526EA47D9ADD78C718BEA0BA32EEF0826AA5610AF76877CC5FEB7F3/VC_redist.arm64.exe"?>
|
||||
<?define VCRedistPayloadSize="11596400"?>
|
||||
<?define VCRedistPayloadHash="DEF8E16367DE4BDDE0399614B7E358629A959942"?>
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/8E126191012691AE22A0D5A89FAC01B59BABC7B680E5D9B65828935FD366E375/VC_redist.arm64.exe"?>
|
||||
<?define VCRedistPayloadSize="11500416"?>
|
||||
<?define VCRedistPayloadHash="FEECAC80EF04125B058381487332872896F38477"?>
|
||||
|
||||
<!--TODO: define to ARM64 Program files once it's available-->
|
||||
<?define PlatformProgramFiles="[ProgramFiles6432Folder]"?>
|
||||
@@ -44,12 +44,12 @@
|
||||
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
|
||||
<bal:WixStandardBootstrapperApplication
|
||||
LicenseFile="$(var.RepoDir)\installer\License.rtf"
|
||||
LogoFile="$(var.RepoDir)\installer\MSIX\Images\logo44.png"
|
||||
LogoFile="$(var.RepoDir)\installer\PowerToysSetup\Images\logo44.png"
|
||||
SuppressOptionsUI="no"
|
||||
SuppressRepair="yes" />
|
||||
</BootstrapperApplicationRef>
|
||||
|
||||
<util:FileSearch Variable="HasDotnet605" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.5\System.Xaml.dll" Result="exists" />
|
||||
<util:FileSearch Variable="HasDotnet607" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.7\System.Xaml.dll" Result="exists" />
|
||||
<util:RegistrySearch Variable="HasWebView2PerMachine" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
|
||||
<util:RegistrySearch Variable="HasWebView2PerUser" Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
|
||||
|
||||
@@ -67,16 +67,16 @@
|
||||
|
||||
<Variable Name="DetectedWindowsBuildNumber" Type="version" Value="0"/>
|
||||
<util:RegistrySearch Id="SearchWindowsBuildNumber" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber" Result="value" Format="raw" Variable="DetectedWindowsBuildNumber" />
|
||||
<bal:Condition Message="This application is only supported on Windows 10 version 1903 (build 18362) or higher.">DetectedWindowsBuildNumber >= 18362 OR WixBundleInstalled</bal:Condition>
|
||||
<bal:Condition Message="This application is only supported on Windows 10 version v2004 (build 19041) or higher.">DetectedWindowsBuildNumber >= 19041 OR WixBundleInstalled</bal:Condition>
|
||||
|
||||
<util:RegistrySearch Variable="DetectedVCRedistVersion" Root="HKLM" Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\$(var.PowerToysPlatform)" Value="Minor" Result="value" Format="raw" />
|
||||
|
||||
<Chain>
|
||||
<ExePackage
|
||||
Name="windowsdesktop-runtime-6.0.5-win-$(var.PowerToysPlatform).exe"
|
||||
Name="windowsdesktop-runtime-6.0.7-win-$(var.PowerToysPlatform).exe"
|
||||
Compressed="no"
|
||||
Id="DotnetRuntime6"
|
||||
DetectCondition="HasDotnet605"
|
||||
DetectCondition="HasDotnet607"
|
||||
DownloadUrl="$(var.Dotnet6DownloadUrl)"
|
||||
InstallCommand="/install /quiet /norestart"
|
||||
RepairCommand="/repair /passive /norestart"
|
||||
@@ -85,10 +85,10 @@
|
||||
UninstallCommand="/uninstall /quiet /norestart">
|
||||
<ExitCode Value="1638" Behavior="success"/>
|
||||
<RemotePayload
|
||||
Description="Microsoft Windows Desktop Runtime - 6.0.5 ($(var.PowerToysPlatform))"
|
||||
ProductName="Microsoft Windows Desktop Runtime - 6.0.5 ($(var.PowerToysPlatform))"
|
||||
Description="Microsoft Windows Desktop Runtime - 6.0.7 ($(var.PowerToysPlatform))"
|
||||
ProductName="Microsoft Windows Desktop Runtime - 6.0.7 ($(var.PowerToysPlatform))"
|
||||
Size="$(var.Dotnet6PayloadSize)"
|
||||
Version="6.0.5.31215"
|
||||
Version="6.0.7.31422"
|
||||
Hash="$(var.Dotnet6PayloadHash)" />
|
||||
</ExePackage>
|
||||
<ExePackage
|
||||
@@ -104,7 +104,7 @@
|
||||
UninstallCommand="/silent /uninstall">
|
||||
</ExePackage>
|
||||
<ExePackage
|
||||
Name="VCRedist-14.32.31326.exe"
|
||||
Name="VCRedist-14.32.31332.exe"
|
||||
DetectCondition="DetectedVCRedistVersion >= 32"
|
||||
Compressed="no"
|
||||
Id="VCRedist"
|
||||
@@ -112,11 +112,12 @@
|
||||
InstallCommand="/install /quiet /norestart"
|
||||
RepairCommand="/repair /quiet /norestart"
|
||||
Permanent="yes">
|
||||
<ExitCode Value="1638" Behavior="success"/>
|
||||
<RemotePayload
|
||||
Description="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31326"
|
||||
ProductName="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31326"
|
||||
Description="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31332"
|
||||
ProductName="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31332"
|
||||
Size="$(var.VCRedistPayloadSize)"
|
||||
Version="14.32.31326.0"
|
||||
Version="14.32.31332.0"
|
||||
Hash="$(var.VCRedistPayloadHash)" />
|
||||
</ExePackage>
|
||||
<MsiPackage
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
using a specific profile. If you're doing local installer builds, this will
|
||||
simulate the build pipeline doing that for you. -->
|
||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0
|
||||
SET PTRoot=..\..\..\..
|
||||
call "..\..\publish.cmd" x64
|
||||
)</PreBuildEvent>
|
||||
@@ -19,7 +19,7 @@ call "..\..\publish.cmd" x64
|
||||
<PropertyGroup Condition="'$(Platform)' != 'x64'">
|
||||
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\modules\FileExplorerPreview\monacoSRC</DefineConstants>
|
||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0
|
||||
SET PTRoot=..\..\..\..
|
||||
call "..\..\publish.cmd" arm64
|
||||
)</PreBuildEvent>
|
||||
@@ -48,7 +48,7 @@ call "..\..\publish.cmd" arm64
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- suppress warning 1108 regarding -sh being deprecated -->
|
||||
<!-- -sh suppresses file file information which was causing wix build to hang in CI -->
|
||||
<!-- -sh suppresses file information which was causing wix build to hang in CI -->
|
||||
<LinkerAdditionalOptions>-v -sh -sw1108</LinkerAdditionalOptions>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
-->
|
||||
<?define ShortcutGuideSvgsFiles=0.svg;1.svg;2.svg;3.svg;4.svg;5.svg;6.svg;7.svg;8.svg;9.svg;no_active_window.svg;overlay.svg;overlay_portrait.svg?>
|
||||
|
||||
<?define FancyZonesFiles=PowerToys.FancyZonesModuleInterface.dll;PowerToys.FancyZonesEditor.dll;PowerToys.FancyZonesEditor.runtimeconfig.json;PowerToys.FancyZonesEditor.deps.json;PowerToys.FancyZonesEditor.exe;PowerToys.FancyZones.exe;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.dll;ModernWpf.Controls.dll;System.Text.Json.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;PowerToys.Common.UI.dll;PowerToys.ManagedTelemetry.dll;System.IO.Abstractions.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;Ijwhost.dll?>
|
||||
<?define FancyZonesFiles=PowerToys.FancyZonesModuleInterface.dll;PowerToys.FancyZonesEditor.dll;PowerToys.FancyZonesEditor.runtimeconfig.json;PowerToys.FancyZonesEditor.deps.json;PowerToys.FancyZonesEditor.exe;PowerToys.FancyZones.exe;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.dll;ModernWpf.Controls.dll;System.Text.Json.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.Common.UI.dll;PowerToys.ManagedTelemetry.dll;System.IO.Abstractions.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;Ijwhost.dll?>
|
||||
|
||||
<?define ImageResizerFiles=PowerToys.ImageResizer.exe;PowerToys.ImageResizerExt.dll;PowerToys.ImageResizer.dll;PowerToys.ImageResizer.deps.json;PowerToys.ImageResizer.runtimeconfig.json;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Common.UI.dll;ControlzEx.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.Text.Json.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Interop.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;Ijwhost.dll ?>
|
||||
<?define ImageResizerFiles=ImageResizer.ico;PowerToys.ImageResizer.exe;PowerToys.ImageResizerExt.dll;PowerToys.ImageResizer.dll;PowerToys.ImageResizer.deps.json;PowerToys.ImageResizer.runtimeconfig.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Common.UI.dll;ControlzEx.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.Text.Json.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Interop.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;Ijwhost.dll;ImageResizerContextMenuPackage.msix;PowerToys.ImageResizerContextMenu.dll ?>
|
||||
|
||||
<?define PowerPreviewFiles=PowerToys.powerpreview.dll;PowerToys.PreviewHandlerCommon.dll;PowerToys.PreviewHandlerCommon.deps.json;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.SvgPreviewHandler.dll;PowerToys.SvgPreviewHandler.comhost.dll;PowerToys.SvgPreviewHandler.runtimeconfig.json;PowerToys.SvgPreviewHandler.deps.json;PowerToys.SvgThumbnailProvider.dll;PowerToys.SvgThumbnailProvider.comhost.dll;PowerToys.SvgThumbnailProvider.runtimeconfig.json;PowerToys.SvgThumbnailProvider.deps.json;PowerToys.MarkdownPreviewHandler.dll;PowerToys.MarkdownPreviewHandler.comhost.dll;PowerToys.MarkdownPreviewHandler.runtimeconfig.json;PowerToys.MarkdownPreviewHandler.deps.json;Markdig.Signed.dll;HtmlAgilityPack.dll;System.IO.Abstractions.dll;monaco_languages.json;monacoSpecialLanguages.js;PowerToys.Common.UI.dll;PowerToys.Settings.UI.Lib.dll;PowerToys.MonacoPreviewHandler.dll;PowerToys.MonacoPreviewHandler.comhost.dll;PowerToys.MonacoPreviewHandler.runtimeconfig.json;PowerToys.MonacoPreviewHandler.deps.json;ControlzEx.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Web.WebView2.WinForms.dll;Microsoft.Web.WebView2.Wpf.dll;WebView2Loader.dll;System.Runtime.WindowsRuntime.dll;index.html;PowerToys.PdfPreviewHandler.dll;PowerToys.PdfPreviewHandler.comhost.dll;PowerToys.PdfPreviewHandler.runtimeconfig.json;PowerToys.PdfPreviewHandler.deps.json;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.PdfThumbnailProvider.dll;PowerToys.PdfThumbnailProvider.comhost.dll;PowerToys.PdfThumbnailProvider.runtimeconfig.json;PowerToys.PdfThumbnailProvider.deps.json;PowerToys.GcodePreviewHandler.dll;PowerToys.GcodePreviewHandler.comhost.dll;PowerToys.GcodePreviewHandler.runtimeconfig.json;PowerToys.GcodePreviewHandler.deps.json;PowerToys.GcodeThumbnailProvider.dll;PowerToys.GcodeThumbnailProvider.comhost.dll;PowerToys.GcodeThumbnailProvider.runtimeconfig.json;PowerToys.GcodeThumbnailProvider.deps.json;PowerToys.StlThumbnailProvider.dll;PowerToys.StlThumbnailProvider.comhost.dll;PowerToys.StlThumbnailProvider.runtimeconfig.json;PowerToys.StlThumbnailProvider.deps.json;HelixToolkit.dll;HelixToolkit.Core.Wpf.dll;Ijwhost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll?>
|
||||
<?define PowerPreviewFiles=PowerToys.powerpreview.dll;PowerToys.PreviewHandlerCommon.dll;PowerToys.PreviewHandlerCommon.deps.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.SvgPreviewHandler.dll;PowerToys.SvgPreviewHandler.comhost.dll;PowerToys.SvgPreviewHandler.runtimeconfig.json;PowerToys.SvgPreviewHandler.deps.json;PowerToys.SvgThumbnailProvider.dll;PowerToys.SvgThumbnailProvider.comhost.dll;PowerToys.SvgThumbnailProvider.runtimeconfig.json;PowerToys.SvgThumbnailProvider.deps.json;PowerToys.MarkdownPreviewHandler.dll;PowerToys.MarkdownPreviewHandler.comhost.dll;PowerToys.MarkdownPreviewHandler.runtimeconfig.json;PowerToys.MarkdownPreviewHandler.deps.json;Markdig.Signed.dll;HtmlAgilityPack.dll;System.IO.Abstractions.dll;monaco_languages.json;monacoSpecialLanguages.js;PowerToys.Common.UI.dll;PowerToys.Settings.UI.Lib.dll;PowerToys.MonacoPreviewHandler.dll;PowerToys.MonacoPreviewHandler.comhost.dll;PowerToys.MonacoPreviewHandler.runtimeconfig.json;PowerToys.MonacoPreviewHandler.deps.json;ControlzEx.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Web.WebView2.WinForms.dll;Microsoft.Web.WebView2.Wpf.dll;WebView2Loader.dll;System.Runtime.WindowsRuntime.dll;index.html;PowerToys.PdfPreviewHandler.dll;PowerToys.PdfPreviewHandler.comhost.dll;PowerToys.PdfPreviewHandler.runtimeconfig.json;PowerToys.PdfPreviewHandler.deps.json;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.PdfThumbnailProvider.dll;PowerToys.PdfThumbnailProvider.comhost.dll;PowerToys.PdfThumbnailProvider.runtimeconfig.json;PowerToys.PdfThumbnailProvider.deps.json;PowerToys.GcodePreviewHandler.dll;PowerToys.GcodePreviewHandler.comhost.dll;PowerToys.GcodePreviewHandler.runtimeconfig.json;PowerToys.GcodePreviewHandler.deps.json;PowerToys.GcodeThumbnailProvider.dll;PowerToys.GcodeThumbnailProvider.comhost.dll;PowerToys.GcodeThumbnailProvider.runtimeconfig.json;PowerToys.GcodeThumbnailProvider.deps.json;PowerToys.StlThumbnailProvider.dll;PowerToys.StlThumbnailProvider.comhost.dll;PowerToys.StlThumbnailProvider.runtimeconfig.json;PowerToys.StlThumbnailProvider.deps.json;HelixToolkit.dll;HelixToolkit.Core.Wpf.dll;Ijwhost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll?>
|
||||
|
||||
<?define SettingsV2Files=Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.IO.Abstractions.dll;System.Text.Json.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;Microsoft.WindowsAppRuntime.Bootstrap.dll;CoreMessagingXP.dll;dcompi.dll;dwmcorei.dll;DwmSceneI.dll;DWriteCore.dll;marshal.dll;Microsoft.DirectManipulation.dll;Microsoft.InputStateManager.dll;Microsoft.Internal.FrameworkUdk.dll;Microsoft.UI.Composition.OSSupport.dll;Microsoft.UI.Input.dll;Microsoft.UI.Windowing.Core.dll;Microsoft.UI.Xaml.Controls.dll;Microsoft.UI.Xaml.Controls.pri;Microsoft.ui.xaml.dll;Microsoft.UI.Xaml.Internal.dll;Microsoft.UI.Xaml.Phone.dll;Microsoft.ui.xaml.resources.19h1.dll;Microsoft.ui.xaml.resources.common.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Windows.ApplicationModel.Resources.dll;Microsoft.Windows.AppNotifications.Projection.dll;Microsoft.Windows.PushNotifications.Projection.dll;Microsoft.Windows.System.Projection.dll;Microsoft.WindowsAppRuntime.dll;Microsoft.WindowsAppRuntime.Insights.Resource.dll;Microsoft.WindowsAppRuntime.Release.Net.dll;MRM.dll;PushNotificationsLongRunningTask.ProxyStub.dll;WindowsAppRuntime.png;WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll;WinUIEdit.dll;wuceffectsi.dll?>
|
||||
<?define SettingsV2Files=Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.IO.Abstractions.dll;System.Text.Json.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;Microsoft.WindowsAppRuntime.Bootstrap.dll;CoreMessagingXP.dll;dcompi.dll;dwmcorei.dll;DwmSceneI.dll;DWriteCore.dll;marshal.dll;Microsoft.DirectManipulation.dll;Microsoft.InputStateManager.dll;Microsoft.Internal.FrameworkUdk.dll;Microsoft.UI.Composition.OSSupport.dll;Microsoft.UI.Input.dll;Microsoft.UI.Windowing.Core.dll;Microsoft.UI.Xaml.Controls.dll;Microsoft.UI.Xaml.Controls.pri;Microsoft.ui.xaml.dll;Microsoft.UI.Xaml.Internal.dll;Microsoft.UI.Xaml.Phone.dll;Microsoft.ui.xaml.resources.19h1.dll;Microsoft.ui.xaml.resources.common.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Windows.ApplicationModel.Resources.dll;Microsoft.Windows.AppNotifications.Projection.dll;Microsoft.Windows.PushNotifications.Projection.dll;Microsoft.Windows.System.Projection.dll;Microsoft.WindowsAppRuntime.dll;Microsoft.WindowsAppRuntime.Insights.Resource.dll;Microsoft.WindowsAppRuntime.Release.Net.dll;MRM.dll;PushNotificationsLongRunningTask.ProxyStub.dll;WindowsAppRuntime.png;WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll;WinUIEdit.dll;wuceffectsi.dll?>
|
||||
|
||||
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ShortcutGuide.png;VideoConference.png?>
|
||||
|
||||
@@ -108,7 +108,11 @@
|
||||
|
||||
<?define WinTermCmpFiles=plugin.json;Microsoft.PowerToys.Run.Plugin.WindowsTerminal.deps.json;Microsoft.PowerToys.Run.Plugin.WindowsTerminal.dll;PowerToys.ManagedTelemetry.dll?>
|
||||
|
||||
<?define PowerRenameFiles=PowerRenameUI.ico;Microsoft.WindowsAppRuntime.Bootstrap.dll;PowerToys.PowerRename.exe;resources.pri;PowerToys.PowerRenameExt.dll;CoreMessagingXP.dll;dcompi.dll;dwmcorei.dll;DwmSceneI.dll;DWriteCore.dll;marshal.dll;Microsoft.DirectManipulation.dll;Microsoft.InputStateManager.dll;Microsoft.Internal.FrameworkUdk.dll;Microsoft.UI.Composition.OSSupport.dll;Microsoft.UI.Input.dll;Microsoft.UI.Windowing.Core.dll;Microsoft.UI.Xaml.Controls.dll;Microsoft.UI.Xaml.Controls.pri;Microsoft.ui.xaml.dll;Microsoft.UI.Xaml.Internal.dll;Microsoft.UI.Xaml.Phone.dll;Microsoft.ui.xaml.resources.19h1.dll;Microsoft.ui.xaml.resources.common.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Windows.ApplicationModel.Resources.dll;Microsoft.WindowsAppRuntime.dll;Microsoft.WindowsAppRuntime.Insights.Resource.dll;Microsoft.WindowsAppRuntime.Release.Net.dll;MRM.dll;PushNotificationsLongRunningTask.ProxyStub.dll;WindowsAppRuntime.png;WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll;WinUIEdit.dll;wuceffectsi.dll?>
|
||||
<?define PowerRenameFiles=PowerRenameUI.ico;Microsoft.WindowsAppRuntime.Bootstrap.dll;PowerToys.PowerRename.exe;resources.pri;PowerToys.PowerRenameExt.dll;CoreMessagingXP.dll;dcompi.dll;dwmcorei.dll;DwmSceneI.dll;DWriteCore.dll;marshal.dll;Microsoft.DirectManipulation.dll;Microsoft.InputStateManager.dll;Microsoft.Internal.FrameworkUdk.dll;Microsoft.UI.Composition.OSSupport.dll;Microsoft.UI.Input.dll;Microsoft.UI.Windowing.Core.dll;Microsoft.UI.Xaml.Controls.dll;Microsoft.UI.Xaml.Controls.pri;Microsoft.ui.xaml.dll;Microsoft.UI.Xaml.Internal.dll;Microsoft.UI.Xaml.Phone.dll;Microsoft.ui.xaml.resources.19h1.dll;Microsoft.ui.xaml.resources.common.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Windows.ApplicationModel.Resources.dll;Microsoft.WindowsAppRuntime.dll;Microsoft.WindowsAppRuntime.Insights.Resource.dll;Microsoft.WindowsAppRuntime.Release.Net.dll;MRM.dll;PushNotificationsLongRunningTask.ProxyStub.dll;WindowsAppRuntime.png;WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll;WinUIEdit.dll;wuceffectsi.dll;PowerRenameContextMenuPackage.msix;PowerToys.PowerRenameContextMenu.dll?>
|
||||
|
||||
<?define PowerRenameSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?>
|
||||
|
||||
<?define ImageResizerSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?>
|
||||
|
||||
<?define PowerRenameMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
|
||||
|
||||
@@ -136,8 +140,8 @@
|
||||
<Property Id="WINDOWSBUILDNUMBER" Secure="yes">
|
||||
<RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
|
||||
</Property>
|
||||
<Condition Message="This application is only supported on Windows 10 version 1903 (build 18362) or higher.">
|
||||
<![CDATA[(WINDOWSBUILDNUMBER >= 18362)]]>
|
||||
<Condition Message="This application is only supported on Windows 10 version v2004 (build 19041) or higher.">
|
||||
<![CDATA[(WINDOWSBUILDNUMBER >= 19041)]]>
|
||||
</Condition>
|
||||
|
||||
<Icon Id="powertoys.exe" SourceFile="$(var.BinDir)svgs\icon.ico"/>
|
||||
@@ -226,6 +230,9 @@
|
||||
<Custom Action="UnApplyModulesRegistryChangeSets" Before="RemoveFiles">
|
||||
Installed AND (REMOVE="ALL")
|
||||
</Custom>
|
||||
<Custom Action="UnRegisterContextMenuPackages" Before="RemoveFiles">
|
||||
Installed AND (REMOVE="ALL")
|
||||
</Custom>
|
||||
|
||||
<!-- TODO: Use to activate embedded MSIX -->
|
||||
<!--<Custom Action="UninstallEmbeddedMSIXTask" After="InstallFinalize">
|
||||
@@ -374,6 +381,14 @@
|
||||
DllEntry="UnApplyModulesRegistryChangeSetsCA"
|
||||
/>
|
||||
|
||||
<CustomAction Id="UnRegisterContextMenuPackages"
|
||||
Return="ignore"
|
||||
Impersonate="yes"
|
||||
Execute="deferred"
|
||||
BinaryKey="PTCustomActions"
|
||||
DllEntry="UnRegisterContextMenuPackagesCA"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Close 'PowerToys.exe' before uninstall-->
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown" />
|
||||
@@ -391,7 +406,9 @@
|
||||
<Directory Id="INSTALLFOLDER" Name="PowerToys">
|
||||
<Directory Id="ToolsFolder" Name="Tools"/>
|
||||
<Directory Id="ModulesInstallFolder" Name="modules">
|
||||
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)" />
|
||||
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)">
|
||||
<Directory Id="ImageResizerAssetsFolder" Name="Assets" />
|
||||
</Directory>
|
||||
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)">
|
||||
<Directory Id="PowerRenameAssetsFolder" Name="Assets" />
|
||||
<Directory Id="PowerRenameMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
|
||||
@@ -582,6 +599,7 @@
|
||||
|
||||
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||
<Component Id="PowerToysStartMenuShortcut" >
|
||||
<Condition>NOT PREVIOUSVERSIONSINSTALLED</Condition>
|
||||
<Shortcut Id="ApplicationStartMenuShortcut"
|
||||
Name="PowerToys (Preview)"
|
||||
Description="PowerToys - Windows system utilities to maximize productivity"
|
||||
@@ -720,6 +738,15 @@
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="ImageResizerAssetsFolder" FileSource="$(var.BinDir)modules\$(var.ImageResizerProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="ImageResizer_ImageResizerSparsePackageAssets" Guid="CC1B81A0-7971-4FAA-A3E6-4CE4DD0EC7C1" Win64="yes">
|
||||
<?foreach File in $(var.ImageResizerSparsePackageAssets)?>
|
||||
<File Id="ImageResizerSparsePackageAssets_$(var.File)" Source="$(var.BinDir)modules\$(var.ImageResizerProjectName)\Assets\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- PowerRename -->
|
||||
<DirectoryRef Id="PowerRenameInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)">
|
||||
<?foreach File in $(var.PowerRenameFiles)?>
|
||||
@@ -755,6 +782,12 @@
|
||||
<File Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Assets\file.png" />
|
||||
<File Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Assets\folder.png" />
|
||||
</Component>
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="PowerRename_PowerRenameSparsePackageAssets" Guid="A32B528D-2771-4853-9775-1791D39DF30E" Win64="yes">
|
||||
<?foreach File in $(var.PowerRenameSparsePackageAssets)?>
|
||||
<File Id="PowerRenameSparsePackageAssets_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Assets\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<!-- MouseUtils -->
|
||||
<DirectoryRef Id="MouseUtilsInstallFolder" FileSource="$(var.BinDir)modules\$(var.MouseUtilsProjectName)">
|
||||
@@ -779,7 +812,7 @@
|
||||
<DirectoryRef Id="VideoConferenceInstallFolder" FileSource="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_VideoConference" Guid="21DA4677-4AE8-4F01-BFC9-448E338DF864" Win64="yes">
|
||||
<Condition>WINDOWSBUILDNUMBER >= 18362</Condition>
|
||||
<Condition>WINDOWSBUILDNUMBER >= 19041</Condition>
|
||||
<File Source="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\PowerToys.VideoConferenceModule.dll" />
|
||||
<File Source="$(var.BinX32Dir)modules\$(var.VideoConferenceProjectName)\PowerToys.VideoConferenceProxyFilter_x86.dll" />
|
||||
<?if $(var.Platform) = x64?>
|
||||
@@ -793,7 +826,7 @@
|
||||
<DirectoryRef Id="VideoConferenceIconsFolder" FileSource="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\Icons">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_VideoConferenceIcons" Guid="9910F3D9-1BDF-43DB-BA0C-C558B121DF18" Win64="yes">
|
||||
<Condition>WINDOWSBUILDNUMBER >= 18362</Condition>
|
||||
<Condition>WINDOWSBUILDNUMBER >= 19041</Condition>
|
||||
<File Source="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\Icons\Off-NotInUse Dark.png" />
|
||||
<File Source="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\Icons\Off-NotInUse Light.png" />
|
||||
<File Source="$(var.BinDir)modules\$(var.VideoConferenceProjectName)\Icons\Off-Off Dark.png" />
|
||||
@@ -840,7 +873,7 @@
|
||||
<DirectoryRef Id="ColorPickerInstallFolder" FileSource="$(var.BinDir)modules\$(var.ColorPickerProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_ColorPicker" Guid="C15076EC-70EE-4CE9-BEA0-665B1EECCAAF" Win64="yes">
|
||||
<?foreach File in PowerToys.ColorPicker.dll;System.IO.Abstractions.dll;PowerToys.ColorPickerUI.exe;PowerToys.ColorPickerUI.dll;PowerToys.ColorPickerUI.deps.json;PowerToys.ColorPickerUI.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;PowerToys.Interop.dll;PowerToys.ManagedTelemetry.dll;PowerToys.ManagedCommon.dll;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.ComponentModel.Composition.dll;PowerToys.Common.UI.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Text.Json.dll;Ijwhost.dll?>
|
||||
<?foreach File in PowerToys.ColorPicker.dll;System.IO.Abstractions.dll;PowerToys.ColorPickerUI.exe;PowerToys.ColorPickerUI.dll;PowerToys.ColorPickerUI.deps.json;PowerToys.ColorPickerUI.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;PowerToys.Interop.dll;PowerToys.ManagedTelemetry.dll;PowerToys.ManagedCommon.dll;System.Management.dll;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.ComponentModel.Composition.dll;PowerToys.Common.UI.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Text.Json.dll;Ijwhost.dll?>
|
||||
<File Id="ColorPickerFile_$(var.File)" Source="$(var.BinDir)modules\$(var.ColorPickerProjectName)\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
@@ -860,7 +893,7 @@
|
||||
<DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinDir)modules\$(var.AwakeProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_Awake" Guid="0D571D9A-743B-4CC5-9297-F0289FBE3398" Win64="yes">
|
||||
<?foreach File in PowerToys.AwakeModuleInterface.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;NLog.config;NLog.dll;PowerToys.Awake.deps.json;PowerToys.Awake.dll;PowerToys.Awake.exe;PowerToys.Awake.runtimeconfig.json;PowerToys.Interop.dll;System.CommandLine.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Text.Json.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll?>
|
||||
<?foreach File in PowerToys.AwakeModuleInterface.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;NLog.config;NLog.dll;PowerToys.Awake.deps.json;PowerToys.Awake.dll;PowerToys.Awake.exe;PowerToys.Awake.runtimeconfig.json;PowerToys.Interop.dll;System.CommandLine.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Text.Json.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll?>
|
||||
<File Id="AwakeFile_$(var.File)" Source="$(var.BinDir)modules\$(var.AwakeProjectName)\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
@@ -1011,9 +1044,11 @@
|
||||
<ComponentRef Id="PowerRenameMicrosoftUIXamlAssets_$(var.File)" />
|
||||
<?endforeach?>
|
||||
<ComponentRef Id="Module_PowerRename_Assets" />
|
||||
<ComponentRef Id="PowerRename_PowerRenameSparsePackageAssets" />
|
||||
<?foreach File in $(var.ImageResizerFiles)?>
|
||||
<ComponentRef Id="Module_ImageResizer_$(var.File)" />
|
||||
<?endforeach?>
|
||||
<ComponentRef Id="ImageResizer_ImageResizerSparsePackageAssets" />
|
||||
<ComponentRef Id="Module_ImageResizer_Registry" />
|
||||
<?foreach File in $(var.PowerPreviewFiles)?>
|
||||
<ComponentRef Id="Module_PowerPreview_$(var.File)" />
|
||||
@@ -1697,7 +1732,7 @@
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="launcherInstallComponent" Guid="ab0d0567-1e41-4da4-9934-dcb74b7048a4" Directory="LauncherInstallFolder" >
|
||||
<File Source="$(var.BinDir)modules\Launcher\PowerToys.Launcher.dll" />
|
||||
<?foreach File in e_sqlite3.dll;JetBrains.Annotations.dll;Mages.Core.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;NLog.dll;NLog.Extensions.Logging.dll;PowerToys.PowerLauncher.deps.json;PowerToys.PowerLauncher.dll;PowerToys.PowerLauncher.exe;Microsoft.Xaml.Behaviors.dll;PowerToys.PowerLauncher.runtimeconfig.json;System.Data.OleDb.dll;UnitsNet.dll;vcamp140_app.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToys.Interop.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerLauncher.Telemetry.dll;Microsoft.Data.Sqlite.dll;SQLitePCLRaw.batteries_v2.dll;SQLitePCLRaw.core.dll;SQLitePCLRaw.provider.e_sqlite3.dll;Microsoft.Extensions.Configuration.Abstractions.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;PowerToys.ManagedCommon.dll;System.IO.Abstractions.dll;PowerToys.Common.UI.dll;System.ServiceProcess.ServiceController.dll;Microsoft.Toolkit.Uwp.Notifications.dll;ModernWpf.Controls.dll;ModernWpf.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Reactive.dll;System.Text.Json.dll;Ijwhost.dll;ScipBe.Common.Office.OneNote.dll;Interop.Microsoft.Office.Interop.OneNote.dll?>
|
||||
<?foreach File in e_sqlite3.dll;JetBrains.Annotations.dll;Mages.Core.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;NLog.dll;NLog.Extensions.Logging.dll;PowerToys.PowerLauncher.deps.json;PowerToys.PowerLauncher.dll;PowerToys.PowerLauncher.exe;Microsoft.Xaml.Behaviors.dll;PowerToys.PowerLauncher.runtimeconfig.json;System.Data.OleDb.dll;UnitsNet.dll;vcamp140_app.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToys.Interop.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerLauncher.Telemetry.dll;Microsoft.Data.Sqlite.dll;SQLitePCLRaw.batteries_v2.dll;SQLitePCLRaw.core.dll;SQLitePCLRaw.provider.e_sqlite3.dll;Microsoft.Extensions.Configuration.Abstractions.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;PowerToys.ManagedCommon.dll;System.Management.dll;System.IO.Abstractions.dll;PowerToys.Common.UI.dll;System.ServiceProcess.ServiceController.dll;Microsoft.Toolkit.Uwp.Notifications.dll;ModernWpf.Controls.dll;ModernWpf.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Reactive.dll;System.Text.Json.dll;Ijwhost.dll;ScipBe.Common.Office.OneNote.dll;Interop.Microsoft.Office.Interop.OneNote.dll;LazyCache.dll;Microsoft.Extensions.Caching.Abstractions.dll;Microsoft.Extensions.Caching.Memory.dll?>
|
||||
<File Id="File_$(var.File)" Source="$(var.BinDir)modules\launcher\$(var.File)" />
|
||||
<?endforeach?>
|
||||
<File Source="$(var.BinDir)Settings\PowerToys.Settings.UI.Lib.dll" />
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "../../src/common/updating/installer.h"
|
||||
#include "../../src/common/version/version.h"
|
||||
|
||||
#include <winrt/Windows.ApplicationModel.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Management.Deployment.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
HINSTANCE DLL_HANDLE = nullptr;
|
||||
@@ -912,7 +916,7 @@ LExit:
|
||||
if (!SUCCEEDED(hr))
|
||||
{
|
||||
PMSIHANDLE hRecord = MsiCreateRecord(0);
|
||||
MsiRecordSetString(hRecord, 0, TEXT("Filed to iminstall virtual camera driver"));
|
||||
MsiRecordSetString(hRecord, 0, TEXT("Failed to uninstall virtual camera driver"));
|
||||
MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_WARNING + MB_OK), hRecord);
|
||||
}
|
||||
|
||||
@@ -920,6 +924,78 @@ LExit:
|
||||
return WcaFinalize(er);
|
||||
}
|
||||
|
||||
UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
|
||||
{
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Windows::Management::Deployment;
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
UINT er = ERROR_SUCCESS;
|
||||
|
||||
hr = WcaInitialize(hInstall, "UnRegisterContextMenuPackagesCA"); // original func name is too long
|
||||
|
||||
try
|
||||
{
|
||||
// Packages to unregister
|
||||
const std::vector<std::wstring> packagesToRemoveDisplayName{ { L"PowerRenameContextMenu" }, { L"ImageResizerContextMenu" } };
|
||||
|
||||
PackageManager packageManager;
|
||||
|
||||
for (auto const& package : packageManager.FindPackages())
|
||||
{
|
||||
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
||||
|
||||
for (const auto& packageToRemove : packagesToRemoveDisplayName)
|
||||
{
|
||||
if (packageFullName.contains(packageToRemove))
|
||||
{
|
||||
auto deploymentOperation{ packageManager.RemovePackageAsync(packageFullName) };
|
||||
deploymentOperation.get();
|
||||
|
||||
// Check the status of the operation
|
||||
if (deploymentOperation.Status() == AsyncStatus::Error)
|
||||
{
|
||||
auto deploymentResult{ deploymentOperation.GetResults() };
|
||||
auto errorCode = deploymentOperation.ErrorCode();
|
||||
auto errorText = deploymentResult.ErrorText();
|
||||
|
||||
Logger::error(L"Unregister {} package failed. ErrorCode: {}, ErrorText: {}", packageFullName, std::to_wstring(errorCode), errorText);
|
||||
|
||||
er = ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
|
||||
{
|
||||
Logger::error(L"Unregister {} package canceled.", packageFullName);
|
||||
|
||||
er = ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
else if (deploymentOperation.Status() == AsyncStatus::Completed)
|
||||
{
|
||||
Logger::info(L"Unregister {} package completed.", packageFullName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::debug(L"Unregister {} package started.", packageFullName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::exception e)
|
||||
{
|
||||
std::string errorMessage{ "Exception thrown while trying to unregister sparse packages: " };
|
||||
errorMessage += e.what();
|
||||
Logger::error(errorMessage);
|
||||
|
||||
er = ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
|
||||
er = er == ERROR_SUCCESS ? (SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE) : er;
|
||||
return WcaFinalize(er);
|
||||
}
|
||||
|
||||
|
||||
UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
@@ -14,10 +14,10 @@ EXPORTS
|
||||
TelemetryLogRepairCancelCA
|
||||
TelemetryLogRepairFailCA
|
||||
TerminateProcessesCA
|
||||
TerminateProcessesCA
|
||||
CertifyVirtualCameraDriverCA
|
||||
InstallVirtualCameraDriverCA
|
||||
InstallEmbeddedMSIXCA
|
||||
UnApplyModulesRegistryChangeSetsCA
|
||||
UninstallVirtualCameraDriverCA
|
||||
UnRegisterContextMenuPackagesCA
|
||||
UninstallEmbeddedMSIXCA
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\wix.props"
|
||||
Condition="Exists('..\wix.props')" />
|
||||
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{32f3882b-f2d6-4586-b5ed-11e39e522bd3}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>PowerToysSetupCustomActions</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>PowerToysSetupCustomActions</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
@@ -43,7 +43,6 @@
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\src\common\Telemetry;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>inc;..\..\src\;..\..\src\common\Telemetry;telemetry;$(WixSdkPath)VS2017\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -56,7 +55,6 @@
|
||||
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@@ -65,7 +63,6 @@
|
||||
<AdditionalLibraryDirectories>$(WixSdkPath)VS2017\lib\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -127,5 +124,14 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\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.220418.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.220418.1" targetFramework="native" />
|
||||
</packages>
|
||||
@@ -7,4 +7,92 @@ dotnet_diagnostic.SA1201.severity = none
|
||||
dotnet_diagnostic.CA1303.severity = suggestion
|
||||
|
||||
# CA1051: Do not declare visible instance fields
|
||||
dotnet_code_quality.ca1051.exclude_structs = true
|
||||
dotnet_code_quality.ca1051.exclude_structs = true
|
||||
csharp_using_directive_placement = inside_namespace:warning
|
||||
csharp_prefer_simple_using_statement = true:suggestion
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_namespace_declarations = block_scoped:silent
|
||||
csharp_style_prefer_method_group_conversion = true:silent
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
csharp_style_expression_bodied_lambdas = true:silent
|
||||
csharp_style_expression_bodied_local_functions = false:silent
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
||||
[*.{cs,vb}]
|
||||
#### Naming styles ####
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_object_initializer = false:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||
dotnet_style_namespace_match_folder = true:suggestion
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
tab_width = 4
|
||||
indent_size = 4
|
||||
end_of_line = crlf
|
||||
|
||||
# IDE0065: using directive placement
|
||||
dotnet_diagnostic.IDE0065.severity = none
|
||||
|
||||
# IDE0009: Add this or Me qualification
|
||||
dotnet_diagnostic.IDE0009.severity = none
|
||||
|
||||
@@ -54,4 +54,4 @@ using System.Diagnostics.CodeAnalysis;
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1812: Avoid uninstantiated internal classes", Scope = "module", Justification = "CA1812 will be thrown for every file in the test project. This is mentioned here: dotnet/roslyn-analyzers#1830")]
|
||||
|
||||
// Code quality
|
||||
[assembly: SuppressMessage("CodeQuality", "IDE0076:Invalid global 'SuppressMessageAttribute'", Justification = "Affect predefined supressions.")]
|
||||
[assembly: SuppressMessage("CodeQuality", "IDE0076:Invalid global 'SuppressMessageAttribute'", Justification = "Affect predefined suppressions.")]
|
||||
|
||||
@@ -12,33 +12,6 @@
|
||||
<PackageReference Include="ControlzEx" Version="5.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.1.118</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ManagedCommon\ManagedCommon.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -13,30 +13,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="System.Management" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.1.118</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -14,4 +14,10 @@ namespace ManagedCommon
|
||||
HighContrastBlack,
|
||||
HighContrastWhite,
|
||||
}
|
||||
|
||||
public enum AppTheme
|
||||
{
|
||||
Dark = 0,
|
||||
Light = 1,
|
||||
}
|
||||
}
|
||||
|
||||
37
src/common/ManagedCommon/ThemeHelpers.cs
Normal file
37
src/common/ManagedCommon/ThemeHelpers.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ManagedCommon
|
||||
{
|
||||
// Based on https://stackoverflow.com/a/62811758/5001796
|
||||
public static class ThemeHelpers
|
||||
{
|
||||
[DllImport("dwmapi.dll")]
|
||||
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int attrValue, int attrSize);
|
||||
|
||||
internal const string HKeyRoot = "HKEY_CURRENT_USER";
|
||||
internal const string HkeyWindowsTheme = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Themes";
|
||||
internal const string HkeyWindowsPersonalizeTheme = $@"{HkeyWindowsTheme}\Personalize";
|
||||
internal const string HValueAppTheme = "AppsUseLightTheme";
|
||||
internal const int DWMWAImmersiveDarkMode = 20;
|
||||
|
||||
// based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application
|
||||
public static AppTheme GetAppTheme()
|
||||
{
|
||||
int value = (int)Registry.GetValue($"{HKeyRoot}\\{HkeyWindowsPersonalizeTheme}", HValueAppTheme, 1);
|
||||
return (AppTheme)value;
|
||||
}
|
||||
|
||||
public static void SetImmersiveDarkMode(IntPtr window, bool enabled)
|
||||
{
|
||||
int useImmersiveDarkMode = enabled ? 1 : 0;
|
||||
_ = DwmSetWindowAttribute(window, DWMWAImmersiveDarkMode, ref useImmersiveDarkMode, sizeof(int));
|
||||
}
|
||||
}
|
||||
}
|
||||
62
src/common/ManagedCommon/ThemeListener.cs
Normal file
62
src/common/ManagedCommon/ThemeListener.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Management;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace ManagedCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The Delegate for a ThemeChanged Event.
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender ThemeListener</param>
|
||||
public delegate void ThemeChangedEvent(ThemeListener sender);
|
||||
|
||||
public class ThemeListener : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the App Theme.
|
||||
/// </summary>
|
||||
public AppTheme AppTheme { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// An event that fires if the Theme changes.
|
||||
/// </summary>
|
||||
public event ThemeChangedEvent ThemeChanged;
|
||||
|
||||
private readonly ManagementEventWatcher watcher;
|
||||
|
||||
public ThemeListener()
|
||||
{
|
||||
var currentUser = WindowsIdentity.GetCurrent();
|
||||
var query = new WqlEventQuery(
|
||||
$"SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND " +
|
||||
$"KeyPath='{currentUser.User.Value}\\\\{ThemeHelpers.HkeyWindowsPersonalizeTheme.Replace("\\", "\\\\")}' AND ValueName='{ThemeHelpers.HValueAppTheme}'");
|
||||
watcher = new ManagementEventWatcher(query);
|
||||
watcher.EventArrived += Watcher_EventArrived;
|
||||
watcher.Start();
|
||||
|
||||
AppTheme = ThemeHelpers.GetAppTheme();
|
||||
}
|
||||
|
||||
private void Watcher_EventArrived(object sender, EventArrivedEventArgs e)
|
||||
{
|
||||
var appTheme = ThemeHelpers.GetAppTheme();
|
||||
|
||||
if (appTheme != AppTheme)
|
||||
{
|
||||
AppTheme = appTheme;
|
||||
|
||||
ThemeChanged?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
watcher.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,28 +14,4 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Telemetry\TelemetryBase.cs" Link="TelemetryBase.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.1.118</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -217,7 +217,8 @@ namespace PowerToysSettings
|
||||
}
|
||||
std::array<BYTE, 256> key_states{}; // Zero-initialize
|
||||
std::array<wchar_t, 256> output;
|
||||
auto output_bytes = ToUnicodeEx(key_code, scan_code, key_states.data(), output.data(), (int)output.size() - 1, 0, layout);
|
||||
const UINT wFlags = 1 << 2; // If bit 2 is set, keyboard state is not changed (Windows 10, version 1607 and newer)
|
||||
auto output_bytes = ToUnicodeEx(key_code, scan_code, key_states.data(), output.data(), (int)output.size() - 1, wFlags, layout);
|
||||
if (output_bytes <= 0)
|
||||
{
|
||||
// If ToUnicodeEx fails (e.g. for F1-F12 keys) use GetKeyNameTextW
|
||||
|
||||
@@ -31,10 +31,14 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="icon_helpers.h" />
|
||||
<ClInclude Include="theme_listener.h" />
|
||||
<ClInclude Include="theme_helpers.h" />
|
||||
<ClInclude Include="windows_colors.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="icon_helpers.cpp" />
|
||||
<ClCompile Include="theme_listener.cpp" />
|
||||
<ClCompile Include="theme_helpers.cpp" />
|
||||
<ClCompile Include="windows_colors.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
43
src/common/Themes/theme_helpers.cpp
Normal file
43
src/common/Themes/theme_helpers.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// Port Based on https://stackoverflow.com/a/62811758/5001796
|
||||
#include "theme_helpers.h"
|
||||
#include "dwmapi.h"
|
||||
#include <windows.h>
|
||||
#include <vector>
|
||||
|
||||
#define DWMWA_USE_IMMERSIVE_DARK_MODE 20
|
||||
#define HKEY_WINDOWS_THEME L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"
|
||||
|
||||
// based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application
|
||||
AppTheme ThemeHelpers::GetAppTheme()
|
||||
{
|
||||
// The value is expected to be a REG_DWORD, which is a signed 32-bit little-endian
|
||||
auto buffer = std::vector<char>(4);
|
||||
auto cbData = static_cast<DWORD>(buffer.size() * sizeof(char));
|
||||
auto res = RegGetValueW(
|
||||
HKEY_CURRENT_USER,
|
||||
HKEY_WINDOWS_THEME,
|
||||
L"AppsUseLightTheme",
|
||||
RRF_RT_REG_DWORD, // expected value type
|
||||
nullptr,
|
||||
buffer.data(),
|
||||
&cbData);
|
||||
|
||||
if (res != ERROR_SUCCESS)
|
||||
{
|
||||
return AppTheme::Light;
|
||||
}
|
||||
|
||||
// convert bytes written to our buffer to an int, assuming little-endian
|
||||
auto i = int(buffer[3] << 24 |
|
||||
buffer[2] << 16 |
|
||||
buffer[1] << 8 |
|
||||
buffer[0]);
|
||||
|
||||
return AppTheme(i);
|
||||
}
|
||||
|
||||
void ThemeHelpers::SetImmersiveDarkMode(HWND window, bool enabled)
|
||||
{
|
||||
int useImmersiveDarkMode = enabled ? 1 : 0;
|
||||
DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, &useImmersiveDarkMode, sizeof(useImmersiveDarkMode));
|
||||
}
|
||||
14
src/common/Themes/theme_helpers.h
Normal file
14
src/common/Themes/theme_helpers.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
enum class AppTheme
|
||||
{
|
||||
Dark = 0,
|
||||
Light = 1
|
||||
};
|
||||
|
||||
struct ThemeHelpers
|
||||
{
|
||||
static AppTheme GetAppTheme();
|
||||
static void ThemeHelpers::SetImmersiveDarkMode(HWND window, bool enabled);
|
||||
};
|
||||
57
src/common/Themes/theme_listener.cpp
Normal file
57
src/common/Themes/theme_listener.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
#include "theme_listener.h"
|
||||
|
||||
#define HKEY_WINDOWS_THEME L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"
|
||||
|
||||
DWORD WINAPI _checkTheme(LPVOID lpParam)
|
||||
{
|
||||
auto listener = (ThemeListener*)lpParam;
|
||||
listener->CheckTheme();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ThemeListener::AddChangedHandler(THEME_HANDLE handle)
|
||||
{
|
||||
handles.push_back(handle);
|
||||
}
|
||||
|
||||
void ThemeListener::DelChangedHandler(THEME_HANDLE handle)
|
||||
{
|
||||
auto it = std::find(handles.begin(), handles.end(), handle);
|
||||
handles.erase(it);
|
||||
}
|
||||
|
||||
void ThemeListener::CheckTheme()
|
||||
{
|
||||
HANDLE hEvent;
|
||||
HKEY hKey;
|
||||
|
||||
// Open the Key to listen
|
||||
RegOpenKeyEx(HKEY_CURRENT_USER, HKEY_WINDOWS_THEME, 0, KEY_NOTIFY, &hKey);
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Create an event.
|
||||
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
if (hEvent != 0)
|
||||
{
|
||||
// Watch the registry key for a change of value.
|
||||
RegNotifyChangeKeyValue(hKey,
|
||||
TRUE,
|
||||
REG_NOTIFY_CHANGE_LAST_SET,
|
||||
hEvent,
|
||||
TRUE);
|
||||
|
||||
WaitForSingleObject(hEvent, INFINITE);
|
||||
|
||||
auto _theme = ThemeHelpers::GetAppTheme();
|
||||
if (AppTheme != _theme)
|
||||
{
|
||||
AppTheme = _theme;
|
||||
for (int i = 0; i < handles.size(); i++)
|
||||
{
|
||||
handles[i]();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
src/common/Themes/theme_listener.h
Normal file
34
src/common/Themes/theme_listener.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "theme_helpers.h"
|
||||
#include "dwmapi.h"
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
typedef void (*THEME_HANDLE)();
|
||||
DWORD WINAPI _checkTheme(LPVOID lpParam);
|
||||
|
||||
#pragma once
|
||||
class ThemeListener
|
||||
{
|
||||
public:
|
||||
ThemeListener()
|
||||
{
|
||||
AppTheme = ThemeHelpers::GetAppTheme();
|
||||
dwThreadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)_checkTheme, this, 0, &dwThreadId);
|
||||
}
|
||||
~ThemeListener()
|
||||
{
|
||||
CloseHandle(dwThreadHandle);
|
||||
dwThreadId = 0;
|
||||
}
|
||||
|
||||
AppTheme AppTheme;
|
||||
void ThemeListener::AddChangedHandler(THEME_HANDLE handle);
|
||||
void ThemeListener::DelChangedHandler(THEME_HANDLE handle);
|
||||
void CheckTheme();
|
||||
|
||||
private:
|
||||
HANDLE dwThreadHandle;
|
||||
DWORD dwThreadId;
|
||||
std::vector<THEME_HANDLE> handles;
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "windows_colors.h"
|
||||
#include "theme_helpers.h"
|
||||
|
||||
DWORD WindowsColors::rgb_color(DWORD abgr_color)
|
||||
{
|
||||
@@ -65,7 +66,7 @@ WindowsColors::Color WindowsColors::get_background_color()
|
||||
|
||||
bool WindowsColors::is_dark_mode()
|
||||
{
|
||||
return rgb_color(get_background_color()) == 0;
|
||||
return ThemeHelpers::GetAppTheme() == AppTheme::Dark;
|
||||
}
|
||||
|
||||
bool WindowsColors::update()
|
||||
|
||||
@@ -57,27 +57,6 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.1.118</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
<AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PowerToys.Interop.vcxproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -55,7 +55,8 @@ bool mapKeycodeToUnicode(const int vCode, HKL layout, const BYTE* keyState, std:
|
||||
// Get the scan code from the virtual key code
|
||||
const UINT scanCode = MapVirtualKeyExW(vCode, MAPVK_VK_TO_VSC, layout);
|
||||
// Get the unicode representation from the virtual key code and scan code pair
|
||||
const int result = ToUnicodeEx(vCode, scanCode, keyState, outBuffer.data(), (int)outBuffer.size(), 0, layout);
|
||||
const UINT wFlags = 1 << 2; // If bit 2 is set, keyboard state is not changed (Windows 10, version 1607 and newer)
|
||||
const int result = ToUnicodeEx(vCode, scanCode, keyState, outBuffer.data(), (int)outBuffer.size(), wFlags, layout);
|
||||
return result != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ struct LogSettings
|
||||
inline const static std::string findMyMouseLoggerName = "find-my-mouse";
|
||||
inline const static std::string mouseHighlighterLoggerName = "mouse-highlighter";
|
||||
inline const static std::string mousePointerCrosshairsLoggerName = "mouse-pointer-crosshairs";
|
||||
inline const static std::string imageResizerLoggerName = "imageresizer";
|
||||
inline const static std::string powerRenameLoggerName = "powerrename";
|
||||
inline const static std::string alwaysOnTopLoggerName = "always-on-top";
|
||||
inline const static std::wstring alwaysOnTopLogPath = L"always-on-top-log.txt";
|
||||
|
||||
112
src/common/utils/package.h
Normal file
112
src/common/utils/package.h
Normal file
@@ -0,0 +1,112 @@
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#include <winrt/Windows.ApplicationModel.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Management.Deployment.h>
|
||||
|
||||
#include "../logger/logger.h"
|
||||
|
||||
namespace package {
|
||||
inline BOOL IsWin11OrGreater()
|
||||
{
|
||||
OSVERSIONINFOEX osvi{};
|
||||
DWORDLONG dwlConditionMask = 0;
|
||||
int op = VER_GREATER_EQUAL;
|
||||
|
||||
// Initialize the OSVERSIONINFOEX structure.
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
osvi.dwMajorVersion = HIBYTE(_WIN32_WINNT_WINTHRESHOLD);
|
||||
osvi.dwMinorVersion = LOBYTE(_WIN32_WINNT_WINTHRESHOLD);
|
||||
// Windows 11 build number
|
||||
osvi.dwBuildNumber = 22000;
|
||||
|
||||
// Initialize the condition mask.
|
||||
VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, op);
|
||||
VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, op);
|
||||
VER_SET_CONDITION(dwlConditionMask, VER_BUILDNUMBER, op);
|
||||
|
||||
// Perform the test.
|
||||
return VerifyVersionInfo(
|
||||
&osvi,
|
||||
VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER,
|
||||
dwlConditionMask);
|
||||
}
|
||||
|
||||
inline bool IsPackageRegistered(std::wstring packageDisplayName)
|
||||
{
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Windows::Management::Deployment;
|
||||
|
||||
PackageManager packageManager;
|
||||
|
||||
for (auto const& package : packageManager.FindPackagesForUser({}))
|
||||
{
|
||||
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
||||
|
||||
if (packageFullName.contains(packageDisplayName))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool RegisterSparsePackage(std::wstring externalLocation, std::wstring sparsePkgPath)
|
||||
{
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Windows::Management::Deployment;
|
||||
|
||||
try
|
||||
{
|
||||
Uri externalUri{ externalLocation };
|
||||
Uri packageUri{ sparsePkgPath };
|
||||
|
||||
PackageManager packageManager;
|
||||
|
||||
// Declare use of an external location
|
||||
AddPackageOptions options;
|
||||
options.ExternalLocationUri(externalUri);
|
||||
|
||||
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> deploymentOperation = packageManager.AddPackageByUriAsync(packageUri, options);
|
||||
deploymentOperation.get();
|
||||
|
||||
// Check the status of the operation
|
||||
if (deploymentOperation.Status() == AsyncStatus::Error)
|
||||
{
|
||||
auto deploymentResult{ deploymentOperation.GetResults() };
|
||||
auto errorCode = deploymentOperation.ErrorCode();
|
||||
auto errorText = deploymentResult.ErrorText();
|
||||
|
||||
Logger::error(L"Register {} package failed. ErrorCode: {}, ErrorText: {}", sparsePkgPath, std::to_wstring(errorCode), errorText);
|
||||
return false;
|
||||
}
|
||||
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
|
||||
{
|
||||
Logger::error(L"Register {} package canceled.", sparsePkgPath);
|
||||
return false;
|
||||
}
|
||||
else if (deploymentOperation.Status() == AsyncStatus::Completed)
|
||||
{
|
||||
Logger::info(L"Register {} package completed.", sparsePkgPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::debug(L"Register {} package started.", sparsePkgPath);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (std::exception e)
|
||||
{
|
||||
Logger::error("Exception thrown while trying to register package: {}", e.what());
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
<ProjectGuid>{7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>spdlog</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ProjectDir)..\..\deps\spdlog.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
return p1.x == p2.x && p1.y == p2.y;
|
||||
}
|
||||
|
||||
static constexpr POINT ptNowhere = { -1, -1 };
|
||||
static constexpr POINT ptNowhere = { LONG_MIN, LONG_MIN };
|
||||
static constexpr DWORD TIMER_ID_TRACK = 100;
|
||||
static constexpr DWORD IdlePeriod = 1000;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>FindMyMouse</RootNamespace>
|
||||
<OverrideWindowsTargetPlatformVersion>true</OverrideWindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>FindMyMouse</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ProjectGuid>{782a61be-9d85-4081-b35c-1ccc9dcc1e88}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>MouseHighlighter</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>MouseHighlighter</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ProjectGuid>{eae14c0e-7a6b-45da-9080-a7d8c077ba6e}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>MousePointerCrosshairs</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>MousePointerCrosshairs</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<ProjectGuid>{2edb3eb4-fa92-4bff-b2d8-566584837231}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ShortcutGuide</RootNamespace>
|
||||
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{2d604c07-51fc-46bb-9eb7-75aecc7f5e81}</ProjectGuid>
|
||||
<RootNamespace>ShortcutGuideModuleInterface</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>ShortcutGuideModuleInterface</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
||||
@@ -54,12 +54,15 @@ AlwaysOnTop::AlwaysOnTop(bool useLLKH) :
|
||||
|
||||
AlwaysOnTop::~AlwaysOnTop()
|
||||
{
|
||||
m_running = false;
|
||||
|
||||
if (m_hPinEvent)
|
||||
{
|
||||
// Needed to unblock MsgWaitForMultipleObjects one last time
|
||||
SetEvent(m_hPinEvent);
|
||||
m_thread.join();
|
||||
CloseHandle(m_hPinEvent);
|
||||
}
|
||||
m_thread.join();
|
||||
|
||||
CleanUp();
|
||||
}
|
||||
@@ -274,12 +277,16 @@ void AlwaysOnTop::RegisterLLKH()
|
||||
Logger::warn(L"Failed to create pinEvent. {}", get_last_error_or_default(GetLastError()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
m_thread = std::thread([this]() {
|
||||
MSG msg;
|
||||
while (1)
|
||||
while (m_running)
|
||||
{
|
||||
DWORD dwEvt = MsgWaitForMultipleObjects(1, &m_hPinEvent, false, INFINITE, QS_ALLINPUT);
|
||||
if (!m_running)
|
||||
{
|
||||
break;
|
||||
}
|
||||
switch (dwEvt)
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
@@ -296,7 +303,7 @@ void AlwaysOnTop::RegisterLLKH()
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
HANDLE m_hPinEvent;
|
||||
std::thread m_thread;
|
||||
const bool m_useCentralizedLLKH;
|
||||
bool m_running = true;
|
||||
|
||||
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
|
||||
void HandleWinHookEvent(WinHookEvent* data) noexcept;
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Global props -->
|
||||
<PropertyGroup Label="Globals" Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{1DC3BE92-CE89-43FB-8110-9C043A2FE7A2}</ProjectGuid>
|
||||
@@ -136,6 +136,7 @@
|
||||
<ClCompile Include="trace.cpp" />
|
||||
<ClCompile Include="VirtualDesktopUtils.cpp" />
|
||||
<ClCompile Include="WindowBorder.cpp" />
|
||||
<ClCompile Include="WindowCornersUtil.cpp" />
|
||||
<ClCompile Include="WinHookEventIDs.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -150,6 +151,7 @@
|
||||
<ClInclude Include="trace.h" />
|
||||
<ClInclude Include="VirtualDesktopUtils.h" />
|
||||
<ClInclude Include="WindowBorder.h" />
|
||||
<ClInclude Include="WindowCornersUtil.h" />
|
||||
<ClInclude Include="WinHookEventIDs.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
<ClCompile Include="VirtualDesktopUtils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WindowCornersUtil.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
@@ -83,5 +86,8 @@
|
||||
<ClInclude Include="VirtualDesktopUtils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="WindowCornersUtil.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -59,6 +59,8 @@ bool FrameDrawer::CreateRenderTargets(const RECT& clientRect)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_renderTarget->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
|
||||
m_renderTargetSizeHash = rectHash;
|
||||
|
||||
return true;
|
||||
@@ -86,17 +88,26 @@ void FrameDrawer::Show()
|
||||
Render();
|
||||
}
|
||||
|
||||
void FrameDrawer::SetBorderRect(RECT windowRect, COLORREF color, int thickness)
|
||||
void FrameDrawer::SetBorderRect(RECT windowRect, COLORREF color, int thickness, int radius)
|
||||
{
|
||||
const auto newSceneRect = DrawableRect{
|
||||
.rect = ConvertRect(windowRect),
|
||||
auto newSceneRect = DrawableRect{
|
||||
.borderColor = ConvertColor(color),
|
||||
.thickness = thickness
|
||||
.thickness = thickness,
|
||||
};
|
||||
|
||||
if (radius != 0)
|
||||
{
|
||||
newSceneRect.roundedRect = ConvertRect(windowRect, thickness, radius);
|
||||
}
|
||||
else
|
||||
{
|
||||
newSceneRect.rect = ConvertRect(windowRect, thickness);
|
||||
}
|
||||
|
||||
const bool colorUpdated = std::memcmp(&m_sceneRect.borderColor, &newSceneRect.borderColor, sizeof(newSceneRect.borderColor));
|
||||
const bool thicknessUpdated = m_sceneRect.thickness != newSceneRect.thickness;
|
||||
const bool needsRedraw = colorUpdated || thicknessUpdated;
|
||||
const bool cornersUpdated = m_sceneRect.rect.has_value() != newSceneRect.rect.has_value() || m_sceneRect.roundedRect.has_value() != newSceneRect.roundedRect.has_value();
|
||||
const bool needsRedraw = colorUpdated || thicknessUpdated || cornersUpdated;
|
||||
|
||||
RECT clientRect;
|
||||
if (!SUCCEEDED(DwmGetWindowAttribute(m_window, DWMWA_EXTENDED_FRAME_BOUNDS, &clientRect, sizeof(clientRect))))
|
||||
@@ -104,7 +115,7 @@ void FrameDrawer::SetBorderRect(RECT windowRect, COLORREF color, int thickness)
|
||||
return;
|
||||
}
|
||||
|
||||
m_sceneRect = newSceneRect;
|
||||
m_sceneRect = std::move(newSceneRect);
|
||||
|
||||
const auto renderTargetSize = D2D1::SizeU(clientRect.right - clientRect.left, clientRect.bottom - clientRect.top);
|
||||
|
||||
@@ -170,24 +181,38 @@ D2D1_COLOR_F FrameDrawer::ConvertColor(COLORREF color)
|
||||
1.f);
|
||||
}
|
||||
|
||||
D2D1_RECT_F FrameDrawer::ConvertRect(RECT rect)
|
||||
D2D1_ROUNDED_RECT FrameDrawer::ConvertRect(RECT rect, int thickness, int radius)
|
||||
{
|
||||
return D2D1::RectF((float)rect.left, (float)rect.top, (float)rect.right, (float)rect.bottom);
|
||||
auto d2d1Rect = D2D1::RectF((float)rect.left + thickness, (float)rect.top + thickness, (float)rect.right - thickness, (float)rect.bottom - thickness);
|
||||
return D2D1::RoundedRect(d2d1Rect, (float)radius, (float)radius);
|
||||
}
|
||||
|
||||
D2D1_RECT_F FrameDrawer::ConvertRect(RECT rect, int thickness)
|
||||
{
|
||||
return D2D1::RectF((float)rect.left + thickness, (float)rect.top + thickness, (float)rect.right - thickness, (float)rect.bottom - thickness);
|
||||
}
|
||||
|
||||
void FrameDrawer::Render()
|
||||
{
|
||||
if (!m_renderTarget)
|
||||
if (!m_renderTarget || !m_borderBrush)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_renderTarget->BeginDraw();
|
||||
|
||||
m_renderTarget->Clear(D2D1::ColorF(0.f, 0.f, 0.f, 0.f));
|
||||
|
||||
if (m_borderBrush)
|
||||
{
|
||||
// The border stroke is centered on the line.
|
||||
m_renderTarget->DrawRectangle(m_sceneRect.rect, m_borderBrush.get(), static_cast<float>(m_sceneRect.thickness * 2));
|
||||
}
|
||||
// The border stroke is centered on the line.
|
||||
|
||||
if (m_sceneRect.roundedRect)
|
||||
{
|
||||
m_renderTarget->DrawRoundedRectangle(m_sceneRect.roundedRect.value(), m_borderBrush.get(), static_cast<float>(m_sceneRect.thickness * 2));
|
||||
}
|
||||
else if (m_sceneRect.rect)
|
||||
{
|
||||
m_renderTarget->DrawRectangle(m_sceneRect.rect.value(), m_borderBrush.get(), static_cast<float>(m_sceneRect.thickness * 2));
|
||||
}
|
||||
|
||||
m_renderTarget->EndDraw();
|
||||
}
|
||||
@@ -18,14 +18,15 @@ public:
|
||||
|
||||
void Show();
|
||||
void Hide();
|
||||
void SetBorderRect(RECT windowRect, COLORREF color, int thickness);
|
||||
void SetBorderRect(RECT windowRect, COLORREF color, int thickness, int radius);
|
||||
|
||||
private:
|
||||
bool CreateRenderTargets(const RECT& clientRect);
|
||||
|
||||
struct DrawableRect
|
||||
{
|
||||
D2D1_RECT_F rect;
|
||||
std::optional<D2D1_RECT_F> rect;
|
||||
std::optional<D2D1_ROUNDED_RECT> roundedRect;
|
||||
D2D1_COLOR_F borderColor;
|
||||
int thickness;
|
||||
};
|
||||
@@ -33,7 +34,8 @@ private:
|
||||
static ID2D1Factory* GetD2DFactory();
|
||||
static IDWriteFactory* GetWriteFactory();
|
||||
static D2D1_COLOR_F ConvertColor(COLORREF color);
|
||||
static D2D1_RECT_F ConvertRect(RECT rect);
|
||||
static D2D1_ROUNDED_RECT ConvertRect(RECT rect, int thickness, int radius);
|
||||
static D2D1_RECT_F ConvertRect(RECT rect, int thickness);
|
||||
void Render();
|
||||
|
||||
HWND m_window = nullptr;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace NonLocalizable
|
||||
const static wchar_t* BlockInGameModeID = L"do-not-activate-on-game-mode";
|
||||
const static wchar_t* ExcludedAppsID = L"excluded-apps";
|
||||
const static wchar_t* FrameAccentColor = L"frame-accent-color";
|
||||
const static wchar_t* RoundCornersEnabledID = L"round-corners-enabled";
|
||||
}
|
||||
|
||||
// TODO: move to common utils
|
||||
@@ -153,6 +154,16 @@ void AlwaysOnTopSettings::LoadSettings()
|
||||
}
|
||||
}
|
||||
|
||||
if (const auto jsonVal = values.get_bool_value(NonLocalizable::RoundCornersEnabledID))
|
||||
{
|
||||
auto val = *jsonVal;
|
||||
if (m_settings.roundCornersEnabled != val)
|
||||
{
|
||||
m_settings.roundCornersEnabled = val;
|
||||
NotifyObservers(SettingId::RoundCornersEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
if (auto jsonVal = values.get_string_value(NonLocalizable::ExcludedAppsID))
|
||||
{
|
||||
std::wstring apps = std::move(*jsonVal);
|
||||
|
||||
@@ -17,6 +17,7 @@ struct Settings
|
||||
PowerToysSettings::HotkeyObject hotkey = PowerToysSettings::HotkeyObject::from_settings(true, true, false, false, 84); // win + ctrl + T
|
||||
bool enableFrame = true;
|
||||
bool enableSound = true;
|
||||
bool roundCornersEnabled = true;
|
||||
bool blockInGameMode = true;
|
||||
bool frameAccentColor = true;
|
||||
int frameThickness = 15;
|
||||
|
||||
@@ -9,5 +9,6 @@ enum class SettingId
|
||||
FrameColor,
|
||||
BlockInGameMode,
|
||||
ExcludeApps,
|
||||
FrameAccentColor
|
||||
FrameAccentColor,
|
||||
RoundCornersEnabled
|
||||
};
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <FrameDrawer.h>
|
||||
#include <Settings.h>
|
||||
#include <WindowCornersUtil.h>
|
||||
|
||||
// Non-Localizable strings
|
||||
namespace NonLocalizable
|
||||
@@ -31,7 +32,7 @@ std::optional<RECT> GetFrameRect(HWND window)
|
||||
}
|
||||
|
||||
WindowBorder::WindowBorder(HWND window) :
|
||||
SettingsObserver({ SettingId::FrameColor, SettingId::FrameThickness, SettingId::FrameAccentColor }),
|
||||
SettingsObserver({ SettingId::FrameColor, SettingId::FrameThickness, SettingId::FrameAccentColor, SettingId::RoundCornersEnabled }),
|
||||
m_window(nullptr),
|
||||
m_trackingWindow(window),
|
||||
m_frameDrawer(nullptr)
|
||||
@@ -132,8 +133,9 @@ bool WindowBorder::Init(HINSTANCE hinstance)
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateBorderProperties();
|
||||
m_frameDrawer->Show();
|
||||
UpdateBorderPosition();
|
||||
UpdateBorderProperties();
|
||||
m_timer_id = SetTimer(m_window, REFRESH_BORDER_TIMER_ID, REFRESH_BORDER_INTERVAL, nullptr);
|
||||
|
||||
return true;
|
||||
@@ -187,7 +189,13 @@ void WindowBorder::UpdateBorderProperties() const
|
||||
color = AlwaysOnTopSettings::settings().frameColor;
|
||||
}
|
||||
|
||||
m_frameDrawer->SetBorderRect(frameRect, color, AlwaysOnTopSettings::settings().frameThickness);
|
||||
int cornerRadius = 0;
|
||||
if (AlwaysOnTopSettings::settings().roundCornersEnabled)
|
||||
{
|
||||
cornerRadius = WindowBordersUtils::AreCornersRounded(m_trackingWindow) ? 8 : 0;
|
||||
}
|
||||
|
||||
m_frameDrawer->SetBorderRect(frameRect, color, AlwaysOnTopSettings::settings().frameThickness, cornerRadius);
|
||||
}
|
||||
|
||||
LRESULT WindowBorder::WndProc(UINT message, WPARAM wparam, LPARAM lparam) noexcept
|
||||
@@ -263,6 +271,12 @@ void WindowBorder::SettingsUpdate(SettingId id)
|
||||
UpdateBorderProperties();
|
||||
}
|
||||
break;
|
||||
|
||||
case SettingId::RoundCornersEnabled:
|
||||
{
|
||||
UpdateBorderProperties();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
39
src/modules/alwaysontop/AlwaysOnTop/WindowCornersUtil.cpp
Normal file
39
src/modules/alwaysontop/AlwaysOnTop/WindowCornersUtil.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "pch.h"
|
||||
#include "WindowCornersUtil.h"
|
||||
|
||||
#include <common/utils/winapi_error.h>
|
||||
|
||||
#include <dwmapi.h>
|
||||
|
||||
// Placeholder enums since dwmapi.h doesn't have these until SDK 22000.
|
||||
// TODO: Remove once SDK targets 22000 or above.
|
||||
enum DWMWINDOWATTRIBUTE_CUSTOM
|
||||
{
|
||||
DWMWA_WINDOW_CORNER_PREFERENCE = 33
|
||||
};
|
||||
|
||||
enum DWM_WINDOW_CORNER_PREFERENCE
|
||||
{
|
||||
DWMWCP_DEFAULT = 0,
|
||||
DWMWCP_DONOTROUND = 1,
|
||||
DWMWCP_ROUND = 2,
|
||||
DWMWCP_ROUNDSMALL = 3
|
||||
};
|
||||
|
||||
bool WindowBordersUtils::AreCornersRounded(HWND window) noexcept
|
||||
{
|
||||
int cornerPreference = DWMWCP_DEFAULT;
|
||||
auto res = DwmGetWindowAttribute(window, DWMWA_WINDOW_CORNER_PREFERENCE, &cornerPreference, sizeof(cornerPreference));
|
||||
if (res != S_OK)
|
||||
{
|
||||
// no need to spam with error log if arg is invalid (on Windows 10)
|
||||
if (res != E_INVALIDARG)
|
||||
{
|
||||
Logger::error(L"Get corner preference error: {}", get_last_error_or_default(res));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return cornerPreference != DWM_WINDOW_CORNER_PREFERENCE::DWMWCP_DONOTROUND;
|
||||
}
|
||||
4
src/modules/alwaysontop/AlwaysOnTop/WindowCornersUtil.h
Normal file
4
src/modules/alwaysontop/AlwaysOnTop/WindowCornersUtil.h
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace WindowBordersUtils
|
||||
{
|
||||
bool AreCornersRounded(HWND window) noexcept;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows10.0.18362.0</TargetFramework>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake</OutputPath>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -14,7 +14,7 @@
|
||||
<AssemblyName>PowerToys.Awake</AssemblyName>
|
||||
<Version>$(Version).0</Version>
|
||||
<ApplicationIcon>Images\Awake.ico</ApplicationIcon>
|
||||
<SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<PackageProjectUrl>https://awake.den.dev</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/microsoft/powertoys</RepositoryUrl>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
@@ -42,10 +42,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="NLog" Version="4.7.13" />
|
||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20071.2" />
|
||||
@@ -69,24 +65,10 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
<AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Images\Awake.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.1.118</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Awake</RootNamespace>
|
||||
<ProjectName>AwakeModuleInterface</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<TargetName>PowerToys.AwakeModuleInterface</TargetName>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>ColorPicker</RootNamespace>
|
||||
<AssemblyName>PowerToys.ColorPickerUI</AssemblyName>
|
||||
<TargetFramework>net6.0-windows10.0.18362.0</TargetFramework>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
@@ -40,10 +39,6 @@
|
||||
<Resource Include="Shaders\GridShader.cso" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
|
||||
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
|
||||
@@ -70,10 +65,6 @@
|
||||
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
|
||||
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
|
||||
<AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
@@ -81,12 +72,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Shaders\GridShader.fx" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
Style="{StaticResource DefaultButtonStyle}"
|
||||
FontFamily="Segoe MDL2 Assets">
|
||||
<Button.Content>
|
||||
<TextBlock Text="" AutomationProperties.Name="{x:Static p:Resources.Copy_to_clipboard}" />
|
||||
<TextBlock Text="" AutomationProperties.Name="{x:Static p:Resources.Copy_to_clipboard}" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace ColorPicker
|
||||
public int Flags;
|
||||
|
||||
/// <summary>
|
||||
/// The time stamp stamp for this message, equivalent to what GetMessageTime would return for this message.
|
||||
/// The time stamp for this message, equivalent to what GetMessageTime would return for this message.
|
||||
/// </summary>
|
||||
public int TimeStamp;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
Command="{Binding RemoveColorsCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}, Path=PlacementTarget.SelectedItems}">
|
||||
<MenuItem.Icon>
|
||||
<ui:FontIcon Glyph="" />
|
||||
<ui:FontIcon Glyph="" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static p:Resources.Export_by}" >
|
||||
@@ -205,7 +205,7 @@
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.LiveSetting="Assertive"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Copied_to_clipboard}">
|
||||
<Run Text=" " FontFamily="Segoe MDL2 Assets"/>
|
||||
<Run Text=" " FontFamily="Segoe MDL2 Assets"/>
|
||||
<Run Text="{x:Static p:Resources.Copied_to_clipboard}" FontWeight="SemiBold"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</Border.Style>
|
||||
<Button Height="40"
|
||||
Width="40"
|
||||
Content=""
|
||||
Content=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Background="Transparent"/>
|
||||
</Border>
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows10.0.18362.0</TargetFramework>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<ProjectGuid>{090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}</ProjectGuid>
|
||||
<RootNamespace>Microsoft.ColorPicker.UnitTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<OutputType>Library</OutputType>
|
||||
<Version>$(Version).0</Version>
|
||||
</PropertyGroup>
|
||||
@@ -17,10 +16,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
@@ -29,10 +24,6 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -40,12 +31,4 @@
|
||||
<ProjectReference Include="..\ColorPickerUI\ColorPickerUI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
<AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Global props -->
|
||||
<PropertyGroup Label="Globals" Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{ff1d7936-842a-4bbb-8bea-e9fe796de700}</ProjectGuid>
|
||||
@@ -110,7 +110,7 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>shcore.lib;shlwapi.lib;DbgHelp.lib;uxtheme.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>shcore.lib;shlwapi.lib;DbgHelp.lib;uxtheme.lib;dwmapi.lib;wbemuuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
@@ -128,7 +128,7 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>shcore.lib;shlwapi.lib;DbgHelp.lib;uxtheme.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>shcore.lib;shlwapi.lib;DbgHelp.lib;uxtheme.lib;dwmapi.lib;wbemuuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
210
src/modules/fancyzones/FancyZonesLib/EditorParameters.cpp
Normal file
210
src/modules/fancyzones/FancyZonesLib/EditorParameters.cpp
Normal file
@@ -0,0 +1,210 @@
|
||||
#include "pch.h"
|
||||
#include "EditorParameters.h"
|
||||
|
||||
#include <FancyZonesLib/FancyZonesWindowProperties.h>
|
||||
#include <FancyZonesLib/MonitorUtils.h>
|
||||
#include <FancyZonesLib/on_thread_executor.h>
|
||||
#include <FancyZonesLib/Settings.h>
|
||||
#include <FancyZonesLib/VirtualDesktop.h>
|
||||
#include <FancyZonesLib/util.h>
|
||||
|
||||
#include <common/Display/dpi_aware.h>
|
||||
#include <common/logger/logger.h>
|
||||
|
||||
|
||||
// Non-localizable strings
|
||||
namespace NonLocalizable
|
||||
{
|
||||
const wchar_t FancyZonesEditorParametersFile[] = L"editor-parameters.json";
|
||||
}
|
||||
|
||||
namespace JsonUtils
|
||||
{
|
||||
struct MonitorInfo
|
||||
{
|
||||
std::wstring monitorName;
|
||||
std::wstring monitorInstanceId;
|
||||
std::wstring monitorSerialNumber;
|
||||
int monitorNumber;
|
||||
std::wstring virtualDesktop;
|
||||
int dpi;
|
||||
int top;
|
||||
int left;
|
||||
int workAreaWidth;
|
||||
int workAreaHeight;
|
||||
int monitorWidth;
|
||||
int monitorHeight;
|
||||
bool isSelected = false;
|
||||
|
||||
static json::JsonObject ToJson(const MonitorInfo& monitor)
|
||||
{
|
||||
json::JsonObject result{};
|
||||
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorNameId, json::value(monitor.monitorName));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorInstanceId, json::value(monitor.monitorInstanceId));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorSerialNumberId, json::value(monitor.monitorSerialNumber));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorNumberId, json::value(monitor.monitorNumber));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::VirtualDesktopId, json::value(monitor.virtualDesktop));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::Dpi, json::value(monitor.dpi));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::TopCoordinate, json::value(monitor.top));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::LeftCoordinate, json::value(monitor.left));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::WorkAreaWidth, json::value(monitor.workAreaWidth));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::WorkAreaHeight, json::value(monitor.workAreaHeight));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorWidth, json::value(monitor.monitorWidth));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::MonitorHeight, json::value(monitor.monitorHeight));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::IsSelected, json::value(monitor.isSelected));
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
struct EditorArgs
|
||||
{
|
||||
DWORD processId;
|
||||
bool spanZonesAcrossMonitors;
|
||||
std::vector<MonitorInfo> monitors;
|
||||
|
||||
static json::JsonObject ToJson(const EditorArgs& args)
|
||||
{
|
||||
json::JsonObject result{};
|
||||
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::ProcessId, json::value(args.processId));
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::SpanZonesAcrossMonitors, json::value(args.spanZonesAcrossMonitors));
|
||||
|
||||
json::JsonArray monitors;
|
||||
for (const auto& monitor : args.monitors)
|
||||
{
|
||||
monitors.Append(MonitorInfo::ToJson(monitor));
|
||||
}
|
||||
|
||||
result.SetNamedValue(NonLocalizable::EditorParametersIds::Monitors, monitors);
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
bool EditorParameters::Save() noexcept
|
||||
{
|
||||
const auto virtualDesktopIdStr = FancyZonesUtils::GuidToString(VirtualDesktop::instance().GetCurrentVirtualDesktopId());
|
||||
if (!virtualDesktopIdStr)
|
||||
{
|
||||
Logger::error(L"Save editor params: invalid virtual desktop id");
|
||||
return false;
|
||||
}
|
||||
|
||||
OnThreadExecutor dpiUnawareThread;
|
||||
dpiUnawareThread.submit(OnThreadExecutor::task_t{ [] {
|
||||
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE);
|
||||
SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR_MIXED);
|
||||
} }).wait();
|
||||
|
||||
const bool spanZonesAcrossMonitors = FancyZonesSettings::settings().spanZonesAcrossMonitors;
|
||||
|
||||
JsonUtils::EditorArgs argsJson;
|
||||
argsJson.processId = GetCurrentProcessId();
|
||||
argsJson.spanZonesAcrossMonitors = spanZonesAcrossMonitors;
|
||||
|
||||
if (spanZonesAcrossMonitors)
|
||||
{
|
||||
RECT combinedWorkArea;
|
||||
dpiUnawareThread.submit(OnThreadExecutor::task_t{ [&]() {
|
||||
combinedWorkArea = FancyZonesUtils::GetAllMonitorsCombinedRect<&MONITORINFOEX::rcWork>();
|
||||
|
||||
} }).wait();
|
||||
|
||||
RECT combinedMonitorArea = FancyZonesUtils::GetAllMonitorsCombinedRect<&MONITORINFOEX::rcMonitor>();
|
||||
|
||||
JsonUtils::MonitorInfo monitorJson;
|
||||
monitorJson.monitorName = ZonedWindowProperties::MultiMonitorName;
|
||||
monitorJson.monitorInstanceId = ZonedWindowProperties::MultiMonitorInstance;
|
||||
monitorJson.monitorNumber = 0;
|
||||
monitorJson.virtualDesktop = virtualDesktopIdStr.value();
|
||||
monitorJson.top = combinedWorkArea.top;
|
||||
monitorJson.left = combinedWorkArea.left;
|
||||
monitorJson.workAreaWidth = combinedWorkArea.right - combinedWorkArea.left;
|
||||
monitorJson.workAreaHeight = combinedWorkArea.bottom - combinedWorkArea.top;
|
||||
monitorJson.monitorWidth = combinedMonitorArea.right - combinedMonitorArea.left;
|
||||
monitorJson.monitorHeight = combinedMonitorArea.bottom - combinedMonitorArea.top;
|
||||
monitorJson.isSelected = true;
|
||||
monitorJson.dpi = 0; // unused
|
||||
|
||||
argsJson.monitors.emplace_back(std::move(monitorJson));
|
||||
}
|
||||
else
|
||||
{
|
||||
auto monitors = MonitorUtils::IdentifyMonitors();
|
||||
|
||||
HMONITOR targetMonitor{};
|
||||
if (FancyZonesSettings::settings().use_cursorpos_editor_startupscreen)
|
||||
{
|
||||
POINT currentCursorPos{};
|
||||
GetCursorPos(¤tCursorPos);
|
||||
targetMonitor = MonitorFromPoint(currentCursorPos, MONITOR_DEFAULTTOPRIMARY);
|
||||
}
|
||||
else
|
||||
{
|
||||
targetMonitor = MonitorFromWindow(GetForegroundWindow(), MONITOR_DEFAULTTOPRIMARY);
|
||||
}
|
||||
|
||||
if (!targetMonitor)
|
||||
{
|
||||
Logger::error("No target monitor to open editor");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto& monitorData : monitors)
|
||||
{
|
||||
HMONITOR monitor = monitorData.monitor;
|
||||
|
||||
MONITORINFOEX monitorInfo{};
|
||||
dpiUnawareThread.submit(OnThreadExecutor::task_t{ [&] {
|
||||
monitorInfo.cbSize = sizeof(monitorInfo);
|
||||
if (!GetMonitorInfo(monitor, &monitorInfo))
|
||||
{
|
||||
return;
|
||||
}
|
||||
} }).wait();
|
||||
|
||||
JsonUtils::MonitorInfo monitorJson;
|
||||
|
||||
if (monitor == targetMonitor)
|
||||
{
|
||||
monitorJson.isSelected = true; /* Is monitor selected for the main editor window opening */
|
||||
}
|
||||
|
||||
monitorJson.monitorName = monitorData.deviceId.id;
|
||||
monitorJson.monitorInstanceId = monitorData.deviceId.instanceId;
|
||||
monitorJson.monitorNumber = monitorData.deviceId.number;
|
||||
monitorJson.monitorSerialNumber = monitorData.serialNumber;
|
||||
monitorJson.virtualDesktop = virtualDesktopIdStr.value();
|
||||
|
||||
UINT dpi = 0;
|
||||
if (DPIAware::GetScreenDPIForMonitor(monitor, dpi) != S_OK)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
monitorJson.dpi = dpi;
|
||||
monitorJson.top = monitorInfo.rcWork.top;
|
||||
monitorJson.left = monitorInfo.rcWork.left;
|
||||
monitorJson.workAreaWidth = monitorInfo.rcWork.right - monitorInfo.rcWork.left;
|
||||
monitorJson.workAreaHeight = monitorInfo.rcWork.bottom - monitorInfo.rcWork.top;
|
||||
|
||||
float width = static_cast<float>(monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left);
|
||||
float height = static_cast<float>(monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top);
|
||||
DPIAware::Convert(monitor, width, height);
|
||||
|
||||
monitorJson.monitorWidth = static_cast<int>(std::roundf(width));
|
||||
monitorJson.monitorHeight = static_cast<int>(std::roundf(height));
|
||||
|
||||
argsJson.monitors.emplace_back(std::move(monitorJson));
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring folderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
std::wstring fileName = folderPath + L"\\" + std::wstring(NonLocalizable::FancyZonesEditorParametersFile);
|
||||
json::to_file(fileName, JsonUtils::EditorArgs::ToJson(argsJson));
|
||||
|
||||
return true;
|
||||
}
|
||||
30
src/modules/fancyzones/FancyZonesLib/EditorParameters.h
Normal file
30
src/modules/fancyzones/FancyZonesLib/EditorParameters.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
namespace NonLocalizable
|
||||
{
|
||||
namespace EditorParametersIds
|
||||
{
|
||||
const static wchar_t* Dpi = L"dpi";
|
||||
const static wchar_t* MonitorNameId = L"monitor";
|
||||
const static wchar_t* MonitorInstanceId = L"monitor-instance-id";
|
||||
const static wchar_t* MonitorSerialNumberId = L"monitor-serial-number";
|
||||
const static wchar_t* MonitorNumberId = L"monitor-number";
|
||||
const static wchar_t* VirtualDesktopId = L"virtual-desktop";
|
||||
const static wchar_t* TopCoordinate = L"top-coordinate";
|
||||
const static wchar_t* LeftCoordinate = L"left-coordinate";
|
||||
const static wchar_t* WorkAreaWidth = L"work-area-width";
|
||||
const static wchar_t* WorkAreaHeight = L"work-area-height";
|
||||
const static wchar_t* MonitorWidth = L"monitor-width";
|
||||
const static wchar_t* MonitorHeight = L"monitor-height";
|
||||
const static wchar_t* IsSelected = L"is-selected";
|
||||
const static wchar_t* ProcessId = L"process-id";
|
||||
const static wchar_t* SpanZonesAcrossMonitors = L"span-zones-across-monitors";
|
||||
const static wchar_t* Monitors = L"monitors";
|
||||
}
|
||||
}
|
||||
|
||||
class EditorParameters
|
||||
{
|
||||
public:
|
||||
static bool Save() noexcept;
|
||||
};
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <common/utils/window.h>
|
||||
#include <common/SettingsAPI/FileWatcher.h>
|
||||
|
||||
#include <FancyZonesLib/EditorParameters.h>
|
||||
#include <FancyZonesLib/FancyZonesData.h>
|
||||
#include <FancyZonesLib/FancyZonesData/AppliedLayouts.h>
|
||||
#include <FancyZonesLib/FancyZonesData/AppZoneHistory.h>
|
||||
@@ -145,7 +146,7 @@ public:
|
||||
|
||||
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
|
||||
void OnDisplayChange(DisplayChangeType changeType) noexcept;
|
||||
void AddWorkArea(HMONITOR monitor, const std::wstring& deviceId) noexcept;
|
||||
void AddWorkArea(HMONITOR monitor, const FancyZonesDataTypes::WorkAreaId& id) noexcept;
|
||||
|
||||
protected:
|
||||
static LRESULT CALLBACK s_WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
|
||||
@@ -249,6 +250,22 @@ FancyZones::Run() noexcept
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize COM. Needed for WMI monitor identifying
|
||||
HRESULT comInitHres = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
if (FAILED(comInitHres))
|
||||
{
|
||||
Logger::error(L"Failed to initialize COM library. {}", get_last_error_or_default(comInitHres));
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize security. Needed for WMI monitor identifying
|
||||
HRESULT comSecurityInitHres = CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
|
||||
if (FAILED(comSecurityInitHres))
|
||||
{
|
||||
Logger::error(L"Failed to initialize security. {}", get_last_error_or_default(comSecurityInitHres));
|
||||
return;
|
||||
}
|
||||
|
||||
m_dpiUnawareThread.submit(OnThreadExecutor::task_t{ [] {
|
||||
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE);
|
||||
SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR_MIXED);
|
||||
@@ -277,6 +294,8 @@ FancyZones::Destroy() noexcept
|
||||
DestroyWindow(m_window);
|
||||
m_window = nullptr;
|
||||
}
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
// IFancyZonesCallback
|
||||
@@ -487,124 +506,16 @@ void FancyZones::ToggleEditor() noexcept
|
||||
|
||||
m_terminateEditorEvent.reset(CreateEvent(nullptr, true, false, nullptr));
|
||||
|
||||
HMONITOR targetMonitor{};
|
||||
|
||||
const bool use_cursorpos_editor_startupscreen = FancyZonesSettings::settings().use_cursorpos_editor_startupscreen;
|
||||
if (use_cursorpos_editor_startupscreen)
|
||||
{
|
||||
POINT currentCursorPos{};
|
||||
GetCursorPos(¤tCursorPos);
|
||||
targetMonitor = MonitorFromPoint(currentCursorPos, MONITOR_DEFAULTTOPRIMARY);
|
||||
}
|
||||
else
|
||||
{
|
||||
targetMonitor = MonitorFromWindow(GetForegroundWindow(), MONITOR_DEFAULTTOPRIMARY);
|
||||
}
|
||||
|
||||
if (!targetMonitor)
|
||||
if (!EditorParameters::Save())
|
||||
{
|
||||
Logger::error(L"Failed to save editor startup parameters");
|
||||
return;
|
||||
}
|
||||
|
||||
wil::unique_cotaskmem_string virtualDesktopId;
|
||||
if (!SUCCEEDED(StringFromCLSID(VirtualDesktop::instance().GetCurrentVirtualDesktopId(), &virtualDesktopId)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Divider: /
|
||||
* Parts:
|
||||
* (1) Process id
|
||||
* (2) Span zones across monitors
|
||||
* (3) Monitor id where the Editor should be opened
|
||||
* (4) Monitors count
|
||||
*
|
||||
* Data for each monitor:
|
||||
* (5) Monitor id
|
||||
* (6) DPI
|
||||
* (7) work area left
|
||||
* (8) work area top
|
||||
* (9) work area width
|
||||
* (10) work area height
|
||||
* ...
|
||||
*/
|
||||
std::wstring params;
|
||||
const std::wstring divider = L"/";
|
||||
params += std::to_wstring(GetCurrentProcessId()) + divider; /* Process id */
|
||||
const bool spanZonesAcrossMonitors = FancyZonesSettings::settings().spanZonesAcrossMonitors;
|
||||
params += std::to_wstring(spanZonesAcrossMonitors) + divider; /* Span zones */
|
||||
std::vector<std::pair<HMONITOR, MONITORINFOEX>> allMonitors;
|
||||
|
||||
m_dpiUnawareThread.submit(OnThreadExecutor::task_t{ [&] {
|
||||
allMonitors = FancyZonesUtils::GetAllMonitorInfo<&MONITORINFOEX::rcWork>();
|
||||
} }).wait();
|
||||
|
||||
if (spanZonesAcrossMonitors)
|
||||
{
|
||||
params += FancyZonesUtils::GenerateUniqueIdAllMonitorsArea(virtualDesktopId.get()) + divider; /* Monitor id where the Editor should be opened */
|
||||
}
|
||||
|
||||
// device id map
|
||||
std::unordered_map<std::wstring, DWORD> displayDeviceIdxMap;
|
||||
|
||||
bool showDpiWarning = false;
|
||||
int prevDpi = -1;
|
||||
std::wstring monitorsDataStr;
|
||||
|
||||
for (auto& monitorData : allMonitors)
|
||||
{
|
||||
HMONITOR monitor = monitorData.first;
|
||||
auto monitorInfo = monitorData.second;
|
||||
|
||||
std::wstring deviceId = FancyZonesUtils::GetDisplayDeviceId(monitorInfo.szDevice, displayDeviceIdxMap);
|
||||
std::wstring monitorId = FancyZonesUtils::GenerateUniqueId(monitor, deviceId, virtualDesktopId.get());
|
||||
|
||||
if (monitor == targetMonitor && !spanZonesAcrossMonitors)
|
||||
{
|
||||
params += monitorId + divider; /* Monitor id where the Editor should be opened */
|
||||
}
|
||||
|
||||
UINT dpi = 0;
|
||||
if (DPIAware::GetScreenDPIForMonitor(monitor, dpi) != S_OK)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spanZonesAcrossMonitors && prevDpi != -1 && prevDpi != dpi)
|
||||
{
|
||||
showDpiWarning = true;
|
||||
}
|
||||
|
||||
monitorsDataStr += std::move(monitorId) + divider; /* Monitor id */
|
||||
monitorsDataStr += std::to_wstring(dpi) + divider; /* DPI */
|
||||
monitorsDataStr += std::to_wstring(monitorInfo.rcWork.left) + divider; /* Top coordinate */
|
||||
monitorsDataStr += std::to_wstring(monitorInfo.rcWork.top) + divider; /* Left coordinate */
|
||||
monitorsDataStr += std::to_wstring(monitorInfo.rcWork.right - monitorInfo.rcWork.left) + divider; /* Width */
|
||||
monitorsDataStr += std::to_wstring(monitorInfo.rcWork.bottom - monitorInfo.rcWork.top) + divider; /* Height */
|
||||
}
|
||||
|
||||
params += std::to_wstring(allMonitors.size()) + divider; /* Monitors count */
|
||||
params += monitorsDataStr;
|
||||
|
||||
FancyZonesDataInstance().SaveFancyZonesEditorParameters(spanZonesAcrossMonitors, virtualDesktopId.get(), targetMonitor, allMonitors); /* Write parameters to json file */
|
||||
|
||||
if (showDpiWarning)
|
||||
{
|
||||
// We must show the message box in a separate thread, since this code is called from a low-level
|
||||
// keyboard hook callback, and launching messageboxes from it has unexpected side effects
|
||||
//std::thread{ [] {
|
||||
// MessageBoxW(nullptr,
|
||||
// GET_RESOURCE_STRING(IDS_SPAN_ACROSS_ZONES_WARNING).c_str(),
|
||||
// GET_RESOURCE_STRING(IDS_POWERTOYS_FANCYZONES).c_str(),
|
||||
// MB_OK | MB_ICONWARNING);
|
||||
//} }.detach();
|
||||
}
|
||||
|
||||
|
||||
SHELLEXECUTEINFO sei{ sizeof(sei) };
|
||||
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
|
||||
sei.lpFile = NonLocalizable::FZEditorExecutablePath;
|
||||
sei.lpParameters = params.c_str();
|
||||
sei.lpParameters = L"";
|
||||
sei.nShow = SW_SHOWDEFAULT;
|
||||
ShellExecuteEx(&sei);
|
||||
Trace::FancyZones::EditorLaunched(1);
|
||||
@@ -781,6 +692,11 @@ void FancyZones::OnDisplayChange(DisplayChangeType changeType) noexcept
|
||||
if (changeType == DisplayChangeType::Initialization)
|
||||
{
|
||||
RegisterVirtualDesktopUpdates();
|
||||
|
||||
// id format of applied-layouts and app-zone-history was changed in 0.60
|
||||
auto monitors = MonitorUtils::IdentifyMonitors();
|
||||
AppliedLayouts::instance().AdjustWorkAreaIds(monitors);
|
||||
AppZoneHistory::instance().AdjustWorkAreaIds(monitors);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -796,7 +712,7 @@ void FancyZones::OnDisplayChange(DisplayChangeType changeType) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
void FancyZones::AddWorkArea(HMONITOR monitor, const std::wstring& deviceId) noexcept
|
||||
void FancyZones::AddWorkArea(HMONITOR monitor, const FancyZonesDataTypes::WorkAreaId& id) noexcept
|
||||
{
|
||||
if (m_workAreaHandler.IsNewWorkArea(VirtualDesktop::instance().GetCurrentVirtualDesktopId(), monitor))
|
||||
{
|
||||
@@ -806,26 +722,14 @@ void FancyZones::AddWorkArea(HMONITOR monitor, const std::wstring& deviceId) noe
|
||||
Logger::debug(L"Add new work area on virtual desktop {}", virtualDesktopIdStr.get());
|
||||
}
|
||||
|
||||
FancyZonesDataTypes::DeviceIdData uniqueId;
|
||||
uniqueId.virtualDesktopId = VirtualDesktop::instance().GetCurrentVirtualDesktopId();
|
||||
|
||||
if (monitor)
|
||||
{
|
||||
uniqueId.deviceName = FancyZonesUtils::TrimDeviceId(deviceId);
|
||||
}
|
||||
else
|
||||
{
|
||||
uniqueId.deviceName = ZonedWindowProperties::MultiMonitorDeviceID;
|
||||
}
|
||||
|
||||
FancyZonesDataTypes::DeviceIdData parentId{};
|
||||
FancyZonesDataTypes::WorkAreaId parentId{};
|
||||
auto parentArea = m_workAreaHandler.GetWorkArea(VirtualDesktop::instance().GetPreviousVirtualDesktopId(), monitor);
|
||||
if (parentArea)
|
||||
{
|
||||
parentId = parentArea->UniqueId();
|
||||
}
|
||||
|
||||
auto workArea = MakeWorkArea(m_hinstance, monitor, uniqueId, parentId);
|
||||
auto workArea = MakeWorkArea(m_hinstance, monitor, id, parentId);
|
||||
if (workArea)
|
||||
{
|
||||
m_workAreaHandler.AddWorkArea(VirtualDesktop::instance().GetCurrentVirtualDesktopId(), monitor, workArea);
|
||||
@@ -852,34 +756,23 @@ void FancyZones::UpdateWorkAreas() noexcept
|
||||
{
|
||||
if (FancyZonesSettings::settings().spanZonesAcrossMonitors)
|
||||
{
|
||||
AddWorkArea(nullptr, {});
|
||||
FancyZonesDataTypes::WorkAreaId workAreaId;
|
||||
workAreaId.virtualDesktopId = VirtualDesktop::instance().GetCurrentVirtualDesktopId();
|
||||
workAreaId.monitorId = { .deviceId = { .id = ZonedWindowProperties::MultiMonitorName, .instanceId = ZonedWindowProperties::MultiMonitorInstance } };
|
||||
|
||||
AddWorkArea(nullptr, workAreaId);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mapping between display device name and device index (operating system identifies each display device with an index value).
|
||||
std::unordered_map<std::wstring, DWORD> displayDeviceIdxMap;
|
||||
struct capture
|
||||
auto monitors = MonitorUtils::IdentifyMonitors();
|
||||
for (const auto& monitor : monitors)
|
||||
{
|
||||
FancyZones* fancyZones;
|
||||
std::unordered_map<std::wstring, DWORD>* displayDeviceIdx;
|
||||
};
|
||||
FancyZonesDataTypes::WorkAreaId workAreaId;
|
||||
workAreaId.virtualDesktopId = VirtualDesktop::instance().GetCurrentVirtualDesktopId();
|
||||
workAreaId.monitorId = monitor;
|
||||
|
||||
auto callback = [](HMONITOR monitor, HDC, RECT*, LPARAM data) -> BOOL {
|
||||
capture* params = reinterpret_cast<capture*>(data);
|
||||
MONITORINFOEX mi{ { .cbSize = sizeof(mi) } };
|
||||
if (GetMonitorInfoW(monitor, &mi))
|
||||
{
|
||||
auto& displayDeviceIdxMap = *(params->displayDeviceIdx);
|
||||
FancyZones* fancyZones = params->fancyZones;
|
||||
|
||||
std::wstring deviceId = FancyZonesUtils::GetDisplayDeviceId(mi.szDevice, displayDeviceIdxMap);
|
||||
fancyZones->AddWorkArea(monitor, deviceId);
|
||||
}
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
capture capture{ this, &displayDeviceIdxMap };
|
||||
EnumDisplayMonitors(nullptr, nullptr, callback, reinterpret_cast<LPARAM>(&capture));
|
||||
AddWorkArea(monitor.monitor, workAreaId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user