Commit Graph

338 Commits

Author SHA1 Message Date
Jeremy Sinclair
fa6fec9bf9
[ci]Point VCToolsVersion to latest VC.CRT version instead of VC.Redist version (#31212)
* [CI] Point VCToolsVersion to latest VC.Tools version instead of VC.Redist version

* Update verifyAndSetLatestVCToolsVersion.ps1

* Use VisualCpp.CRT.Source version.
2024-01-31 14:58:59 +00:00
Aaron Junker-Wildi
a2506dc0f4
[Chore]Update copyright and remove the year (#30689) 2024-01-18 17:47:54 +00:00
Clint Rutkas
d51dbbe11d
[ci]Sign CmdNotFound PowerShell scripts (#31013) 2024-01-18 13:56:51 +00:00
Jaime Bernardo
431ae7e1d6
[ci]Use latest 1ES pipeline release (#31003) 2024-01-17 16:39:10 +00:00
David Federman
5d1ce08963
[Build]Add Microsoft.MSBuildCache (#30100) 2024-01-15 21:45:28 +00:00
Carlos Zamora
46f5316858
Introduce Command Not Found module (#26319)
* Introduce Command Not Found module

* rewrite module to depend on WinGet PowerShell module

* address Dongbo's feedback

* try and implement settings UI

* fix SUI build; try and store PowerShell object

* add and use object pool

* apply Dongbo's feedback

* add warm up; implement IPooledObjectPolicy

* Add module interface

* WIP trying to import module from settings

* Add EnableModule.ps1

* spellcheck

* spellcheck again

* Installer. Add DisableModule.ps1

* Fix styling

* Give the user some output from installing

* Prettify the Settings controls

* Add button to check PowerShell 7's version

* Fix Settings Assets paths

* Fix PowerShell 7 output

* Make module enable and disable scripts give better information

* Fix spellcheck

* Fix image files and placeholders

* Don't remove CmdNotFound on upgrade and don't fail on uninstall of
CmdNotFound

* Consistent install module scripts location on debug and installed

* installer: Avoid messageboxes and hide powershell on uninstalling CmdNotFound

* Fix psd1 file resolution when installed

* Fix spellcheck

* Add telemetry events

* Fix gpo files

* If GPO is set, enable/disable module on PT start depending on gpo value

* Cleanup module interface

* Cleanup settings code

* If GPO is set, disable Settings page logic

* Adding icons

* Update settings UI and strings

* Add telemetry for suggestions and feedbacks

* Fix sln file

* Fix build

* minor fixes

* Updating icon

* Remove global.json

* Remove unused PowerShell dependency

* Don't use preview version of Automation and fix NOTICE

* Fix signing

* Fix NOTICE.md

* Fix version checking for getfilesiginforedist.dll

* Fix spellchecker

* Fix README.md

* Fix false positives section in expect.txt

* Add logs to module interface

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2024-01-03 16:43:42 +01:00
Jaime Bernardo
e47f1b8cec
[ci]Update sdl baselines after boost upgrade (#30526) 2023-12-19 16:33:59 +00:00
Davide Giacometti
9e03386eb3
[Run] XamlStyler formatting (#30011)
* XamlStyler formatting

* remove unused theme files

* fix formatting
2023-12-08 14:57:42 +01:00
Jaime Bernardo
c7315c695c
[ci]Fix 1ES Pipeline to stable release (#30066) 2023-11-29 17:03:04 +00:00
Jeremy Sinclair
b2b2856e52
🚧 [Dev][Build] .NET 8 Upgrade (#28655)
* Upgraded projects to target .NET 8

* Updated .NET runtime package targets to use latest .NET 8 build

* Updated PowerToys Interop to target .NET 8

* Switch to use ArgumentNullException.ThrowIfNull

* ArgumentNullException.ThrowIfNull for CropAndLockViewModel

* Switching to ObjectDisposedException.ThrowIf

* Upgrade System.ComponentModel.Composition to 8.0

* ArgumentNullException.ThrowIfNull in Helper

* Switch to StartsWith using StringComparison.Ordinal

* Disabled CA1859, CA1716, SYSLIB1096 analyzers

* Update RIDs to reflect breaking changes in .NET 8

* Updated Microsoft NuGet packages to RC1

* Updated Analyzer package to latest .NET 8 preview package

* CA1854: Use TryGetValue instead of ContainsKey

* [Build] Update TFM to .NET 8 for publish profiles

* [Analyzers] Remove CA1309, CA1860-CA1865, CA1869, CA2208 from warning.

* [Analyzers] Fix for C26495

* [Analyzers] Disable CS1615, CS9191

* [CI] Target .NET 8 in YAML

* [CI] Add .NET preview version flag temporarily.

* [FileLocksmith] Update TFM to .NET 8

* [CI] Switch to preview agent

* [CI] Update NOTICE.md

* [CI] Update Release to target .NET 8 and use Preview agent

* [Analyzers] Disable CA1854

* Fix typo

* Updated Microsoft.CodeAnalysis.NetAnalyzers to latest preview

Updated packages to rc2

* [Analyzers][CPP] Turn off warning for 5271

* [Analyzers][CPP] Turn off warning for 26493

* [KeyboardListener] Add mutex include to resolve error

* [PT Run][Folder] Use static SearchValues to resolve CA1870

* [PowerLauncher] Fix TryGetValue

* [MouseJumpSettings] Use ArgumentNullException.ThrowIfNull

* [Build] Disable parallel dotnet tool restore

* [Build] No cache of dotnet tool packages

* [Build] Temporarily move .NET 8 SDK task before XAML formatting

* [Build][Temp] Try using .NET 7 prior to XAML formatting and then switch to .NET 8 after

* [Build] Use .NET 6 for XAML Styler

* [CI] Updated NOTICE.md

* [FancyZones] Update TFM to .NET 8

* [EnvVar] Update TFM to .NET 8 and update RID

* [EnvVar] Use ArgumentNullException.ThrowIfNull

* [Dev] Updated packages to .NET 8 RTM version

* [Dev] Updated Microsoft.CodeAnalysis.NetAnalyzers to latest

* [CI] Updated NOTICE.md with latest package versions

* Fix new utility target fameworks and runtimeids

* Don't use preview images anymore

* [CI] Add script to update VCToolsVersion environment variable

* [CI] Add Step to Verify VCToolsVersion

* [CI] Use latest flag for vswhere to set proper VCToolsVersion

* Add VCToolsVersion checking to release.yml

* Remove net publishing from local/ PR CI builds

* Revert "Remove net publishing from local/ PR CI builds"

This reverts commit f469778996.

* Only publish necessary projects

* Add verbosity to release pipelines builds of PowerTOys

* Set VCToolsVersion for publish.cmd when called from installer

* [Installer] Moved project publish logic to MSBuild Task

* [CI] Revert using publish.cmd

* [CI] Set VCToolsVersion and unset ClearDevCommandPromptEnvVars property

* Installer publishes for x64 too

* Revert "Add verbosity to release pipelines builds of PowerTOys"

This reverts commit 654d4a7f78.

* [Dev] Update CodeAnalysis library to non-preview package

* Remove unneeded warning removal

* Fix Notice.md

* Rename VCToolsVersion file and task name

* Remove unneeded mutex header include

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-11-22 12:46:59 -05:00
Jaime Bernardo
9265136a64
[ci]Fix precheck getting commit id in the fallback (#29849) 2023-11-14 17:50:23 +00:00
Jeremy Sinclair
887d475560
[CI]Fix prebuild check to use commit when no pull request number exists (#29846) 2023-11-14 17:04:26 +00:00
Pedro Lamas
0990724e44
[FileExplorer]Add QoiThumbnailProvider and QoiPreviewHandler (#29735)
* [FileExplorer]QoiThumbnailProvider

* Corrects code documentation

* Adds QoiPreviewHandler

* Corrects GUIDs

* Ensure returned thumbnail image is 32bit ARGB

* Updates following review comments

* More updates following review comments

* Updates following PR comments

* Fix dark theme background in QoiPreviewHandler

* Updates attribution text
2023-11-14 15:41:09 +00:00
gokcekantarci
89a87e6db4
[Peek]Peek and Monaco file encoding issues are solved with a encoding detector (#26955)
* [Peek] Peek and Monaco file encoding issues are solved with a encoding detector.

* [Peek] Monaco encoding parameter is moved to another function.

* [Peek] NOTICE.md update.

* [Peek] Spell Check update.

* UTF-Unknown is added to Nuget list in Notice.md

* System.Text.Encoding.CodePages is added to Nuget list in Notice.md

* [Peek] Unncessary mainfest files are deleted.

* [Peek ] Unncessary mainfest file are deleted.

* [Peek] Encoding null check is added.

* Update NOTICE.md

* Update NOTICE.md

* ci: Add signing to UtfUnknown
2023-11-14 15:27:45 +00:00
Jeremy Sinclair
59a133b9e2
[ci]Exclude markdown file edits from triggering full build (#24418)
* Update ci.yml

Add path exclusions for markdown files.

* Update wildcard syntax

* Test edit SUPPORT.md

* Update ci.yml

* Test Update SUPPORT.md

* Update SUPPORT.md

Test update SUPPORT again.

* Update ci.yml

* Explicit define of markdown files at root

* Test update SUPPORT.md

* Update ci.yml

* Another Test Update SUPPORT.md

* Script to check existence of markdown changes in commit

* Added precheck job to determine whether a build needs to occur

* Added pool logic from ci-build to precheck

* Fixed GitHub API url for commits

* Test change to SUPPORT.md to see if logic works.

* Converted filename list to array to make notmatching criteria work

* Change to SUPPORT.md to test

* Updated condition to check success of previous precheck job

* Added task name to verifyBuildRequest and updated job run condition

* Another update to SUPPORT.md to test

* Updated spell-check

* Removed checkout step and made Powershell task inline

* Fixed indentation

* Test change to SUPPORT.md

* Fixing script

* Another test change to SUPPORT.md

* [CI] Update Build Precheck step to use latest agent config

* Update SUPPORT.md

* Update SUPPORT.md

* [CI] Update Build Precheck to exclude .txt and read changes from pull request

* [CI] Remove unneeded verifyBuildRequest script

* [CI] Updated variable names to reflect pull request retrieval in precheck
2023-11-14 15:26:05 +00:00
Dylan Briedis
97a8aeb118
[KeyboardManager]Modernize the editor UI (#28473)
* Fix dark title bar for shortcuts window

* Adjust editor sizes

* Fetch accent button style from resources instead

* Modernize the editor UI
Reimplemented the XAML bridge to support Mica

* Use fluent icons

* Modernize the preview key visuals

* Implement teaching tips for key drop-down messages

* Fix spelling

* Fix delete button alignment in keys editor

* Remove trace log from bridge message handler

* Add WinUI depends to installer script

* Hide icon and caption from editor title bar

* Update remap entries to look like cards

* Use built-in content dialog buttons

* Update add button

* Fix spelling

* Fix installer script for ARM64

* Fix spelling AGAIN

* Update dev documentation

* Prevent white flash on dark mode

* Revert 3-key layout but make window wider

* f: align webview versions

* f: add pipeline exceptions for Microsoft DLLs that are not versioned

* f: add vcruntime140_1_app.dll to the exception list

* f: update webview versions
2023-11-07 14:26:19 +00:00
Davide Giacometti
536c723599
[Settings]XamlStyler formatting (#29114)
* XamlStyler formatting

* add generated files exclusion
2023-10-24 11:25:55 +01:00
Stefan Markovic
812b343776
🚧 [new module] Environment variables editor (#28722)
* Init EnvironmentVariables UI project

* Models
TitleBar
MainPage init
Icon

* User and system variables

* Profiles init

* XAML cleanup

* Missing ItemTemplate

* EditDialog

* ModuleInterface

* Signing and processes lists

* Installer

* spellcheck

* Fix ARM64 build and consolidate packages

* spellcheck2

* Fix installer

* Single instance. C# telemetry. Wait on PT pid

* ElevationHelper

* Add profile wip

* Init EnvironmentVariables UI project

* Models
TitleBar
MainPage init
Icon

* User and system variables

* Profiles init

* XAML cleanup

* Missing ItemTemplate

* EditDialog

* ModuleInterface

* Signing and processes lists

* Installer

* spellcheck

* Fix ARM64 build and consolidate packages

* spellcheck2

* Fix installer

* Single instance. C# telemetry. Wait on PT pid

* ElevationHelper

* Add profile wip

* show run as administrator in title (#28516)

* Environment Variables added to Run plugin (#28466)

* UI tweaks

* Remove style

* Add profile - init working

* Applied variables

* Read/Write profiles

* Fixes

* Add separator and fix loading profiles

* Only allow to edit System vars if running elevated

* Add tmp progress ring to show applying changes progress
Ignore not needed json fields

* Remove variable and profile logic

* Do not read data async
Update System and User variables on change

* Add isCorrectlyApplied()

* Sort variables in Applied variables

* WIP WndProc

* spellcheck

* Revert "WIP WndProc"

This reverts commit 0c0b6c67de.

* WHY CRASH???

* UI tweaks

* WIP modified state warning

* Add cancel button in dialogs

* Add buttons validations

* Set variables - fire and forget notify

* Revert "Revert "WIP WndProc""

This reverts commit 1b2306eeb7.

* Listen to WM_SETTINGSCHANGED
Add Infobar reload button

* spellcheck

* spellcheck again

* Fix build

* InfoBar runAsAdmin visibility

* Fix comment

* Confirm dialog when deleting variable
Fix add variable button when creating profile

* Edit profile

* Sort variables on Load

* Select existing variables on edit

* Add default variable

* Fix adding existing vars to profile

* update notice.md

* Handle PATH properly

* Add tooltips and fix dialogs text wrapping

* Fix applied values for duplicates
Fix add/eddit variable txt box validation

* Add horizontal scroll bar for applied values

* Fix duplicate variables handling
Fix user variable handling and preview

* spellcheck

* Try fix spellcheck

* Revert "spellcheck"

This reverts commit ee76231974.

* Revert "Try fix spellcheck"

This reverts commit dc8f04afb9.

* Fix path and duplicates conflict

* Fix PATH handling
Fix unapply on delete active variable
Fix ordering in applied variables

* Show variables as lists and add drag-to-reorder feature

* Only show specific variables as list
Update list in edit dialog on editing the value

* spellcheck

* Update GPO policy

* Add Edit and Remove variable buttons
Remove context menu

* Remove drag&drop when editing list variable and add buttons to move up/down

* Fix Edit profile dialog title

* Fix backup and restore variables when editing variable from applied profile

* Apply var to system WIP

* Tweaks

* Simplify edit variable logic

* Minor fixes

* Spellcheck

* Update src/modules/EnvironmentVariables/EnvironmentVariables/app.manifest

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>

* spellcheck 2

* Remove unneeded string

* Add more telemetry

* Do not allow adding existing variables with the same name into the profile

* Adding icon

* Fix the crash when opening existing variables dialog

* Update Settings and OOBE screenshots

* Fix crash when malformed profiles.json and jsonignore not needed properties

* Fix selecting duplicates in existing variables dialog

* Add user variable name limit (<255 chars)
Check if profile is applicable on apply
Show message if profile is not applicable

* XamlStyling

* Better Flyout positioning
Add Cancel button to the flyout

* Fix UI glitches by using ItemsControl (no virtualization)

* Fix spellcheck

* Fix XAML style

* Add horizontal scrollbar to applied variables

* Revert to ItemsRepeater

* Fix UI glitches by adding a decent minimum cache

* Fixing UI bugs

* Fix spellcheck

* Fix crash while trying to edit a User variable when there's no Parent
profile

* Fix issue overwriting backup var when you edit var on applied profile

* Fix nuking of variables when adding to applied profile

* Fix profile not being saved when deleting a variable

* Fix ValuesList empty crash, issues and no serialization

* fix spellcheck

* Allow in-line edit of list variables

* Fix xaml style

* Fix add profile variable cancel button logic

* Fix add profile variable cancel button logic - clean the list

* Bump VerticalCacheLength to 10

as in some cases UI glitch on expanding System variables was still present

* Fix profile Add variable button enable/disable logic

* Remove unneeded using

* Add to Dashboard

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-10-20 16:28:07 +02:00
Garrett Vernon
cd99a2e848
[FZ Editor]Add tests to editor #197 + feedback (#29051)
* here are the tests for the fancy zones

* Wrote tests for GridLayoutModel

* Move FancyZonesEditor tests to right place, tests for default layout model

* fixed SettingTheVerticalLayoutShouldBeTheDefault test

* removed coverlet in the test project

* Fixes for comments on pr

* squashed and updated for comments

* Added the test to the pipeline

---------

Co-authored-by: Drew Gordon <andrewbengordon@gmail.com>
Co-authored-by: Caleb Wightman <agentcboy@gmail.com>
2023-10-18 08:07:48 +01:00
Davide Giacometti
5d669df21a
[FancyZonesEditor] XamlStyler formatting (#29126) 2023-10-11 11:34:06 +01:00
Davide Giacometti
6482e9b0de
[Build]Use XamlStyler to check XAML formatting (#28643)
* Use XamlStyler to check XAML formatting

* fix spellcheck

* fix

* format XAML FLS, Hosts, ImageResizer, MeasureTool, PowerRename

* format XAML Peek

* exclude settings XAML and make CI pass

* doc
2023-10-09 15:58:13 +01:00
Dustin L. Howett
b41dd81177
Remove PR trigger from release.yml (!) (#29069) 2023-10-06 10:04:05 -07:00
Dustin L. Howett
03ad83836d
[Build] Switch the release pipeline to use the 1ES governed template (#29014) 2023-10-05 18:25:16 -05:00
Davide Giacometti
b8a83fba1b
[BugReport]Fix hang when bug report is launched (#28506)
* fix hang when bug report is launched from flyout

* Normalize output dir for release
2023-09-15 07:34:17 +01:00
Dustin L. Howett
76de2de123
Switch away from the WinDev agent pools (#28503)
Using our own pools like this gives us a lot of freedom in the tooling
that's installed, the OS versions it targets, and when we take on Visual
Studio updates.

As part of this effort, I've also stood up a "small" agent pool. At the
time of this PR, that pool is using D2ads-v5 SKU VMs (2 vcore 8 GiB)
versus the "large" agent pool's D8as-v5 (8 vcore 32 GiB). Smaller build
tasks can in the future be moved over to the small pool. Compilation's
the hard part, so it gets to stay on the large pool.
2023-09-11 14:33:12 -05:00
Dongle
937e7b0c00
[Deps]Upgrade to WinAppSDK 1.4 (#28310)
* Update to WASDK 1.4

* Remove redundant title bar styles.

* Update notice

* Update C++ projects as well

* Upgrade CppWinRT too

* Add exception to WASDK file version set to 1.0.0.0

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-09-07 09:36:47 +01:00
Jeremy Sinclair
3244ba9899
[CI] Condense NuGet Restore into MSBuild Tasks (#27028)
* Remove NuGet Restore tasks and incorporate msbuild restore target

* Add RestorePackagesConfig msbuild argument

* Add RestorePackagesConfig argument for installer

* Remove NuGet installer task

* Added Nuget Restore static graph

* Applied build and restore changes to release pipeline

* Removed NuGet Restore Static Graph

* Set NuGet Restore Graph only to main PowerToys solution

* Removed typo

* Fix path format issue

* Added release pattern

* Removed NuGet Restore Package Graph Options

* Updating NuGet authenticate task.

* Use restore switch in CI

* Use restore switch in Release

* Removed Packages Path
2023-08-16 12:31:10 -04:00
Jaime Bernardo
7ecfc58caa
[New Utility]Crop And Lock (#27832)
* [CropAndLock]Original POC code dump

* Project rename and delete solution

* Remove unused architectures

* Update cppwinrt to be in line with the solution

* Add to PowerToys solution and fix build errors

* Initial module interface empty project

* Module skeleton based on AlwaysOnTop

* Add loggers to module interface

* Add crop and lock to the runner

* Enable starts and disable kills the process

* Events reacting to hotkeys

* Main application reacting to events

* Initialize unhandled exception handling

* Singleton in line with other projects

* Also exit when PowerToys exit is detected

* Create Settings page

* React to shortcut changes in Settings

* Disable Crop and Lock through an Event

* Disable running Crop and Lock standalone

* Remove Crop and Lock tray icon

* Module Interface dll version

* Fix main app resource file to include version

* Make pch conditional on CI build

* Add to signing

* Remove settings screen opened by removed tray icon

* Fix spellcheck

* Yet another fix for spellcheck

* Fix disabling utility

* Fix solution build configurations

* Fix C++ analyzer errors

* Try to fix pre-compiled header CI errors

* Fix crash while exiting with an active reparent window

* Fix missing reference when building in release CI

* Add OOBE page

* GPO: Add admx and adml file changes

* GPO: react to changes in GPO

* Add quick access flyout menu entry

* Use Crop And Lock icon

* Use actual images for Settings and OOBE

* Module and app telemetry

* Add entry to README.md

* Add to process lists

* Additional logging

* Attribution in Settings page

* Add attribution to Community.md

* Fix spellcheck

* Fix typo in strings

* Fix crash when window handle is no longer valid

* Update COMMUNITY.md

* Fix supportedOS in manifest

* Don't show msgbox if detecting second instance

* Remove unused hotkey

* Tweak attribution

* Fix attribution spellcheck
2023-08-10 10:46:33 +01:00
Niels Laute
a49f806ac7
[ImageResizer] Moving from ModernWPF to WpfUI (#26858)
* Moving from ModernWPF to WpfUI

* signing fix

* Spellcheck

* Sign fix 2

* Loc tweaks

* sign fix 3

* Move titlebar

* Tweaks

* Debug

* Fix again

* Updating preview package

* Fixes

* Update notice.md

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2023-08-08 15:19:38 +02:00
Jaime Bernardo
864b862952
[General]Reduce installer size by flattening application paths (#27451)
* Flatten everything and succeed build

* Figure out Settings assets

* Remove UseCommonOutputDirectory tag

* Proper settings app path

* [VCM] Fix assets location

* Fix some runtime paths

* [RegistryPreview]Use MRTCore specific pri file

* [Hosts]Use MRTCore specific pri file

* [Settings]Use MRTCore specific pri file

* [Peek]Use MRTCore specific pri file

* [FileLocksmith]Use MRTCore specific pri file

* [ScreenRuler]Use MRTCore specific pri file

* [PowerRename]Use MRTCore specific pri file

* [Peek]Move assets to own folder

* [FileLocksmith] Use own Assets path

* [Hosts]Use own assets folder

* [PowerRename]Use own assets dir

* [MeasureTool] Use its own assets folder

* [ImageResizer]Use its own assets path

* Fix spellcheck

* Fix tab instead of space in project files

* Normalize target frameworks and platforms

* Remove WINRT_NO_MAKE_DETECTION flag. No longer needed?

* Fix AOT and Hosts locations

* Fix Dll version differences on dependency

* Add Common.UI.csproj as refernce to fix dll versions

* Update ControlzEx to normalize dll versions

* Update System.Management version to 7.0.2

* Add GPOWrapper to Registry Preview to fix dll versions

* [PTRun]Reference Microsoft.Extensions.Hosting to fix dll versions

* Fix remaining output paths / dll version conflicts

* [KeyboardManager]Executables still on their own directories

* Fix Monaco paths

* WinAppSDK apps get to play outside again

* Enable VCM settings again

* Fix KBM Editor path again

* [Monaco]Set to own Assets dir

* Fix installer preamble; Fix publish. remove unneeded publishes

* Remove Hardlink functions

* Installer builds again (still needs work to work)

* Readd Monaco to spellcheck excludes

* Fix spellcheck and call publish.cmd again

* [Installer] Remove components that don't need own dirs

* [Installer] Refactor Power Launcher

* [Installer] Refactor Color Picker

* [Installer] Refactor Monaco assets

* [Installer]Generate File script no longer needs to remove files

* [Installer]Refactor FileLocksmith

* [Installer] Refactor Hosts

* [Installer]Refactor Image Resizer

* [Installer]Refactor MouseUtils

* [Installer]Refactor MWB

* [Installer]Refactor MeasureTool

* [Installer]Refactor Peek

* [Installer]Refactor PowerRename and registry fixes

* [Installer]Refactor RegistryPreview

* [Installer]Refactor ShortcutGuide

* [Installer]Refactor Settings

* [Installer]Clean up some unused stuff

* [Installer]Clean up stuff for user install

* [Installer]Fix WinUi3Apps wxs

* [Installer]Fix misplaced folders

* [Installer]Move x86 VCM dll to right path

* Fix monaco language list location

* [Installer]Fix VCM directory reference

* [CI]Fix signing

* [Installer] Fix resources folder for release CI

* [ci]Looks like we still ship NLog on PowerToys Run

* [Settings]Add dependency to avoid dll collision with Experimentation

* [RegistryPreview]Move XAML files to own path

* [RegistryPreview]Fix app icon

* [Hosts]Move XAML files to their own path

* [FileLocksmith]Move XAML files to their own path

* [Peek]Move XAML files to own path

* [ScreenRuler]Move XAML files to its own path

* [Settings]Move XAML to its own path

* [ColorPicker]Move Resources to Assets

* [ShortcutGuide]Move svgs to own Assets path

* [Awake]Move images to assets path

* [Runner]Remove debug checks for PowerToys Run assets

* [PTRun]Move images to its own assets path

* [ImageResizer]Icon for context menu on own assets path

* [PowerRename]Move ico to its own path

* Remove unneeded intermediary directories

* Remove further int dirs

* Move tests to its own output path

* Fix spellcheck

* spellcheck: remove warnings

* [CppAnalyzers]Ignore rule in a tool

* [CI]Check if all deps.json files reference same versions

* fix spellcheck

* [ci]Fix task identation

* [ci]Add script to guard against asset conflicts

* [ci]Add more deps.json audit steps in the release build

* Add xbf to spellcheck expects

* Fix typo in asset conflict check scripts

* Fix some more dependency conflicts

* Downgrade CsWinRT to have the same dll version as sdk

* [ci]Do a recursive check for every deps.json

* Fix spellcheck error inside comment

* [ci]Fix asset script error

* [ci]Name deps.json verify tasks a bit better

* [ci]Improve deps json verify script output

* [ci]Update WinRT version to the same running in CI

* Also upgrade CsWinRT in NOTICE.MD

* [PowerRename]Move XAML files to own path

* [Common]Fix Settings executable path

* [ci]Verify there's no xbf files in app directories

* [installer]Fix firewall path

* [Monaco]Move new files to their proper assets path

* [Monaco]Fix paths for new files after merge

* [Feedback]Removed unneeded build conditions

* [Feedback]Clear vcxproj direct reference to frameworks

* [Feedback]RunPlugins name to hold PTRun plugins

* [Feedback]Remove unneeded foreach

* [Feedback]Shortcut Guide svgs with ** in project file

* [Feedback]Fix spellcheck
2023-07-20 00:12:46 +01:00
Tudor Croitoru
602368f6cc
[PTRun]New plugin: Value generator with hashing functions (#26097)
* Add hashing plugin for Run

* Cleanup logic for hasher plugin

- The IComputeRequest interface should make it easier to implement new
  generators in the future
- The GUID generator can now generate all versions of GUID (a.k.a. UUID)
- The input for the hash functions is not quite right. The
  Wox.Plugin.Query class doesn't actually have a way to ge the raw query
  as given by the user. The issue is with multiple spaces. An input like
  "a a  a    a    a" would only be accessible as "a a a a a" using the
  Query class.
  So for now, hashing only works correctly if the input
  doesn't contain multiple consecutive spaces.
- Need a way to make clear the usage for generating GUIDv3 and v5, since
  they take 2 parameters. There are defaults, but they aren't very
  clear.

* Change plugin name to ValueGenerator

* Clean up error handling for the input parser

* Add result type and description to subtitle

* Change the icons

* Add Base64 encoding and unit tests

This commit adds Base64 encoding as a utility of the value generator
plugin. The command is `# base64 ***input***`.

Also added unit tests for the UUID/GUID generator and for the input
parser. I don't think tests are necessary for the hashing functions
or for the base64 encoder, since those were part of the the system
libraries.

I'll open a PR for the documentation tomorrow and mark this draft
for review.

* Excluded UUIDv2

* Change icons

* Add RawUserQuery to Wox.Plugin.Query

Getting the RawUserQuery is necessary to be able to handle queries like
`# md5 a    a`, where the intent is to get the hash for `a    a`.
The existing `RawQuery` removes consecutive whitespaces and there was no
other way of getting the request as entered by the user.

* Add ValueGenerator plugin to installer

Also add the unit tests for the plugin to the pipeline.

* Small cleanup

* Fix spelling

* Fix spelling again

* Spell check for guiddata

* More fixes

This commit adds the dev docs explaining the classes in the new plugin.
It also fixes the following issues:
1. ValueGenerator was not a dependency for the PowerLauncher project
2. The error message for an invalid SHA variant now displays the
   supported SHA variants
3. Hash requests now wait for a string to hash (i.e. no longer hash an
   empty string)
4. GUID v3 and v5 namespace aliases allow lowercase notation
5. Unnecessary debug logs
6. An empty query will now just log "Empty request"
7. An invalid query will also log user query

* Spell check fix again

* Change error message for unsupported GUID versions

* Remove Any CPU from the solution

* Add to installer

* Remove duplicated ValueGeneratorPluginFolder entry
2023-07-18 10:44:02 +01:00
Stefan Markovic
cfc65e8c69
[release ci] Fix signing Peek/SharpCompress.dll (#27082) 2023-06-28 12:58:39 +02:00
Andrey Nekrasov
29eebe16a4 [New Utility]Mouse Without Borders
* Integrate Mouse Without Borders into PowerToys

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-05-18 21:48:03 +01:00
Samuel Chapleau
d50f092403
[Peek] Remove WIC project and only keep used ComImport (#25968)
* 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>

* Bump Microsoft.Windows.SDK.BuildTools version

* [Peek] Plugin pattern to enable any file type previewing (#22475)

* [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>

* 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

* Add scale awareness to window centering (#22541)

* [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

* [Peek] Enable PropertyStore for offline files (#22567)

* Enabling PropertyStore for offline files

Co-authored-by: Daniel Chau <dancha@microsoft.com>

* [Peek] Adding unsupported file previewer (#22598)

* Unsupported file previewer

* Fix file display info

* Fix property store calls

* Update TODO

* [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

* [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>

* [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>

* Fix crash

* Fix wrong thread exception

* Make CurrentItemIndex setter private

* Update titlebar filecount text

* Fix titlebar draggable region and interactive region (bump WinAppSdk to latest)

* [Peek] Unsupported File Previewer - Formatting string from resources (#22609)

* Moving to string resource usage

* Moving ReadableStringHelper to common project

* Fix comments

* [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>

* [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

* [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

* [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>

* [Peek] New File Explorer tabs break Shell API to get selected files (#22641)

* fix FE tab bug

* remove unnecessary unsafe keyword

* [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

* [Peek] Unsupported File Previewer - Setting Window Size (#22645)

* Adding setting for unsupported file window

* Fix

* [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>

* Add full image quality support (#22654)

* [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

* [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>

* [Peek] Unsupported File Previewer - Preserve Transparency For File Icons (#22650)

* Preserving transparency or icons

* Remove TODO

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [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

* [Peek] Add copy keyboard accelerator (#22647)

* add copy keyboard accelerator

* Fix comments

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [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>

* [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

* Move check if higher quality image is already loaded to the exact line where we change the Preview bitmap (#23083)

* Fix opening Peek when FE window is set to full name path (#23082)

* Move check for png thubmnail loading priority

* Remove Peek.UI.WPF project

* Remove duplicated method in powertoys setup

* [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

* [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

* [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>

* [Peek] Add unsupported file icon fallback (#23735)

* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer

* [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

* [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

* Use nullable Size for image size & open file on background thread (#24004)

* [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

* [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

* [Peek] Pin the window position  (#24927)

* [Peek] Telemetry and logging (#25231)

* text preview

* scrolling

* changed size

* Handle errors more gracefuly

* webview2 preview

* common preview project

* previewpane: use common project

* peek: use common

* previewpane: moved md

* peek: md

* previewpane: clean up

* clean up

* moved monaco files

* moved formatters

* rename

* moved common monaco helper

* dev files support

* installer

* removed versions

* warnings: culture info

* warnings: names

* clean up

* warnings: dispose

* warnings: default values

* warnings

* warnings: charset

* warnings: exceptions

* suppress warning

* installer: added peek

* changed peek guid

* monaco folders

* peek deps

* peek files

* peek resources

* removed additional monaco folder

* set host name

* Update installer

* hardcode monaco path

* leave single webview control

* moved path to common

* project

* more meaningful todos

* moved temp folder cleanup

* todo

* extension check

* spell: monaco

* spellcheck

* spellcheck

* fix id

* fix spelling

* key to spelling

* id fix

* Fix monaco resolution at install time

* Fix user install. Add needed files

* installer: remove peek localization files. It's a WinUI app

* installer:fix signing

* removed unused

* settings: flyout enable/disable for Peek

* simplify string

* property changed handle

* [Peek][Settings] Peek OOBE page (#25895)

* Add placeholder error icon

* Only open FilStream in read-only mode; Release propertyStore handle after getting the file properties

(cherry picked from commit 3b1481da2c)

* Update calls to PropertyStoreHelper

* Add disposable property store

* Make GetPropertyStoreFromPath return Disposable property store

* correct typo

* correct typo

* Remove nullable in DisposablePropertyStore

* Add property getters

* Remove usued method

* Correct typo

* Correct typo again...

* Update description

* Add cleaner fallback error

* Fix build

* Cleanup code

* Fix indents

* Delete WIC project and keep only necessary WIC comimport

* Fix spellcheck

---------

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>
Co-authored-by: Daniel Chau <d.chau@alumni.ubc.ca>
Co-authored-by: Daniel Chau <dancha@microsoft.com>
Co-authored-by: jth-ms <73617023+jth-ms@users.noreply.github.com>
Co-authored-by: Robson <rp.pontin@gmail.com>
Co-authored-by: estebanm123 <49930791+estebanm123@users.noreply.github.com>
Co-authored-by: Esteban Margaron <emargaron@microsoft.com>
Co-authored-by: Yawen Hou <Sytta@users.noreply.github.com>
Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
Co-authored-by: Yawen Hou <yawenhou@microsoft.com>
Co-authored-by: Jojo Zhou <39350350+Joanna-Zhou@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-05-15 08:58:39 -07:00
Samuel Chapleau
648f30d1ab
[Peek] Powertoys Peek MVP (#25922)
* 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>

* Bump Microsoft.Windows.SDK.BuildTools version

* [Peek] Plugin pattern to enable any file type previewing (#22475)

* [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>

* 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

* Add scale awareness to window centering (#22541)

* [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

* [Peek] Enable PropertyStore for offline files (#22567)

* Enabling PropertyStore for offline files

Co-authored-by: Daniel Chau <dancha@microsoft.com>

* [Peek] Adding unsupported file previewer (#22598)

* Unsupported file previewer

* Fix file display info

* Fix property store calls

* Update TODO

* [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

* [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>

* [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>

* Fix crash

* Fix wrong thread exception

* Make CurrentItemIndex setter private

* Update titlebar filecount text

* Fix titlebar draggable region and interactive region (bump WinAppSdk to latest)

* [Peek] Unsupported File Previewer - Formatting string from resources (#22609)

* Moving to string resource usage

* Moving ReadableStringHelper to common project

* Fix comments

* [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>

* [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

* [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

* [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>

* [Peek] New File Explorer tabs break Shell API to get selected files (#22641)

* fix FE tab bug

* remove unnecessary unsafe keyword

* [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

* [Peek] Unsupported File Previewer - Setting Window Size (#22645)

* Adding setting for unsupported file window

* Fix

* [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>

* Add full image quality support (#22654)

* [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

* [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>

* [Peek] Unsupported File Previewer - Preserve Transparency For File Icons (#22650)

* Preserving transparency or icons

* Remove TODO

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [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

* [Peek] Add copy keyboard accelerator (#22647)

* add copy keyboard accelerator

* Fix comments

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [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>

* [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

* Move check if higher quality image is already loaded to the exact line where we change the Preview bitmap (#23083)

* Fix opening Peek when FE window is set to full name path (#23082)

* Move check for png thubmnail loading priority

* Remove Peek.UI.WPF project

* Remove duplicated method in powertoys setup

* [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

* [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

* [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>

* [Peek] Add unsupported file icon fallback (#23735)

* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer

* [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

* [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

* Use nullable Size for image size & open file on background thread (#24004)

* [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

* [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

* [Peek] Pin the window position  (#24927)

* [Peek] Telemetry and logging (#25231)

* text preview

* scrolling

* changed size

* webview2 preview

* common preview project

* previewpane: use common project

* peek: use common

* previewpane: moved md

* peek: md

* previewpane: clean up

* clean up

* moved monaco files

* moved formatters

* rename

* moved common monaco helper

* dev files support

* installer

* removed versions

* warnings: culture info

* warnings: names

* clean up

* warnings: dispose

* warnings: default values

* warnings

* warnings: charset

* warnings: exceptions

* suppress warning

* installer: added peek

* changed peek guid

* monaco folders

* peek deps

* peek files

* peek resources

* removed additional monaco folder

* set host name

* Update installer

* hardcode monaco path

* leave single webview control

* moved path to common

* project

* more meaningful todos

* moved temp folder cleanup

* todo

* extension check

* spell: monaco

* spellcheck

* spellcheck

* fix id

* fix spelling

* key to spelling

* id fix

* Fix monaco resolution at install time

* Fix user install. Add needed files

* installer: remove peek localization files. It's a WinUI app

* installer:fix signing

* removed unused

* settings: flyout enable/disable for Peek

* simplify string

* property changed handle

* [Peek][Settings] Peek OOBE page (#25895)

* [Peek] GPO (#25918)

* Add Native methods file to exception

* Fix merge issue on solution file

* Adjust spellcheck

* Remove boilerplate code

* Add module interface telemetry

* Remove change to README.md

* Add entry to README

* Clean up some non-changes

* Fix order of Peek in Settings menu

* [Settings] Make peek descriptions more descriptive

---------

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>
Co-authored-by: Daniel Chau <d.chau@alumni.ubc.ca>
Co-authored-by: Daniel Chau <dancha@microsoft.com>
Co-authored-by: jth-ms <73617023+jth-ms@users.noreply.github.com>
Co-authored-by: Robson <rp.pontin@gmail.com>
Co-authored-by: estebanm123 <49930791+estebanm123@users.noreply.github.com>
Co-authored-by: Esteban Margaron <emargaron@microsoft.com>
Co-authored-by: Yawen Hou <Sytta@users.noreply.github.com>
Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
Co-authored-by: Yawen Hou <yawenhou@microsoft.com>
Co-authored-by: Jojo Zhou <39350350+Joanna-Zhou@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-05-10 10:43:03 -07:00
Clint Rutkas
8d5ca1a032
Making the GPO folder include version number by default. (#25901) 2023-05-09 13:40:42 -07:00
Jaime Bernardo
9004f17f71
[Deps]Upgrade winAppSDK to 1.3 (#25876) 2023-05-08 12:11:15 +01:00
Davide Giacometti
471bb3bba2
[Run]New plugin to start other PowerToys (#24934)
* PowerToys plugin

* bring setting window to foreground

* resources

* fix deep linking always opening general page

* dll signing

* setup

* registry preview added

* align registry preview icon and setup

* fix setup

* fix setup build

* PR feedbacks addressed
2023-05-02 12:10:54 +01:00
Stefan Markovic
ddbe5e3908
[ci] Fix release pipeline installers hash generator (#25270)
* Fix Calculating SHA256 hash step

* Separate user/machine files
2023-04-10 09:23:29 +02:00
Stefan Markovic
870f8e3571
[installer] Support per-user installation (#24087)
* Add per user installer

* Separate upgrade codes for per machine and per user installation
Move per machine check to bootstrapper
Move all defines to common.wxs
Fix CI

* Update installer/PowerToysSetup/generateFileList.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* Update installer/PowerToysSetup/generateAllFileComponents.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* Update installer/PowerToysSetup/generateFileList.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* expect.txt

* Revert "Update installer/PowerToysSetup/generateFileList.ps1"

This reverts commit 34545dab9c.

* Update release CI to build both installers

* Revert bundle name change

It messes up app ID for per-user installation which ends up breaking winget update
of the per-user PT

* spellcheck

* Fix bad merge

* Add RegistryPreview

* Include backup_restore_settings.json

* Revert testing endpoint change

---------

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2023-03-31 12:23:57 +02:00
Randy
81c09685e9
Registry Preview: complete feature with integration with Settings and the Launcher UX (#23709)
* Initial src for Registry Preview

Initial collection of files

* Update MainWindow.Utilities.cs

fixing a few spelling items

* Update expect.txt

* Update App.xaml.cs

* Update MainWindow.Events.cs

* Update MainWindow.Utilities.cs

* Update MainWindow.xaml.cs

* Update expect.txt

* Update MainWindow.Events.cs

* Rename AddPreviewtoRegfile.reg to AddPreviewToRegfile.reg

* Rename RemovePreviewtoRegfile.reg to RemovePreviewToRegfile.reg

* Update Resources.resw

* Update MainWindow.xaml

* Turns on self-contained mode

Updates the csproj file to compile the app as self-contained .
Includes fixes for code that expected the app to be in an ApplicationContainer.
Updates WindowsAppSDK from 1.1.5 to 1.2.230118.102.

* Updated to align with StyleCop errors

Multiple changes across the codebase that now aligns with StyleCop guidelines.

Tested again after the changes, to make sure no new bugs crept in.

* Added comments for spell-checker

Unclear if this side step should be done or not, but the kxz comes from a GUID and the other three names are constants.

* Adding code-custom.dic

Comments didn't work; trying a dic file

* Added four new terms to expects.txt file

Cleaning up attempt to update the spell-checker with dic file and moved it to expects.txt file

* Adding one more string

Adding one more string for Spell-Check

* Adding back egfile

Seems this is needed.

* Correcting a variable name

Seems one of the variable names that changed globally got missed in a XAML file.

* Update project to be more PowerToys friendly

Tweaking names and output file name to fit better with PowerToys.

* First pass at integration into Settings and Launcher

This PR is not as large as it seems:
- RegistryPreview's source moved around to a "better" directory that makes it look like the whole app changed.  It didn't.  In fact, I opened it in Beyond Compare and there's not much difference in the RegistryPreview app.
- Added RegistryPreviewExt that produces a DLL that the Launcher can run the EXE
- Changes to Runner calls the Ext DLL rather than the app
- Settings UI got a bunch of changes to enable the Settings page for enable/disable across ViewModels, Views, and string tables.

Still todo:
- Add "Preview" to .REG files, when the app is enable (and remove it when disabled)
- Update the thumbnail-screenshot in the Settings page
- Add support for OOBE

* Update expect.txt

Added REGISTRYPREVIEWEXT for recent changes and corrected an alphabetic sorting error.

* Updating project file for Release mode

Build failed due to a bad Includes path in Release mode.

* Adds REG registration but breaks settings

This update will update the HKCU branch of the Registry for REG files: if the app in PowerToys is enabled, it adds a Preview item to the context menu of REG files and disabling in PowerToys removes the menu item.

While working on this, I noticed that the application settings were broken, after moving to a self-contained EXE: there must have been old settings from past builds, when it was still using containers and family names.

Added TODO's to add a new way to save settings, likely as JSON.

* Re-enabled app settings

Moved from using ApplicationDataContainer for app settings and now use simple JSON.

Also cleaned up handling the scenario where the Launcher send in the PID from PowerToys' main thread.

Fixed past spelling errors as well.

* Update RegistryPreview.png

Captured new screenshot.

* Integration into OOBE

Integrates new page for Registry Preview into OOBE process.

* Removing old comment and unneeded calls

Two bits of source removed as they aren't needed any longer

Removing a chunk of old commented out code that doesn't make sense anymore.

* Merging file from upstream

Updating some files due to three merge conflicts from upstream changes and a couple of other changes to keep up.

* Update .gitignore

Adding two vcxproj files that have local updates for atls.lib locations.

* Update Resources.resw

Fixing a typo that involved a missing closing tag.

* Fix analyzer warnings

* Fix CI build

* Fix ARM64 build
Project file cleanup

* Add to installer

* expect.txt

* Remove unneeded dll

* Update MainWindow.xaml.cs

Added check for current Theme and adjust TextBox Foreground accordingly.

* Update expect.txt

Cleaning up merge cruft.

* Revert wrong .gitignore changes

* Fix ARM installer

* Update Brushes for textBox to use Theme based versions

Finally figured out how to use the built-in, Theme-aware Brushes for the font colors in the onscreen textBox.  Also have it aligning the font color for the hover state.

* Align configuration in PowerToys.sln

* [installer] Add missing files

* Fix bad merge

* Fixes for stefansjfw's review

Includes:
- two new strings for UX localization
- adds compatibility section for Windows 10
- fix to only track successful activations
- Removes two REG files that were there for examples

* Fixes from review from htcfreek

Updates:
- Fixed an issue where TextBox_TextChanged was firing when you simply opened a file.
- Added clamp to prevent files larger than 10MB from being opened.
- Added support in the UX to show Keys and Values that are deleted via the file
- Added support to specially handle Keys that start with - and Values that have =- in them (delete scenario)
- Changed AppBarButton icon for Edit from Rename to NewWindow

* Create deleted-folder32.png

* Added Registry Preview to GPO

* Update expect.txt

Updating spellchecker works

* Updating Size/Move code for better results

- Moved the size/move to the MainWindow layer
- Cleaned up the JSON settings handling to avoid an access denied on first run

* Improving text handling

Changed how special characters are parse, which helps with live entry.

* Updates to parsing and other fixes

- Renamed the value PNG for parity
- Added new error image
- Added check that values have " at start and finish.
- Added support for a new "ERROR" type for Values
- Fixed support for @ versus "@" in values
- Fixed bug where Save wasn't activating in all scernarios

* Fix signing and versioning

* Update src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Apply suggestions from code review

Adds Launch button to the settings page.

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Update Resources.resw

Adding strings for new launch button

* Adding new version for GPO

Moving to 0.69.0

* More parsing bug fixes

- Changes to look for [- instead of -[ for syntax deleting keys (fix for developer's mental hiccup)
- Moved [- to top of the decision making stack, as it needs to come before [
- Added new StripEscapedCharacters function for both sides of a Value line
- Fixed crashing bug for scenario where no Keys are parsed before a Value

* Bug fixes from most recent review.

- Dictionary will now be case insensitive when searching for keys
- Added tool tips (and strings) to the images of the Keys and Values
- Updated delete handling for Keys, so that only the leaf-most node gets marked as deleted; also stops the top most roots from being marked deleted.

* Tweaking for @=-

Forces the UX to take @=- and treat it as @="" since that's what Registry Editor would do.

* Removing unused usings

* Updates app description

* Update src/gpo/assets/PowerToys.admx

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* cleanup proj file
launch process only if module is enabled
add process to bugreport process list

* Add context menu icon

* Update src/modules/registrypreview/RegistryPreviewUI/MainWindow.Utilities.cs

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Use modulesRegistry.h to apply/unapply registry changes

* Tweaked window settings

Moved the loading of the settings a little later in the initialization code, which gives more time for things to initialize.

* Update registry.h

Moving the definition out of the detail namespace to the registry name space to fix a compilation issue in RegistryPreviewExt.

* Unapply on creation

If module is disabled in settings.json, on startup reg entries should be unnaplied.
TODO: read m_enabled from settings file on creation

* Removing size/move main window

Added a TODO comment that responds to the size/position settings that are being saved out in the JSON blob on close as it doesn't always work on every PC, as the MainWindow initializes at different times.

* Change to always keep Save As active

No reason for this to be disabled, honestly.

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2023-03-27 15:21:46 +02:00
Jeremy Sinclair
c92931fe5a
[CI] Improve version and sign check script (#24205)
* Remove multiple enumeration and condense conditional statements

* Update versionAndSignCheck.ps1

Add copyright year check

* Update versionAndSignCheck.ps1

Escape parentheses

* Updated logic to use regex matching
2023-03-11 09:47:54 -05:00
Jaime Bernardo
d08fcd85a0
[PTRun]Remove the timezone plugin (#24306) 2023-02-27 09:47:57 +00:00
Michael Clayton
0524a4bddd
[New Utility]Mouse Jump(#23566)
* #23216 - initial MouseJump commit

* #23216 - Mouse Jump - fix spelling, removing Interop folder

* #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln

* #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln

* #23216 - Mouse Jump - switch MS Logger to NLog for nuget package allow-listing

* #23216 added MouseJumpUI.UnitTests.dll to "MS Tests" step in build-powertoys-steps.yml

* [MouseJump] fixed screenshot coords (x & y were transposed) (#23216)

* [MouseJump] close form rather than hide on deactivate (#23216)

* [MouseJump] added UI dll for signing (#23216)

* [MouseJump] close form rather than hide on deactivate (#23216)

* [MouseJump] removed redundant line

* [MouseJump] configure dpi awareness, add NLog.config (microsoft#23216)

* [MouseJump] fix spellchecker errors (microsoft#23216)

* [MouseJump] fixing comment style warning (microsoft#23216)

* [MouseJump] simplified dpi config (microsoft#23216)

* [MouseJump] fixed edge case issue with moving cursor (microsoft#23216)

* [MouseJump] fixed typo (microsoft#23216)

* [MouseJump] added attribution (microsoft#23216)

* [Mouse Jump] fix attribution link and spelling (microsoft#23216)

* Add MouseJump to installer

* Fix centralized version control

* Add Quick Access enable/disable entry

* Fix analyzer error in GPO

* Fix botched merge

* Disabled by default and remove boilerplate code

* Add GPO definitions

* Add GPO implications when starting standalone

* Update hotkey when it's changed in Settings

* Use standard Logger

* Add OOBE strings for Mouse Jump

* Add telemetry

* Update installer

* Add signing

* Add to bug report tool

* Address PR feedback
2023-02-24 13:30:30 +00:00
Carlos Zamora
1e1429177b
[PastePlain] Introduce Paste as Plain Text module (#23645)
* [PastePlain] Introduce Paste as Plain Text module

* fix build

* add telemetry

* update settings UI

* spell

* Add navigation items to Settings and OOBE

* Add PastePlain to the Quick Access flyout

* try to fix PastePlain not being enabled from runner/settings

* load dll properly

* installer files

* Add PastePlain project name

* Use win32 APIs in the module interface instead

* Fix spellcheck

* Fix build errors

* Add success, error and invoke telemetry

* Add Settings Telemetry

* Add GPO definitions

* Fix analyzer errors

* Use static_cast instead of reinterpret_cast

* Add images to Settings

* Add note about replacing clipboard contents

* Fix learn more text

* Add link to readme

* Remove unneeded C# app

* Fix installer

* Fix spellchecker

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-02-23 14:59:49 +00:00
Sophia Chen
df521b4c9b
[Settings]New Landing Page Experimentation (#22365)
Co-authored-by: Sophia Chen <sophia.six.chen@gmail.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Sophia Chen <sophchen@microsoft.com>
2023-02-15 02:38:53 +00:00
Jeremy Sinclair
483e37c8b0
[Build]Centralize .NET NuGet Package Versions (#23727)
* Add populated Directory.Packages.props

* Add package source mapping for community toolkit

* Remove package versions from Settings projects

* Remove package versions from PT Run plugin projects

* Remove package versions from PreviewPane projects

* Remove package versions from Launcher projects

* Remove package versions from Common projects

* Remove package versions from Hosts

* Remove package versions from PowerAccent projects

* Remove package versions from ImageResizer projects

* Remove package versions from Awake

* Remove package versions from ColorPicker projects

* Remove package versions from FancyZones

* Remove package versions from FileLocksmith

* Remove package versions from MeasureToolUI

* Remove package versions from PowerOCR

* Remove package versions from Analyzers entries

* Try fix release CI with packageSourceMapping

* Actually use PowerToys dependencies source for labs
2023-02-13 17:10:33 +00:00
Jeremy Sinclair
923c220338
[ci]Enhance ARM64 configuration verification (#23509)
* Use case-sensitive equality check for platform name

* Add missing platform message.

* Update spelling
2023-01-26 16:40:15 +00:00
Jaime Bernardo
af70b6b689
Revert "[ci]Fix dead links for WiX 3 binaries" (#23433)
This reverts commit 07f3507f11.
2023-01-19 12:07:50 +00:00
Jaime Bernardo
07f3507f11
[ci]Fix dead links for WiX 3 binaries (#23367)
* [ci]Fix dead links on WiX 3 binaries
2023-01-16 13:19:36 +00:00
Jeremy Sinclair
7a0dd5b455
[Build][Installer]Automatically add list of .NET Runtime deps to Installer during build (#23102)
* Added PowerShell script for parsing .NET Runtimes from deps.json

* Removed static list set of .NET Runtime and WPF file list

* Updated DepsFilesLists to write output. Moved to CustomActions directory

* Added space between runtime files variables

* Fix Parameter and Set-Content invocation

* Added PreBuild event to call parseRuntimes script

* Update spelling

* Removed runtime files from Product.wxs

* Updated script to add support for Product.wxs

* Modify process to create copies of unmodified files and restore them on post build.

* Fix spacing

* Fix spelling

* Updated script to create new Guid for Dotnet component

* Fix invalid regex

* Remove reverting Product.wxs in Custom Actions project

* Add Post Build Action in Installer to revert Product.wxs

* Set Post Build Event to run always on Installer

* Fix path to Product.wxs in Post Build Event

* Final fix to Product.wxs path

* Switch to use powershell.exe and read from ColorPicker directory.

* wip: fix release pipeline

* remove conditions for build events in PowerToysInstaller.wixproj
2023-01-12 14:25:36 +00:00
Clint Rutkas
3fb707f78d
[ci]Verify notice.md and NuGet packages are synced (#23000)
* Create verifyNoticeMdAgainstNugetPackages.ps1

* Update build-powertoys-steps.yml

* Update verifyNoticeMdAgainstNugetPackages.ps1

* Update verifyNoticeMdAgainstNugetPackages.ps1

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update NOTICE.md

* Update NOTICE.md

* Update NOTICE.md

* Update verifyNoticeMdAgainstNugetPackages.ps1

* Update verifyNoticeMdAgainstNugetPackages.ps1

* adding back in the Community Toolkit items

weird, some how there was a checkin with this being removed

* Update .pipelines/verifyNoticeMdAgainstNugetPackages.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* Update .pipelines/verifyNoticeMdAgainstNugetPackages.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* Update .pipelines/verifyNoticeMdAgainstNugetPackages.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* Update .pipelines/verifyNoticeMdAgainstNugetPackages.ps1

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>

* shifting the restore for setup back to where it was plus moving the verification to end.

* moved wrong powershell, fliping back

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2023-01-09 12:27:57 +00:00
Jaime Bernardo
c0b78835ac
[GPO]Chore: move asset files to src path (#22906) 2022-12-28 19:01:00 +01:00
Stefan Markovic
c2325181ea
Remove unused Newtonsoft.Json package references (#22812)
* Remove unused Newtonsoft.Json package references
Replace with System.Text.Json in Settings test

* spellcheck

* Remove obsolete test

* Revert settings part

* Revert "Revert settings part"

This reverts commit ad2934ce0b.

* Increase JS heap size in CI
2022-12-16 18:46:07 +01:00
Stefan Markovic
6ac508fb93
Self-contained .NET (#22217)
* dotnet sc

* MD preview - C# app

 - working self-contained

* Gcode preview - C# app

* DevFiles preview - C# app

* Fix passing path with spaces as cmd arg and monacocpp proj file

* Pdf preview - C# app

* Svg preview - C# app

* Fix comment

* Gcode thumbnail - C# app

TODO:
	- installer
	- why IThumbnailProvider and IIntializeWithFile doesn't work?

* Pdf thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Pdf thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Fix GcodeThumbnailProviderCpp.vcxproj

* Svg thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Fix Svg tests

* Thumbnail providers - installer

* Self-contained Hosts and FileLocksmith

* Fix hardcoded <RuntimeIdentifier>

* Remove unneeded files

* Try to fix Nuget in PR CI

* Prefix new dlls with PowerToys.
Sign new dlls and exes

* Add new .exe files to ProcessList

* ci: debug by listing all env vars

* ci: try setting variable in the right ci file

* Bring back hardcoded RuntimeIdentifier

* ci: Add comment and remove debug action

* Remove unneeded lib

* [WIP] Platform conditional dotnet files & hardlinks

* Cleanup

* Update expect.txt

* Test fix - ARM installer

* Fix uninstall bug

* Update docs

* Fix failing test

* Add dll details

* Minor cleanup

* Improve resizing

* Add some logs

* Test fix - release build

* Remove InvokeOnControlThread

* Test fix: logger initialization

* Fix arm64 installer

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2022-12-14 13:37:23 +01:00
Jaime Bernardo
6b199a1154
[ci]Skip C++ code analysis to speed up release pipelines (#22555)
C++ code analysis is a heavy process, which we are running in the PR CIs already, so code that gets into main should be checked already.
This PR conditionally removes C++ code analysis from the release pipelines. This saves 10-15 minutes in build time.

## Validation Steps Performed
Verified the release CI shaved some time off.
2022-12-09 18:09:26 -06:00
Niels Laute
b6a905709a
[QuickAccent]Theming support (#22446)
* Adding theme awereness

* Adding theming colors

* High contrast

* Downgrade ModernWPF package

* Adding ModernWPF and PowerToys.Common.UI to installer

* Removing unused file and MahApps

* Removed MahApps from installer string

* fix projects and setup

* removed PowerAccent

* addressed PR feedback

Co-authored-by: Davide <25966642+davidegiacometti@users.noreply.github.com>
2022-12-09 20:40:00 +00:00
Jaime Bernardo
df0a14403c
[ci]Fix duplicate resource and unsigned dll (#22450)
* [ci][Settings]Fix blue duplicate resource entry

* [ci]also fix unsigned file
2022-12-05 09:08:23 +00:00
Jeremy Sinclair
a7bd0cfde8
[deps]Upgrade to .NET 7 (#20979)
* Update projects to .NET 7

* Updated packages to 7.0-rc1

* [ColorPicker] Wrap WM_KEYUP param in unchecked context

* [PTRun][OneNote] Added a NoWarn to CS8981

* [MeasureTool] Wrap buffer in wstring_view in SetClipBoardToText

* Target .NET 7 for PowerToys.Interop

* Update publish profiles

* Removed System.Text.Json.dll from Product.wxs since it's included in .NET 7

* Use .NET 7 in CI

* Removed individual CodeAnalysis package from projects

* Updated CodeAnalysis package in Directory.Build.props

* Updated NuGet packages to latest 7.0 rc2

* Fix merge mistake with Settings.UI.Library project

* Updated installer with .NET 7 RC2 install

* [GPOWrapper] Updated GPOWrapperProjection to .NET 7

* [FileLockSmith] Updated to .NET 7

* [FileLocksmith] Update Interop to .NET 7

* Upgrade .NET 7 specific libraries to GA version

* [PowerToysSetup] Updated .NET 7 urls to GA

* [CI] removed .NET 7 SDK preview version from UseDotNet task

* [PowerToysSetup] Update HasDotnet variable name

* [PowerToysInterop] Downgrade target back to .NET 6

* [FileLockSmith] Downgrade Interop library back to .NET 6

* Revert "[FileLockSmith] Downgrade Interop library back to .NET 6"

This reverts commit 356ad048e3.

* Revert "[PowerToysInterop] Downgrade target back to .NET 6"

This reverts commit 74dbcfdefe.

* [Analyzers][CPP] Disable warning for 4679 caused by .NET 7 in C++/CLI

* [CI] Set maximum cpu count to 2 for PowerToys.sln build

* [CI] Set maximumCpuCount to false in hopes of arm64 working

* Changed .NET 7 runtime display name

* [ci] Use .net 7 sdk
2022-12-01 14:40:41 +00:00
Dustin L. Howett
57c5575a8d
[release] Move NuGet feed from CDPx to DART (#22363)
* [release] Move NuGet feed from CDPx to DART

Since the release pipeline is run in the DART Azure DevOps project, we
no longer need to authenticate against it. The build agent will be
running with a token that allows access.

* restore nuget.config

* We should still authenticate against this org, not a specific feed

* rename the feed

* whoa whoa whoa okay

* [ci]Conditionally add labs package except in Dart (#22294)

* Propagate Jaime's change

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-11-30 14:08:01 +00:00
Jaime Bernardo
ec26f67b38
[Installer][Settings]Include CommunityToolkit Labs dll (#22295) 2022-11-25 13:41:32 +00:00
Davide Giacometti
b9367c0ca6
Fail build when nugets aren't consolidated (#22233)
* fail build when nugets aren't consolidated

* consolidate nugets

* change tool install

* consolidate nugets

* fix message
2022-11-24 20:45:51 +01:00
Jaime Bernardo
2b2c813e69
[CI]Fix pinyin dependency signing and version (#22157)
* ci: fix pinyin dependency signing

* Fix version too
2022-11-18 11:09:39 +00:00
Clint Rutkas
07dd66ecbc
Fixing casing and testing full processor on PT (#22011)
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-11-14 10:38:25 -08:00
Jaime Bernardo
898d612af6
[ci]Conditionally turn off multi tasking for arm64 (#21957)
* [ci]Conditionally turn off multi tasking for arm64

* Use var expression in variables instead

* Yet another try

* Fix release CI as well

* Use proper variables on matrix

* Try non-runtime expressions for release CI

* Remove debug prints
2022-11-10 17:09:25 +00:00
Jaime Bernardo
ad8b959493
[ci]Remove multiprocessor build to temporarily fix arm64 build issues(#21930)
Co-authored-by: Clint Rutkas <clint@rutkas.com>
2022-11-10 11:08:19 +00:00
ivanstosic-janea
db191b8b75
[New PowerToy] File Locksmith (#20930)
* Imported offline solution

* Make solution compile

* Add Windows sample, doesn't work?

* Added new project to implement the dll

* Remove unneeded header

* Implemented IUnknown part of ExplorerCommand

* Implemented IExplorerCommand methods

* Implemented ClassFactory

* Implemented DLL register/unregister

* Implemented other DLL exports, not working?

* Implemented IShellExtInit inferface

* Implemented IContextMenu, it works!

* Implement command data fetching

* Make sample project compile on VS 2022

* Add plan

* Implement Lib as separate project

* Implemented IPC, not tested

* Console UI project skeleton

* Implemented basic console UI

* Implemented piping, there are bugs

* Prototype works

* Remove old project

* Added GUI project skeleton

* Mitigate issue with WinUI3

* Added a control for displaying results

* Add button

* Implement core functions in lib project

* Call new library function from console main

* Implement showing results

* Improve UI

* Implemented subdirectory search

* Remove useless code

* Set window size

* UI adjustments

* Implement killing process

* Rename variable

* Add lib project to main solution

* Add Ext and GUI projects to solution

* Tweak packages for GUI project

* Add a settings page

* Add a few resource strings

* Add one more resources string

* VS keeps trying to correct this

* Add references to File Locksmith in /,github

* Implement some parts of FileLocksmithModule

* Change output directory

* Change target name and add to runner

* Add logger

* Started implementing settings backend

* Fix log folder

* Settings work

* Add some basic tracing

* Attempt at adding resources

* Remove junk files

* Added missing defines

* Replaced some constants with resources

Something's not working

* Move resources to the Ext project

* Remove experiment

* Add binaries for signing

* Improve tracing

* Remove old Settings calls

* Show something when there are no results

* Change window title

* Move computation to another thread, improve UX

* Increase font size for default text

* Remove entries for killed processes

* Show user name

* Remove nonrecursive implementation

* Implement back end for getting file names

* Show list of files, UI tweaks

* Remove useless includes

* Implement back end for getting full process path

* Dark title bar on dark themes

* Using Expander, other UI adjustments

* Show "No results" after killing all processes

* Show progress ring

* Update configuration mapping

* Revert "Update configuration mapping"

This reverts commit d8e13206f3c7de3c6dbf880299bfff3bf9f27a37.

* Fixed solution configuration, ARM64 should build

* Backend for refreshing

* Variable window size

* Add refresh button

* New WinUI3 C# project for FL

* Started porting functionality

* Add Interop project

* Move IPC to Ext project

* Ported native functions to Interop

* Ported finding processes

* Ported most of Main Window functionality

* Display paths of files

* Implement killing processes

* Use resource string for "End Task"

* Remove entries for terminated processes

* Show User name

* Set default window size

* Make the new UI the default

* Reading paths from stdin, completed port to C#

* Fix small bug

* Moving to MVVM

* Adding Labs

* Merge branch 'ivan/file-locksmith' of https://github.com/microsoft/PowerToys into ivan/file-locksmith

Removing one parent commit for cleaner history

Co-Authored-By: Niels Laute <niels.laute@live.nl>

* Reintroducing features

* Moving UI strings to resources file

* Restored functionality

* Add missing dlls

* Add FIle Locksmith to publish.cmd

* Rebase fixes

* Try updating nuget.config

* Fix copy-paste blunder

* Add File Locksmith UI for publishing

* Add .pubxml file in FileLocksmith

* Change build output folder

* Fix installer build issues

Remove old projects from solution so MSBuild doesn't build them.
Downgrade target framework to what most other projects are using.
Fix publishing profile and project runtimes.
Remove unused CsWinRT references.

* [CI] Add clear to nuget packages

* Fix module reference counting

* Fix nuget for release CI

* Fix version and signing

* Fix path for resources

* Fix incorrect results when running 2 instances

* Fix default nuget source

* Windows 10 icon and fallback for UI

* Code clean-up and spaces instead of tabs

* Add gif showcasing FL

* Add screenshot of File Locksmith for Settings

* Add new files to the installer

* Add OOBE page

* Showing selected paths in the header

* Tweak path list

* Added new, wider gif

* Add GPO

* Add some logs

* [CI]Get CommunityToolkit.Labs from BigPark feed

* [CI]Use azure package feed for Nuget in release

* [CI]Another try for the labs source

* Revert changes to feed

* Use RestoreAdditionalProjectSources

* Add tooltip to file list

* Change tooltip to not trim the lines

* Add Tips and tricks section mentioning elevated

* Add some more logs messages.

* Grammar fix

* Add to bug report tool

* Fix UI virtualization not working

* Disable virtualization to avoid crashes

* Get better virtualization

* Add dialog instead of tooltip to show list of items

* No results refresh icon is now a button too

* Use managed methods for handling processes

* Remove registry code from Ext.

* Support drives too

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-10-28 14:51:21 +01:00
Jaime Bernardo
a63288009a
[GPO] Add policies for configuring utilities enabled states (#21411)
* Add GPOWrapper headers and C++/WinRT library

* Check GPO before starting utilities

* Show message on GPO having disabled preview panes.

* Don't generate thumbnails if GPO disabled

* Fix FancyZonesEditor unable to recognize GPOWrapper

* Move settings view models to the settings project

* Use GPO to block enabling utilities in Settings

* Hide context menu entries when gpo disables utilities

* Apply gpo policies when enabling PowerToys on runner

* Add version and metadata to dll

* Add GPOWrapper to the installer

* Fix MSBuild errors on WPF apps by using Projection

* Signing

* Add gpo files and publish them

* Add GPO policies to the bug report tool

* Add some documentation for using GPO

* Mention support to actual lowest supported version of Windows

* Move PowerToys to the root of administrative templates tree

* Save policies on Software\Policies\PowerToys

* Support both machine and user scopes

* Fix documentation to reference computer and user scopes

* Mention incompatibility with outlook in gpo

* Set a better folder structure for gpo assets

* Move PDF Handler warning to the description

* Update doc/gpo/README.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Add actual minimum version of PowerToys to gpo files

* Fix identation

* Remove GPOWrapper Readme

* Add Active Directory instructions to doc

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2022-10-26 14:02:31 +01:00
Davide Giacometti
9c21e2dc14
run hosts tests (#21372) 2022-10-21 07:55:21 +02:00
Clint Rutkas
8e4ef1a4ac
Release.yml hash creation (#21254)
* injecting hash

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

why is it always a slash
2022-10-16 12:49:11 -07:00
Davide Giacometti
b2e1337d4e
Hosts file editor (#20462) 2022-10-13 13:05:43 +02:00
damienleroy
5e955f034e
[QuickAccent]Add setting to select language (#20798)
* add selection of country langages

* Add Greek and Iceland countries

* Update src/modules/poweraccent/PowerAccent.Core/PowerAccent.Core.csproj

* fix ß in all section

* remove greek

* improve UI

* langage to language

* remove GR reference

* change 'All' to 'All available'

* adding Romanian and Hungarian

* Missing characters

* Add Italian

* Fix translation key
Remove GameMode activation

* Fix PR build issues

* Callback to get if a letter is part of the language

* Add additional dlls to installer

* Fix new dlls signing

* Fix spelling

* Add description to language selection

Co-authored-by: Damien LEROY <dleroy@veepee.com>
2022-09-29 15:28:14 +01:00
Stefan Markovic
08be4abd56
[ContextMenu Packages] Prefix identity and app id with Microsoft.PowerToys (#20881)
* [ContextMenu Packages] Prefix identity and app id with Microsoft.PowerToys

* TEST: Set packages versions

* Fix packages version format

* Update display name
2022-09-28 12:40:11 +02:00
Jaime Bernardo
1dae8fa8f3
[ci]Enable tests that depend on WebView2 again (#20743) 2022-09-21 16:59:53 +01:00
Stefan Markovic
7b0f97597d
[PowerAccent] Move low-level keyboard hook to c++ (#20190)
* Move llkeyboardhook to c++

* expect.txt

* Address PR comment - Resolve namespaces

* Address PR comments - CallNextHook and correct char selection

* Also unpress the letter key

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-09-09 13:27:56 +02:00
Andrey Nekrasov
78d65a87cd
[New PowerToy] Add Screen Ruler module for measuring screen contents (#19701)
* [MeasureTool] initial commit

* [chore] clean up needless WindowsTargetPlatformVersion overrides from projects

* [MeasureTool] initial implementation

* Fix build errors

* Update vsconfig for needed Windows 10 SDK versions

* fix spellchecker

* another spellcheck fix

* more spellcheck errors

* Fix measurement being off by 1 on both ends

* UI fixes

* Add feet to crosses

* Remove anti-aliasing, as it's creating artifacts

* Use pixel tolerance from settings

* Tooltip updates

* Restore antialiasing to draw the tooltip

* remove comment for spell check

* Updated icons

* Icon updates

* Improve measurement accuracy and display

* Fix spellchecker

* Add less precise drawing on continuous warning

* Add setting for turning cross feet on

* Swap LMB/RMB for interaction

* Uncheck active tool's RadioButton when it exits

* activation hotkey toggles UI instead of just launching it

* track runner process and exit when it exits

* add proj ref

* toolbar is interactive during measurements

* always open toolbar on the main display

* refactor colors

* refactor edge detection & overlay ui

* refactor overlay ui even more

* simplify state structs

* multimonitor preparation: eliminate global state

* prepare for merge

* spelling

* proper thread termination + minor fixes

* multimonitor: launch tools on all monitors

* multimonitor support: track cursor position

* spell

* fix powertoys!

* ScreenSize -> Box

* add shadow effect for textbox

* spell

* fix debug mode

* dynamic text box size based on text layout metrics

* add mouse wheel to adjust pixel tolerance + per channel detection algorithm setting

* spelling

* fix per channel distance calculations

* update installer deps + spelling

* tool activation telemetry

* update assets and try to fix build

* use × instead of x

* allow multiple measurements with bounds tool with shift-click

* move #define DEBUG_OVERLAY in an appropriate space

* spell-checked

* update issue template + refactor text box drawing

* implement custom renderer and make × semiopaque

* spelling

* pass dpiScale to x renderer

* add sse2neon license

* update OOBE

* move license to NOTICE

* appropriate module preview image

* localization for AutomationPeer

* increase default pixel tolerance from 5 to 30

* add PowerToys.MeasureToolUI.exe to bugreport

* explicitly set texture dims

* clarify continuous capture description

* fix a real spelling error!

* cleanup

* clean up x2

* debug texture

* fix texture access

* fix saveasbitmap

* improve sum of all channel diffs method score calc

* optimize

* ContinuousCapture is enabled by default to avoid confusion

* build fix

* draw captured screen in a non continuous mode

* cast a spell...

* merge fix

* disable stroboscopic effect

* split global/perScreen measure state and minor improvements

* spelling

* fix comment

* primary monitor debug also active for the bounds tool

* dpi from rt for custom renderer

* add comment

* fix off by 1

* make backround convertion success for non continuous mode non-essential

* fix spelling

* overlay window covers taskbar

* fix CI

* revert taskbar covering

* fix CI

* fix ci again

* fix 2

* fix ci

* CI fix

* fix arm ci

* cleanup cursor convertion between coordinate spaces

* fix spelling

* Fix signing

* Fix MeasureToolUI version

* Fix core version

* fix race condition in system internals which happens during concurrent d3d/d2d resource creation

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2022-08-27 02:17:20 +03:00
damienleroy
d9c0af232b
[New PowerToy] PowerAccent (#19212)
* add poweraccent (draft) for PR

* removing french text for Spell checking job

* add 'poweraccent' to spell checker

* add 'damienleroy' to spell checker file

* adding RuntimeIdentifiers for PowerAccent project

* duplicate image for settings

* update commandline arguments for launch settings

* Removing WndProc for testing with inter-process connection

* add PowerAccent sources for PowerToys

* fix spellcheck

* fixing stylecop conventions

* Remove StyleCop.Analyzers because of duplicate

* fixing command line reference

* Fixing CS8012 for PowerAccent.

* ARM64 processor

* - Modify PowerAccent fluenticon for dark mode
- Try fix arm64 release

* Remove taskbar

* init Oobe view

* - added POwerAccent to App.xaml.cs
- change style to markdown in Oobe display

* - fixing poweraccent crash
- change Oobe LearnMore link

* Installer and signing

* Cleanup
Add settings

* Issue template

* Add some more characters

* Disabled by default

* Proper ToUnicodeEx calling and remove hacks

* Fix spellcheck

* Remove CommandLine dependency and debug prints. Add logs

* fix signing

* Fix binary metadata with version

* Fix the added space bug

* Only type space if it was the trigger method

* Take account of InputTime for displaying UI

* Fix code styling

* Remove the Trace WriteLine hack and add a delay instead

* Reinstate logs

* Better explanations

* Add telemetry for showing the menu

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

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

* Update src/modules/poweraccent/PowerAccent.Core/Tools/KeyboardListener.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Add accented characters for S

* Default to both activation methods

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

* Update src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs

Co-authored-by: Damien LEROY <dleroy@veepee.com>
2022-08-26 17:01:50 +01:00
Joseph Finney
eedea3159c
[New PowerToy] OCR PowerToy (#19172)
* Init commit

* Fix unintended GUID change of Microsoft.PowerToys.Run.Plugin.TimeZone.UnitTests

* Region and click word working

* Code style

* Close even when there is no result from the OCR

* Fix spelling concerns, and make overlay black to match snipping tool

* increase opacity of overlay to match snipping tool

* Code Style and cleanup

* Code style

* Create Logos and hook them into the project file

* Make the PowerOCR VCXProj more like Awake VCXProj

* Rename MainWindow to OCROverlay

* Add WindowUtilities and WindowForms

* Remove fsg to fix spelling error

* launch OCR Overlay on every screen

* Add PowerOCR to Runner Main.cpp

* Add PowerOCR Settings and Properties

* Add PowerOcrViewModel

* Fix wrong setting reference in PowerOcrSettingsVM

* Try to clean up the Cpp project for PowerOCR

* Went to ARM64 was x64 thanks @snickler

* Clean up PowerOCR C++ Proj with file refs

* Rewrite C++ dllmain comparing to awake

* Changes for spelling issues. The rest will stay

* Create PowerOcr Settings Page and add to settings shell

* Fix PowerOcr Settings

* Fix multi-monitor scaling issue

* Add close all overlays when escaping

* Update src/runner/main.cpp to call correct Power OCR dll

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

* Update expect.txt

* Add many files from Color Picker for hotkey activation

* Organize project into helper folder

* Use new hotkey activation and keep process alive

* Fix bug where scalebmp wasn't working

* Add The file headers and dispose app.xaml.cs

* Code style changes

* Fix bug where PowerOCR was toggling Awake

* Unsubscribe from keyboard events making they don't fire twice

* Add SndPowerOcrSetting and add to SettingsVM

* Trying to make the runner close PowerOCR when runner closes

* Fix app_name

* Update spellcheck expect

* use mutex on PowerOCR app to keep to single instance

* Rebuild the module interface using ColorPicker as a template.

Process still stays alive.

* Fix project names of the module interface

* Put app startup args back to 0 like color picker

* Runner now finds and enables/disables PowerOCR

* remove unneeded item groups from settings proj, per stefansjfw

* Add PowerOCR Screenshots

* Revert changed project GUID

* Add OOBE content for PowerOCR

* Keep cursor on one screen since the OCR window does not span screens.

* reload settings when activation key is pressed

* New screenshots and OOBE text

* Add PowerOCR as a case in the settings App.xaml.cs OnLaunched

* Settings and OOBE Text Changes

* Using using on bitmaps and change OCR overlay to stay open if no result

* Keyboard activation is handled is true

* Remove unused start PowerOCR OOBE Method

* [PowerOCR]Add some telemetry

* Add some logging

* Don't recreate the OCR overlay Windows more times

* Add to BugReportTool to get event viewer errors

* Fix wrong comment

* Fix another comment

* Add files to installer

* Add to signing

* Don't take Esc away from other apps

* Default to Win Shift R

* Use low level keyboard hook from runner

* Remove esc from local low level keyboard hook

* Fix some nits

* Default to Win Shift T
2022-08-25 11:25:52 +01:00
Jeff Lord
4c796c0b53
[PTRun]Add history plugin (#19569)
* Progress!

* Progress...

* POC level.

* Added ability to delete from history using IPublicAPI

* Some sorting, works in some cases.

* Rename "Run History" back to just "History".

* Updated item from review.

* Slight change to PowerLauncher ref, set Copy Local = False

* Fixed missing history items if added to history without search term.

* Added placeholder unit test project

* Updates for new History plugin.

* Update Product.wxs, removed useless Unit Test project

* Removed actual files for "Microsoft.PowerToys.Run.Plugin.History.UnitTests"

* Added history.md, updated ESRPSigning_core.json

* Changes for review

* Removed now global CodeAnalysis/stylecop
2022-08-23 21:27:45 +01:00
Jeremy Sinclair
4e3c965511
[ARM64][ci]Verify solution files configurations (#19878)
* [ARM64] Initial configuration verification script

* Updated text. Added solution verifications

* Updated spell checking

* Updated with proper argument to PowerShell tasks

* Use pwsh. Moved before .NET 6 task

* Load vswhere from installer location.
2022-08-17 16:35:45 +01:00
Seraphima Zykova
a5ecbc4088
[CI] FancyZones unit tests (#17910) 2022-08-15 15:40:10 +02:00
Jaime Bernardo
3753642f23
[build]Add version to binaries and add check in CI (#19792)
* [ci]Fail for binaries without a version

* Add version to AlwaysOnTop dll

* Add version to AlwaysOnTop executable

* Add a version to Awake module

* Add version to FancyZones module dll

* Add version to PowerRenameUI executable

* Add version to VideoConferenceMute module

* Add version to the Bug Report Tool

* Add version to Styles Report Tools

* Add version to Webcam Report Tool

* Add version to PowerToysSetupCustomActions

* fix spellcheck

* Update tools/WebcamReportTool/resource.h
2022-08-10 09:58:21 +01:00
Jaime Bernardo
45d0e7da2b
[ci]Add version number to symbols artifact (#19400) 2022-07-14 08:54:58 +01:00
Stefan Markovic
e637902892
[PowerRename][ImageResizer] Tier1 Win11 Context menu (#19000)
* Test win11 tier1 context menu

* Try to test signing

* Cleanup

* Cleanup project file

* Sign dll
Add PowerToys preffix
Add assets to installer

* expect.txt

* Switch to named pipes
Unregister package on uninstall
Remove unneeded files
Cleanup

* Bring back check if package registered but use per-user method

* Fix win11 check

* expect.txt

* Check if package already registered

* Revert "Check if package already registered"

FindPackages() method needs admin privileges.

This reverts commit 5af584fed4.

* Fix PowerRename args checking

* Cleanup assets

* Tier1 context menu ImageResizer
Minor cleanups
Move logic to package.h

* [WIP] Signing and installer
Expect.txt

* Localized context menu title

* Retarget everything 10.0.18362.0 -> 10.0.19041.0

* Address PR comments
 - check if selection renamable
 - minor cleanup
 - struct initialization

* Fix ImageResizerLib project configuration

* More Windows version updates

* Remove unneeded file & try fix resource build error

* Add Microsoft.PowerToys prefix to packages

* Test

* Fix convert-resx-to-rc.ps1 script issue causing resource files compile error

Don't generate empty STRINGTABLE for resx files without data

* Avoid duplicate context menu items

* [BugReportTool] Report installed context menu packages
2022-06-30 22:10:14 +02:00
Union Palenshus
28eb4c80f6
[PTRun][OneNote]Add query caching and delayedExecution (#18919)
* Adding OneNote plugin for PowerToys Run

* Updating to 3.0.1 dependency, updating md, spellcheck, ready for PR

* Updating spelling and using localized string

* Adding OneNote link to readme

* Adding OneNote requirement to description

* removing 'open' from description

* Updating interop version, PR feedback

* Adding query caching and delayedExecution to PT Run OneNote plugin

* Adding binaries to signing, and updating doc

* Adding dependency nuget package binaries to installer

* PR feedback and .editorconfig fix to ignore IDE rules that conflict with repo styling

* Fixing spelling
2022-06-29 14:56:55 +01:00
Jaime Bernardo
f8c624a62d
[test][chore]Update test sdk to 17.2.0 (#19059)
* [test][chore]Update test sdk to 17.2.0

* Add timezone unit tests to CI
2022-06-28 14:30:03 +01:00
Jaime Bernardo
fcdf79f7e9
[ci][test]Disable tests that depend on WebView2 (#19078)
* [ci][test]Disable tests that depend on WebView2

* Add actual dll name for markdown tests

* Random commit to trigger CI again
2022-06-28 12:03:09 +01:00
Dustin L. Howett
31e3c46641
Make sure we run CG component detection on main (#19060)
* Make sure we run CG component detection on main

I believe that there is a hidden "default branch" setting in Azure
DevOps, and ours is set to "master". CG only attempts to automatically
inject to builds off the default branch... and because we're a GitHub
repo running builds in AzDO we _can't change what the default branch
is_. Oops.

Copied from microsoft/terminal#e0bd76b30

* spellbot got mad at me
2022-06-27 09:25:25 -07:00
Jaime Bernardo
eeda2ec985
[ci][build]Sign PowerToysSetupCustomActions.dll (#18992)
* [ci]Sign PowerToysSetupCustomActions.dll

* Specifically sign the Custom Actions dll

* Proper dll build path

* Verify if dll inside msi is really signed
2022-06-24 13:06:44 +01:00
Jaime Bernardo
d9e8b3e9c3
[ci]Fix PTRun OneNote plugin signing (#18906) 2022-06-17 15:10:27 +01:00
Union Palenshus
9b7a7f93b7
Adding OneNote plugin for PowerToys Run (#18558)
* Adding OneNote plugin for PowerToys Run

* Updating to 3.0.1 dependency, updating md, spellcheck, ready for PR

* Updating spelling and using localized string

* Adding OneNote link to readme

* Adding OneNote requirement to description

* removing 'open' from description

* Updating interop version, PR feedback
2022-06-15 19:15:58 +02:00
Jaime Bernardo
65df14036c
[Installer]Ship Windows App SDK runtime self contained (#18644)
* [Installer]Ship Windows App SDK as self-contained

* Include windows app sdk localization files

* fix spellcheck

* Upgrade Win3.14 version

* Add RunWixToolsOutOfProc to try fixing wix hang

* fix spellcheck

* Try to get more information from wix build

* Remove unneeded flags

* Fix spellchecker

* Add version check exception for dll with 1.0.0.0
2022-06-07 09:58:32 +01:00
Andrey Nekrasov
ba4b9cf549
[ARM64][Installer]Install vcredist and upgrade wix to 3.14(#18500)
* [ARM64] Install VCRedist using bootstrapper and fix autoupdate

* [ARM64] Use system-wide WiX toolset instead of a nuget package

* [CI] Install WiX 3.14

* [CI] add wix install script for release.yml

* [Doc] Update WiX install steps

* [CI]Fix Wix path

* Double quotes for full wix path

* fixup: verify wix hashes

* ignore sha256s

* spellcheck

* updated vcredist name

* norestart for vcredist
2022-05-30 10:38:36 +01:00
Jaime Bernardo
13750188fd
[ARM64]CI and build pipelines (#18337)
* [ARM64]Build pipelines

* Fix localization in pipelines (no arm64 al.exe)

* Use lowercase arm64 for CI

* Build installer to arm64 folder and arm64 name

* Don't run arm64 tests, as there's no agent for it

* Fix pipeline conditions

* Divide symbol files by platform
2022-05-19 14:02:08 +01:00
Jaime Bernardo
2555203da8
[ARM64] Preview pane changes (#18222)
* [ARM64] Fix Preview Handlers

* Publish power preview at release pipelines

* Add ARM64 to the solution

* Fix preview pane paths for pipelines
2022-05-11 16:49:28 +01:00
Stefan Markovic
90ecd5e10f
[PowerRename] Move to WinAppSDK WinUI3 Unpackaged & ARM64 Support (#18171)
* Migrate PowerRename to Unpackaged WinUI3

* [ARM64] PowerRename (#18002)

* Migrate PowerRename to Unpackaged WinUI3

* Removed Project Config and update PlatformToolset to v143

* Updated solution config

* Migrate PowerRename to Unpackaged WinUI3

* Fixed configs changed from ARM64 build

* Left one project out of fix

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

* Minor fixes

* Remove PowerRenameUILib from signing list - doesn't exist anymore

* Remove PowerRenameUILib from move_uwp_resources.ps1

* Bring back old dir name to see if localization is preserved
Remove move_uwp_resources.ps1 - not needed anymore

* Remove UWP localization docs part

* Fix minor UI quirk

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2022-05-11 16:38:12 +02:00
Jaime Bernardo
f42409cb17
[ci]Rename WindowStylesReportTool to StylesReportTool (#17950) 2022-04-28 12:20:05 +01:00
Seraphima Zykova
e703551b4a
[Tools]Add a tool to get window styles (#17824)
* window styles tool

* removed window name

* new line delimiter

* spell

* rename tool

* add tool to installer

* added info

* app name

* clean up

* spell check

* Update tools/WindowStylesReportTool/WindowStylesReportTool.cpp

* class name

* spell check

* PROCESS_QUERY_LIMITED_INFORMATION

* updated installer docs

* pipeline

* added release dependency

* signing

* pipeline

* removed font

* timestamp

* Update tools/WindowStylesReportTool/WindowStylesReportTool.cpp

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2022-04-27 21:21:00 +01:00
Stefan Markovic
310c010c19
Remove .Net3 from installer & CI (#17825) 2022-04-20 22:29:06 +02:00
Stefan Markovic
27c4b1be0e
[settings-ui] Settings WinUI3 (#17797)
* Add Settings.WinUI3 project

* New namespace

* Activation and Services

* Assets and Behaviors

* Converters and Helpers

* Controls

* View and ViewModels

* Styles and Themes

* OOBE

* Strings

* Small App moves

* [check] Project files - publish profiles and launchSettings.json

* [using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name workaround

* [WIP] Workarounds to make it work

* Fix suppressed warnings - naming

* Add code analysis

* Fix KBMPage and App dispatcher
Fix MessageBox - replace with MessageDialog

* Fix ImageResizerPage & mark ColorPickerButton with TODO

* Add icon to windows
Cleanup MainWindow.xaml.cs and OobeWindow.xaml.cs
MainWindows and OobeWindow management

* App Icon
No framework and runtime subdirs

* Remove PowerToys.Settings and Settings.UI from solution
Update output paths

* Installer work & publish.cmd

* Fix dispatcher crashes

* Fix crashes

* Add all dlls to installer
Cleanup installer
Add OpenOOBE and OpenScoobe logic
Fix minor issues
Fix update scenario - REINSTALLMODE

* Rename back namespaces, project name and project dir

* [wip] move to winappsdk 1.1

* Fix propagating isElevated & installer runtimes dlls

* Remove obsolete dir/file

* PowerToys.Interop to netstandard2.0

* Move everything to .Net6

* [Settings] Always launch settings process non-elevated (#17791)

* Move back to WinAppSdk 1.0.1

* Add Settings.WinUI3 project

* New namespace

* Activation and Services

* Assets and Behaviors

* Converters and Helpers

* Controls

* View and ViewModels

* Styles and Themes

* OOBE

* Strings

* Small App moves

* [check] Project files - publish profiles and launchSettings.json

* [using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name workaround

* [WIP] Workarounds to make it work

* Fix suppressed warnings - naming

* Add code analysis

* Fix KBMPage and App dispatcher
Fix MessageBox - replace with MessageDialog

* Fix ImageResizerPage & mark ColorPickerButton with TODO

* Add icon to windows
Cleanup MainWindow.xaml.cs and OobeWindow.xaml.cs
MainWindows and OobeWindow management

* App Icon
No framework and runtime subdirs

* Remove PowerToys.Settings and Settings.UI from solution
Update output paths

* Installer work & publish.cmd

* Fix dispatcher crashes

* Fix crashes

* Add all dlls to installer
Cleanup installer
Add OpenOOBE and OpenScoobe logic
Fix minor issues
Fix update scenario - REINSTALLMODE

* Rename back namespaces, project name and project dir

* [wip] move to winappsdk 1.1

* Fix propagating isElevated & installer runtimes dlls

* Remove obsolete dir/file

* PowerToys.Interop to netstandard2.0

* Move everything to .Net6

* [Settings] Always launch settings process non-elevated (#17791)

* Move back to WinAppSdk 1.0.1

* Revert merge conflict ARM64 removal

* Fix KBM Browse overlay image button

* Bring back settings publish profile

* Update release.yml

* Change target frameworkd windows version

* [Setup] Add Windows Application Runtime SDK (#17809)

* Update requirements doc

* Update compiling docs

* Fix signing

* Fix Settings exe and dll versions

* Add exception for dlls that have version 1.0.0.0

* Fix powershell condition

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
2022-04-19 21:00:28 +01:00