Compare commits
126 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18fc38115b | ||
|
|
9d8bfead0c | ||
|
|
8872cf651b | ||
|
|
702b69d5a4 | ||
|
|
bdc1889eba | ||
|
|
9d7c9c1746 | ||
|
|
feead9c68b | ||
|
|
5d4b365910 | ||
|
|
dda4bfa6b8 | ||
|
|
3f3e837c36 | ||
|
|
006165574e | ||
|
|
c8b7995d8c | ||
|
|
82ff6400eb | ||
|
|
9b3e8503a8 | ||
|
|
7e291fb303 | ||
|
|
086eb58d80 | ||
|
|
96f34ee4e9 | ||
|
|
7001d8c79f | ||
|
|
6e515954dd | ||
|
|
f489626f6e | ||
|
|
c7d1465946 | ||
|
|
76ebed0897 | ||
|
|
fcfbb67123 | ||
|
|
bc603f88ce | ||
|
|
f39691cdbc | ||
|
|
1383e9666c | ||
|
|
eb235eef37 | ||
|
|
fc68f1810e | ||
|
|
49a6359990 | ||
|
|
311a4dbae9 | ||
|
|
55c5cf850f | ||
|
|
a4f4d5985a | ||
|
|
c0d5f36224 | ||
|
|
56264eb089 | ||
|
|
66c8d38e59 | ||
|
|
a06a62b986 | ||
|
|
7d742760e7 | ||
|
|
9207983abb | ||
|
|
78d65a87cd | ||
|
|
2274e0c67d | ||
|
|
d9c0af232b | ||
|
|
785160653c | ||
|
|
eedea3159c | ||
|
|
768603eb61 | ||
|
|
bb67764be6 | ||
|
|
16c7a22410 | ||
|
|
e7d3aadec3 | ||
|
|
a3b7c70fe0 | ||
|
|
f44bf99dfd | ||
|
|
13db8575e0 | ||
|
|
c26e23b904 | ||
|
|
5c431b5ac5 | ||
|
|
c85305695e | ||
|
|
4c796c0b53 | ||
|
|
8cea22aaf1 | ||
|
|
b6fe34cada | ||
|
|
e9d0f16d2e | ||
|
|
df80bd461d | ||
|
|
a1d5df23a8 | ||
|
|
de72a9860d | ||
|
|
bbd108be7e | ||
|
|
de130171e9 | ||
|
|
4e3c965511 | ||
|
|
ae57ca07f0 | ||
|
|
405d79e72f | ||
|
|
733041ba2b | ||
|
|
9100e03be9 | ||
|
|
a5ecbc4088 | ||
|
|
ae65e55c14 | ||
|
|
efa09182d3 | ||
|
|
c0217a3cc4 | ||
|
|
7f4a2ca6db | ||
|
|
5d6160cf7a | ||
|
|
3753642f23 | ||
|
|
dae63ce3b9 | ||
|
|
1fe9d95322 | ||
|
|
6ef439bda4 | ||
|
|
dd14fe0c42 | ||
|
|
3d54cb8385 | ||
|
|
792331e5a6 | ||
|
|
6caf472798 | ||
|
|
0d0aaca0e6 | ||
|
|
5a0f9a3a2d | ||
|
|
65f457e9d1 | ||
|
|
b1ad9160cc | ||
|
|
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 |
2
.gitattributes
vendored
@@ -15,3 +15,5 @@
|
||||
*.rc diff
|
||||
|
||||
*.gcode linguist-detectable=false
|
||||
|
||||
*.vsconfig linguist-language=json
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -48,11 +48,14 @@ body:
|
||||
- G-code Thumbnail
|
||||
- PowerRename
|
||||
- PowerToys Run
|
||||
- Quick Accent
|
||||
- Screen ruler
|
||||
- Shortcut Guide
|
||||
- STL Thumbnail
|
||||
- SVG Preview
|
||||
- SVG Thumbnail
|
||||
- Settings
|
||||
- TextExtractor
|
||||
- Video Conference Mute
|
||||
- Welcome / PowerToys Tour window
|
||||
- System tray interaction
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/translation_issue.yml
vendored
@@ -37,8 +37,10 @@ body:
|
||||
- PDF Thumbnail
|
||||
- G-code Preview
|
||||
- G-code Thumbnail
|
||||
- Quick Accent
|
||||
- PowerRename
|
||||
- PowerToys Run
|
||||
- Screen Ruler
|
||||
- Shortcut Guide
|
||||
- SVG Preview
|
||||
- SVG Thumbnail
|
||||
|
||||
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>
|
||||
|
||||
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
|
||||
|
||||
2
.github/actions/spell-check/excludes.txt
vendored
@@ -71,7 +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$
|
||||
^\Q.github/workflows/spelling2.yml\E$
|
||||
^\Q.pipelines/ESRPSigning_core.json\E$
|
||||
|
||||
159
.github/actions/spell-check/expect.txt
vendored
@@ -20,7 +20,6 @@ actioned
|
||||
activatable
|
||||
ACTIVATEAPP
|
||||
activationaction
|
||||
adamchilders
|
||||
ADDUNDORECORD
|
||||
ADifferent
|
||||
ADMINS
|
||||
@@ -52,6 +51,7 @@ Andreanof
|
||||
anges
|
||||
angularsen
|
||||
ansicolor
|
||||
antialias
|
||||
ANull
|
||||
AOC
|
||||
aocfnapldcnfbofgmbbllojgocaelgdd
|
||||
@@ -60,13 +60,11 @@ APeriod
|
||||
api
|
||||
APIENTRY
|
||||
APIIs
|
||||
Apm
|
||||
APPBARDATA
|
||||
appdata
|
||||
APPICON
|
||||
appid
|
||||
appium
|
||||
APPLASTZONE
|
||||
Applets
|
||||
Applicationcan
|
||||
applicationframehost
|
||||
@@ -77,7 +75,6 @@ apps
|
||||
appwindow
|
||||
appwiz
|
||||
appx
|
||||
appxmanifest
|
||||
APSTUDIO
|
||||
AQS
|
||||
Aqtobe
|
||||
@@ -119,11 +116,12 @@ Aut
|
||||
Authenticode
|
||||
AUTHN
|
||||
AUTHZ
|
||||
Autofill
|
||||
autogenerate
|
||||
autogenerated
|
||||
AUTOHIDE
|
||||
AUTOMATIONPROPERTIES
|
||||
Autorun
|
||||
Autosave
|
||||
Autostart
|
||||
AUTOUPDATE
|
||||
AValid
|
||||
@@ -131,9 +129,7 @@ Avanc
|
||||
Awaitable
|
||||
awakeness
|
||||
awakeversion
|
||||
AWAYMODE
|
||||
AYUV
|
||||
azchohfi
|
||||
backend
|
||||
backtracer
|
||||
BADD
|
||||
@@ -142,7 +138,6 @@ Bashkortostan
|
||||
Bayan
|
||||
bbwe
|
||||
bck
|
||||
Bcl
|
||||
Belarus
|
||||
betadele
|
||||
betsegaw
|
||||
@@ -152,12 +147,13 @@ bhid
|
||||
Bicubic
|
||||
bigbar
|
||||
bigobj
|
||||
binaryformatter
|
||||
binlog
|
||||
BITMAPFILEHEADER
|
||||
bitmapimage
|
||||
BITMAPINFO
|
||||
BITMAPINFOHEADER
|
||||
bitmask
|
||||
BITSPIXEL
|
||||
bla
|
||||
Blockquotes
|
||||
blog
|
||||
@@ -263,6 +259,7 @@ CMINVOKECOMMANDINFOEX
|
||||
CMock
|
||||
CMONITORS
|
||||
cmp
|
||||
cmpgt
|
||||
cmyk
|
||||
cnt
|
||||
Cocklebiddy
|
||||
@@ -272,6 +269,7 @@ CODENAME
|
||||
codeofconduct
|
||||
codereview
|
||||
Codespaces
|
||||
codicon
|
||||
COINIT
|
||||
colorconv
|
||||
colorformat
|
||||
@@ -305,6 +303,7 @@ CONFLICTINGMODIFIERSHORTCUT
|
||||
CONOUT
|
||||
Consolas
|
||||
constexpr
|
||||
consts
|
||||
contentdialog
|
||||
contentfiles
|
||||
CONTEXTHELP
|
||||
@@ -313,7 +312,7 @@ CONTEXTMENUHANDLER
|
||||
CONTROLL
|
||||
CONTROLPARENT
|
||||
Controlz
|
||||
Coords
|
||||
coord
|
||||
copiedcolorrepresentation
|
||||
cortana
|
||||
cotaskmem
|
||||
@@ -364,6 +363,8 @@ customaction
|
||||
CUSTOMACTIONTEST
|
||||
cvd
|
||||
CVirtual
|
||||
cvtepu
|
||||
cvtsi
|
||||
cwchar
|
||||
cwd
|
||||
cxfksword
|
||||
@@ -377,6 +378,9 @@ CYVIRTUALSCREEN
|
||||
cziplib
|
||||
Dac
|
||||
dacl
|
||||
DAffine
|
||||
DAFFINETRANSFORM
|
||||
damienleroy
|
||||
Danmarkshavn
|
||||
DARKPURPLE
|
||||
DARKTEAL
|
||||
@@ -390,12 +394,16 @@ Dbg
|
||||
Dbghelp
|
||||
DBLCLKS
|
||||
DBLEPSILON
|
||||
DCapture
|
||||
DCBA
|
||||
DCOM
|
||||
dcommon
|
||||
dcomp
|
||||
dcompi
|
||||
DComposition
|
||||
DDevice
|
||||
ddf
|
||||
DDLM
|
||||
DDxgi
|
||||
Deact
|
||||
debian
|
||||
debugbreak
|
||||
@@ -417,7 +425,6 @@ deinitialization
|
||||
DELA
|
||||
deletethis
|
||||
Delimarsky
|
||||
delims
|
||||
dend
|
||||
DENORMAL
|
||||
Deondre
|
||||
@@ -463,6 +470,7 @@ DNLEN
|
||||
Dns
|
||||
doctype
|
||||
DONOTROUND
|
||||
DONTRESOLVEDLLREFERENCES
|
||||
DONTVALIDATEPATH
|
||||
dotnet
|
||||
DPICHANGED
|
||||
@@ -471,12 +479,14 @@ DPolicy
|
||||
DPSAPI
|
||||
DQTAT
|
||||
DQTYPE
|
||||
dragdrop
|
||||
DRAWFRAME
|
||||
drawingcolor
|
||||
dreamsofameaningfullife
|
||||
drivedetectionwarning
|
||||
dshow
|
||||
dst
|
||||
DTo
|
||||
dutil
|
||||
DVASPECT
|
||||
DVASPECTINFO
|
||||
@@ -506,6 +516,7 @@ DWORDLONG
|
||||
dworigin
|
||||
dwrite
|
||||
dxgi
|
||||
dxgidebug
|
||||
dxgiformat
|
||||
dxguid
|
||||
ecount
|
||||
@@ -521,8 +532,10 @@ ekus
|
||||
elif
|
||||
elseif
|
||||
eltociear
|
||||
emmintrin
|
||||
Emoji
|
||||
emptyrecyclebin
|
||||
ENABLEDELAYEDEXPANSION
|
||||
ENABLEDPOPUP
|
||||
endforeach
|
||||
endian
|
||||
@@ -537,11 +550,13 @@ enum
|
||||
EOAC
|
||||
EOL
|
||||
epicgames
|
||||
epu
|
||||
Eqn
|
||||
ERASEBKGND
|
||||
EREOF
|
||||
EResize
|
||||
ERole
|
||||
ERRORLEVEL
|
||||
ERRORMESSAGE
|
||||
ERRORTITLE
|
||||
ESettings
|
||||
@@ -563,6 +578,7 @@ EWXREBOOT
|
||||
EWXSHUTDOWN
|
||||
examplehandler
|
||||
examplepowertoy
|
||||
EXCLUDEFROMCAPTURE
|
||||
exdisp
|
||||
Executables
|
||||
executionpolicy
|
||||
@@ -602,18 +618,15 @@ FILESUBTYPE
|
||||
FILESYSPATH
|
||||
filesystem
|
||||
FILETIME
|
||||
FILETYPE
|
||||
filetype
|
||||
FILEVERSION
|
||||
Filtergraph
|
||||
Filterkeyboard
|
||||
Filterx
|
||||
finalizer
|
||||
findfast
|
||||
findstr
|
||||
Firefox
|
||||
FIXEDFILEINFO
|
||||
FLASHZONES
|
||||
FLASHZONESONQUICKSWITCH
|
||||
flt
|
||||
flyout
|
||||
fmtlib
|
||||
@@ -635,7 +648,6 @@ Functiondiscoverykeys
|
||||
Futuna
|
||||
fwlink
|
||||
fwrite
|
||||
fxcop
|
||||
FZE
|
||||
gabime
|
||||
GAC
|
||||
@@ -647,7 +659,6 @@ GBs
|
||||
GCLP
|
||||
gcnew
|
||||
gcode
|
||||
gcodepreviewhandler
|
||||
gdi
|
||||
gdiplus
|
||||
GDISCALED
|
||||
@@ -661,14 +672,16 @@ GETMINMAXINFO
|
||||
GETSTATE
|
||||
GETTEXT
|
||||
GETTEXTLENGTH
|
||||
GHND
|
||||
github
|
||||
githubusercontent
|
||||
globals
|
||||
GMEM
|
||||
GNumber
|
||||
google
|
||||
GPTR
|
||||
gpu
|
||||
GSM
|
||||
gsuberland
|
||||
gtm
|
||||
gui
|
||||
guiddef
|
||||
@@ -676,13 +689,12 @@ GUITHREADINFO
|
||||
GValue
|
||||
gwl
|
||||
GWLP
|
||||
haccel
|
||||
HACCEL
|
||||
hangeul
|
||||
hanselman
|
||||
hardcoded
|
||||
Hardlines
|
||||
HARDWAREINPUT
|
||||
harvastum
|
||||
hashcode
|
||||
Hashset
|
||||
Hashtable
|
||||
@@ -706,13 +718,12 @@ helptext
|
||||
Heure
|
||||
HEVC
|
||||
hfile
|
||||
HGFE
|
||||
hglobal
|
||||
hhk
|
||||
HHmmss
|
||||
HHOOK
|
||||
hhx
|
||||
Hiber
|
||||
Hiberboot
|
||||
HIBYTE
|
||||
HICON
|
||||
HIDEWINDOW
|
||||
@@ -739,16 +750,19 @@ hmonitor
|
||||
HOLDENTER
|
||||
HOLDESC
|
||||
homepage
|
||||
HOMEPATH
|
||||
homljgmgpmcbpjbnjpfijnhipfkiclkd
|
||||
HOOKPROC
|
||||
Hostbackdropbrush
|
||||
hostname
|
||||
hotfix
|
||||
hotkeycontrol
|
||||
hotkeys
|
||||
hotlight
|
||||
hotspot
|
||||
Hovd
|
||||
HPAINTBUFFER
|
||||
HPALETTE
|
||||
HRAWINPUT
|
||||
hread
|
||||
HREDRAW
|
||||
@@ -763,6 +777,7 @@ hsl
|
||||
hstring
|
||||
hsv
|
||||
htcfreek
|
||||
HTCLIENT
|
||||
HTHUMBNAIL
|
||||
HTTRANSPARENT
|
||||
HValue
|
||||
@@ -791,6 +806,7 @@ ICapture
|
||||
icase
|
||||
ICEBLUE
|
||||
IClass
|
||||
IClosable
|
||||
ICollection
|
||||
IColor
|
||||
ICommand
|
||||
@@ -798,13 +814,13 @@ IComparer
|
||||
ICompositor
|
||||
ICONERROR
|
||||
IContext
|
||||
ICONWARNING
|
||||
ICreate
|
||||
IData
|
||||
IDD
|
||||
IDelayed
|
||||
IDesktop
|
||||
IDictionary
|
||||
IDirect
|
||||
IDirectory
|
||||
IDispatch
|
||||
IDispatcher
|
||||
@@ -813,6 +829,7 @@ idl
|
||||
IDLIST
|
||||
IDOn
|
||||
IDR
|
||||
IDrawing
|
||||
IDrive
|
||||
idx
|
||||
IDXGI
|
||||
@@ -838,8 +855,10 @@ IFilter
|
||||
ifndef
|
||||
IFolder
|
||||
IFormat
|
||||
IFormatter
|
||||
ifstream
|
||||
IGraph
|
||||
IGraphics
|
||||
iid
|
||||
IImage
|
||||
Iindex
|
||||
@@ -957,7 +976,6 @@ ISingle
|
||||
ISmart
|
||||
isocpp
|
||||
iss
|
||||
IStorage
|
||||
IStream
|
||||
istreambuf
|
||||
istringstream
|
||||
@@ -985,7 +1003,7 @@ IVirtual
|
||||
IWbem
|
||||
IWIC
|
||||
iwindow
|
||||
IWork
|
||||
iwr
|
||||
IXml
|
||||
IYUV
|
||||
IZone
|
||||
@@ -993,6 +1011,7 @@ IZoom
|
||||
JArray
|
||||
jarro
|
||||
Jarryd
|
||||
jefflord
|
||||
jfif
|
||||
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
|
||||
jjw
|
||||
@@ -1090,10 +1109,11 @@ lmcons
|
||||
LMEM
|
||||
LMENU
|
||||
lnk
|
||||
LOADSTRING
|
||||
LOADLIBRARYASDATAFILE
|
||||
LOBYTE
|
||||
LOCALAPPDATA
|
||||
LOCALDISPLAY
|
||||
localhost
|
||||
LOCALPACKAGE
|
||||
localport
|
||||
localtime
|
||||
@@ -1111,6 +1131,7 @@ lookbehind
|
||||
lowlevel
|
||||
LOWORD
|
||||
lparam
|
||||
LPBITMAPINFOHEADER
|
||||
LPBYTE
|
||||
LPCITEMIDLIST
|
||||
LPCMINVOKECOMMANDINFO
|
||||
@@ -1130,7 +1151,6 @@ lpsz
|
||||
lpt
|
||||
LPTHREAD
|
||||
LPTOP
|
||||
lptpm
|
||||
LPTSTR
|
||||
LPVOID
|
||||
LPW
|
||||
@@ -1155,7 +1175,6 @@ Magadan
|
||||
Mainwindow
|
||||
majortype
|
||||
MAJORVERSION
|
||||
makeappx
|
||||
makecab
|
||||
MAKEINTRESOURCE
|
||||
MAKEINTRESOURCEW
|
||||
@@ -1187,7 +1206,6 @@ MCDT
|
||||
MCST
|
||||
MDICHILD
|
||||
MDL
|
||||
mdpreviewhandler
|
||||
mdtext
|
||||
mdtxt
|
||||
mdwn
|
||||
@@ -1197,10 +1215,8 @@ Melman
|
||||
memcmp
|
||||
memcpy
|
||||
memset
|
||||
MENUBREAK
|
||||
MENUITEMINFO
|
||||
MENUITEMINFOW
|
||||
messageboxes
|
||||
Metadatas
|
||||
metafile
|
||||
mfapi
|
||||
@@ -1225,6 +1241,7 @@ MINIMIZEEND
|
||||
MINIMIZESTART
|
||||
miniz
|
||||
minlevel
|
||||
minmax
|
||||
MINORVERSION
|
||||
Miracast
|
||||
Mishkeegogamang
|
||||
@@ -1240,6 +1257,7 @@ mmsystem
|
||||
mockapi
|
||||
MODECHANGE
|
||||
modernwpf
|
||||
MODESPRUNED
|
||||
Moldova
|
||||
Mongala
|
||||
MONITORINFO
|
||||
@@ -1251,12 +1269,11 @@ Moq
|
||||
MOUSEACTIVATE
|
||||
MOUSEHWHEEL
|
||||
MOUSEINPUT
|
||||
MOUSELEAVE
|
||||
MOUSEMOVE
|
||||
MOUSESWITCH
|
||||
MOUSEWHEEL
|
||||
MOVESIZEEND
|
||||
MOVESIZESTART
|
||||
MOVEWINDOWS
|
||||
mozilla
|
||||
mpmc
|
||||
MRM
|
||||
@@ -1275,9 +1292,7 @@ MSIHANDLE
|
||||
msiquery
|
||||
MSIRESTARTMANAGERCONTROL
|
||||
msix
|
||||
msixbundle
|
||||
MSIXCA
|
||||
MSIXVERSION
|
||||
MSLLHOOKSTRUCT
|
||||
Mso
|
||||
msp
|
||||
@@ -1295,14 +1310,13 @@ Mundrabilla
|
||||
mutex
|
||||
mutexes
|
||||
muxc
|
||||
mvvm
|
||||
MVVM
|
||||
myfile
|
||||
MYICON
|
||||
MYTZ
|
||||
NAMECHANGE
|
||||
nameof
|
||||
namespace
|
||||
namespaceanddescendants
|
||||
Navassa
|
||||
NCACTIVATE
|
||||
ncc
|
||||
@@ -1329,6 +1343,7 @@ NDEBUG
|
||||
Ndombe
|
||||
ndp
|
||||
NEEDDISPATCH
|
||||
NEQ
|
||||
NESW
|
||||
netcore
|
||||
netcoreapp
|
||||
@@ -1356,6 +1371,7 @@ NOASYNC
|
||||
NOCLOSEPROCESS
|
||||
NOCOPYBITS
|
||||
nodeca
|
||||
nodiscard
|
||||
nodoc
|
||||
noexcept
|
||||
NOINHERITLAYOUT
|
||||
@@ -1384,7 +1400,6 @@ Noronha
|
||||
NOSEARCH
|
||||
NOSENDCHANGING
|
||||
NOSIZE
|
||||
notafter
|
||||
notfound
|
||||
nothrow
|
||||
NOTIFICATIONSDLL
|
||||
@@ -1404,7 +1419,6 @@ ntdll
|
||||
NTFS
|
||||
NTSTATUS
|
||||
nuget
|
||||
nuint
|
||||
nullonfailure
|
||||
nullopt
|
||||
nullptr
|
||||
@@ -1413,12 +1427,14 @@ NUMLOCK
|
||||
NUMPAD
|
||||
Nunavut
|
||||
Nusa
|
||||
nushell
|
||||
nwc
|
||||
NWSE
|
||||
Objbase
|
||||
OBJID
|
||||
objidl
|
||||
oblitum
|
||||
ocr
|
||||
odbc
|
||||
odbccp
|
||||
Oem
|
||||
@@ -1451,7 +1467,6 @@ ostream
|
||||
ostringstream
|
||||
OSVERSIONINFOEX
|
||||
OSVERSIONINFOEXW
|
||||
OSVERSIONINFOW
|
||||
osvi
|
||||
OUTOFCONTEXT
|
||||
OUTOFMEMORY
|
||||
@@ -1465,7 +1480,6 @@ overlaywindow
|
||||
Overridable
|
||||
Oversampling
|
||||
OWNDC
|
||||
OWNERDRAW
|
||||
PACL
|
||||
pagos
|
||||
PAINTSTRUCT
|
||||
@@ -1478,6 +1492,7 @@ PARENTNOTIFY
|
||||
PARENTRELATIVEEDITING
|
||||
PARENTRELATIVEFORADDRESSBAR
|
||||
PARENTRELATIVEPARSING
|
||||
PArgb
|
||||
parray
|
||||
PARTIALCONFIRMATIONDIALOGTITLE
|
||||
pathcch
|
||||
@@ -1491,7 +1506,6 @@ PCIDLIST
|
||||
PCWSTR
|
||||
pdb
|
||||
pdbonly
|
||||
pdfpreviewhandler
|
||||
pdo
|
||||
pdto
|
||||
pdtobj
|
||||
@@ -1500,12 +1514,14 @@ PDWORD
|
||||
pedrolamas
|
||||
PERCEIVEDFLAG
|
||||
pesi
|
||||
peteblois
|
||||
PEXCEPTION
|
||||
pfn
|
||||
pfo
|
||||
pft
|
||||
pgp
|
||||
pguid
|
||||
PHANDLER
|
||||
phbm
|
||||
phbmp
|
||||
phwnd
|
||||
@@ -1533,8 +1549,10 @@ Pohnpei
|
||||
popup
|
||||
POPUPWINDOW
|
||||
posix
|
||||
poweraccent
|
||||
powercfg
|
||||
powerlauncher
|
||||
POWEROCR
|
||||
powerpreview
|
||||
powerrename
|
||||
POWERRENAMECONTEXTMENU
|
||||
@@ -1588,7 +1606,6 @@ PROPBAG
|
||||
PROPERTYKEY
|
||||
propkey
|
||||
propvarutil
|
||||
PRTL
|
||||
prvpane
|
||||
psapi
|
||||
PSECURITY
|
||||
@@ -1626,7 +1643,6 @@ QUERYENDSESSION
|
||||
QUERYOPEN
|
||||
QUEUESYNC
|
||||
Quickime
|
||||
QUICKLAYOUTSWITCH
|
||||
QUNS
|
||||
qwertyuiopasdfghjklzxcvbnm
|
||||
qword
|
||||
@@ -1645,7 +1661,6 @@ RBUTTONDBLCLK
|
||||
RBUTTONDOWN
|
||||
RBUTTONUP
|
||||
rclsid
|
||||
rcmaehl
|
||||
RCONTROL
|
||||
RCtrl
|
||||
readme
|
||||
@@ -1660,7 +1675,7 @@ rects
|
||||
recyclebin
|
||||
redirectedfrom
|
||||
Redist
|
||||
Redistributable
|
||||
redistributable
|
||||
reencode
|
||||
reencoded
|
||||
refactor
|
||||
@@ -1686,8 +1701,6 @@ remappings
|
||||
REMAPSUCCESSFUL
|
||||
REMAPUNSUCCESSFUL
|
||||
Remotable
|
||||
REMOTEDISPLAY
|
||||
REMOTESESSION
|
||||
Removelnk
|
||||
renamable
|
||||
RENAMEONCOLLISION
|
||||
@@ -1702,7 +1715,6 @@ Resizable
|
||||
resizers
|
||||
resmimetype
|
||||
RESOURCEID
|
||||
RESTORESIZE
|
||||
RESTORETOMAXIMIZED
|
||||
restrictedcapabilities
|
||||
restrictederrorinfo
|
||||
@@ -1724,11 +1736,13 @@ RIGHTSCROLLBAR
|
||||
riid
|
||||
riverar
|
||||
RKey
|
||||
RLO
|
||||
RMENU
|
||||
RNumber
|
||||
roadmap
|
||||
robmensching
|
||||
Roboto
|
||||
rooler
|
||||
roslyn
|
||||
Rothera
|
||||
roundf
|
||||
@@ -1742,7 +1756,6 @@ Rsp
|
||||
rst
|
||||
Rstrtmgr
|
||||
RTB
|
||||
RTCS
|
||||
RTLREADING
|
||||
RTSS
|
||||
runas
|
||||
@@ -1787,7 +1800,6 @@ Segoe
|
||||
Sekan
|
||||
SENDCHANGE
|
||||
sendvirtualinput
|
||||
serializationexception
|
||||
serializer
|
||||
serverside
|
||||
SETCONTEXT
|
||||
@@ -1804,10 +1816,10 @@ SETTINGCHANGE
|
||||
settingsheader
|
||||
settingshotkeycontrol
|
||||
SETWORKAREA
|
||||
setzero
|
||||
sfgao
|
||||
SFGAOF
|
||||
SFP
|
||||
shandsj
|
||||
sharpkeys
|
||||
SHCNE
|
||||
SHCNF
|
||||
@@ -1820,7 +1832,6 @@ SHELLEXECUTEINFOW
|
||||
shellscalingapi
|
||||
SHFILEINFO
|
||||
SHGFI
|
||||
SHIFTDRAG
|
||||
Shl
|
||||
shldisp
|
||||
shlobj
|
||||
@@ -1855,7 +1866,7 @@ siex
|
||||
SIGABRT
|
||||
sigdn
|
||||
SIGNINGSCENARIO
|
||||
signtool
|
||||
Signtool
|
||||
sinclairinat
|
||||
SINGLEKEY
|
||||
singlekeyremapcontrol
|
||||
@@ -1909,9 +1920,11 @@ srme
|
||||
srre
|
||||
srw
|
||||
srwlock
|
||||
sse
|
||||
ssf
|
||||
ssh
|
||||
sstream
|
||||
stackalloc
|
||||
STACKFRAME
|
||||
stackoverflow
|
||||
stackpanel
|
||||
@@ -1952,6 +1965,7 @@ stoull
|
||||
strcmp
|
||||
streampos
|
||||
strftime
|
||||
strikethrough
|
||||
Stringified
|
||||
Stringify
|
||||
STRINGIZE
|
||||
@@ -1972,6 +1986,7 @@ subkey
|
||||
SUBLANG
|
||||
submenu
|
||||
subquery
|
||||
subresource
|
||||
substr
|
||||
Sul
|
||||
Superbar
|
||||
@@ -1980,7 +1995,6 @@ sut
|
||||
SVE
|
||||
SVGIn
|
||||
SVGIO
|
||||
svgpreviewhandler
|
||||
svgz
|
||||
SWC
|
||||
SWFO
|
||||
@@ -2001,7 +2015,6 @@ SYSICONINDEX
|
||||
SYSKEY
|
||||
syskeydown
|
||||
SYSKEYUP
|
||||
SYSLIB
|
||||
syslog
|
||||
SYSMENU
|
||||
SYSTEMAPPS
|
||||
@@ -2026,6 +2039,7 @@ taskkill
|
||||
tasklist
|
||||
taskschd
|
||||
tchar
|
||||
Tcollab
|
||||
tcscpy
|
||||
TCustom
|
||||
tdbuild
|
||||
@@ -2038,9 +2052,9 @@ Tenggara
|
||||
testcase
|
||||
testhost
|
||||
testprocess
|
||||
testzones
|
||||
TEXCOORD
|
||||
textblock
|
||||
TEXTEXTRACTOR
|
||||
TEXTINCLUDE
|
||||
THH
|
||||
THICKFRAME
|
||||
@@ -2098,6 +2112,7 @@ TYPESHORTCUT
|
||||
UAC
|
||||
UAL
|
||||
uap
|
||||
ubuntu
|
||||
udit
|
||||
Udk
|
||||
Udmurtia
|
||||
@@ -2106,7 +2121,7 @@ uefi
|
||||
UHash
|
||||
UIA
|
||||
uid
|
||||
Uid
|
||||
UIEx
|
||||
uint
|
||||
uintptr
|
||||
UIPI
|
||||
@@ -2124,6 +2139,7 @@ undef
|
||||
UNDNAME
|
||||
unescape
|
||||
Unicast
|
||||
UNICODETEXT
|
||||
Unindent
|
||||
Uninitialize
|
||||
uninstall
|
||||
@@ -2148,7 +2164,6 @@ unsubscribe
|
||||
unvirtualized
|
||||
Updatelayout
|
||||
UPGRADINGPRODUCTCODE
|
||||
upto
|
||||
Uptool
|
||||
upvote
|
||||
uri
|
||||
@@ -2173,15 +2188,20 @@ Uvs
|
||||
uwp
|
||||
uxtheme
|
||||
UYVY
|
||||
vabdq
|
||||
validmodulename
|
||||
Vanara
|
||||
vcamp
|
||||
vcdl
|
||||
vcgtq
|
||||
VCINSTALLDIR
|
||||
vcm
|
||||
Vcpkg
|
||||
VCRT
|
||||
vcvars
|
||||
VDesktop
|
||||
vdi
|
||||
vdupq
|
||||
vec
|
||||
VERBSONLY
|
||||
VERBW
|
||||
@@ -2191,6 +2211,8 @@ VERSIONINFO
|
||||
Versioning
|
||||
vformat
|
||||
VFT
|
||||
vget
|
||||
vgetq
|
||||
vid
|
||||
VIDCAP
|
||||
videoconference
|
||||
@@ -2200,25 +2222,33 @@ viewbox
|
||||
viewmodel
|
||||
vih
|
||||
virtualization
|
||||
Virtualizing
|
||||
visiblecolorformats
|
||||
Visibletrue
|
||||
visualbrush
|
||||
visualstudio
|
||||
VKey
|
||||
VKTAB
|
||||
vmovl
|
||||
vorrq
|
||||
VOS
|
||||
vpaddlq
|
||||
Vpn
|
||||
vqsubq
|
||||
VREDRAW
|
||||
vreinterpretq
|
||||
VSC
|
||||
VSCBD
|
||||
vscdb
|
||||
vscode
|
||||
vsconfig
|
||||
VSCROLL
|
||||
vsetq
|
||||
vsonline
|
||||
vstemplate
|
||||
VSTHRD
|
||||
VSTT
|
||||
vswhere
|
||||
vtable
|
||||
Vtbl
|
||||
wbem
|
||||
@@ -2237,6 +2267,7 @@ wcscpy
|
||||
wcslen
|
||||
wcsncmp
|
||||
wcsnicmp
|
||||
WDA
|
||||
wdp
|
||||
wdupenv
|
||||
weakme
|
||||
@@ -2284,6 +2315,7 @@ winexe
|
||||
winforms
|
||||
winfx
|
||||
winget
|
||||
wingetcreate
|
||||
Winhook
|
||||
winkey
|
||||
WINL
|
||||
@@ -2297,6 +2329,7 @@ winsdkver
|
||||
winspool
|
||||
WINTHRESHOLD
|
||||
winui
|
||||
winuiex
|
||||
winxamlmanager
|
||||
wistd
|
||||
withinrafael
|
||||
@@ -2335,7 +2368,6 @@ wpr
|
||||
wprintf
|
||||
wprp
|
||||
wql
|
||||
WQL
|
||||
wregex
|
||||
WResize
|
||||
writefile
|
||||
@@ -2374,6 +2406,7 @@ XLoc
|
||||
XNamespace
|
||||
XOffset
|
||||
xpath
|
||||
XPixel
|
||||
XResource
|
||||
xsi
|
||||
XStr
|
||||
@@ -2392,11 +2425,9 @@ YVYU
|
||||
Zabaykalsky
|
||||
ZEROINIT
|
||||
ZIndex
|
||||
zipfile
|
||||
zonable
|
||||
ZONECOLOR
|
||||
ZONEHIGHLIGHTCOLOR
|
||||
zoneset
|
||||
ZONESETCHANGE
|
||||
Zoneszonabletester
|
||||
Zonev
|
||||
zzz
|
||||
|
||||
@@ -14,13 +14,20 @@
|
||||
\bMicroSoft\b
|
||||
|
||||
# s.b. another
|
||||
\ban other\b
|
||||
\ban[- ]other\b
|
||||
|
||||
# s.b. greater than
|
||||
\bgreater then\b
|
||||
|
||||
# s.b. less than
|
||||
\bless then\b
|
||||
|
||||
# s.b. otherwise
|
||||
\bother wise\b
|
||||
\bother[- ]wise\b
|
||||
|
||||
# s.b. nonexistent
|
||||
\bnon existing\b
|
||||
\b[Nn]o[nt][- ]existent\b
|
||||
|
||||
# s.b. preexisting
|
||||
[Pp]re-existing
|
||||
|
||||
6
.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
|
||||
@@ -104,7 +105,12 @@ 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
|
||||
|
||||
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
|
||||
|
||||
9
.github/workflows/spelling2.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
steps:
|
||||
- name: check-spelling
|
||||
id: spelling
|
||||
uses: check-spelling/check-spelling@v0.0.20-alpha7
|
||||
uses: check-spelling/check-spelling@v0.0.20
|
||||
with:
|
||||
config: .github/actions/spell-check
|
||||
suppress_push_for_open_pull_request: 1
|
||||
@@ -46,13 +46,8 @@ jobs:
|
||||
if: (success() || failure()) && needs.spelling.outputs.followup
|
||||
steps:
|
||||
- name: comment
|
||||
uses: check-spelling/check-spelling@v0.0.20-alpha7
|
||||
uses: check-spelling/check-spelling@v0.0.20
|
||||
with:
|
||||
config: .github/actions/spell-check
|
||||
checkout: true
|
||||
task: ${{ needs.spelling.outputs.followup }}
|
||||
extra_dictionaries:
|
||||
cspell:filetypes/filetypes.txt
|
||||
cspell:html/html.txt
|
||||
cspell:css/css.txt
|
||||
check_extra_dictionaries: ''
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
"modules\\AlwaysOnTop\\PowerToys.AlwaysOnTop.exe",
|
||||
"modules\\AlwaysOnTop\\PowerToys.AlwaysOnTopModuleInterface.dll",
|
||||
|
||||
"modules\\ColorPicker\\ColorPicker.dll",
|
||||
"modules\\ColorPicker\\ColorPickerUI.dll",
|
||||
"modules\\ColorPicker\\ColorPickerUI.exe",
|
||||
|
||||
"modules\\ColorPicker\\PowerToys.ColorPicker.dll",
|
||||
"modules\\ColorPicker\\PowerToys.ColorPickerUI.dll",
|
||||
"modules\\ColorPicker\\PowerToys.ColorPickerUI.exe",
|
||||
|
||||
"modules\\PowerOCR\\PowerToys.PowerOCRModuleInterface.dll",
|
||||
"modules\\PowerOCR\\PowerToys.PowerOCR.dll",
|
||||
"modules\\PowerOCR\\PowerToys.PowerOCR.exe",
|
||||
|
||||
"modules\\Awake\\PowerToys.AwakeModuleInterface.dll",
|
||||
"modules\\Awake\\PowerToys.Awake.exe",
|
||||
"modules\\Awake\\PowerToys.Awake.dll",
|
||||
@@ -86,6 +86,7 @@
|
||||
"modules\\launcher\\Plugins\\Folder\\Microsoft.Plugin.Folder.dll",
|
||||
"modules\\launcher\\Plugins\\Indexer\\Microsoft.Plugin.Indexer.dll",
|
||||
"modules\\launcher\\Plugins\\OneNote\\Microsoft.PowerToys.Run.Plugin.OneNote.dll",
|
||||
"modules\\launcher\\Plugins\\History\\Microsoft.PowerToys.Run.Plugin.History.dll",
|
||||
"modules\\launcher\\Plugins\\Program\\Microsoft.Plugin.Program.dll",
|
||||
"modules\\launcher\\Plugins\\Registry\\Microsoft.PowerToys.Run.Plugin.Registry.dll",
|
||||
"modules\\launcher\\Plugins\\WindowsSettings\\Microsoft.PowerToys.Run.Plugin.WindowsSettings.dll",
|
||||
@@ -101,10 +102,23 @@
|
||||
"modules\\launcher\\Plugins\\WebSearch\\Community.PowerToys.Run.Plugin.WebSearch.dll",
|
||||
"modules\\launcher\\Plugins\\WindowsTerminal\\Microsoft.PowerToys.Run.Plugin.WindowsTerminal.dll",
|
||||
|
||||
"modules\\MeasureTool\\PowerToys.MeasureToolModuleInterface.dll",
|
||||
"modules\\MeasureTool\\PowerToys.MeasureToolCore.dll",
|
||||
"modules\\MeasureTool\\PowerToys.MeasureToolUI.dll",
|
||||
"modules\\MeasureTool\\PowerToys.MeasureToolUI.exe",
|
||||
|
||||
"modules\\MouseUtils\\PowerToys.FindMyMouse.dll",
|
||||
"modules\\MouseUtils\\PowerToys.MouseHighlighter.dll",
|
||||
"modules\\MouseUtils\\PowerToys.MousePointerCrosshairs.dll",
|
||||
|
||||
"modules\\PowerAccent\\PowerAccent.Core.dll",
|
||||
"modules\\PowerAccent\\PowerAccent.dll",
|
||||
"modules\\PowerAccent\\PowerAccent.exe",
|
||||
"modules\\PowerAccent\\PowerToys.PowerAccent.dll",
|
||||
"modules\\PowerAccent\\PowerToys.PowerAccent.exe",
|
||||
"modules\\PowerAccent\\PowerToys.PowerAccentModuleInterface.dll",
|
||||
"modules\\PowerAccent\\PowerToys.PowerAccentKeyboardService.dll",
|
||||
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameExt.dll",
|
||||
"modules\\PowerRename\\PowerToys.PowerRename.exe",
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameContextMenu.dll",
|
||||
@@ -186,7 +200,12 @@
|
||||
"vccorlib140_app.dll",
|
||||
"vcomp140_app.dll",
|
||||
"vcruntime140_1_app.dll",
|
||||
"vcruntime140_app.dll",
|
||||
"vcruntime140_app.dll",
|
||||
"modules\\PowerAccent\\Vanara.Core.dll",
|
||||
"modules\\PowerAccent\\Vanara.PInvoke.Gdi32.dll",
|
||||
"modules\\PowerAccent\\Vanara.PInvoke.Kernel32.dll",
|
||||
"modules\\PowerAccent\\Vanara.PInvoke.Shared.dll",
|
||||
"modules\\PowerAccent\\Vanara.PInvoke.User32.dll",
|
||||
"modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Core.dll",
|
||||
"modules\\FileExplorerPreview\\Microsoft.Web.WebView2.WinForms.dll",
|
||||
"modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Wpf.dll",
|
||||
|
||||
@@ -7,6 +7,41 @@ steps:
|
||||
submodules: true
|
||||
clean: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for PowerToys.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for BugReportTool.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for WebcamReportTool.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for StylesReportTool.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for PowerToysSetup.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET 6 SDK'
|
||||
inputs:
|
||||
@@ -184,4 +219,5 @@ steps:
|
||||
**\UnitTests-CommonLib.dll
|
||||
**\PowerRenameUnitTests.dll
|
||||
**\powerpreviewTest.dll
|
||||
**\UnitTests-FancyZones.dll
|
||||
!**\obj\**
|
||||
|
||||
@@ -279,6 +279,22 @@ jobs:
|
||||
configuration: $(BuildConfiguration)
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Publish Measure Tool UI for Packaging
|
||||
inputs:
|
||||
solution: 'src/modules/MeasureTool/MeasureToolUI/MeasureToolUI.csproj'
|
||||
vsVersion: 17.0
|
||||
# The arguments should be the same as the ones for Settings; make sure they are.
|
||||
msbuildArgs: >-
|
||||
/target:Publish
|
||||
/p:Configuration=$(BuildConfiguration);Platform=$(BuildPlatform);AppxBundle=Never
|
||||
/p:VCRTForwarders-IncludeDebugCRT=false
|
||||
/p:PowerToysRoot=$(Build.SourcesDirectory)
|
||||
/p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Build PowerToysSetupCustomActions DLL # This dll needs to be build and signed before building the MSI.
|
||||
inputs:
|
||||
@@ -471,7 +487,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'
|
||||
|
||||
63
.pipelines/verifyArm64Configuration.ps1
Normal file
@@ -0,0 +1,63 @@
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$True,Position=1)]
|
||||
[string]$solution
|
||||
)
|
||||
|
||||
Write-Output "Verifying Arm64 configuration for $solution"
|
||||
|
||||
$errorTable = @{}
|
||||
|
||||
$MSBuildLoc = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\Microsoft.Build.dll
|
||||
if ($null -eq $MSBuildLoc) {
|
||||
throw "Unable to locate Microsoft.Build.dll"
|
||||
}
|
||||
|
||||
try {
|
||||
Add-Type -Path $MSBuildLoc
|
||||
}
|
||||
catch {
|
||||
# Catching because it may error on loading all the types from the assembly, but we only need one
|
||||
}
|
||||
|
||||
$solutionFile = [Microsoft.Build.Construction.SolutionFile]::Parse($solution);
|
||||
$arm64SlnConfigs = $solutionFile.SolutionConfigurations | Where-Object {
|
||||
$_.PlatformName -eq "ARM64"
|
||||
};
|
||||
|
||||
# Should have two configurations. Debug and Release.
|
||||
if($arm64SlnConfigs.Length -lt 2) {
|
||||
Write-Host -ForegroundColor Red "Missing Solution-level Arm64 platforms"
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# List projects only.
|
||||
$projects = $solutionFile.ProjectsInOrder | Where-Object {
|
||||
$_.ProjectType -eq "KnownToBeMSBuildFormat"
|
||||
};
|
||||
|
||||
# Enumerate through the projects and add any project with a mismatched platform and project configuration
|
||||
foreach ($project in $projects) {
|
||||
foreach ($slnConfig in $arm64SlnConfigs.FullName) {
|
||||
if ($project.ProjectConfigurations.$slnConfig.FullName -ne $slnConfig) {
|
||||
$errorTable[$project.ProjectName] += @(""
|
||||
| Select-Object @{n = "Configuration"; e = { $project.ProjectConfigurations.$slnConfig.FullName } },
|
||||
@{n = "ExpectedConfiguration"; e = { $slnConfig } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($errorTable.Count -gt 0) {
|
||||
Write-Host -ForegroundColor Red "Verification failed for the following projects:`n"
|
||||
$errorTable.Keys | ForEach-Object {
|
||||
Write-Host -ForegroundColor Red $_`:;
|
||||
$errorTable[$_] | ForEach-Object {
|
||||
Write-Host -ForegroundColor Red "$($_.ExpectedConfiguration)=$($_.Configuration)";
|
||||
};
|
||||
Write-Host -ForegroundColor Red `r
|
||||
}
|
||||
exit 1;
|
||||
}
|
||||
|
||||
Write-Output "Verification Complete"
|
||||
exit 0;
|
||||
@@ -25,7 +25,7 @@ if($items.Count -eq 0)
|
||||
exit 1;
|
||||
}
|
||||
|
||||
$items | ForEach-Object {
|
||||
$items | ForEach-Object {
|
||||
if($_.VersionInfo.FileVersion -eq "1.0.0.0" )
|
||||
{
|
||||
# These items are exceptions that actually have the 1.0.0.0 version.
|
||||
@@ -39,6 +39,30 @@ $items | ForEach-Object {
|
||||
(-not $_.Name.EndsWith("Microsoft.Xaml.Interactivity.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Release.Net.dll"))
|
||||
)
|
||||
{
|
||||
Write-Host "Version set to 1.0.0.0: " + $_.FullName
|
||||
$totalFailure++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$items | ForEach-Object {
|
||||
if($_.VersionInfo.FileVersion -eq $null )
|
||||
{
|
||||
# These items are exceptions that actually a version not set.
|
||||
if ((-not $_.Name.EndsWith("codicon.ttf")) -and
|
||||
(-not $_.Name.EndsWith("e_sqlite3.dll")) -and
|
||||
(-not $_.Name.EndsWith("vcamp140_app.dll")) -and
|
||||
(-not $_.Name.EndsWith("marshal.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.UI.Composition.OSSupport.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.UI.Xaml.Internal.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.Windows.ApplicationModel.Resources.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.dll")) -and
|
||||
(-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Bootstrap.dll")) -and
|
||||
(-not $_.Name.EndsWith("MRM.dll")) -and
|
||||
(-not $_.Name.EndsWith("PushNotificationsLongRunningTask.ProxyStub.dll")) -and
|
||||
(-not $_.Name.EndsWith("WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll"))
|
||||
)
|
||||
{
|
||||
Write-Host "Version not set: " + $_.FullName
|
||||
$totalFailure++;
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
||||
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
||||
"Microsoft.VisualStudio.Workload.Universal",
|
||||
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
|
||||
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
|
||||
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
|
||||
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
||||
"Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre",
|
||||
"Microsoft.VisualStudio.Component.VC.ATL.Spectre"
|
||||
|
||||
@@ -12,6 +12,9 @@ Aaron has helped triaging, discussing, and creating a substantial number of issu
|
||||
### [@CleanCodeDeveloper](https://github.com/CleanCodeDeveloper)
|
||||
CleanCodeDeveloper helped do massive amounts of code stability and image resizer work.
|
||||
|
||||
### [@damienleroy](https://github.com/damienleroy) - [Damien Leroy](https://www.linkedin.com/in/Damien-Leroy-b2734416a/)
|
||||
Damien has helped out by developing and contributing the Quick Accent utility.
|
||||
|
||||
### [@davidegiacometti](https://github.com/davidegiacometti) - [Davide Giacometti](https://www.linkedin.com/in/davidegiacometti/)
|
||||
Davide has helped fix multiple bugs, added new features, as well as help us with the ARM64 effort by porting applications to .NET Core.
|
||||
|
||||
@@ -59,6 +62,9 @@ Their fork of Wox was the base of PowerToys Run.
|
||||
|
||||
Initial base of jjw24's fork, which makes it the base of PowerToys Run.
|
||||
|
||||
### [Text-Grab](https://github.com/TheJoeFin/Text-Grab) - Joseph Finney
|
||||
Joe helped develop and contribute to the Text Extractor utility. It is directly based on his Text Grab application.
|
||||
|
||||
## Microsoft community members
|
||||
|
||||
We would like to also directly call out some extremely helpful Microsoft employees that have directly contributed to PowerToys. This isn't their day job and was work they did out of passion. We want to say thank you and recognize your work.
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Props that should be disabled while building on CI server -->
|
||||
@@ -32,11 +32,13 @@
|
||||
|
||||
<!-- C++ source compile-specific things for all configurations -->
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
<ExternalIncludePath>$(MSBuildThisFileFullPath)\..\deps\;$(ExternalIncludePath)</ExternalIncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
||||
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
||||
@@ -83,8 +85,10 @@
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!-- Global props -->
|
||||
<PropertyGroup Label="Globals" Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||
<PropertyGroup Label="Globals"
|
||||
Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Props that are constant for both Debug and Release configurations -->
|
||||
@@ -92,14 +96,17 @@
|
||||
<PlatformToolset Condition="'$(OverridePlatformToolset)'!='True'">v143</PlatformToolset>
|
||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<DesktopCompatible>true</DesktopCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Debug/Release props -->
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"
|
||||
Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"
|
||||
Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
|
||||
@@ -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>
|
||||
24
NOTICE.md
@@ -6,6 +6,7 @@ This software incorporates material from third parties.
|
||||
- ImageResizer
|
||||
- PowerToys Run
|
||||
- Installer/Runner
|
||||
- Measure tool
|
||||
|
||||
## Utility: Color Picker
|
||||
|
||||
@@ -274,3 +275,26 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
## Utility: Measure tool
|
||||
|
||||
### sse2neon
|
||||
We adopted some functions from it.
|
||||
|
||||
**Source**: https://github.com/DLTcollab/sse2neon
|
||||
|
||||
sse2neon is freely redistributable under the MIT License.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
188
PowerToys.sln
@@ -284,6 +284,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{B39DC643
|
||||
src\common\utils\process_path.h = src\common\utils\process_path.h
|
||||
src\common\utils\registry.h = src\common\utils\registry.h
|
||||
src\common\utils\resources.h = src\common\utils\resources.h
|
||||
src\common\utils\serialized.h = src\common\utils\serialized.h
|
||||
src\common\utils\string_utils.h = src\common\utils\string_utils.h
|
||||
src\common\utils\timeutil.h = src\common\utils\timeutil.h
|
||||
src\common\utils\UnhandledExceptionHandler.h = src\common\utils\UnhandledExceptionHandler.h
|
||||
@@ -407,7 +408,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRenameUI", "src\module
|
||||
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}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "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
|
||||
@@ -415,6 +416,39 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerContextMenu", "
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerLib", "src\modules\imageresizer\ImageResizerLib\ImageResizerLib.vcxproj", "{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PowerAccent", "PowerAccent", "{0F14491C-6369-4C45-AAA8-135814E66E6B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerAccentModuleInterface", "src\modules\poweraccent\PowerAccentModuleInterface\PowerAccentModuleInterface.vcxproj", "{34A354C5-23C7-4343-916C-C52DAF4FC39D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerAccent", "src\modules\poweraccent\PowerAccent\PowerAccent.csproj", "{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerAccent.Core", "src\modules\poweraccent\PowerAccent.Core\PowerAccent.Core.csproj", "{3264DF53-C805-4B0C-867C-FCEAF7AEF762}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerAccent.UI", "src\modules\poweraccent\PowerAccent.UI\PowerAccent.UI.csproj", "{31CAD28E-778A-441C-85BC-40AB3EAA2A10}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PowerOCR", "PowerOCR", "{A50C70A6-2DA0-4027-B90E-B1A40755A8A5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerOCR", "src\modules\PowerOCR\PowerOCR\PowerOCR.csproj", "{25C91A4E-BA4E-467A-85CD-8B62545BF674}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerOCRModuleInterface", "src\modules\PowerOCR\PowerOCRModuleInterface\PowerOCRModuleInterface.vcxproj", "{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Run.Plugin.History", "src\modules\launcher\Plugins\Microsoft.PowerToys.Run.Plugin.History\Microsoft.PowerToys.Run.Plugin.History.csproj", "{212AD910-8488-4036-BE20-326931B75FB2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MeasureTool", "MeasureTool", "{7AC943C9-52E8-44CF-9083-744D8049667B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerToys.MeasureToolCore", "src\modules\MeasureTool\MeasureToolCore\PowerToys.MeasureToolCore.vcxproj", "{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6955446D-23F7-4023-9BB3-8657F904AF99} = {6955446D-23F7-4023-9BB3-8657F904AF99}
|
||||
{CABA8DFB-823B-4BF2-93AC-3F31984150D9} = {CABA8DFB-823B-4BF2-93AC-3F31984150D9}
|
||||
{CC6E41AC-8174-4E8A-8D22-85DD7F4851DF} = {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeasureToolModuleInterface", "src\modules\MeasureTool\MeasureToolModuleInterface\MeasureToolModuleInterface.vcxproj", "{92C39820-9F84-4529-BC7D-22AAE514D63B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MeasureToolUI", "src\modules\MeasureTool\MeasureToolUI\MeasureToolUI.csproj", "{515554D1-D004-4F7F-A107-2211FC0F6B2C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerAccentKeyboardService", "src\modules\poweraccent\PowerAccentKeyboardService\PowerAccentKeyboardService.vcxproj", "{C97D9A5D-206C-454E-997E-009E227D7F02}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
@@ -1632,6 +1666,144 @@ Global
|
||||
{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
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x64.Build.0 = Debug|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x86.Build.0 = Debug|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x64.ActiveCfg = Release|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x64.Build.0 = Release|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x86.ActiveCfg = Release|x64
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x86.Build.0 = Release|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|x64.Build.0 = Debug|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Debug|x86.Build.0 = Debug|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|x64.ActiveCfg = Release|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|x64.Build.0 = Release|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|x86.ActiveCfg = Release|x64
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C}.Release|x86.Build.0 = Release|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|x64.Build.0 = Debug|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|x86.Build.0 = Debug|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|x64.ActiveCfg = Release|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|x64.Build.0 = Release|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|x86.ActiveCfg = Release|x64
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Release|x86.Build.0 = Release|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|x64.Build.0 = Debug|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Debug|x86.Build.0 = Debug|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|x64.ActiveCfg = Release|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|x64.Build.0 = Release|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|x86.ActiveCfg = Release|x64
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10}.Release|x86.Build.0 = Release|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|x64.Build.0 = Debug|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Debug|x86.Build.0 = Debug|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|x64.ActiveCfg = Release|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|x64.Build.0 = Release|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|x86.ActiveCfg = Release|x64
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674}.Release|x86.Build.0 = Release|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|x64.Build.0 = Debug|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Debug|x86.Build.0 = Debug|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|x64.ActiveCfg = Release|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|x64.Build.0 = Release|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|x86.ActiveCfg = Release|x64
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}.Release|x86.Build.0 = Release|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|x64.Build.0 = Debug|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Debug|x86.Build.0 = Debug|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|x64.ActiveCfg = Release|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|x64.Build.0 = Release|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|x86.ActiveCfg = Release|x64
|
||||
{212AD910-8488-4036-BE20-326931B75FB2}.Release|x86.Build.0 = Release|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|ARM64.ActiveCfg = Debug|arm64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|ARM64.Build.0 = Debug|arm64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|x64.Build.0 = Debug|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Debug|x86.Build.0 = Debug|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|ARM64.ActiveCfg = Release|arm64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|ARM64.Build.0 = Release|arm64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|x64.ActiveCfg = Release|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|x64.Build.0 = Release|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|x86.ActiveCfg = Release|x64
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A}.Release|x86.Build.0 = Release|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|x64.Build.0 = Debug|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Debug|x86.Build.0 = Debug|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|x64.ActiveCfg = Release|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|x64.Build.0 = Release|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|x86.ActiveCfg = Release|x64
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B}.Release|x86.Build.0 = Release|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|ARM64.ActiveCfg = Debug|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|ARM64.Build.0 = Debug|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|ARM64.Deploy.0 = Debug|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x64.Build.0 = Debug|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x86.Build.0 = Debug|x86
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|ARM64.ActiveCfg = Release|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|ARM64.Build.0 = Release|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|ARM64.Deploy.0 = Release|arm64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x64.ActiveCfg = Release|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x64.Build.0 = Release|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x64.Deploy.0 = Release|x64
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x86.ActiveCfg = Release|x86
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x86.Build.0 = Release|x86
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C}.Release|x86.Deploy.0 = Release|x86
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|x64.Build.0 = Debug|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Debug|x86.Build.0 = Debug|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|x64.ActiveCfg = Release|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|x64.Build.0 = Release|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|x86.ActiveCfg = Release|x64
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1770,6 +1942,20 @@ Global
|
||||
{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}
|
||||
{0F14491C-6369-4C45-AAA8-135814E66E6B} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||
{34A354C5-23C7-4343-916C-C52DAF4FC39D} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
|
||||
{7B4CDB0D-28C9-4F95-88AA-73FCC06E354C} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
|
||||
{3264DF53-C805-4B0C-867C-FCEAF7AEF762} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
|
||||
{31CAD28E-778A-441C-85BC-40AB3EAA2A10} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
|
||||
{A50C70A6-2DA0-4027-B90E-B1A40755A8A5} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||
{25C91A4E-BA4E-467A-85CD-8B62545BF674} = {A50C70A6-2DA0-4027-B90E-B1A40755A8A5}
|
||||
{6AB6A2D6-F859-4A82-9184-0BD29C9F07D1} = {A50C70A6-2DA0-4027-B90E-B1A40755A8A5}
|
||||
{212AD910-8488-4036-BE20-326931B75FB2} = {4AFC9975-2456-4C70-94A4-84073C1CED93}
|
||||
{7AC943C9-52E8-44CF-9083-744D8049667B} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||
{54A93AF7-60C7-4F6C-99D2-FBB1F75F853A} = {7AC943C9-52E8-44CF-9083-744D8049667B}
|
||||
{92C39820-9F84-4529-BC7D-22AAE514D63B} = {7AC943C9-52E8-44CF-9083-744D8049667B}
|
||||
{515554D1-D004-4F7F-A107-2211FC0F6B2C} = {7AC943C9-52E8-44CF-9083-744D8049667B}
|
||||
{C97D9A5D-206C-454E-997E-009E227D7F02} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
||||
|
||||
133
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 version 2004 (code name 20H1 / build number 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.7 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/6.0#runtime-desktop-6.0.7) 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):** [PowerToysSetup-0.61.1-x64.exe](https://github.com/microsoft/PowerToys/releases/download/v0.61.1/PowerToysSetup-0.61.1-x64.exe)
|
||||
- **For ARM64 processors:** [PowerToysSetup-0.61.1-arm64.exe](https://github.com/microsoft/PowerToys/releases/download/v0.61.1/PowerToysSetup-0.61.1-arm64.exe)
|
||||
|
||||
This is our preferred method.
|
||||
|
||||
@@ -72,116 +72,91 @@ 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.61 - July 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!
|
||||
This is a lighter release, with a shorter development cycle and focused on stability and improvements.
|
||||
|
||||
**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.
|
||||
- Quality of life improvements for Always on Top, FancyZones and PowerToys Run.
|
||||
|
||||
### 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).
|
||||
- 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.4.
|
||||
- The new Windows 11 context menu entries are now correctly added to Windows 11 dev channel insider builds. (This was a hotfix for 0.60)
|
||||
- The old context menu entries are shown alongside the new Windows 11 context menu entries to be compatible with software that overrides the Windows 11 context menu behavior. (This was a hotfix for 0.60)
|
||||
- Consolidated C# language version across the solution. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Removed deprecated Segoe icon glyph codes and replaced them with the correct ones. Thanks [@niels9001](https://github.com/niels9001) and [@Jay-o-Way](https://github.com/Jay-o-Way)!
|
||||
- Fixed an issue that caused a random accent key to be pressed on certain keyboard layouts when enabling some modules.
|
||||
|
||||
### Always on Top
|
||||
|
||||
- Fixed an issue where the borders where sticking around when a window was minimized with Win+D.
|
||||
- Fixed border flickering when activating. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Fixed a bug causing Always on Top to activate and hang when exiting PowerToys. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Fixed black edges appearing on rounded corners.
|
||||
- Fixed a bug that was causing 100% CPU consumption.
|
||||
|
||||
### 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 that caused layouts to not be applied correctly when many monitors reported having the same serial number. (This was a hotfix for 0.60)
|
||||
- Fixed a bug that caused layouts to not be applied correctly on some virtual monitor setups (This was a hotfix for 0.60)
|
||||
- A "Rows" default layout is now applied to vertical monitors, instead of a "Columns" layout. Thanks [@augustkarlstedt](https://github.com/augustkarlstedt)!
|
||||
|
||||
### Image Resizer
|
||||
|
||||
- No longer tries to change metadata on files that were not actually resized. Thanks [@adamchilders](https://github.com/adamchilders)!
|
||||
- Screen reader now announces the size name instead of the class name.
|
||||
|
||||
### 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.
|
||||
- Fixed an issue when creating thumbnails for SVG files created using Inkscape.
|
||||
|
||||
### 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.
|
||||
- Adjusted wording on the editor when keys are orphaned.
|
||||
|
||||
### Mouse utility
|
||||
|
||||
- Fixed a bug that caused the current Find My Mouse spotlight to hang when activated in the top left corner of the screen. (This was a hotfix for 0.60)
|
||||
|
||||
### PowerRename
|
||||
|
||||
- Ported to use WinUI 3 instead of WinUI 2.
|
||||
- The PowerRename window reacts to current dpi when created.
|
||||
|
||||
### 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)!
|
||||
- Fixed a typo in the WindowWalker plugin UI. Thanks [@rohanrdy](https://github.com/rohanrdy)!
|
||||
- Improved performance by saving the search history files only on exit. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- PowerToys Run no longer shows results for some plugins when querying for empty spaces in a global query. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Added support for showing localized names for some win32 programs in the programs plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- The program plugin will now consider settings changed directly in ProgramPluginSettings.json. Thanks [@bezgumption](https://github.com/bezgumption)!
|
||||
|
||||
### 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.
|
||||
- PowerToys Run settings page properly greys out the score adjustment setting when a plugin is not global. Thanks [@jefflord](https://github.com/jefflord)!
|
||||
- PowerToys Run plugins score adjustment field accepts only numeric characters. Thanks [@jefflord](https://github.com/jefflord)!
|
||||
- Will not run if started directly from its executable, as it was before the WinUI 3 upgrade.
|
||||
- Fixed a typo in a PowerToys Run settings page description. Thanks [@eltociear](https://github.com/eltociear)!
|
||||
|
||||
### 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.
|
||||
- Removed the dead code to make a msix installer.
|
||||
- Updated the .NET dependency to 6.0.7.
|
||||
- Won't create a new PowerToys shortcut on update if it's been removed manually by the user.
|
||||
|
||||
### 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)!
|
||||
- Updated the Windows Store Package submission script to show less UI while installing PowerToys. (This was a hotfix for 0.60)
|
||||
- Added more functionality to the Monitor Report Tool.
|
||||
- The release CI now includes the version number in the symbols artifacts.
|
||||
- GitHub should now show .vsconfig as a JSON file. Thanks [@osfanbuff63](https://github.com/osfanbuff63)!
|
||||
- Centralized the configurations for NetAnalyzers and StyleCop. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Check-spelling has been upgraded to version 0.0.20. Thanks [@jsoref](https://github.com/jsoref)!
|
||||
|
||||
#### Community contributions
|
||||
#### What is being planned for v0.62
|
||||
|
||||
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.62][github-next-release-work], we'll work on below:
|
||||
|
||||
- Environment Variables Editor PowerToy
|
||||
- Screen Measure PowerToy
|
||||
@@ -189,7 +164,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 +187,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%2F35
|
||||
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F34
|
||||
|
||||
2
deps/expected-lite
vendored
@@ -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
|
||||
|
||||
103
doc/devdocs/modules/launcher/plugins/history.md
Normal file
@@ -0,0 +1,103 @@
|
||||
# History Plugin
|
||||
|
||||
The History Plugin allows users to search or display results they have used (selected).
|
||||
|
||||
## How it works
|
||||
The plugin uses data that was already being captured which is, what results were clicked, and how many times. We do add a little more data to this set now.
|
||||
When this plugin is queried, it creates results based on this previously selected results data.
|
||||
|
||||
In order to make sure selected results in the history are still valid, we re-query the plugin the relevant plug using the PluginManager. If there are no results,
|
||||
this history item is not included. This usually means that the result is no longer valid. For instance, if a file was deleted, but it's still in the selected history
|
||||
we don't want to show it as a selectable result.
|
||||
|
||||
Because the results from the History Plugin are actually created from calls to the PluginManager, they will be exactly the same is if they did not come from the History Plugin.
|
||||
|
||||
## Special notes
|
||||
While the results returned from the plugin are from the PluginManager, they are sometimes modified before returning. One example is the Calculator plugin.
|
||||
Since the Calculator plugin operates on the current query input by the user, the results from Calculator plugin don't include that in the title. However, as a history item,
|
||||
the query is very important. In this case, and maybe others in the future, we modify the tile to also include the search.
|
||||
|
||||
### Modified title example:
|
||||
|
||||
This is what the Calculator plugin normally might show:
|
||||

|
||||
|
||||
But this is how it will look returned from the History plugin
|
||||
|
||||

|
||||
|
||||
As you can see, here and maybe other places, other non-history plugin might be able to include extra data for the History plugin to use later.
|
||||
For example, in future, plugins might be able to also set a "History Title", "History Icon", etc... But for now, it's not needed.
|
||||
|
||||
|
||||
## Duplicates from the History Plugin in global results
|
||||
If the History plugin is set to show in the global results, it might return a result that is also returned from another plugin. If a match is found,
|
||||
the result from the history plugin is discarded.
|
||||
|
||||
## Removing items from history
|
||||
A new context menu item is added to each History result, which can be used to delete it from the history.
|
||||

|
||||
|
||||
## Context menus
|
||||
Because these results are coming from the History plugin, this plugin must invoke each menu items `LoadContextMenus` method.
|
||||
We then also add the "Remove this from history" context menu action.
|
||||
|
||||
## Results score
|
||||
When the plugin is used with the activation command, the scores are configured so the results show with the more recently selected items at the top.
|
||||
If the history results are shown in the global results, the scores are not modified from that the original plugin set.
|
||||
|
||||
## Old Data
|
||||
Items selected before this plugin was created will not show in the history because they don't contain enough data.
|
||||
|
||||
## Important for developers
|
||||
|
||||
### Important plugin values (meta-data)
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | ---------------------------------------------------- |
|
||||
| ActionKeyword | `!!` |
|
||||
| ExecuteFileName | `Microsoft.PowerToys.Run.Plugin.History.dll` |
|
||||
| ID | `C88512156BB74580AADF7252E130BA8D` |
|
||||
|
||||
### Interfaces used by this plugin
|
||||
|
||||
The plugin uses only these interfaces (all inside the `Main.cs`):
|
||||
|
||||
* `Wox.Plugin.IPlugin`
|
||||
* `Wox.Plugin.IContextMenu`
|
||||
* `Wox.Plugin.IPluginI18n`
|
||||
|
||||
### Program files
|
||||
|
||||
| File | Content |
|
||||
| ------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `Images\history.dark.png` | Symbol for the results for the dark theme |
|
||||
| `Images\history.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 contains all translatable strings in the neutral language |
|
||||
| `Main.cs` | Main class, the only place that implements the WOX interfaces |
|
||||
| `ErrorHandler.cs` | Class to build error result on plugin failure |
|
||||
| `plugin.json` | All meta-data for this plugin |
|
||||
|
||||
### Important project values (*.csproj)
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | ------------------------------------------------- |
|
||||
| TargetFramework | `net6.0-windows10.0.19041.0` |
|
||||
|
||||
### Project dependencies
|
||||
|
||||
#### Projects
|
||||
|
||||
* `Wox.Infrastructure`
|
||||
* `Wox.Plugin`
|
||||
* `PowerToys.PowerLauncher`
|
||||
|
||||
|
||||
#### Build Dependency
|
||||
Access to PluginManager was needed to make this plugin work. Because of this a reference to PowerToys.PowerLauncher was needed.
|
||||
Since History Plugin needs a reference to PowerToys.PowerLauncher, it can not be set as a dependency reference in PowerToys.PowerLauncher project (else a circular reference would exist).
|
||||
This means that if you build PowerToys.PowerLauncher only it will not build History Plugin. You will need to manually build History Plugin at least once and again manually if you change it.
|
||||
|
||||
### Caching
|
||||
Right now, there is no caching. But since this plugin does cause more queries than expected to many plugins, the `BuildResult` method is likely to be improved with some level of caching.
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -69,10 +69,8 @@ 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)
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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.
|
||||
@@ -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`
|
||||
|
||||
BIN
doc/images/icons/MeasureTool.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
doc/images/icons/PowerAccent.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
doc/images/icons/PowerOCR.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
doc/images/overview/MeasureTool_large.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
doc/images/overview/MeasureTool_small.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
doc/images/overview/Original/MeasureTool.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
doc/images/overview/Original/QuickAccent.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
doc/images/overview/Original/TextExtractor.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
doc/images/overview/QuickAccent_large.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
doc/images/overview/QuickAccent_small.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
doc/images/overview/TextExtractor_large.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
doc/images/overview/TextExtractor_small.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
@@ -1,78 +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.Management.dll" SourcePath="..\..\x64\Release\modules\System.Management.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\Microsoft.Win32.Registry.dll" SourcePath="..\..\x64\Release\modules\Microsoft.Win32.Registry.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.19041.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
|
||||
@@ -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,9 +6,9 @@
|
||||
<?define BinDir="$(var.RepoDir)$(var.Platform)\$(var.Configuration)\" ?>
|
||||
<?define PowerToysPlatform="x64"?>
|
||||
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/9d6b6b34-44b5-4cf4-b924-79a00deb9795/2f17c30bdf42b6a8950a8552438cf8c1/windowsdesktop-runtime-6.0.6-win-x64.exe"?>
|
||||
<?define Dotnet6PayloadSize="57665648"?>
|
||||
<?define Dotnet6PayloadHash="06E76968E4CE87C77F34AE5AFA6D63B0DEDFE6D2"?>
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/b4a17a47-2fe8-498d-b817-30ad2e23f413/00020402af25ba40990c6cc3db5cb270/windowsdesktop-runtime-6.0.8-win-x64.exe"?>
|
||||
<?define Dotnet6PayloadSize="57909296"?>
|
||||
<?define Dotnet6PayloadHash="ABA98AAA3DB700D41EB067280F86F35B7DDEA550"?>
|
||||
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe"?>
|
||||
<?define VCRedistPayloadSize="25234792"?>
|
||||
@@ -20,9 +20,9 @@
|
||||
<?define BinDir="$(var.RepoDir)ARM64\$(var.Configuration)\" ?>
|
||||
<?define PowerToysPlatform="ARM64"?>
|
||||
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/d09acad2-0abb-4ec8-8388-b8b42b31cd58/517cff2da8fbcdcb514bb4e2f1dc8879/windowsdesktop-runtime-6.0.6-win-arm64.exe"?>
|
||||
<?define Dotnet6PayloadSize="51535984"?>
|
||||
<?define Dotnet6PayloadHash="599CF13A1B0E3F1C2DBC2FE6210062C3795094A7"?>
|
||||
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/17737b16-dbb0-45f8-9684-16cce46f0835/14475e8380422840249513d58c70d8da/windowsdesktop-runtime-6.0.8-win-arm64.exe"?>
|
||||
<?define Dotnet6PayloadSize="51735240"?>
|
||||
<?define Dotnet6PayloadHash="AE097FD933EEF88A1F8D800961A1584CAF9DA37F"?>
|
||||
|
||||
<?define VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/8E126191012691AE22A0D5A89FAC01B59BABC7B680E5D9B65828935FD366E375/VC_redist.arm64.exe"?>
|
||||
<?define VCRedistPayloadSize="11500416"?>
|
||||
@@ -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="HasDotnet606" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.6\System.Xaml.dll" Result="exists" />
|
||||
<util:FileSearch Variable="HasDotnet608" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.8\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" />
|
||||
|
||||
@@ -73,10 +73,20 @@
|
||||
|
||||
<Chain>
|
||||
<ExePackage
|
||||
Name="windowsdesktop-runtime-6.0.6-win-$(var.PowerToysPlatform).exe"
|
||||
Name="terminate_powertoys.cmd"
|
||||
Cache="no"
|
||||
Compressed="yes"
|
||||
Id="TerminatePowerToys"
|
||||
SourceFile="terminate_powertoys.cmd"
|
||||
Permanent="yes"
|
||||
PerMachine="yes"
|
||||
Vital="no">
|
||||
</ExePackage>
|
||||
<ExePackage
|
||||
Name="windowsdesktop-runtime-6.0.8-win-$(var.PowerToysPlatform).exe"
|
||||
Compressed="no"
|
||||
Id="DotnetRuntime6"
|
||||
DetectCondition="HasDotnet606"
|
||||
DetectCondition="HasDotnet608"
|
||||
DownloadUrl="$(var.Dotnet6DownloadUrl)"
|
||||
InstallCommand="/install /quiet /norestart"
|
||||
RepairCommand="/repair /passive /norestart"
|
||||
@@ -85,10 +95,10 @@
|
||||
UninstallCommand="/uninstall /quiet /norestart">
|
||||
<ExitCode Value="1638" Behavior="success"/>
|
||||
<RemotePayload
|
||||
Description="Microsoft Windows Desktop Runtime - 6.0.6 ($(var.PowerToysPlatform))"
|
||||
ProductName="Microsoft Windows Desktop Runtime - 6.0.6 ($(var.PowerToysPlatform))"
|
||||
Description="Microsoft Windows Desktop Runtime - 6.0.8 ($(var.PowerToysPlatform))"
|
||||
ProductName="Microsoft Windows Desktop Runtime - 6.0.8 ($(var.PowerToysPlatform))"
|
||||
Size="$(var.Dotnet6PayloadSize)"
|
||||
Version="6.0.6.31318"
|
||||
Version="6.0.8.31518"
|
||||
Hash="$(var.Dotnet6PayloadHash)" />
|
||||
</ExePackage>
|
||||
<ExePackage
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
<?define FancyZonesProjectName="FancyZones"?>
|
||||
<?define ImageResizerProjectName="ImageResizer"?>
|
||||
<?define KeyboardManagerProjectName="KeyboardManager"?>
|
||||
<?define PowerAccentProjectName="PowerAccent"?>
|
||||
<?define PowerRenameProjectName="PowerRename"?>
|
||||
<?define ColorPickerProjectName="ColorPicker"?>
|
||||
<?define PowerOCRProjectName="PowerOCR"?>
|
||||
<?define VideoConferenceProjectName="VideoConference"?>
|
||||
<?define AwakeProjectName="Awake"?>
|
||||
<?define MouseUtilsProjectName="MouseUtils"?>
|
||||
<?define AlwaysOnTopProjectName="AlwaysOnTop"?>
|
||||
<?define MeasureToolProjectName="MeasureTool"?>
|
||||
|
||||
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
|
||||
<?if $(var.Platform) = x64?>
|
||||
@@ -48,11 +51,11 @@
|
||||
|
||||
<?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?>
|
||||
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?>
|
||||
|
||||
<?define SettingsV2OOBEAssetsModulesFiles=ColorPicker.gif;AlwaysOnTop.png;Awake.png;FancyZones.gif;FileExplorer.png;ImageResizer.gif;KBM.gif;MouseUtils.gif;PowerRename.gif;Run.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?>
|
||||
<?define SettingsV2OOBEAssetsModulesFiles=ColorPicker.gif;AlwaysOnTop.png;Awake.png;FancyZones.gif;FileExplorer.png;ImageResizer.gif;KBM.gif;MouseUtils.gif;PowerAccent.gif;PowerOCR.gif;PowerRename.gif;Run.gif;ScreenRuler.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?>
|
||||
|
||||
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseCrosshairs.png;MouseUtils.png;PowerRename.png;PowerToys.png;PowerToysRun.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
|
||||
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseCrosshairs.png;MouseUtils.png;PowerAccent.png;PowerOcr.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ScreenRuler.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
|
||||
|
||||
<?define SettingsV2MicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
|
||||
|
||||
@@ -70,6 +73,8 @@
|
||||
|
||||
<?define ShellComponentFiles=plugin.json;Microsoft.Plugin.Shell.deps.json;Microsoft.Plugin.Shell.dll;PowerToys.ManagedTelemetry.dll?>
|
||||
|
||||
<?define HistoryPluginComponentFiles=plugin.json;Microsoft.PowerToys.Run.Plugin.History.deps.json;Microsoft.PowerToys.Run.Plugin.History.dll?>
|
||||
|
||||
<?define ShellImagesComponentFiles=shell.light.png;shell.dark.png;user.light.png;user.dark.png?>
|
||||
|
||||
<?define IndexerComponentFiles=Microsoft.Plugin.Indexer.deps.json;Microsoft.Plugin.Indexer.dll;plugin.json;PowerToys.ManagedTelemetry.dll;Ijwhost.dll?>
|
||||
@@ -114,8 +119,14 @@
|
||||
|
||||
<?define ImageResizerSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?>
|
||||
|
||||
<?define MeasureToolFiles=CoreMessagingXP.dll;dcompi.dll;dwmcorei.dll;DwmSceneI.dll;DWriteCore.dll;marshal.dll;Microsoft.DirectManipulation.dll;Microsoft.InputStateManager.dll;Microsoft.InteractiveExperiences.Projection.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.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.AppNotifications.Projection.dll;Microsoft.Windows.PushNotifications.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WindowsAppRuntime.dll;Microsoft.WindowsAppRuntime.Insights.Resource.dll;Microsoft.WindowsAppRuntime.Release.Net.dll;Microsoft.WinUI.dll;MRM.dll;PowerToys.ManagedCommon.dll;PowerToys.Interop.dll;PowerToys.ManagedTelemetry.dll;PowerToys.MeasureToolCore.dll;PowerToys.MeasureToolUI.deps.json;PowerToys.MeasureToolUI.dll;PowerToys.MeasureToolUI.exe;PowerToys.MeasureToolUI.runtimeconfig.json;PushNotificationsLongRunningTask.ProxyStub.dll;resources.pri;System.CodeDom.dll;System.Management.dll;WindowsAppRuntime.png;WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll;WinRT.Runtime.dll;WinUIEdit.dll;WinUIEx.dll;wuceffectsi.dll?>
|
||||
|
||||
<?define PowerRenameMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
|
||||
|
||||
<?define MeasureToolMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
|
||||
|
||||
<?define PowerAccentFiles=ControlzEx.dll;GongSolutions.WPF.DragDrop.dll;Ijwhost.dll;MahApps.Metro.dll;Microsoft.Xaml.Behaviors.dll;PowerAccent.Core.dll;PowerAccent.deps.json;PowerAccent.dll;PowerAccent.exe;PowerAccent.runtimeconfig.json;PowerToys.PowerAccentModuleInterface.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerAccent.deps.json;PowerToys.PowerAccent.dll;PowerToys.PowerAccent.exe;PowerToys.PowerAccent.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;Vanara.Core.dll;Vanara.PInvoke.Gdi32.dll;Vanara.PInvoke.Kernel32.dll;Vanara.PInvoke.Shared.dll;Vanara.PInvoke.User32.dll;PowerToys.PowerAccentKeyboardService.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll?>
|
||||
|
||||
<Product Id="*"
|
||||
Name="PowerToys (Preview)"
|
||||
Language="1033"
|
||||
@@ -409,6 +420,8 @@
|
||||
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)">
|
||||
<Directory Id="ImageResizerAssetsFolder" Name="Assets" />
|
||||
</Directory>
|
||||
<Directory Id="PowerAccentInstallFolder" Name="$(var.PowerAccentProjectName)">
|
||||
</Directory>
|
||||
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)">
|
||||
<Directory Id="PowerRenameAssetsFolder" Name="Assets" />
|
||||
<Directory Id="PowerRenameMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
|
||||
@@ -429,6 +442,7 @@
|
||||
<Directory Id="MonacoPreviewHandlerMonacoSRCFolder" Name="monacoSRC" />
|
||||
</Directory>
|
||||
<Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" />
|
||||
<Directory Id="PowerOCRInstallFolder" Name="$(var.PowerOCRProjectName)" />
|
||||
<Directory Id="AwakeInstallFolder" Name="$(var.AwakeProjectName)">
|
||||
<Directory Id="AwakeImagesFolder" Name="Images" />
|
||||
</Directory>
|
||||
@@ -452,6 +466,13 @@
|
||||
<Directory Id="AlwaysOnTopInstallFolder" Name="$(var.AlwaysOnTopProjectName)">
|
||||
</Directory>
|
||||
|
||||
<!-- MeasureTool -->
|
||||
<Directory Id="MeasureToolInstallFolder" Name="$(var.MeasureToolProjectName)">
|
||||
<Directory Id="MeasureToolMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
|
||||
<Directory Id="MeasureToolMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<!-- Launcher -->
|
||||
<Directory Id="LauncherInstallFolder" Name="launcher">
|
||||
<Directory Id="LauncherImagesFolder" Name="Images" />
|
||||
@@ -487,6 +508,10 @@
|
||||
<Directory Id="UriImagesFolder" Name="Images" />
|
||||
<Directory Id="UriLanguagesFolder" Name="Languages" />
|
||||
</Directory>
|
||||
<Directory Id="HistoryPluginFolder" Name="History">
|
||||
<Directory Id="HistoryImagesFolder" Name="Images" />
|
||||
<Directory Id="HistoryLanguagesFolder" Name="Languages" />
|
||||
</Directory>
|
||||
<Directory Id="UnitConverterPluginFolder" Name="UnitConverter">
|
||||
<Directory Id="UnitConverterImagesFolder" Name="Images" />
|
||||
<Directory Id="UnitConverterLanguagesFolder" Name="Languages" />
|
||||
@@ -746,6 +771,15 @@
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- PowerAccent -->
|
||||
<DirectoryRef Id="PowerAccentInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerAccentProjectName)">
|
||||
<?foreach File in $(var.PowerAccentFiles)?>
|
||||
<Component Id="PowerAccent_$(var.File)" Win64="yes">
|
||||
<File Id="PowerAccentFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerAccentProjectName)\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- PowerRename -->
|
||||
<DirectoryRef Id="PowerRenameInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)">
|
||||
<?foreach File in $(var.PowerRenameFiles)?>
|
||||
@@ -767,13 +801,13 @@
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="PowerRenameMicrosoftUIXamlAssetsInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Microsoft.UI.Xaml\Assets">
|
||||
<?foreach File in $(var.PowerRenameMicrosoftUIXamlAssetsInstallFiles)?>
|
||||
<Component Id="PowerRenameMicrosoftUIXamlAssets_$(var.File)" Win64="yes">
|
||||
<File Id="PowerRenameMicrosoftUIXamlAssetsFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Microsoft.UI.Xaml\Assets\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="PowerRenameMicrosoftUIXamlAssetsInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Microsoft.UI.Xaml\Assets">
|
||||
<?foreach File in $(var.PowerRenameMicrosoftUIXamlAssetsInstallFiles)?>
|
||||
<Component Id="PowerRenameMicrosoftUIXamlAssets_$(var.File)" Win64="yes">
|
||||
<File Id="PowerRenameMicrosoftUIXamlAssetsFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\Microsoft.UI.Xaml\Assets\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="PowerRenameAssetsFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
@@ -888,6 +922,16 @@
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- PowerOCR Resources -->
|
||||
<DirectoryRef Id="PowerOCRInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerOCRProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_PowerOCR" Guid="5640A7E8-E165-4368-8F08-F8E1E9242BDD" Win64="yes">
|
||||
<?foreach File in PowerToys.PowerOCR.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Common.UI.dll;PowerToys.Interop.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerOCR.deps.json;PowerToys.PowerOCR.exe;PowerToys.PowerOCR.runtimeconfig.json;PowerToys.PowerOCRModuleInterface.dll;PowerToys.Settings.UI.Lib.dll;System.ComponentModel.Composition.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;WinRT.Runtime.dll?>
|
||||
<File Id="PowerOCRFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerOCRProjectName)\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Awake -->
|
||||
<DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinDir)modules\$(var.AwakeProjectName)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
@@ -929,6 +973,28 @@
|
||||
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Measure Tool -->
|
||||
<DirectoryRef Id="MeasureToolInstallFolder" FileSource="$(var.BinDir)modules\$(var.MeasureToolProjectName)">
|
||||
<Component Id="Module_MeasureToolInterface" Win64="yes">
|
||||
<File Source="$(var.BinDir)modules\$(var.MeasureToolProjectName)\PowerToys.MeasureToolModuleInterface.dll" />
|
||||
</Component>
|
||||
|
||||
<?foreach File in $(var.MeasureToolFiles)?>
|
||||
<Component Id="MT_$(var.File)" Win64="yes">
|
||||
<File Id="MT_$(var.File)" Source="$(var.BinDir)modules\$(var.MeasureToolProjectName)\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="MeasureToolMicrosoftUIXamlAssetsInstallFolder" FileSource="$(var.BinDir)modules\$(var.MeasureToolProjectName)\Microsoft.UI.Xaml\Assets">
|
||||
<?foreach File in $(var.MeasureToolMicrosoftUIXamlAssetsInstallFiles)?>
|
||||
<Component Id="MeasureToolMicrosoftUIXamlAssets_$(var.File)" Win64="yes">
|
||||
<File Id="MeasureToolMicrosoftUIXamlAssetsFile_$(var.File)" Source="$(var.BinDir)modules\$(var.MeasureToolProjectName)\Microsoft.UI.Xaml\Assets\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- SettingsV2 components -->
|
||||
<DirectoryRef Id="SettingsV2InstallFolder" FileSource="$(var.BinDir)Settings\">
|
||||
<?foreach File in $(var.SettingsV2Files)?>
|
||||
@@ -1036,6 +1102,9 @@
|
||||
<?endforeach?>
|
||||
<ComponentRef Id="DesktopShortcut" />
|
||||
<ComponentRef Id="Module_PowerRename" />
|
||||
<?foreach File in $(var.PowerAccentFiles)?>
|
||||
<ComponentRef Id="PowerAccent_$(var.File)" />
|
||||
<?endforeach?>
|
||||
<?foreach File in $(var.PowerRenameFiles)?>
|
||||
<ComponentRef Id="PowerRename_$(var.File)" />
|
||||
<?endforeach?>
|
||||
@@ -1057,6 +1126,7 @@
|
||||
<ComponentRef Id="Module_KeyboardManager" />
|
||||
<ComponentRef Id="Module_KeyboardManager_Editor" />
|
||||
<ComponentRef Id="Module_KeyboardManager_Engine" />
|
||||
<ComponentRef Id="Module_PowerOCR" />
|
||||
<ComponentRef Id="Module_ColorPicker" />
|
||||
<ComponentRef Id="Module_ColorPicker_Icon"/>
|
||||
<ComponentRef Id="Module_ColorPicker_Cursor"/>
|
||||
@@ -1067,6 +1137,14 @@
|
||||
<ComponentRef Id="Module_MousePointerCrosshairs" />
|
||||
<ComponentRef Id="Module_AlwaysOnTop"/>
|
||||
<ComponentRef Id="Module_AlwaysOnTopInterface"/>
|
||||
<ComponentRef Id="Module_MeasureToolInterface"/>
|
||||
<?foreach File in $(var.MeasureToolFiles)?>
|
||||
<ComponentRef Id="MT_$(var.File)" />
|
||||
<?endforeach?>
|
||||
<?foreach File in $(var.MeasureToolMicrosoftUIXamlAssetsInstallFiles)?>
|
||||
<ComponentRef Id="MeasureToolMicrosoftUIXamlAssets_$(var.File)" />
|
||||
<?endforeach?>
|
||||
|
||||
<?foreach File in $(var.SettingsV2Files)?>
|
||||
<ComponentRef Id="SV2C_$(var.File)" />
|
||||
<?endforeach?>
|
||||
@@ -1105,7 +1183,7 @@
|
||||
<Fragment>
|
||||
<!-- Resource directories should be added only if the installer is built on the build farm -->
|
||||
<?ifdef env.IsPipeline?>
|
||||
<?foreach ParentDirectory in LauncherInstallFolder;FancyZonesInstallFolder;ImageResizerInstallFolder;ColorPickerInstallFolder;FileExplorerPreviewInstallFolder;CalculatorPluginFolder;FolderPluginFolder;ProgramPluginFolder;ShellPluginFolder;IndexerPluginFolder;UnitConverterPluginFolder;UriPluginFolder;WindowWalkerPluginFolder;OneNotePluginFolder;RegistryPluginFolder;VSCodeWorkspacesPluginFolder;ServicePluginFolder;SystemPluginFolder;TimeDatePluginFolder;TimeZonePluginFolder;WindowsSettingsPluginFolder;WindowsTerminalPluginFolder;WebSearchPluginFolder?>
|
||||
<?foreach ParentDirectory in LauncherInstallFolder;FancyZonesInstallFolder;ImageResizerInstallFolder;ColorPickerInstallFolder;FileExplorerPreviewInstallFolder;HistoryPluginFolder;CalculatorPluginFolder;FolderPluginFolder;ProgramPluginFolder;ShellPluginFolder;IndexerPluginFolder;UnitConverterPluginFolder;UriPluginFolder;WindowWalkerPluginFolder;OneNotePluginFolder;RegistryPluginFolder;VSCodeWorkspacesPluginFolder;ServicePluginFolder;SystemPluginFolder;TimeDatePluginFolder;TimeZonePluginFolder;WindowsSettingsPluginFolder;WindowsTerminalPluginFolder;WebSearchPluginFolder?>
|
||||
<DirectoryRef Id="$(var.ParentDirectory)">
|
||||
<!-- Resource file directories -->
|
||||
<?foreach Language in $(var.LocLanguageList)?>
|
||||
@@ -1391,6 +1469,18 @@
|
||||
Directory="Resource$(var.IdSafeLanguage)OneNotePluginFolder">
|
||||
<File Id="Launcher_OneNote_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)modules\launcher\Plugins\OneNote\$(var.Language)\Microsoft.PowerToys.Run.Plugin.OneNote.resources.dll" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="MonacoPreviewHandler_$(var.IdSafeLanguage)_Component"
|
||||
Directory="Resource$(var.IdSafeLanguage)FileExplorerPreviewInstallFolder"
|
||||
Guid="$(var.CompGUIDPrefix)1A">
|
||||
<File Id="MonacoPreviewHandler_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)modules\FileExplorerPreview\$(var.Language)\PowerToys.MonacoPreviewHandler.resources.dll" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="Launcher_History_$(var.IdSafeLanguage)_Component"
|
||||
Directory="Resource$(var.IdSafeLanguage)HistoryPluginFolder"
|
||||
Guid="$(var.CompGUIDPrefix)1B">
|
||||
<File Id="Launcher_History_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)modules\launcher\Plugins\History\$(var.Language)\Microsoft.PowerToys.Run.Plugin.History.resources.dll" />
|
||||
</Component>
|
||||
<?undef IdSafeLanguage?>
|
||||
<?undef CompGUIDPrefix?>
|
||||
<?endforeach?>
|
||||
@@ -1401,7 +1491,7 @@
|
||||
<!-- Localization languages shipped with WinAppSDK. We should ship these as well. -->
|
||||
<?define WinAppSDKLocLanguageList = af-ZA;ar-SA;az-Latn-AZ;bg-BG;bs-Latn-BA;ca-ES;cs-CZ;cy-GB;da-DK;de-DE;el-GR;en-GB;en-us;es-ES;es-MX;et-EE;eu-ES;fa-IR;fi-FI;fr-CA;fr-FR;gl-ES;he-IL;hi-IN;hr-HR;hu-HU;id-ID;is-IS;it-IT;ja-JP;ka-GE;kk-KZ;ko-KR;lt-LT;lv-LV;ms-MY;nb-NO;nl-NL;nn-NO;pl-PL;pt-BR;pt-PT;ro-RO;ru-RU;sk-SK;sl-SI;sq-AL;sr-Cyrl-RS;sr-Latn-RS;sv-SE;th-TH;tr-TR;uk-UA;vi-VN;zh-CN;zh-TW?>
|
||||
<Fragment>
|
||||
<?foreach ParentDirectory in SettingsV2InstallFolder;PowerRenameInstallFolder?>
|
||||
<?foreach ParentDirectory in SettingsV2InstallFolder;PowerRenameInstallFolder;MeasureToolInstallFolder?>
|
||||
<DirectoryRef Id="$(var.ParentDirectory)">
|
||||
<?foreach Language in $(var.WinAppSDKLocLanguageList)?>
|
||||
<?if $(var.Language) = af-ZA?>
|
||||
@@ -1713,6 +1803,13 @@
|
||||
<File Id="PowerRename_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlMui_File" Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\$(var.Language)\Microsoft.ui.xaml.dll.mui" />
|
||||
<File Id="PowerRename_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlPhoneMui_File" Source="$(var.BinDir)modules\$(var.PowerRenameProjectName)\$(var.Language)\Microsoft.UI.Xaml.Phone.dll.mui" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="MeasureTool_WinAppSDKLoc_$(var.IdSafeLanguage)_Component"
|
||||
Directory="WinAppSDKLoc$(var.IdSafeLanguage)MeasureToolInstallFolder"
|
||||
Guid="$(var.CompGUIDPrefix)03">
|
||||
<File Id="MeasureTool_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlMui_File" Source="$(var.BinDir)modules\$(var.MeasureToolProjectName)\$(var.Language)\Microsoft.ui.xaml.dll.mui" />
|
||||
<File Id="MeasureTool_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlPhoneMui_File" Source="$(var.BinDir)modules\$(var.MeasureToolProjectName)\$(var.Language)\Microsoft.UI.Xaml.Phone.dll.mui" />
|
||||
</Component>
|
||||
<?undef IdSafeLanguage?>
|
||||
<?undef CompGUIDPrefix?>
|
||||
<?endforeach?>
|
||||
@@ -1830,6 +1927,19 @@
|
||||
<File Id="WebSearchDark" Source="$(var.BinDir)modules\launcher\Plugins\WebSearch\Images\WebSearch.dark.png" />
|
||||
</Component>
|
||||
|
||||
<!-- History Plugin -->
|
||||
<?foreach File in $(var.HistoryPluginComponentFiles)?>
|
||||
<Component Id="HistoryComponent_$(var.File)" Win64="yes" Directory="HistoryPluginFolder">
|
||||
<File Id="HistoryComponentFile_$(var.File)" Source="$(var.BinDir)modules\launcher\Plugins\History\$(var.File)" />
|
||||
</Component>
|
||||
<?endforeach?>
|
||||
<Component Id="HistoryImagesComponentLight" Directory="HistoryImagesFolder" >
|
||||
<File Id="HistoryLightIcon" Source="$(var.BinDir)modules\launcher\Plugins\History\Images\history.light.png" />
|
||||
</Component>
|
||||
<Component Id="HistoryImagesComponentDark" Directory="HistoryImagesFolder" >
|
||||
<File Id="HistoryDarkIcon" Source="$(var.BinDir)modules\launcher\Plugins\History\Images\history.dark.png" />
|
||||
</Component>
|
||||
|
||||
<!-- Uri Plugin -->
|
||||
<?foreach File in $(var.UriComponentFiles)?>
|
||||
<Component Id="UriComponent_$(var.File)" Win64="yes" Directory="UriPluginFolder">
|
||||
|
||||
@@ -18,3 +18,5 @@ msbuild !PTRoot!\src\modules\previewpane\MarkdownPreviewHandler\MarkdownPreviewH
|
||||
msbuild !PTRoot!\src\modules\previewpane\SvgPreviewHandler\SvgPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\previewpane\SvgThumbnailProvider\SvgThumbnailProvider.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\MeasureTool\MeasureToolUI\MeasureToolUI.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
12
installer/PowerToysSetup/terminate_powertoys.cmd
Normal file
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
|
||||
@REM We loop here until taskkill cannot find a PowerToys process. We can't use /F flag, because it
|
||||
@REM doesn't give application an opportunity to cleanup. Thus we send WM_CLOSE which is being caught
|
||||
@REM by multiple windows running a msg loop in PowerToys.exe process, which we close one by one.
|
||||
for /l %%x in (1, 1, 100) do (
|
||||
taskkill /IM PowerToys.exe 1>NUL 2>NUL
|
||||
if !ERRORLEVEL! NEQ 0 goto quit
|
||||
)
|
||||
|
||||
:quit
|
||||
@@ -1,6 +1,8 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include "../../src/common/version/version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -12,6 +14,39 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_STRING
|
||||
VALUE "InternalName", INTERNAL_NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_NAME
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||
END
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United States) resources
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Resource.rc
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys Setup Custom Actions"
|
||||
#define INTERNAL_NAME "PowerToysSetupCustomActions"
|
||||
#define ORIGINAL_FILENAME "PowerToysSetupCustomActions.dll"
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
|
||||
@@ -170,29 +170,6 @@ bool InstallNewVersionStage2(std::wstring installer_path, std::wstring_view inst
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& entry : fs::directory_iterator(updating::get_pending_updates_path()))
|
||||
{
|
||||
auto entryPath = entry.path().wstring();
|
||||
std::transform(entryPath.begin(), entryPath.end(), entryPath.begin(), ::towlower);
|
||||
|
||||
// Delete only .msi and .exe
|
||||
if (entryPath.ends_with(L".msi") || entryPath.ends_with(L".exe"))
|
||||
{
|
||||
// Skipping current installer in case of failed update
|
||||
if (installer_path.find(entryPath) != std::string::npos && !success)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
std::error_code err;
|
||||
fs::remove(entry, err);
|
||||
if (err.value())
|
||||
{
|
||||
Logger::warn("Failed to delete file {}. {}", entry.path().string(), err.message());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -50,7 +50,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Windows.Documents.InlineCollection.Add(System.String)", Scope = "member", Target = "Microsoft.Templates.UI.Extensions.TextBlockExtensions.#OnSequentialFlowStepChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)", Justification = "No text here")]
|
||||
[assembly: SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "The user's search term should be compared with culture based rules.", Scope = "type", Target = "~T:Microsoft.PowerToys.Run.Plugin.TimeDate.Components.SearchController")]
|
||||
|
||||
// FxCop warning suppression for uninstantiated TestFixture classes
|
||||
// Uninstantiated TestFixture classes
|
||||
[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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
using ControlzEx.Theming;
|
||||
|
||||
namespace Common.UI
|
||||
|
||||
@@ -4,23 +4,27 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
|
||||
namespace ColorPicker.Helpers
|
||||
using Dispatcher = System.Windows.Threading.Dispatcher;
|
||||
|
||||
namespace Common.UI
|
||||
{
|
||||
public static class NativeEventWaiter
|
||||
{
|
||||
public static void WaitForEventLoop(string eventName, Action callback)
|
||||
public static void WaitForEventLoop(string eventName, Action callback, Dispatcher dispatcher, CancellationToken cancel)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, eventName);
|
||||
var eventHandle = new EventWaitHandle(false, EventResetMode.ManualReset, eventName);
|
||||
while (true)
|
||||
{
|
||||
if (eventHandle.WaitOne())
|
||||
if (WaitHandle.WaitAny(new WaitHandle[] { cancel.WaitHandle, eventHandle }) == 1)
|
||||
{
|
||||
Logger.LogInfo($"Successfully waited for {eventName}");
|
||||
Application.Current.Dispatcher.Invoke(callback);
|
||||
dispatcher.BeginInvoke(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}).Start();
|
||||
@@ -2,72 +2,53 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace
|
||||
Box MonitorInfo::GetScreenSize(const bool includeNonWorkingArea) const
|
||||
{
|
||||
// TODO: use compare
|
||||
bool operator<(const RECT& lhs, const RECT& rhs)
|
||||
{
|
||||
auto lhs_tuple = std::make_tuple(lhs.left, lhs.right, lhs.top, lhs.bottom);
|
||||
auto rhs_tuple = std::make_tuple(rhs.left, rhs.right, rhs.top, rhs.bottom);
|
||||
return lhs_tuple < rhs_tuple;
|
||||
}
|
||||
return includeNonWorkingArea ? Box{ info.rcMonitor } : Box{ info.rcWork };
|
||||
}
|
||||
|
||||
bool operator==(const ScreenSize& lhs, const ScreenSize& rhs)
|
||||
bool MonitorInfo::IsPrimary() const
|
||||
{
|
||||
auto lhs_tuple = std::make_tuple(lhs.rect.left, lhs.rect.right, lhs.rect.top, lhs.rect.bottom);
|
||||
auto rhs_tuple = std::make_tuple(rhs.rect.left, rhs.rect.right, rhs.rect.top, rhs.rect.bottom);
|
||||
return lhs_tuple == rhs_tuple;
|
||||
return static_cast<bool>(info.dwFlags & MONITORINFOF_PRIMARY);
|
||||
}
|
||||
|
||||
MonitorInfo::MonitorInfo(HMONITOR h) :
|
||||
handle{ h }
|
||||
{
|
||||
info.cbSize = sizeof(MONITORINFOEX);
|
||||
GetMonitorInfoW(handle, &info);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK GetDisplaysEnumCb(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM data)
|
||||
{
|
||||
MONITORINFOEX monitorInfo;
|
||||
monitorInfo.cbSize = sizeof(MONITORINFOEX);
|
||||
if (GetMonitorInfo(monitor, &monitorInfo))
|
||||
{
|
||||
reinterpret_cast<std::vector<MonitorInfo>*>(data)->emplace_back(monitor, monitorInfo.rcWork);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
static BOOL CALLBACK GetDisplaysEnumCbWithNonWorkingArea(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM data)
|
||||
{
|
||||
MONITORINFOEX monitorInfo;
|
||||
monitorInfo.cbSize = sizeof(MONITORINFOEX);
|
||||
if (GetMonitorInfo(monitor, &monitorInfo))
|
||||
{
|
||||
reinterpret_cast<std::vector<MonitorInfo>*>(data)->emplace_back(monitor, monitorInfo.rcMonitor);
|
||||
}
|
||||
auto* monitors = reinterpret_cast<std::vector<MonitorInfo>*>(data);
|
||||
monitors->emplace_back(monitor);
|
||||
return true;
|
||||
};
|
||||
|
||||
std::vector<MonitorInfo> MonitorInfo::GetMonitors(bool includeNonWorkingArea)
|
||||
{
|
||||
std::vector<MonitorInfo> monitors;
|
||||
EnumDisplayMonitors(NULL, NULL, includeNonWorkingArea ? GetDisplaysEnumCbWithNonWorkingArea : GetDisplaysEnumCb, reinterpret_cast<LPARAM>(&monitors));
|
||||
std::sort(begin(monitors), end(monitors), [](const MonitorInfo& lhs, const MonitorInfo& rhs) {
|
||||
return lhs.rect < rhs.rect;
|
||||
EnumDisplayMonitors(nullptr, nullptr, GetDisplaysEnumCb, reinterpret_cast<LPARAM>(&monitors));
|
||||
std::sort(begin(monitors), end(monitors), [=](const MonitorInfo& lhs, const MonitorInfo& rhs) {
|
||||
const auto lhsSize = lhs.GetScreenSize(includeNonWorkingArea);
|
||||
const auto rhsSize = rhs.GetScreenSize(includeNonWorkingArea);
|
||||
|
||||
return lhsSize < rhsSize;
|
||||
});
|
||||
return monitors;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK GetPrimaryDisplayEnumCb(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM data)
|
||||
{
|
||||
MONITORINFOEX monitorInfo;
|
||||
monitorInfo.cbSize = sizeof(MONITORINFOEX);
|
||||
|
||||
if (GetMonitorInfo(monitor, &monitorInfo) && (monitorInfo.dwFlags & MONITORINFOF_PRIMARY))
|
||||
{
|
||||
reinterpret_cast<MonitorInfo*>(data)->handle = monitor;
|
||||
reinterpret_cast<MonitorInfo*>(data)->rect = monitorInfo.rcWork;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
MonitorInfo MonitorInfo::GetPrimaryMonitor()
|
||||
{
|
||||
MonitorInfo primary({}, {});
|
||||
EnumDisplayMonitors(NULL, NULL, GetPrimaryDisplayEnumCb, reinterpret_cast<LPARAM>(&primary));
|
||||
return primary;
|
||||
auto monitors = MonitorInfo::GetMonitors(false);
|
||||
if (monitors.size() > 1)
|
||||
{
|
||||
for (auto monitor : monitors)
|
||||
{
|
||||
if (monitor.IsPrimary())
|
||||
return monitor;
|
||||
}
|
||||
}
|
||||
return monitors[0];
|
||||
}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
|
||||
#include <compare>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
struct ScreenSize
|
||||
// TODO: merge with FZ::Rect
|
||||
struct Box
|
||||
{
|
||||
explicit ScreenSize(RECT rect) :
|
||||
rect(rect) {}
|
||||
RECT rect;
|
||||
|
||||
explicit Box(RECT rect = {}) :
|
||||
rect(rect) {}
|
||||
Box(const Box&) = default;
|
||||
Box& operator=(const Box&) = default;
|
||||
|
||||
int left() const { return rect.left; }
|
||||
int right() const { return rect.right; }
|
||||
int top() const { return rect.top; }
|
||||
@@ -22,17 +30,31 @@ struct ScreenSize
|
||||
POINT bottom_left() const { return { rect.left, rect.bottom }; };
|
||||
POINT bottom_middle() const { return { rect.left + width() / 2, rect.bottom }; };
|
||||
POINT bottom_right() const { return { rect.right, rect.bottom }; };
|
||||
inline bool inside(const POINT point) const { return PtInRect(&rect, point); }
|
||||
|
||||
inline friend auto operator<=>(const Box& lhs, const Box& rhs)
|
||||
{
|
||||
auto lhs_tuple = std::make_tuple(lhs.rect.left, lhs.rect.right, lhs.rect.top, lhs.rect.bottom);
|
||||
auto rhs_tuple = std::make_tuple(rhs.rect.left, rhs.rect.right, rhs.rect.top, rhs.rect.bottom);
|
||||
return lhs_tuple <=> rhs_tuple;
|
||||
}
|
||||
};
|
||||
|
||||
struct MonitorInfo : ScreenSize
|
||||
class MonitorInfo
|
||||
{
|
||||
explicit MonitorInfo(HMONITOR monitor, RECT rect) :
|
||||
handle(monitor), ScreenSize(rect) {}
|
||||
HMONITOR handle;
|
||||
MONITORINFOEX info = {};
|
||||
|
||||
public:
|
||||
explicit MonitorInfo(HMONITOR h);
|
||||
inline HMONITOR GetHandle() const
|
||||
{
|
||||
return handle;
|
||||
}
|
||||
Box GetScreenSize(const bool includeNonWorkingArea) const;
|
||||
bool IsPrimary() const;
|
||||
|
||||
// Returns monitor rects ordered from left to right
|
||||
static std::vector<MonitorInfo> GetMonitors(bool includeNonWorkingArea);
|
||||
static MonitorInfo GetPrimaryMonitor();
|
||||
};
|
||||
|
||||
bool operator==(const ScreenSize& lhs, const ScreenSize& rhs);
|
||||
|
||||
@@ -13,10 +13,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.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="System.Management" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
@@ -24,21 +20,4 @@
|
||||
<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,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>
|
||||
|
||||
@@ -25,6 +25,22 @@ namespace PTSettingsHelper
|
||||
return result;
|
||||
}
|
||||
|
||||
std::wstring get_local_low_folder_location()
|
||||
{
|
||||
PWSTR local_app_path;
|
||||
winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppDataLow, 0, NULL, &local_app_path));
|
||||
std::wstring result{ local_app_path };
|
||||
CoTaskMemFree(local_app_path);
|
||||
|
||||
result += L"\\Microsoft\\PowerToys";
|
||||
std::filesystem::path save_path(result);
|
||||
if (!std::filesystem::exists(save_path))
|
||||
{
|
||||
std::filesystem::create_directories(save_path);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::wstring get_module_save_folder_location(std::wstring_view powertoy_key)
|
||||
{
|
||||
std::wstring result = get_root_save_folder_location();
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace PTSettingsHelper
|
||||
std::wstring get_module_save_file_location(std::wstring_view powertoy_key);
|
||||
std::wstring get_module_save_folder_location(std::wstring_view powertoy_name);
|
||||
std::wstring get_root_save_folder_location();
|
||||
std::wstring get_local_low_folder_location();
|
||||
|
||||
void save_module_settings(std::wstring_view powertoy_name, json::JsonObject& settings);
|
||||
json::JsonObject load_module_settings(std::wstring_view powertoy_name);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -195,8 +195,17 @@ public
|
||||
return gcnew String(CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT);
|
||||
}
|
||||
|
||||
static String ^ ShowPowerOCRSharedEvent() {
|
||||
return gcnew String(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT);
|
||||
}
|
||||
|
||||
static String ^ AwakeExitEvent() {
|
||||
return gcnew String(CommonSharedConstants::AWAKE_EXIT_EVENT);
|
||||
}
|
||||
|
||||
static String ^ PowerAccentExitEvent() {
|
||||
return gcnew String(CommonSharedConstants::POWERACCENT_EXIT_EVENT);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,12 @@ namespace CommonSharedConstants
|
||||
// Path to the event used by AlwaysOnTop
|
||||
const wchar_t ALWAYS_ON_TOP_PIN_EVENT[] = L"Local\\AlwaysOnTopPinEvent-892e0aa2-cfa8-4cc4-b196-ddeb32314ce8";
|
||||
|
||||
// Path to the event used by PowerAccent
|
||||
const wchar_t POWERACCENT_EXIT_EVENT[] = L"Local\\PowerToysPowerAccentExitEvent-53e93389-d19a-4fbb-9b36-1981c8965e17";
|
||||
|
||||
// Path to the event used by PowerOCR
|
||||
const wchar_t SHOW_POWEROCR_SHARED_EVENT[] = L"Local\\PowerOCREvent-dc864e06-e1af-4ecc-9078-f98bee745e3a";
|
||||
|
||||
// Max DWORD for key code to disable keys.
|
||||
const DWORD VK_DISABLED = 0x100;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ struct LogSettings
|
||||
inline const static std::string launcherLoggerName = "launcher";
|
||||
inline const static std::wstring launcherLogPath = L"LogsModuleInterface\\launcher-log.txt";
|
||||
inline const static std::wstring awakeLogPath = L"Logs\\awake-log.txt";
|
||||
inline const static std::wstring powerAccentLogPath = L"quick-accent-log.txt";
|
||||
inline const static std::string fancyZonesLoggerName = "fancyzones";
|
||||
inline const static std::wstring fancyZonesLogPath = L"fancyzones-log.txt";
|
||||
inline const static std::wstring fancyZonesOldLogPath = L"FancyZonesLogs\\"; // needed to clean up old logs
|
||||
inline const static std::string shortcutGuideLoggerName = "shortcut-guide";
|
||||
inline const static std::wstring shortcutGuideLogPath = L"ShortcutGuideLogs\\shortcut-guide-log.txt";
|
||||
inline const static std::wstring powerOcrLogPath = L"Logs\\text-extractor-log.txt";
|
||||
inline const static std::string keyboardManagerLoggerName = "keyboard-manager";
|
||||
inline const static std::wstring keyboardManagerLogPath = L"Logs\\keyboard-manager-log.txt";
|
||||
inline const static std::string findMyMouseLoggerName = "find-my-mouse";
|
||||
@@ -31,6 +33,7 @@ struct LogSettings
|
||||
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::string powerOcrLoggerName = "TextExtractor";
|
||||
inline const static std::wstring alwaysOnTopLogPath = L"always-on-top-log.txt";
|
||||
inline const static int retention = 30;
|
||||
std::wstring logLevel;
|
||||
|
||||
@@ -9,10 +9,10 @@ struct UpdateState
|
||||
{
|
||||
enum State
|
||||
{
|
||||
upToDate = 0,
|
||||
errorDownloading = 1,
|
||||
readyToDownload = 2,
|
||||
readyToInstall = 3
|
||||
upToDate = 0,
|
||||
errorDownloading = 1,
|
||||
readyToDownload = 2,
|
||||
readyToInstall = 3
|
||||
} state = upToDate;
|
||||
std::wstring releasePageUrl;
|
||||
std::optional<std::time_t> githubUpdateLastCheckedDate;
|
||||
|
||||
@@ -156,7 +156,7 @@ inline void LogStackTrace()
|
||||
Logger::error(L"Failed to capture context. {}", get_last_error_or_default(GetLastError()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
STACKFRAME64 stack;
|
||||
memset(&stack, 0, sizeof(STACKFRAME64));
|
||||
|
||||
@@ -238,14 +238,14 @@ inline LONG WINAPI UnhandledExceptionHandler(PEXCEPTION_POINTERS info)
|
||||
}
|
||||
|
||||
/* Handler to trap abort() calls */
|
||||
inline void AbortHandler(int signal_number)
|
||||
inline void AbortHandler(int /*signal_number*/)
|
||||
{
|
||||
Logger::error("--- ABORT");
|
||||
try
|
||||
{
|
||||
LogStackTrace();
|
||||
}
|
||||
catch(...)
|
||||
catch (...)
|
||||
{
|
||||
Logger::error("Failed to log stack trace on abort");
|
||||
Logger::flush();
|
||||
@@ -271,9 +271,9 @@ inline void InitUnhandledExceptionHandler(void)
|
||||
// Global handler for unhandled exceptions
|
||||
SetUnhandledExceptionFilter(UnhandledExceptionHandler);
|
||||
// Handler for abort()
|
||||
signal(SIGABRT, &AbortHandler);
|
||||
signal(SIGABRT, &AbortHandler);
|
||||
}
|
||||
catch(...)
|
||||
catch (...)
|
||||
{
|
||||
Logger::error("Failed to init global unhandled exception handler");
|
||||
}
|
||||
|
||||
30
src/common/utils/serialized.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <shared_mutex>
|
||||
|
||||
template<typename StateT>
|
||||
class Serialized
|
||||
{
|
||||
mutable std::shared_mutex m;
|
||||
StateT s;
|
||||
|
||||
public:
|
||||
void Read(std::function<void(const StateT&)> fn) const
|
||||
{
|
||||
std::shared_lock lock{ m };
|
||||
fn(s);
|
||||
}
|
||||
|
||||
void Access(std::function<void(StateT&)> fn)
|
||||
{
|
||||
std::unique_lock lock{ m };
|
||||
fn(s);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
std::unique_lock lock{ m };
|
||||
s = {};
|
||||
}
|
||||
};
|
||||
@@ -25,7 +25,7 @@ inline std::optional<std::wstring> get_last_error_message(const DWORD dw)
|
||||
inline std::wstring get_last_error_or_default(const DWORD dw)
|
||||
{
|
||||
auto message = get_last_error_message(dw);
|
||||
return message.has_value() ? message.value() : L"";
|
||||
return message.has_value() ? *message : L"";
|
||||
}
|
||||
|
||||
inline void show_last_error_message(const wchar_t* functionName, DWORD dw, const wchar_t* errorTitle)
|
||||
|
||||
@@ -8,24 +8,24 @@
|
||||
#include <optional>
|
||||
|
||||
// Initializes and runs windows message loop
|
||||
inline int run_message_loop(const bool until_idle = false, const std::optional<uint32_t> timeout_seconds = {})
|
||||
inline int run_message_loop(const bool until_idle = false, const std::optional<uint32_t> timeout_ms = {})
|
||||
{
|
||||
MSG msg{};
|
||||
bool stop = false;
|
||||
UINT_PTR timerId = 0;
|
||||
if (timeout_seconds.has_value())
|
||||
if (timeout_ms.has_value())
|
||||
{
|
||||
timerId = SetTimer(nullptr, 0, *timeout_seconds * 1000, nullptr);
|
||||
timerId = SetTimer(nullptr, 0, *timeout_ms, nullptr);
|
||||
}
|
||||
|
||||
while (!stop && GetMessageW(&msg, nullptr, 0, 0))
|
||||
while (!stop && (until_idle ? PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE) : GetMessageW(&msg, nullptr, 0, 0)))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
stop = until_idle && !PeekMessageW(&msg, nullptr, 0, 0, PM_NOREMOVE);
|
||||
stop = stop || (msg.message == WM_TIMER && msg.wParam == timerId);
|
||||
}
|
||||
if (timeout_seconds.has_value())
|
||||
if (timeout_ms.has_value())
|
||||
{
|
||||
KillTimer(nullptr, timerId);
|
||||
}
|
||||
@@ -55,3 +55,24 @@ inline bool is_system_window(HWND hwnd, const char* class_name)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T GetWindowCreateParam(LPARAM lparam)
|
||||
{
|
||||
static_assert(sizeof(T) <= sizeof(void*));
|
||||
T data{ (T)(reinterpret_cast<CREATESTRUCT*>(lparam)->lpCreateParams) };
|
||||
return data;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void StoreWindowParam(HWND window, T data)
|
||||
{
|
||||
static_assert(sizeof(T) <= sizeof(void*));
|
||||
SetWindowLongPtrW(window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(data));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T GetWindowParam(HWND window)
|
||||
{
|
||||
return (T)GetWindowLongPtrW(window, GWLP_USERDATA);
|
||||
}
|
||||
|
||||
73
src/modules/MeasureTool/MeasureToolCore/BGRATextureView.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "BGRATextureView.h"
|
||||
|
||||
#if defined(DEBUG_TEXTURE)
|
||||
void BGRATextureView::SaveAsBitmap(const char* filename) const
|
||||
{
|
||||
wil::unique_hbitmap bitmap{ CreateBitmap(static_cast<int>(pitch), static_cast<int>(height), 1, 32, pixels) };
|
||||
const HBITMAP hBitmap = bitmap.get();
|
||||
DWORD dwPaletteSize = 0, dwBmBitsSize = 0, dwDIBSize = 0, dwWritten = 0;
|
||||
LPBITMAPINFOHEADER lpBitmapInfo;
|
||||
HANDLE hDib, hPal, hOldPal2 = NULL;
|
||||
HDC hDC = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
|
||||
const int iBits = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES);
|
||||
DeleteDC(hDC);
|
||||
WORD wBitCount = 24;
|
||||
if (iBits <= 1)
|
||||
wBitCount = 1;
|
||||
else if (iBits <= 4)
|
||||
wBitCount = 4;
|
||||
else if (iBits <= 8)
|
||||
wBitCount = 8;
|
||||
|
||||
BITMAP Bitmap0;
|
||||
GetObject(hBitmap, sizeof(Bitmap0), (LPSTR)&Bitmap0);
|
||||
BITMAPINFOHEADER bi = {};
|
||||
bi.biSize = sizeof(BITMAPINFOHEADER);
|
||||
bi.biWidth = Bitmap0.bmWidth;
|
||||
bi.biHeight = -Bitmap0.bmHeight;
|
||||
bi.biPlanes = 1;
|
||||
bi.biBitCount = wBitCount;
|
||||
bi.biCompression = BI_RGB;
|
||||
bi.biClrUsed = 256;
|
||||
dwBmBitsSize = ((Bitmap0.bmWidth * wBitCount + 31) & ~31) / 8 * Bitmap0.bmHeight;
|
||||
hDib = GlobalAlloc(GHND, dwBmBitsSize + dwPaletteSize + sizeof(BITMAPINFOHEADER));
|
||||
lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalLock(hDib);
|
||||
*lpBitmapInfo = bi;
|
||||
|
||||
hPal = GetStockObject(DEFAULT_PALETTE);
|
||||
if (hPal)
|
||||
{
|
||||
hDC = GetDC(NULL);
|
||||
hOldPal2 = SelectPalette(hDC, (HPALETTE)hPal, FALSE);
|
||||
RealizePalette(hDC);
|
||||
}
|
||||
|
||||
GetDIBits(hDC, hBitmap, 0, (UINT)Bitmap0.bmHeight, (LPSTR)lpBitmapInfo + sizeof(BITMAPINFOHEADER) + dwPaletteSize, (BITMAPINFO*)lpBitmapInfo, DIB_RGB_COLORS);
|
||||
|
||||
if (hOldPal2)
|
||||
{
|
||||
SelectPalette(hDC, (HPALETTE)hOldPal2, TRUE);
|
||||
RealizePalette(hDC);
|
||||
ReleaseDC(NULL, hDC);
|
||||
}
|
||||
|
||||
wil::unique_handle fh{ CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL) };
|
||||
|
||||
if (!fh)
|
||||
return;
|
||||
|
||||
BITMAPFILEHEADER bitmapFileHeader = {};
|
||||
bitmapFileHeader.bfType = 0x4D42; // "BM"
|
||||
dwDIBSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + dwPaletteSize + dwBmBitsSize;
|
||||
bitmapFileHeader.bfSize = dwDIBSize;
|
||||
bitmapFileHeader.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + (DWORD)sizeof(BITMAPINFOHEADER) + dwPaletteSize;
|
||||
|
||||
WriteFile(fh.get(), (LPSTR)&bitmapFileHeader, sizeof(BITMAPFILEHEADER), &dwWritten, NULL);
|
||||
|
||||
WriteFile(fh.get(), (LPSTR)lpBitmapInfo, dwDIBSize, &dwWritten, NULL);
|
||||
GlobalUnlock(hDib);
|
||||
GlobalFree(hDib);
|
||||
}
|
||||
#endif
|
||||
169
src/modules/MeasureTool/MeasureToolCore/BGRATextureView.h
Normal file
@@ -0,0 +1,169 @@
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <wil/resource.h>
|
||||
#ifdef _M_ARM64
|
||||
#include <arm64_neon.h.>
|
||||
#else
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
#include <d3d11.h>
|
||||
|
||||
|
||||
//#define DEBUG_TEXTURE
|
||||
|
||||
#if defined(_M_ARM64)
|
||||
|
||||
// Adopted from https://github.com/DLTcollab/sse2neon/blob/master/sse2neon.h
|
||||
|
||||
using __m128i = int64x2_t;
|
||||
|
||||
inline __m128i _mm_cvtsi32_si128(int a)
|
||||
{
|
||||
return vreinterpretq_s64_s32(vsetq_lane_s32(a, vdupq_n_s32(0), 0));
|
||||
}
|
||||
|
||||
inline __m128i _mm_or_si128(__m128i a, __m128i b)
|
||||
{
|
||||
return vreinterpretq_s64_s32(
|
||||
vorrq_s32(vreinterpretq_s32_s64(a), vreinterpretq_s32_s64(b)));
|
||||
}
|
||||
|
||||
inline __m128i _mm_subs_epu8(__m128i a, __m128i b)
|
||||
{
|
||||
return vreinterpretq_s64_u8(
|
||||
vqsubq_u8(vreinterpretq_u8_s64(a), vreinterpretq_u8_s64(b)));
|
||||
}
|
||||
|
||||
inline __m128i _mm_sad_epu8(__m128i a, __m128i b)
|
||||
{
|
||||
uint16x8_t t = vpaddlq_u8(vabdq_u8((uint8x16_t)a, (uint8x16_t)b));
|
||||
return vreinterpretq_s64_u64(vpaddlq_u32(vpaddlq_u16(t)));
|
||||
}
|
||||
|
||||
inline __m128i _mm_setzero_si128(void)
|
||||
{
|
||||
return vreinterpretq_s64_s32(vdupq_n_s32(0));
|
||||
}
|
||||
|
||||
inline int _mm_cvtsi128_si32(__m128i a)
|
||||
{
|
||||
return vgetq_lane_s32(vreinterpretq_s32_s64(a), 0);
|
||||
}
|
||||
|
||||
inline __m128i _mm_set1_epi16(short w)
|
||||
{
|
||||
return vreinterpretq_s64_s16(vdupq_n_s16(w));
|
||||
}
|
||||
|
||||
inline __m128i _mm_cmpgt_epi16(__m128i a, __m128i b)
|
||||
{
|
||||
return vreinterpretq_s64_u16(
|
||||
vcgtq_s16(vreinterpretq_s16_s64(a), vreinterpretq_s16_s64(b)));
|
||||
}
|
||||
|
||||
inline __m128i _mm_cvtepu8_epi16(__m128i a)
|
||||
{
|
||||
uint8x16_t u8x16 = vreinterpretq_u8_s64(a); /* xxxx xxxx HGFE DCBA */
|
||||
uint16x8_t u16x8 = vmovl_u8(vget_low_u8(u8x16)); /* 0H0G 0F0E 0D0C 0B0A */
|
||||
return vreinterpretq_s64_u16(u16x8);
|
||||
}
|
||||
|
||||
inline int64_t _mm_cvtsi128_si64(__m128i a)
|
||||
{
|
||||
return vgetq_lane_s64(a, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline __m128i distance_epu8(const __m128i a, __m128i b)
|
||||
{
|
||||
return _mm_or_si128(_mm_subs_epu8(a, b),
|
||||
_mm_subs_epu8(b, a));
|
||||
}
|
||||
|
||||
struct BGRATextureView
|
||||
{
|
||||
const uint32_t* pixels = nullptr;
|
||||
size_t pitch = {};
|
||||
size_t width = {};
|
||||
size_t height = {};
|
||||
|
||||
BGRATextureView() = default;
|
||||
|
||||
BGRATextureView(BGRATextureView&& rhs) = default;
|
||||
|
||||
inline uint32_t GetPixel(const size_t x, const size_t y) const
|
||||
{
|
||||
assert(x < width && x >= 0);
|
||||
assert(y < height && y >= 0);
|
||||
return pixels[x + pitch * y];
|
||||
}
|
||||
|
||||
template<bool perChannel>
|
||||
static inline bool PixelsClose(const uint32_t pixel1, const uint32_t pixel2, uint8_t tolerance)
|
||||
{
|
||||
const __m128i rgba1 = _mm_cvtsi32_si128(pixel1);
|
||||
const __m128i rgba2 = _mm_cvtsi32_si128(pixel2);
|
||||
const __m128i distances = distance_epu8(rgba1, rgba2);
|
||||
|
||||
// Method 1: Test whether each channel distance is not greater than tolerance
|
||||
if constexpr (perChannel)
|
||||
{
|
||||
const __m128i tolerances = _mm_set1_epi16(tolerance);
|
||||
const auto gtResults128 = _mm_cmpgt_epi16(_mm_cvtepu8_epi16(distances), tolerances);
|
||||
return _mm_cvtsi128_si64(gtResults128) == 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Method 2: Test whether sum of all channel differences is smaller than tolerance
|
||||
const int32_t score = _mm_cvtsi128_si32(_mm_sad_epu8(distances, _mm_setzero_si128())) & std::numeric_limits<uint8_t>::max();
|
||||
return score <= tolerance;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG_TEXTURE)
|
||||
void SaveAsBitmap(const char* filename) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
class MappedTextureView
|
||||
{
|
||||
winrt::com_ptr<ID3D11DeviceContext> context;
|
||||
winrt::com_ptr<ID3D11Texture2D> texture;
|
||||
|
||||
public:
|
||||
BGRATextureView view;
|
||||
MappedTextureView(winrt::com_ptr<ID3D11Texture2D> _texture,
|
||||
winrt::com_ptr<ID3D11DeviceContext> _context,
|
||||
const size_t textureWidth,
|
||||
const size_t textureHeight) :
|
||||
texture{ std::move(_texture) }, context{ std::move(_context) }
|
||||
{
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
texture->GetDesc(&desc);
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE resource = {};
|
||||
winrt::check_hresult(context->Map(texture.get(), D3D11CalcSubresource(0, 0, 0), D3D11_MAP_READ, 0, &resource));
|
||||
|
||||
view.pixels = static_cast<const uint32_t*>(resource.pData);
|
||||
view.pitch = resource.RowPitch / 4;
|
||||
view.width = textureWidth;
|
||||
view.height = textureHeight;
|
||||
}
|
||||
|
||||
MappedTextureView(MappedTextureView&&) = default;
|
||||
MappedTextureView& operator=(MappedTextureView&&) = default;
|
||||
|
||||
inline winrt::com_ptr<ID3D11Texture2D> GetTexture() const
|
||||
{
|
||||
return texture;
|
||||
}
|
||||
|
||||
~MappedTextureView()
|
||||
{
|
||||
if (context && texture)
|
||||
context->Unmap(texture.get(), D3D11CalcSubresource(0, 0, 0));
|
||||
}
|
||||
};
|
||||
169
src/modules/MeasureTool/MeasureToolCore/BoundsToolOverlayUI.cpp
Normal file
@@ -0,0 +1,169 @@
|
||||
#include "pch.h"
|
||||
#include "BoundsToolOverlayUI.h"
|
||||
#include "CoordinateSystemConversion.h"
|
||||
#include "Clipboard.h"
|
||||
|
||||
#include <common/utils/window.h>
|
||||
|
||||
LRESULT CALLBACK BoundsToolWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) noexcept
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
auto toolState = GetWindowCreateParam<BoundsToolState*>(lparam);
|
||||
StoreWindowParam(window, toolState);
|
||||
break;
|
||||
}
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
case WM_KEYUP:
|
||||
if (wparam == VK_ESCAPE)
|
||||
{
|
||||
PostMessageW(window, WM_CLOSE, {}, {});
|
||||
}
|
||||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
{
|
||||
for (; ShowCursor(false) >= 0;)
|
||||
;
|
||||
auto toolState = GetWindowParam<BoundsToolState*>(window);
|
||||
if (!toolState)
|
||||
break;
|
||||
const POINT cursorPos = convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace);
|
||||
|
||||
D2D_POINT_2F newRegionStart = { .x = static_cast<float>(cursorPos.x), .y = static_cast<float>(cursorPos.y) };
|
||||
toolState->perScreen[window].currentRegionStart = newRegionStart;
|
||||
break;
|
||||
}
|
||||
case WM_CURSOR_LEFT_MONITOR:
|
||||
{
|
||||
for (; ShowCursor(true) < 0;)
|
||||
;
|
||||
auto toolState = GetWindowParam<BoundsToolState*>(window);
|
||||
if (!toolState)
|
||||
break;
|
||||
toolState->perScreen[window].currentRegionStart = std::nullopt;
|
||||
break;
|
||||
}
|
||||
case WM_LBUTTONUP:
|
||||
{
|
||||
for (; ShowCursor(true) < 0;)
|
||||
;
|
||||
|
||||
auto toolState = GetWindowParam<BoundsToolState*>(window);
|
||||
if (!toolState || !toolState->perScreen[window].currentRegionStart)
|
||||
break;
|
||||
|
||||
toolState->commonState->overlayBoxText.Read([](const OverlayBoxText& text) {
|
||||
SetClipBoardToText(text.buffer);
|
||||
});
|
||||
|
||||
if (const bool shiftPress = GetKeyState(VK_SHIFT) & 0x8000; shiftPress)
|
||||
{
|
||||
const auto cursorPos = convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace);
|
||||
|
||||
D2D1_RECT_F rect;
|
||||
std::tie(rect.left, rect.right) = std::minmax(static_cast<float>(cursorPos.x), toolState->perScreen[window].currentRegionStart->x);
|
||||
std::tie(rect.top, rect.bottom) = std::minmax(static_cast<float>(cursorPos.y), toolState->perScreen[window].currentRegionStart->y);
|
||||
toolState->perScreen[window].measurements.push_back(Measurement{ rect });
|
||||
}
|
||||
|
||||
toolState->perScreen[window].currentRegionStart = std::nullopt;
|
||||
break;
|
||||
}
|
||||
case WM_RBUTTONUP:
|
||||
{
|
||||
for (; ShowCursor(true) < 0;)
|
||||
;
|
||||
|
||||
auto toolState = GetWindowParam<BoundsToolState*>(window);
|
||||
if (!toolState)
|
||||
break;
|
||||
|
||||
if (toolState->perScreen[window].currentRegionStart)
|
||||
toolState->perScreen[window].currentRegionStart = std::nullopt;
|
||||
else
|
||||
{
|
||||
if (toolState->perScreen[window].measurements.empty())
|
||||
PostMessageW(window, WM_CLOSE, {}, {});
|
||||
else
|
||||
toolState->perScreen[window].measurements.clear();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return DefWindowProcW(window, message, wparam, lparam);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
void DrawMeasurement(const Measurement& measurement,
|
||||
const bool alignTextBoxToCenter,
|
||||
const CommonState& commonState,
|
||||
HWND window,
|
||||
const D2DState& d2dState,
|
||||
float mouseX,
|
||||
float mouseY)
|
||||
{
|
||||
const bool screenQuadrantAware = !alignTextBoxToCenter;
|
||||
d2dState.ToggleAliasedLinesMode(true);
|
||||
d2dState.dxgiWindowState.rt->DrawRectangle(measurement.rect, d2dState.solidBrushes[Brush::line].get());
|
||||
d2dState.ToggleAliasedLinesMode(false);
|
||||
|
||||
OverlayBoxText text;
|
||||
const auto [crossSymbolPos, measureStringBufLen] =
|
||||
measurement.Print(text.buffer.data(),
|
||||
text.buffer.size(),
|
||||
true,
|
||||
true,
|
||||
commonState.units);
|
||||
|
||||
commonState.overlayBoxText.Access([&](OverlayBoxText& v) {
|
||||
v = text;
|
||||
});
|
||||
|
||||
if (alignTextBoxToCenter)
|
||||
{
|
||||
mouseX = measurement.rect.left + measurement.Width(Measurement::Unit::Pixel) / 2;
|
||||
mouseY = measurement.rect.top + measurement.Height(Measurement::Unit::Pixel) / 2;
|
||||
}
|
||||
|
||||
d2dState.DrawTextBox(text.buffer.data(),
|
||||
measureStringBufLen,
|
||||
crossSymbolPos,
|
||||
mouseX,
|
||||
mouseY,
|
||||
screenQuadrantAware,
|
||||
window);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawBoundsToolTick(const CommonState& commonState,
|
||||
const BoundsToolState& toolState,
|
||||
const HWND window,
|
||||
const D2DState& d2dState)
|
||||
{
|
||||
const auto it = toolState.perScreen.find(window);
|
||||
if (it == end(toolState.perScreen))
|
||||
return;
|
||||
|
||||
d2dState.dxgiWindowState.rt->Clear();
|
||||
|
||||
const auto& perScreen = it->second;
|
||||
for (const auto& measure : perScreen.measurements)
|
||||
DrawMeasurement(measure, true, commonState, window, d2dState, measure.rect.right, measure.rect.bottom);
|
||||
|
||||
if (!perScreen.currentRegionStart.has_value())
|
||||
return;
|
||||
|
||||
const auto cursorPos = convert::FromSystemToWindow(window, commonState.cursorPosSystemSpace);
|
||||
|
||||
D2D1_RECT_F rect;
|
||||
const float cursorX = static_cast<float>(cursorPos.x);
|
||||
const float cursorY = static_cast<float>(cursorPos.y);
|
||||
std::tie(rect.left, rect.right) = std::minmax(cursorX, perScreen.currentRegionStart->x);
|
||||
std::tie(rect.top, rect.bottom) = std::minmax(cursorY, perScreen.currentRegionStart->y);
|
||||
DrawMeasurement(Measurement{ rect }, false, commonState, window, d2dState, cursorX, cursorY);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include "D2DState.h"
|
||||
#include "ToolState.h"
|
||||
|
||||
void DrawBoundsToolTick(const CommonState& commonState,
|
||||
const BoundsToolState& toolState,
|
||||
const HWND overlayWindow,
|
||||
const D2DState& d2dState);
|
||||
|
||||
LRESULT CALLBACK BoundsToolWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) noexcept;
|
||||
28
src/modules/MeasureTool/MeasureToolCore/Clipboard.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "Clipboard.h"
|
||||
|
||||
void SetClipBoardToText(const std::wstring_view text)
|
||||
{
|
||||
if (!OpenClipboard(nullptr))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const wil::unique_hglobal handle{ GlobalAlloc(GMEM_MOVEABLE, static_cast<size_t>((text.length() + 1) * sizeof(wchar_t))) };
|
||||
if (!handle)
|
||||
{
|
||||
CloseClipboard();
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto* bufPtr = static_cast<wchar_t*>(GlobalLock(handle.get())); bufPtr != nullptr)
|
||||
{
|
||||
text.copy(bufPtr, text.length());
|
||||
GlobalUnlock(handle.get());
|
||||
}
|
||||
|
||||
EmptyClipboard();
|
||||
SetClipboardData(CF_UNICODETEXT, handle.get());
|
||||
CloseClipboard();
|
||||
}
|
||||
5
src/modules/MeasureTool/MeasureToolCore/Clipboard.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
void SetClipBoardToText(const std::wstring_view text);
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
namespace convert
|
||||
{
|
||||
// Converts a given point from multi-monitor coordinate system to the one relative to HWND
|
||||
inline POINT FromSystemToWindow(HWND window, POINT p)
|
||||
{
|
||||
ScreenToClient(window, &p);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
175
src/modules/MeasureTool/MeasureToolCore/D2DState.cpp
Normal file
@@ -0,0 +1,175 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "constants.h"
|
||||
#include "D2DState.h"
|
||||
#include "DxgiAPI.h"
|
||||
|
||||
#include <common/Display/dpi_aware.h>
|
||||
#include <ToolState.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
void DetermineScreenQuadrant(const HWND window, long x, long y, bool& inLeftHalf, bool& inTopHalf)
|
||||
{
|
||||
RECT windowRect{};
|
||||
GetWindowRect(window, &windowRect);
|
||||
const long w = windowRect.right - windowRect.left;
|
||||
const long h = windowRect.bottom - windowRect.top;
|
||||
inLeftHalf = x < w / 2;
|
||||
inTopHalf = y < h / 2;
|
||||
}
|
||||
}
|
||||
|
||||
D2DState::D2DState(const DxgiAPI* dxgi,
|
||||
HWND window,
|
||||
std::vector<D2D1::ColorF> solidBrushesColors)
|
||||
{
|
||||
dxgiAPI = dxgi;
|
||||
|
||||
unsigned dpi = DPIAware::DEFAULT_DPI;
|
||||
DPIAware::GetScreenDPIForWindow(window, dpi);
|
||||
dpiScale = dpi / static_cast<float>(DPIAware::DEFAULT_DPI);
|
||||
|
||||
dxgiWindowState = dxgiAPI->CreateD2D1RenderTarget(window);
|
||||
|
||||
winrt::check_hresult(dxgiWindowState.rt->CreateCompatibleRenderTarget(bitmapRt.put()));
|
||||
|
||||
winrt::check_hresult(dxgiAPI->writeFactory->CreateTextFormat(L"Segoe UI Variable Text",
|
||||
nullptr,
|
||||
DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL,
|
||||
DWRITE_FONT_STRETCH_NORMAL,
|
||||
consts::FONT_SIZE * dpiScale,
|
||||
L"en-US",
|
||||
textFormat.put()));
|
||||
winrt::check_hresult(textFormat->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER));
|
||||
winrt::check_hresult(textFormat->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER));
|
||||
winrt::check_hresult(textFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP));
|
||||
|
||||
solidBrushes.resize(solidBrushesColors.size());
|
||||
for (size_t i = 0; i < solidBrushes.size(); ++i)
|
||||
{
|
||||
winrt::check_hresult(dxgiWindowState.rt->CreateSolidColorBrush(solidBrushesColors[i], solidBrushes[i].put()));
|
||||
}
|
||||
|
||||
const auto deviceContext = dxgiWindowState.rt.as<ID2D1DeviceContext>();
|
||||
winrt::check_hresult(deviceContext->CreateEffect(CLSID_D2D1Shadow, shadowEffect.put()));
|
||||
winrt::check_hresult(shadowEffect->SetValue(D2D1_SHADOW_PROP_BLUR_STANDARD_DEVIATION, consts::SHADOW_RADIUS));
|
||||
winrt::check_hresult(shadowEffect->SetValue(D2D1_SHADOW_PROP_COLOR, D2D1::ColorF(0.f, 0.f, 0.f, consts::SHADOW_OPACITY)));
|
||||
|
||||
winrt::check_hresult(deviceContext->CreateEffect(CLSID_D2D12DAffineTransform, affineTransformEffect.put()));
|
||||
affineTransformEffect->SetInputEffect(0, shadowEffect.get());
|
||||
|
||||
textRenderer = winrt::make_self<PerGlyphOpacityTextRender>(dxgi->d2dFactory2, dxgiWindowState.rt, solidBrushes[Brush::foreground]);
|
||||
}
|
||||
|
||||
void D2DState::DrawTextBox(const wchar_t* text,
|
||||
const size_t textLen,
|
||||
const std::optional<size_t> halfOpaqueSymbolPos,
|
||||
const float centerX,
|
||||
const float centerY,
|
||||
const bool screenQuadrantAware,
|
||||
const HWND window) const
|
||||
{
|
||||
wil::com_ptr<IDWriteTextLayout> textLayout;
|
||||
winrt::check_hresult(
|
||||
dxgiAPI->writeFactory->CreateTextLayout(text,
|
||||
static_cast<uint32_t>(textLen),
|
||||
textFormat.get(),
|
||||
std::numeric_limits<float>::max(),
|
||||
std::numeric_limits<float>::max(),
|
||||
&textLayout));
|
||||
DWRITE_TEXT_METRICS textMetrics = {};
|
||||
winrt::check_hresult(textLayout->GetMetrics(&textMetrics));
|
||||
// Assumes text doesn't contain new lines
|
||||
const float lineHeight = textMetrics.height;
|
||||
textMetrics.width += lineHeight;
|
||||
textMetrics.height += lineHeight * .5f;
|
||||
winrt::check_hresult(textLayout->SetMaxWidth(textMetrics.width));
|
||||
winrt::check_hresult(textLayout->SetMaxHeight(textMetrics.height));
|
||||
|
||||
D2D1_RECT_F textRect{ .left = centerX - textMetrics.width / 2.f,
|
||||
.top = centerY - textMetrics.height / 2.f,
|
||||
.right = centerX + textMetrics.width / 2.f,
|
||||
.bottom = centerY + textMetrics.height / 2.f };
|
||||
|
||||
const float SHADOW_OFFSET = consts::SHADOW_OFFSET * dpiScale;
|
||||
if (screenQuadrantAware)
|
||||
{
|
||||
bool cursorInLeftScreenHalf = false;
|
||||
bool cursorInTopScreenHalf = false;
|
||||
DetermineScreenQuadrant(window,
|
||||
static_cast<long>(centerX),
|
||||
static_cast<long>(centerY),
|
||||
cursorInLeftScreenHalf,
|
||||
cursorInTopScreenHalf);
|
||||
float textQuadrantOffsetX = textMetrics.width / 2.f + SHADOW_OFFSET;
|
||||
float textQuadrantOffsetY = textMetrics.height / 2.f + SHADOW_OFFSET;
|
||||
if (!cursorInLeftScreenHalf)
|
||||
textQuadrantOffsetX *= -1.f;
|
||||
if (!cursorInTopScreenHalf)
|
||||
textQuadrantOffsetY *= -1.f;
|
||||
textRect.left += textQuadrantOffsetX;
|
||||
textRect.right += textQuadrantOffsetX;
|
||||
textRect.top += textQuadrantOffsetY;
|
||||
textRect.bottom += textQuadrantOffsetY;
|
||||
}
|
||||
|
||||
// Draw shadow
|
||||
bitmapRt->BeginDraw();
|
||||
bitmapRt->Clear(D2D1::ColorF(0.f, 0.f, 0.f, 0.f));
|
||||
D2D1_ROUNDED_RECT textBoxRect;
|
||||
textBoxRect.radiusX = textBoxRect.radiusY = consts::TEXT_BOX_CORNER_RADIUS * dpiScale;
|
||||
textBoxRect.rect.bottom = textRect.bottom;
|
||||
textBoxRect.rect.top = textRect.top;
|
||||
textBoxRect.rect.left = textRect.left;
|
||||
textBoxRect.rect.right = textRect.right;
|
||||
bitmapRt->FillRoundedRectangle(textBoxRect, solidBrushes[Brush::border].get());
|
||||
bitmapRt->EndDraw();
|
||||
|
||||
wil::com_ptr<ID2D1Bitmap> rtBitmap;
|
||||
bitmapRt->GetBitmap(&rtBitmap);
|
||||
|
||||
shadowEffect->SetInput(0, rtBitmap.get());
|
||||
const auto shadowMatrix = D2D1::Matrix3x2F::Translation(SHADOW_OFFSET, SHADOW_OFFSET);
|
||||
winrt::check_hresult(affineTransformEffect->SetValue(D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX,
|
||||
shadowMatrix));
|
||||
auto deviceContext = dxgiWindowState.rt.as<ID2D1DeviceContext>();
|
||||
deviceContext->DrawImage(affineTransformEffect.get(), D2D1_INTERPOLATION_MODE_LINEAR);
|
||||
|
||||
// Draw text box border rectangle
|
||||
dxgiWindowState.rt->DrawRoundedRectangle(textBoxRect, solidBrushes[Brush::border].get());
|
||||
const float TEXT_BOX_PADDING = 1.f * dpiScale;
|
||||
textBoxRect.rect.bottom -= TEXT_BOX_PADDING;
|
||||
textBoxRect.rect.top += TEXT_BOX_PADDING;
|
||||
textBoxRect.rect.left += TEXT_BOX_PADDING;
|
||||
textBoxRect.rect.right -= TEXT_BOX_PADDING;
|
||||
|
||||
// Draw text & its box
|
||||
dxgiWindowState.rt->FillRoundedRectangle(textBoxRect, solidBrushes[Brush::background].get());
|
||||
|
||||
if (halfOpaqueSymbolPos.has_value())
|
||||
{
|
||||
DWRITE_TEXT_RANGE textRange = { static_cast<uint32_t>(*halfOpaqueSymbolPos), 2 };
|
||||
auto opacityEffect = winrt::make_self<OpacityEffect>();
|
||||
opacityEffect->alpha = consts::CROSS_OPACITY;
|
||||
winrt::check_hresult(textLayout->SetDrawingEffect(opacityEffect.get(), textRange));
|
||||
}
|
||||
winrt::check_hresult(textLayout->Draw(nullptr, textRenderer.get(), textRect.left, textRect.top));
|
||||
}
|
||||
|
||||
void D2DState::ToggleAliasedLinesMode(const bool enabled) const
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
// Draw lines in the middle of a pixel to avoid bleeding, since [0,0] pixel is
|
||||
// a rectangle filled from (0,0) to (1,1) and the lines use thickness = 1.
|
||||
dxgiWindowState.rt->SetTransform(D2D1::Matrix3x2F::Translation(.5f, .5f));
|
||||
dxgiWindowState.rt->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
|
||||
}
|
||||
else
|
||||
{
|
||||
dxgiWindowState.rt->SetTransform(D2D1::Matrix3x2F::Identity());
|
||||
dxgiWindowState.rt->SetAntialiasMode(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE);
|
||||
}
|
||||
}
|
||||
44
src/modules/MeasureTool/MeasureToolCore/D2DState.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
#include "DxgiAPI.h"
|
||||
#include "PerGlyphOpacityTextRender.h"
|
||||
|
||||
enum Brush : size_t
|
||||
{
|
||||
line,
|
||||
foreground,
|
||||
background,
|
||||
border
|
||||
};
|
||||
|
||||
struct D2DState
|
||||
{
|
||||
const DxgiAPI* dxgiAPI = nullptr;
|
||||
|
||||
DxgiWindowState dxgiWindowState;
|
||||
winrt::com_ptr<ID2D1BitmapRenderTarget> bitmapRt;
|
||||
winrt::com_ptr<IDWriteTextFormat> textFormat;
|
||||
winrt::com_ptr<PerGlyphOpacityTextRender> textRenderer;
|
||||
std::vector<winrt::com_ptr<ID2D1SolidColorBrush>> solidBrushes;
|
||||
winrt::com_ptr<ID2D1Effect> shadowEffect;
|
||||
winrt::com_ptr<ID2D1Effect> affineTransformEffect;
|
||||
|
||||
float dpiScale = 1.f;
|
||||
|
||||
D2DState(const DxgiAPI*,
|
||||
HWND window,
|
||||
std::vector<D2D1::ColorF> solidBrushesColors);
|
||||
void DrawTextBox(const wchar_t* text,
|
||||
const size_t textLen,
|
||||
const std::optional<size_t> halfOpaqueSymbolPos,
|
||||
const float centerX,
|
||||
const float centerY,
|
||||
const bool screenQuadrantAware,
|
||||
const HWND window) const;
|
||||
void ToggleAliasedLinesMode(const bool enabled) const;
|
||||
};
|
||||
145
src/modules/MeasureTool/MeasureToolCore/DxgiAPI.cpp
Normal file
@@ -0,0 +1,145 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "DxgiAPI.h"
|
||||
|
||||
#include <common/Display/dpi_aware.h>
|
||||
|
||||
//#define DEBUG_DEVICES
|
||||
#define SEPARATE_D3D_FOR_CAPTURE
|
||||
|
||||
namespace
|
||||
{
|
||||
DxgiAPI::D3D CreateD3D()
|
||||
{
|
||||
DxgiAPI::D3D d3d;
|
||||
UINT flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
#if defined(DEBUG_DEVICES)
|
||||
flags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
#endif
|
||||
HRESULT hr =
|
||||
D3D11CreateDevice(nullptr,
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
nullptr,
|
||||
flags,
|
||||
nullptr,
|
||||
0,
|
||||
D3D11_SDK_VERSION,
|
||||
d3d.d3dDevice.put(),
|
||||
nullptr,
|
||||
nullptr);
|
||||
if (hr == DXGI_ERROR_UNSUPPORTED)
|
||||
{
|
||||
hr = D3D11CreateDevice(nullptr,
|
||||
D3D_DRIVER_TYPE_WARP,
|
||||
nullptr,
|
||||
flags,
|
||||
nullptr,
|
||||
0,
|
||||
D3D11_SDK_VERSION,
|
||||
d3d.d3dDevice.put(),
|
||||
nullptr,
|
||||
nullptr);
|
||||
}
|
||||
winrt::check_hresult(hr);
|
||||
|
||||
d3d.dxgiDevice = d3d.d3dDevice.as<IDXGIDevice>();
|
||||
winrt::check_hresult(CreateDirect3D11DeviceFromDXGIDevice(d3d.dxgiDevice.get(), d3d.d3dDeviceInspectable.put()));
|
||||
|
||||
winrt::com_ptr<IDXGIAdapter> adapter;
|
||||
winrt::check_hresult(d3d.dxgiDevice->GetParent(winrt::guid_of<IDXGIAdapter>(), adapter.put_void()));
|
||||
winrt::check_hresult(adapter->GetParent(winrt::guid_of<IDXGIFactory2>(), d3d.dxgiFactory2.put_void()));
|
||||
|
||||
d3d.d3dDevice->GetImmediateContext(d3d.d3dContext.put());
|
||||
winrt::check_bool(d3d.d3dContext);
|
||||
auto contextMultithread = d3d.d3dContext.as<ID3D11Multithread>();
|
||||
contextMultithread->SetMultithreadProtected(true);
|
||||
|
||||
return d3d;
|
||||
}
|
||||
}
|
||||
|
||||
DxgiAPI::DxgiAPI()
|
||||
{
|
||||
const D2D1_FACTORY_OPTIONS d2dFactoryOptions = {
|
||||
#if defined(DEBUG_DEVICES)
|
||||
D2D1_DEBUG_LEVEL_INFORMATION
|
||||
#else
|
||||
D2D1_DEBUG_LEVEL_NONE
|
||||
#endif
|
||||
};
|
||||
|
||||
winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, d2dFactoryOptions, d2dFactory2.put()));
|
||||
|
||||
winrt::check_hresult(DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
|
||||
winrt::guid_of<IDWriteFactory>(),
|
||||
reinterpret_cast<IUnknown**>(writeFactory.put())));
|
||||
|
||||
auto d3d = CreateD3D();
|
||||
d3dDevice = d3d.d3dDevice;
|
||||
dxgiDevice = d3d.dxgiDevice;
|
||||
d3dDeviceInspectable = d3d.d3dDeviceInspectable;
|
||||
dxgiFactory2 = d3d.dxgiFactory2;
|
||||
d3dContext = d3d.d3dContext;
|
||||
#if defined(SEPARATE_D3D_FOR_CAPTURE)
|
||||
auto d3dFC = CreateD3D();
|
||||
d3dForCapture = d3dFC;
|
||||
#else
|
||||
d3dForCapture = d3d;
|
||||
#endif
|
||||
winrt::check_hresult(d2dFactory2->CreateDevice(dxgiDevice.get(), d2dDevice1.put()));
|
||||
winrt::check_hresult(DCompositionCreateDevice(
|
||||
dxgiDevice.get(),
|
||||
winrt::guid_of<IDCompositionDevice>(),
|
||||
compositionDevice.put_void()));
|
||||
}
|
||||
|
||||
DxgiWindowState DxgiAPI::CreateD2D1RenderTarget(HWND window) const
|
||||
{
|
||||
RECT rect = {};
|
||||
winrt::check_bool(GetClientRect(window, &rect));
|
||||
|
||||
const DXGI_SWAP_CHAIN_DESC1 desc = {
|
||||
.Width = static_cast<UINT>(rect.right - rect.left),
|
||||
.Height = static_cast<UINT>(rect.bottom - rect.top),
|
||||
.Format = static_cast<DXGI_FORMAT>(winrt::DirectXPixelFormat::B8G8R8A8UIntNormalized),
|
||||
.SampleDesc = { .Count = 1, .Quality = 0 },
|
||||
.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT,
|
||||
.BufferCount = 2,
|
||||
.Scaling = DXGI_SCALING_STRETCH,
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
|
||||
.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED,
|
||||
};
|
||||
|
||||
DxgiWindowState state;
|
||||
winrt::com_ptr<ID2D1DeviceContext> rt;
|
||||
d2dDevice1->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE, rt.put());
|
||||
state.rt = rt;
|
||||
|
||||
winrt::check_hresult(dxgiFactory2->CreateSwapChainForComposition(d3dDevice.get(),
|
||||
&desc,
|
||||
nullptr,
|
||||
state.swapChain.put()));
|
||||
winrt::com_ptr<IDXGISurface> surface;
|
||||
winrt::check_hresult(state.swapChain->GetBuffer(0, winrt::guid_of<IDXGISurface>(), surface.put_void()));
|
||||
|
||||
const D2D1_BITMAP_PROPERTIES1 properties = {
|
||||
.pixelFormat = { .format = DXGI_FORMAT_B8G8R8A8_UNORM, .alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED },
|
||||
.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW
|
||||
};
|
||||
winrt::com_ptr<ID2D1Bitmap1> bitmap;
|
||||
winrt::check_hresult(rt->CreateBitmapFromDxgiSurface(surface.get(),
|
||||
properties,
|
||||
bitmap.put()));
|
||||
rt->SetTarget(bitmap.get());
|
||||
winrt::check_hresult(compositionDevice->CreateTargetForHwnd(window,
|
||||
true,
|
||||
state.compositionTarget.put()));
|
||||
|
||||
winrt::com_ptr<IDCompositionVisual> visual;
|
||||
winrt::check_hresult(compositionDevice->CreateVisual(visual.put()));
|
||||
winrt::check_hresult(visual->SetContent(state.swapChain.get()));
|
||||
winrt::check_hresult(state.compositionTarget->SetRoot(visual.get()));
|
||||
winrt::check_hresult(compositionDevice->Commit());
|
||||
|
||||
return state;
|
||||
}
|
||||
49
src/modules/MeasureTool/MeasureToolCore/DxgiAPI.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#include <d2d1_3.h>
|
||||
#include <d3d11_4.h>
|
||||
#include <dcomp.h>
|
||||
#include <dxgi1_3.h>
|
||||
#include <inspectable.h>
|
||||
#include <winrt/base.h>
|
||||
|
||||
struct DxgiWindowState
|
||||
{
|
||||
winrt::com_ptr<ID2D1RenderTarget> rt;
|
||||
winrt::com_ptr<IDXGISwapChain1> swapChain;
|
||||
winrt::com_ptr<IDCompositionTarget> compositionTarget;
|
||||
};
|
||||
|
||||
struct DxgiAPI final
|
||||
{
|
||||
struct D3D
|
||||
{
|
||||
winrt::com_ptr<ID3D11Device> d3dDevice;
|
||||
winrt::com_ptr<IDXGIDevice> dxgiDevice;
|
||||
winrt::com_ptr<IInspectable> d3dDeviceInspectable;
|
||||
winrt::com_ptr<IDXGIFactory2> dxgiFactory2;
|
||||
winrt::com_ptr<ID3D11DeviceContext> d3dContext;
|
||||
};
|
||||
|
||||
winrt::com_ptr<ID2D1Factory2> d2dFactory2;
|
||||
winrt::com_ptr<IDWriteFactory> writeFactory;
|
||||
|
||||
winrt::com_ptr<ID3D11Device> d3dDevice;
|
||||
winrt::com_ptr<IDXGIDevice> dxgiDevice;
|
||||
winrt::com_ptr<IInspectable> d3dDeviceInspectable;
|
||||
winrt::com_ptr<IDXGIFactory2> dxgiFactory2;
|
||||
winrt::com_ptr<ID3D11DeviceContext> d3dContext;
|
||||
|
||||
D3D d3dForCapture;
|
||||
|
||||
winrt::com_ptr<ID2D1Device1> d2dDevice1;
|
||||
winrt::com_ptr<IDCompositionDevice> compositionDevice;
|
||||
|
||||
DxgiAPI();
|
||||
|
||||
enum class Uninitialized
|
||||
{
|
||||
};
|
||||
explicit inline DxgiAPI(Uninitialized) {}
|
||||
|
||||
DxgiWindowState CreateD2D1RenderTarget(HWND window) const;
|
||||
};
|
||||
87
src/modules/MeasureTool/MeasureToolCore/EdgeDetection.cpp
Normal file
@@ -0,0 +1,87 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "constants.h"
|
||||
#include "EdgeDetection.h"
|
||||
|
||||
template<bool PerChannel,
|
||||
bool IsX,
|
||||
bool Increment>
|
||||
inline long FindEdge(const BGRATextureView& texture, const POINT centerPoint, const uint8_t tolerance)
|
||||
{
|
||||
using namespace consts;
|
||||
|
||||
const size_t maxDim = IsX ? texture.width : texture.height;
|
||||
|
||||
long x = std::clamp<long>(centerPoint.x, 1, static_cast<long>(texture.width - 2));
|
||||
long y = std::clamp<long>(centerPoint.y, 1, static_cast<long>(texture.height - 2));
|
||||
|
||||
const uint32_t startPixel = texture.GetPixel(x, y);
|
||||
while (true)
|
||||
{
|
||||
long oldX = x;
|
||||
long oldY = y;
|
||||
if constexpr (IsX)
|
||||
{
|
||||
if constexpr (Increment)
|
||||
{
|
||||
if (++x == maxDim)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (--x == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if constexpr (Increment)
|
||||
{
|
||||
if (++y == maxDim)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (--y == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t nextPixel = texture.GetPixel(x, y);
|
||||
if (!texture.PixelsClose<PerChannel>(startPixel, nextPixel, tolerance))
|
||||
{
|
||||
return IsX ? oldX : oldY;
|
||||
}
|
||||
}
|
||||
|
||||
return Increment ? static_cast<long>(IsX ? texture.width : texture.height) - 1 : 0;
|
||||
}
|
||||
|
||||
template<bool PerChannel>
|
||||
inline RECT DetectEdgesInternal(const BGRATextureView& texture,
|
||||
const POINT centerPoint,
|
||||
const uint8_t tolerance)
|
||||
{
|
||||
return RECT{ .left = FindEdge<PerChannel,
|
||||
true,
|
||||
false>(texture, centerPoint, tolerance),
|
||||
.top = FindEdge<PerChannel,
|
||||
false,
|
||||
false>(texture, centerPoint, tolerance),
|
||||
.right = FindEdge<PerChannel,
|
||||
true,
|
||||
true>(texture, centerPoint, tolerance),
|
||||
.bottom = FindEdge<PerChannel,
|
||||
false,
|
||||
true>(texture, centerPoint, tolerance) };
|
||||
}
|
||||
|
||||
RECT DetectEdges(const BGRATextureView& texture,
|
||||
const POINT centerPoint,
|
||||
const bool perChannel,
|
||||
const uint8_t tolerance)
|
||||
{
|
||||
auto function = perChannel ? &DetectEdgesInternal<true> : DetectEdgesInternal<false>;
|
||||
|
||||
return function(texture, centerPoint, tolerance);
|
||||
}
|
||||
8
src/modules/MeasureTool/MeasureToolCore/EdgeDetection.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "BGRATextureView.h"
|
||||
|
||||
RECT DetectEdges(const BGRATextureView& texture,
|
||||
const POINT centerPoint,
|
||||
const bool perChannel,
|
||||
const uint8_t tolerance);
|
||||
3
src/modules/MeasureTool/MeasureToolCore/MeasureTool.def
Normal file
@@ -0,0 +1,3 @@
|
||||
EXPORTS
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
||||
264
src/modules/MeasureTool/MeasureToolCore/MeasureToolOverlayUI.cpp
Normal file
@@ -0,0 +1,264 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "BGRATextureView.h"
|
||||
#include "Clipboard.h"
|
||||
#include "CoordinateSystemConversion.h"
|
||||
#include "constants.h"
|
||||
#include "MeasureToolOverlayUI.h"
|
||||
|
||||
#include <common/utils/window.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
inline std::pair<D2D_POINT_2F, D2D_POINT_2F> ComputeCrossFeetLine(D2D_POINT_2F center, const bool horizontal)
|
||||
{
|
||||
D2D_POINT_2F start = center, end = center;
|
||||
// Computing in this way to achieve pixel-perfect axial symmetry of aliased D2D lines
|
||||
if (horizontal)
|
||||
{
|
||||
start.x -= consts::FEET_HALF_LENGTH;
|
||||
end.x += consts::FEET_HALF_LENGTH + 1.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
start.y -= consts::FEET_HALF_LENGTH;
|
||||
end.y += consts::FEET_HALF_LENGTH + 1.f;
|
||||
}
|
||||
|
||||
return { start, end };
|
||||
}
|
||||
}
|
||||
|
||||
winrt::com_ptr<ID2D1Bitmap> ConvertID3D11Texture2DToD2D1Bitmap(winrt::com_ptr<ID2D1RenderTarget> rt,
|
||||
const MappedTextureView* capturedScreenTexture)
|
||||
{
|
||||
capturedScreenTexture->view.pixels;
|
||||
|
||||
D2D1_BITMAP_PROPERTIES props = { .pixelFormat = rt->GetPixelFormat() };
|
||||
rt->GetDpi(&props.dpiX, &props.dpiY);
|
||||
const auto sizeF = rt->GetSize();
|
||||
winrt::com_ptr<ID2D1Bitmap> bitmap;
|
||||
auto hr = rt->CreateBitmap(D2D1::SizeU(static_cast<uint32_t>(capturedScreenTexture->view.width),
|
||||
static_cast<uint32_t>(capturedScreenTexture->view.height)),
|
||||
capturedScreenTexture->view.pixels,
|
||||
static_cast<uint32_t>(capturedScreenTexture->view.pitch * 4),
|
||||
props,
|
||||
bitmap.put());
|
||||
if (FAILED(hr))
|
||||
return nullptr;
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MeasureToolWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) noexcept
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_MOUSELEAVE:
|
||||
case WM_CURSOR_LEFT_MONITOR:
|
||||
{
|
||||
if (auto state = GetWindowParam<Serialized<MeasureToolState>*>(window))
|
||||
{
|
||||
state->Access([&](MeasureToolState& s) {
|
||||
s.perScreen[window].measuredEdges = {};
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_NCHITTEST:
|
||||
return HTCLIENT;
|
||||
case WM_CREATE:
|
||||
{
|
||||
auto state = GetWindowCreateParam<Serialized<MeasureToolState>*>(lparam);
|
||||
StoreWindowParam(window, state);
|
||||
|
||||
#if !defined(DEBUG_OVERLAY)
|
||||
for (; ShowCursor(false) >= 0;)
|
||||
;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
case WM_KEYUP:
|
||||
if (wparam == VK_ESCAPE)
|
||||
{
|
||||
PostMessageW(window, WM_CLOSE, {}, {});
|
||||
}
|
||||
break;
|
||||
case WM_RBUTTONUP:
|
||||
PostMessageW(window, WM_CLOSE, {}, {});
|
||||
break;
|
||||
case WM_LBUTTONUP:
|
||||
if (auto state = GetWindowParam<Serialized<MeasureToolState>*>(window))
|
||||
{
|
||||
state->Read([](const MeasureToolState& s) { s.commonState->overlayBoxText.Read([](const OverlayBoxText& text) {
|
||||
SetClipBoardToText(text.buffer);
|
||||
}); });
|
||||
}
|
||||
PostMessageW(window, WM_CLOSE, {}, {});
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
if (auto state = GetWindowParam<Serialized<MeasureToolState>*>(window))
|
||||
{
|
||||
const int8_t step = static_cast<short>(HIWORD(wparam)) < 0 ? -consts::MOUSE_WHEEL_TOLERANCE_STEP : consts::MOUSE_WHEEL_TOLERANCE_STEP;
|
||||
state->Access([step](MeasureToolState& s) {
|
||||
int wideVal = s.global.pixelTolerance;
|
||||
wideVal += step;
|
||||
s.global.pixelTolerance = static_cast<uint8_t>(std::clamp(wideVal, 0, 255));
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProcW(window, message, wparam, lparam);
|
||||
}
|
||||
|
||||
void DrawMeasureToolTick(const CommonState& commonState,
|
||||
Serialized<MeasureToolState>& toolState,
|
||||
HWND window,
|
||||
D2DState& d2dState)
|
||||
{
|
||||
bool continuousCapture = {};
|
||||
bool drawFeetOnCross = {};
|
||||
bool drawHorizontalCrossLine = true;
|
||||
bool drawVerticalCrossLine = true;
|
||||
|
||||
Measurement measuredEdges{};
|
||||
MeasureToolState::Mode mode = {};
|
||||
winrt::com_ptr<ID2D1Bitmap> backgroundBitmap;
|
||||
const MappedTextureView* backgroundTextureToConvert = nullptr;
|
||||
|
||||
bool gotMeasurement = false;
|
||||
toolState.Read([&](const MeasureToolState& state) {
|
||||
continuousCapture = state.global.continuousCapture;
|
||||
drawFeetOnCross = state.global.drawFeetOnCross;
|
||||
mode = state.global.mode;
|
||||
if (auto it = state.perScreen.find(window); it != end(state.perScreen))
|
||||
{
|
||||
const auto& perScreen = it->second;
|
||||
if (!perScreen.measuredEdges)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gotMeasurement = true;
|
||||
measuredEdges = *perScreen.measuredEdges;
|
||||
|
||||
if (continuousCapture)
|
||||
return;
|
||||
|
||||
if (perScreen.capturedScreenBitmap)
|
||||
{
|
||||
backgroundBitmap = perScreen.capturedScreenBitmap;
|
||||
}
|
||||
else if (perScreen.capturedScreenTexture)
|
||||
{
|
||||
backgroundTextureToConvert = perScreen.capturedScreenTexture;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!gotMeasurement)
|
||||
return;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case MeasureToolState::Mode::Cross:
|
||||
drawHorizontalCrossLine = true;
|
||||
drawVerticalCrossLine = true;
|
||||
break;
|
||||
case MeasureToolState::Mode::Vertical:
|
||||
drawHorizontalCrossLine = false;
|
||||
drawVerticalCrossLine = true;
|
||||
break;
|
||||
case MeasureToolState::Mode::Horizontal:
|
||||
drawHorizontalCrossLine = true;
|
||||
drawVerticalCrossLine = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!continuousCapture && !backgroundBitmap && backgroundTextureToConvert)
|
||||
{
|
||||
backgroundBitmap = ConvertID3D11Texture2DToD2D1Bitmap(d2dState.dxgiWindowState.rt, backgroundTextureToConvert);
|
||||
if (backgroundBitmap)
|
||||
{
|
||||
toolState.Access([&](MeasureToolState& state) {
|
||||
state.perScreen[window].capturedScreenTexture = {};
|
||||
state.perScreen[window].capturedScreenBitmap = backgroundBitmap;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (continuousCapture || !backgroundBitmap)
|
||||
d2dState.dxgiWindowState.rt->Clear();
|
||||
|
||||
const float hMeasure = measuredEdges.Width(Measurement::Unit::Pixel);
|
||||
const float vMeasure = measuredEdges.Height(Measurement::Unit::Pixel);
|
||||
|
||||
if (!continuousCapture && backgroundBitmap)
|
||||
{
|
||||
d2dState.dxgiWindowState.rt->DrawBitmap(backgroundBitmap.get());
|
||||
}
|
||||
|
||||
const auto cursorPos = convert::FromSystemToWindow(window, commonState.cursorPosSystemSpace);
|
||||
|
||||
d2dState.ToggleAliasedLinesMode(true);
|
||||
if (drawHorizontalCrossLine)
|
||||
{
|
||||
const D2D_POINT_2F hLineStart{ .x = measuredEdges.rect.left, .y = static_cast<float>(cursorPos.y) };
|
||||
D2D_POINT_2F hLineEnd{ .x = hLineStart.x + hMeasure, .y = hLineStart.y };
|
||||
d2dState.dxgiWindowState.rt->DrawLine(hLineStart, hLineEnd, d2dState.solidBrushes[Brush::line].get());
|
||||
|
||||
if (drawFeetOnCross)
|
||||
{
|
||||
// To fill all pixels which are close, we call DrawLine with end point one pixel too far, since
|
||||
// it doesn't get filled, i.e. end point of the range is excluded. However, we want to draw cross
|
||||
// feet *on* the last pixel row, so we must subtract 1px from the corresponding axis.
|
||||
hLineEnd.x -= 1.f;
|
||||
auto [left_start, left_end] = ComputeCrossFeetLine(hLineStart, false);
|
||||
auto [right_start, right_end] = ComputeCrossFeetLine(hLineEnd, false);
|
||||
d2dState.dxgiWindowState.rt->DrawLine(left_start, left_end, d2dState.solidBrushes[Brush::line].get());
|
||||
d2dState.dxgiWindowState.rt->DrawLine(right_start, right_end, d2dState.solidBrushes[Brush::line].get());
|
||||
}
|
||||
}
|
||||
|
||||
if (drawVerticalCrossLine)
|
||||
{
|
||||
const D2D_POINT_2F vLineStart{ .x = static_cast<float>(cursorPos.x), .y = measuredEdges.rect.top };
|
||||
D2D_POINT_2F vLineEnd{ .x = vLineStart.x, .y = vLineStart.y + vMeasure };
|
||||
d2dState.dxgiWindowState.rt->DrawLine(vLineStart, vLineEnd, d2dState.solidBrushes[Brush::line].get());
|
||||
|
||||
if (drawFeetOnCross)
|
||||
{
|
||||
vLineEnd.y -= 1.f;
|
||||
auto [top_start, top_end] = ComputeCrossFeetLine(vLineStart, true);
|
||||
auto [bottom_start, bottom_end] = ComputeCrossFeetLine(vLineEnd, true);
|
||||
d2dState.dxgiWindowState.rt->DrawLine(top_start, top_end, d2dState.solidBrushes[Brush::line].get());
|
||||
d2dState.dxgiWindowState.rt->DrawLine(bottom_start, bottom_end, d2dState.solidBrushes[Brush::line].get());
|
||||
}
|
||||
}
|
||||
|
||||
d2dState.ToggleAliasedLinesMode(false);
|
||||
|
||||
OverlayBoxText text;
|
||||
|
||||
const auto [crossSymbolPos, measureStringBufLen] =
|
||||
measuredEdges.Print(text.buffer.data(),
|
||||
text.buffer.size(),
|
||||
drawHorizontalCrossLine,
|
||||
drawVerticalCrossLine,
|
||||
commonState.units);
|
||||
|
||||
commonState.overlayBoxText.Access([&](OverlayBoxText& v) {
|
||||
v = text;
|
||||
});
|
||||
|
||||
d2dState.DrawTextBox(text.buffer.data(),
|
||||
measureStringBufLen,
|
||||
crossSymbolPos,
|
||||
static_cast<float>(cursorPos.x),
|
||||
static_cast<float>(cursorPos.y),
|
||||
true,
|
||||
window);
|
||||
}
|
||||