mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-25 05:27:07 +01:00
Compare commits
3 Commits
dev/jaime/
...
0.87_relea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5259a1ba5e | ||
|
|
e314fc75df | ||
|
|
a38c4c8353 |
@@ -12,6 +12,7 @@ properties:
|
||||
id: vsPackage
|
||||
directives:
|
||||
description: Install Visual Studio 2022 Community (Any edition will work)
|
||||
allowPrerelease: true
|
||||
settings:
|
||||
id: Microsoft.VisualStudio.2022.Community
|
||||
source: winget
|
||||
|
||||
@@ -12,6 +12,7 @@ properties:
|
||||
id: vsPackage
|
||||
directives:
|
||||
description: Install Visual Studio 2022 Enterprise (Any edition will work)
|
||||
allowPrerelease: true
|
||||
settings:
|
||||
id: Microsoft.VisualStudio.2022.Enterprise
|
||||
source: winget
|
||||
|
||||
@@ -12,6 +12,7 @@ properties:
|
||||
id: vsPackage
|
||||
directives:
|
||||
description: Install Visual Studio 2022 Professional (Any edition will work)
|
||||
allowPrerelease: true
|
||||
settings:
|
||||
id: Microsoft.VisualStudio.2022.Professional
|
||||
source: winget
|
||||
|
||||
18
.github/actions/spell-check/allow/code.txt
vendored
18
.github/actions/spell-check/allow/code.txt
vendored
@@ -78,14 +78,7 @@ sinclairinat
|
||||
stylecop
|
||||
uipi
|
||||
yinwang
|
||||
myaccess
|
||||
onmicrosoft
|
||||
aep
|
||||
epsf
|
||||
howto
|
||||
onefuzzconfig
|
||||
oip
|
||||
onefuzzingestionpreparationtool
|
||||
|
||||
|
||||
# KEYS
|
||||
|
||||
@@ -253,12 +246,3 @@ pwa
|
||||
|
||||
AOT
|
||||
Aot
|
||||
|
||||
# YML
|
||||
onefuzz
|
||||
|
||||
# NameInCode
|
||||
leilzh
|
||||
|
||||
#Tools
|
||||
OIP
|
||||
|
||||
17
.github/actions/spell-check/allow/names.txt
vendored
17
.github/actions/spell-check/allow/names.txt
vendored
@@ -46,8 +46,6 @@ betsegaw
|
||||
bricelam
|
||||
bsky
|
||||
CCcat
|
||||
chenmy
|
||||
chemwolf
|
||||
Chinh
|
||||
chrdavis
|
||||
Chrzan
|
||||
@@ -65,7 +63,6 @@ Deondre
|
||||
DHowett
|
||||
ductdo
|
||||
Essey
|
||||
Feng
|
||||
ethanfangg
|
||||
ferraridavide
|
||||
frankychen
|
||||
@@ -81,7 +78,6 @@ gordon
|
||||
grzhan
|
||||
Guo
|
||||
hanselman
|
||||
haoliuu
|
||||
Harmath
|
||||
Heiko
|
||||
Hemmerlein
|
||||
@@ -96,7 +92,6 @@ Jaswal
|
||||
jefflord
|
||||
Jordi
|
||||
jyuwono
|
||||
kai
|
||||
Kairu
|
||||
Kamra
|
||||
Kantarci
|
||||
@@ -114,7 +109,6 @@ Markovic
|
||||
martinchrzan
|
||||
martinmoene
|
||||
Melman
|
||||
Mengyuan
|
||||
Mikhayelyan
|
||||
msft
|
||||
Mykhailo
|
||||
@@ -127,13 +121,11 @@ oldnewthing
|
||||
onegreatworld
|
||||
palenshus
|
||||
pedrolamas
|
||||
Peiyao
|
||||
peteblois
|
||||
phoboslab
|
||||
Ponten
|
||||
Pooja
|
||||
Pylyp
|
||||
Qingpeng
|
||||
quachpas
|
||||
Quriz
|
||||
randyrants
|
||||
@@ -162,23 +154,14 @@ Taras
|
||||
TBM
|
||||
tilovell
|
||||
Triet
|
||||
urnotdfs
|
||||
waaverecords
|
||||
wang
|
||||
Whuihuan
|
||||
Xiaofeng
|
||||
Xpg
|
||||
Yaqing
|
||||
yaqingmi
|
||||
ycv
|
||||
yeelam
|
||||
Yuniardi
|
||||
yuyoyuppe
|
||||
Zeol
|
||||
Zhao
|
||||
Zhaopeng
|
||||
zhaopy
|
||||
zhaoqpcn
|
||||
Zoltan
|
||||
Zykova
|
||||
|
||||
|
||||
8
.github/actions/spell-check/expect.txt
vendored
8
.github/actions/spell-check/expect.txt
vendored
@@ -645,7 +645,6 @@ imageresizerinput
|
||||
imageresizersettings
|
||||
imagingdevices
|
||||
ime
|
||||
Indo
|
||||
inetcpl
|
||||
Infobar
|
||||
INFOEXAMPLE
|
||||
@@ -741,7 +740,6 @@ LExit
|
||||
lhwnd
|
||||
LIBID
|
||||
lindex
|
||||
linkid
|
||||
LINKOVERLAY
|
||||
LINQTo
|
||||
listview
|
||||
@@ -755,7 +753,7 @@ lnks
|
||||
LOADFROMFILE
|
||||
LOBYTE
|
||||
LOCALDISPLAY
|
||||
localpackage
|
||||
LOCALPACKAGE
|
||||
LOCALSYSTEM
|
||||
LOCATIONCHANGE
|
||||
LOGFONT
|
||||
@@ -1214,7 +1212,6 @@ QUEUESYNC
|
||||
QUNS
|
||||
RAII
|
||||
RAlt
|
||||
randi
|
||||
Rasterize
|
||||
RAWINPUTDEVICE
|
||||
RAWINPUTHEADER
|
||||
@@ -1724,7 +1721,6 @@ WIC
|
||||
wifi
|
||||
wil
|
||||
winapi
|
||||
winappsdk
|
||||
wincodec
|
||||
Wincodecsdk
|
||||
wincolor
|
||||
@@ -1849,3 +1845,5 @@ zonable
|
||||
zoneset
|
||||
Zoneszonabletester
|
||||
zzz
|
||||
|
||||
|
||||
|
||||
2
.github/actions/spell-check/patterns.txt
vendored
2
.github/actions/spell-check/patterns.txt
vendored
@@ -131,7 +131,7 @@ _mm_(?!dd)\w+
|
||||
|
||||
# hit-count: 4 file-count: 4
|
||||
# microsoft
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|developer|docs|learn|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%#]*
|
||||
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|developer|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
|
||||
|
||||
aka\.ms/[a-zA-Z0-9]+
|
||||
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
Param(
|
||||
# Using the default value of 1.6 for winAppSdkVersionNumber and useExperimentalVersion as false
|
||||
[Parameter(Mandatory=$False,Position=1)]
|
||||
[string]$winAppSdkVersionNumber = "1.6",
|
||||
|
||||
# When the pipeline calls the PS1 file, the passed parameters are converted to string type
|
||||
[Parameter(Mandatory=$False,Position=2)]
|
||||
[boolean]$useExperimentalVersion = $False
|
||||
)
|
||||
|
||||
function Update-NugetConfig {
|
||||
param (
|
||||
[string]$filePath = "nuget.config"
|
||||
)
|
||||
|
||||
Write-Host "Updating nuget.config file"
|
||||
[xml]$xml = Get-Content -Path $filePath
|
||||
|
||||
# Add localpackages source into nuget.config
|
||||
$packageSourcesNode = $xml.configuration.packageSources
|
||||
$addNode = $xml.CreateElement("add")
|
||||
$addNode.SetAttribute("key", "localpackages")
|
||||
$addNode.SetAttribute("value", "localpackages")
|
||||
$packageSourcesNode.AppendChild($addNode) | Out-Null
|
||||
|
||||
# Remove <packageSourceMapping> tag and its content
|
||||
$packageSourceMappingNode = $xml.configuration.packageSourceMapping
|
||||
if ($packageSourceMappingNode) {
|
||||
$xml.configuration.RemoveChild($packageSourceMappingNode) | Out-Null
|
||||
}
|
||||
|
||||
# print nuget.config after modification
|
||||
$xml.OuterXml
|
||||
# Save the modified nuget.config file
|
||||
$xml.Save($filePath)
|
||||
}
|
||||
|
||||
$sourceLink = "https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json"
|
||||
|
||||
# Execute nuget list and capture the output
|
||||
if ($useExperimentalVersion) {
|
||||
# The nuget list for experimental versions will cost more time
|
||||
# So, we will not use -AllVersions to wast time
|
||||
# But it can only get the latest experimental version
|
||||
Write-Host "Fetching WindowsAppSDK with experimental versions"
|
||||
$nugetOutput = nuget list Microsoft.WindowsAppSDK `
|
||||
-Source $sourceLink `
|
||||
-Prerelease
|
||||
# Filter versions based on the specified version prefix
|
||||
$escapedVersionNumber = [regex]::Escape($winAppSdkVersionNumber)
|
||||
$filteredVersions = $nugetOutput | Where-Object { $_ -match "Microsoft.WindowsAppSDK $escapedVersionNumber\." }
|
||||
$latestVersions = $filteredVersions
|
||||
} else {
|
||||
Write-Host "Fetching stable WindowsAppSDK versions for $winAppSdkVersionNumber"
|
||||
$nugetOutput = nuget list Microsoft.WindowsAppSDK `
|
||||
-Source $sourceLink `
|
||||
-AllVersions
|
||||
# Filter versions based on the specified version prefix
|
||||
$escapedVersionNumber = [regex]::Escape($winAppSdkVersionNumber)
|
||||
$filteredVersions = $nugetOutput | Where-Object { $_ -match "Microsoft.WindowsAppSDK $escapedVersionNumber\." }
|
||||
$latestVersions = $filteredVersions | Sort-Object { [version]($_ -split ' ')[1] } -Descending | Select-Object -First 1
|
||||
}
|
||||
|
||||
Write-Host "Latest versions found: $latestVersions"
|
||||
# Extract the latest version number from the output
|
||||
$latestVersion = $latestVersions -split "`n" | `
|
||||
Select-String -Pattern 'Microsoft.WindowsAppSDK\s*([0-9]+\.[0-9]+\.[0-9]+-*[a-zA-Z0-9]*)' | `
|
||||
ForEach-Object { $_.Matches[0].Groups[1].Value } | `
|
||||
Sort-Object -Descending | `
|
||||
Select-Object -First 1
|
||||
|
||||
if ($latestVersion) {
|
||||
$WinAppSDKVersion = $latestVersion
|
||||
Write-Host "Extracted version: $WinAppSDKVersion"
|
||||
Write-Host "##vso[task.setvariable variable=WinAppSDKVersion]$WinAppSDKVersion"
|
||||
} else {
|
||||
Write-Host "Failed to extract version number from nuget list output"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Update packages.config files
|
||||
Get-ChildItem -Recurse packages.config | ForEach-Object {
|
||||
$content = Get-Content $_.FullName -Raw
|
||||
if ($content -match 'package id="Microsoft.WindowsAppSDK"') {
|
||||
$newVersionString = 'package id="Microsoft.WindowsAppSDK" version="' + $WinAppSDKVersion + '"'
|
||||
$oldVersionString = 'package id="Microsoft.WindowsAppSDK" version="[-.0-9a-zA-Z]*"'
|
||||
$content = $content -replace $oldVersionString, $newVersionString
|
||||
Set-Content -Path $_.FullName -Value $content
|
||||
Write-Host "Modified " $_.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Update Directory.Packages.props file
|
||||
$propsFile = "Directory.Packages.props"
|
||||
if (Test-Path $propsFile) {
|
||||
$content = Get-Content $propsFile -Raw
|
||||
if ($content -match '<PackageVersion Include="Microsoft.WindowsAppSDK"') {
|
||||
$newVersionString = '<PackageVersion Include="Microsoft.WindowsAppSDK" Version="' + $WinAppSDKVersion + '" />'
|
||||
$oldVersionString = '<PackageVersion Include="Microsoft.WindowsAppSDK" Version="[-.0-9a-zA-Z]*" />'
|
||||
$content = $content -replace $oldVersionString, $newVersionString
|
||||
Set-Content -Path $propsFile -Value $content
|
||||
Write-Host "Modified " $propsFile
|
||||
}
|
||||
}
|
||||
|
||||
# Update .vcxproj files
|
||||
Get-ChildItem -Recurse *.vcxproj | ForEach-Object {
|
||||
$content = Get-Content $_.FullName -Raw
|
||||
if ($content -match '\\Microsoft.WindowsAppSDK.') {
|
||||
$newVersionString = '\Microsoft.WindowsAppSDK.' + $WinAppSDKVersion + '\'
|
||||
$oldVersionString = '\\Microsoft.WindowsAppSDK.[-.0-9a-zA-Z]*\\'
|
||||
$content = $content -replace $oldVersionString, $newVersionString
|
||||
Set-Content -Path $_.FullName -Value $content
|
||||
Write-Host "Modified " $_.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Update .csproj files
|
||||
Get-ChildItem -Recurse *.csproj | ForEach-Object {
|
||||
$content = Get-Content $_.FullName -Raw
|
||||
if ($content -match 'PackageReference Include="Microsoft.WindowsAppSDK"') {
|
||||
$newVersionString = 'PackageReference Include="Microsoft.WindowsAppSDK" Version="'+ $WinAppSDKVersion + '"'
|
||||
$oldVersionString = 'PackageReference Include="Microsoft.WindowsAppSDK" Version="[-.0-9a-zA-Z]*"'
|
||||
$content = $content -replace $oldVersionString, $newVersionString
|
||||
Set-Content -Path $_.FullName -Value $content
|
||||
Write-Host "Modified " $_.FullName
|
||||
}
|
||||
}
|
||||
|
||||
Update-NugetConfig
|
||||
@@ -1,42 +0,0 @@
|
||||
trigger: none
|
||||
pr: none
|
||||
schedules:
|
||||
- cron: "0 0 * * *" # every day at midnight
|
||||
displayName: "Daily midnight Build"
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: false # only run if there's code changes!
|
||||
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
|
||||
parameters:
|
||||
- name: buildPlatforms
|
||||
type: object
|
||||
default:
|
||||
- x64
|
||||
- arm64
|
||||
- name: enableMsBuildCaching
|
||||
type: boolean
|
||||
displayName: "Enable MSBuild Caching"
|
||||
default: false
|
||||
- name: runTests
|
||||
type: boolean
|
||||
displayName: "Run Tests"
|
||||
default: true
|
||||
- name: useVSPreview
|
||||
type: boolean
|
||||
displayName: "Build Using Visual Studio Preview"
|
||||
default: false
|
||||
- name: useLatestWebView2
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
extends:
|
||||
template: templates/pipeline-ci-build.yml
|
||||
parameters:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
|
||||
runTests: ${{ parameters.runTests }}
|
||||
useVSPreview: ${{ parameters.useVSPreview }}
|
||||
useLatestWebView2: ${{ parameters.useLatestWebView2 }}
|
||||
@@ -1,50 +0,0 @@
|
||||
trigger: none
|
||||
pr: none
|
||||
schedules:
|
||||
- cron: "0 0 * * *" # every day at midnight
|
||||
displayName: "Daily midnight Build"
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: false # only run if there's code changes!
|
||||
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
|
||||
parameters:
|
||||
- name: buildPlatforms
|
||||
type: object
|
||||
default:
|
||||
- x64
|
||||
- arm64
|
||||
- name: enableMsBuildCaching
|
||||
type: boolean
|
||||
displayName: "Enable MSBuild Caching"
|
||||
default: false
|
||||
- name: runTests
|
||||
type: boolean
|
||||
displayName: "Run Tests"
|
||||
default: true
|
||||
- name: useVSPreview
|
||||
type: boolean
|
||||
displayName: "Build Using Visual Studio Preview"
|
||||
default: false
|
||||
- name: useLatestWinAppSDK
|
||||
type: boolean
|
||||
default: true
|
||||
- name: winAppSDKVersionNumber
|
||||
type: string
|
||||
default: 1.6
|
||||
- name: useExperimentalVersion
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
extends:
|
||||
template: templates/pipeline-ci-build.yml
|
||||
parameters:
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
|
||||
runTests: ${{ parameters.runTests }}
|
||||
useVSPreview: ${{ parameters.useVSPreview }}
|
||||
useLatestWinAppSDK: ${{ parameters.useLatestWinAppSDK }}
|
||||
winAppSDKVersionNumber: ${{ parameters.winAppSDKVersionNumber }}
|
||||
useExperimentalVersion: ${{ parameters.useExperimentalVersion }}
|
||||
@@ -1,55 +0,0 @@
|
||||
pr: none
|
||||
trigger: none
|
||||
|
||||
schedules:
|
||||
- cron: "0 0 * * 1"
|
||||
displayName: Weekly fuzzing submission
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
|
||||
parameters:
|
||||
- name: platform
|
||||
type: string
|
||||
default: x64 # for fuzzing, we only use x64 for now
|
||||
- name: enableMsBuildCaching
|
||||
type: boolean
|
||||
displayName: "Enable MSBuild Caching"
|
||||
default: false
|
||||
- name: useVSPreview
|
||||
type: boolean
|
||||
displayName: "Build Using Visual Studio Preview"
|
||||
default: false
|
||||
|
||||
stages:
|
||||
- stage: Build_${{ parameters.platform }}
|
||||
displayName: Build ${{ parameters.platform }}
|
||||
jobs:
|
||||
- template: templates/job-build-project.yml
|
||||
parameters:
|
||||
pool:
|
||||
${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
|
||||
name: SHINE-INT-L
|
||||
${{ else }}:
|
||||
name: SHINE-OSS-L
|
||||
${{ if eq(parameters.useVSPreview, true) }}:
|
||||
demands: ImageOverride -equals SHINE-VS17-Preview
|
||||
buildPlatforms:
|
||||
- ${{ parameters.platform }}
|
||||
buildConfigurations: [Release]
|
||||
enablePackageCaching: true
|
||||
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
|
||||
runTests: true
|
||||
useVSPreview: ${{ parameters.useVSPreview }}
|
||||
|
||||
- stage: OneFuzz
|
||||
displayName: Fuzz ${{ parameters.platform }}
|
||||
dependsOn:
|
||||
- Build_${{parameters.platform}}
|
||||
jobs:
|
||||
- template: templates/job-fuzz.yml
|
||||
parameters:
|
||||
platform: ${{ parameters.platform }}
|
||||
configuration: Release
|
||||
@@ -56,15 +56,6 @@ parameters:
|
||||
- name: versionNumber
|
||||
type: string
|
||||
default: '0.0.1'
|
||||
- name: useLatestWinAppSDK
|
||||
type: boolean
|
||||
default: false
|
||||
- name: winAppSDKVersionNumber
|
||||
type: string
|
||||
default: 1.6
|
||||
- name: useExperimentalVersion
|
||||
type: boolean
|
||||
default: false
|
||||
- name: csProjectsToPublish
|
||||
type: object
|
||||
default:
|
||||
@@ -111,10 +102,6 @@ jobs:
|
||||
${{ else }}:
|
||||
MSBuildMainBuildTargets: Build
|
||||
${{ insert }}: ${{ parameters.variables }}
|
||||
${{ if eq(parameters.useLatestWinAppSDK, true) }}:
|
||||
RestoreAdditionalProjectSourcesArg: '/p:RestoreAdditionalProjectSources="$(Build.SourcesDirectory)\localpackages\NugetPackages"'
|
||||
${{ else }}:
|
||||
RestoreAdditionalProjectSourcesArg: ''
|
||||
displayName: Build
|
||||
timeoutInMinutes: 240
|
||||
cancelTimeoutInMinutes: 1
|
||||
@@ -147,11 +134,6 @@ jobs:
|
||||
sdk: true
|
||||
version: '6.0'
|
||||
|
||||
- template: steps-ensure-dotnet-version.yml
|
||||
parameters:
|
||||
sdk: true
|
||||
version: '8.0'
|
||||
|
||||
- template: steps-ensure-dotnet-version.yml
|
||||
parameters:
|
||||
sdk: true
|
||||
@@ -195,15 +177,8 @@ jobs:
|
||||
"packages.config" | "$(Agent.OS)"
|
||||
"packages.config"
|
||||
path: packages
|
||||
|
||||
- ${{ if eq(parameters.useLatestWinAppSDK, true)}}:
|
||||
- template: .\steps-update-winappsdk-and-restore-nuget.yml
|
||||
parameters:
|
||||
versionNumber: ${{ parameters.winAppSDKVersionNumber }}
|
||||
useExperimentalVersion: ${{ parameters.useExperimentalVersion }}
|
||||
|
||||
- ${{ if eq(parameters.useLatestWinAppSDK, false)}}:
|
||||
- template: .\steps-restore-nuget.yml
|
||||
|
||||
- template: .\steps-restore-nuget.yml
|
||||
|
||||
- pwsh: |-
|
||||
& "$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1"
|
||||
@@ -234,7 +209,6 @@ jobs:
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
$(MSBuildCacheParameters)
|
||||
/t:$(MSBuildMainBuildTargets)
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
@@ -259,11 +233,10 @@ jobs:
|
||||
inputs:
|
||||
solution: '**\HostsUILib.csproj'
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: >-
|
||||
/p:CIBuild=true;NoBuild=true -t:pack
|
||||
/bl:$(LogOutputDirectory)\build-hosts.binlog
|
||||
/p:NoWarn=NU5104
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
${{ if eq(parameters.useVSPreview, true) }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-hosts.binlog /p:NoWarn=NU5104
|
||||
${{ else }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-hosts.binlog
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
maximumCpuCount: true
|
||||
@@ -276,11 +249,10 @@ jobs:
|
||||
inputs:
|
||||
solution: '**\EnvironmentVariablesUILib.csproj'
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: >-
|
||||
/p:CIBuild=true;NoBuild=true -t:pack
|
||||
/bl:$(LogOutputDirectory)\build-env-var-editor.binlog
|
||||
/p:NoWarn=NU5104
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
${{ if eq(parameters.useVSPreview, true) }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-env-var-editor.binlog /p:NoWarn=NU5104
|
||||
${{ else }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-env-var-editor.binlog
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
maximumCpuCount: true
|
||||
@@ -293,11 +265,10 @@ jobs:
|
||||
inputs:
|
||||
solution: '**\RegistryPreviewUILib.csproj'
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: >-
|
||||
/p:CIBuild=true;NoBuild=true -t:pack
|
||||
/bl:$(LogOutputDirectory)\build-registry-preview.binlog
|
||||
/p:NoWarn=NU5104
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
${{ if eq(parameters.useVSPreview, true) }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-registry-preview.binlog /p:NoWarn=NU5104
|
||||
${{ else }}:
|
||||
msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-registry-preview.binlog
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
maximumCpuCount: true
|
||||
@@ -352,7 +323,6 @@ jobs:
|
||||
/bl:$(LogOutputDirectory)\build-bug-report.binlog
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
$(MSBuildCacheParameters)
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
@@ -373,7 +343,6 @@ jobs:
|
||||
/bl:$(LogOutputDirectory)\build-webcam-report.binlog
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
$(MSBuildCacheParameters)
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
@@ -394,7 +363,6 @@ jobs:
|
||||
/bl:$(LogOutputDirectory)\build-styles-report.binlog
|
||||
${{ parameters.additionalBuildOptions }}
|
||||
$(MSBuildCacheParameters)
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
@@ -417,7 +385,6 @@ jobs:
|
||||
/p:PowerToysRoot=$(Build.SourcesDirectory)
|
||||
/p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
/bl:$(LogOutputDirectory)\publish-${{ join('_',split(project, '/')) }}.binlog
|
||||
$(RestoreAdditionalProjectSourcesArg)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
msbuildArchitecture: x64
|
||||
@@ -447,11 +414,9 @@ jobs:
|
||||
& '.pipelines/verifyPossibleAssetConflicts.ps1' -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)\WinUI3Apps'
|
||||
displayName: Audit WinAppSDK applications path asset conflicts
|
||||
|
||||
# To streamline the pipeline and prevent errors, skip this step during compatibility tests with the latest WinAppSDK.
|
||||
- ${{ if eq(parameters.useLatestWinAppSDK, false) }}:
|
||||
- pwsh: |-
|
||||
& '.pipelines/verifyNoticeMdAgainstNugetPackages.ps1' -path '$(build.sourcesdirectory)\'
|
||||
displayName: Verify NOTICE.md and NuGet packages match
|
||||
- pwsh: |-
|
||||
& '.pipelines/verifyNoticeMdAgainstNugetPackages.ps1' -path '$(build.sourcesdirectory)\'
|
||||
displayName: Verify NOTICE.md and NuGet packages match
|
||||
|
||||
- ${{ if eq(parameters.runTests, true) }}:
|
||||
# Publish test results which ran in MSBuild
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
parameters:
|
||||
- name: configuration
|
||||
type: string
|
||||
default: "Release"
|
||||
- name: platform
|
||||
type: string
|
||||
default: ""
|
||||
- name: inputArtifactStem
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
- job: OneFuzz
|
||||
pool:
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
ArtifactName: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: false
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
fetchTags: false
|
||||
|
||||
- download: current
|
||||
displayName: Download artifacts
|
||||
artifact: $(ArtifactName)
|
||||
patterns: |-
|
||||
**/tests/*.FuzzTests/**
|
||||
|
||||
- task: onefuzz-task@0
|
||||
inputs:
|
||||
onefuzzOSes: Windows
|
||||
env:
|
||||
onefuzzDropDirectory: $(Pipeline.Workspace)\$(ArtifactName)\x64\Release\x64\Release\tests
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
@@ -8,9 +8,6 @@ parameters:
|
||||
- name: inputArtifactStem
|
||||
type: string
|
||||
default: ""
|
||||
- name: useLatestWebView2
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
- job: Test${{ parameters.platform }}${{ parameters.configuration }}
|
||||
@@ -37,29 +34,6 @@ jobs:
|
||||
fetchDepth: 1
|
||||
fetchTags: false
|
||||
|
||||
- ${{ if eq(parameters.useLatestWebView2, true) }}:
|
||||
- powershell: |
|
||||
$edge_url = 'https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en'
|
||||
$timeout = New-TimeSpan -Minutes 6
|
||||
$timeoutSeconds = [int]$timeout.TotalSeconds
|
||||
$command = {
|
||||
Invoke-WebRequest -Uri $using:edge_url -OutFile $(Pipeline.Workspace)\MicrosoftEdgeSetup.exe
|
||||
Write-Host "##[command]Installing Canary channel of Microsoft Edge"
|
||||
Start-Process $(Pipeline.Workspace)\MicrosoftEdgeSetup.exe -ArgumentList '/silent /install' -Wait
|
||||
}
|
||||
|
||||
$job = Start-Job -ScriptBlock $command
|
||||
Wait-Job $job -Timeout $timeoutSeconds
|
||||
if ($job.State -eq "Running") {
|
||||
Stop-Job $job
|
||||
Write-Host "##[warning]The job was stopped because it exceeded the time limit."
|
||||
}
|
||||
displayName: "Install the latest MSEdge Canary"
|
||||
|
||||
- script:
|
||||
reg add "HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels" /v PowerToys.exe /t REG_SZ /d "3"
|
||||
displayName: "Enable WebView2 Canary Channel"
|
||||
|
||||
- download: current
|
||||
displayName: Download artifacts
|
||||
artifact: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}
|
||||
|
||||
@@ -22,18 +22,6 @@ parameters:
|
||||
- name: useVSPreview
|
||||
type: boolean
|
||||
default: false
|
||||
- name: useLatestWebView2
|
||||
type: boolean
|
||||
default: false
|
||||
- name: useLatestWinAppSDK
|
||||
type: boolean
|
||||
default: false
|
||||
- name: winAppSDKVersionNumber
|
||||
type: string
|
||||
default: 1.6
|
||||
- name: useExperimentalVersion
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
stages:
|
||||
# Allow manual builds to skip pre-check
|
||||
@@ -67,10 +55,6 @@ stages:
|
||||
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
|
||||
runTests: ${{ parameters.runTests }}
|
||||
useVSPreview: ${{ parameters.useVSPreview }}
|
||||
useLatestWinAppSDK: ${{ parameters.useLatestWinAppSDK }}
|
||||
${{ if eq(parameters.useLatestWinAppSDK, true) }}:
|
||||
winAppSDKVersionNumber: ${{ parameters.winAppSDKVersionNumber }}
|
||||
useExperimentalVersion: ${{ parameters.useExperimentalVersion }}
|
||||
|
||||
- ${{ if eq(parameters.runTests, true) }}:
|
||||
- stage: Test_${{ platform }}
|
||||
@@ -82,4 +66,3 @@ stages:
|
||||
parameters:
|
||||
platform: ${{ platform }}
|
||||
configuration: Release
|
||||
useLatestWebView2: ${{ parameters.useLatestWebView2 }}
|
||||
|
||||
@@ -16,10 +16,6 @@ parameters:
|
||||
steps:
|
||||
- pwsh: |-
|
||||
curl.exe -J -L -O "https://dot.net/v1/dotnet-install.ps1"
|
||||
if (-not (Test-Path dotnet-install.ps1)) {
|
||||
Write-Error "Failed to download dotnet-install.ps1"
|
||||
exit 1
|
||||
}
|
||||
$NEW_DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet"
|
||||
& ./dotnet-install.ps1 -Channel "${{parameters.version}}" -InstallDir $NEW_DOTNET_ROOT
|
||||
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]${NEW_DOTNET_ROOT}"
|
||||
@@ -29,4 +25,3 @@ steps:
|
||||
displayName: "Install .NET ${{parameters.version}} SDK"
|
||||
${{ else }}:
|
||||
displayName: "Install .NET ${{parameters.version}}"
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
parameters:
|
||||
- name: versionNumber
|
||||
type: string
|
||||
default: 1.6
|
||||
- name: useExperimentalVersion
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- task: NuGetAuthenticate@1
|
||||
displayName: 'NuGet Authenticate'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Update WinAppSDK Versions
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\UpdateVersions.ps1'
|
||||
arguments: >
|
||||
-winAppSdkVersionNumber ${{ parameters.versionNumber }}
|
||||
-useExperimentalVersion $${{ parameters.useExperimentalVersion }}
|
||||
|
||||
- script: echo $(WinAppSDKVersion)
|
||||
displayName: 'Display WinAppSDK Version Found'
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download WindowsAppSDK'
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d'
|
||||
definition: '104083'
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/release/${{ parameters.versionNumber }}-stable'
|
||||
artifactName: 'WindowsAppSDK_Nuget_And_MSIX'
|
||||
targetPath: '$(Build.SourcesDirectory)\localpackages'
|
||||
|
||||
- script: dir $(Build.SourcesDirectory)\localpackages\NugetPackages
|
||||
displayName: 'List downloaded packages'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Install WindowsAppSDK'
|
||||
inputs:
|
||||
command: 'custom'
|
||||
arguments: >
|
||||
install "Microsoft.WindowsAppSDK"
|
||||
-Source "$(Build.SourcesDirectory)\localpackages\NugetPackages"
|
||||
-Version "$(WinAppSDKVersion)"
|
||||
-OutputDirectory "$(Build.SourcesDirectory)\localpackages\output"
|
||||
-FallbackSource "https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json"
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Restore NuGet packages'
|
||||
inputs:
|
||||
command: 'restore'
|
||||
feedsToUse: 'config'
|
||||
nugetConfigPath: '$(build.sourcesdirectory)\nuget.config'
|
||||
restoreSolution: '$(build.sourcesdirectory)\**\*.sln'
|
||||
includeNuGetOrg: false
|
||||
@@ -15,7 +15,7 @@ Param(
|
||||
$referencedFileVersionsPerDll = @{}
|
||||
$totalFailures = 0
|
||||
|
||||
Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZones*,MouseJump.Common.UnitTests*,AdvancedPaste.FuzzTests* | ForEach-Object {
|
||||
Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZones*,MouseJump.Common.UnitTests* | ForEach-Object {
|
||||
# Temporarily exclude FancyZones UI tests because of Appium.WebDriver dependencies
|
||||
$depsJsonFullFileName = $_.FullName
|
||||
$depsJsonFileName = $_.Name
|
||||
|
||||
@@ -181,14 +181,6 @@ Other contributors:
|
||||
- [@shuaiyuanxx](https://github.com/shuaiyuanxx) - Shawn Yuan - Dev
|
||||
- [@moooyo](https://github.com/moooyo) - Yu Leng - Dev
|
||||
- [@haoliuu](https://github.com/haoliuu) - Hao Liu - Dev
|
||||
- [@chenmy77](https://github.com/chenmy77) - Mengyuan Chen - Dev
|
||||
- [@chemwolf6922](https://github.com/chemwolf6922) - Feng Wang - Dev
|
||||
- [@yaqingmi](https://github.com/yaqingmi) - Yaqing Mi - Dev
|
||||
- [@zhaoqpcn](https://github.com/zhaoqpcn) - Qingpeng Zhao - Dev
|
||||
- [@urnotdfs](https://github.com/urnotdfs) - Xiaofeng Wang - Dev
|
||||
- [@zhaopy536](https://github.com/zhaopy536) - Peiyao Zhao - Dev
|
||||
- [@wang563681252](https://github.com/wang563681252) - Zhaopeng Wang - Dev
|
||||
- [@vanzue](https://github.com/vanzue) - Kai Tao - Dev
|
||||
|
||||
# Former PowerToys core team members
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<PackageVersion Include="hyjiacan.pinyin4net" Version="4.1.1" />
|
||||
<PackageVersion Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" />
|
||||
<PackageVersion Include="LazyCache" Version="2.4.0" />
|
||||
<PackageVersion Include="Mages" Version="3.0.0" />
|
||||
<PackageVersion Include="Mages" Version="2.0.2" />
|
||||
<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
|
||||
<!-- Including MessagePack to force version, since it's used by StreamJsonRpc but contains vulnerabilities. After StreamJsonRpc updates the version of MessagePack, we can upgrade StreamJsonRpc instead. -->
|
||||
<PackageVersion Include="MessagePack" Version="2.5.187" />
|
||||
|
||||
@@ -1315,7 +1315,7 @@ EXHIBIT A -Mozilla Public License.
|
||||
- hyjiacan.pinyin4net 4.1.1
|
||||
- Interop.Microsoft.Office.Interop.OneNote 1.1.0.2
|
||||
- LazyCache 2.4.0
|
||||
- Mages 3.0.0
|
||||
- Mages 2.0.2
|
||||
- Markdig.Signed 0.34.0
|
||||
- MessagePack 2.5.187
|
||||
- Microsoft.Bcl.AsyncInterfaces 9.0.0
|
||||
|
||||
@@ -179,7 +179,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
src\Monaco.props = src\Monaco.props
|
||||
src\Solution.props = src\Solution.props
|
||||
Solution.props = Solution.props
|
||||
src\Version.props = src\Version.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@@ -637,8 +637,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewPlus.ShellExtension.win1
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.UnitTests", "src\modules\AdvancedPaste\AdvancedPaste.UnitTests\AdvancedPaste.UnitTests.csproj", "{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.FuzzTests", "src\modules\AdvancedPaste\AdvancedPaste.FuzzTests\AdvancedPaste.FuzzTests.csproj", "{7F5B9557-5878-4438-A721-3E28296BA193}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
@@ -2823,18 +2821,6 @@ Global
|
||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Release|x64.Build.0 = Release|x64
|
||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Release|x86.ActiveCfg = Release|x64
|
||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Release|x86.Build.0 = Release|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|x64.Build.0 = Debug|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Debug|x86.Build.0 = Debug|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|x64.ActiveCfg = Release|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|x64.Build.0 = Release|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|x86.ActiveCfg = Release|x64
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -3069,7 +3055,6 @@ Global
|
||||
{89D0E199-B17A-418C-B2F8-7375B6708357} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
|
||||
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E} = {CA716AE6-FE5C-40AC-BB8F-2C87912687AC}
|
||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
||||
{7F5B9557-5878-4438-A721-3E28296BA193} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
||||
|
||||
18
README.md
18
README.md
@@ -42,17 +42,17 @@ Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and cl
|
||||
<!-- items that need to be updated release to release -->
|
||||
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.88%22
|
||||
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.87%22
|
||||
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.1/PowerToysUserSetup-0.87.1-x64.exe
|
||||
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.1/PowerToysUserSetup-0.87.1-arm64.exe
|
||||
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.1/PowerToysSetup-0.87.1-x64.exe
|
||||
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.1/PowerToysSetup-0.87.1-arm64.exe
|
||||
|
||||
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.0/PowerToysUserSetup-0.87.0-x64.exe
|
||||
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.0/PowerToysUserSetup-0.87.0-arm64.exe
|
||||
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.0/PowerToysSetup-0.87.0-x64.exe
|
||||
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.87.0/PowerToysSetup-0.87.0-arm64.exe
|
||||
|
||||
| Description | Filename | sha256 hash |
|
||||
|----------------|----------|-------------|
|
||||
| Per user - x64 | [PowerToysUserSetup-0.87.1-x64.exe][ptUserX64] | 8EFAF47ED00BF230D2C2CC3CB6765C903A6A47E0AAED0BBB329CEF918207B486 |
|
||||
| Per user - ARM64 | [PowerToysUserSetup-0.87.1-arm64.exe][ptUserArm64] | 212FC8055789BD2DC4DE554B9AEE291A9C077907E263A302939266263A9D512B |
|
||||
| Machine wide - x64 | [PowerToysSetup-0.87.1-x64.exe][ptMachineX64] | 69AD65DDAC6436AEF292D2CC6AB1530021CE98083CB3F5FD3380A52A3B0DBB9A |
|
||||
| Machine wide - ARM64 | [PowerToysSetup-0.87.1-arm64.exe][ptMachineArm64] | AEC9F1D02F1E23F0C1FCFDF95C337C962902394F44C0568012DF78BEDB45CF19 |
|
||||
| Per user - x64 | [PowerToysUserSetup-0.87.0-x64.exe][ptUserX64] | A6549B8D78985CC995F091624D1A2B70907CAC8954334C1CAF61D26EBCF8A449 |
|
||||
| Per user - ARM64 | [PowerToysUserSetup-0.87.0-arm64.exe][ptUserArm64] | 3557D4F35AA52571334712A48F51D116F389FA8C43C6B27FE321A7525067E7AE |
|
||||
| Machine wide - x64 | [PowerToysSetup-0.87.0-x64.exe][ptMachineX64] | 600CDC7F9AC296AA8B554CA34A0C7EA2D9B1E7E8E41BD096840851B416E63A3C |
|
||||
| Machine wide - ARM64 | [PowerToysSetup-0.87.0-arm64.exe][ptMachineArm64] | 387B5BF1BD923BDA215D7DF1D82A197AE12CD91A71A73267768E26757F7A5FE6 |
|
||||
|
||||
This is our preferred method.
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
||||
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
|
||||
<Import Project="..\..\Monaco.props" />
|
||||
<Import Project="..\..\Common.Dotnet.AotCompatibility.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>PowerToys FilePreviewCommon</Description>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters;
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(JsonDocument))]
|
||||
internal sealed partial class FilePreviewJsonSerializerContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters
|
||||
|
||||
private static readonly JsonSerializerOptions _serializerOptions = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
};
|
||||
|
||||
@@ -27,8 +28,7 @@ namespace Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters
|
||||
|
||||
using (var jDocument = JsonDocument.Parse(value, new JsonDocumentOptions { CommentHandling = JsonCommentHandling.Skip }))
|
||||
{
|
||||
FilePreviewJsonSerializerContext context = new(_serializerOptions);
|
||||
return JsonSerializer.Serialize(jDocument, context.JsonDocument);
|
||||
return JsonSerializer.Serialize(jDocument, _serializerOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters;
|
||||
|
||||
namespace Microsoft.PowerToys.FilePreviewCommon
|
||||
@@ -36,15 +38,15 @@ namespace Microsoft.PowerToys.FilePreviewCommon
|
||||
|
||||
private static string GetRuntimeMonacoDirectory()
|
||||
{
|
||||
string baseDirectory = AppContext.BaseDirectory ?? string.Empty;
|
||||
string exePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
|
||||
|
||||
// If the executable is within "WinUI3Apps", correct the path first.
|
||||
if (Path.GetFileName(baseDirectory) == "WinUI3Apps")
|
||||
if (Path.GetFileName(exePath) == "WinUI3Apps")
|
||||
{
|
||||
baseDirectory = Path.Combine(baseDirectory, "..");
|
||||
exePath = Path.Combine(exePath, "..");
|
||||
}
|
||||
|
||||
string monacoPath = Path.Combine(baseDirectory, "Assets", "Monaco");
|
||||
string monacoPath = Path.Combine(exePath, "Assets", "Monaco");
|
||||
|
||||
return Directory.Exists(monacoPath) ?
|
||||
monacoPath :
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\tests\AdvancedPaste.FuzzTests\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\AdvancedPaste\Helpers\JsonHelper.cs" Link="JsonHelper.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MSTest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="OneFuzzConfig.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,45 +0,0 @@
|
||||
# Fuzzing .NET Code with OneFuzz
|
||||
|
||||
This document explains the purpose of the project, the rationale for using specific technologies, and key instructions for fuzz testing .NET code using OneFuzz.
|
||||
|
||||
## Overview
|
||||
|
||||
This project demonstrates fuzz testing for .NET applications. It uses a `.NET 8 (Windows)` project where a code file is linked to the project. The linked file contains the functions required for fuzz testing.
|
||||
|
||||
## Why Use .NET 8 (Windows)?
|
||||
|
||||
1. **Current Support**: At the time of writing, OneFuzz supports only .NET 8 projects. The Fuzz team is actively working on .NET 9 support.
|
||||
2. **Interim Solution**: Until .NET 9 support is available, .NET 8 serves as a robust and temporary solution for fuzz testing, enabling direct code linking for efficient development.
|
||||
|
||||
## Requesting Access
|
||||
|
||||
To log into the production instance of OneFuzz with the CLI, you **must request access**. Visit the internal [OneFuzz Access Request Page](https://myaccess.microsoft.com/@microsoft.onmicrosoft.com#/access-packages/6df691eb-e3d1-444b-b4b2-9e944dc794be) for details.
|
||||
|
||||
## How to Fuzz .NET Code
|
||||
|
||||
To set up and run fuzz testing on .NET code, follow the detailed guide available [Fuzz .NET Code](https://eng.ms/docs/cloud-ai-platform/azure-edge-platform-aep/aep-security/epsf-edge-and-platform-security-fundamentals/the-onefuzz-service/onefuzz/howto/fuzzing-dotnet-code).
|
||||
|
||||
## Running a .NET Fuzz Target Locally
|
||||
|
||||
Testing a .NET fuzz target locally requires specific configurations. For a step-by-step guide, see the section on [Running a .NET Fuzz Target Locally](https://eng.ms/docs/cloud-ai-platform/azure-edge-platform-aep/aep-security/epsf-edge-and-platform-security-fundamentals/the-onefuzz-service/onefuzz/howto/fuzzing-dotnet-code#extra-running-a-net-fuzz-target-locally).
|
||||
|
||||
## Writing a Good OneFuzzConfig.json
|
||||
|
||||
The `OneFuzzConfig.json` file provides critical information for deploying fuzzing jobs using the OneFuzz Ingestion Preparation Tool and Ingestion Service.
|
||||
|
||||
### Structure
|
||||
|
||||
The primary structure is an array of configuration entries. Outside the array, the `configVersion` field is used to track changes to the configuration schema.
|
||||
|
||||
For more details on how to write and structure this file, see the [OneFuzzConfig V3 Documentation](https://eng.ms/docs/cloud-ai-platform/azure-edge-platform-aep/aep-security/epsf-edge-and-platform-security-fundamentals/the-onefuzz-service/onefuzz/onefuzzconfig/onefuzzconfigv3).
|
||||
|
||||
## Tools
|
||||
|
||||
### OneFuzz Ingestion Preparation (OIP) Tool
|
||||
|
||||
The OIP tool helps prepare data for ingestion and fuzz testing. Learn more about [OneFuzz Ingestion Preparation (OIP) Tool](https://eng.ms/docs/cloud-ai-platform/azure-edge-platform-aep/aep-security/epsf-edge-and-platform-security-fundamentals/the-onefuzz-service/onefuzz/oip/onefuzzingestionpreparationtool).
|
||||
|
||||
### OneFuzz CLI
|
||||
|
||||
The CLI provides commands to manage and execute fuzzing jobs. Download and set up the CLI by following this [guide](https://eng.ms/docs/cloud-ai-platform/azure-edge-platform-aep/aep-security/epsf-edge-and-platform-security-fundamentals/the-onefuzz-service/onefuzz/howto/downloading-cli).
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using AdvancedPaste.Helpers;
|
||||
using Windows.ApplicationModel.DataTransfer;
|
||||
|
||||
// OneFuzz currently does not support .NET 9 code testing, so this is a temporary solution.
|
||||
// Create a .NET 8 project and use a file link to include the code for testing first.
|
||||
namespace AdvancedPaste.FuzzTests
|
||||
{
|
||||
public class FuzzTests
|
||||
{
|
||||
public static void FuzzToJsonFromXmlOrCsv(ReadOnlySpan<byte> input)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataPackage = new DataPackage();
|
||||
dataPackage.SetText(input.ToString());
|
||||
_ = Task.Run(async () => await JsonHelper.ToJsonFromXmlOrCsvAsync(dataPackage.GetView())).Result;
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException)
|
||||
{
|
||||
// This is an example. It's important to filter out any *expected* exceptions from our code here.
|
||||
// However, catching all exceptions is considered an anti-pattern because it may suppress legitimate
|
||||
// issues, such as a NullReferenceException thrown by our code. In this case, we still re-throw
|
||||
// the exception, as the ToJsonFromXmlOrCsvAsync method is not expected to throw any exceptions.
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// This is used for fuzz testing and ensures that the project links only to JsonHelper,
|
||||
// avoiding unnecessary connections to additional files
|
||||
namespace ManagedCommon
|
||||
{
|
||||
public static class Logger
|
||||
{
|
||||
// An empty method to simulate logging information
|
||||
public static void LogTrace()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
// An empty method to simulate logging information
|
||||
public static void LogInfo(string message)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
// An empty method to simulate logging warnings
|
||||
public static void LogWarning(string message)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
// An empty method to simulate logging errors
|
||||
public static void LogError(string message, Exception? ex = null)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public static void LogDebug(string message, Exception? ex = null)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"configVersion": 3,
|
||||
"entries": [
|
||||
{
|
||||
"fuzzer": {
|
||||
"$type": "libfuzzerDotNet",
|
||||
"dll": "AdvancedPaste.FuzzTests.dll",
|
||||
"class": "AdvancedPaste.FuzzTests.FuzzTests",
|
||||
"method": "FuzzToJsonFromXmlOrCsv",
|
||||
"FuzzingTargetBinaries": [
|
||||
"PowerToys.AdvancedPaste.dll"
|
||||
]
|
||||
},
|
||||
"adoTemplate": {
|
||||
// supply the values appropriate to your
|
||||
// project, where bugs will be filed
|
||||
"org": "microsoft",
|
||||
"project": "OS",
|
||||
"AssignedTo": "leilzh@microsoft.com",
|
||||
"AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys",
|
||||
"IterationPath": "OS\\Future"
|
||||
},
|
||||
"jobNotificationEmail": "leilzh@microsoft.com",
|
||||
"skip": false,
|
||||
"rebootAfterSetup": false,
|
||||
"oneFuzzJobs": [
|
||||
// at least one job is required
|
||||
{
|
||||
"projectName": "AdvancedPaste",
|
||||
"targetName": "AdvancedPaste-dotnet-fuzzer"
|
||||
}
|
||||
],
|
||||
"jobDependencies": [
|
||||
// this should contain, at minimum,
|
||||
// the DLL and PDB files
|
||||
// you will need to add any other files required
|
||||
// (globs are supported)
|
||||
"AdvancedPaste.FuzzTests.dll",
|
||||
"AdvancedPaste.FuzzTests.pdb",
|
||||
"Microsoft.Windows.SDK.NET.dll",
|
||||
"Newtonsoft.Json.dll",
|
||||
"WinRT.Runtime.dll"
|
||||
],
|
||||
"SdlWorkItemId": 49911822
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -263,7 +263,7 @@ namespace AdvancedPaste
|
||||
if (disposing)
|
||||
{
|
||||
EtwTrace?.Dispose();
|
||||
window?.Dispose();
|
||||
window.Dispose();
|
||||
}
|
||||
|
||||
disposedValue = true;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
@@ -34,19 +33,6 @@ namespace AdvancedPaste.Helpers
|
||||
private static readonly Regex CsvRemoveStartAndEndQuotationMarksRegex = new Regex(@"^""(?=(""{2})+)|(?<=(""{2})+)""$");
|
||||
private static readonly Regex CsvReplaceDoubleQuotationMarksRegex = new Regex(@"""{2}");
|
||||
|
||||
private static bool IsJson(string text)
|
||||
{
|
||||
try
|
||||
{
|
||||
_ = JsonDocument.Parse(text);
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
internal static async Task<string> ToJsonFromXmlOrCsvAsync(DataPackageView clipboardData)
|
||||
{
|
||||
Logger.LogTrace();
|
||||
@@ -60,12 +46,6 @@ namespace AdvancedPaste.Helpers
|
||||
var text = await clipboardData.GetTextAsync();
|
||||
string jsonText = string.Empty;
|
||||
|
||||
// If the text is already JSON, return it
|
||||
if (IsJson(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
// Try convert XML
|
||||
try
|
||||
{
|
||||
|
||||
@@ -154,8 +154,8 @@ namespace AdvancedPaste.Settings
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_cancellationTokenSource?.Dispose();
|
||||
_watcher?.Dispose();
|
||||
_cancellationTokenSource.Dispose();
|
||||
_watcher.Dispose();
|
||||
}
|
||||
|
||||
_disposedValue = true;
|
||||
|
||||
@@ -14,7 +14,7 @@ using Microsoft.UI.Dispatching;
|
||||
|
||||
namespace HostsUILib.Helpers
|
||||
{
|
||||
public partial class DuplicateService : IDuplicateService, IDisposable
|
||||
public class DuplicateService : IDuplicateService, IDisposable
|
||||
{
|
||||
private record struct Check(string Address, string[] Hosts);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ using Microsoft.Win32;
|
||||
|
||||
namespace HostsUILib.Helpers
|
||||
{
|
||||
public partial class HostsService : IHostsService, IDisposable
|
||||
public class HostsService : IHostsService, IDisposable
|
||||
{
|
||||
private const string _backupSuffix = $"_PowerToysBackup_";
|
||||
private const int _defaultBufferSize = 4096; // From System.IO.File source code
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
||||
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
|
||||
<Import Project="..\..\..\Common.Dotnet.AotCompatibility.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
|
||||
@@ -38,9 +38,9 @@ IFACEMETHODIMP shell_context_menu_win10::QueryContextMenu(HMENU menu_handle, UIN
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (menu_flags & (CMF_DEFAULTONLY | CMF_VERBSONLY | CMF_OPTIMIZEFORINVOKE))
|
||||
if (menu_flags & CMF_DEFAULTONLY)
|
||||
{
|
||||
return E_UNEXPECTED;
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -217,13 +217,6 @@ IFACEMETHODIMP shell_context_menu_win10::InvokeCommand(CMINVOKECOMMANDINFO* para
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (HIWORD(params->lpVerb)!=0)
|
||||
{
|
||||
// Not a menu command. It's likely a string verb command from another menu.
|
||||
// The logic to interpret lpVerb is explained here: https://learn.microsoft.com/en-us/previous-versions//bb776881(v=vs.85)#invokecommand-method
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// Get selected menu item (a template or the "Open templates" item)
|
||||
const auto selected_menu_item_index = LOWORD(params->lpVerb) - 1;
|
||||
if (selected_menu_item_index < 0)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<Border
|
||||
x:Name="TopButtonsStackPanel"
|
||||
Margin="12"
|
||||
Padding="4,8,4,8"
|
||||
Padding="4,8,12,8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
d:Visibility="Visible"
|
||||
@@ -116,6 +116,7 @@
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="LanguagesComboBox"
|
||||
Height="32"
|
||||
Margin="4,0"
|
||||
AutomationProperties.Name="{x:Static p:Resources.SelectedLang}"
|
||||
SelectionChanged="LanguagesComboBox_SelectionChanged">
|
||||
@@ -155,7 +156,6 @@
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="CancelButton"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Cancel}"
|
||||
Click="CancelMenuItem_Click"
|
||||
ToolTip="{x:Static p:Resources.CancelShortcut}">
|
||||
<ui:SymbolIcon FontSize="18" Symbol="Dismiss24" />
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
@@ -77,7 +76,7 @@ public partial class OCROverlay : Window
|
||||
if (string.IsNullOrEmpty(selectedLanguageName))
|
||||
{
|
||||
selectedLanguage = ImageMethods.GetOCRLanguage();
|
||||
selectedLanguageName = selectedLanguage?.NativeName;
|
||||
selectedLanguageName = selectedLanguage?.DisplayName;
|
||||
}
|
||||
|
||||
List<Language> possibleOcrLanguages = OcrEngine.AvailableRecognizerLanguages.ToList();
|
||||
@@ -86,10 +85,10 @@ public partial class OCROverlay : Window
|
||||
|
||||
foreach (Language language in possibleOcrLanguages)
|
||||
{
|
||||
MenuItem menuItem = new() { Header = EnsureStartUpper(language.NativeName), Tag = language, IsCheckable = true };
|
||||
menuItem.IsChecked = language.NativeName.Equals(selectedLanguageName, StringComparison.OrdinalIgnoreCase);
|
||||
LanguagesComboBox.Items.Add(new ComboBoxItem { Content = EnsureStartUpper(language.NativeName), Tag = language });
|
||||
if (language.NativeName.Equals(selectedLanguageName, StringComparison.OrdinalIgnoreCase))
|
||||
MenuItem menuItem = new() { Header = language.NativeName, Tag = language, IsCheckable = true };
|
||||
menuItem.IsChecked = language.DisplayName.Equals(selectedLanguageName, StringComparison.Ordinal);
|
||||
LanguagesComboBox.Items.Add(language);
|
||||
if (language.DisplayName.Equals(selectedLanguageName, StringComparison.Ordinal))
|
||||
{
|
||||
selectedLanguage = language;
|
||||
LanguagesComboBox.SelectedIndex = count;
|
||||
@@ -359,12 +358,7 @@ public partial class OCROverlay : Window
|
||||
|
||||
// TODO: Set the preferred language based upon what was chosen here
|
||||
int selection = languageComboBox.SelectedIndex;
|
||||
selectedLanguage = (languageComboBox.SelectedItem as ComboBoxItem)?.Tag as Language;
|
||||
|
||||
if (selectedLanguage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
selectedLanguage = languageComboBox.SelectedItem as Language;
|
||||
|
||||
Logger.LogError($"Changed language to {selectedLanguage?.LanguageTag}");
|
||||
|
||||
@@ -505,16 +499,4 @@ public partial class OCROverlay : Window
|
||||
{
|
||||
return screenRectangle;
|
||||
}
|
||||
|
||||
private string EnsureStartUpper(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
var inputArray = input.ToCharArray();
|
||||
inputArray[0] = char.ToUpper(inputArray[0], CultureInfo.CurrentCulture);
|
||||
return new string(inputArray);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
namespace NonLocalizable
|
||||
{
|
||||
const wchar_t PowerToysAppFZEditor[] = L"POWERTOYS.FANCYZONESEDITOR.EXE";
|
||||
const wchar_t PowerToysWorkspacesEditor[] = L"POWERTOYS.WORKSPACESEDITOR.EXE";
|
||||
const char SplashClassName[] = "MsoSplash";
|
||||
const wchar_t CoreWindow[] = L"Windows.UI.Core.CoreWindow";
|
||||
const wchar_t SearchUI[] = L"SearchUI.exe";
|
||||
@@ -184,7 +185,7 @@ bool FancyZonesWindowUtils::IsExcludedByDefault(const HWND& hwnd, const std::wst
|
||||
return true;
|
||||
}
|
||||
|
||||
static std::vector<std::wstring> defaultExcludedApps = { NonLocalizable::PowerToysAppFZEditor, NonLocalizable::CoreWindow, NonLocalizable::SearchUI };
|
||||
static std::vector<std::wstring> defaultExcludedApps = { NonLocalizable::PowerToysAppFZEditor, NonLocalizable::PowerToysWorkspacesEditor, NonLocalizable::CoreWindow, NonLocalizable::SearchUI };
|
||||
return (check_excluded_app(hwnd, processPath, defaultExcludedApps));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,21 +7,16 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.Properties;
|
||||
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper;
|
||||
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper;
|
||||
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.WorkspacesHelper;
|
||||
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
{
|
||||
public class Main : IPlugin, IPluginI18n, IContextMenu
|
||||
public class Main : IPlugin, IPluginI18n
|
||||
{
|
||||
private PluginInitContext _context;
|
||||
|
||||
@@ -81,9 +76,11 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
|
||||
hide = true;
|
||||
}
|
||||
catch (Win32Exception ex)
|
||||
catch (Win32Exception)
|
||||
{
|
||||
HandleError("Can't Open this file", ex, showMsg: true);
|
||||
var name = $"Plugin: {_context.CurrentPluginMetadata.Name}";
|
||||
var msg = "Can't Open this file";
|
||||
_context.API.ShowMsg(name, msg, string.Empty);
|
||||
hide = false;
|
||||
}
|
||||
|
||||
@@ -127,9 +124,11 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
|
||||
hide = true;
|
||||
}
|
||||
catch (Win32Exception ex)
|
||||
catch (Win32Exception)
|
||||
{
|
||||
HandleError("Can't Open this file", ex, showMsg: true);
|
||||
var name = $"Plugin: {_context.CurrentPluginMetadata.Name}";
|
||||
var msg = "Can't Open this file";
|
||||
_context.API.ShowMsg(name, msg, string.Empty);
|
||||
hide = false;
|
||||
}
|
||||
|
||||
@@ -143,23 +142,23 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
results = results.Where(a => a.Title.Contains(query.Search, StringComparison.InvariantCultureIgnoreCase)).ToList();
|
||||
|
||||
results.ForEach(x =>
|
||||
{
|
||||
if (x.Score == 0)
|
||||
{
|
||||
x.Score = 100;
|
||||
}
|
||||
{
|
||||
if (x.Score == 0)
|
||||
{
|
||||
x.Score = 100;
|
||||
}
|
||||
|
||||
// intersect the title with the query
|
||||
var intersection = Convert.ToInt32(x.Title.ToLowerInvariant().Intersect(query.Search.ToLowerInvariant()).Count() * query.Search.Length);
|
||||
var differenceWithQuery = Convert.ToInt32((x.Title.Length - intersection) * query.Search.Length * 0.7);
|
||||
x.Score = x.Score - differenceWithQuery + intersection;
|
||||
// intersect the title with the query
|
||||
var intersection = Convert.ToInt32(x.Title.ToLowerInvariant().Intersect(query.Search.ToLowerInvariant()).Count() * query.Search.Length);
|
||||
var differenceWithQuery = Convert.ToInt32((x.Title.Length - intersection) * query.Search.Length * 0.7);
|
||||
x.Score = x.Score - differenceWithQuery + intersection;
|
||||
|
||||
// if is a remote machine give it 12 extra points
|
||||
if (x.ContextData is VSCodeRemoteMachine)
|
||||
{
|
||||
x.Score = Convert.ToInt32(x.Score + (intersection * 2));
|
||||
}
|
||||
});
|
||||
// if is a remote machine give it 12 extra points
|
||||
if (x.ContextData is VSCodeRemoteMachine)
|
||||
{
|
||||
x.Score = Convert.ToInt32(x.Score + (intersection * 2));
|
||||
}
|
||||
});
|
||||
|
||||
results = results.OrderByDescending(x => x.Score).ToList();
|
||||
if (query.Search == string.Empty || query.Search.Replace(" ", string.Empty) == string.Empty)
|
||||
@@ -175,108 +174,6 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
if (selectedResult?.ContextData is not VSCodeWorkspace workspace)
|
||||
{
|
||||
return new List<ContextMenuResult>();
|
||||
}
|
||||
|
||||
string realPath = SystemPath.RealPath(workspace.RelativePath);
|
||||
|
||||
return new List<ContextMenuResult>
|
||||
{
|
||||
new ContextMenuResult
|
||||
{
|
||||
PluginName = Name,
|
||||
Title = $"{Resources.CopyPath} (Ctrl+C)",
|
||||
Glyph = "\xE8C8", // Copy
|
||||
FontFamily = "Segoe Fluent Icons,Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control,
|
||||
Action = context => CopyToClipboard(realPath),
|
||||
},
|
||||
new ContextMenuResult
|
||||
{
|
||||
PluginName = Name,
|
||||
Title = $"{Resources.OpenInExplorer} (Ctrl+Shift+F)",
|
||||
Glyph = "\xEC50", // File Explorer
|
||||
FontFamily = "Segoe Fluent Icons,Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.F,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = context => OpenInExplorer(realPath),
|
||||
},
|
||||
new ContextMenuResult
|
||||
{
|
||||
PluginName = Name,
|
||||
Title = $"{Resources.OpenInConsole} (Ctrl+Shift+C)",
|
||||
Glyph = "\xE756", // Command Prompt
|
||||
FontFamily = "Segoe Fluent Icons,Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = context => OpenInConsole(realPath),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private bool CopyToClipboard(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(path);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HandleError("Can't copy to clipboard", ex, showMsg: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool OpenInConsole(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
Helper.OpenInConsole(path);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HandleError($"Unable to open the specified path in the console: {path}", ex, showMsg: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool OpenInExplorer(string path)
|
||||
{
|
||||
if (!Helper.OpenInShell("explorer.exe", $"\"{path}\""))
|
||||
{
|
||||
HandleError($"Failed to open folder in Explorer at path: {path}", showMsg: true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void HandleError(string msg, Exception exception = null, bool showMsg = false)
|
||||
{
|
||||
if (exception != null)
|
||||
{
|
||||
Log.Exception(msg, exception, exception.GetType());
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error(msg, typeof(VSCodeWorkspaces.Main));
|
||||
}
|
||||
|
||||
if (showMsg)
|
||||
{
|
||||
_context.API.ShowMsg(
|
||||
$"Plugin: {_context.CurrentPluginMetadata.Name}",
|
||||
msg);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginTitle()
|
||||
{
|
||||
return Resources.PluginTitle;
|
||||
|
||||
@@ -140,32 +140,5 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.Properties {
|
||||
return ResourceManager.GetString("Workspace", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy Path.
|
||||
/// </summary>
|
||||
internal static string CopyPath {
|
||||
get {
|
||||
return ResourceManager.GetString("CopyPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open in console.
|
||||
/// </summary>
|
||||
internal static string OpenInConsole {
|
||||
get {
|
||||
return ResourceManager.GetString("OpenInConsole", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open in Explorer.
|
||||
/// </summary>
|
||||
internal static string OpenInExplorer {
|
||||
get {
|
||||
return ResourceManager.GetString("OpenInExplorer", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,13 +151,4 @@
|
||||
<value>Project Folder</value>
|
||||
<comment>It refers to the Visual Studio Code Project Folders</comment>
|
||||
</data>
|
||||
<data name="CopyPath" xml:space="preserve">
|
||||
<value>Copy path</value>
|
||||
</data>
|
||||
<data name="OpenInConsole" xml:space="preserve">
|
||||
<value>Open in console</value>
|
||||
</data>
|
||||
<data name="OpenInExplorer" xml:space="preserve">
|
||||
<value>Open in Explorer</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -4,7 +4,7 @@
|
||||
"ActionKeyword": "{",
|
||||
"Name": "VS Code Workspaces",
|
||||
"Author": "ricardosantos9521",
|
||||
"Version": "1.2.0",
|
||||
"Version": "1.1.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/ricardosantos9521/PowerToys/",
|
||||
"ExecuteFileName": "Community.PowerToys.Run.Plugin.VSCodeWorkspaces.dll",
|
||||
|
||||
@@ -192,11 +192,6 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
|
||||
[DataRow("cos", false)]
|
||||
[DataRow("abs", false)]
|
||||
[DataRow("1+1.1e3", true)]
|
||||
[DataRow("randi(8)", true)]
|
||||
[DataRow("randi()", false)]
|
||||
[DataRow("randi(0.5)", true)]
|
||||
[DataRow("rand()", true)]
|
||||
[DataRow("rand(0.5)", false)]
|
||||
public void InputValid_TestValid_WhenCalled(string input, bool valid)
|
||||
{
|
||||
// Act
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
}
|
||||
|
||||
// check for division by zero
|
||||
// We check if the string contains a slash followed by space (optional) and zero. Whereas the zero must not be followed by a dot, comma, or 'x'/'X' as these indicate a number with decimal digits or a hexadecimal value respectively. The zero must also not be followed by other digits.
|
||||
if (new Regex("\\/\\s*0(?![,\\.0-9xX])").Match(input).Success)
|
||||
// We check if the string contains a slash followed by space (optional) and zero. Whereas the zero must not followed by dot or comma as this indicates a number with decimal digits. The zero must also not be followed by other digits.
|
||||
if (new Regex("\\/\\s*0(?![,\\.0-9])").Match(input).Success)
|
||||
{
|
||||
error = Properties.Resources.wox_plugin_calculator_division_by_zero;
|
||||
return default;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
@"^(" +
|
||||
@"%|" +
|
||||
@"ceil\s*\(|floor\s*\(|exp\s*\(|max\s*\(|min\s*\(|abs\s*\(|log(?:2|10)?\s*\(|ln\s*\(|sqrt\s*\(|pow\s*\(|" +
|
||||
@"factorial\s*\(|sign\s*\(|round\s*\(|rand\s*\(\)|randi\s*\([^\)]|" +
|
||||
@"factorial\s*\(|sign\s*\(|round\s*\(|rand\s*\(|" +
|
||||
@"sin\s*\(|cos\s*\(|tan\s*\(|arcsin\s*\(|arccos\s*\(|arctan\s*\(|" +
|
||||
@"sinh\s*\(|cosh\s*\(|tanh\s*\(|arsinh\s*\(|arcosh\s*\(|artanh\s*\(|" +
|
||||
@"pi|" +
|
||||
|
||||
@@ -27,112 +27,109 @@
|
||||
WindowStartupLocation="Manual"
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d">
|
||||
<Border x:Name="MainBorder" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
|
||||
<Grid x:Name="RootGrid" MouseDown="OnMouseDown">
|
||||
<Grid x:Name="RootGrid" MouseDown="OnMouseDown">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
x:Name="SearchBoxBorder"
|
||||
Grid.Row="0"
|
||||
Padding="12,4,12,3">
|
||||
<local:LauncherControl x:Name="SearchBox" />
|
||||
</Border>
|
||||
|
||||
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
||||
<Grid
|
||||
x:Name="KeywordsOverviewGrid"
|
||||
Grid.Row="1"
|
||||
MaxHeight="{Binding Results.MaxHeight}"
|
||||
Visibility="{Binding PluginsOverviewVisibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
x:Name="SearchBoxBorder"
|
||||
Grid.Row="0"
|
||||
Padding="12,4,12,3"
|
||||
Background="Transparent">
|
||||
<local:LauncherControl x:Name="SearchBox" />
|
||||
</Border>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DividerStrokeColorDefaultBrush}" />
|
||||
<TextBlock
|
||||
Margin="22,12,0,4"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{x:Static p:Resources.PluginKeywords}" />
|
||||
|
||||
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
||||
<Grid
|
||||
x:Name="KeywordsOverviewGrid"
|
||||
<ListView
|
||||
x:Name="pluginsHintsList"
|
||||
Grid.Row="1"
|
||||
MaxHeight="{Binding Results.MaxHeight}"
|
||||
Visibility="{Binding PluginsOverviewVisibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DividerStrokeColorDefaultBrush}" />
|
||||
<TextBlock
|
||||
Margin="22,12,0,4"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{x:Static p:Resources.PluginKeywords}" />
|
||||
|
||||
<ListView
|
||||
x:Name="pluginsHintsList"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
||||
ItemsSource="{Binding Plugins}"
|
||||
PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedItem="{Binding SelectedPlugin, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel
|
||||
Margin="16,0"
|
||||
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Width="32"
|
||||
Height="32"
|
||||
Padding="2,0,2,0"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
ToolTipService.ToolTip="{Binding Metadata.ActionKeyword}">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Metadata.ActionKeyword}"
|
||||
TextAlignment="Left"
|
||||
TextTrimming="WordEllipsis" />
|
||||
</Border>
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
||||
ItemsSource="{Binding Plugins}"
|
||||
PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedItem="{Binding SelectedPlugin, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel
|
||||
Margin="16,0"
|
||||
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Width="32"
|
||||
Height="32"
|
||||
Padding="2,0,2,0"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
ToolTipService.ToolTip="{Binding Metadata.ActionKeyword}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Plugin.Description}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
<local:ResultList
|
||||
x:Name="ListBox"
|
||||
Grid.Row="2"
|
||||
VerticalAlignment="Stretch"
|
||||
BorderBrush="{DynamicResource DividerStrokeColorDefaultBrush}"
|
||||
BorderThickness="0,1,0,0"
|
||||
PreviewMouseDown="ListBox_PreviewMouseDown"
|
||||
Visibility="{Binding Results.Visibility}" />
|
||||
|
||||
Text="{Binding Metadata.ActionKeyword}"
|
||||
TextAlignment="Left"
|
||||
TextTrimming="WordEllipsis" />
|
||||
</Border>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Plugin.Description}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<local:ResultList
|
||||
x:Name="ListBox"
|
||||
Grid.Row="2"
|
||||
VerticalAlignment="Stretch"
|
||||
BorderBrush="{DynamicResource DividerStrokeColorDefaultBrush}"
|
||||
BorderThickness="0,1,0,0"
|
||||
PreviewMouseDown="ListBox_PreviewMouseDown"
|
||||
Visibility="{Binding Results.Visibility}" />
|
||||
|
||||
</Grid>
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenResultWithKeyboardCommand}" />
|
||||
|
||||
@@ -200,11 +200,6 @@ namespace PowerLauncher
|
||||
DWM_WINDOW_CORNER_PREFERENCE preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;
|
||||
DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint));
|
||||
}
|
||||
else
|
||||
{
|
||||
// On Windows10 ResizeMode="NoResize" removes the border so we add a new one.
|
||||
MainBorder.BorderThickness = new System.Windows.Thickness(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -238,10 +238,7 @@ namespace PowerLauncher.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// After updating to .NET 9, calling MethodBase.GetCurrentMethod() started crashing when trying
|
||||
// to log methods called from within the OneNote plugin, so we've replaced this instance with typeof(PluginManager).
|
||||
// This should be revised in the future.
|
||||
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, typeof(PluginManager));
|
||||
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
return new List<Result>();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace PowerAccent.Core
|
||||
NL,
|
||||
NO,
|
||||
PI,
|
||||
PIE,
|
||||
PL,
|
||||
PT,
|
||||
RO,
|
||||
@@ -101,7 +100,6 @@ namespace PowerAccent.Core
|
||||
Language.NL => GetDefaultLetterKeyNL(letter), // Dutch
|
||||
Language.NO => GetDefaultLetterKeyNO(letter), // Norwegian
|
||||
Language.PI => GetDefaultLetterKeyPI(letter), // Pinyin
|
||||
Language.PIE => GetDefaultLetterKeyPIE(letter), // Proto-Indo-European
|
||||
Language.PL => GetDefaultLetterKeyPL(letter), // Polish
|
||||
Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese
|
||||
Language.RO => GetDefaultLetterKeyRO(letter), // Romanian
|
||||
@@ -157,7 +155,6 @@ namespace PowerAccent.Core
|
||||
.Union(GetDefaultLetterKeyNL(letter))
|
||||
.Union(GetDefaultLetterKeyNO(letter))
|
||||
.Union(GetDefaultLetterKeyPI(letter))
|
||||
.Union(GetDefaultLetterKeyPIE(letter))
|
||||
.Union(GetDefaultLetterKeyPL(letter))
|
||||
.Union(GetDefaultLetterKeyPT(letter))
|
||||
.Union(GetDefaultLetterKeyRO(letter))
|
||||
@@ -466,24 +463,6 @@ namespace PowerAccent.Core
|
||||
};
|
||||
}
|
||||
|
||||
// Proto-Indo-European
|
||||
private static string[] GetDefaultLetterKeyPIE(LetterKey letter)
|
||||
{
|
||||
return letter switch
|
||||
{
|
||||
LetterKey.VK_A => new[] { "ā" },
|
||||
LetterKey.VK_E => new[] { "ē" },
|
||||
LetterKey.VK_O => new[] { "ō" },
|
||||
LetterKey.VK_K => new[] { "ḱ" },
|
||||
LetterKey.VK_G => new[] { "ǵ" },
|
||||
LetterKey.VK_R => new[] { "r̥" },
|
||||
LetterKey.VK_L => new[] { "l̥" },
|
||||
LetterKey.VK_M => new[] { "m̥" },
|
||||
LetterKey.VK_N => new[] { "n̥" },
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
}
|
||||
|
||||
// Turkish
|
||||
private static string[] GetDefaultLetterKeyTK(LetterKey letter)
|
||||
{
|
||||
@@ -881,7 +860,7 @@ namespace PowerAccent.Core
|
||||
{
|
||||
return letter switch
|
||||
{
|
||||
LetterKey.VK_C => new[] { "č", "ć" },
|
||||
LetterKey.VK_C => new[] { "č" },
|
||||
LetterKey.VK_E => new[] { "€" },
|
||||
LetterKey.VK_S => new[] { "š" },
|
||||
LetterKey.VK_Z => new[] { "ž" },
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
||||
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
|
||||
<Import Project="..\..\..\Common.SelfContained.props" />
|
||||
<Import Project="..\..\..\Common.Dotnet.AotCompatibility.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
|
||||
/// <summary>
|
||||
/// Win Form Implementation for Markdown Preview Handler.
|
||||
/// </summary>
|
||||
public partial class MarkdownPreviewHandlerControl : FormHandlerControl
|
||||
public class MarkdownPreviewHandlerControl : FormHandlerControl
|
||||
{
|
||||
private static readonly IFileSystem FileSystem = new FileSystem();
|
||||
private static readonly IPath Path = FileSystem.Path;
|
||||
@@ -66,7 +66,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
|
||||
{
|
||||
get
|
||||
{
|
||||
string codeBase = AppContext.BaseDirectory;
|
||||
string codeBase = Assembly.GetExecutingAssembly().Location;
|
||||
UriBuilder uri = new UriBuilder(codeBase);
|
||||
string path = Uri.UnescapeDataString(uri.Path);
|
||||
return Path.GetDirectoryName(path);
|
||||
|
||||
@@ -281,62 +281,60 @@
|
||||
IsPrimaryButtonEnabled="False"
|
||||
IsSecondaryButtonEnabled="True"
|
||||
PrimaryButtonStyle="{StaticResource AccentButtonStyle}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid RowSpacing="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Margin="-24,-24,-24,0" Source="{ThemeResource DialogHeaderImage}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
TextWrapping="Wrap">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_Description" />
|
||||
<Hyperlink NavigateUri="https://openai.com/policies/terms-of-use" TabIndex="3">
|
||||
<Run x:Uid="TermsLink" />
|
||||
</Hyperlink>
|
||||
<Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run>
|
||||
<Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3">
|
||||
<Run x:Uid="PrivacyLink" />
|
||||
<Grid RowSpacing="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Margin="-24,-24,-24,0" Source="{ThemeResource DialogHeaderImage}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
TextWrapping="Wrap">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_Description" />
|
||||
<Hyperlink NavigateUri="https://openai.com/policies/terms-of-use" TabIndex="3">
|
||||
<Run x:Uid="TermsLink" />
|
||||
</Hyperlink>
|
||||
<Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run>
|
||||
<Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3">
|
||||
<Run x:Uid="PrivacyLink" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical">
|
||||
<TextBlock x:Uid="AdvancedPaste_EnableAIDialog_ConfigureOpenAIKey" FontWeight="SemiBold" />
|
||||
<TextBlock Grid.Row="2" TextWrapping="Wrap">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_LoginIntoText" />
|
||||
<Hyperlink NavigateUri="https://platform.openai.com/api-keys">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_OpenAIApiKeysOverviewText" />
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_CreateNewKeyText" />
|
||||
<LineBreak />
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_NoteAICreditsText" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical">
|
||||
<TextBlock x:Uid="AdvancedPaste_EnableAIDialog_ConfigureOpenAIKey" FontWeight="SemiBold" />
|
||||
<TextBlock Grid.Row="2" TextWrapping="Wrap">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_LoginIntoText" />
|
||||
<Hyperlink NavigateUri="https://platform.openai.com/api-keys">
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_OpenAIApiKeysOverviewText" />
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_CreateNewKeyText" />
|
||||
<LineBreak />
|
||||
<Run x:Uid="AdvancedPaste_EnableAIDialog_NoteAICreditsText" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="3" ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
x:Uid="AdvancedPaste_EnableAIDialogOpenAIApiKey"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox
|
||||
x:Name="AdvancedPaste_EnableAIDialogOpenAIApiKey"
|
||||
Grid.Column="1"
|
||||
MinWidth="248"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
TextChanged="AdvancedPaste_EnableAIDialogOpenAIApiKey_TextChanged" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
x:Uid="AdvancedPaste_EnableAIDialogOpenAIApiKey"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox
|
||||
x:Name="AdvancedPaste_EnableAIDialogOpenAIApiKey"
|
||||
Grid.Column="1"
|
||||
MinWidth="248"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
TextChanged="AdvancedPaste_EnableAIDialogOpenAIApiKey_TextChanged" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</ContentDialog>
|
||||
<ContentDialog
|
||||
x:Name="CustomActionDialog"
|
||||
|
||||
@@ -63,15 +63,8 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
this.QuickAccent_Language_Select.DeselectAll();
|
||||
}
|
||||
|
||||
private bool loadingLanguageListDontTriggerSelectionChanged;
|
||||
|
||||
private void QuickAccent_SelectedLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (loadingLanguageListDontTriggerSelectionChanged)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var listView = sender as ListView;
|
||||
|
||||
ViewModel.SelectedLanguageOptions = listView.SelectedItems
|
||||
@@ -83,13 +76,10 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
private void QuickAccent_Language_Select_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
loadingLanguageListDontTriggerSelectionChanged = true;
|
||||
foreach (var languageOption in ViewModel.SelectedLanguageOptions)
|
||||
{
|
||||
this.QuickAccent_Language_Select.SelectedItems.Add(languageOption);
|
||||
}
|
||||
|
||||
loadingLanguageListDontTriggerSelectionChanged = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3580,10 +3580,10 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<value>Characters</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage.Header" xml:space="preserve">
|
||||
<value>Choose character sets</value>
|
||||
<value>Choose a character set</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage.Description" xml:space="preserve">
|
||||
<value>Show only accented characters common to the selected sets</value>
|
||||
<value>Show only accented characters common to the selected set</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_All.Content" xml:space="preserve">
|
||||
<value>All available</value>
|
||||
@@ -3672,9 +3672,6 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="QuickAccent_SelectedLanguage_Pinyin" xml:space="preserve">
|
||||
<value>Pinyin</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Proto_Indo_European" xml:space="preserve">
|
||||
<value>Proto Indo European</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SelectedLanguage_Polish" xml:space="preserve">
|
||||
<value>Polish</value>
|
||||
</data>
|
||||
|
||||
@@ -55,7 +55,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
new PowerAccentLanguageModel("MI", "QuickAccent_SelectedLanguage_Maori", LanguageGroup),
|
||||
new PowerAccentLanguageModel("NO", "QuickAccent_SelectedLanguage_Norwegian", LanguageGroup),
|
||||
new PowerAccentLanguageModel("PI", "QuickAccent_SelectedLanguage_Pinyin", LanguageGroup),
|
||||
new PowerAccentLanguageModel("PIE", "QuickAccent_SelectedLanguage_Proto_Indo_European", LanguageGroup),
|
||||
new PowerAccentLanguageModel("PL", "QuickAccent_SelectedLanguage_Polish", LanguageGroup),
|
||||
new PowerAccentLanguageModel("PT", "QuickAccent_SelectedLanguage_Portuguese", LanguageGroup),
|
||||
new PowerAccentLanguageModel("RO", "QuickAccent_SelectedLanguage_Romanian", LanguageGroup),
|
||||
@@ -115,7 +114,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
SelectedLanguageOptions = _powerAccentSettings.Properties.SelectedLang.Value.Split(',')
|
||||
.Select(l => Languages.Find(lang => lang.LanguageCode == l))
|
||||
.Where(l => l != null) // Wrongly typed languages will appear as null after find. We want to remove those to avoid crashes.
|
||||
.ToArray();
|
||||
}
|
||||
else if (_powerAccentSettings.Properties.SelectedLang.Value.Contains("ALL"))
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
_languageIndex = value;
|
||||
if (_powerOcrSettings != null && _languageIndex < possibleOcrLanguages.Count && _languageIndex >= 0)
|
||||
{
|
||||
_powerOcrSettings.Properties.PreferredLanguage = possibleOcrLanguages[_languageIndex].NativeName;
|
||||
_powerOcrSettings.Properties.PreferredLanguage = possibleOcrLanguages[_languageIndex].DisplayName;
|
||||
NotifySettingsChanged();
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
systemLanguageIndex = AvailableLanguages.Count;
|
||||
}
|
||||
|
||||
AvailableLanguages.Add(EnsureStartUpper(language.NativeName));
|
||||
AvailableLanguages.Add(language.NativeName);
|
||||
}
|
||||
|
||||
// if the previously stored preferred language is not available (has been deleted or this is the first run with language preference)
|
||||
@@ -264,17 +264,5 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private string EnsureStartUpper(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
var inputArray = input.ToCharArray();
|
||||
inputArray[0] = char.ToUpper(inputArray[0], CultureInfo.CurrentCulture);
|
||||
return new string(inputArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user