Commit Graph

35 Commits

Author SHA1 Message Date
Jeremy Sinclair
57bde1c54c
[ARM64][Build] Prefer Arm64 Build Tools when building from Arm64 devices (#22792)
* Set PreferredToolArchitecture to arm64 if Arm64 processor
2022-12-15 18:40:29 -05:00
sosssego
e42bbaaaf7
[Analyzers][CPP] Turn on warning 4702 (#22285)
* Turn on 4702
unreachable code

* fix warnings that didnt show locally

* add comments about disable warnings

* improve comments

* changes from comments

* fix from PR comments
2022-12-12 17:21:48 +00: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
sosssego
febe1aa9a0
[Analyzers][CPP] Turn on warnings 26800, 28251, 6387 and 6248 (#22411) 2022-12-09 14:08:51 +00:00
sosssego
d8b92662ba
[Analyzers][CPP]Turn on warning 4505 (#22301)
* Turn on warning 4505
supress it in the fancyzone tests

* comment on disabled warnings

* improving comments

* change strategy to have less #pragma
2022-12-09 10:58:59 +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
sosssego
ca8faf00c2
Turn on warnings 6031, 26451, 28182 (#22240)
6031 - Return value ignored: 'called-function' could return unexpected value
26451 - Arithmetic overflow: Using operator 'operator' on a size-a byte value and then casting the result to a size-b byte value. Cast the value to the wider type before calling operator 'operator' to avoid overflow (io.2)
28182 - Dereferencing NULL pointer.
2022-11-29 15:01:27 +00:00
sosssego
6a6c45189e
[Analyzers][CPP] Turn on warning 4458 (#22265)
* Turn on warning 4458

Fix the errors by changing variable names and
supressing the warning on winRT GDI headers

* explaining the warning disables
2022-11-29 14:10:48 +00:00
sosssego
4a087a816e
[Analyzers][CPP] Turn on warning 4459 (#22234)
* Turn on warning 4459

* minor format
2022-11-29 12:41:57 +00:00
sosssego
0ed166eae2
[Analyzers][CPP] Turn on warning 4515 (#22226) 2022-11-23 18:35:16 +00:00
sosssego
c3ffd17e43
[Analyzers][CPP]Turn on warning 4389 (#22082) 2022-11-23 16:18:17 +00:00
sosssego
2074d32cb1
[Analyzers][CPP]Turn on warning 4701 (#22151) 2022-11-22 20:02:40 +00:00
sosssego
e50cd85e9a
[Analyzers][CPP]Turn on warning 4457 (#22149) 2022-11-22 19:10:46 +00:00
sosssego
e5f171c836
[Analyzers][CPP]Turn on warning 4456 (#22087) 2022-11-22 18:20:32 +00:00
sosssego
1cf4f08ae7
[Analyzers][CPP] Turn on warning 4245 (#22080) 2022-11-17 17:37:22 +00:00
sosssego
195c265a36
[CPP][Analyzers]Turn on warning 4244 (#22019)
* Turn on warning 4244

fix one occurrence of 4100

* changes from comments

* toupper on wchar
2022-11-17 16:24:56 +00:00
sosssego
b482188782
[Analyzers][CPP]Turn on Warning 4239 (#21588)
* Turn on warning 4239

* changes from comments
fix a 4100 that wasnt showing up before
2022-11-15 12:33:31 +00:00
sosssego
f408c34aca
[CPP][Analyzers] turn on warning 4189 (#21522)
* Turn on 4189 and fix code

* changes from PR comments
2022-11-14 22:15:58 +00:00
sosssego
a8d2aeedf2
[CPP][Analyzers]Turn on warning 4127 (#21516)
Fix an occurrence on a if changing it to if constexpr
2022-11-11 11:01:12 +00:00
sosssego
78f5b4c3a4
[Analyzers][CPP] turn on Warning 4100 (#21449)
* Analyzers CPP

Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.

* Analyzers C++ turn on warning 4706

Change Cpp.Build.props file to enable 4706
fix BugReportTool code to get rid of 4706

* Turn on warning 4100 and fix the code

* Follow c++ core guidelines

* Adapting to PR comments
2022-11-09 14:41:14 +00:00
sosssego
c51103404f
[Analyzers][CPP] turn on Warning 4706 (#21434)
* Analyzers CPP

Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.

* Analyzers C++ turn on warning 4706

Change Cpp.Build.props file to enable 4706
fix BugReportTool code to get rid of 4706

* disable 4706 for external code
2022-11-08 17:34:21 +00:00
sosssego
7a8c0bc6fb
[Analyzers][CPP] Warning level 4 (#21431)
Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.
2022-11-08 16:27:24 +00:00
sosssego
19c4255c7d
[Analyzers][CPP]Turn on C26451 and fix code (#21230)
* Turn on rule as error and fixing code

* Add packages to external include paths

* Disable warrnings on external code.
2022-10-25 17:33:23 +01:00
sosssego
982415f578
[build]Turn on C++ code analysis (#21085)
Using Cpp.Build.props to setup C++ code analysis as default.
Starting with a ruleset based on Microsoft Recomended Native rules. But changing all to info. Future pull request should change a rulr from info to warning and fix the code.
2022-10-16 13:49:52 +01:00
Andrey Nekrasov
9d7c9c1746
[Screen Ruler] Better error handling and reuse D3D device (#20223)
* [Screen Ruler] simplify lines calculation

* [Screen Ruler] Add inches and centimeters support

* [Chore] prefer x64 toolset to avoid hitting C1076

* [Screen Ruler] Allow making screenshots in non-continuous mode

* [Screen Ruler] Use single d3d device for all ops

* [Screen Ruler] remove gpu mutex and clean up screen capturing

* [Screen Ruler] handle and log DXGI initialization failure

* [Screen Ruler] Add unhandled exception handler

* [Screen Ruler] comment out Units of Measure setting

* [Screen Ruler] introduce a separate device dedicated for capturing
2022-09-05 15:39:56 +03: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
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
Jeremy Sinclair
665839637f
[ARM64] Common Projects configuration cleanup (#17813)
* Removed x64 specific conditions

* Added RuntimeIdentifiers and ensured Platforms aligned

* Removed x64 specific configuration and normalized PropertyGroup configuration

* Removed Platform conditions from ItemDefinition and Property Group

* Adding Project Configurations to PowerToys.Interop

* Updated solution config for common projects
2022-04-19 23:24:58 +01:00
Jeremy Sinclair
529bccc0bf
[ARM64] Main PT Solution configuration and props addition (#17563)
* Added ARM64 Platform to Directory.Build.props

* Added ARM64 project configuration for Cpp.Build.props

* Added ARM64 configuration to solution. Keeping at x64 for now
2022-04-07 10:48:05 +01:00
Clint Rutkas
c46ccce373
[build]Update to .net 6 framework and VS 2022 (#15741)
* Update release.yml

* Update ColorPickerUI.csproj

* Update release.yml

adding in .net6 sdk and moving stuff sooner

* Update release.yml

* Update release.yml

* fixing test

* Forcing vs17 and adding in .net 6 sdk

* forcing pool

* fixing issues in each pipeline

* moving release .net up

* fixing diff on agent version for nuget installer

* Removing system.text.json.dll as included now

* getting unit tests it looks like to work

* updating everythign to .net 6 minus wxs for runtime

* unit test still have

* getting 6.0 stuff up and going.  Terminal Unit tests have file max length issue ....

* found i think the last .net 5 issue

* looks like i wasn't aggressive enough with the 6.0 upgrade

* Getting stuff .net 6 buildable again

* tweaking with new stuff for installer

* Update newly added merged projects to .net 6

* Fix HeatDirectory bug on VS 2022

* Settings still needs JSON dependency

* Revert "getting 6.0 stuff up and going.  Terminal Unit tests have file max length issue ...."

This reverts commit b9cb4586dc.

* Update sln version

* supress obsolete warning, since this is not a new development

* Partially Revert "Getting stuff .net 6 buildable again"

This reverts commit 42b4201c6b.

* supress another obsolete warning, since this is not a new development

* Reduce the unit test project name to avoid MAX PATH in CI

* Upgrade project's toolset in the main solution

* Some TODOs to review HttpClient usage

* Upgrade project toolsets from other solutions

* Install .net 6 instead of .net 5

* Fix issue when disabling PowerToys Run on .net framework 6

* Update docs for Visual Studio 2022

* PR comments: manually upgrade missing VS 2019 references

* Discard no discard values to solve compiler warnings

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-02-07 14:08:30 +00:00
Stefan Markovic
5cfbd72fa8
[PowerRename] Fluent UX (#13678)
* PowerRename new UI

* Add scrollviewer

* Don't deploy PowerRenameUI_new

* Visual updates

* Visual updates

* Updates

* Update Resources.resw

* Added docs button

* Update MainWindow.xaml

* Wire Docs button

* RegEx -> regular expressions

* Update Show only renamed list on search/replace text changed

* Update Show only renamed list on search/replace text changed - proper fix
Set searchTerm to NULL when cleared - fix Show only renamed files on clear searchTerm

* Files/folders input error handling

* Fix renaming with keeping UI window opened

After renaming folder, all of it's children need path update.
Without path update, further renaming of children items would
fail.

* Update only children, not all items with greater depth

* Fix dictionary false positives

* Remove .NET dep

* Rename PowerRenameUI_new to PowerRenameUILib
Rename executable PowerRenameUIHost to PowerRename

Co-authored-by: Laute <Niels.Laute@philips.com>
2021-10-25 14:40:19 +01:00
Andrey Nekrasov
8c955ce9d6
[Build] Disable compilation warnings for external projects (#12309) 2021-07-12 13:35:57 +03:00
Andrey Nekrasov
4e23832d52
Add new VideoConference module for muting mic/cam (#11798)
* add new VideoConference module for muting mic/cam

Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2021-06-29 13:06:12 +03:00
Andrey Nekrasov
063e704321
build: Treat warnings as errors in the remaining projects (#8689)
* build: remove #pragma comment(lib

* build: treat warnings as errors for all src projects
2020-12-21 18:51:48 +03:00
Andrey Nekrasov
212ea2de30
common: refactor common library pt2 (#8588)
- remove common lib
- split settings, remove common-md
- move ipc interop/kb_layout to interop
- rename core -> settings, settings -> old_settings
- os-detect header-only; interop -> PowerToysInterop
- split notifications, move single-use headers where they're used
- winstore lib
- rename com utils
- rename Updating and Telemetry projects
- rename core -> settings-ui and remove examples folder
- rename settings-ui folder + consisent common/version include
2020-12-15 15:16:09 +03:00