Compare commits

...

123 Commits

Author SHA1 Message Date
Jojo Zhou
48878cb051 Remove style 2023-05-10 19:42:06 -04:00
Jojo Zhou
80447106f1 Make MTC minimal 2023-05-10 14:18:37 -04:00
Jojo Zhou
4a37603b1a Add basic styles 2023-05-10 13:46:44 -04:00
Jojo Zhou
5548283265 Update previewsize for video 2023-05-10 11:26:11 -04:00
Jojo Zhou
aa370e0801 Code with MTC 2023-05-10 11:09:31 -04:00
Jojo Zhou
a7d8a566b5 Add style 2023-05-10 10:37:56 -04:00
Jojo Zhou
e9f0262a9b Minimal working code, todo next:dimension + MTC 2023-05-09 21:37:36 -04:00
Jojo Zhou
971c7a840f WIP 2023-05-09 18:54:57 -04:00
Jojo Zhou
325cfd20e4 Add basics of VideoPreviewer to build on 2023-05-09 16:01:39 -04:00
Seraphima Zykova
c6182a43bb [Peek][Settings] Peek OOBE page (#25895) 2023-05-08 19:30:57 +02:00
seraphima
42d570b210 property changed handle 2023-05-08 13:33:35 +02:00
seraphima
07c4f683ac simplify string 2023-05-08 13:18:41 +02:00
seraphima
d05cc16a91 Merge remote-tracking branch 'microsoft/seraphima/23077-peek-support-dev-files' into seraphima/23077-peek-support-dev-files 2023-05-08 13:10:09 +02:00
Jaime Bernardo
522efc5857 settings: flyout enable/disable for Peek 2023-05-08 12:04:16 +01:00
seraphima
3158528748 removed unused 2023-05-08 12:56:17 +02:00
Jaime Bernardo
40e7662628 installer:fix signing 2023-05-06 15:32:35 +01:00
Jaime Bernardo
bbd50c59cb installer: remove peek localization files. It's a WinUI app 2023-05-06 14:04:35 +01:00
Jaime Bernardo
09e963a3ae Fix user install. Add needed files 2023-05-06 10:33:56 +01:00
Jaime Bernardo
f49c7f06ca Fix monaco resolution at install time 2023-05-06 10:33:36 +01:00
seraphima
d74ee7c64d id fix 2023-05-05 21:47:30 +02:00
seraphima
dbd1cce242 key to spelling 2023-05-05 17:03:04 +02:00
seraphima
493fd003d7 fix spelling 2023-05-05 16:48:29 +02:00
seraphima
ba6c406043 fix id 2023-05-05 16:11:20 +02:00
seraphima
6725cca234 spellcheck 2023-05-05 15:41:26 +02:00
seraphima
476cd850a8 spellcheck 2023-05-05 15:34:31 +02:00
seraphima
06fb8420cd spell: monaco 2023-05-05 15:20:14 +02:00
seraphima
73a2e4bbfa extension check 2023-05-05 14:45:37 +02:00
seraphima
d57f795d33 todo 2023-05-05 14:17:56 +02:00
seraphima
0472f3a7f7 moved temp folder cleanup 2023-05-05 14:13:34 +02:00
seraphima
b0507a4a6d more meaningful todos 2023-05-05 14:10:59 +02:00
seraphima
10e2a665b9 project 2023-05-05 13:58:26 +02:00
seraphima
60056e9f0d moved path to common 2023-05-05 13:58:09 +02:00
seraphima
ea8ccede5a leave single webview control 2023-05-05 10:12:03 +02:00
seraphima
d571e9f3cf hardcode monaco path 2023-05-04 16:52:41 +02:00
seraphima
ab66c897bc Merge remote-tracking branch 'microsoft/seraphima/23077-peek-support-dev-files' into seraphima/23077-peek-support-dev-files 2023-05-04 16:00:19 +02:00
Stefan Markovic
96a85469c5 Update installer 2023-05-04 15:59:30 +02:00
seraphima
321f245844 set host name 2023-05-03 17:34:00 +02:00
seraphima
a468f396af removed additional monaco folder 2023-05-03 13:31:35 +02:00
seraphima
32ad4e1c18 peek resources 2023-05-02 15:42:57 +02:00
seraphima
5487929886 peek files 2023-05-02 14:26:53 +02:00
seraphima
bedba498ad peek deps 2023-05-02 11:00:49 +02:00
seraphima
d05d957b9b monaco folders 2023-04-28 16:31:42 +02:00
seraphima
ab51bbe9ae changed peek guid 2023-04-28 14:57:02 +02:00
seraphima
6d5f65a822 installer: added peek 2023-04-28 12:54:01 +02:00
seraphima
20069e36bc suppress warning 2023-04-28 12:49:55 +02:00
seraphima
185f1ff17e warnings: exceptions 2023-04-28 12:47:47 +02:00
seraphima
21d3432181 warnings: charset 2023-04-28 10:30:00 +02:00
seraphima
901d55cca3 warnings 2023-04-28 10:29:52 +02:00
seraphima
d371888d33 warnings: default values 2023-04-28 10:29:21 +02:00
seraphima
f782ed00fa warnings: dispose 2023-04-28 10:28:30 +02:00
seraphima
4fb811a9dc clean up 2023-04-28 10:27:35 +02:00
seraphima
34b974f568 warnings: names 2023-04-28 10:27:19 +02:00
seraphima
d6bd8eec69 warnings: culture info 2023-04-28 10:25:15 +02:00
seraphima
0d0a6c2e49 removed versions 2023-04-27 15:45:57 +02:00
seraphima
ed697edd8e Merge branch 'main' into seraphima/23077-peek-support-dev-files 2023-04-27 10:52:26 +02:00
seraphima
2a1a310382 installer 2023-04-26 15:39:10 +02:00
seraphima
c30cb4263a dev files support 2023-04-26 15:38:52 +02:00
seraphima
ab1e170422 moved common monaco helper 2023-04-26 15:37:00 +02:00
seraphima
592853dc15 rename 2023-04-26 15:36:31 +02:00
seraphima
f6a045bf8b moved formatters 2023-04-26 15:33:50 +02:00
seraphima
72d9ca0006 moved monaco files 2023-04-26 15:31:46 +02:00
seraphima
259f814251 clean up 2023-04-25 14:59:28 +02:00
seraphima
e29ac1a9ef previewpane: clean up 2023-04-25 14:48:28 +02:00
seraphima
b057754496 peek: md 2023-04-25 14:47:16 +02:00
seraphima
b7843e5c53 previewpane: moved md 2023-04-25 14:46:33 +02:00
seraphima
f02402ae9c peek: use common 2023-04-25 12:47:02 +02:00
seraphima
5ba4b973d7 previewpane: use common project 2023-04-25 12:40:15 +02:00
seraphima
a758dd3425 common preview project 2023-04-25 12:39:32 +02:00
seraphima
43f94bd8a9 webview2 preview 2023-04-24 10:53:47 +02:00
seraphima
4db539aa18 changed size 2023-04-17 17:15:46 +02:00
seraphima
365d6967e0 scrolling 2023-04-17 17:15:46 +02:00
seraphima
823646abe6 text preview 2023-04-17 17:15:46 +02:00
Seraphima Zykova
2edcf41499 [Peek] Telemetry and logging (#25231) 2023-04-17 15:36:27 +02:00
Seraphima Zykova
6f103c7657 [Peek] Pin the window position (#24927) 2023-03-30 11:16:00 +02:00
Samuel Chapleau
32579651fd [Peek] Implementation of a performant and reliable Neighboring Files Query (#24943)
* Use IShellItemArray as the backing array of item

* Finalize and cleanup NFQ implementation

* Cleanup remainder of the code

* Remove unused using
2023-03-29 09:02:51 -07:00
Seraphima Zykova
160824bf14 [Peek] SVG support (#24237)
* svg previewer

* svg size

* set scaling factor

* set image size

* changed image source type

* non nullable image size

* notify svg previewer changed

* uncomment

* rename BitmapPreviewer

* move svg support

* remove svg previewer
2023-03-08 11:37:19 -08:00
Samuel Chapleau
86fab1e816 Use nullable Size for image size & open file on background thread (#24004) 2023-02-08 18:05:04 -08:00
Samuel Chapleau
1d396cb121 [Peek] Removed monitor percentage evaluation for the UnsupportedFilePreview control (#24002)
* Remove settings for percentage of windows and keep default min size.

* Fix margin on unsupported control
2023-02-08 16:43:54 -08:00
Samuel Chapleau
e7b62a553f [Peek] Refactoring of file system models, removal of PngPreviewer, retrieving of folder size via Scripting com reference and other fixes (#23955)
* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer

* - Refactor File class into IFileSystemItem, FileItem & FolderItem
- Display size for folders using Scripting namespace
- Remove default app buttons for files or folders not supporting it

* Add better content type via storage apis

* Add check for storagefile in PngPreviewer

* Fix png stretching

* Remove png previewer

* Rename ThumbnailOptions.None to ThumbnailOptions.ResizeToFit
2023-02-08 16:17:07 -08:00
Samuel Chapleau
07e9780420 [Peek] Add unsupported file icon fallback (#23735)
* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer
2023-02-02 09:54:08 -08:00
jth-ms
8fe3d8a1d8 [Peek]Handle errors for HEIC/HEIF and fall back to default previewer if there is no thumbnail (#22684)
* Handle errors when getting filesize by falling back to default previewer

* Bringing back other file types that are fixed with these code changes

---------

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>
2023-02-01 12:09:07 -08:00
Seraphima Zykova
5444bf8374 [Peek] Small images (#23554)
* change stretch value

* compare with actual window size

* consider scaling factor

* set max size

* clean up

* clean up

* clean up previewers

* scaling factor in bitmap previewer

* max image size property
2023-01-31 17:53:39 -08:00
Samuel Chapleau
4fe3e27fa4 [Peek] Fix selecting files from the correct focused opened File Explorer tab & from Desktop (#23489)
* Get file based on active tab handle instead of window title

* Refactor code to get active tab

* Getting all items from the shell API working again, except for desktop

* Refactor and cleanup com & native code

* Add back removed peek xaml assets in Product.wxs

* Remove some dependencies that do not seem necessary in Product.wxs
2023-01-24 11:02:01 -08:00
Samuel Chapleau
7105802831 Remove duplicated method in powertoys setup 2023-01-19 17:49:48 -08:00
Samuel Chapleau
17e8366c6e Merge with master 2023-01-17 11:24:21 -08:00
Samuel Chapleau
f01de620ca Remove Peek.UI.WPF project 2023-01-17 09:46:58 -08:00
Samuel Chapleau
645e798d97 Move check for png thubmnail loading priority 2023-01-13 14:20:10 -08:00
Samuel Chapleau
ef944a234f Fix opening Peek when FE window is set to full name path (#23082) 2023-01-12 14:35:37 -08:00
Samuel Chapleau
ba971d4e21 Move check if higher quality image is already loaded to the exact line where we change the Preview bitmap (#23083) 2023-01-03 20:32:35 -08:00
Stefan Markovic
9cd4a3e414 [Peek] Merge main, self-contained .NET and fix WebView2 user data dir issue (#22899)
* Merge remote-tracking branch 'origin/main' into peek

* Test sc

* Set WebView2 user data dir

* spellcheck

* Fix comment
2023-01-03 10:35:54 -08:00
Robson
c22e78870b [Peek] add WV2 improvements (behavior and UX) (#22685)
* [Peek] added logic to get max monitor size for opening WebView2

* Removed ununsed dependency property

* Added workaround for cases where the web page would not finish navigating in a quick timing, for example google.com.

* Remove window extensions from common and use nullable size argument instead

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>
2022-12-13 21:37:17 -08:00
Michael Salmon
1253ed6607 [Peek] Add copy keyboard accelerator (#22647)
* add copy keyboard accelerator

* Fix comments

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>
2022-12-13 21:11:30 -08:00
Samuel Chapleau
99fc54ce94 [Peek] Update some installer build steps + assets update (#22683)
* Fix settings & peek.ui.wpf

* Add back missing icon

* Add missing files and actions to installer

* Keep window open if the selected file in explorer is different (only works for single file selection)

* Undo last
2022-12-09 12:03:56 -08:00
sujessie
37162e24f6 [Peek] Unsupported File Previewer - Preserve Transparency For File Icons (#22650)
* Preserving transparency or icons

* Remove TODO

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>
2022-12-09 12:01:00 -08:00
Yawen Hou
b075c00f2b [Peek] Add cancellation token OnFilePropertyChanged (#22643)
* Cancel file loading before opening another file

* Add omitted cancellation checks

* Catch task cancelled exception; Add more cancellation checkpoints

* Add cancellation checkpoint beofre GetBitmapFromHBitmapAsync

* Correct typo

* Update to pass cancellation token individually to each async methods

* Add lost cancellationToken source

* Add cancellation token to PngPreviewer

Co-authored-by: Yawen Hou <yawenhou@microsoft.com>
2022-12-09 11:25:51 -05:00
Samuel Chapleau
496220f77e [Peek] Window foregrounding simplification and fixes + keep window visible if FE single selection changed (#22657)
* Use different apis to bring to foreground removing remote thread wait and work as well as library loading

* Keep window open if single selected file in FE is different

* Removed unused methods
2022-12-08 22:38:52 -08:00
Robson
195f14a3c7 Add full image quality support (#22654) 2022-12-08 17:45:39 -08:00
Jojo Zhou
60bf86825b [Peek] Add tooltip to File (#22640)
* Add tooltip to File

* Add placeholder text for no tooltip

* Address comments

* Use StringBuilder

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
2022-12-08 15:55:28 -08:00
sujessie
4ef3f23897 [Peek] Unsupported File Previewer - Setting Window Size (#22645)
* Adding setting for unsupported file window

* Fix
2022-12-08 15:44:42 -08:00
Robson
5bd9dd5935 [Peek] add extra logic to properly render PNG files with transparency (#22613)
* [Peek] added extra logic to render PNG files with proper transparency

* Moved logic to ThumbnailHelper
Cleanup

* Created a separated previewer for PNG to only load the preview image with thumbnail logic

* removed unused code

* Updated state loading change
2022-12-08 15:42:38 -08:00
Michael Salmon
5590eb9484 [Peek] New File Explorer tabs break Shell API to get selected files (#22641)
* fix FE tab bug

* remove unnecessary unsafe keyword
2022-12-08 15:39:14 -08:00
Jojo Zhou
6f06f76784 [Peek] Refine titlebar adaptive width (#22642)
* Adjust adaptive width of titlebar

* Remove visualstate setters for AppTitle_FileCount

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
2022-12-08 15:06:16 -08:00
Robson
5981d0e81e [Peek] add PDF viewing support (#22636)
* [Peek] add PDF viewing support

* Fixed issue which would redirect some HTML and PDF files to external browser

* Fixed refactored interface name
2022-12-08 13:41:02 -08:00
Michael Salmon
539a4e5678 [Peek] ImagePreviewer - Handle error states (#22637)
* add better preview state handling

* add error handling in imagepreviewer and better state handling

* fix error handling so exception is not bubbled up

* improve performance and hook up unsupported previewer on error

* remove commented code

* address pr comments
2022-12-08 11:25:29 -08:00
Daniel Chau
aea217ddca [Peek] Fix foregrounding (#22633)
* Fixing foregrounding

* Get window handle inside BringToForeground extension method

Co-authored-by: Daniel Chau <dancha@microsoft.com>
Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>
2022-12-08 10:11:24 -08:00
sujessie
d001a4c0e0 [Peek] Unsupported File Previewer - Formatting string from resources (#22609)
* Moving to string resource usage

* Moving ReadableStringHelper to common project

* Fix comments
2022-12-08 09:49:00 -08:00
Samuel Chapleau
5712123598 Fix titlebar draggable region and interactive region (bump WinAppSdk to latest) 2022-12-07 22:57:45 -08:00
Samuel Chapleau
e504653323 Update titlebar filecount text 2022-12-07 20:47:35 -08:00
Esteban Margaron
b46b8d176f Make CurrentItemIndex setter private 2022-12-07 18:51:02 -08:00
Esteban Margaron
b98f233b75 Fix wrong thread exception 2022-12-07 18:45:11 -08:00
Samuel Chapleau
083ec27a45 Fix crash 2022-12-07 18:02:26 -08:00
Yawen Hou
bca780f886 [Peek] Add customized title bar (#22600)
* Add basic button UI

* Add function to get default app name and to open file in default app

* Correct error output

* Add filename to titlebar

* Remove titlebar text from Resw

* Add basic button UI

* Add function to get default app name and to open file in default app

* Add filename to titlebar

* Correct error output

* Remove titlebar text from Resw

* Add SetDragRectangles

* Correct logic, update function name

* Add localization

* Cleanup and adaptive width

* Add fileIndex/NumberOfFiles for multiple files activation

* Refine titlebar styles

* Update error message; Return HResult from native methods; Update variable initialisation and string null testing

* Titlebar height and adaptive width refinement

* Add fallback to launch app picker if fail to open default app

* Temp change to hide AppTitle_FileCount

* Update launch button to command; Add keyboard accelerator

* Update titlebar inactive background color

* Update tooltip to add keyboard accelerator

* Add comments to resw file

* Fix accidental deletion from previous merge

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
Co-authored-by: Yawen Hou <yawenhou@microsoft.com>
2022-12-07 16:56:01 -08:00
estebanm123
d4e618cdc9 [Peek] Add basic file querying and navigation (#22589)
* Refactor to facilitate file data initialization

* Extract file-related code to new FileManager class

* Add temp basic version

* Clean + add todo for cancellations

* Fix various nav-related issues

* Temp - start moving iteration-related code to bg thread

* Minor tweaks

* Add FEHelper todo

* Rename FileManager + various tweaks

* Add basic throttling

* Improve bg thread synchronization

* Clean

* Clean

* Rename based on feedback

* Rename FileQuery

* Rename properties

* Rename remaining fields

* Add todos for nav success/failures

Co-authored-by: Esteban Margaron <emargaron@microsoft.com>
2022-12-07 15:03:50 -08:00
Robson
e1cb01d188 [Peek] Add WebView2 integration (#22506)
* First commit with WIP logic to support WV2 in Peek module

* Minor code cleanup and try/catch block

* Added control to wrap WebView2 logic

* Cleanup

* Added logic to handle HTML previewing
Properly update FilePreview according to file type

* Code cleanup
Updated comments

* Updated comment

* Removed comment

* Code cleanup

* Improved opening of web browser preview to avoid "blank" or "seeing previous page" issue
Removed unused method
Added xaml fallback to guarantee default/starting state

* Removed folder

* Updated factory logic to match master

* address code review

* addressed PR review

* address PR review

* Address PR review

* address PR review

* Address PR review
2022-12-07 14:24:18 -08:00
sujessie
bddfe42d39 [Peek] Adding unsupported file previewer (#22598)
* Unsupported file previewer

* Fix file display info

* Fix property store calls

* Update TODO
2022-12-07 13:07:21 -08:00
Daniel Chau
30d346c93f [Peek] Enable PropertyStore for offline files (#22567)
* Enabling PropertyStore for offline files

Co-authored-by: Daniel Chau <dancha@microsoft.com>
2022-12-07 11:20:39 -05:00
Samuel Chapleau
899b5016b9 [Peek] Fix installer builds, project configs and update assets (#22540)
* Update installer

* Fix installer errors

* Fix peek vcxproj

* Add package signing

* Add peek to arm64

* Add back ARM64 toMeasureToolUI

* Add versions to project

* Update assets and icons

* Add correct icon
2022-12-06 18:14:57 -08:00
Samuel Chapleau
0d05089316 Add scale awareness to window centering (#22541) 2022-12-06 17:52:38 -08:00
jth-ms
6295ed86ca Juliata/filetypes (#22538)
* Using the same list of file extensions as Lightbox's AppxManifest, and ensuring we convert file extension to lowercase

* Add IsFileTypeSupported to IPreviewer

* respond to PR comments
2022-12-06 17:18:20 -08:00
Daniel Chau
73925885dd [Peek] Fetching image size through PropertyStore (#22530)
* Fetching metadata from PropertySTore

* Releasing objects to fix crash

* Creating new PropertyHelper

Co-authored-by: Daniel Chau <dancha@microsoft.com>
2022-12-06 15:28:48 -08:00
Michael Salmon
437d2dd5f7 [Peek] Plugin pattern to enable any file type previewing (#22475) 2022-12-06 11:24:21 -08:00
Samuel Chapleau
a4bd09a2c8 Bump Microsoft.Windows.SDK.BuildTools version 2022-12-05 16:00:31 -08:00
Samuel Chapleau
c2aae52bba Peek (#22498)
* Add peek dll project

* add spacebar preview and launch on hotkey press

* add todo

* add process handle to handle continuous press of hotkey

* add tool to stop all powertoys processes

* Add a blank Peek page and update nav menu

* Add some initial content to Peek page including a toggle

* refactor settings parsing

* rename spacebar peek to peek viewer

* rename script to stop powertoys processes

* remove tool

* Adding FileUtils for retrieving selected file in File Explorer

* Remove unnecessary SndPeekSettings

* Add shortcut setting

* Set the shortcut to ctrl+space

* Launching viewer with selected FE file

* Add PeekUI WinUI3 project with interop events

* Moving FileTypeUtils into PeekFileUtils project

* execute winui3 app on hotkey

* Fix paths with spaces

* remove winui3 project

* Resolve comment

* add wpf app with toggle visibility on hotkey

* fix visibility on startup

* remove window properties and add todos

* Fixed hidden extension and system file handling

* wip

* Add working WPF app with FileExplorer querying

* remove c++ projects

* Move native awaiter

* Working Image control with image files

* Resize and move window based on explorer monitor

* Image render, window positioning and sizing clean up

* add window management logic and selection logic

* add extension methods to add circular iterating capability to linkedlistnode

* Add OnArrowKeyPresshandler

* Added titlebar with file name and scaling with titlebar height

* fix flashing window on startup and process kept alive when powertoys exits

* remove wait for debugger loop in ui

* Add KeyIsDown method

* Fix KeyDown issue with Key handled and check for repeat

* Add thumbnail logic

* Add all folder items if only one item is selected

* File type helper

* Using hresult

* Add cancellation and rotation handling

* Use extension instead of path

* fIX CONFLICTS

* Fixing some file type checks

* Add new icon for Peek

* Update page with the new Peek icon

* Initialize IsEnabled and hook ActivationShortcut to dllmain

* add icon to taskbar and titlebar

* Add theme sensitive backgrounds

* rename event handlers

* add settings image

* Move window data into obserable object

* Refactor viewmodel, interop and helpers

* Clean up

* Add loading spinner

* Add todos

* Fix conflicts

* Move native code into its own folder

* Add peek to installer

* Fix building peek and peekui projects

* Replace UWP namespaces to WinAppSDK

* Working WASDK placeholder project

* Add exit when powertoys runner exit

* Working winui3 with image display

* Add WIC project with <TreatWarningAsErros> false for now

* Fit content to window

* Use Size from Windows.Foundation

* Change order

* Add some todos

* Refactored native/interop code and added helpers to imagepreviewer

* Rename projects

* Move some code

* Remove using

Co-authored-by: Michael Salmon <miksalmon@users.noreply.github.com>
Co-authored-by: Michael Salmon 🐟 <michaelpsalmon@outlook.com>
Co-authored-by: Alireza Ebadi Ghajari <alirezae@microsoft.com>
Co-authored-by: Jessie Su <Jessie.Su@microsoft.com>
Co-authored-by: sujessie <102062556+sujessie@users.noreply.github.com>
2022-12-05 09:16:06 -08:00
356 changed files with 10952 additions and 175 deletions

View File

@@ -3,11 +3,11 @@
(?:^|/)(?i)LICEN[CS]E
(?:^|/)3rdparty/
(?:^|/)go\.sum$
(?:^|/)MonacoPreviewHandler/customLanguages/
(?:^|/)MonacoPreviewHandler/generateLanguagesJson.html
(?:^|/)MonacoPreviewHandler/index.html
(?:^|/)MonacoPreviewHandler/monaco_languages.json
(?:^|/)MonacoPreviewHandler/monacoSpecialLanguages.js
(?:^|/)FilePreviewCommon/customLanguages/
(?:^|/)FilePreviewCommon/generateLanguagesJson.html
(?:^|/)FilePreviewCommon/index.html
(?:^|/)FilePreviewCommon/monaco_languages.json
(?:^|/)FilePreviewCommon/monacoSpecialLanguages.js
(?:^|/)monacoSRC/
(?:^|/)package(?:-lock|)\.json$
(?:^|/)timezones\.json$

View File

@@ -7,6 +7,7 @@ AACD
AAD
AADF
abap
Abbrivation
ABE
abgr
abi
@@ -58,6 +59,7 @@ alekhyareddy
ALLAPPS
ALLINPUT
ALLOWUNDO
ALLVIEW
ALPHATYPE
Altdown
alwaysontop
@@ -76,6 +78,7 @@ aocfnapldcnfbofgmbbllojgocaelgdd
AOT
APARTMENTTHREADED
APeriod
apidl
APIENTRY
APIIs
APPBARDATA
@@ -100,6 +103,7 @@ ARCHITEW
arcosh
ARemapped
argb
ari
arik
Arity
arjunbalgovind
@@ -108,6 +112,8 @@ ARPPRODUCTICON
ARRAYSIZE
arsinh
artanh
Artsakh
arw
asdf
AShortcut
ASingle
@@ -157,6 +163,8 @@ BEB
BEEAADF
BEEC
BEFA
Belarus
BESTEFFORT
betadele
betsegaw
BFC
@@ -167,6 +175,7 @@ BFFA
BGR
bgra
bhid
BHIDSF
bigbar
bigobj
binlog
@@ -212,7 +221,10 @@ bugreport
BUILDNUMBER
buildtask
buildtransitive
Burkina
Buryatia
BUTTONUP
BVal
BValue
BYPOSITION
bytearray
@@ -220,10 +232,12 @@ CABD
CALG
callbackptr
cameligo
calpwstr
Cangjie
CANRENAME
CAPTUREBLT
CAPTURECHANGED
CARRAY
CAtl
CBA
CBB
@@ -247,6 +261,7 @@ CEAF
CEBAC
CEBD
CECB
CElems
CENTERALIGN
ceq
certlm
@@ -263,8 +278,12 @@ chdir
CHILDACTIVATE
CHILDWINDOW
chrdavis
Chromakey
Chrzan
CHT
Chukotka
Chuuk
cidl
CIELAB
CIEXYZ
cim
@@ -362,6 +381,7 @@ CRECT
critsec
Crossdevice
CRSEL
crw
CSearch
CSettings
CSIDL
@@ -380,6 +400,7 @@ CURSORINFO
cursorpos
customaction
CUSTOMACTIONTEST
CVal
cvd
CVirtual
cvtepu
@@ -399,6 +420,8 @@ Dac
dacl
DAF
damienleroy
DANGEROUSLYCOMMITMERELYTODISKCACHE
Danmarkshavn
DARKPURPLE
DARKTEAL
DARKYELLOW
@@ -428,12 +451,15 @@ dcommon
dcomp
dcompi
DComposition
DCR
DCs
dcr
dcs
Dct
DDCDD
DDCE
DDEIf
DDevice
ddf
Dds
DDxgi
Deact
debian
@@ -453,6 +479,7 @@ DEFERERASE
DEFPUSHBUTTON
deinitialization
DELA
DELAYCREATION
DELETEDKEYIMAGE
DELETESCANS
deletethis
@@ -510,6 +537,7 @@ DQTYPE
DRAWFRAME
drawingcolor
dreamsofameaningfullife
drf
drivedetectionwarning
dshow
DSTINVERT
@@ -526,6 +554,7 @@ DVTARGETDEVICE
DWINRT
dwl
dwm
Dwma
dwmapi
DWMCOLORIZATIONCOLORCHANGED
DWMCOMPOSITIONCHANGED
@@ -581,6 +610,7 @@ EFDD
EFE
EFFEFC
EFile
eip
ekus
emmintrin
Emoji
@@ -619,9 +649,13 @@ EWXLOGOFF
EWXPOWEROFF
EWXREBOOT
EWXSHUTDOWN
Exa
exabyte
examplehandler
examplepowertoy
EXAND
Excep
EXCEPINFO
EXCLUDEFROMCAPTURE
exdisp
executionpolicy
@@ -637,6 +671,8 @@ EXSEL
exstyle
EXTENDEDKEY
EXTENDEDVERBS
EXTRINSICPROPERTIES
EXTRINSICPROPERTIESONLY
eyetracker
FABC
fabricbot
@@ -649,6 +685,7 @@ FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR
Farbraum
FARPROC
FASTPROPERTIESONLY
FBB
FBC
FBDE
@@ -691,7 +728,7 @@ FILEOP
FILEOS
FILESUBTYPE
FILESYSPATH
FILETIME
filetime
FILEVERSION
Filtergraph
Filterkeyboard
@@ -736,6 +773,7 @@ GETDLGCODE
GETDPISCALEDSIZE
GETICON
GETMINMAXINFO
GETPROPERTYSTOREFLAGS
GETSTATE
GETTEXT
GETTEXTLENGTH
@@ -759,6 +797,8 @@ gwl
GWLP
HACCEL
handlekeyboardhookevent
HANDLERPROPERTIESONLY
handlerroutine
hangeul
Hankaku
hanselman
@@ -782,6 +822,7 @@ HCRYPTHASH
HCRYPTPROV
hcwhite
hdc
HDR
hdrop
hdwwiz
HEB
@@ -795,8 +836,9 @@ HHmmss
HHOOK
hhx
HIBYTE
HICON
hicon
HIDEWINDOW
hif
highlighter
HIMAGELIST
himl
@@ -818,6 +860,7 @@ hmodule
hmonitor
HOLDENTER
HOLDESC
holemenu
HOMEPATH
homljgmgpmcbpjbnjpfijnhipfkiclkd
HOOKPROC
@@ -846,6 +889,7 @@ HTCLIENT
HTHUMBNAIL
HTOUCHINPUT
HTTRANSPARENT
HVal
HValue
Hvci
hwb
@@ -859,12 +903,18 @@ HWNDPREV
hyjiacan
IBase
IBeam
IBitmap
IBlock
ICapture
ICEBLUE
IClass
IColor
icolumn
ICONERROR
IContext
IData
IDD
IDecoder
IDesktop
IDirect
idl
@@ -873,16 +923,21 @@ IDOn
IDR
idx
IDXGI
IEncoder
IEnum
IExec
IEXPLORE
Iface
IFACEMETHOD
IFACEMETHODIMP
IFile
IFilter
IGraphics
iid
IIDI
Iindex
IIO
iiq
Ijwhost
IKs
ILogon
@@ -894,6 +949,7 @@ imageresizerinput
imageresizersettings
imagingdevices
ime
IMetadata
imeutil
inetcpl
Infobar
@@ -931,14 +987,17 @@ Interlop
INTRESOURCE
INVALIDARG
invalidoperatioexception
IPalette
ipc
ipcmanager
IPlugin
IPower
IPREVIEW
ipreview
ipreviewhandlervisualssetfont
IProperty
IPublic
IQuery
IReader
irprops
isbi
ISearch
@@ -946,10 +1005,13 @@ ISettings
isfinite
IShell
isocpp
ISource
iss
ISurface
ITask
ith
ITHUMBNAIL
ithumbnail
Ittoqqortoormiit
IUI
IUnknown
IWbem
@@ -957,8 +1019,10 @@ IWIC
iwr
IYUV
JArray
jfi
jfif
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
jif
jjw
jobject
joefinapps
@@ -973,6 +1037,8 @@ jxr
jyuwono
KBDLLHOOKSTRUCT
kbm
kdc
Keybd
KEYBDINPUT
keyboardeventhandlers
keyboardmanager
@@ -1008,6 +1074,7 @@ LBUTTON
LBUTTONDBLCLK
LBUTTONDOWN
LBUTTONUP
Lcid
LCIDTo
lcl
Lclean
@@ -1050,6 +1117,8 @@ LOCALPACKAGE
localport
LOCALSYSTEM
LOCATIONCHANGE
LOCKBYTES
LOCKTYPE
logconsole
logfile
LOGFONT
@@ -1101,6 +1170,7 @@ LTRB
LTRREADING
luid
lusrmgr
LVal
LWA
lwin
LZero
@@ -1133,6 +1203,9 @@ MBUTTON
MBUTTONDBLCLK
MBUTTONDOWN
MBUTTONUP
MCDT
MCST
mdc
MDICHILD
MDL
mdtext
@@ -1140,6 +1213,8 @@ mdtxt
mdwn
MEDIASUBTYPE
mediatype
mef
Mega
Melman
MENUITEMINFO
MENUITEMINFOW
@@ -1208,6 +1283,7 @@ mozilla
mpmc
MRM
mru
mrw
msbuild
msc
msclr
@@ -1263,6 +1339,7 @@ NCRBUTTONUP
NCRENDERING
ndp
NEEDDISPATCH
neighborings
Nemeth
NESW
netcore
@@ -1306,6 +1383,7 @@ NONCONVERT
NONELEVATED
NONINFRINGEMENT
nonstd
NOOPEN
NOOWNERZORDER
NOPARENTNOTIFY
NOREDIRECTIONBITMAP
@@ -1334,6 +1412,7 @@ NOUPDATE
NOZORDER
NPH
NResize
nrw
NTAPI
ntdll
ntfs
@@ -1366,14 +1445,20 @@ OLEDB
OLIVEGREEN
onebranch
onenote
ONLYIFCURRENT
ONLYONCE
onstd
oobe
OOBEPT
opencode
OPENSLOWITEM
opensource
openspecs
openxmlformats
OPLOCK
OPTIMIZEFORINVOKE
ORAW
ori
ORPHANEDDIALOGTITLE
ORSCANS
oss
@@ -1390,6 +1475,7 @@ outro
outsettings
OVERLAPPEDWINDOW
overlaywindow
overriden
Oversampling
OWNDC
Packagemanager
@@ -1415,10 +1501,14 @@ PATINVERT
PATPAINT
PAUDIO
pbc
Pbgra
pbgra
PBlob
pcb
pcch
pcelt
pch
PCIDLIST
pcs
PCWSTR
pdb
pdbonly
@@ -1428,10 +1518,14 @@ pdtobj
pdw
PDWORD
pedrolamas
pef
PElems
Pels
PERCEIVEDFLAG
Percision
perfmon
pesi
petabyte
peteblois
PEXCEPTION
pfn
@@ -1440,6 +1534,7 @@ pft
pgp
pgsql
pguid
pkey
PHANDLE
PHANDLER
phbm
@@ -1482,10 +1577,13 @@ POWERTOYNAME
powertoyssetup
powertoysusersetup
Powrprof
ppenum
ppidl
ppmt
pprm
pproc
pprop
ppshv
ppsi
ppsid
ppsrm
@@ -1495,9 +1593,11 @@ pptal
ppv
prc
precomp
PREFERQUERYPROPERTIES
Prefixer
Preinstalled
prevhost
Previer
previewer
PREVIEWHANDLERFRAMEINFO
previewpane
@@ -1505,6 +1605,7 @@ previouscamera
PREVIOUSINSTALLFOLDER
PREVIOUSVERSIONSINSTALLED
prevpane
PRGBA
prgms
pri
PRINTCLIENT
@@ -1521,15 +1622,21 @@ PROGRAMFILES
projectname
PROPBAG
PROPERTYKEY
PROPERTYNOTFOUND
propkey
PROPVARIANT
propvarutil
prvpane
psapi
pscid
PSECURITY
psfgao
psfi
Psr
psrm
psrree
pstatstg
pstm
pstr
pstream
pstrm
@@ -1541,7 +1648,9 @@ ptd
PTOKEN
PToy
ptstr
pui
PULONG
pvar
pwa
pwcs
pwsh
@@ -1562,13 +1671,16 @@ QUNS
qwertyuiopasdfghjklzxcvbnm
qword
qwrtyuiopsghjklzxvnm
raf
RAII
RAlt
randyrants
Rasterize
RAWINPUT
RAWINPUTDEVICE
RAWINPUTHEADER
RAWPATH
rbhid
Rbp
RBUTTON
RBUTTONDBLCLK
@@ -1637,10 +1749,15 @@ restrictederrorinfo
resultlist
resw
resx
retunred
retval
rfc
rfid
RGBE
RGBQUAD
rgbs
rgelt
rgf
rgn
rgs
rhs
@@ -1688,9 +1805,13 @@ Rutkas
RValue
rvm
rwin
rwl
rwz
ryanbodrug
saahmedm
sachaple
sacl
SAFEARRAY
safeprojectname
SAMEKEYPREVIOUSLYMAPPED
SAMESHORTCUTPREVIOUSLYMAPPED
@@ -1699,8 +1820,10 @@ SAVEFAILED
scancode
scanled
schedtasks
SCID
Scip
scipbe
Scode
scoobe
SCOPEID
screenshot
@@ -1739,15 +1862,19 @@ SFP
sharpkeys
SHCNE
SHCNF
SHCONTF
shcore
shellapi
SHELLDETAILS
SHELLDLL
shellex
SHELLEXECUTEINFO
SHELLEXECUTEINFOW
shellscalingapi
SHFILEINFO
SHGDNF
SHGFI
Shgno
Shl
shldisp
shlobj
@@ -1777,6 +1904,7 @@ SHOWNOACTIVATE
SHOWNORMAL
SHOWWINDOW
shtypes
SIATTRIBFLAGS
SICHINT
sid
siex
@@ -1803,6 +1931,7 @@ smartphone
SMTO
snd
snwprintf
Softcoded
softline
somil
Soref
@@ -1829,6 +1958,8 @@ SRCINVERT
SRCPAINT
sre
SResize
srf
SRGB
srme
srre
srw
@@ -1857,15 +1988,20 @@ STDMETHODCALLTYPE
STDMETHODIMP
stefan
Stereolithography
STGC
STGM
STGMEDIUM
STGTY
sticpl
stl
storelogo
STRINGIZE
stringtable
stringval
Strm
Strmiids
Stroe
Strret
strsafe
strutil
sttngs
@@ -1928,6 +2064,7 @@ taskschd
tchar
tcl
Tcollab
tcs
tcscpy
TCustom
tdbuild
@@ -1937,6 +2074,8 @@ telem
telephon
Templated
templatenamespace
Tenggara
terabyte
testapp
testcase
testhost
@@ -1956,13 +2095,17 @@ timedate
timediff
timeunion
timeutil
timezones
titlebar
Titlecase
TKey
TLayout
tlb
tlbimp
TMPVAR
TNP
toggleswitch
toogle
toolkitcontrols
toolkitconverters
Toolset
@@ -2008,6 +2151,7 @@ uipi
UIs
ULARGE
ULONGLONG
UMsg
unassign
uncompilable
UNCPRIORITY
@@ -2030,6 +2174,7 @@ unregistering
unremapped
unsubscribe
unvirtualized
UOffset
Updatelayout
UPGRADINGPRODUCTCODE
Uptool
@@ -2037,6 +2182,7 @@ Usb
USEDEFAULT
USEFILEATTRIBUTES
USERDATA
USERDEFINED
USERDOMAIN
userprofile
USESHOWWINDOW
@@ -2044,6 +2190,7 @@ USESTDHANDLES
USRDLL
Utc
utf
UType
uuidof
uwp
uxtheme
@@ -2052,6 +2199,7 @@ vabdq
validmodulename
Vanara
variantassignment
VARTYPE
vcamp
vccorlib
vcdl
@@ -2071,6 +2219,7 @@ VERBSONLY
VERBW
VERIFYCONTEXT
verrsrc
VERSIONED
VERSIONINFO
Versioning
VFT
@@ -2124,6 +2273,7 @@ WDA
wdp
wdupenv
weakme
webbrowser
webcam
webpage
websearch
@@ -2151,7 +2301,7 @@ WINDOWNAME
WINDOWPLACEMENT
WINDOWPOSCHANGED
WINDOWPOSCHANGING
Windowsapp
windowsapp
WINDOWSBUILDNUMBER
Windowscodecs
windowssearch
@@ -2202,6 +2352,7 @@ wmimgmt
WMKEYDOWN
WMKEYUP
wmp
WMSDK
WMSYSKEYDOWN
WMSYSKEYUP
wnd
@@ -2222,14 +2373,17 @@ wpr
wprp
wql
wregex
WReserved
WResize
writefile
Wrk
wrl
WScan
wscui
wsf
wsh
wsl
wsp
wss
wstr
wsz
@@ -2240,6 +2394,7 @@ WTSAT
Wubi
wuceffectsi
WVC
WVk
Wwan
Wwanpp
XAttribute
@@ -2273,6 +2428,7 @@ yinwang
yinyue
YOffset
ypescript
YQuantized
YResolution
YStr
YUY

View File

@@ -12,6 +12,7 @@
"Notifications.dll",
"os-detection.dll",
"PowerToys.exe",
"PowerToys.FilePreviewCommon.dll",
"PowerToys.Interop.dll",
"BugReportTool\\PowerToys.BugReportTool.exe",
"WebcamReportTool\\PowerToys.WebcamReportTool.exe",
@@ -88,6 +89,13 @@
"modules\\FileLocksmith\\PowerToys.FileLocksmithUI.exe",
"modules\\FileLocksmith\\PowerToys.FileLocksmithUI.dll",
"modules\\Peek\\Peek.Common.dll",
"modules\\Peek\\Peek.FilePreviewer.dll",
"modules\\Peek\\Powertoys.Peek.UI.dll",
"modules\\Peek\\Powertoys.Peek.UI.exe",
"modules\\Peek\\WIC.dll",
"modules\\Peek\\Powertoys.Peek.dll",
"modules\\ImageResizer\\PowerToys.ImageResizer.exe",
"modules\\ImageResizer\\PowerToys.ImageResizer.dll",
"modules\\ImageResizer\\PowerToys.ImageResizerExt.dll",

View File

@@ -464,6 +464,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPOWrapper", "src\common\GP
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPOWrapperProjection", "src\common\GPOWrapperProjection\GPOWrapperProjection.csproj", "{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Peek", "Peek", "{17B4FA70-001E-4D33-BBBB-0D142DBC2E20}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Peek", "src\modules\peek\peek\peek.vcxproj", "{A1425B53-3D61-4679-8623-E64A0D3D0A48}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Peek.UI", "src\modules\peek\Peek.UI\Peek.UI.csproj", "{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Peek.Common", "src\modules\peek\Peek.Common\Peek.Common.csproj", "{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Peek.FilePreviewer", "src\modules\peek\Peek.FilePreviewer\Peek.FilePreviewer.csproj", "{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIC", "src\modules\peek\WIC\WIC.csproj", "{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MarkdownPreviewHandlerCpp", "src\modules\previewpane\MarkdownPreviewHandlerCpp\MarkdownPreviewHandlerCpp.vcxproj", "{ED9A1AC6-AEB0-4569-A6E9-E1696182B545}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GcodePreviewHandlerCpp", "src\modules\previewpane\GcodePreviewHandlerCpp\GcodePreviewHandlerCpp.vcxproj", "{5A5DD09D-723A-44D3-8F2B-293584C3D731}"
@@ -500,6 +512,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RegistryPreviewExt", "src\m
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RegistryPreview", "RegistryPreview", "{929C1324-22E8-4412-A9A8-80E85F3985A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilePreviewCommon", "src\common\FilePreviewCommon\FilePreviewCommon.csproj", "{9EBAA524-0EDA-470B-95D4-39383285CBB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@@ -1904,6 +1918,72 @@ Global
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x64.Build.0 = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x86.ActiveCfg = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x86.Build.0 = Release|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|ARM64.ActiveCfg = Debug|ARM64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|ARM64.Build.0 = Debug|ARM64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|x64.ActiveCfg = Debug|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|x64.Build.0 = Debug|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|x86.ActiveCfg = Debug|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Debug|x86.Build.0 = Debug|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|ARM64.ActiveCfg = Release|ARM64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|ARM64.Build.0 = Release|ARM64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|x64.ActiveCfg = Release|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|x64.Build.0 = Release|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|x86.ActiveCfg = Release|x64
{A1425B53-3D61-4679-8623-E64A0D3D0A48}.Release|x86.Build.0 = Release|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|ARM64.Build.0 = Debug|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|ARM64.Deploy.0 = Debug|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x64.ActiveCfg = Debug|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x64.Build.0 = Debug|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x64.Deploy.0 = Debug|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x86.ActiveCfg = Debug|x86
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x86.Build.0 = Debug|x86
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Debug|x86.Deploy.0 = Debug|x86
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|ARM64.ActiveCfg = Release|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|ARM64.Build.0 = Release|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|ARM64.Deploy.0 = Release|ARM64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x64.ActiveCfg = Release|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x64.Build.0 = Release|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x64.Deploy.0 = Release|x64
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x86.ActiveCfg = Release|x86
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x86.Build.0 = Release|x86
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03}.Release|x86.Deploy.0 = Release|x86
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|ARM64.ActiveCfg = Debug|ARM64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|ARM64.Build.0 = Debug|ARM64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|x64.ActiveCfg = Debug|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|x64.Build.0 = Debug|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|x86.ActiveCfg = Debug|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Debug|x86.Build.0 = Debug|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|ARM64.ActiveCfg = Release|ARM64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|ARM64.Build.0 = Release|ARM64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|x64.ActiveCfg = Release|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|x64.Build.0 = Release|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|x86.ActiveCfg = Release|x64
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB}.Release|x86.Build.0 = Release|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|ARM64.ActiveCfg = Debug|ARM64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|ARM64.Build.0 = Debug|ARM64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|x64.ActiveCfg = Debug|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|x64.Build.0 = Debug|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|x86.ActiveCfg = Debug|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Debug|x86.Build.0 = Debug|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|ARM64.ActiveCfg = Release|ARM64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|ARM64.Build.0 = Release|ARM64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|x64.ActiveCfg = Release|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|x64.Build.0 = Release|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|x86.ActiveCfg = Release|x64
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC}.Release|x86.Build.0 = Release|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|ARM64.Build.0 = Debug|ARM64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|x64.ActiveCfg = Debug|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|x64.Build.0 = Debug|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|x86.ActiveCfg = Debug|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Debug|x86.Build.0 = Debug|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|ARM64.ActiveCfg = Release|ARM64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|ARM64.Build.0 = Release|ARM64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|x64.ActiveCfg = Release|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|x64.Build.0 = Release|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|x86.ActiveCfg = Release|x64
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF}.Release|x86.Build.0 = Release|x64
{ED9A1AC6-AEB0-4569-A6E9-E1696182B545}.Debug|ARM64.ActiveCfg = Debug|ARM64
{ED9A1AC6-AEB0-4569-A6E9-E1696182B545}.Debug|ARM64.Build.0 = Debug|ARM64
{ED9A1AC6-AEB0-4569-A6E9-E1696182B545}.Debug|x64.ActiveCfg = Debug|x64
@@ -2096,6 +2176,18 @@ Global
{697C6AF9-0A48-49A9-866C-67DA12384015}.Release|x64.Build.0 = Release|x64
{697C6AF9-0A48-49A9-866C-67DA12384015}.Release|x86.ActiveCfg = Release|x64
{697C6AF9-0A48-49A9-866C-67DA12384015}.Release|x86.Build.0 = Release|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|ARM64.Build.0 = Debug|ARM64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|x64.ActiveCfg = Debug|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|x64.Build.0 = Debug|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|x86.ActiveCfg = Debug|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Debug|x86.Build.0 = Debug|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|ARM64.ActiveCfg = Release|ARM64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|ARM64.Build.0 = Release|ARM64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|x64.ActiveCfg = Release|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|x64.Build.0 = Release|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|x86.ActiveCfg = Release|x64
{9EBAA524-0EDA-470B-95D4-39383285CBB2}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2255,6 +2347,12 @@ Global
{C604B37E-9D0E-4484-8778-E8B31B0E1B3A} = {AB82E5DD-C32D-4F28-9746-2C780846188E}
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788} = {1AFB6476-670D-4E80-A464-657E01DFF482}
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97} = {1AFB6476-670D-4E80-A464-657E01DFF482}
{17B4FA70-001E-4D33-BBBB-0D142DBC2E20} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
{A1425B53-3D61-4679-8623-E64A0D3D0A48} = {17B4FA70-001E-4D33-BBBB-0D142DBC2E20}
{9D7A6DE0-7D27-424D-ABAE-41B2161F9A03} = {17B4FA70-001E-4D33-BBBB-0D142DBC2E20}
{17A99C7C-0BFF-45BB-A9FD-63A0DDC105BB} = {17B4FA70-001E-4D33-BBBB-0D142DBC2E20}
{AA9F0AF8-7924-4D59-BAA1-E36F1304E0DC} = {17B4FA70-001E-4D33-BBBB-0D142DBC2E20}
{21B69DE5-59FD-4C5D-A142-EF1C1C430EAF} = {17B4FA70-001E-4D33-BBBB-0D142DBC2E20}
{ED9A1AC6-AEB0-4569-A6E9-E1696182B545} = {2F305555-C296-497E-AC20-5FA1B237996A}
{5A5DD09D-723A-44D3-8F2B-293584C3D731} = {2F305555-C296-497E-AC20-5FA1B237996A}
{B3E869C4-8210-4EBD-A621-FF4C4AFCBFA9} = {2F305555-C296-497E-AC20-5FA1B237996A}
@@ -2273,6 +2371,7 @@ Global
{FD86C06A-FB54-4D5E-9831-1CDADF60D45F} = {929C1324-22E8-4412-A9A8-80E85F3985A5}
{697C6AF9-0A48-49A9-866C-67DA12384015} = {929C1324-22E8-4412-A9A8-80E85F3985A5}
{929C1324-22E8-4412-A9A8-80E85F3985A5} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
{9EBAA524-0EDA-470B-95D4-39383285CBB2} = {1AFB6476-670D-4E80-A464-657E01DFF482}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}

View File

@@ -112,6 +112,10 @@ In this release, we focused on releasing new features, stability and improvement
- Fix window cycling on multiple monitors issue.
### File explorer add-ons
- Added .log file support to the Monaco preview handler. Thanks [@Eagle3386](https://github.com/Eagle3386)!
### File Locksmith
- Add context menu icon. Thanks [@htcfreek](https://github.com/htcfreek)!

View File

@@ -16,6 +16,7 @@
<?define HostsProjectName="Hosts"?>
<?define PastePlainProjectName="PastePlain"?>
<?define RegistryPreviewProjectName="RegistryPreview"?>
<?define PeekProjectName="Peek"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.Platform) = x64?>

View File

@@ -6,8 +6,8 @@
<?define PowerPreviewFiles=?>
<?define PowerPreviewFilesPath=$(var.BinDir)modules\FileExplorerPreview\?>
<?define MonacoCustomLanguagesFiles=?>
<?define MonacoCustomLanguagesFilesPath=$(var.BinDir)modules\FileExplorerPreview\customLanguages\?>
<?define MonacoPreviewHandlerCustomLanguagesFiles=?>
<?define MonacoPreviewHandlerCustomLanguagesFilesPath=$(var.BinDir)modules\FileExplorerPreview\customLanguages\?>
<Fragment>
<DirectoryRef Id="FileExplorerPreviewInstallFolder" FileSource="$(var.PowerPreviewFilesPath)">
@@ -15,9 +15,9 @@
<!--PowerPreviewFiles_Component_Def-->
</DirectoryRef>
<DirectoryRef Id="MonacoPreviewHandlerMonacoCustomLanguagesFolder" FileSource="$(var.MonacoCustomLanguagesFilesPath)">
<DirectoryRef Id="MonacoPreviewHandlerMonacoCustomLanguagesFolder" FileSource="$(var.MonacoPreviewHandlerCustomLanguagesFilesPath)">
<!-- Generated by generateFileComponents.ps1 -->
<!--MonacoCustomLanguagesFiles_Component_Def-->
<!--MonacoPreviewHandlerCustomLanguagesFiles_Component_Def-->
</DirectoryRef>
<ComponentGroup Id="FileExplorerPreviewComponentGroup">
@@ -26,7 +26,7 @@
<RegistryValue Type="string" Name="RemoveFileExplorerPreviewFolder" Value="" KeyPath="yes"/>
</RegistryKey>
<RemoveFolder Id="RemoveFolderFileExplorerPreviewFolder" Directory="FileExplorerPreviewInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderMonacoCustomLanguagesFolder" Directory="MonacoPreviewHandlerMonacoCustomLanguagesFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderMonacoPreviewHandlerCustomLanguagesFolder" Directory="MonacoPreviewHandlerMonacoCustomLanguagesFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderMonacoPreviewHandlerMonacoSRCFolder" Directory="MonacoPreviewHandlerMonacoSRCFolder" On="uninstall"/>
</Component>
</ComponentGroup>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >
<?include $(sys.CURRENTDIR)\Common.wxi?>
<?define PeekFiles=?>
<?define PeekFilesPath=$(var.BinDir)modules\$(var.PeekProjectName)\?>
<?define PeekAssetsFiles=?>
<?define PeekAssetsFilesPath=$(var.BinDir)modules\$(var.PeekProjectName)\Assets\?>
<Fragment>
<DirectoryRef Id="PeekInstallFolder" FileSource="$(var.PeekFilesPath)">
<!-- Generated by generateFileComponents.ps1 -->
<!--PeekFiles_Component_Def-->
</DirectoryRef>
<DirectoryRef Id="PeekMicrosoftUIXamlAssetsInstallFolder" FileSource="$(var.BinDir)modules\$(var.PeekProjectName)\Microsoft.UI.Xaml\Assets">
<Component Id="PeekMicrosoftUIXamlAssets_NoiseAsset_256x256_PNG" Win64="yes" Guid="754276D6-F258-4161-8DED-9A6CBB168305">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="PeekMicrosoftUIXamlAssets_NoiseAsset_256x256_PNG" Value="" KeyPath="yes"/>
</RegistryKey>
<File Id="PeekMicrosoftUIXamlAssetsFile_NoiseAsset_256x256_PNG" Source="$(var.BinDir)modules\$(var.PeekProjectName)\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png" />
</Component>
</DirectoryRef>
<DirectoryRef Id="PeekAssetsFolder" FileSource="$(var.PeekAssetsFilesPath)">
<!-- Generated by generateFileComponents.ps1 -->
<!--PeekAssetsFiles_Component_Def-->
</DirectoryRef>
<ComponentGroup Id="PeekComponentGroup">
<Component Id="RemovePeekFolder" Guid="EF9422D7-FF0A-4887-968A-E61B53ACD23A" Directory="PeekInstallFolder" >
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemovePeekFolder" Value="" KeyPath="yes"/>
</RegistryKey>
<RemoveFolder Id="RemoveFolderPeekFolder" Directory="PeekInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderPeekAssetsFolder" Directory="PeekAssetsFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderPeekMicrosoftUIXamlFolder" Directory="PeekMicrosoftUIXamlInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderPeekMicrosoftUIXamlAssetsFolder" Directory="PeekMicrosoftUIXamlAssetsInstallFolder" On="uninstall"/>
</Component>
<ComponentRef Id="PeekMicrosoftUIXamlAssets_NoiseAsset_256x256_PNG" />
</ComponentGroup>
</Fragment>
</Wix>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" />
@@ -39,6 +39,7 @@ call "..\..\..\publish.cmd" arm64
call move /Y ..\..\..\KeyboardManager.wxs.bk ..\..\..\KeyboardManager.wxs
call move /Y ..\..\..\MeasureTool.wxs.bk ..\..\..\MeasureTool.wxs
call move /Y ..\..\..\MouseUtils.wxs.bk ..\..\..\MouseUtils.wxs
call move /Y ..\..\..\Peek.wxs.bk ..\..\..\Peek.wxs
call move /Y ..\..\..\PowerAccent.wxs.bk ..\..\..\PowerAccent.wxs
call move /Y ..\..\..\PowerRename.wxs.bk ..\..\..\PowerRename.wxs
call move /Y ..\..\..\Product.wxs.bk ..\..\..\Product.wxs
@@ -112,6 +113,7 @@ call "..\..\..\publish.cmd" arm64
<Compile Include="MeasureTool.wxs" />
<Compile Include="MouseUtils.wxs" />
<Compile Include="PastePlain.wxs" />
<Compile Include="Peek.wxs" />
<Compile Include="PowerAccent.wxs" />
<Compile Include="PowerRename.wxs" />
<Compile Include="RegistryPreview.wxs" />
@@ -177,7 +179,7 @@ call "..\..\..\publish.cmd" arm64
<Target Name="AfterBuild">
</Target>
<Target Name="BeforeBuild">
<HeatDirectory Directory="..\..\src\modules\previewpane\MonacoPreviewHandler\monacoSRC"
<HeatDirectory Directory="..\..\src\modules\FileExplorerPreview\monacoSRC"
PreprocessorVariable="var.MonacoSRCHarvestPath"
OutputFile="MonacoSRC.wxs"
ComponentGroupName="MonacoSRCHeatGenerated"

View File

@@ -67,6 +67,7 @@
<ComponentGroupRef Id="MeasureToolComponentGroup" />
<ComponentGroupRef Id="MouseUtilsComponentGroup" />
<ComponentGroupRef Id="PastePlainComponentGroup" />
<ComponentGroupRef Id="PeekComponentGroup" />
<ComponentGroupRef Id="PowerAccentComponentGroup" />
<ComponentGroupRef Id="PowerRenameComponentGroup" />
<ComponentGroupRef Id="RegistryPreviewComponentGroup" />
@@ -527,8 +528,16 @@
<Directory Id="HostsMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
<!-- Launcher -->
<!-- Peek -->
<Directory Id="PeekInstallFolder" Name="$(var.PeekProjectName)">
<Directory Id="PeekAssetsFolder" Name="Assets" />
<Directory Id="PeekMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="PeekMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
<!-- Launcher -->
<Directory Id="LauncherInstallFolder" Name="launcher">
<Directory Id="LauncherImagesFolder" Name="Images" />

View File

@@ -16,7 +16,7 @@
<!--WinAppSDKFiles_Component_Def-->
</DirectoryRef>
<?foreach ParentDirectory in SettingsV2InstallFolder;PowerRenameInstallFolder;MeasureToolInstallFolder;HostsInstallFolder;FileLocksmithInstallFolder;RegistryPreviewInstallFolder?>
<?foreach ParentDirectory in SettingsV2InstallFolder;PowerRenameInstallFolder;MeasureToolInstallFolder;HostsInstallFolder;FileLocksmithInstallFolder;RegistryPreviewInstallFolder;PeekInstallFolder?>
<DirectoryRef Id="$(var.ParentDirectory)">
<?foreach Language in $(var.WinAppSDKLocLanguageList)?>
<?if $(var.Language) = af-ZA?>
@@ -374,6 +374,16 @@
<File Id="RegistryPreview_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlMui_File" Source="$(var.BinDir)modules\$(var.RegistryPreviewProjectName)\$(var.Language)\Microsoft.ui.xaml.dll.mui" />
<File Id="RegistryPreview_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlPhoneMui_File" Source="$(var.BinDir)modules\$(var.RegistryPreviewProjectName)\$(var.Language)\Microsoft.UI.Xaml.Phone.dll.mui" />
</Component>
<Component
Id="Peek_WinAppSDKLoc_$(var.IdSafeLanguage)_Component"
Directory="WinAppSDKLoc$(var.IdSafeLanguage)PeekInstallFolder"
Guid="$(var.CompGUIDPrefix)07">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="Peek_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Value="" KeyPath="yes"/>
</RegistryKey>
<File Id="Peek_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlMui_File" Source="$(var.BinDir)modules\$(var.PeekProjectName)\$(var.Language)\Microsoft.ui.xaml.dll.mui" />
<File Id="Peek_WinAppSDKLoc_$(var.IdSafeLanguage)_XamlPhoneMui_File" Source="$(var.BinDir)modules\$(var.PeekProjectName)\$(var.Language)\Microsoft.UI.Xaml.Phone.dll.mui" />
</Component>
<?undef IdSafeLanguage?>
<?undef CompGUIDPrefix?>
<?endforeach?>
@@ -504,6 +514,7 @@
<RemoveFolder Id="RemoveFolderWinAppSDKLoc$(var.IdSafeLanguage)HostsInstallFolder" Directory="WinAppSDKLoc$(var.IdSafeLanguage)HostsInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderWinAppSDKLoc$(var.IdSafeLanguage)FileLocksmithInstallFolder" Directory="WinAppSDKLoc$(var.IdSafeLanguage)FileLocksmithInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderWinAppSDKLoc$(var.IdSafeLanguage)RegistryPreviewInstallFolder" Directory="WinAppSDKLoc$(var.IdSafeLanguage)RegistryPreviewInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveFolderWinAppSDKLoc$(var.IdSafeLanguage)PeekInstallFolder" Directory="WinAppSDKLoc$(var.IdSafeLanguage)PeekInstallFolder" On="uninstall"/>
<?undef IdSafeLanguage?>
<?endforeach?>
</Component>

View File

@@ -42,9 +42,9 @@ Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListNa
#FileExplorerAdd-ons
#TODO: There are multiple .deps.json files, make sure it works as expected
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\FileExplorerPreview\PowerToys.SvgThumbnailProvider.deps.json"" -fileListName PowerPreviewFiles -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs"
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName MonacoCustomLanguagesFiles -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\FileExplorerPreview\customLanguages"""
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName MonacoPreviewHandlerCustomLanguagesFiles -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\FileExplorerPreview\customLanguages"""
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerPreviewFiles"" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -regroot $registryroot"
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MonacoCustomLanguagesFiles"" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -regroot $registryroot"
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MonacoPreviewHandlerCustomLanguagesFiles"" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -regroot $registryroot"
#FileLocksmith
#TODO: There are multiple .deps.json files, make sure it works as expected
@@ -76,6 +76,12 @@ Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListNa
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\MeasureTool\PowerToys.MeasureToolUI.deps.json"" -fileListName MeasureToolFiles -wxsFilePath $PSScriptRoot\MeasureTool.wxs -isWinAppSdkProj 1"
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MeasureToolFiles"" -wxsFilePath $PSScriptRoot\MeasureTool.wxs -regroot $registryroot"
#Peek
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\Peek\PowerToys.Peek.UI.deps.json"" -fileListName PeekFiles -wxsFilePath $PSScriptRoot\Peek.wxs"
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName PeekAssetsFiles -wxsFilePath $PSScriptRoot\Peek.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\Peek\Assets\"""
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PeekFiles"" -wxsFilePath $PSScriptRoot\Peek.wxs -regroot $registryroot"
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PeekAssetsFiles"" -wxsFilePath $PSScriptRoot\Peek.wxs -regroot $registryroot"
#PowerAccent
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\PowerAccent\PowerToys.PowerAccent.deps.json"" -fileListName PowerAccentFiles -wxsFilePath $PSScriptRoot\PowerAccent.wxs"
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerAccentFiles"" -wxsFilePath $PSScriptRoot\PowerAccent.wxs -regroot $registryroot"

View File

@@ -1017,6 +1017,7 @@ const std::wstring WinAppSDKConsumers[] =
L"modules\\FileLocksmith",
L"modules\\Hosts",
L"modules\\RegistryPreview",
L"modules\\Peek",
};
UINT __stdcall CreateWinAppSDKHardlinksCA(MSIHANDLE hInstall)
@@ -1068,6 +1069,7 @@ const std::wstring PTInteropConsumers[] =
L"modules\\PowerAccent",
L"modules\\FileLocksmith",
L"modules\\Hosts",
L"modules\\Peek",
L"modules\\FileExplorerPreview",
L"modules\\MouseUtils\\MouseJumpUI",
L"modules\\RegistryPreview",
@@ -1115,7 +1117,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
UINT er = ERROR_SUCCESS;
std::wstring installationFolder, dotnetRuntimeFilesSrcDir, colorPickerDir, powerOCRDir, launcherDir, fancyZonesDir,
imageResizerDir, settingsDir, awakeDir, measureToolDir, powerAccentDir, fileExplorerAddOnsDir, hostsDir, fileLocksmithDir,
mouseJumpDir, registryPreviewDir;
mouseJumpDir, registryPreviewDir, peekDir;
hr = WcaInitialize(hInstall, "CreateDotnetRuntimeHardlinksCA");
ExitOnFailure(hr, "Failed to initialize");
@@ -1138,6 +1140,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
fileLocksmithDir = installationFolder + L"modules\\FileLocksmith\\";
mouseJumpDir = installationFolder + L"modules\\MouseUtils\\MouseJumpUI\\";
registryPreviewDir = installationFolder + L"modules\\RegistryPreview\\";
peekDir = installationFolder + L"modules\\Peek\\";
for (auto file : dotnetRuntimeFiles)
{
@@ -1156,6 +1159,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (fileLocksmithDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (mouseJumpDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (registryPreviewDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (peekDir + file).c_str(), ec);
if (ec.value() != S_OK)
{
@@ -1181,6 +1185,7 @@ UINT __stdcall CreateDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (hostsDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (mouseJumpDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (registryPreviewDir + file).c_str(), ec);
std::filesystem::create_hard_link((dotnetRuntimeFilesSrcDir + file).c_str(), (peekDir + file).c_str(), ec);
if (ec.value() != S_OK)
{
@@ -1275,7 +1280,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
UINT er = ERROR_SUCCESS;
std::wstring installationFolder, colorPickerDir, powerOCRDir, launcherDir, fancyZonesDir,
imageResizerDir, settingsDir, awakeDir, measureToolDir, powerAccentDir, fileExplorerAddOnsDir,
hostsDir, fileLocksmithDir, mouseJumpDir, registryPreviewDir;
hostsDir, fileLocksmithDir, mouseJumpDir, registryPreviewDir, peekDir;
hr = WcaInitialize(hInstall, "DeleteDotnetRuntimeHardlinksCA");
ExitOnFailure(hr, "Failed to initialize");
@@ -1297,6 +1302,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
fileLocksmithDir = installationFolder + L"modules\\FileLocksmith\\";
mouseJumpDir = installationFolder + L"modules\\MouseUtils\\MouseJumpUI\\";
registryPreviewDir = installationFolder + L"modules\\RegistryPreview\\";
peekDir = installationFolder + L"modules\\Peek\\";
try
{
@@ -1316,6 +1322,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
DeleteFile((fileLocksmithDir + file).c_str());
DeleteFile((mouseJumpDir + file).c_str());
DeleteFile((registryPreviewDir + file).c_str());
DeleteFile((peekDir + file).c_str());
}
for (auto file : dotnetRuntimeWPFFiles)
@@ -1331,6 +1338,7 @@ UINT __stdcall DeleteDotnetRuntimeHardlinksCA(MSIHANDLE hInstall)
DeleteFile((hostsDir + file).c_str());
DeleteFile((mouseJumpDir + file).c_str());
DeleteFile((registryPreviewDir + file).c_str());
DeleteFile((peekDir + file).c_str());
}
}
catch (std::exception e)
@@ -1364,7 +1372,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
}
processes.resize(bytes / sizeof(processes[0]));
std::array<std::wstring_view, 11> processesToTerminate = {
std::array<std::wstring_view, 12> processesToTerminate = {
L"PowerToys.PowerLauncher.exe",
L"PowerToys.Settings.exe",
L"PowerToys.Awake.exe",
@@ -1376,6 +1384,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
L"PowerToys.AlwaysOnTop.exe",
L"PowerToys.exe",
L"PowerToys.RegistryPreview.exe",
L"PowerToys.Peek.UI.exe",
};
for (const auto procID : processes)

View File

@@ -61,6 +61,7 @@
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\KeyboardManager.wxs"" ""$(ProjectDir)..\PowerToysSetup\KeyboardManager.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\MeasureTool.wxs"" ""$(ProjectDir)..\PowerToysSetup\MeasureTool.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\MouseUtils.wxs"" ""$(ProjectDir)..\PowerToysSetup\MouseUtils.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Peek.wxs"" ""$(ProjectDir)..\PowerToysSetup\Peek.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Product.wxs"" ""$(ProjectDir)..\PowerToysSetup\Product.wxs.bk""""

View File

@@ -0,0 +1,306 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<Description>PowerToys FilePreviewCommon</Description>
<AssemblyName>PowerToys.FilePreviewCommon</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Markdig.Signed" />
</ItemGroup>
<ItemGroup>
<None Update="customLanguages\reg.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="index.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSpecialLanguages.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\base\browser\ui\codicons\codicon\codicon.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\base\worker\workerMain.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\abap\abap.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\apex\apex.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\azcli\azcli.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\bat\bat.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\cameligo\cameligo.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\clojure\clojure.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\coffee\coffee.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\cpp\cpp.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\csharp\csharp.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\csp\csp.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\css\css.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\dart\dart.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\dockerfile\dockerfile.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\ecl\ecl.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\fsharp\fsharp.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\go\go.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\graphql\graphql.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\handlebars\handlebars.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\hcl\hcl.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\html\html.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\ini\ini.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\javascript\javascript.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\java\java.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\julia\julia.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\kotlin\kotlin.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\less\less.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\lexon\lexon.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\lua\lua.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\m3\m3.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\markdown\markdown.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\mips\mips.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\msdax\msdax.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\mysql\mysql.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\objective-c\objective-c.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\pascaligo\pascaligo.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\pascal\pascal.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\perl\perl.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\pgsql\pgsql.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\php\php.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\postiats\postiats.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\powerquery\powerquery.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\powershell\powershell.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\pug\pug.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\python\python.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\razor\razor.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\redis\redis.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\redshift\redshift.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\restructuredtext\restructuredtext.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\ruby\ruby.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\rust\rust.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\r\r.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\sb\sb.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\scala\scala.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\scheme\scheme.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\scss\scss.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\shell\shell.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\solidity\solidity.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\sophia\sophia.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\sql\sql.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\st\st.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\swift\swift.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\systemverilog\systemverilog.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\tcl\tcl.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\twig\twig.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\typescript\typescript.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\vb\vb.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\xml\xml.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\basic-languages\yaml\yaml.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.de.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.es.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.fr.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.it.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.ja.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.ko.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.ru.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.zh-cn.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\editor\editor.main.nls.zh-tw.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\css\cssMode.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\css\cssWorker.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\html\htmlMode.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\html\htmlWorker.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\json\jsonMode.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\json\jsonWorker.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\typescript\tsMode.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\language\typescript\tsWorker.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monacoSRC\min\vs\loader.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="monaco_languages.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.PreviewHandler.Monaco.Formatters
namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters
{
public interface IFormatter
{

View File

@@ -5,7 +5,7 @@
using System.Text.Encodings.Web;
using System.Text.Json;
namespace Microsoft.PowerToys.PreviewHandler.Monaco.Formatters
namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters
{
public class JsonFormatter : IFormatter
{

View File

@@ -5,7 +5,7 @@
using System.Text;
using System.Xml;
namespace Microsoft.PowerToys.PreviewHandler.Monaco.Formatters
namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters
{
public class XmlFormatter : IFormatter
{

View File

@@ -10,7 +10,7 @@ using Markdig.Renderers.Html;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
namespace Microsoft.PowerToys.PreviewHandler.Markdown
namespace Microsoft.PowerToys.FilePreviewCommon
{
/// <summary>
/// Callback if extension blocks external images.

View File

@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
namespace Microsoft.PowerToys.FilePreviewCommon
{
public static class Helper
{
public static void CleanupTempDir(string folder)
{
try
{
var dir = new DirectoryInfo(folder);
foreach (var file in dir.EnumerateFiles("*.html"))
{
file.Delete();
}
}
catch (Exception)
{
}
}
}
}

View File

@@ -0,0 +1,52 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO;
using Markdig;
namespace Microsoft.PowerToys.FilePreviewCommon
{
public static class MarkdownHelper
{
/// <summary>
/// Markdown HTML header for light theme.
/// </summary>
private static readonly string HtmlLightHeader = "<!doctype html><style>body{width:100%;margin:0;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}.container{padding:5%}body img{max-width:100%;height:auto}body h1,body h2,body h3,body h4,body h5,body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}body h1,body h2{padding-bottom:.3em;border-bottom:1px solid #eaecef}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}body h3{font-size:1.25em}body h4{font-size:1em}body h5{font-size:.875em}body h6{font-size:.85em;color:#6a737d}pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;background-color:#f6f8fa;border-radius:3px;padding:16px;font-size:85%}a{color:#0366d6}strong{font-weight:600}em{font-style:italic}code{padding:.2em .4em;margin:0;font-size:85%;background-color:#f6f8fa;border-radius:3px}hr{border-color:#EEE -moz-use-text-color #FFF;border-style:solid none;border-width:.5px 0;margin:18px 0}table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}tbody{display:table-row-group;vertical-align:middle;border-color:inherit;vertical-align:inherit;border-color:inherit}table tr{background-color:#fff;border-top:1px solid #c6cbd1}tr{display:table-row;vertical-align:inherit;border-color:inherit}table td,table th{padding:6px 13px;border:1px solid #dfe2e5}th{font-weight:600;display:table-cell;vertical-align:inherit;font-weight:bold;text-align:-internal-center}thead{display:table-header-group;vertical-align:middle;border-color:inherit}td{display:table-cell;vertical-align:inherit}code,pre,tt{font-family:SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;color:#24292e;overflow-x:auto}pre code{font-size:inherit;color:inherit;word-break:normal}blockquote{background-color:#fff;border-radius:3px;padding:15px;font-size:14px;display:block;margin-block-start:1em;margin-block-end:1em;margin-inline-start:40px;margin-inline-end:40px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}</style><body><div class=\"container\">";
/// <summary>
/// Markdown HTML header for dark theme.
/// </summary>
private static readonly string HtmlDarkHeader = "<!doctype html><style>body{width:100%;margin:0;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";font-size:1rem;font-weight:400;line-height:1.5;color:#d4d4d4;text-align:left;background-color:#1e1e1e}.container{padding:5%}body img{max-width:100%;height:auto}body h1,body h2,body h3,body h4,body h5,body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}body h1,body h2{padding-bottom:.3em;border-bottom:1px solid #474747}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}body h3{font-size:1.25em}body h4{font-size:1em}body h5{font-size:.875em}body h6{font-size:.85em;color:#d4d4d4}pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;background-color:#161616;border-radius:3px;padding:16px;font-size:85%}a{color:#0366d6}strong{font-weight:600}em{font-style:italic}code{padding:.2em .4em;margin:0;font-size:85%;background-color:#161616;border-radius:3px}hr{border-color:#EEE -moz-use-text-color #FFF;border-style:solid none;border-width:.5px 0;margin:18px 0}table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}tbody{display:table-row-group;vertical-align:middle;border-color:inherit;vertical-align:inherit;border-color:inherit}table tr{background-color:#1e1e1e;border-top:1px solid #c6cbd1}tr{display:table-row;vertical-align:inherit;border-color:inherit}table td,table th{padding:6px 13px;border:1px solid #474747}th{font-weight:600;display:table-cell;vertical-align:inherit;font-weight:bold;text-align:-internal-center}thead{display:table-header-group;vertical-align:middle;border-color:inherit}td{display:table-cell;vertical-align:inherit}code,pre,tt{font-family:SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;color:#d4d4d4;overflow-x:auto}pre code{font-size:inherit;color:inherit;word-break:normal}blockquote{background-color:#282828;border-radius:3px;padding:15px;font-size:14px;display:block;margin-block-start:1em;margin-block-end:1em;margin-inline-start:40px;margin-inline-end:40px;padding:0 1em;color:#d4d4d4;border-left:.25em solid #d4d4d4}</style><body><div class=\"container\">";
/// <summary>
/// Markdown HTML footer.
/// </summary>
private static readonly string HtmlFooter = "</div></body></html>";
public static string MarkdownHtml(string fileContent, string theme, string filePath, ImagesBlockedCallBack imagesBlockedCallBack)
{
var htmlHeader = theme == "dark" ? HtmlDarkHeader : HtmlLightHeader;
// Extension to modify markdown AST.
HTMLParsingExtension extension = new HTMLParsingExtension(imagesBlockedCallBack);
extension.FilePath = Path.GetDirectoryName(filePath);
// if you have a string with double space, some people view it as a new line.
// while this is against spec, even GH supports this. Technically looks like GH just trims whitespace
// https://github.com/microsoft/PowerToys/issues/10354
var softlineBreak = new Markdig.Extensions.Hardlines.SoftlineBreakAsHardlineExtension();
MarkdownPipelineBuilder pipelineBuilder;
pipelineBuilder = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseEmojiAndSmiley().UseYamlFrontMatter().UseMathematics();
pipelineBuilder.Extensions.Add(extension);
pipelineBuilder.Extensions.Add(softlineBreak);
MarkdownPipeline pipeline = pipelineBuilder.Build();
string parsedMarkdown = Markdown.ToHtml(fileContent, pipeline);
string markdownHTML = $"{htmlHeader}{parsedMarkdown}{HtmlFooter}";
return markdownHTML;
}
}
}

View File

@@ -0,0 +1,114 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Text.Json;
using Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters;
namespace Microsoft.PowerToys.FilePreviewCommon
{
public static class MonacoHelper
{
/// <summary>
/// Name of the virtual host
/// </summary>
public const string VirtualHostName = "PowerToysLocalMonaco";
/// <summary>
/// Formatters applied before rendering the preview
/// </summary>
public static readonly IReadOnlyCollection<IFormatter> Formatters = new List<IFormatter>
{
new JsonFormatter(),
new XmlFormatter(),
}.AsReadOnly();
/// <summary>
/// Gets the path of the current assembly.
/// </summary>
/// <remarks>
/// Source: https://stackoverflow.com/a/283917/14774889
/// </remarks>
public static string AssemblyDirectory
{
get
{
string codeBase = Assembly.GetExecutingAssembly().Location;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
}
public static string MonacoDirectory
{
get
{
// TODO: common monaco folder
string codeBase = Assembly.GetExecutingAssembly().Location;
string path = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(codeBase), "..", "FileExplorerPreview"));
return path;
}
}
public static JsonDocument GetLanguages()
{
JsonDocument languageListDocument;
using (StreamReader jsonFileReader = new StreamReader(new FileStream(MonacoDirectory + "\\monaco_languages.json", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
{
languageListDocument = JsonDocument.Parse(jsonFileReader.ReadToEnd());
jsonFileReader.Close();
}
return languageListDocument;
}
/// <summary>
/// Converts a file extension to a language monaco id.
/// </summary>
/// <param name="fileExtension">The extension of the file (without the dot).</param>
/// <returns>The monaco language id</returns>
public static string GetLanguage(string fileExtension)
{
fileExtension = fileExtension.ToLower(CultureInfo.CurrentCulture);
try
{
JsonDocument languageListDocument = GetLanguages();
JsonElement languageList = languageListDocument.RootElement.GetProperty("list");
foreach (JsonElement e in languageList.EnumerateArray())
{
for (int j = 0; j < e.GetProperty("extensions").GetArrayLength(); j++)
{
if (e.GetProperty("extensions")[j].ToString() == fileExtension)
{
return e.GetProperty("id").ToString();
}
}
}
return "plaintext";
}
catch (Exception)
{
return "plaintext";
}
}
public static string ReadIndexHtml()
{
string html;
using (StreamReader htmlFileReader = new StreamReader(new FileStream(MonacoDirectory + "\\index.html", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
{
html = htmlFileReader.ReadToEnd();
htmlFileReader.Close();
}
return html;
}
}
}

View File

@@ -25,7 +25,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Set charset -->
<meta charset="utf-8" />
<!-- Title (normally not diaplayd)-->
<!-- Title (normally not displayed)-->
<title>Previewer for developer Files</title>
<style>
/* Fits content to window size */

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