Add the Command Palette module (#37908)
Windows Command Palette ("CmdPal") is the next iteration of PowerToys Run. With extensibility at its core, the Command Palette is your one-stop launcher to start _anything_. By default, CmdPal is bound to <kbd>Win+Alt+Space</kbd>.   ---- This brings the current preview version of CmdPal into the upstream PowerToys repo. There are still lots of bugs to work out, but it's reached the state we're ready to start sharing it with the world. From here, we can further collaborate with the community on the features that are important, and ensuring that we've got a most robust API to enable developers to build whatever extensions they want. Most of the built-in PT Run modules have already been ported to CmdPal's extension API. Those include: * Installed apps * Shell commands * File search (powered by the indexer) * Windows Registry search * Web search * Windows Terminal Profiles * Windows Services * Windows settings There are a couple new extensions built-in * You can now search for packages on `winget` and install them right from the palette. This also powers searching for extensions for the palette * The calculator has an entirely new implementation. This is currently less feature complete than the original PT Run one - we're looking forward to updating it to be more complete for future ingestion in Windows * "Bookmarks" allow you to save shortcuts to files, folders, and webpages as top-level commands in the palette. We've got a bunch of other samples too, in this repo and elsewhere ### PowerToys specific notes CmdPal will eventually graduate out of PowerToys to live as its own application, which is why it's implemented just a little differently than most other modules. Enabling CmdPal will install its `msix` package. The CI was minorly changed to support CmdPal version numbers independent of PowerToys itself. It doesn't make sense for us to start CmdPal at v0.90, and in the future, we want to be able to rev CmdPal independently of PT itself. Closes #3200, closes #3600, closes #7770, closes #34273, closes #36471, closes #20976, closes #14495 ----- TODOs et al **Blocking:** - [ ] Images and descriptions in Settings and OOBE need to be properly defined, as mentioned before - [ ] Niels is on it - [x] Doesn't start properly from PowerToys unless the fix PR is merged. - https://github.com/zadjii-msft/PowerToys/pull/556 merged - [x] I seem to lose focus a lot when I press on some limits, like between the search bar and the results. - This is https://github.com/zadjii-msft/PowerToys/issues/427 - [x] Turned off an extension like Calculator and it was still working. - Need to get rid of that toggle, it doesn't do anything currently - [x] `ListViewModel.<FetchItems>` crash - Pretty confident that was fixed in https://github.com/zadjii-msft/PowerToys/pull/553 **Not blocking / improvements:** - Show the shortcut through settings, as mentioned before, or create a button that would open CmdPalette settings. - When PowerToys starts, CmdPalette is always shown if enabled. That's weird when just starting PowerToys/ logging in to the computer with PowerToys auto-start activated. I think this should at least be a setting. - Needing to double press a result for it to do the default action seems quirky. If one is already selected, I think just pressing should be enough for it to do the action. - This is currently a setting, though we're thinking of changing the setting even more: https://github.com/zadjii-msft/PowerToys/issues/392 - There's no URI extension. Was surprised when typing a URL that it only proposed a web search. - [x] There's no System commands extension. Was expecting to be able to quickly restart the computer by typing restart but it wasn't there. - This is in PR https://github.com/zadjii-msft/PowerToys/pull/452 --------- Co-authored-by: joadoumie <98557455+joadoumie@users.noreply.github.com> Co-authored-by: Jordi Adoumie <jordiadoumie@microsoft.com> Co-authored-by: Mike Griese <zadjii@gmail.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Michael Hawker <24302614+michael-hawker@users.noreply.github.com> Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Co-authored-by: Seraphima <zykovas91@gmail.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Kristen Schau <47155823+krschau@users.noreply.github.com> Co-authored-by: Eric Johnson <ericjohnson327@gmail.com> Co-authored-by: Ethan Fang <ethanfang@microsoft.com> Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Clint Rutkas <clint@rutkas.com>
5
.github/actions/spell-check/allow/names.txt
vendored
@ -79,6 +79,7 @@ Gershaft
|
|||||||
Giordani
|
Giordani
|
||||||
Gokce
|
Gokce
|
||||||
gordon
|
gordon
|
||||||
|
Griese
|
||||||
grzhan
|
grzhan
|
||||||
Guo
|
Guo
|
||||||
hanselman
|
hanselman
|
||||||
@ -197,6 +198,7 @@ cortana
|
|||||||
dlnilsson
|
dlnilsson
|
||||||
fancymouse
|
fancymouse
|
||||||
firefox
|
firefox
|
||||||
|
fudan
|
||||||
gpt
|
gpt
|
||||||
Inkscape
|
Inkscape
|
||||||
Markdig
|
Markdig
|
||||||
@ -212,6 +214,7 @@ regedit
|
|||||||
roslyn
|
roslyn
|
||||||
Spotify
|
Spotify
|
||||||
Vanara
|
Vanara
|
||||||
|
wangyi
|
||||||
WEX
|
WEX
|
||||||
windowwalker
|
windowwalker
|
||||||
winui
|
winui
|
||||||
@ -219,7 +222,9 @@ winuiex
|
|||||||
wix
|
wix
|
||||||
wordpad
|
wordpad
|
||||||
WWL
|
WWL
|
||||||
|
wyhash
|
||||||
xamlstyler
|
xamlstyler
|
||||||
Xavalon
|
Xavalon
|
||||||
Xbox
|
Xbox
|
||||||
Youdao
|
Youdao
|
||||||
|
zadjii
|
||||||
|
3
.github/actions/spell-check/excludes.txt
vendored
@ -96,10 +96,11 @@
|
|||||||
^\Qdoc/devdocs/localization.md\E$
|
^\Qdoc/devdocs/localization.md\E$
|
||||||
^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$
|
^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$
|
||||||
^\Qsrc/common/notifications/BackgroundActivatorDLL/cpp.hint\E$
|
^\Qsrc/common/notifications/BackgroundActivatorDLL/cpp.hint\E$
|
||||||
|
^\Qsrc/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002.pdn\E$
|
||||||
^\Qsrc/modules/colorPicker/ColorPickerUI/Assets/ColorPicker/colorPicker.cur\E$
|
^\Qsrc/modules/colorPicker/ColorPickerUI/Assets/ColorPicker/colorPicker.cur\E$
|
||||||
^\Qsrc/modules/colorPicker/ColorPickerUI/Shaders/GridShader.cso\E$
|
^\Qsrc/modules/colorPicker/ColorPickerUI/Shaders/GridShader.cso\E$
|
||||||
^\Qsrc/modules/MouseUtils/MouseJumpUI/MainForm.resx\E$
|
|
||||||
^\Qsrc/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs\E$
|
^\Qsrc/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs\E$
|
||||||
|
^\Qsrc/modules/MouseUtils/MouseJumpUI/MainForm.resx\E$
|
||||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmAbout.cs\E$
|
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmAbout.cs\E$
|
||||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmInputCallback.resx\E$
|
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmInputCallback.resx\E$
|
||||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmLogon.resx\E$
|
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmLogon.resx\E$
|
||||||
|
236
.github/actions/spell-check/expect.txt
vendored
11
.github/actions/spell-check/patterns.txt
vendored
@ -232,6 +232,15 @@ _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
|
|||||||
# ignore long runs of a single character:
|
# ignore long runs of a single character:
|
||||||
\b([A-Za-z])\g{-1}{3,}\b
|
\b([A-Za-z])\g{-1}{3,}\b
|
||||||
|
|
||||||
|
# Amazon
|
||||||
|
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
|
||||||
|
|
||||||
|
# imgur
|
||||||
|
\bimgur\.com/[^.]+
|
||||||
|
|
||||||
|
# Process Process (typename varname)
|
||||||
|
Process Process
|
||||||
|
|
||||||
# ZoomIt menu items with accelerator keys
|
# ZoomIt menu items with accelerator keys
|
||||||
E&xit
|
E&xit
|
||||||
St&yle
|
St&yle
|
6
.gitignore
vendored
@ -224,7 +224,7 @@ ClientBin/
|
|||||||
*.publishsettings
|
*.publishsettings
|
||||||
orleans.codegen.cs
|
orleans.codegen.cs
|
||||||
|
|
||||||
# Including strong name files can present a security risk
|
# Including strong name files can present a security risk
|
||||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
#*.snk
|
#*.snk
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ ImageResizer/tools/**
|
|||||||
# OpenCover UI analysis results
|
# OpenCover UI analysis results
|
||||||
OpenCover/
|
OpenCover/
|
||||||
|
|
||||||
# Azure Stream Analytics local run output
|
# Azure Stream Analytics local run output
|
||||||
ASALocalRun/
|
ASALocalRun/
|
||||||
|
|
||||||
# MSBuild Binary and Structured Log
|
# MSBuild Binary and Structured Log
|
||||||
@ -331,7 +331,7 @@ ASALocalRun/
|
|||||||
# NVidia Nsight GPU debugger configuration file
|
# NVidia Nsight GPU debugger configuration file
|
||||||
*.nvuser
|
*.nvuser
|
||||||
|
|
||||||
# MFractors (Xamarin productivity tool) working folder
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
.mfractor/
|
.mfractor/
|
||||||
|
|
||||||
# Temp build files
|
# Temp build files
|
||||||
|
51
.pipelines/ESRPSigning_cmdpal_msix_content.json
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"Version": "1.0.0",
|
||||||
|
"UseMinimatch": false,
|
||||||
|
"SignBatches": [
|
||||||
|
{
|
||||||
|
"MatchedPath": [
|
||||||
|
"*.dll",
|
||||||
|
"*.exe"
|
||||||
|
],
|
||||||
|
"SigningInfo": {
|
||||||
|
"Operations": [
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-230012",
|
||||||
|
"OperationSetCode": "SigntoolSign",
|
||||||
|
"Parameters": [
|
||||||
|
{
|
||||||
|
"parameterName": "OpusName",
|
||||||
|
"parameterValue": "Microsoft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "OpusInfo",
|
||||||
|
"parameterValue": "http://www.microsoft.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "FileDigest",
|
||||||
|
"parameterValue": "/fd \"SHA256\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "PageHash",
|
||||||
|
"parameterValue": "/NPH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "TimeStamp",
|
||||||
|
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-230012",
|
||||||
|
"OperationSetCode": "SigntoolVerify",
|
||||||
|
"Parameters": [],
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -217,7 +217,10 @@
|
|||||||
"PowerToys.ZoomItSettingsInterop.dll",
|
"PowerToys.ZoomItSettingsInterop.dll",
|
||||||
|
|
||||||
"WinUI3Apps\\PowerToys.Settings.dll",
|
"WinUI3Apps\\PowerToys.Settings.dll",
|
||||||
"WinUI3Apps\\PowerToys.Settings.exe"
|
"WinUI3Apps\\PowerToys.Settings.exe",
|
||||||
|
|
||||||
|
"PowerToys.CmdPalModuleInterface.dll",
|
||||||
|
"*Microsoft.CmdPal.UI_*.msix"
|
||||||
],
|
],
|
||||||
"SigningInfo": {
|
"SigningInfo": {
|
||||||
"Operations": [
|
"Operations": [
|
||||||
|
51
.pipelines/ESRPSigning_sdk.json
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"Version": "1.0.0",
|
||||||
|
"UseMinimatch": false,
|
||||||
|
"SignBatches": [
|
||||||
|
{
|
||||||
|
"MatchedPath": [
|
||||||
|
"Microsoft.CommandPalette.Extensions.dll",
|
||||||
|
"Microsoft.CommandPalette.Extensions.Toolkit.dll"
|
||||||
|
],
|
||||||
|
"SigningInfo": {
|
||||||
|
"Operations": [
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-230012",
|
||||||
|
"OperationSetCode": "SigntoolSign",
|
||||||
|
"Parameters": [
|
||||||
|
{
|
||||||
|
"parameterName": "OpusName",
|
||||||
|
"parameterValue": "Microsoft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "OpusInfo",
|
||||||
|
"parameterValue": "http://www.microsoft.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "FileDigest",
|
||||||
|
"parameterValue": "/fd \"SHA256\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "PageHash",
|
||||||
|
"parameterValue": "/NPH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "TimeStamp",
|
||||||
|
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-230012",
|
||||||
|
"OperationSetCode": "SigntoolVerify",
|
||||||
|
"Parameters": [],
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -20,6 +20,16 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
default: '0.0.1'
|
default: '0.0.1'
|
||||||
|
|
||||||
|
- name: cmdPalVersionNumber
|
||||||
|
displayName: "Command Palette Version Number"
|
||||||
|
type: string
|
||||||
|
default: '0.0.1'
|
||||||
|
|
||||||
|
- name: cmdPalSdkVersionNumber
|
||||||
|
displayName: "Command Palette SDK Version Number"
|
||||||
|
type: string
|
||||||
|
default: '0.0.1'
|
||||||
|
|
||||||
- name: buildConfigurations
|
- name: buildConfigurations
|
||||||
displayName: "Build Configurations"
|
displayName: "Build Configurations"
|
||||||
type: object
|
type: object
|
||||||
@ -78,6 +88,7 @@ extends:
|
|||||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
buildConfigurations: ${{ parameters.buildConfigurations }}
|
||||||
versionNumber: ${{ parameters.versionNumber }}
|
versionNumber: ${{ parameters.versionNumber }}
|
||||||
|
cmdPalVersionNumber: ${{ parameters.cmdPalVersionNumber }}
|
||||||
publishArtifacts: false # 1ES PT handles publication for us.
|
publishArtifacts: false # 1ES PT handles publication for us.
|
||||||
codeSign: true
|
codeSign: true
|
||||||
runTests: false
|
runTests: false
|
||||||
@ -95,7 +106,7 @@ extends:
|
|||||||
beforeBuildSteps:
|
beforeBuildSteps:
|
||||||
# Sets versions for all PowerToy created DLLs
|
# Sets versions for all PowerToy created DLLs
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
.pipelines/versionSetting.ps1 -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment ''
|
.pipelines/versionSetting.ps1 -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment '' -cmdPalVersionNumber '${{ parameters.cmdPalVersionNumber }}'
|
||||||
displayName: Prepare versioning
|
displayName: Prepare versioning
|
||||||
|
|
||||||
# Prepare the localizations and telemetry config before the release build
|
# Prepare the localizations and telemetry config before the release build
|
||||||
@ -107,6 +118,28 @@ extends:
|
|||||||
move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1
|
move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1
|
||||||
displayName: Emplace telemetry files
|
displayName: Emplace telemetry files
|
||||||
|
|
||||||
|
- stage: Build_SDK
|
||||||
|
displayName: Build SDK
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: .pipelines/v2/templates/job-build-sdk.yml@self
|
||||||
|
parameters:
|
||||||
|
pool:
|
||||||
|
name: SHINE-INT-L
|
||||||
|
image: SHINE-VS17-Latest
|
||||||
|
os: windows
|
||||||
|
codeSign: true
|
||||||
|
sdkVersionNumber: ${{ parameters.cmdPalSdkVersionNumber }}
|
||||||
|
signingIdentity:
|
||||||
|
serviceName: $(SigningServiceName)
|
||||||
|
appId: $(SigningAppId)
|
||||||
|
tenantId: $(SigningTenantId)
|
||||||
|
akvName: $(SigningAKVName)
|
||||||
|
authCertName: $(SigningAuthCertName)
|
||||||
|
signCertName: $(SigningSignCertName)
|
||||||
|
useManagedIdentity: $(SigningUseManagedIdentity)
|
||||||
|
clientId: $(SigningOriginalClientId)
|
||||||
|
|
||||||
- stage: Publish
|
- stage: Publish
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
dependsOn: [Build]
|
dependsOn: [Build]
|
||||||
|
@ -56,6 +56,9 @@ parameters:
|
|||||||
- name: versionNumber
|
- name: versionNumber
|
||||||
type: string
|
type: string
|
||||||
default: '0.0.1'
|
default: '0.0.1'
|
||||||
|
- name: cmdPalVersionNumber
|
||||||
|
type: string
|
||||||
|
default: '0.0.1'
|
||||||
- name: useLatestWinAppSDK
|
- name: useLatestWinAppSDK
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
@ -96,6 +99,7 @@ jobs:
|
|||||||
${{ else }}:
|
${{ else }}:
|
||||||
OutputBuildPlatform: ${{ platform }}
|
OutputBuildPlatform: ${{ platform }}
|
||||||
variables:
|
variables:
|
||||||
|
MakeAppxPath: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\MakeAppx.exe'
|
||||||
# Azure DevOps abhors a vacuum
|
# Azure DevOps abhors a vacuum
|
||||||
# If these are blank, expansion will fail later on... which will result in direct substitution of the variable *names*
|
# If these are blank, expansion will fail later on... which will result in direct substitution of the variable *names*
|
||||||
# later on. We'll just... set them to a single space and if we need to, check IsNullOrWhiteSpace.
|
# later on. We'll just... set them to a single space and if we need to, check IsNullOrWhiteSpace.
|
||||||
@ -237,6 +241,32 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Stage SDK/build
|
||||||
|
inputs:
|
||||||
|
contents: |-
|
||||||
|
"**/cmdpal/extensionsdk/nuget/Microsoft.CommandPalette.Extensions.SDK.props"
|
||||||
|
"**/cmdpal/extensionsdk/nuget/Microsoft.CommandPalette.Extensions.SDK.targets"
|
||||||
|
flattenFolders: True
|
||||||
|
targetFolder: $(JobOutputDirectory)/sdk/build
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Stage SDK/lib
|
||||||
|
inputs:
|
||||||
|
contents: |-
|
||||||
|
"**/Microsoft.CommandPalette.Extensions.Toolkit/$(BuildPlatform)/release/WinUI3Apps/CmdPal/Microsoft.CommandPalette.Extensions.Toolkit.dll"
|
||||||
|
"**/Microsoft.CommandPalette.Extensions.Toolkit/$(BuildPlatform)/release/WinUI3Apps/CmdPal/Microsoft.CommandPalette.Extensions.Toolkit.deps.json"
|
||||||
|
flattenFolders: True
|
||||||
|
targetFolder: $(JobOutputDirectory)/sdk/lib/net8.0-windows10.0.19041.0
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Stage SDK/winmd
|
||||||
|
inputs:
|
||||||
|
contents: |-
|
||||||
|
"**/Microsoft.CommandPalette.Extensions/$(BuildPlatform)/release/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.winmd"
|
||||||
|
flattenFolders: True
|
||||||
|
targetFolder: $(JobOutputDirectory)/sdk/winmd
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: VSBuild@1
|
||||||
displayName: Build BugReportTool
|
displayName: Build BugReportTool
|
||||||
inputs:
|
inputs:
|
||||||
@ -304,7 +334,7 @@ jobs:
|
|||||||
displayName: HACK Copy core WebView2 ARM64 dll to output directory
|
displayName: HACK Copy core WebView2 ARM64 dll to output directory
|
||||||
condition: eq(variables['BuildPlatform'],'arm64')
|
condition: eq(variables['BuildPlatform'],'arm64')
|
||||||
inputs:
|
inputs:
|
||||||
contents: packages/Microsoft.Web.WebView2.1.0.2739.15/runtimes/win-ARM64/native_uap/Microsoft.Web.WebView2.Core.dll
|
contents: packages/Microsoft.Web.WebView2.1.0.2903.40/runtimes/win-ARM64/native_uap/Microsoft.Web.WebView2.Core.dll
|
||||||
targetFolder: $(Build.SourcesDirectory)/ARM64/Release/WinUI3Apps/
|
targetFolder: $(Build.SourcesDirectory)/ARM64/Release/WinUI3Apps/
|
||||||
flattenFolders: True
|
flattenFolders: True
|
||||||
OverWrite: True
|
OverWrite: True
|
||||||
@ -355,6 +385,33 @@ jobs:
|
|||||||
!**\obj\**
|
!**\obj\**
|
||||||
|
|
||||||
- ${{ if eq(parameters.codeSign, true) }}:
|
- ${{ if eq(parameters.codeSign, true) }}:
|
||||||
|
- pwsh: |-
|
||||||
|
$Package = (Get-ChildItem -Recurse -Filter "Microsoft.CmdPal.UI_*.msix" | Select -First 1)
|
||||||
|
$PackageFilename = $Package.FullName
|
||||||
|
Write-Host "##vso[task.setvariable variable=CmdPalPackagePath]${PackageFilename}"
|
||||||
|
displayName: Locate the MSIX
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
|
& "$(MakeAppxPath)" unpack /p "$(CmdPalPackagePath)" /d "$(JobOutputDirectory)/CmdPalPackageContents"
|
||||||
|
displayName: Unpack the MSIX for signing
|
||||||
|
|
||||||
|
- template: steps-esrp-signing.yml
|
||||||
|
parameters:
|
||||||
|
displayName: Sign CmdPal MSIX content
|
||||||
|
signingIdentity: ${{ parameters.signingIdentity }}
|
||||||
|
inputs:
|
||||||
|
FolderPath: '$(JobOutputDirectory)/CmdPalPackageContents'
|
||||||
|
signType: batchSigning
|
||||||
|
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_cmdpal_msix_content.json'
|
||||||
|
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
|
$outDir = New-Item -Type Directory "$(JobOutputDirectory)/_appx" -ErrorAction:Ignore
|
||||||
|
$PackageFilename = Join-Path $outDir.FullName (Split-Path -Leaf "$(CmdPalPackagePath)")
|
||||||
|
& "$(MakeAppxPath)" pack /h SHA256 /o /p $PackageFilename /d "$(JobOutputDirectory)/CmdPalPackageContents"
|
||||||
|
Copy-Item -Force $PackageFilename "$(CmdPalPackagePath)"
|
||||||
|
displayName: Re-pack the new CmdPal package after signing
|
||||||
|
|
||||||
- template: steps-esrp-signing.yml
|
- template: steps-esrp-signing.yml
|
||||||
parameters:
|
parameters:
|
||||||
displayName: Sign Core PowerToys
|
displayName: Sign Core PowerToys
|
||||||
@ -430,7 +487,7 @@ jobs:
|
|||||||
$machinePlat = "hash_machine_$(BuildPlatform).txt";
|
$machinePlat = "hash_machine_$(BuildPlatform).txt";
|
||||||
$combinedUserPath = $p + $userPlat;
|
$combinedUserPath = $p + $userPlat;
|
||||||
$combinedMachinePath = $p + $machinePlat;
|
$combinedMachinePath = $p + $machinePlat;
|
||||||
|
|
||||||
echo $p
|
echo $p
|
||||||
|
|
||||||
echo $userPlat
|
echo $userPlat
|
||||||
@ -440,7 +497,7 @@ jobs:
|
|||||||
echo $machinePlat
|
echo $machinePlat
|
||||||
echo $machineHash
|
echo $machineHash
|
||||||
echo $combinedMachinePath
|
echo $combinedMachinePath
|
||||||
|
|
||||||
$userHash | out-file -filepath $combinedUserPath
|
$userHash | out-file -filepath $combinedUserPath
|
||||||
$machineHash | out-file -filepath $combinedMachinePath
|
$machineHash | out-file -filepath $combinedMachinePath
|
||||||
displayName: Calculate file hashes
|
displayName: Calculate file hashes
|
||||||
|
91
.pipelines/v2/templates/job-build-sdk.yml
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
parameters:
|
||||||
|
- name: buildConfigurations
|
||||||
|
type: object
|
||||||
|
default:
|
||||||
|
- Release
|
||||||
|
- name: codeSign
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
- name: pool
|
||||||
|
type: object
|
||||||
|
default: []
|
||||||
|
- name: signingIdentity
|
||||||
|
type: object
|
||||||
|
default: {}
|
||||||
|
- name: sdkVersionNumber
|
||||||
|
type: string
|
||||||
|
default: '0.0.1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: "BuildSDK"
|
||||||
|
${{ if ne(length(parameters.pool), 0) }}:
|
||||||
|
pool: ${{ parameters.pool }}
|
||||||
|
displayName: Build SDK
|
||||||
|
timeoutInMinutes: 240
|
||||||
|
cancelTimeoutInMinutes: 1
|
||||||
|
templateContext: # Required when this template is hosted in 1ES PT
|
||||||
|
outputs:
|
||||||
|
- output: pipelineArtifact
|
||||||
|
artifactName: SDK
|
||||||
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
clean: true
|
||||||
|
submodules: true
|
||||||
|
persistCredentials: True
|
||||||
|
fetchTags: false
|
||||||
|
fetchDepth: 1
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
|
& "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -VersionOfSDK ${{ parameters.sdkVersionNumber }} -BuildStep "build" -IsAzurePipelineBuild
|
||||||
|
displayName: Build SDK
|
||||||
|
|
||||||
|
- ${{ if eq(parameters.codeSign, true) }}:
|
||||||
|
- template: steps-esrp-signing.yml
|
||||||
|
parameters:
|
||||||
|
displayName: Sign SDK
|
||||||
|
signingIdentity: ${{ parameters.signingIdentity }}
|
||||||
|
inputs:
|
||||||
|
FolderPath: 'src/modules'
|
||||||
|
signType: batchSigning
|
||||||
|
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_sdk.json'
|
||||||
|
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
|
& "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -VersionOfSDK ${{ parameters.sdkVersionNumber }} -BuildStep "pack" -IsAzurePipelineBuild
|
||||||
|
displayName: Pack SDK
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Copy Nuget to Artifact Staging
|
||||||
|
inputs:
|
||||||
|
sourceFolder: "$(build.sourcesdirectory)/src/modules/cmdpal/extensionsdk/_build"
|
||||||
|
contents: '*.nupkg'
|
||||||
|
targetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
- ${{ if eq(parameters.codeSign, true) }}:
|
||||||
|
- template: steps-esrp-signing.yml
|
||||||
|
parameters:
|
||||||
|
displayName: Sign NuGet packages
|
||||||
|
signingIdentity: ${{ parameters.signingIdentity }}
|
||||||
|
inputs:
|
||||||
|
FolderPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
Pattern: '*.nupkg'
|
||||||
|
UseMinimatch: true
|
||||||
|
signConfigType: inlineSignParams
|
||||||
|
inlineOperation: >-
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-401405",
|
||||||
|
"OperationCode": "NuGetSign",
|
||||||
|
"Parameters": {},
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-401405",
|
||||||
|
"OperationCode": "NuGetVerify",
|
||||||
|
"Parameters": {},
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
}
|
||||||
|
]
|
@ -105,4 +105,4 @@ jobs:
|
|||||||
**\UITests-FancyZones.dll
|
**\UITests-FancyZones.dll
|
||||||
**\UITests-FancyZonesEditor.dll
|
**\UITests-FancyZonesEditor.dll
|
||||||
!**\obj\**
|
!**\obj\**
|
||||||
!**\ref\**
|
!**\ref\**
|
@ -87,6 +87,30 @@ steps:
|
|||||||
dir $(build.sourcesdirectory)\extractedMsi
|
dir $(build.sourcesdirectory)\extractedMsi
|
||||||
displayName: "${{replace(replace(parameters.buildUserInstaller,'True','👤'),'False','💻')}} Extract and verify MSI"
|
displayName: "${{replace(replace(parameters.buildUserInstaller,'True','👤'),'False','💻')}} Extract and verify MSI"
|
||||||
|
|
||||||
|
# Extract CmdPal msix package to check if its content is signed
|
||||||
|
- pwsh: |-
|
||||||
|
Write-Host "Extracting CmdPal MSIX package"
|
||||||
|
|
||||||
|
# Define the directory to search
|
||||||
|
$searchDir = "extractedMsi\File"
|
||||||
|
|
||||||
|
# Define the regex pattern for MSIX files
|
||||||
|
$pattern = '^Microsoft.CmdPal.UI.*\.msix$'
|
||||||
|
|
||||||
|
# Get all files in the directory and subdirectories
|
||||||
|
$msixFile = Get-ChildItem -Path $searchDir -Recurse -File | Where-Object {
|
||||||
|
$_.Name -match $pattern
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "MSIX file found: " $msixFile
|
||||||
|
|
||||||
|
$destinationDir = "$(build.sourcesdirectory)\extractedMsi\File\extractedCmdPalMsix"
|
||||||
|
|
||||||
|
Expand-Archive -Path $msixFile -DestinationPath $destinationDir
|
||||||
|
Get-ChildItem -Path $destinationDir -Recurse -File
|
||||||
|
|
||||||
|
displayName: ${{replace(replace(parameters.buildUserInstaller,'True','👤'),'False','💻')}} Extract CmdPal MSIX package
|
||||||
|
|
||||||
# Check if deps.json files don't reference different dll versions.
|
# Check if deps.json files don't reference different dll versions.
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
& '.pipelines/verifyDepsJsonLibraryVersions.ps1' -targetDir '$(build.sourcesdirectory)\extractedMsi\File'
|
& '.pipelines/verifyDepsJsonLibraryVersions.ps1' -targetDir '$(build.sourcesdirectory)\extractedMsi\File'
|
||||||
|
@ -18,6 +18,11 @@ $totalFailures = 0
|
|||||||
Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude *UITest*,MouseJump.Common.UnitTests*,*.FuzzTests* | ForEach-Object {
|
Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude *UITest*,MouseJump.Common.UnitTests*,*.FuzzTests* | ForEach-Object {
|
||||||
# Temporarily exclude All UI-Test, Fuzzer-Test projects because of Appium.WebDriver dependencies
|
# Temporarily exclude All UI-Test, Fuzzer-Test projects because of Appium.WebDriver dependencies
|
||||||
$depsJsonFullFileName = $_.FullName
|
$depsJsonFullFileName = $_.FullName
|
||||||
|
|
||||||
|
if ($depsJsonFullFileName -like "*CmdPal*") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
$depsJsonFileName = $_.Name
|
$depsJsonFileName = $_.Name
|
||||||
$depsJson = Get-Content $depsJsonFullFileName | ConvertFrom-Json
|
$depsJson = Get-Content $depsJsonFullFileName | ConvertFrom-Json
|
||||||
|
|
||||||
|
@ -22,7 +22,11 @@ $versionExceptions = @(
|
|||||||
"TraceReloggerLib.dll",
|
"TraceReloggerLib.dll",
|
||||||
"Microsoft.WindowsAppRuntime.Release.Net.dll",
|
"Microsoft.WindowsAppRuntime.Release.Net.dll",
|
||||||
"Microsoft.Windows.Widgets.Projection.dll",
|
"Microsoft.Windows.Widgets.Projection.dll",
|
||||||
"WinRT.Host.Shim.dll") -join '|';
|
"WinRT.Host.Shim.dll",
|
||||||
|
"WyHash.dll",
|
||||||
|
"Microsoft.Recognizers.Text.DataTypes.TimexExpression.dll",
|
||||||
|
"ObjectModelCsProjection.dll",
|
||||||
|
"RendererCsProjection.dll") -join '|';
|
||||||
$nullVersionExceptions = @(
|
$nullVersionExceptions = @(
|
||||||
"codicon.ttf",
|
"codicon.ttf",
|
||||||
"e_sqlite3.dll",
|
"e_sqlite3.dll",
|
||||||
@ -43,12 +47,14 @@ $nullVersionExceptions = @(
|
|||||||
"PushNotificationsLongRunningTask.ProxyStub.dll",
|
"PushNotificationsLongRunningTask.ProxyStub.dll",
|
||||||
"WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll",
|
"WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll",
|
||||||
"System.Diagnostics.EventLog.Messages.dll",
|
"System.Diagnostics.EventLog.Messages.dll",
|
||||||
"Microsoft.Windows.Widgets.dll") -join '|';
|
"Microsoft.Windows.Widgets.dll",
|
||||||
|
"AdaptiveCards.ObjectModel.WinUI3.dll",
|
||||||
|
"AdaptiveCards.Rendering.WinUI3.dll") -join '|';
|
||||||
$totalFailure = 0;
|
$totalFailure = 0;
|
||||||
|
|
||||||
Write-Host $DirPath;
|
Write-Host $DirPath;
|
||||||
|
|
||||||
if (-not (Test-Path $DirPath)) {
|
if (-not (Test-Path $DirPath)) {
|
||||||
Write-Error "Folder does not exist!"
|
Write-Error "Folder does not exist!"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +76,7 @@ $items | ForEach-Object {
|
|||||||
Write-Host "Version set to 1.0.0.0: " + $_.FullName
|
Write-Host "Version set to 1.0.0.0: " + $_.FullName
|
||||||
$totalFailure++;
|
$totalFailure++;
|
||||||
}
|
}
|
||||||
elseif ($_.VersionInfo.FileVersion -eq $null -and $_.Name -notmatch $nullVersionExceptions) {
|
elseif ($_.VersionInfo.FileVersion -eq $null -and $_.Name -notmatch $nullVersionExceptions) {
|
||||||
# These items are exceptions that actually a version not set.
|
# These items are exceptions that actually a version not set.
|
||||||
Write-Host "Version not set: " + $_.FullName
|
Write-Host "Version not set: " + $_.FullName
|
||||||
$totalFailure++;
|
$totalFailure++;
|
||||||
|
@ -5,7 +5,10 @@ Param(
|
|||||||
|
|
||||||
[Parameter(Mandatory=$True,Position=2)]
|
[Parameter(Mandatory=$True,Position=2)]
|
||||||
[AllowEmptyString()]
|
[AllowEmptyString()]
|
||||||
[string]$DevEnvironment = "Local"
|
[string]$DevEnvironment = "Local",
|
||||||
|
|
||||||
|
[Parameter(Mandatory=$True,Position=3)]
|
||||||
|
[string]$cmdPalVersionNumber = "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
Write-Host $PSScriptRoot
|
Write-Host $PSScriptRoot
|
||||||
@ -38,9 +41,20 @@ $verPropReadFileLocation = $verPropWriteFileLocation;
|
|||||||
$verProps.Project.PropertyGroup.Version = $versionNumber;
|
$verProps.Project.PropertyGroup.Version = $versionNumber;
|
||||||
$verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment;
|
$verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment;
|
||||||
|
|
||||||
Write-Host "xml" $verProps.Project.PropertyGroup.Version
|
Write-Host "xml" $verProps.Project.PropertyGroup.Version
|
||||||
$verProps.Save($verPropWriteFileLocation);
|
$verProps.Save($verPropWriteFileLocation);
|
||||||
|
|
||||||
|
|
||||||
|
#### The same thing as above, but for the CmdPal version
|
||||||
|
$verPropWriteFileLocation = $PSScriptRoot + '/../src/CmdPalVersion.props';
|
||||||
|
$verPropReadFileLocation = $verPropWriteFileLocation;
|
||||||
|
[XML]$verProps = Get-Content $verPropReadFileLocation
|
||||||
|
$verProps.Project.PropertyGroup.CmdPalVersion = $cmdPalVersionNumber;
|
||||||
|
$verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment;
|
||||||
|
Write-Host "xml" $verProps.Project.PropertyGroup.Version
|
||||||
|
$verProps.Save($verPropWriteFileLocation);
|
||||||
|
#######
|
||||||
|
|
||||||
# Set PowerRenameContextMenu package version in AppManifest.xml
|
# Set PowerRenameContextMenu package version in AppManifest.xml
|
||||||
$powerRenameContextMenuAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/powerrename/PowerRenameContextMenu/AppxManifest.xml';
|
$powerRenameContextMenuAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/powerrename/PowerRenameContextMenu/AppxManifest.xml';
|
||||||
$powerRenameContextMenuAppManifestReadFileLocation = $powerRenameContextMenuAppManifestWriteFileLocation;
|
$powerRenameContextMenuAppManifestReadFileLocation = $powerRenameContextMenuAppManifestWriteFileLocation;
|
||||||
@ -76,3 +90,12 @@ $newPlusContextMenuAppManifestReadFileLocation = $newPlusContextMenuAppManifestW
|
|||||||
$newPlusContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0'
|
$newPlusContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0'
|
||||||
Write-Host "NewPlusContextMenu version" $newPlusContextMenuAppManifest.Package.Identity.Version
|
Write-Host "NewPlusContextMenu version" $newPlusContextMenuAppManifest.Package.Identity.Version
|
||||||
$newPlusContextMenuAppManifest.Save($newPlusContextMenuAppManifestWriteFileLocation);
|
$newPlusContextMenuAppManifest.Save($newPlusContextMenuAppManifestWriteFileLocation);
|
||||||
|
|
||||||
|
# Set package version in Package.appxmanifest
|
||||||
|
$cmdPalAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/cmdpal/Microsoft.CmdPal.UI/Package.appxmanifest';
|
||||||
|
$cmdPalAppManifestReadFileLocation = $cmdPalAppManifestWriteFileLocation;
|
||||||
|
|
||||||
|
[XML]$cmdPalAppManifest = Get-Content $cmdPalAppManifestReadFileLocation
|
||||||
|
$cmdPalAppManifest.Package.Identity.Version = $cmdPalVersionNumber + '.0'
|
||||||
|
Write-Host "CmdPal Package version: " $cmdPalAppManifest.Package.Identity.Version
|
||||||
|
$cmdPalAppManifest.Save($cmdPalAppManifestWriteFileLocation);
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"components": [
|
"components": [
|
||||||
"Microsoft.VisualStudio.Component.CoreEditor",
|
"Microsoft.VisualStudio.Component.CoreEditor",
|
||||||
"Microsoft.VisualStudio.Workload.CoreEditor",
|
"Microsoft.VisualStudio.Workload.CoreEditor",
|
||||||
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
||||||
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
||||||
"Microsoft.VisualStudio.Workload.Universal",
|
"Microsoft.VisualStudio.Workload.Universal",
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
|
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
|
||||||
|
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.22621",
|
"Microsoft.VisualStudio.Component.Windows10SDK.22621",
|
||||||
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
||||||
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
|
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
|
||||||
@ -18,4 +19,4 @@
|
|||||||
"Microsoft.VisualStudio.Component.VC.ATL.Spectre",
|
"Microsoft.VisualStudio.Component.VC.ATL.Spectre",
|
||||||
"Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs"
|
"Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -3,17 +3,21 @@
|
|||||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageVersion Include="AdaptiveCards.ObjectModel.WinUI3" Version="2.0.0-beta" />
|
||||||
|
<PackageVersion Include="AdaptiveCards.Rendering.WinUI3" Version="2.1.0-beta" />
|
||||||
|
<PackageVersion Include="AdaptiveCards.Templating" Version="2.0.2" />
|
||||||
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
|
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
|
||||||
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.17" />
|
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.17" />
|
||||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
<PackageVersion Include="CommunityToolkit.Common" Version="8.4.0" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.0.240109" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.2.250129-preview2" />
|
||||||
|
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.2.250129-preview2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
||||||
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
||||||
@ -38,9 +42,10 @@
|
|||||||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.3" />
|
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.3" />
|
||||||
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.15.0" />
|
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.15.0" />
|
||||||
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
||||||
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2739.15" />
|
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2903.40" />
|
||||||
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
|
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
|
||||||
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="9.0.3" />
|
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="9.0.3" />
|
||||||
|
<PackageVersion Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.10.120-preview" />
|
||||||
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="9.0.3" />
|
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="9.0.3" />
|
||||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
||||||
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
||||||
@ -92,6 +97,7 @@
|
|||||||
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
|
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
|
||||||
<PackageVersion Include="WinUIEx" Version="2.2.0" />
|
<PackageVersion Include="WinUIEx" Version="2.2.0" />
|
||||||
<PackageVersion Include="WPF-UI" Version="3.0.5" />
|
<PackageVersion Include="WPF-UI" Version="3.0.5" />
|
||||||
|
<PackageVersion Include="WyHash" Version="1.0.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
||||||
<!-- Additional dependencies used by experimentation -->
|
<!-- Additional dependencies used by experimentation -->
|
||||||
|
64
NOTICE.md
@ -1323,6 +1323,43 @@ EXHIBIT A -Mozilla Public License.
|
|||||||
Original Code Source Code for Your Modifications.]
|
Original Code Source Code for Your Modifications.]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Utility: Command Palette
|
||||||
|
|
||||||
|
### wyhash
|
||||||
|
|
||||||
|
We use the WyHash NuGet package for calculating stable hashes for strings.
|
||||||
|
|
||||||
|
**Source**: [https://github.com/wangyi-fudan/wyhash](https://github.com/wangyi-fudan/wyhash)
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
```
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
|
```
|
||||||
|
|
||||||
## Utility: Registry Preview
|
## Utility: Registry Preview
|
||||||
|
|
||||||
### Monaco Editor
|
### Monaco Editor
|
||||||
@ -1355,17 +1392,22 @@ SOFTWARE.
|
|||||||
|
|
||||||
## NuGet Packages used by PowerToys
|
## NuGet Packages used by PowerToys
|
||||||
|
|
||||||
|
|
||||||
|
- AdaptiveCards.ObjectModel.WinUI3 2.0.0-beta
|
||||||
|
- AdaptiveCards.Rendering.WinUI3 2.1.0-beta
|
||||||
|
- AdaptiveCards.Templating 2.0.2
|
||||||
- Appium.WebDriver 4.4.5
|
- Appium.WebDriver 4.4.5
|
||||||
- Azure.AI.OpenAI 1.0.0-beta.17
|
- Azure.AI.OpenAI 1.0.0-beta.17
|
||||||
- CommunityToolkit.Mvvm 8.2.2
|
- CommunityToolkit.Common 8.4.0
|
||||||
- CommunityToolkit.WinUI.Animations 8.0.240109
|
- CommunityToolkit.Mvvm 8.4.0
|
||||||
- CommunityToolkit.WinUI.Collections 8.0.240109
|
- CommunityToolkit.WinUI.Animations 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Controls.Primitives 8.0.240109
|
- CommunityToolkit.WinUI.Collections 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Controls.Segmented 8.0.240109
|
- CommunityToolkit.WinUI.Controls.Primitives 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.240109
|
- CommunityToolkit.WinUI.Controls.Segmented 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Controls.Sizers 8.0.240109
|
- CommunityToolkit.WinUI.Controls.SettingsControls 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Converters 8.0.240109
|
- CommunityToolkit.WinUI.Controls.Sizers 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.Extensions 8.0.240109
|
- CommunityToolkit.WinUI.Converters 8.2.250129-preview2
|
||||||
|
- CommunityToolkit.WinUI.Extensions 8.2.250129-preview2
|
||||||
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
|
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
|
||||||
- CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2
|
- CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2
|
||||||
- ControlzEx 6.0.0
|
- ControlzEx 6.0.0
|
||||||
@ -1390,13 +1432,14 @@ SOFTWARE.
|
|||||||
- Microsoft.NET.ILLink.Tasks (A)
|
- Microsoft.NET.ILLink.Tasks (A)
|
||||||
- Microsoft.SemanticKernel 1.15.0
|
- Microsoft.SemanticKernel 1.15.0
|
||||||
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
|
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
|
||||||
- Microsoft.Web.WebView2 1.0.2739.15
|
- Microsoft.Web.WebView2 1.0.2903.40
|
||||||
- Microsoft.Win32.SystemEvents 9.0.3
|
- Microsoft.Win32.SystemEvents 9.0.3
|
||||||
- Microsoft.Windows.Compatibility 9.0.3
|
- Microsoft.Windows.Compatibility 9.0.3
|
||||||
- Microsoft.Windows.CsWin32 0.2.46-beta
|
- Microsoft.Windows.CsWin32 0.2.46-beta
|
||||||
- Microsoft.Windows.CsWinRT 2.2.0
|
- Microsoft.Windows.CsWinRT 2.2.0
|
||||||
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
|
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
|
||||||
- Microsoft.WindowsAppSDK 1.6.250205002
|
- Microsoft.WindowsAppSDK 1.6.250205002
|
||||||
|
- Microsoft.WindowsPackageManager.ComInterop 1.10.120-preview
|
||||||
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
||||||
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
||||||
- ModernWpfUI 0.9.4
|
- ModernWpfUI 0.9.4
|
||||||
@ -1432,3 +1475,4 @@ SOFTWARE.
|
|||||||
- UTF.Unknown 2.5.1
|
- UTF.Unknown 2.5.1
|
||||||
- WinUIEx 2.2.0
|
- WinUIEx 2.2.0
|
||||||
- WPF-UI 3.0.5
|
- WPF-UI 3.0.5
|
||||||
|
- WyHash 1.0.5
|
||||||
|
307
PowerToys.sln
@ -620,10 +620,64 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EtwTrace", "src\common\Tele
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseWithoutBorders.UnitTests", "src\modules\MouseWithoutBorders\MouseWithoutBorders.UnitTests\MouseWithoutBorders.UnitTests.csproj", "{66614C26-314C-4B91-9071-76133422CFEF}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseWithoutBorders.UnitTests", "src\modules\MouseWithoutBorders\MouseWithoutBorders.UnitTests\MouseWithoutBorders.UnitTests.csproj", "{66614C26-314C-4B91-9071-76133422CFEF}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CommandPalette", "CommandPalette", "{3846508C-77EB-4034-A702-F8BB263C4F79}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Built-in Extensions", "Built-in Extensions", "{ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.Apps", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Apps\Microsoft.CmdPal.Ext.Apps.csproj", "{6CE438DF-C245-4997-A360-0A0939E4BA34}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.Bookmarks", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Bookmark\Microsoft.CmdPal.Ext.Bookmarks.csproj", "{E09AA983-C755-474F-83D6-A5CDF528C070}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.Calc", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Calc\Microsoft.CmdPal.Ext.Calc.csproj", "{6D56B64D-FF1F-488F-AFED-9B9854A5D399}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.Registry", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Registry\Microsoft.CmdPal.Ext.Registry.csproj", "{92EC89E4-9972-453A-8A1A-3A9E230C146A}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.WindowsServices", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WindowsServices\Microsoft.CmdPal.Ext.WindowsServices.csproj", "{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.WindowsSettings", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WindowsSettings\Microsoft.CmdPal.Ext.WindowsSettings.csproj", "{D1160404-D3D1-497A-883A-4059C07C2273}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.WindowsTerminal", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WindowsTerminal\Microsoft.CmdPal.Ext.WindowsTerminal.csproj", "{40F6D69D-E321-400F-A767-5628C7AE453D}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extension SDK", "Extension SDK", "{F3D09629-59A2-4924-A4B9-D6BFAA2C1B49}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.CommandPalette.Extensions", "src\modules\cmdpal\extensionsdk\Microsoft.CommandPalette.Extensions\Microsoft.CommandPalette.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CommandPalette.Extensions.Toolkit", "src\modules\cmdpal\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\Microsoft.CommandPalette.Extensions.Toolkit.csproj", "{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "src\modules\cmdpal\Microsoft.CmdPal.Common\Microsoft.CmdPal.Common.csproj", "{14E62033-58D0-4A7D-8990-52F50A08BBBD}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "src\modules\cmdpal\Microsoft.Terminal.UI\Microsoft.Terminal.UI.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample Extensions", "Sample Extensions", "{071E18A4-A530-46B8-AB7D-B862EE55E24E}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProcessMonitorExtension", "src\modules\cmdpal\Exts\ProcessMonitorExtension\ProcessMonitorExtension.csproj", "{C846F7A7-792A-47D9-B0CB-417C900EE03D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SamplePagesExtension", "src\modules\cmdpal\Exts\SamplePagesExtension\SamplePagesExtension.csproj", "{C831231F-891C-4572-9694-45062534B42A}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{7520A2FE-00A2-49B8-83ED-DB216E874C04}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.UI", "src\modules\cmdpal\Microsoft.CmdPal.UI\Microsoft.CmdPal.UI.csproj", "{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.UI.ViewModels", "src\modules\cmdpal\Microsoft.CmdPal.UI.ViewModels\Microsoft.CmdPal.UI.ViewModels.csproj", "{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.ClipboardHistory", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.ClipboardHistory\Microsoft.CmdPal.Ext.ClipboardHistory.csproj", "{79775343-7A3D-445D-9104-3DD5B2893DF9}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdPalModuleInterface", "src\modules\cmdpal\CmdPalModuleInterface\CmdPalModuleInterface.vcxproj", "{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkspacesCsharpLibrary", "src\modules\Workspaces\WorkspacesCsharpLibrary\WorkspacesCsharpLibrary.csproj", "{89D0E199-B17A-418C-B2F8-7375B6708357}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkspacesCsharpLibrary", "src\modules\Workspaces\WorkspacesCsharpLibrary\WorkspacesCsharpLibrary.csproj", "{89D0E199-B17A-418C-B2F8-7375B6708357}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewPlus.ShellExtension.win10", "src\modules\NewPlus\NewShellExtensionContextMenu.win10\NewPlus.ShellExtension.win10.vcxproj", "{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewPlus.ShellExtension.win10", "src\modules\NewPlus\NewShellExtensionContextMenu.win10\NewPlus.ShellExtension.win10.vcxproj", "{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.Indexer", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Indexer\Microsoft.CmdPal.Ext.Indexer.csproj", "{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.Shell", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.Shell\Microsoft.CmdPal.Ext.Shell.csproj", "{C0CE3B5E-16D3-495D-B335-CA791B660162}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Ext.WindowWalker", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WindowWalker\Microsoft.CmdPal.Ext.WindowWalker.csproj", "{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.WebSearch", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WebSearch\Microsoft.CmdPal.Ext.WebSearch.csproj", "{605E914B-7232-4789-AF46-BF5D3DDFC14E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.WinGet", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.WinGet\Microsoft.CmdPal.Ext.WinGet.csproj", "{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.UnitTests", "src\modules\AdvancedPaste\AdvancedPaste.UnitTests\AdvancedPaste.UnitTests.csproj", "{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.UnitTests", "src\modules\AdvancedPaste\AdvancedPaste.UnitTests\AdvancedPaste.UnitTests.csproj", "{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.FuzzTests", "src\modules\AdvancedPaste\AdvancedPaste.FuzzTests\AdvancedPaste.FuzzTests.csproj", "{7F5B9557-5878-4438-A721-3E28296BA193}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedPaste.FuzzTests", "src\modules\AdvancedPaste\AdvancedPaste.FuzzTests\AdvancedPaste.FuzzTests.csproj", "{7F5B9557-5878-4438-A721-3E28296BA193}"
|
||||||
@ -636,6 +690,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZoomItModuleInterface", "sr
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZoomItSettingsInterop", "src\modules\ZoomIt\ZoomItSettingsInterop\ZoomItSettingsInterop.vcxproj", "{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZoomItSettingsInterop", "src\modules\ZoomIt\ZoomItSettingsInterop\ZoomItSettingsInterop.vcxproj", "{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.TimeDate", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.TimeDate\Microsoft.CmdPal.Ext.TimeDate.csproj", "{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UITestAutomation", "src\common\UITestAutomation\UITestAutomation.csproj", "{A558C25D-2007-498E-8B6F-43405AFAE9E2}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UITestAutomation", "src\common\UITestAutomation\UITestAutomation.csproj", "{A558C25D-2007-498E-8B6F-43405AFAE9E2}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyboardManagerEditorUI", "src\modules\keyboardmanager\KeyboardManagerEditorUI\KeyboardManagerEditorUI.csproj", "{08F9155D-B6DC-46E5-9C83-AF60B655898B}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyboardManagerEditorUI", "src\modules\keyboardmanager\KeyboardManagerEditorUI\KeyboardManagerEditorUI.csproj", "{08F9155D-B6DC-46E5-9C83-AF60B655898B}"
|
||||||
@ -648,6 +704,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hosts.UITests", "src\module
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegistryPreview.FuzzTests", "src\modules\registrypreview\RegistryPreview.FuzzTests\RegistryPreview.FuzzTests.csproj", "{5702B3CC-8575-48D5-83D8-15BB42269CD3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegistryPreview.FuzzTests", "src\modules\registrypreview\RegistryPreview.FuzzTests\RegistryPreview.FuzzTests.csproj", "{5702B3CC-8575-48D5-83D8-15BB42269CD3}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.System", "src\modules\cmdpal\Exts\Microsoft.CmdPal.Ext.System\Microsoft.CmdPal.Ext.System.csproj", "{64B88F02-CD88-4ED8-9624-989A800230F9}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|ARM64 = Debug|ARM64
|
Debug|ARM64 = Debug|ARM64
|
||||||
@ -2200,6 +2258,154 @@ Global
|
|||||||
{66614C26-314C-4B91-9071-76133422CFEF}.Release|ARM64.Build.0 = Release|ARM64
|
{66614C26-314C-4B91-9071-76133422CFEF}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
{66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.ActiveCfg = Release|x64
|
{66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.ActiveCfg = Release|x64
|
||||||
{66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.Build.0 = Release|x64
|
{66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.Build.0 = Release|x64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34}.Release|x64.Build.0 = Release|x64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070}.Release|x64.Build.0 = Release|x64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399}.Release|x64.Build.0 = Release|x64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95}.Release|x64.Build.0 = Release|x64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273}.Release|x64.Build.0 = Release|x64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463}.Release|x64.Build.0 = Release|x64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24}.Release|x64.Build.0 = Release|x64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD}.Release|x64.Build.0 = Release|x64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|x64.Build.0 = Release|x64
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2}.Release|x64.Build.0 = Release|x64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9}.Release|x64.Build.0 = Release|x64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8}.Release|x64.Build.0 = Release|x64
|
||||||
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|ARM64.Build.0 = Debug|ARM64
|
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|x64.ActiveCfg = Debug|x64
|
{89D0E199-B17A-418C-B2F8-7375B6708357}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
@ -2216,6 +2422,54 @@ Global
|
|||||||
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|ARM64.Build.0 = Release|ARM64
|
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|x64.ActiveCfg = Release|x64
|
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|x64.ActiveCfg = Release|x64
|
||||||
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|x64.Build.0 = Release|x64
|
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E}.Release|x64.Build.0 = Release|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162}.Release|x64.Build.0 = Release|x64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C}.Release|x64.Build.0 = Release|x64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E}.Release|x64.Build.0 = Release|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|x64.Build.0 = Release|x64
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9}.Release|x64.Deploy.0 = Release|x64
|
||||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|ARM64.Build.0 = Debug|ARM64
|
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|x64.ActiveCfg = Debug|x64
|
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
@ -2256,6 +2510,18 @@ Global
|
|||||||
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|ARM64.Build.0 = Release|ARM64
|
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|x64.ActiveCfg = Release|x64
|
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|x64.ActiveCfg = Release|x64
|
||||||
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|x64.Build.0 = Release|x64
|
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461}.Release|x64.Build.0 = Release|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|x64.Build.0 = Release|x64
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449}.Release|x64.Deploy.0 = Release|x64
|
||||||
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|ARM64.Build.0 = Debug|ARM64
|
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|x64.ActiveCfg = Debug|x64
|
{A558C25D-2007-498E-8B6F-43405AFAE9E2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
@ -2304,6 +2570,18 @@ Global
|
|||||||
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|ARM64.Build.0 = Release|ARM64
|
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|x64.ActiveCfg = Release|x64
|
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|x64.ActiveCfg = Release|x64
|
||||||
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|x64.Build.0 = Release|x64
|
{5702B3CC-8575-48D5-83D8-15BB42269CD3}.Release|x64.Build.0 = Release|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|x86.ActiveCfg = Debug|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Debug|x86.Build.0 = Debug|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|x64.Build.0 = Release|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|x86.ActiveCfg = Release|x64
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9}.Release|x86.Build.0 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -2531,20 +2809,49 @@ Global
|
|||||||
{37D07516-4185-43A4-924F-3C7A5D95ECF6} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
|
{37D07516-4185-43A4-924F-3C7A5D95ECF6} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
|
||||||
{8F021B46-362B-485C-BFBA-CCF83E820CBD} = {8F62026A-294B-41C6-8839-87463613F216}
|
{8F021B46-362B-485C-BFBA-CCF83E820CBD} = {8F62026A-294B-41C6-8839-87463613F216}
|
||||||
{66614C26-314C-4B91-9071-76133422CFEF} = {B6C42F16-73EB-477E-8B0D-4E6CF6C20AAC}
|
{66614C26-314C-4B91-9071-76133422CFEF} = {B6C42F16-73EB-477E-8B0D-4E6CF6C20AAC}
|
||||||
|
{3846508C-77EB-4034-A702-F8BB263C4F79} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||||
|
{ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2} = {3846508C-77EB-4034-A702-F8BB263C4F79}
|
||||||
|
{6CE438DF-C245-4997-A360-0A0939E4BA34} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{E09AA983-C755-474F-83D6-A5CDF528C070} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{6D56B64D-FF1F-488F-AFED-9B9854A5D399} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{92EC89E4-9972-453A-8A1A-3A9E230C146A} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{51939B4F-1F62-4BFF-A6A2-C08646E5BE95} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{D1160404-D3D1-497A-883A-4059C07C2273} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{40F6D69D-E321-400F-A767-5628C7AE453D} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{F3D09629-59A2-4924-A4B9-D6BFAA2C1B49} = {3846508C-77EB-4034-A702-F8BB263C4F79}
|
||||||
|
{305DD37E-C85D-4B08-AAFE-7381FA890463} = {F3D09629-59A2-4924-A4B9-D6BFAA2C1B49}
|
||||||
|
{CA4D810F-C8F4-4B61-9DA9-71807E0B9F24} = {F3D09629-59A2-4924-A4B9-D6BFAA2C1B49}
|
||||||
|
{14E62033-58D0-4A7D-8990-52F50A08BBBD} = {7520A2FE-00A2-49B8-83ED-DB216E874C04}
|
||||||
|
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F} = {7520A2FE-00A2-49B8-83ED-DB216E874C04}
|
||||||
|
{071E18A4-A530-46B8-AB7D-B862EE55E24E} = {3846508C-77EB-4034-A702-F8BB263C4F79}
|
||||||
|
{C846F7A7-792A-47D9-B0CB-417C900EE03D} = {071E18A4-A530-46B8-AB7D-B862EE55E24E}
|
||||||
|
{C831231F-891C-4572-9694-45062534B42A} = {071E18A4-A530-46B8-AB7D-B862EE55E24E}
|
||||||
|
{7520A2FE-00A2-49B8-83ED-DB216E874C04} = {3846508C-77EB-4034-A702-F8BB263C4F79}
|
||||||
|
{8FBDABA4-40EE-4C0E-9BC8-2F6444A6EF90} = {7520A2FE-00A2-49B8-83ED-DB216E874C04}
|
||||||
|
{C66020D1-CB10-4CF7-8715-84C97FD5E5E2} = {7520A2FE-00A2-49B8-83ED-DB216E874C04}
|
||||||
|
{79775343-7A3D-445D-9104-3DD5B2893DF9} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{0ADEB797-C8C7-4FFA-ACD5-2AF6CAD7ECD8} = {3846508C-77EB-4034-A702-F8BB263C4F79}
|
||||||
{89D0E199-B17A-418C-B2F8-7375B6708357} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
|
{89D0E199-B17A-418C-B2F8-7375B6708357} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
|
||||||
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E} = {CA716AE6-FE5C-40AC-BB8F-2C87912687AC}
|
{0DB0F63A-D2F8-4DA3-A650-2D0B8724218E} = {CA716AE6-FE5C-40AC-BB8F-2C87912687AC}
|
||||||
|
{453CBB73-A3CB-4D0B-8D24-6940B86FE21D} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{C0CE3B5E-16D3-495D-B335-CA791B660162} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{3A9A7297-92C4-4F16-B6F9-8D4AB652C86C} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{605E914B-7232-4789-AF46-BF5D3DDFC14E} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
|
{E81A7D20-9862-ABDB-0AAE-9BC5B517A9F9} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
{D5E5F5EA-1B6C-4A73-88BE-304F36C9E4EE} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
||||||
{7F5B9557-5878-4438-A721-3E28296BA193} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
{7F5B9557-5878-4438-A721-3E28296BA193} = {9873BA05-4C41-4819-9283-CF45D795431B}
|
||||||
{DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
{DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||||
{0A84F764-3A88-44CD-AA96-41BDBD48627B} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
{0A84F764-3A88-44CD-AA96-41BDBD48627B} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
||||||
{E4585179-2AC1-4D5F-A3FF-CFC5392F694C} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
{E4585179-2AC1-4D5F-A3FF-CFC5392F694C} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
||||||
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
{CA7D8106-30B9-4AEC-9D05-B69B31B8C461} = {DD6E12FE-5509-4ABC-ACC2-3D6DC98A238C}
|
||||||
|
{DCC6BD67-17BB-47AA-B507-FB0FE43A7449} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
{A558C25D-2007-498E-8B6F-43405AFAE9E2} = {1AFB6476-670D-4E80-A464-657E01DFF482}
|
{A558C25D-2007-498E-8B6F-43405AFAE9E2} = {1AFB6476-670D-4E80-A464-657E01DFF482}
|
||||||
{08F9155D-B6DC-46E5-9C83-AF60B655898B} = {38BDB927-829B-4C65-9CD9-93FB05D66D65}
|
{08F9155D-B6DC-46E5-9C83-AF60B655898B} = {38BDB927-829B-4C65-9CD9-93FB05D66D65}
|
||||||
{4382A954-179A-4078-92AF-715187DFFF50} = {38BDB927-829B-4C65-9CD9-93FB05D66D65}
|
{4382A954-179A-4078-92AF-715187DFFF50} = {38BDB927-829B-4C65-9CD9-93FB05D66D65}
|
||||||
{EBED240C-8702-452D-B764-6DB9DA9179AF} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
|
{EBED240C-8702-452D-B764-6DB9DA9179AF} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
|
||||||
{4E0AE3A4-2EE0-44D7-A2D0-8769977254A0} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
|
{4E0AE3A4-2EE0-44D7-A2D0-8769977254A0} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
|
||||||
{5702B3CC-8575-48D5-83D8-15BB42269CD3} = {929C1324-22E8-4412-A9A8-80E85F3985A5}
|
{5702B3CC-8575-48D5-83D8-15BB42269CD3} = {929C1324-22E8-4412-A9A8-80E85F3985A5}
|
||||||
|
{64B88F02-CD88-4ED8-9624-989A800230F9} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
||||||
|
76
installer/PowerToysSetup/CmdPal.wxs
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||||
|
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||||
|
|
||||||
|
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
||||||
|
|
||||||
|
<?define CmdPalBuildDir="$(var.BinDir)\WinUI3Apps\CmdPal\"?>
|
||||||
|
|
||||||
|
<Fragment>
|
||||||
|
<DirectoryRef Id="WinUI3AppsInstallFolder">
|
||||||
|
<Directory Id="CmdPalInstallFolder" Name="CmdPal">
|
||||||
|
<Directory Id="CmdPalDepsInstallFolder" Name="Dependencies">
|
||||||
|
<?if $(sys.BUILDARCH) = x64 ?>
|
||||||
|
<Directory Id="CmdPalDepsX64InstallFolder" Name="x64" />
|
||||||
|
<?else ?>
|
||||||
|
<Directory Id="CmdPalDepsArm64InstallFolder" Name="arm64" />
|
||||||
|
<?endif ?>
|
||||||
|
</Directory>
|
||||||
|
</Directory>
|
||||||
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<DirectoryRef Id="CmdPalInstallFolder" FileSource="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test">
|
||||||
|
<Component Id="Module_CmdPal" Win64="yes" Guid="3A4942B2-1A86-4182-B3B4-65157365A980">
|
||||||
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||||
|
<RegistryValue Type="string" Name="Module_CmdPal" Value="" KeyPath="yes"/>
|
||||||
|
</RegistryKey>
|
||||||
|
<?if $(sys.BUILDARCH) = x64 ?>
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_x64.msix" />
|
||||||
|
<?else ?>
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_arm64.msix" />
|
||||||
|
<?endif ?>
|
||||||
|
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<?if $(sys.BUILDARCH) = x64 ?>
|
||||||
|
<DirectoryRef Id="CmdPalDepsX64InstallFolder" FileSource="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\x64">
|
||||||
|
<Component Id="Module_CmdPal_Deps" Win64="yes" Guid="C2790FC4-0665-4462-947A-D942A2AABFF0">
|
||||||
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||||
|
<RegistryValue Type="string" Name="Module_CmdPal_Deps" Value="" KeyPath="yes"/>
|
||||||
|
</RegistryKey>
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\x64\Microsoft.VCLibs.x64.14.00.Desktop.appx" />
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\x64\Microsoft.WindowsAppRuntime.1.6.msix" />
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
|
<?else ?>
|
||||||
|
<DirectoryRef Id="CmdPalDepsArm64InstallFolder" FileSource="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\arm64">
|
||||||
|
<Component Id="Module_CmdPal_Deps" Win64="yes" Guid="C2790FC4-0665-4462-947A-D942A2AABFF0">
|
||||||
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||||
|
<RegistryValue Type="string" Name="Module_CmdPal_Deps" Value="" KeyPath="yes"/>
|
||||||
|
</RegistryKey>
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\arm64\Microsoft.VCLibs.ARM64.14.00.Desktop.appx" />
|
||||||
|
<File Source="$(var.CmdPalBuildDir)AppPackages\Microsoft.CmdPal.UI_$(var.CmdPalVersion).0_Test\Dependencies\arm64\Microsoft.WindowsAppRuntime.1.6.msix" />
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
|
<?endif ?>
|
||||||
|
|
||||||
|
<ComponentGroup Id="CmdPalComponentGroup">
|
||||||
|
<Component Id="RemoveCmdPalFolder" Guid="2DF90C08-CC75-4245-A14E-B82904636C53" Directory="INSTALLFOLDER">
|
||||||
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||||
|
<RegistryValue Type="string" Name="RemoveCmdPalFolder" Value="" KeyPath="yes"/>
|
||||||
|
</RegistryKey>
|
||||||
|
<RemoveFolder Id="RemoveCmdPalInstallDirFolder" Directory="CmdPalInstallFolder" On="uninstall"/>
|
||||||
|
<RemoveFolder Id="RemoveCmdPalDepsInstallDirFolder" Directory="CmdPalDepsInstallFolder" On="uninstall"/>
|
||||||
|
<?if $(sys.BUILDARCH) = x64 ?>
|
||||||
|
<RemoveFolder Id="RemoveCmdPalDepsX64InstallDirFolder" Directory="CmdPalDepsX64InstallFolder" On="uninstall"/>
|
||||||
|
<?else ?>
|
||||||
|
<RemoveFolder Id="RemoveCmdPalDepsArm64InstallDirFolder" Directory="CmdPalDepsArm64InstallFolder" On="uninstall"/>
|
||||||
|
<?endif ?>
|
||||||
|
</Component>
|
||||||
|
<ComponentRef Id="Module_CmdPal" />
|
||||||
|
<ComponentRef Id="Module_CmdPal_Deps" />
|
||||||
|
</ComponentGroup>
|
||||||
|
|
||||||
|
</Fragment>
|
||||||
|
</Wix>
|
@ -17,6 +17,12 @@
|
|||||||
<PropertyGroup Label="UserMacros" Condition=" '$(PerUser)' != 'true' ">
|
<PropertyGroup Label="UserMacros" Condition=" '$(PerUser)' != 'true' ">
|
||||||
<DefineConstants>$(DefineConstants);PerUser=false</DefineConstants>
|
<DefineConstants>$(DefineConstants);PerUser=false</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" Condition=" '$(CIBuild)' == 'true' ">
|
||||||
|
<DefineConstants>$(DefineConstants);CIBuild=true</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" Condition=" '$(CIBuild)' != 'true' ">
|
||||||
|
<DefineConstants>$(DefineConstants);CIBuild=false</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform Condition="'$(Platform)'=='x64'">x64</Platform>
|
<Platform Condition="'$(Platform)'=='x64'">x64</Platform>
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports"
|
||||||
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
|
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
|
||||||
|
<Import Project="..\..\src\CmdPalVersion.props" Condition="Exists('..\..\src\CmdPalVersion.props')" />
|
||||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||||
<PropertyGroup Condition="'$(Platform)' == 'x64'">
|
<PropertyGroup Condition="'$(Platform)' == 'x64'">
|
||||||
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC;CmdPalVersion=$(CmdPalVersion)</DefineConstants>
|
||||||
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
||||||
The build pipeline builds the Settings and Launcher projects for Publication
|
The build pipeline builds the Settings and Launcher projects for Publication
|
||||||
using a specific profile. If you're doing local installer builds, this will
|
using a specific profile. If you're doing local installer builds, this will
|
||||||
@ -17,7 +19,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Platform)' != 'x64'">
|
<PropertyGroup Condition="'$(Platform)' != 'x64'">
|
||||||
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC;CmdPalVersion=$(CmdPalVersion);</DefineConstants>
|
||||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
|
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
|
||||||
SET PTRoot=$(SolutionDir)\..
|
SET PTRoot=$(SolutionDir)\..
|
||||||
@ -32,6 +34,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
call move /Y ..\..\..\AdvancedPaste.wxs.bk ..\..\..\AdvancedPaste.wxs
|
call move /Y ..\..\..\AdvancedPaste.wxs.bk ..\..\..\AdvancedPaste.wxs
|
||||||
call move /Y ..\..\..\Awake.wxs.bk ..\..\..\Awake.wxs
|
call move /Y ..\..\..\Awake.wxs.bk ..\..\..\Awake.wxs
|
||||||
call move /Y ..\..\..\BaseApplications.wxs.bk ..\..\..\BaseApplications.wxs
|
call move /Y ..\..\..\BaseApplications.wxs.bk ..\..\..\BaseApplications.wxs
|
||||||
|
call move /Y ..\..\..\CmdPal.wxs.bk ..\..\..\CmdPal.wxs
|
||||||
call move /Y ..\..\..\ColorPicker.wxs.bk ..\..\..\ColorPicker.wxs
|
call move /Y ..\..\..\ColorPicker.wxs.bk ..\..\..\ColorPicker.wxs
|
||||||
call move /Y ..\..\..\Core.wxs.bk ..\..\..\Core.wxs
|
call move /Y ..\..\..\Core.wxs.bk ..\..\..\Core.wxs
|
||||||
call move /Y ..\..\..\EnvironmentVariables.wxs.bk ..\..\..\EnvironmentVariables.wxs
|
call move /Y ..\..\..\EnvironmentVariables.wxs.bk ..\..\..\EnvironmentVariables.wxs
|
||||||
@ -54,7 +57,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
call move /Y ..\..\..\WinAppSDK.wxs.bk ..\..\..\WinAppSDK.wxs
|
call move /Y ..\..\..\WinAppSDK.wxs.bk ..\..\..\WinAppSDK.wxs
|
||||||
call move /Y ..\..\..\WinUI3Applications.wxs.bk ..\..\..\WinUI3Applications.wxs
|
call move /Y ..\..\..\WinUI3Applications.wxs.bk ..\..\..\WinUI3Applications.wxs
|
||||||
call move /Y ..\..\..\Workspaces.wxs.bk ..\..\..\Workspaces.wxs
|
call move /Y ..\..\..\Workspaces.wxs.bk ..\..\..\Workspaces.wxs
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Name>PowerToysInstaller</Name>
|
<Name>PowerToysInstaller</Name>
|
||||||
@ -65,6 +68,12 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
<PropertyGroup Label="UserMacros" Condition=" '$(PerUser)' != 'true' ">
|
<PropertyGroup Label="UserMacros" Condition=" '$(PerUser)' != 'true' ">
|
||||||
<DefineConstants>$(DefineConstants);PerUser=false</DefineConstants>
|
<DefineConstants>$(DefineConstants);PerUser=false</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" Condition=" '$(CIBuild)' == 'true' ">
|
||||||
|
<DefineConstants>$(DefineConstants);CIBuild=true</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" Condition=" '$(CIBuild)' != 'true' ">
|
||||||
|
<DefineConstants>$(DefineConstants);CIBuild=false</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- We do not support debug installer builds -->
|
<!-- We do not support debug installer builds -->
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||||
@ -104,6 +113,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
<Compile Include="AdvancedPaste.wxs" />
|
<Compile Include="AdvancedPaste.wxs" />
|
||||||
<Compile Include="Awake.wxs" />
|
<Compile Include="Awake.wxs" />
|
||||||
<Compile Include="BaseApplications.wxs" />
|
<Compile Include="BaseApplications.wxs" />
|
||||||
|
<Compile Include="CmdPal.wxs" />
|
||||||
<Compile Include="ColorPicker.wxs" />
|
<Compile Include="ColorPicker.wxs" />
|
||||||
<Compile Include="EnvironmentVariables.wxs" />
|
<Compile Include="EnvironmentVariables.wxs" />
|
||||||
<Compile Include="FileExplorerPreview.wxs" />
|
<Compile Include="FileExplorerPreview.wxs" />
|
||||||
@ -188,4 +198,4 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Restore" />
|
<Target Name="Restore" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -79,6 +79,10 @@
|
|||||||
<ComponentGroupRef Id="ToolComponentGroup" />
|
<ComponentGroupRef Id="ToolComponentGroup" />
|
||||||
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
|
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
|
||||||
<ComponentGroupRef Id="WorkspacesComponentGroup" />
|
<ComponentGroupRef Id="WorkspacesComponentGroup" />
|
||||||
|
|
||||||
|
<?if $(var.CIBuild) = "true" ?>
|
||||||
|
<ComponentGroupRef Id="CmdPalComponentGroup" />
|
||||||
|
<?endif?>
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />
|
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />
|
||||||
@ -135,6 +139,7 @@
|
|||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
|
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
|
||||||
<Custom Action="SetLaunchPowerToysParam" Before="LaunchPowerToys" />
|
<Custom Action="SetLaunchPowerToysParam" Before="LaunchPowerToys" />
|
||||||
|
<Custom Action="SetInstallCmdPalPackageParam" Before="InstallCmdPalPackage" />
|
||||||
<Custom Action="SetUninstallCommandNotFoundParam" Before="UninstallCommandNotFound" />
|
<Custom Action="SetUninstallCommandNotFoundParam" Before="UninstallCommandNotFound" />
|
||||||
<Custom Action="SetUpgradeCommandNotFoundParam" Before="UpgradeCommandNotFound" />
|
<Custom Action="SetUpgradeCommandNotFoundParam" Before="UpgradeCommandNotFound" />
|
||||||
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
|
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
|
||||||
@ -150,6 +155,9 @@
|
|||||||
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles">
|
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles">
|
||||||
NOT Installed
|
NOT Installed
|
||||||
</Custom>
|
</Custom>
|
||||||
|
<Custom Action="InstallCmdPalPackage" After="InstallFiles">
|
||||||
|
NOT Installed
|
||||||
|
</Custom>
|
||||||
<Custom Action="WixCloseApplications" Before="RemoveFiles" />
|
<Custom Action="WixCloseApplications" Before="RemoveFiles" />
|
||||||
<Custom Action="RemovePowerToysSchTasks" After="RemoveFiles" />
|
<Custom Action="RemovePowerToysSchTasks" After="RemoveFiles" />
|
||||||
<!-- TODO: Use to activate embedded MSIX -->
|
<!-- TODO: Use to activate embedded MSIX -->
|
||||||
@ -204,6 +212,10 @@
|
|||||||
Property="LaunchPowerToys"
|
Property="LaunchPowerToys"
|
||||||
Value="[INSTALLFOLDER]" />
|
Value="[INSTALLFOLDER]" />
|
||||||
|
|
||||||
|
<CustomAction Id="SetInstallCmdPalPackageParam"
|
||||||
|
Property="InstallCmdPalPackage"
|
||||||
|
Value="[INSTALLFOLDER]" />
|
||||||
|
|
||||||
<CustomAction
|
<CustomAction
|
||||||
Id="LaunchPowerToys"
|
Id="LaunchPowerToys"
|
||||||
Return="ignore"
|
Return="ignore"
|
||||||
@ -434,6 +446,14 @@
|
|||||||
DllEntry="CheckGPOCA"
|
DllEntry="CheckGPOCA"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<CustomAction Id="InstallCmdPalPackage"
|
||||||
|
Return="ignore"
|
||||||
|
Impersonate="yes"
|
||||||
|
Execute="deferred"
|
||||||
|
BinaryKey="PTCustomActions"
|
||||||
|
DllEntry="InstallCmdPalPackageCA"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- Close 'PowerToys.exe' before uninstall-->
|
<!-- Close 'PowerToys.exe' before uninstall-->
|
||||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown" />
|
<Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown" />
|
||||||
<Property Id="MSIFASTINSTALL" Value="DisableShutdown" />
|
<Property Id="MSIFASTINSTALL" Value="DisableShutdown" />
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "../../src/common/updating/installer.h"
|
#include "../../src/common/updating/installer.h"
|
||||||
#include "../../src/common/version/version.h"
|
#include "../../src/common/version/version.h"
|
||||||
#include "../../src/common/Telemetry/EtwTrace/EtwTrace.h"
|
#include "../../src/common/Telemetry/EtwTrace/EtwTrace.h"
|
||||||
|
#include "../../src/common/utils/package.h"
|
||||||
#include "../../src/common/utils/clean_video_conference.h"
|
#include "../../src/common/utils/clean_video_conference.h"
|
||||||
|
|
||||||
#include <winrt/Windows.ApplicationModel.h>
|
#include <winrt/Windows.ApplicationModel.h>
|
||||||
@ -35,13 +36,13 @@ TRACELOGGING_DEFINE_PROVIDER(
|
|||||||
TraceLoggingOptionProjectTelemetry());
|
TraceLoggingOptionProjectTelemetry());
|
||||||
|
|
||||||
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
|
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
|
||||||
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'
|
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'
|
||||||
|
|
||||||
static const wchar_t* POWERTOYS_EXE_COMPONENT = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}";
|
static const wchar_t *POWERTOYS_EXE_COMPONENT = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}";
|
||||||
static const wchar_t* POWERTOYS_UPGRADE_CODE = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}";
|
static const wchar_t *POWERTOYS_UPGRADE_CODE = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}";
|
||||||
|
|
||||||
constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys";
|
constexpr inline const wchar_t *DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys";
|
||||||
constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnostics";
|
constexpr inline const wchar_t *DataDiagnosticsRegValueName = L"AllowDataDiagnostics";
|
||||||
|
|
||||||
#define TraceLoggingWriteWrapper(provider, eventName, ...) \
|
#define TraceLoggingWriteWrapper(provider, eventName, ...) \
|
||||||
if (isDataDiagnosticEnabled()) \
|
if (isDataDiagnosticEnabled()) \
|
||||||
@ -52,16 +53,16 @@ constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnos
|
|||||||
trace.UpdateState(false); \
|
trace.UpdateState(false); \
|
||||||
}
|
}
|
||||||
|
|
||||||
static Shared::Trace::ETWTrace trace{ L"PowerToys_Installer" };
|
static Shared::Trace::ETWTrace trace{L"PowerToys_Installer"};
|
||||||
|
|
||||||
inline bool isDataDiagnosticEnabled()
|
inline bool isDataDiagnosticEnabled()
|
||||||
{
|
{
|
||||||
HKEY key{};
|
HKEY key{};
|
||||||
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
if (RegOpenKeyExW(HKEY_CURRENT_USER,
|
||||||
DataDiagnosticsRegKey,
|
DataDiagnosticsRegKey,
|
||||||
0,
|
0,
|
||||||
KEY_READ,
|
KEY_READ,
|
||||||
&key) != ERROR_SUCCESS)
|
&key) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -86,8 +87,7 @@ inline bool isDataDiagnosticEnabled()
|
|||||||
return isDataDiagnosticsEnabled == 1;
|
return isDataDiagnosticsEnabled == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT getInstallFolder(MSIHANDLE hInstall, std::wstring &installationDir)
|
||||||
HRESULT getInstallFolder(MSIHANDLE hInstall, std::wstring& installationDir)
|
|
||||||
{
|
{
|
||||||
DWORD len = 0;
|
DWORD len = 0;
|
||||||
wchar_t _[1];
|
wchar_t _[1];
|
||||||
@ -116,13 +116,13 @@ BOOL IsLocalSystem()
|
|||||||
|
|
||||||
// open process token
|
// open process token
|
||||||
if (!OpenProcessToken(GetCurrentProcess(),
|
if (!OpenProcessToken(GetCurrentProcess(),
|
||||||
TOKEN_QUERY,
|
TOKEN_QUERY,
|
||||||
&hToken))
|
&hToken))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// retrieve user SID
|
// retrieve user SID
|
||||||
if (!GetTokenInformation(hToken, TokenUser, pTokenUser,
|
if (!GetTokenInformation(hToken, TokenUser, pTokenUser,
|
||||||
sizeof(bTokenUser), &cbTokenUser))
|
sizeof(bTokenUser), &cbTokenUser))
|
||||||
{
|
{
|
||||||
CloseHandle(hToken);
|
CloseHandle(hToken);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -132,7 +132,7 @@ BOOL IsLocalSystem()
|
|||||||
|
|
||||||
// allocate LocalSystem well-known SID
|
// allocate LocalSystem well-known SID
|
||||||
if (!AllocateAndInitializeSid(&siaNT, 1, SECURITY_LOCAL_SYSTEM_RID,
|
if (!AllocateAndInitializeSid(&siaNT, 1, SECURITY_LOCAL_SYSTEM_RID,
|
||||||
0, 0, 0, 0, 0, 0, 0, &pSystemSid))
|
0, 0, 0, 0, 0, 0, 0, &pSystemSid))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// compare the user SID from the token with the LocalSystem SID
|
// compare the user SID from the token with the LocalSystem SID
|
||||||
@ -194,7 +194,7 @@ static std::filesystem::path GetUserPowerShellModulesPath()
|
|||||||
|
|
||||||
if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, NULL, &myDocumentsBlockPtr)))
|
if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, NULL, &myDocumentsBlockPtr)))
|
||||||
{
|
{
|
||||||
const std::wstring myDocuments{ myDocumentsBlockPtr };
|
const std::wstring myDocuments{myDocumentsBlockPtr};
|
||||||
CoTaskMemFree(myDocumentsBlockPtr);
|
CoTaskMemFree(myDocumentsBlockPtr);
|
||||||
return std::filesystem::path(myDocuments) / "PowerShell" / "Modules";
|
return std::filesystem::path(myDocuments) / "PowerShell" / "Modules";
|
||||||
}
|
}
|
||||||
@ -227,10 +227,12 @@ UINT __stdcall LaunchPowerToysCA(MSIHANDLE hInstall)
|
|||||||
|
|
||||||
BOOL isSystemUser = IsLocalSystem();
|
BOOL isSystemUser = IsLocalSystem();
|
||||||
|
|
||||||
if (isSystemUser) {
|
if (isSystemUser)
|
||||||
|
{
|
||||||
|
|
||||||
auto action = [&commandLine](HANDLE userToken) {
|
auto action = [&commandLine](HANDLE userToken)
|
||||||
STARTUPINFO startupInfo{ .cb = sizeof(STARTUPINFO), .wShowWindow = SW_SHOWNORMAL };
|
{
|
||||||
|
STARTUPINFO startupInfo{.cb = sizeof(STARTUPINFO), .wShowWindow = SW_SHOWNORMAL};
|
||||||
PROCESS_INFORMATION processInformation;
|
PROCESS_INFORMATION processInformation;
|
||||||
|
|
||||||
PVOID lpEnvironment = NULL;
|
PVOID lpEnvironment = NULL;
|
||||||
@ -269,7 +271,7 @@ UINT __stdcall LaunchPowerToysCA(MSIHANDLE hInstall)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
STARTUPINFO startupInfo{ .cb = sizeof(STARTUPINFO), .wShowWindow = SW_SHOWNORMAL };
|
STARTUPINFO startupInfo{.cb = sizeof(STARTUPINFO), .wShowWindow = SW_SHOWNORMAL};
|
||||||
|
|
||||||
PROCESS_INFORMATION processInformation;
|
PROCESS_INFORMATION processInformation;
|
||||||
|
|
||||||
@ -313,7 +315,7 @@ UINT __stdcall CheckGPOCA(MSIHANDLE hInstall)
|
|||||||
LPWSTR currentScope = nullptr;
|
LPWSTR currentScope = nullptr;
|
||||||
hr = WcaGetProperty(L"InstallScope", ¤tScope);
|
hr = WcaGetProperty(L"InstallScope", ¤tScope);
|
||||||
|
|
||||||
if (std::wstring{ currentScope } == L"perUser")
|
if (std::wstring{currentScope} == L"perUser")
|
||||||
{
|
{
|
||||||
if (powertoys_gpo::getDisablePerUserInstallationValue() == powertoys_gpo::gpo_rule_configured_enabled)
|
if (powertoys_gpo::getDisablePerUserInstallationValue() == powertoys_gpo::gpo_rule_configured_enabled)
|
||||||
{
|
{
|
||||||
@ -354,7 +356,7 @@ UINT __stdcall ApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall)
|
|||||||
hr = getInstallFolder(hInstall, installationFolder);
|
hr = getInstallFolder(hInstall, installationFolder);
|
||||||
ExitOnFailure(hr, "Failed to get installFolder.");
|
ExitOnFailure(hr, "Failed to get installFolder.");
|
||||||
|
|
||||||
for (const auto& changeSet : getAllOnByDefaultModulesChangeSets(installationFolder))
|
for (const auto &changeSet : getAllOnByDefaultModulesChangeSets(installationFolder))
|
||||||
{
|
{
|
||||||
if (!changeSet.apply())
|
if (!changeSet.apply())
|
||||||
{
|
{
|
||||||
@ -382,7 +384,7 @@ UINT __stdcall UnApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall)
|
|||||||
ExitOnFailure(hr, "Failed to initialize");
|
ExitOnFailure(hr, "Failed to initialize");
|
||||||
hr = getInstallFolder(hInstall, installationFolder);
|
hr = getInstallFolder(hInstall, installationFolder);
|
||||||
ExitOnFailure(hr, "Failed to get installFolder.");
|
ExitOnFailure(hr, "Failed to get installFolder.");
|
||||||
for (const auto& changeSet : getAllModulesChangeSets(installationFolder))
|
for (const auto &changeSet : getAllModulesChangeSets(installationFolder))
|
||||||
{
|
{
|
||||||
changeSet.unApply();
|
changeSet.unApply();
|
||||||
}
|
}
|
||||||
@ -396,8 +398,8 @@ LExit:
|
|||||||
return WcaFinalize(er);
|
return WcaFinalize(er);
|
||||||
}
|
}
|
||||||
|
|
||||||
const wchar_t* DSC_CONFIGURE_PSD1_NAME = L"Microsoft.PowerToys.Configure.psd1";
|
const wchar_t *DSC_CONFIGURE_PSD1_NAME = L"Microsoft.PowerToys.Configure.psd1";
|
||||||
const wchar_t* DSC_CONFIGURE_PSM1_NAME = L"Microsoft.PowerToys.Configure.psm1";
|
const wchar_t *DSC_CONFIGURE_PSM1_NAME = L"Microsoft.PowerToys.Configure.psm1";
|
||||||
|
|
||||||
UINT __stdcall InstallDSCModuleCA(MSIHANDLE hInstall)
|
UINT __stdcall InstallDSCModuleCA(MSIHANDLE hInstall)
|
||||||
{
|
{
|
||||||
@ -429,7 +431,7 @@ UINT __stdcall InstallDSCModuleCA(MSIHANDLE hInstall)
|
|||||||
ExitOnFailure(hr, "Unable to create Powershell modules folder");
|
ExitOnFailure(hr, "Unable to create Powershell modules folder");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto* filename : { DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME })
|
for (const auto *filename : {DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME})
|
||||||
{
|
{
|
||||||
fs::copy_file(fs::path(installationFolder) / "DSCModules" / filename, modulesPath / filename, fs::copy_options::overwrite_existing, errorCode);
|
fs::copy_file(fs::path(installationFolder) / "DSCModules" / filename, modulesPath / filename, fs::copy_options::overwrite_existing, errorCode);
|
||||||
|
|
||||||
@ -477,7 +479,7 @@ UINT __stdcall UninstallDSCModuleCA(MSIHANDLE hInstall)
|
|||||||
|
|
||||||
std::error_code errorCode;
|
std::error_code errorCode;
|
||||||
|
|
||||||
for (const auto* filename : { DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME })
|
for (const auto *filename : {DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME})
|
||||||
{
|
{
|
||||||
fs::remove(versionedModulePath / filename, errorCode);
|
fs::remove(versionedModulePath / filename, errorCode);
|
||||||
|
|
||||||
@ -488,7 +490,7 @@ UINT __stdcall UninstallDSCModuleCA(MSIHANDLE hInstall)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto* modulePath : { &versionedModulePath, &powerToysModulePath })
|
for (const auto *modulePath : {&versionedModulePath, &powerToysModulePath})
|
||||||
{
|
{
|
||||||
fs::remove(*modulePath, errorCode);
|
fs::remove(*modulePath, errorCode);
|
||||||
|
|
||||||
@ -535,7 +537,7 @@ UINT __stdcall InstallEmbeddedMSIXCA(MSIHANDLE hInstall)
|
|||||||
using namespace winrt::Windows::Management::Deployment;
|
using namespace winrt::Windows::Management::Deployment;
|
||||||
using namespace winrt::Windows::Foundation;
|
using namespace winrt::Windows::Foundation;
|
||||||
|
|
||||||
Uri msix_uri{ msix_path.wstring() };
|
Uri msix_uri{msix_path.wstring()};
|
||||||
PackageManager pm;
|
PackageManager pm;
|
||||||
auto result = pm.AddPackageAsync(msix_uri, nullptr, DeploymentOptions::None).get();
|
auto result = pm.AddPackageAsync(msix_uri, nullptr, DeploymentOptions::None).get();
|
||||||
if (!result)
|
if (!result)
|
||||||
@ -569,7 +571,7 @@ UINT __stdcall UninstallEmbeddedMSIXCA(MSIHANDLE hInstall)
|
|||||||
hr = WcaInitialize(hInstall, "UninstallEmbeddedMSIXCA");
|
hr = WcaInitialize(hInstall, "UninstallEmbeddedMSIXCA");
|
||||||
ExitOnFailure(hr, "Failed to initialize");
|
ExitOnFailure(hr, "Failed to initialize");
|
||||||
|
|
||||||
for (const auto& p : pm.FindPackagesForUser({}, package_name, publisher))
|
for (const auto &p : pm.FindPackagesForUser({}, package_name, publisher))
|
||||||
{
|
{
|
||||||
auto result = pm.RemovePackageAsync(p.Id().FullName()).get();
|
auto result = pm.RemovePackageAsync(p.Id().FullName()).get();
|
||||||
if (result)
|
if (result)
|
||||||
@ -683,7 +685,6 @@ UINT __stdcall UninstallCommandNotFoundModuleCA(MSIHANDLE hInstall)
|
|||||||
command += "-NoProfile -NonInteractive -NoLogo -WindowStyle Hidden -ExecutionPolicy Unrestricted -File \"" + winrt::to_string(installationFolder) + "\\WinUI3Apps\\Assets\\Settings\\Scripts\\DisableModule.ps1" + "\"";
|
command += "-NoProfile -NonInteractive -NoLogo -WindowStyle Hidden -ExecutionPolicy Unrestricted -File \"" + winrt::to_string(installationFolder) + "\\WinUI3Apps\\Assets\\Settings\\Scripts\\DisableModule.ps1" + "\"";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
system(command.c_str());
|
system(command.c_str());
|
||||||
|
|
||||||
LExit:
|
LExit:
|
||||||
@ -738,10 +739,10 @@ UINT __stdcall RemoveScheduledTasksCA(MSIHANDLE hInstall)
|
|||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
UINT er = ERROR_SUCCESS;
|
UINT er = ERROR_SUCCESS;
|
||||||
|
|
||||||
ITaskService* pService = nullptr;
|
ITaskService *pService = nullptr;
|
||||||
ITaskFolder* pTaskFolder = nullptr;
|
ITaskFolder *pTaskFolder = nullptr;
|
||||||
IRegisteredTaskCollection* pTaskCollection = nullptr;
|
IRegisteredTaskCollection *pTaskCollection = nullptr;
|
||||||
ITaskFolder* pRootFolder = nullptr;
|
ITaskFolder *pRootFolder = nullptr;
|
||||||
LONG numTasks = 0;
|
LONG numTasks = 0;
|
||||||
|
|
||||||
hr = WcaInitialize(hInstall, "RemoveScheduledTasksCA");
|
hr = WcaInitialize(hInstall, "RemoveScheduledTasksCA");
|
||||||
@ -754,10 +755,10 @@ UINT __stdcall RemoveScheduledTasksCA(MSIHANDLE hInstall)
|
|||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
// Create an instance of the Task Service.
|
// Create an instance of the Task Service.
|
||||||
hr = CoCreateInstance(CLSID_TaskScheduler,
|
hr = CoCreateInstance(CLSID_TaskScheduler,
|
||||||
nullptr,
|
nullptr,
|
||||||
CLSCTX_INPROC_SERVER,
|
CLSCTX_INPROC_SERVER,
|
||||||
IID_ITaskService,
|
IID_ITaskService,
|
||||||
reinterpret_cast<void**>(&pService));
|
reinterpret_cast<void **>(&pService));
|
||||||
ExitOnFailure(hr, "Failed to create an instance of ITaskService: %x", hr);
|
ExitOnFailure(hr, "Failed to create an instance of ITaskService: %x", hr);
|
||||||
|
|
||||||
// Connect to the task service.
|
// Connect to the task service.
|
||||||
@ -785,7 +786,7 @@ UINT __stdcall RemoveScheduledTasksCA(MSIHANDLE hInstall)
|
|||||||
{
|
{
|
||||||
// Delete all the tasks found.
|
// Delete all the tasks found.
|
||||||
// If some tasks can't be deleted, the folder won't be deleted later and the user will still be notified.
|
// If some tasks can't be deleted, the folder won't be deleted later and the user will still be notified.
|
||||||
IRegisteredTask* pRegisteredTask = nullptr;
|
IRegisteredTask *pRegisteredTask = nullptr;
|
||||||
hr = pTaskCollection->get_Item(_variant_t(i + 1), &pRegisteredTask);
|
hr = pTaskCollection->get_Item(_variant_t(i + 1), &pRegisteredTask);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
@ -861,8 +862,7 @@ UINT __stdcall TelemetryLogInstallSuccessCA(MSIHANDLE hInstall)
|
|||||||
TraceLoggingWideString(get_product_version().c_str(), "Version"),
|
TraceLoggingWideString(get_product_version().c_str(), "Version"),
|
||||||
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
|
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
|
||||||
TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"),
|
TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"),
|
||||||
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)
|
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE));
|
||||||
);
|
|
||||||
|
|
||||||
LExit:
|
LExit:
|
||||||
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
|
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
|
||||||
@ -1028,7 +1028,7 @@ UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (auto install_path = GetMsiPackageInstalledPath(std::wstring{ currentScope } == L"perUser"))
|
if (auto install_path = GetMsiPackageInstalledPath(std::wstring{currentScope} == L"perUser"))
|
||||||
{
|
{
|
||||||
MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data());
|
MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data());
|
||||||
}
|
}
|
||||||
@ -1040,6 +1040,47 @@ UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall)
|
|||||||
return WcaFinalize(er);
|
return WcaFinalize(er);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT __stdcall InstallCmdPalPackageCA(MSIHANDLE hInstall)
|
||||||
|
{
|
||||||
|
using namespace winrt::Windows::Foundation;
|
||||||
|
using namespace winrt::Windows::Management::Deployment;
|
||||||
|
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
UINT er = ERROR_SUCCESS;
|
||||||
|
std::wstring installationFolder;
|
||||||
|
|
||||||
|
hr = WcaInitialize(hInstall, "InstallCmdPalPackage");
|
||||||
|
hr = getInstallFolder(hInstall, installationFolder);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
auto msix = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\", false);
|
||||||
|
auto dependencies = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\Dependencies\\", true);
|
||||||
|
|
||||||
|
if (!msix.empty())
|
||||||
|
{
|
||||||
|
auto msixPath = msix[0];
|
||||||
|
|
||||||
|
if (!package::RegisterPackage(msixPath, dependencies))
|
||||||
|
{
|
||||||
|
Logger::error(L"Failed to install CmdPal package");
|
||||||
|
er = ERROR_INSTALL_FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (std::exception &e)
|
||||||
|
{
|
||||||
|
std::string errorMessage{"Exception thrown while trying to install CmdPal package: "};
|
||||||
|
errorMessage += e.what();
|
||||||
|
Logger::error(errorMessage);
|
||||||
|
|
||||||
|
er = ERROR_INSTALL_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
er = er == ERROR_SUCCESS ? (SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE) : er;
|
||||||
|
return WcaFinalize(er);
|
||||||
|
}
|
||||||
|
|
||||||
UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
|
UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
|
||||||
{
|
{
|
||||||
using namespace winrt::Windows::Foundation;
|
using namespace winrt::Windows::Foundation;
|
||||||
@ -1053,54 +1094,20 @@ UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Packages to unregister
|
// Packages to unregister
|
||||||
const std::vector<std::wstring> packagesToRemoveDisplayName{ { L"PowerRenameContextMenu" }, { L"ImageResizerContextMenu" }, { L"FileLocksmithContextMenu" }, { L"NewPlusContextMenu" } };
|
const std::vector<std::wstring> packagesToRemoveDisplayName{{L"PowerRenameContextMenu"}, {L"ImageResizerContextMenu"}, {L"FileLocksmithContextMenu"}, {L"NewPlusContextMenu"}, {L"Microsoft.CommandPalette"}};
|
||||||
|
|
||||||
PackageManager packageManager;
|
for (auto const &package : packagesToRemoveDisplayName)
|
||||||
|
|
||||||
for (auto const& package : packageManager.FindPackages())
|
|
||||||
{
|
{
|
||||||
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
if (!package::UnRegisterPackage(package))
|
||||||
|
|
||||||
for (const auto& packageToRemove : packagesToRemoveDisplayName)
|
|
||||||
{
|
{
|
||||||
if (packageFullName.contains(packageToRemove))
|
Logger::error(L"Failed to unregister package: " + package);
|
||||||
{
|
er = ERROR_INSTALL_FAILURE;
|
||||||
auto deploymentOperation{ packageManager.RemovePackageAsync(packageFullName) };
|
|
||||||
deploymentOperation.get();
|
|
||||||
|
|
||||||
// Check the status of the operation
|
|
||||||
if (deploymentOperation.Status() == AsyncStatus::Error)
|
|
||||||
{
|
|
||||||
auto deploymentResult{ deploymentOperation.GetResults() };
|
|
||||||
auto errorCode = deploymentOperation.ErrorCode();
|
|
||||||
auto errorText = deploymentResult.ErrorText();
|
|
||||||
|
|
||||||
Logger::error(L"Unregister {} package failed. ErrorCode: {}, ErrorText: {}", packageFullName, std::to_wstring(errorCode), errorText);
|
|
||||||
|
|
||||||
er = ERROR_INSTALL_FAILURE;
|
|
||||||
}
|
|
||||||
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
|
|
||||||
{
|
|
||||||
Logger::error(L"Unregister {} package canceled.", packageFullName);
|
|
||||||
|
|
||||||
er = ERROR_INSTALL_FAILURE;
|
|
||||||
}
|
|
||||||
else if (deploymentOperation.Status() == AsyncStatus::Completed)
|
|
||||||
{
|
|
||||||
Logger::info(L"Unregister {} package completed.", packageFullName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger::debug(L"Unregister {} package started.", packageFullName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
std::string errorMessage{ "Exception thrown while trying to unregister sparse packages: " };
|
std::string errorMessage{"Exception thrown while trying to unregister sparse packages: "};
|
||||||
errorMessage += e.what();
|
errorMessage += e.what();
|
||||||
Logger::error(errorMessage);
|
Logger::error(errorMessage);
|
||||||
|
|
||||||
@ -1128,7 +1135,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
|||||||
}
|
}
|
||||||
processes.resize(bytes / sizeof(processes[0]));
|
processes.resize(bytes / sizeof(processes[0]));
|
||||||
|
|
||||||
std::array<std::wstring_view, 38> processesToTerminate = {
|
std::array<std::wstring_view, 39> processesToTerminate = {
|
||||||
L"PowerToys.PowerLauncher.exe",
|
L"PowerToys.PowerLauncher.exe",
|
||||||
L"PowerToys.Settings.exe",
|
L"PowerToys.Settings.exe",
|
||||||
L"PowerToys.AdvancedPaste.exe",
|
L"PowerToys.AdvancedPaste.exe",
|
||||||
@ -1165,6 +1172,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
|||||||
L"PowerToys.WorkspacesLauncherUI.exe",
|
L"PowerToys.WorkspacesLauncherUI.exe",
|
||||||
L"PowerToys.WorkspacesEditor.exe",
|
L"PowerToys.WorkspacesEditor.exe",
|
||||||
L"PowerToys.WorkspacesWindowArranger.exe",
|
L"PowerToys.WorkspacesWindowArranger.exe",
|
||||||
|
L"Microsoft.CmdPal.UI.exe",
|
||||||
L"PowerToys.ZoomIt.exe",
|
L"PowerToys.ZoomIt.exe",
|
||||||
L"PowerToys.exe",
|
L"PowerToys.exe",
|
||||||
};
|
};
|
||||||
@ -1177,7 +1185,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
|||||||
}
|
}
|
||||||
wchar_t processName[MAX_PATH] = L"<unknown>";
|
wchar_t processName[MAX_PATH] = L"<unknown>";
|
||||||
|
|
||||||
HANDLE hProcess{ OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE, FALSE, procID) };
|
HANDLE hProcess{OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE, FALSE, procID)};
|
||||||
if (!hProcess)
|
if (!hProcess)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -1197,8 +1205,9 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
|||||||
if (processName == processToTerminate)
|
if (processName == processToTerminate)
|
||||||
{
|
{
|
||||||
const DWORD timeout = 500;
|
const DWORD timeout = 500;
|
||||||
auto windowEnumerator = [](HWND hwnd, LPARAM procIDPtr) -> BOOL {
|
auto windowEnumerator = [](HWND hwnd, LPARAM procIDPtr) -> BOOL
|
||||||
auto targetProcID = *reinterpret_cast<const DWORD*>(procIDPtr);
|
{
|
||||||
|
auto targetProcID = *reinterpret_cast<const DWORD *>(procIDPtr);
|
||||||
DWORD windowProcID = 0;
|
DWORD windowProcID = 0;
|
||||||
GetWindowThreadProcessId(hwnd, &windowProcID);
|
GetWindowThreadProcessId(hwnd, &windowProcID);
|
||||||
if (windowProcID == targetProcID)
|
if (windowProcID == targetProcID)
|
||||||
@ -1224,15 +1233,15 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
|||||||
void initSystemLogger()
|
void initSystemLogger()
|
||||||
{
|
{
|
||||||
static std::once_flag initLoggerFlag;
|
static std::once_flag initLoggerFlag;
|
||||||
std::call_once(initLoggerFlag, []() {
|
std::call_once(initLoggerFlag, []()
|
||||||
WCHAR temp_path[MAX_PATH];
|
{
|
||||||
auto ret = GetTempPath(MAX_PATH, temp_path);
|
WCHAR temp_path[MAX_PATH];
|
||||||
|
auto ret = GetTempPath(MAX_PATH, temp_path);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
Logger::init("PowerToysMSI", std::wstring{ temp_path } + L"\\PowerToysMSIInstaller", L"");
|
Logger::init("PowerToysMSI", std::wstring{ temp_path } + L"\\PowerToysMSIInstaller", L"");
|
||||||
}
|
} });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DllMain - Initialize and cleanup WiX custom action utils.
|
// DllMain - Initialize and cleanup WiX custom action utils.
|
||||||
|
@ -18,6 +18,7 @@ EXPORTS
|
|||||||
TerminateProcessesCA
|
TerminateProcessesCA
|
||||||
InstallEmbeddedMSIXCA
|
InstallEmbeddedMSIXCA
|
||||||
InstallDSCModuleCA
|
InstallDSCModuleCA
|
||||||
|
InstallCmdPalPackageCA
|
||||||
UnApplyModulesRegistryChangeSetsCA
|
UnApplyModulesRegistryChangeSetsCA
|
||||||
UnRegisterContextMenuPackagesCA
|
UnRegisterContextMenuPackagesCA
|
||||||
UninstallEmbeddedMSIXCA
|
UninstallEmbeddedMSIXCA
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" DefaultTargets="Build"
|
||||||
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
|
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
@ -54,6 +55,7 @@
|
|||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs"" ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs"" ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs.bk""""
|
||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Awake.wxs"" ""$(ProjectDir)..\PowerToysSetup\Awake.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Awake.wxs"" ""$(ProjectDir)..\PowerToysSetup\Awake.wxs.bk""""
|
||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs"" ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs"" ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs.bk""""
|
||||||
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\CmdPal.wxs"" ""$(ProjectDir)..\PowerToysSetup\CmdPal.wxs.bk""""
|
||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs"" ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs"" ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs.bk""""
|
||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Core.wxs"" ""$(ProjectDir)..\PowerToysSetup\Core.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Core.wxs"" ""$(ProjectDir)..\PowerToysSetup\Core.wxs.bk""""
|
||||||
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\EnvironmentVariables.wxs"" ""$(ProjectDir)..\PowerToysSetup\EnvironmentVariables.wxs.bk""""
|
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\EnvironmentVariables.wxs"" ""$(ProjectDir)..\PowerToysSetup\EnvironmentVariables.wxs.bk""""
|
||||||
|
10
src/CmdPalVersion.props
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<CmdPalVersion>0.0.1</CmdPalVersion>
|
||||||
|
<DevEnvironment>Local</DevEnvironment>
|
||||||
|
|
||||||
|
<!-- Forcing for every DLL on by default -->
|
||||||
|
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -5,5 +5,8 @@
|
|||||||
<IsAotCompatible>true</IsAotCompatible>
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
<CsWinRTAotOptimizerEnabled>true</CsWinRTAotOptimizerEnabled>
|
<CsWinRTAotOptimizerEnabled>true</CsWinRTAotOptimizerEnabled>
|
||||||
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
|
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
|
||||||
|
|
||||||
|
<!-- Suppress DynamicallyAccessedMemberTypes.PublicParameterlessConstructor in fallback code path of Windows SDK projection -->
|
||||||
|
<WarningsNotAsErrors>IL2081</WarningsNotAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoWarn></NoWarn>
|
<NoWarn></NoWarn>
|
||||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||||
<WarningsNotAsErrors>CA1720;CA1859;CA2263;CA2022</WarningsNotAsErrors>
|
<WarningsNotAsErrors>CA1720;CA1859;CA2263;CA2022;MVVMTK0045;MVVMTK0049</WarningsNotAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
@ -12,10 +12,10 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
|
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "We follow the C# Core Coding Style which avoids using `this` unless absolutely necessary.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "We follow the C# Core Coding Style which avoids using `this` unless absolutely necessary.")]
|
||||||
|
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and have hight impact in code changes.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and has high impact in code changes.")]
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and have hight impact in code changes.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and has high impact in code changes.")]
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and have hight impact in code changes.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and has high impact in code changes.")]
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and have hight impact in code changes.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and has high impact in code changes.")]
|
||||||
|
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1309:FieldNamesMustNotBeginWithUnderscore", Justification = "We follow the C# Core Coding Style which uses underscores as prefixes rather than using `this.`.")]
|
[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1309:FieldNamesMustNotBeginWithUnderscore", Justification = "We follow the C# Core Coding Style which uses underscores as prefixes rather than using `this.`.")]
|
||||||
|
|
||||||
@ -62,3 +62,9 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
||||||
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "<Dotnet port with style preservation>", Scope = "namespaceanddescendants", Target = "MouseWithoutBorders")]
|
||||||
|
|
||||||
|
// AOT
|
||||||
|
[assembly: SuppressMessage("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "MVVMTK0045:Using [ObservableProperty] on fields is not AOT compatible for WinRT", Justification = "Updated MVVM toolkit package introduced this.", Scope = "namespaceanddescendants", Target = "HostsUILib")]
|
||||||
|
[assembly: SuppressMessage("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "MVVMTK0045:Using [ObservableProperty] on fields is not AOT compatible for WinRT", Justification = "Updated MVVM toolkit package introduced this.", Scope = "namespaceanddescendants", Target = "Peek.UI")]
|
||||||
|
[assembly: SuppressMessage("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "MVVMTK0045:Using [ObservableProperty] on fields is not AOT compatible for WinRT", Justification = "Updated MVVM toolkit package introduced this.", Scope = "namespaceanddescendants", Target = "Peek.UI.Views")]
|
||||||
|
[assembly: SuppressMessage("CommunityToolkit.Mvvm.SourceGenerators.INotifyPropertyChangedGenerator", "MVVMTK0049:Using [INotifyPropertyChanged] is not AOT compatible for WinRT", Justification = "Updated MVVM toolkit package introduced this.", Scope = "type", Target = "~T:Peek.UI.Views.TitleBar")]
|
||||||
|
@ -31,6 +31,7 @@ namespace Common.UI
|
|||||||
Dashboard,
|
Dashboard,
|
||||||
AdvancedPaste,
|
AdvancedPaste,
|
||||||
Workspaces,
|
Workspaces,
|
||||||
|
CmdPal,
|
||||||
ZoomIt,
|
ZoomIt,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +79,8 @@ namespace Common.UI
|
|||||||
return "AdvancedPaste";
|
return "AdvancedPaste";
|
||||||
case SettingsWindow.Workspaces:
|
case SettingsWindow.Workspaces:
|
||||||
return "Workspaces";
|
return "Workspaces";
|
||||||
|
case SettingsWindow.CmdPal:
|
||||||
|
return "CmdPal";
|
||||||
case SettingsWindow.ZoomIt:
|
case SettingsWindow.ZoomIt:
|
||||||
return "ZoomIt";
|
return "ZoomIt";
|
||||||
default:
|
default:
|
||||||
|
@ -16,6 +16,10 @@ namespace winrt::PowerToys::GPOWrapper::implementation
|
|||||||
{
|
{
|
||||||
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredCmdNotFoundEnabledValue());
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredCmdNotFoundEnabledValue());
|
||||||
}
|
}
|
||||||
|
GpoRuleConfigured GPOWrapper::GetConfiguredCmdPalEnabledValue()
|
||||||
|
{
|
||||||
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredCmdPalEnabledValue());
|
||||||
|
}
|
||||||
GpoRuleConfigured GPOWrapper::GetConfiguredColorPickerEnabledValue()
|
GpoRuleConfigured GPOWrapper::GetConfiguredColorPickerEnabledValue()
|
||||||
{
|
{
|
||||||
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredColorPickerEnabledValue());
|
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredColorPickerEnabledValue());
|
||||||
|
@ -10,6 +10,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
|
|||||||
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
|
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
|
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredCmdNotFoundEnabledValue();
|
static GpoRuleConfigured GetConfiguredCmdNotFoundEnabledValue();
|
||||||
|
static GpoRuleConfigured GetConfiguredCmdPalEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
|
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredCropAndLockEnabledValue();
|
static GpoRuleConfigured GetConfiguredCropAndLockEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
|
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
|
||||||
|
@ -14,6 +14,7 @@ namespace PowerToys
|
|||||||
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
|
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
|
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredCmdNotFoundEnabledValue();
|
static GpoRuleConfigured GetConfiguredCmdNotFoundEnabledValue();
|
||||||
|
static GpoRuleConfigured GetConfiguredCmdPalEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
|
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredCropAndLockEnabledValue();
|
static GpoRuleConfigured GetConfiguredCropAndLockEnabledValue();
|
||||||
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
|
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
|
||||||
|
@ -10,6 +10,7 @@ namespace ManagedCommon
|
|||||||
AlwaysOnTop,
|
AlwaysOnTop,
|
||||||
Awake,
|
Awake,
|
||||||
ColorPicker,
|
ColorPicker,
|
||||||
|
CmdPal,
|
||||||
CropAndLock,
|
CropAndLock,
|
||||||
EnvironmentVariables,
|
EnvironmentVariables,
|
||||||
FancyZones,
|
FancyZones,
|
||||||
|
@ -187,4 +187,8 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
{
|
{
|
||||||
return CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT;
|
return CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT;
|
||||||
}
|
}
|
||||||
|
hstring Constants::ShowCmdPalEvent()
|
||||||
|
{
|
||||||
|
return CommonSharedConstants::CMDPAL_SHOW_EVENT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
static hstring WorkspacesLaunchEditorEvent();
|
static hstring WorkspacesLaunchEditorEvent();
|
||||||
static hstring WorkspacesHotkeyEvent();
|
static hstring WorkspacesHotkeyEvent();
|
||||||
static hstring PowerToysRunnerTerminateSettingsEvent();
|
static hstring PowerToysRunnerTerminateSettingsEvent();
|
||||||
|
static hstring ShowCmdPalEvent();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ namespace PowerToys
|
|||||||
static String WorkspacesLaunchEditorEvent();
|
static String WorkspacesLaunchEditorEvent();
|
||||||
static String WorkspacesHotkeyEvent();
|
static String WorkspacesHotkeyEvent();
|
||||||
static String PowerToysRunnerTerminateSettingsEvent();
|
static String PowerToysRunnerTerminateSettingsEvent();
|
||||||
|
static String ShowCmdPalEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -128,6 +128,9 @@ namespace CommonSharedConstants
|
|||||||
const wchar_t ZOOMIT_REFRESH_SETTINGS_EVENT[] = L"Local\\PowerToysZoomIt-RefreshSettingsEvent-f053a563-d519-4b0d-8152-a54489c13324";
|
const wchar_t ZOOMIT_REFRESH_SETTINGS_EVENT[] = L"Local\\PowerToysZoomIt-RefreshSettingsEvent-f053a563-d519-4b0d-8152-a54489c13324";
|
||||||
const wchar_t ZOOMIT_EXIT_EVENT[] = L"Local\\PowerToysZoomIt-ExitEvent-36641ce6-df02-4eac-abea-a3fbf9138220";
|
const wchar_t ZOOMIT_EXIT_EVENT[] = L"Local\\PowerToysZoomIt-ExitEvent-36641ce6-df02-4eac-abea-a3fbf9138220";
|
||||||
|
|
||||||
|
// used from quick access window
|
||||||
|
const wchar_t CMDPAL_SHOW_EVENT[] = L"Local\\PowerToysCmdPal-ShowEvent-62336fcd-8611-4023-9b30-091a6af4cc5a";
|
||||||
|
|
||||||
// Max DWORD for key code to disable keys.
|
// Max DWORD for key code to disable keys.
|
||||||
const DWORD VK_DISABLED = 0x100;
|
const DWORD VK_DISABLED = 0x100;
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace powertoys_gpo {
|
namespace powertoys_gpo
|
||||||
enum gpo_rule_configured_t {
|
{
|
||||||
|
enum gpo_rule_configured_t
|
||||||
|
{
|
||||||
gpo_rule_configured_wrong_value = -3, // The policy is set to an unrecognized value
|
gpo_rule_configured_wrong_value = -3, // The policy is set to an unrecognized value
|
||||||
gpo_rule_configured_unavailable = -2, // Couldn't access registry
|
gpo_rule_configured_unavailable = -2, // Couldn't access registry
|
||||||
gpo_rule_configured_not_configured = -1, // Policy is not configured
|
gpo_rule_configured_not_configured = -1, // Policy is not configured
|
||||||
@ -53,6 +55,7 @@ namespace powertoys_gpo {
|
|||||||
const std::wstring POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE = L"ConfigureEnabledUtilityShortcutGuide";
|
const std::wstring POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE = L"ConfigureEnabledUtilityShortcutGuide";
|
||||||
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
|
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
|
||||||
const std::wstring POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE = L"ConfigureEnabledUtilityAdvancedPaste";
|
const std::wstring POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE = L"ConfigureEnabledUtilityAdvancedPaste";
|
||||||
|
const std::wstring POLICY_CONFIGURE_ENABLED_CMD_PAL = L"ConfigureEnabledUtilityCmdPal";
|
||||||
const std::wstring POLICY_CONFIGURE_ENABLED_ZOOM_IT = L"ConfigureEnabledUtilityZoomIt";
|
const std::wstring POLICY_CONFIGURE_ENABLED_ZOOM_IT = L"ConfigureEnabledUtilityZoomIt";
|
||||||
const std::wstring POLICY_CONFIGURE_ENABLED_REGISTRY_PREVIEW = L"ConfigureEnabledUtilityRegistryPreview";
|
const std::wstring POLICY_CONFIGURE_ENABLED_REGISTRY_PREVIEW = L"ConfigureEnabledUtilityRegistryPreview";
|
||||||
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_WITHOUT_BORDERS = L"ConfigureEnabledUtilityMouseWithoutBorders";
|
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_WITHOUT_BORDERS = L"ConfigureEnabledUtilityMouseWithoutBorders";
|
||||||
@ -157,16 +160,17 @@ namespace powertoys_gpo {
|
|||||||
machine_key_found = false;
|
machine_key_found = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(machine_key_found)
|
if (machine_key_found)
|
||||||
{
|
{
|
||||||
// If the path was found in the machine, we need to check if the value for the policy exists.
|
// If the path was found in the machine, we need to check if the value for the policy exists.
|
||||||
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, reinterpret_cast<LPBYTE>(&value), &valueSize);
|
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, reinterpret_cast<LPBYTE>(&value), &valueSize);
|
||||||
|
|
||||||
RegCloseKey(key);
|
RegCloseKey(key);
|
||||||
|
|
||||||
if (res != ERROR_SUCCESS) {
|
if (res != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
// Value not found on the path.
|
// Value not found on the path.
|
||||||
machine_key_found=false;
|
machine_key_found = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +179,8 @@ namespace powertoys_gpo {
|
|||||||
// If there's no value found on the machine scope, try to get it from the user scope.
|
// If there's no value found on the machine scope, try to get it from the user scope.
|
||||||
if (auto res = RegOpenKeyExW(POLICIES_SCOPE_USER, POLICIES_PATH.c_str(), 0, KEY_READ, &key); res != ERROR_SUCCESS)
|
if (auto res = RegOpenKeyExW(POLICIES_SCOPE_USER, POLICIES_PATH.c_str(), 0, KEY_READ, &key); res != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
if (res == ERROR_FILE_NOT_FOUND) {
|
if (res == ERROR_FILE_NOT_FOUND)
|
||||||
|
{
|
||||||
return gpo_rule_configured_not_configured;
|
return gpo_rule_configured_not_configured;
|
||||||
}
|
}
|
||||||
return gpo_rule_configured_unavailable;
|
return gpo_rule_configured_unavailable;
|
||||||
@ -183,7 +188,8 @@ namespace powertoys_gpo {
|
|||||||
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, reinterpret_cast<LPBYTE>(&value), &valueSize);
|
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, reinterpret_cast<LPBYTE>(&value), &valueSize);
|
||||||
RegCloseKey(key);
|
RegCloseKey(key);
|
||||||
|
|
||||||
if (res != ERROR_SUCCESS) {
|
if (res != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
return gpo_rule_configured_not_configured;
|
return gpo_rule_configured_not_configured;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,6 +418,11 @@ namespace powertoys_gpo {
|
|||||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE);
|
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_ADVANCED_PASTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline gpo_rule_configured_t getConfiguredCmdPalEnabledValue()
|
||||||
|
{
|
||||||
|
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_CMD_PAL);
|
||||||
|
}
|
||||||
|
|
||||||
inline gpo_rule_configured_t getConfiguredWorkspacesEnabledValue()
|
inline gpo_rule_configured_t getConfiguredWorkspacesEnabledValue()
|
||||||
{
|
{
|
||||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_WORKSPACES);
|
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_WORKSPACES);
|
||||||
@ -502,7 +513,7 @@ namespace powertoys_gpo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline gpo_rule_configured_t getRunPluginEnabledValue(std::string pluginID)
|
inline gpo_rule_configured_t getRunPluginEnabledValue(std::string pluginID)
|
||||||
{
|
{
|
||||||
if (pluginID == "" || pluginID == " ")
|
if (pluginID == "" || pluginID == " ")
|
||||||
{
|
{
|
||||||
// this plugin id can't exist in the registry
|
// this plugin id can't exist in the registry
|
||||||
@ -511,7 +522,7 @@ namespace powertoys_gpo {
|
|||||||
|
|
||||||
std::wstring plugin_id(pluginID.begin(), pluginID.end());
|
std::wstring plugin_id(pluginID.begin(), pluginID.end());
|
||||||
auto individual_plugin_setting = getPolicyListValue(POWER_LAUNCHER_INDIVIDUAL_PLUGIN_ENABLED_LIST_PATH, plugin_id);
|
auto individual_plugin_setting = getPolicyListValue(POWER_LAUNCHER_INDIVIDUAL_PLUGIN_ENABLED_LIST_PATH, plugin_id);
|
||||||
|
|
||||||
if (individual_plugin_setting.has_value())
|
if (individual_plugin_setting.has_value())
|
||||||
{
|
{
|
||||||
if (*individual_plugin_setting == L"0")
|
if (*individual_plugin_setting == L"0")
|
||||||
@ -538,7 +549,7 @@ namespace powertoys_gpo {
|
|||||||
{
|
{
|
||||||
// If no individual plugin policy exists, we check the policy with the setting for all plugins.
|
// If no individual plugin policy exists, we check the policy with the setting for all plugins.
|
||||||
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS);
|
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline gpo_rule_configured_t getAllowedAdvancedPasteOnlineAIModelsValue()
|
inline gpo_rule_configured_t getAllowedAdvancedPasteOnlineAIModelsValue()
|
||||||
@ -602,7 +613,7 @@ namespace powertoys_gpo {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return std::wstring ();
|
return std::wstring();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,10 @@
|
|||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
#include <winrt/Windows.ApplicationModel.h>
|
#include <winrt/Windows.ApplicationModel.h>
|
||||||
#include <winrt/Windows.Foundation.h>
|
#include <winrt/Windows.Foundation.h>
|
||||||
@ -13,6 +16,11 @@
|
|||||||
#include "../version/version.h"
|
#include "../version/version.h"
|
||||||
|
|
||||||
namespace package {
|
namespace package {
|
||||||
|
|
||||||
|
using namespace winrt::Windows::Foundation;
|
||||||
|
using namespace winrt::Windows::ApplicationModel;
|
||||||
|
using namespace winrt::Windows::Management::Deployment;
|
||||||
|
|
||||||
inline BOOL IsWin11OrGreater()
|
inline BOOL IsWin11OrGreater()
|
||||||
{
|
{
|
||||||
OSVERSIONINFOEX osvi{};
|
OSVERSIONINFOEX osvi{};
|
||||||
@ -38,35 +46,35 @@ namespace package {
|
|||||||
dwlConditionMask);
|
dwlConditionMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool IsPackageRegistered(std::wstring packageDisplayName)
|
inline std::optional<Package> GetRegisteredPackage(std::wstring packageDisplayName, bool checkVersion)
|
||||||
{
|
{
|
||||||
using namespace winrt::Windows::Foundation;
|
|
||||||
using namespace winrt::Windows::Management::Deployment;
|
|
||||||
|
|
||||||
PackageManager packageManager;
|
PackageManager packageManager;
|
||||||
|
|
||||||
for (auto const& package : packageManager.FindPackagesForUser({}))
|
for (const auto& package : packageManager.FindPackagesForUser({}))
|
||||||
{
|
{
|
||||||
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
||||||
const auto& packageVersion = package.Id().Version();
|
const auto& packageVersion = package.Id().Version();
|
||||||
|
|
||||||
if (packageFullName.contains(packageDisplayName))
|
if (packageFullName.contains(packageDisplayName))
|
||||||
{
|
{
|
||||||
if (packageVersion.Major == VERSION_MAJOR && packageVersion.Minor == VERSION_MINOR && packageVersion.Revision == VERSION_REVISION)
|
// If checkVersion is true, verify if the package has the same version as PowerToys.
|
||||||
|
if ((!checkVersion) || (packageVersion.Major == VERSION_MAJOR && packageVersion.Minor == VERSION_MINOR && packageVersion.Revision == VERSION_REVISION))
|
||||||
{
|
{
|
||||||
return true;
|
return { package };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool RegisterSparsePackage(std::wstring externalLocation, std::wstring sparsePkgPath)
|
inline bool IsPackageRegisteredWithPowerToysVersion(std::wstring packageDisplayName)
|
||||||
{
|
{
|
||||||
using namespace winrt::Windows::Foundation;
|
return GetRegisteredPackage(packageDisplayName, true).has_value();
|
||||||
using namespace winrt::Windows::Management::Deployment;
|
}
|
||||||
|
|
||||||
|
inline bool RegisterSparsePackage(const std::wstring& externalLocation, const std::wstring& sparsePkgPath)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Uri externalUri{ externalLocation };
|
Uri externalUri{ externalLocation };
|
||||||
@ -115,4 +123,174 @@ namespace package {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool UnRegisterPackage(const std::wstring& pkgDisplayName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PackageManager packageManager;
|
||||||
|
const static auto packages = packageManager.FindPackages();
|
||||||
|
|
||||||
|
for (auto const& package : packages)
|
||||||
|
{
|
||||||
|
const auto& packageFullName = std::wstring{ package.Id().FullName() };
|
||||||
|
|
||||||
|
if (packageFullName.contains(pkgDisplayName))
|
||||||
|
{
|
||||||
|
auto deploymentOperation{ packageManager.RemovePackageAsync(packageFullName) };
|
||||||
|
deploymentOperation.get();
|
||||||
|
|
||||||
|
// Check the status of the operation
|
||||||
|
if (deploymentOperation.Status() == AsyncStatus::Error)
|
||||||
|
{
|
||||||
|
auto deploymentResult{ deploymentOperation.GetResults() };
|
||||||
|
auto errorCode = deploymentOperation.ErrorCode();
|
||||||
|
auto errorText = deploymentResult.ErrorText();
|
||||||
|
|
||||||
|
Logger::error(L"Unregister {} package failed. ErrorCode: {}, ErrorText: {}", packageFullName, std::to_wstring(errorCode), errorText);
|
||||||
|
}
|
||||||
|
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
|
||||||
|
{
|
||||||
|
Logger::error(L"Unregister {} package canceled.", packageFullName);
|
||||||
|
}
|
||||||
|
else if (deploymentOperation.Status() == AsyncStatus::Completed)
|
||||||
|
{
|
||||||
|
Logger::info(L"Unregister {} package completed.", packageFullName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::debug(L"Unregister {} package started.", packageFullName);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
Logger::error("Exception thrown while trying to unregister package: {}", e.what());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::vector<std::wstring> FindMsixFile(const std::wstring& directoryPath, bool recursive)
|
||||||
|
{
|
||||||
|
if (directoryPath.empty())
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!std::filesystem::exists(directoryPath))
|
||||||
|
{
|
||||||
|
Logger::error(L"The directory '" + directoryPath + L"' does not exist.");
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::regex pattern(R"(^.+\.(appx|msix|msixbundle)$)", std::regex_constants::icase);
|
||||||
|
std::vector<std::wstring> matchedFiles;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (recursive)
|
||||||
|
{
|
||||||
|
for (const auto& entry : std::filesystem::recursive_directory_iterator(directoryPath))
|
||||||
|
{
|
||||||
|
if (entry.is_regular_file())
|
||||||
|
{
|
||||||
|
const auto& fileName = entry.path().filename().string();
|
||||||
|
if (std::regex_match(fileName, pattern))
|
||||||
|
{
|
||||||
|
matchedFiles.push_back(entry.path());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (const auto& entry : std::filesystem::directory_iterator(directoryPath))
|
||||||
|
{
|
||||||
|
if (entry.is_regular_file())
|
||||||
|
{
|
||||||
|
const auto& fileName = entry.path().filename().string();
|
||||||
|
if (std::regex_match(fileName, pattern))
|
||||||
|
{
|
||||||
|
matchedFiles.push_back(entry.path());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (const std::exception& ex)
|
||||||
|
{
|
||||||
|
Logger::error("An error occurred while searching for MSIX files: " + std::string(ex.what()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return matchedFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool RegisterPackage(std::wstring pkgPath, std::vector<std::wstring> dependencies)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Uri packageUri{ pkgPath };
|
||||||
|
|
||||||
|
PackageManager packageManager;
|
||||||
|
|
||||||
|
// Declare use of an external location
|
||||||
|
DeploymentOptions options = DeploymentOptions::ForceApplicationShutdown;
|
||||||
|
|
||||||
|
Collections::IVector<Uri> uris = winrt::single_threaded_vector<Uri>();
|
||||||
|
if (!dependencies.empty())
|
||||||
|
{
|
||||||
|
for (const auto& dependency : dependencies)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
uris.Append(Uri(dependency));
|
||||||
|
}
|
||||||
|
catch (const winrt::hresult_error& ex)
|
||||||
|
{
|
||||||
|
Logger::error(L"Error creating Uri for dependency: %s", ex.message().c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> deploymentOperation = packageManager.AddPackageAsync(packageUri, uris, options);
|
||||||
|
deploymentOperation.get();
|
||||||
|
|
||||||
|
// Check the status of the operation
|
||||||
|
if (deploymentOperation.Status() == AsyncStatus::Error)
|
||||||
|
{
|
||||||
|
auto deploymentResult{ deploymentOperation.GetResults() };
|
||||||
|
auto errorCode = deploymentOperation.ErrorCode();
|
||||||
|
auto errorText = deploymentResult.ErrorText();
|
||||||
|
|
||||||
|
Logger::error(L"Register {} package failed. ErrorCode: {}, ErrorText: {}", pkgPath, std::to_wstring(errorCode), errorText);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (deploymentOperation.Status() == AsyncStatus::Canceled)
|
||||||
|
{
|
||||||
|
Logger::error(L"Register {} package canceled.", pkgPath);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (deploymentOperation.Status() == AsyncStatus::Completed)
|
||||||
|
{
|
||||||
|
Logger::info(L"Register {} package completed.", pkgPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::debug(L"Register {} package started.", pkgPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
Logger::error("Exception thrown while trying to register package: {}", e.what());
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright (c) Microsoft Corporation.
|
<!-- Copyright (c) Microsoft Corporation.
|
||||||
Licensed under the MIT License. -->
|
Licensed under the MIT License. -->
|
||||||
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.16" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.17" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||||
<policyNamespaces>
|
<policyNamespaces>
|
||||||
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
|
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
|
||||||
</policyNamespaces>
|
</policyNamespaces>
|
||||||
<resources minRequiredRevision="1.16"/><!-- Last changed with PowerToys v0.89.0 -->
|
<resources minRequiredRevision="1.17"/><!-- Last changed with PowerToys v0.90.0 -->
|
||||||
<supportedOn>
|
<supportedOn>
|
||||||
<definitions>
|
<definitions>
|
||||||
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
|
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
|
||||||
@ -25,6 +25,7 @@
|
|||||||
<definition name="SUPPORTED_POWERTOYS_0_86_0" displayName="$(string.SUPPORTED_POWERTOYS_0_86_0)"/>
|
<definition name="SUPPORTED_POWERTOYS_0_86_0" displayName="$(string.SUPPORTED_POWERTOYS_0_86_0)"/>
|
||||||
<definition name="SUPPORTED_POWERTOYS_0_88_0" displayName="$(string.SUPPORTED_POWERTOYS_0_88_0)"/>
|
<definition name="SUPPORTED_POWERTOYS_0_88_0" displayName="$(string.SUPPORTED_POWERTOYS_0_88_0)"/>
|
||||||
<definition name="SUPPORTED_POWERTOYS_0_89_0" displayName="$(string.SUPPORTED_POWERTOYS_0_89_0)"/>
|
<definition name="SUPPORTED_POWERTOYS_0_89_0" displayName="$(string.SUPPORTED_POWERTOYS_0_89_0)"/>
|
||||||
|
<definition name="SUPPORTED_POWERTOYS_0_90_0" displayName="$(string.SUPPORTED_POWERTOYS_0_90_0)"/>
|
||||||
<definition name="SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1)"/>
|
<definition name="SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1)"/>
|
||||||
</definitions>
|
</definitions>
|
||||||
</supportedOn>
|
</supportedOn>
|
||||||
@ -106,6 +107,16 @@
|
|||||||
<decimal value="0" />
|
<decimal value="0" />
|
||||||
</disabledValue>
|
</disabledValue>
|
||||||
</policy>
|
</policy>
|
||||||
|
<policy name="ConfigureEnabledUtilityCmdPal" class="Both" displayName="$(string.ConfigureEnabledUtilityCmdPal)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityCmdPal">
|
||||||
|
<parentCategory ref="PowerToys" />
|
||||||
|
<supportedOn ref="SUPPORTED_POWERTOYS_0_90_0" />
|
||||||
|
<enabledValue>
|
||||||
|
<decimal value="1" />
|
||||||
|
</enabledValue>
|
||||||
|
<disabledValue>
|
||||||
|
<decimal value="0" />
|
||||||
|
</disabledValue>
|
||||||
|
</policy>
|
||||||
<policy name="ConfigureEnabledUtilityColorPicker" class="Both" displayName="$(string.ConfigureEnabledUtilityColorPicker)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityColorPicker">
|
<policy name="ConfigureEnabledUtilityColorPicker" class="Both" displayName="$(string.ConfigureEnabledUtilityColorPicker)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityColorPicker">
|
||||||
<parentCategory ref="PowerToys" />
|
<parentCategory ref="PowerToys" />
|
||||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
|
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright (c) Microsoft Corporation.
|
<!-- Copyright (c) Microsoft Corporation.
|
||||||
Licensed under the MIT License. -->
|
Licensed under the MIT License. -->
|
||||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.16" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.17" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||||
<displayName>PowerToys</displayName>
|
<displayName>PowerToys</displayName>
|
||||||
<description>PowerToys</description>
|
<description>PowerToys</description>
|
||||||
<resources>
|
<resources>
|
||||||
@ -32,6 +32,7 @@
|
|||||||
<string id="SUPPORTED_POWERTOYS_0_86_0">PowerToys version 0.86.0 or later</string>
|
<string id="SUPPORTED_POWERTOYS_0_86_0">PowerToys version 0.86.0 or later</string>
|
||||||
<string id="SUPPORTED_POWERTOYS_0_88_0">PowerToys version 0.88.0 or later</string>
|
<string id="SUPPORTED_POWERTOYS_0_88_0">PowerToys version 0.88.0 or later</string>
|
||||||
<string id="SUPPORTED_POWERTOYS_0_89_0">PowerToys version 0.89.0 or later</string>
|
<string id="SUPPORTED_POWERTOYS_0_89_0">PowerToys version 0.89.0 or later</string>
|
||||||
|
<string id="SUPPORTED_POWERTOYS_0_90_0">PowerToys version 0.90.0 or later</string>
|
||||||
<string id="SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1">From PowerToys version 0.64.0 until PowerToys version 0.87.1</string>
|
<string id="SUPPORTED_POWERTOYS_0_64_0_TO_0_87_1">From PowerToys version 0.64.0 until PowerToys version 0.87.1</string>
|
||||||
|
|
||||||
<string id="ConfigureAllUtilityGlobalEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
|
<string id="ConfigureAllUtilityGlobalEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
|
||||||
@ -242,6 +243,7 @@ If you don't configure this policy, the user will be able to control the setting
|
|||||||
<string id="ConfigureEnabledUtilityAwake">Awake: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityAwake">Awake: Configure enabled state</string>
|
||||||
<string id="ConfigureEnabledUtilityColorPicker">Color Picker: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityColorPicker">Color Picker: Configure enabled state</string>
|
||||||
<string id="ConfigureEnabledUtilityCmdNotFound">Command Not Found: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityCmdNotFound">Command Not Found: Configure enabled state</string>
|
||||||
|
<string id="ConfigureEnabledUtilityCmdPal">CmdPal: Configure enabled state</string>
|
||||||
<string id="ConfigureEnabledUtilityCropAndLock">Crop And Lock: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityCropAndLock">Crop And Lock: Configure enabled state</string>
|
||||||
<string id="ConfigureEnabledUtilityEnvironmentVariables">Environment Variables: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityEnvironmentVariables">Environment Variables: Configure enabled state</string>
|
||||||
<string id="ConfigureEnabledUtilityFancyZones">FancyZones: Configure enabled state</string>
|
<string id="ConfigureEnabledUtilityFancyZones">FancyZones: Configure enabled state</string>
|
||||||
|
@ -69,6 +69,10 @@
|
|||||||
<PackageReference Include="WinUIEx" />
|
<PackageReference Include="WinUIEx" />
|
||||||
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
||||||
<PackageReference Include="System.Text.Json" />
|
<PackageReference Include="System.Text.Json" />
|
||||||
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
|
<!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. -->
|
||||||
|
<PackageReference Include="CommunityToolkit.Common" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
||||||
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
|
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
|
||||||
<Import Project="..\..\..\Common.SelfContained.props" />
|
<Import Project="..\..\..\Common.SelfContained.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>EnvironmentVariables</RootNamespace>
|
<RootNamespace>EnvironmentVariables</RootNamespace>
|
||||||
@ -67,6 +67,10 @@
|
|||||||
<PackageReference Include="WinUIEx" />
|
<PackageReference Include="WinUIEx" />
|
||||||
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
||||||
<PackageReference Include="System.Text.Json" />
|
<PackageReference Include="System.Text.Json" />
|
||||||
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
|
<!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. -->
|
||||||
|
<PackageReference Include="CommunityToolkit.Common" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
std::wstring path = get_module_folderpath(globals::instance);
|
std::wstring path = get_module_folderpath(globals::instance);
|
||||||
std::wstring packageUri = path + L"\\FileLocksmithContextMenuPackage.msix";
|
std::wstring packageUri = path + L"\\FileLocksmithContextMenuPackage.msix";
|
||||||
|
|
||||||
if (!package::IsPackageRegistered(constants::nonlocalizable::ContextMenuPackageName))
|
if (!package::IsPackageRegisteredWithPowerToysVersion(constants::nonlocalizable::ContextMenuPackageName))
|
||||||
{
|
{
|
||||||
package::RegisterSparsePackage(path, packageUri);
|
package::RegisterSparsePackage(path, packageUri);
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,10 @@
|
|||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
||||||
<PackageReference Include="System.Drawing.Common" />
|
<PackageReference Include="System.Drawing.Common" />
|
||||||
<PackageReference Include="WinUIEx" />
|
<PackageReference Include="WinUIEx" />
|
||||||
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
|
<!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. -->
|
||||||
|
<PackageReference Include="CommunityToolkit.Common" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<!-- This package is a dependency of Microsoft.Extensions.Logging.EventLog, but we need to set it here so we can exclude the assets, so it doesn't conflict with the 8.0.1 dll coming from .NET SDK. -->
|
<!-- This package is a dependency of Microsoft.Extensions.Logging.EventLog, but we need to set it here so we can exclude the assets, so it doesn't conflict with the 8.0.1 dll coming from .NET SDK. -->
|
||||||
<ExcludeAssets>runtime</ExcludeAssets> <!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
|
<ExcludeAssets>runtime</ExcludeAssets> <!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. -->
|
||||||
|
<PackageReference Include="CommunityToolkit.Common" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -66,6 +66,10 @@
|
|||||||
<PackageReference Include="WinUIEx" />
|
<PackageReference Include="WinUIEx" />
|
||||||
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
<!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. -->
|
||||||
<PackageReference Include="System.Text.Json" />
|
<PackageReference Include="System.Text.Json" />
|
||||||
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
|
<!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. -->
|
||||||
|
<PackageReference Include="CommunityToolkit.Common" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -202,7 +202,9 @@ namespace HostsUILib.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
_entries.CollectionChanged += Entries_CollectionChanged;
|
_entries.CollectionChanged += Entries_CollectionChanged;
|
||||||
|
#pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
|
||||||
Entries = new AdvancedCollectionView(_entries, true);
|
Entries = new AdvancedCollectionView(_entries, true);
|
||||||
|
#pragma warning restore IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
|
||||||
Entries.SortDescriptions.Add(new SortDescription(nameof(Entry.Id), SortDirection.Ascending));
|
Entries.SortDescriptions.Add(new SortDescription(nameof(Entry.Id), SortDirection.Ascending));
|
||||||
ApplyFilters();
|
ApplyFilters();
|
||||||
OnPropertyChanged(nameof(Entries));
|
OnPropertyChanged(nameof(Entries));
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets')" />
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets')" />
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2739.15\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2739.15\build\native\Microsoft.Web.WebView2.targets')" />
|
<Import Project="..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2903.40\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2903.40\build\native\Microsoft.Web.WebView2.targets')" />
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets')" />
|
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets')" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
@ -152,7 +152,7 @@
|
|||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.props'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.props'))" />
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428\build\Microsoft.Windows.SDK.BuildTools.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2739.15\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2739.15\build\native\Microsoft.Web.WebView2.targets'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2903.40\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Web.WebView2.1.0.2903.40\build\native\Microsoft.Web.WebView2.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.props'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.props'))" />
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.6.250205002\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.Web.WebView2" version="1.0.2739.15" targetFramework="native" />
|
<package id="Microsoft.Web.WebView2" version="1.0.2903.40" targetFramework="native" />
|
||||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
|
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
|
||||||
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.231216.1" targetFramework="native" />
|
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.231216.1" targetFramework="native" />
|
||||||
<package id="Microsoft.Windows.SDK.BuildTools" version="10.0.22621.2428" targetFramework="native" />
|
<package id="Microsoft.Windows.SDK.BuildTools" version="10.0.22621.2428" targetFramework="native" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<UseWinUI>true</UseWinUI>
|
<UseWinUI>true</UseWinUI>
|
||||||
<Platforms>x64;ARM64</Platforms>
|
<Platforms>x64;ARM64</Platforms>
|
||||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||||
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
|
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
|
||||||
@ -55,6 +55,8 @@
|
|||||||
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
|
||||||
<PackageReference Include="WinUIEx" />
|
<PackageReference Include="WinUIEx" />
|
||||||
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ namespace newplus::utilities
|
|||||||
static const auto new_dll_path = get_module_folderpath(module_instance_handle);
|
static const auto new_dll_path = get_module_folderpath(module_instance_handle);
|
||||||
auto new_package_uri = new_dll_path + L"\\" + constants::non_localizable::msix_package_name;
|
auto new_package_uri = new_dll_path + L"\\" + constants::non_localizable::msix_package_name;
|
||||||
|
|
||||||
if (!package::IsPackageRegistered(constants::non_localizable::context_menu_package_name))
|
if (!package::IsPackageRegisteredWithPowerToysVersion(constants::non_localizable::context_menu_package_name))
|
||||||
{
|
{
|
||||||
package::RegisterSparsePackage(new_dll_path, new_package_uri);
|
package::RegisterSparsePackage(new_dll_path, new_package_uri);
|
||||||
}
|
}
|
||||||
|
31
src/modules/cmdpal/.wt.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"$version": "1.0.0",
|
||||||
|
"snippets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"input": "pwsh -c .\\doc\\initial-sdk-spec\\generate-interface.ps1 > .\\extensionsdk\\Microsoft.CommandPalette.Extensions\\Microsoft.CommandPalette.Extensions.idl",
|
||||||
|
"name": "Generate interface",
|
||||||
|
"description": "Generate the interface from the SDK spec\nThis drops it into Microsoft.CommandPalette.Extensions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "tasklist | findstr Extension",
|
||||||
|
"name": "List running extensions",
|
||||||
|
"description": "This will list all running extensions, as long as they have 'Extension' in the name (they should)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "for /F \"tokens=2\" %A in ('tasklist ^| findstr Extension') do taskkill /PID %A /F",
|
||||||
|
"name": "🚨 Terminate extensions 🚨",
|
||||||
|
"description": "Terminate anything with 'Extension' in the name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "start https://github.com/zadjii-msft/PowerToys/compare/main...zadjii-msft:PowerToys:{branch}?expand=1\u001b[D\u001b[D\u001b[D\u001b[D\u001b[D\u001b[D\u001b[D\u001b[D\u001b[D",
|
||||||
|
"name": "New PR",
|
||||||
|
"description": "Create a new PR targeting the right fork.\nReplace {branch} with the actual branch you want to merge."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": "pushd .\\ExtensionTemplate\\ ; git archive -o ..\\Microsoft.CmdPal.UI.ViewModels\\Assets\\template.zip HEAD -- .\\TemplateCmdPalExtension\\ ; popd",
|
||||||
|
"name": "Update template project",
|
||||||
|
"description": "zips up the ExtensionTemplate into our assets. Run this in the cmdpal/ directory."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include "resource.h"
|
||||||
|
#include "../../../common/version/version.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#include "winres.h"
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build"
|
||||||
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{0adeb797-c8c7-4ffa-acd5-2af6cad7ecd8}</ProjectGuid>
|
||||||
|
<RootNamespace>CmdPalModuleInterface</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
<TargetName>PowerToys.CmdPalModuleInterface</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\common\logger\logger.vcxproj">
|
||||||
|
<Project>{d9b8fc84-322a-4f9f-bbb9-20915c47ddfd}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\common\SettingsAPI\SettingsAPI.vcxproj">
|
||||||
|
<Project>{6955446d-23f7-4023-9bb3-8657f904af99}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\common\version\version.vcxproj">
|
||||||
|
<Project>{cc6e41ac-8174-4e8a-8d22-85dd7f4851df}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\common\inc;..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="pch.h" />
|
||||||
|
<ClInclude Include="resource.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="dllmain.cpp" />
|
||||||
|
<ClCompile Include="pch.cpp">
|
||||||
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="CmdPalModuleInterface.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<Import Project="..\..\..\..\deps\spdlog.props" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||||
|
</ImportGroup>
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||||
|
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="pch.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="pch.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
268
src/modules/cmdpal/CmdPalModuleInterface/dllmain.cpp
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
#include <interface/powertoy_module_interface.h>
|
||||||
|
|
||||||
|
#include <common/logger/logger.h>
|
||||||
|
#include <common/utils/logger_helper.h>
|
||||||
|
#include <common/SettingsAPI/settings_helpers.h>
|
||||||
|
#include <common/SettingsAPI/settings_objects.h>
|
||||||
|
#include <common/utils/resources.h>
|
||||||
|
#include <common/utils/package.h>
|
||||||
|
#include <common/utils/process_path.h>
|
||||||
|
#include <Psapi.h>
|
||||||
|
#include <TlHelp32.h>
|
||||||
|
|
||||||
|
HINSTANCE g_hInst_cmdPal = 0;
|
||||||
|
|
||||||
|
BOOL APIENTRY DllMain(HMODULE hInstance,
|
||||||
|
DWORD ul_reason_for_call,
|
||||||
|
LPVOID)
|
||||||
|
{
|
||||||
|
switch (ul_reason_for_call)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
g_hInst_cmdPal = hInstance;
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CmdPal : public PowertoyModuleIface
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
bool m_enabled = false;
|
||||||
|
|
||||||
|
std::wstring app_name;
|
||||||
|
|
||||||
|
//contains the non localized key of the powertoy
|
||||||
|
std::wstring app_key;
|
||||||
|
|
||||||
|
void LaunchApp()
|
||||||
|
{
|
||||||
|
auto package = package::GetRegisteredPackage(L"Microsoft.CommandPalette", false);
|
||||||
|
|
||||||
|
if (package.has_value())
|
||||||
|
{
|
||||||
|
auto getAppListEntriesOperation = package->GetAppListEntriesAsync();
|
||||||
|
auto appEntries = getAppListEntriesOperation.get();
|
||||||
|
|
||||||
|
if (appEntries.Size() > 0)
|
||||||
|
{
|
||||||
|
winrt::Windows::Foundation::IAsyncOperation<bool> launchOperation = appEntries.GetAt(0).LaunchAsync();
|
||||||
|
launchOperation.get();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::error(L"No app entries found for the package.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::error(L"CmdPal package is not registered.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<DWORD> GetProcessesIdByName(const std::wstring& processName)
|
||||||
|
{
|
||||||
|
std::vector<DWORD> processIds;
|
||||||
|
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
|
||||||
|
if (snapshot != INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
PROCESSENTRY32 processEntry;
|
||||||
|
processEntry.dwSize = sizeof(PROCESSENTRY32);
|
||||||
|
|
||||||
|
if (Process32First(snapshot, &processEntry))
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (_wcsicmp(processEntry.szExeFile, processName.c_str()) == 0)
|
||||||
|
{
|
||||||
|
processIds.push_back(processEntry.th32ProcessID);
|
||||||
|
}
|
||||||
|
} while (Process32Next(snapshot, &processEntry));
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseHandle(snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
return processIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TerminateCmdPal()
|
||||||
|
{
|
||||||
|
auto processIds = GetProcessesIdByName(L"Microsoft.CmdPal.UI.exe");
|
||||||
|
|
||||||
|
if (processIds.size() == 0)
|
||||||
|
{
|
||||||
|
Logger::trace(L"Nothing To PROCESS_TERMINATE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (DWORD pid : processIds)
|
||||||
|
{
|
||||||
|
HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
|
||||||
|
|
||||||
|
if (hProcess != NULL)
|
||||||
|
{
|
||||||
|
TerminateProcess(hProcess, 0);
|
||||||
|
CloseHandle(hProcess);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
CmdPal()
|
||||||
|
{
|
||||||
|
app_name = L"CmdPal";
|
||||||
|
app_key = L"CmdPal";
|
||||||
|
LoggerHelpers::init_logger(app_key, L"ModuleInterface", "CmdPal");
|
||||||
|
}
|
||||||
|
|
||||||
|
~CmdPal()
|
||||||
|
{
|
||||||
|
if (m_enabled)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
m_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destroy the powertoy and free memory
|
||||||
|
virtual void destroy() override
|
||||||
|
{
|
||||||
|
Logger::trace("CmdPal::destroy()");
|
||||||
|
TerminateCmdPal();
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the localized display name of the powertoy
|
||||||
|
virtual const wchar_t* get_name() override
|
||||||
|
{
|
||||||
|
return app_name.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the non localized key of the powertoy, this will be cached by the runner
|
||||||
|
virtual const wchar_t* get_key() override
|
||||||
|
{
|
||||||
|
return app_key.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the configured status for the gpo policy for the module
|
||||||
|
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
|
||||||
|
{
|
||||||
|
return powertoys_gpo::getConfiguredCmdPalEnabledValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool get_config(wchar_t* buffer, int* buffer_size) override
|
||||||
|
{
|
||||||
|
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);
|
||||||
|
|
||||||
|
// Create a Settings object.
|
||||||
|
PowerToysSettings::Settings settings(hinstance, get_name());
|
||||||
|
|
||||||
|
return settings.serialize_to_buffer(buffer, buffer_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void call_custom_action(const wchar_t* /*action*/) override
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void set_config(const wchar_t* config) override
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Parse the input JSON string.
|
||||||
|
PowerToysSettings::PowerToyValues values =
|
||||||
|
PowerToysSettings::PowerToyValues::from_json_string(config, get_key());
|
||||||
|
|
||||||
|
// If you don't need to do any custom processing of the settings, proceed
|
||||||
|
// to persists the values calling:
|
||||||
|
values.save_to_settings_file();
|
||||||
|
// Otherwise call a custom function to process the settings before saving them to disk:
|
||||||
|
// save_settings();
|
||||||
|
}
|
||||||
|
catch (std::exception&)
|
||||||
|
{
|
||||||
|
// Improper JSON.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void enable()
|
||||||
|
{
|
||||||
|
Logger::trace("CmdPal::enable()");
|
||||||
|
|
||||||
|
m_enabled = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!package::GetRegisteredPackage(L"Microsoft.CommandPalette", false).has_value())
|
||||||
|
{
|
||||||
|
Logger::info(L"CmdPal not installed. Installing...");
|
||||||
|
|
||||||
|
std::wstring installationFolder = get_module_folderpath();
|
||||||
|
#if _DEBUG
|
||||||
|
std::wstring archSubdir = L"x64";
|
||||||
|
#ifdef _M_ARM64
|
||||||
|
archSubdir = L"ARM64";
|
||||||
|
#endif
|
||||||
|
auto msix = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\AppPackages\\Microsoft.CmdPal.UI_0.0.1.0_Debug_Test\\", false);
|
||||||
|
auto dependencies = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\AppPackages\\Microsoft.CmdPal.UI_0.0.1.0_Debug_Test\\Dependencies\\" + archSubdir + L"\\", true);
|
||||||
|
#else
|
||||||
|
auto msix = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\", false);
|
||||||
|
auto dependencies = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPal\\Dependencies\\", true);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!msix.empty())
|
||||||
|
{
|
||||||
|
auto msixPath = msix[0];
|
||||||
|
|
||||||
|
if (!package::RegisterPackage(msixPath, dependencies))
|
||||||
|
{
|
||||||
|
Logger::error(L"Failed to install CmdPal package");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
std::string errorMessage{ "Exception thrown while trying to install CmdPal package: " };
|
||||||
|
errorMessage += e.what();
|
||||||
|
Logger::error(errorMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
LaunchApp();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void disable()
|
||||||
|
{
|
||||||
|
Logger::trace("CmdPal::disable()");
|
||||||
|
TerminateCmdPal();
|
||||||
|
|
||||||
|
m_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool on_hotkey(size_t) override
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual size_t get_hotkeys(Hotkey*, size_t) override
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool is_enabled() override
|
||||||
|
{
|
||||||
|
return m_enabled;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
|
||||||
|
{
|
||||||
|
return new CmdPal();
|
||||||
|
}
|
4
src/modules/cmdpal/CmdPalModuleInterface/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
|
||||||
|
</packages>
|
5
src/modules/cmdpal/CmdPalModuleInterface/pch.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// pch.cpp: source file corresponding to the pre-compiled header
|
||||||
|
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
|
16
src/modules/cmdpal/CmdPalModuleInterface/pch.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// pch.h: This is a precompiled header file.
|
||||||
|
// Files listed below are compiled only once, improving build performance for future builds.
|
||||||
|
// This also affects IntelliSense performance, including code completion and many code browsing features.
|
||||||
|
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
|
||||||
|
// Do not add files here that you will be updating frequently as this negates the performance advantage.
|
||||||
|
|
||||||
|
#ifndef PCH_H
|
||||||
|
#define PCH_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <winrt/Windows.ApplicationModel.Core.h>
|
||||||
|
#include <winrt/Windows.Foundation.Collections.h>
|
||||||
|
#include <winrt/Windows.System.h>
|
||||||
|
|
||||||
|
#endif //PCH_H
|
13
src/modules/cmdpal/CmdPalModuleInterface/resource.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by AlwaysOnTopModuleInterface.rc
|
||||||
|
|
||||||
|
//////////////////////////////
|
||||||
|
// Non-localizable
|
||||||
|
|
||||||
|
#define FILE_DESCRIPTION "PowerToys Command Palette Module"
|
||||||
|
#define INTERNAL_NAME "PowerToys.CmdPalModuleInterface"
|
||||||
|
#define ORIGINAL_FILENAME "PowerToys.CmdPalModuleInterface.dll"
|
||||||
|
|
||||||
|
// Non-localizable
|
||||||
|
//////////////////////////////
|
@ -0,0 +1,10 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<Platforms>x64;ARM64</Platforms>
|
||||||
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
|
<AnalysisMode>Recommended</AnalysisMode>
|
||||||
|
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
|
||||||
|
<NuGetAuditMode>direct</NuGetAuditMode>
|
||||||
|
<PlatformTarget>$(Platform)</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,16 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.1.0" />
|
||||||
|
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24508.2" />
|
||||||
|
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2903.40" />
|
||||||
|
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
||||||
|
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
|
||||||
|
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
|
||||||
|
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.6.250205002" />
|
||||||
|
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
|
||||||
|
<PackageVersion Include="System.Text.Json" Version="9.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.13.35507.96 d17.13
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemplateCmdPalExtension", "TemplateCmdPalExtension\TemplateCmdPalExtension.csproj", "{79F86DE5-70B1-4EC1-9832-DF428B55E466}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|ARM64 = Debug|ARM64
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|ARM64 = Release|ARM64
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Debug|x86.Deploy.0 = Debug|x86
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x64.Build.0 = Release|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x86.Build.0 = Release|x86
|
||||||
|
{79F86DE5-70B1-4EC1-9832-DF428B55E466}.Release|x86.Deploy.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {CEDBC581-5818-4350-BC8A-A1ECE687D357}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 456 B |
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Package
|
||||||
|
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||||
|
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||||
|
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
|
||||||
|
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
|
||||||
|
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||||
|
IgnorableNamespaces="uap uap3 rescap">
|
||||||
|
|
||||||
|
<Identity
|
||||||
|
Name="TemplateCmdPalExtension"
|
||||||
|
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
|
||||||
|
Version="0.0.1.0" />
|
||||||
|
<!-- When you're ready to publish your extension, you'll need to change the
|
||||||
|
Publisher= to match your own identity -->
|
||||||
|
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>TemplateDisplayName</DisplayName>
|
||||||
|
<PublisherDisplayName>A Lone Developer</PublisherDisplayName>
|
||||||
|
<Logo>Assets\StoreLogo.png</Logo>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Dependencies>
|
||||||
|
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.19041.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
</Dependencies>
|
||||||
|
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate"/>
|
||||||
|
</Resources>
|
||||||
|
|
||||||
|
<Applications>
|
||||||
|
<Application Id="App"
|
||||||
|
Executable="$targetnametoken$.exe"
|
||||||
|
EntryPoint="$targetentrypoint$">
|
||||||
|
<uap:VisualElements
|
||||||
|
DisplayName="TemplateDisplayName"
|
||||||
|
Description="TemplateDisplayName"
|
||||||
|
BackgroundColor="transparent"
|
||||||
|
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||||
|
Square44x44Logo="Assets\Square44x44Logo.png">
|
||||||
|
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
|
||||||
|
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||||
|
</uap:VisualElements>
|
||||||
|
<Extensions>
|
||||||
|
<com:Extension Category="windows.comServer">
|
||||||
|
<com:ComServer>
|
||||||
|
<com:ExeServer Executable="TemplateCmdPalExtension.exe" Arguments="-RegisterProcessAsComServer" DisplayName="TemplateDisplayName">
|
||||||
|
<com:Class Id="FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" DisplayName="TemplateDisplayName" />
|
||||||
|
</com:ExeServer>
|
||||||
|
</com:ComServer>
|
||||||
|
</com:Extension>
|
||||||
|
<uap3:Extension Category="windows.appExtension">
|
||||||
|
<uap3:AppExtension Name="com.microsoft.commandpalette"
|
||||||
|
Id="ID"
|
||||||
|
PublicFolder="Public"
|
||||||
|
DisplayName="TemplateDisplayName"
|
||||||
|
Description="TemplateDisplayName">
|
||||||
|
<uap3:Properties>
|
||||||
|
<CmdPalProvider>
|
||||||
|
<Activation>
|
||||||
|
<CreateInstance ClassId="FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" />
|
||||||
|
</Activation>
|
||||||
|
<SupportedInterfaces>
|
||||||
|
<Commands/>
|
||||||
|
</SupportedInterfaces>
|
||||||
|
</CmdPalProvider>
|
||||||
|
</uap3:Properties>
|
||||||
|
</uap3:AppExtension>
|
||||||
|
</uap3:Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
|
||||||
|
<Capabilities>
|
||||||
|
<Capability Name="internetClient" />
|
||||||
|
<rescap:Capability Name="runFullTrust" />
|
||||||
|
</Capabilities>
|
||||||
|
</Package>
|
@ -0,0 +1,25 @@
|
|||||||
|
// 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 Microsoft.CommandPalette.Extensions;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
|
||||||
|
namespace TemplateCmdPalExtension;
|
||||||
|
|
||||||
|
internal sealed partial class TemplateCmdPalExtensionPage : ListPage
|
||||||
|
{
|
||||||
|
public TemplateCmdPalExtensionPage()
|
||||||
|
{
|
||||||
|
Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.png");
|
||||||
|
Title = "TemplateDisplayName";
|
||||||
|
Name = "Open";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IListItem[] GetItems()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
new ListItem(new NoOpCommand()) { Title = "TODO: Implement your extension here" }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
// 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.Threading;
|
||||||
|
using Microsoft.CommandPalette.Extensions;
|
||||||
|
|
||||||
|
namespace TemplateCmdPalExtension;
|
||||||
|
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
[MTAThread]
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
if (args.Length > 0 && args[0] == "-RegisterProcessAsComServer")
|
||||||
|
{
|
||||||
|
using ExtensionServer server = new();
|
||||||
|
var extensionDisposedEvent = new ManualResetEvent(false);
|
||||||
|
var extensionInstance = new TemplateCmdPalExtension(extensionDisposedEvent);
|
||||||
|
|
||||||
|
// We are instantiating an extension instance once above, and returning it every time the callback in RegisterExtension below is called.
|
||||||
|
// This makes sure that only one instance of SampleExtension is alive, which is returned every time the host asks for the IExtension object.
|
||||||
|
// If you want to instantiate a new instance each time the host asks, create the new instance inside the delegate.
|
||||||
|
server.RegisterExtension(() => extensionInstance);
|
||||||
|
|
||||||
|
// This will make the main thread wait until the event is signalled by the extension class.
|
||||||
|
// Since we have single instance of the extension object, we exit as soon as it is disposed.
|
||||||
|
extensionDisposedEvent.WaitOne();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Not being launched as a Extension... exiting.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishProtocol>FileSystem</PublishProtocol>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||||
|
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
|
||||||
|
<SelfContained>true</SelfContained>
|
||||||
|
<PublishSingleFile>False</PublishSingleFile>
|
||||||
|
<PublishReadyToRun>True</PublishReadyToRun>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishProtocol>FileSystem</PublishProtocol>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
|
||||||
|
<SelfContained>true</SelfContained>
|
||||||
|
<PublishSingleFile>False</PublishSingleFile>
|
||||||
|
<PublishReadyToRun>True</PublishReadyToRun>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"TemplateCmdPalExtension (Package)": {
|
||||||
|
"commandName": "MsixPackage",
|
||||||
|
"doNotLaunchApp": true
|
||||||
|
},
|
||||||
|
"TemplateCmdPalExtension (Unpackaged)": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
// 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.Runtime.InteropServices;
|
||||||
|
using System.Threading;
|
||||||
|
using Microsoft.CommandPalette.Extensions;
|
||||||
|
|
||||||
|
namespace TemplateCmdPalExtension;
|
||||||
|
|
||||||
|
[ComVisible(true)]
|
||||||
|
[Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF")]
|
||||||
|
[ComDefaultInterface(typeof(IExtension))]
|
||||||
|
public sealed partial class TemplateCmdPalExtension : IExtension, IDisposable
|
||||||
|
{
|
||||||
|
private readonly ManualResetEvent _extensionDisposedEvent;
|
||||||
|
|
||||||
|
private readonly TemplateCmdPalExtensionCommandsProvider _provider = new();
|
||||||
|
|
||||||
|
public TemplateCmdPalExtension(ManualResetEvent extensionDisposedEvent)
|
||||||
|
{
|
||||||
|
this._extensionDisposedEvent = extensionDisposedEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object? GetProvider(ProviderType providerType)
|
||||||
|
{
|
||||||
|
return providerType switch
|
||||||
|
{
|
||||||
|
ProviderType.Commands => _provider,
|
||||||
|
_ => null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose() => this._extensionDisposedEvent.Set();
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>TemplateCmdPalExtension</RootNamespace>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
|
||||||
|
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion>
|
||||||
|
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
|
||||||
|
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||||
|
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||||
|
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||||
|
|
||||||
|
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||||
|
<EnableMsixTooling>true</EnableMsixTooling>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||||
|
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square150x150Logo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square44x44Logo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||||
|
<Content Include="Assets\StoreLogo.png" />
|
||||||
|
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
|
||||||
|
Tools extension to be activated for this project even if the Windows App SDK Nuget
|
||||||
|
package has not yet been restored.
|
||||||
|
-->
|
||||||
|
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
||||||
|
<ProjectCapability Include="Msix" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.CommandPalette.Extensions" />
|
||||||
|
<PackageReference Include="Microsoft.Windows.CsWinRT" />
|
||||||
|
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
||||||
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
||||||
|
<PackageReference Include="System.Text.Json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
|
||||||
|
Explorer "Package and Publish" context menu entry to be enabled for this project even if
|
||||||
|
the Windows App SDK Nuget package has not yet been restored.
|
||||||
|
-->
|
||||||
|
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
||||||
|
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
<CsWinRTAotOptimizerEnabled>true</CsWinRTAotOptimizerEnabled>
|
||||||
|
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
|
||||||
|
<!-- Suppress DynamicallyAccessedMemberTypes.PublicParameterlessConstructor in fallback code path of Windows SDK projection -->
|
||||||
|
<WarningsNotAsErrors>IL2081</WarningsNotAsErrors>
|
||||||
|
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,28 @@
|
|||||||
|
// 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 Microsoft.CommandPalette.Extensions;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
|
||||||
|
namespace TemplateCmdPalExtension;
|
||||||
|
|
||||||
|
public partial class TemplateCmdPalExtensionCommandsProvider : CommandProvider
|
||||||
|
{
|
||||||
|
private readonly ICommandItem[] _commands;
|
||||||
|
|
||||||
|
public TemplateCmdPalExtensionCommandsProvider()
|
||||||
|
{
|
||||||
|
DisplayName = "TemplateDisplayName";
|
||||||
|
Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.png");
|
||||||
|
_commands = [
|
||||||
|
new CommandItem(new TemplateCmdPalExtensionPage()) { Title = DisplayName },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ICommandItem[] TopLevelCommands()
|
||||||
|
{
|
||||||
|
return _commands;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="TemplateCmdPalExtension.app"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- The ID below informs the system that this application is compatible with OS features first introduced in Windows 10.
|
||||||
|
It is necessary to support features in unpackaged applications, for example the custom titlebar implementation.
|
||||||
|
For more info see https://docs.microsoft.com/windows/apps/windows-app-sdk/use-windows-app-sdk-run-time#declare-os-compatibility-in-your-application-manifest -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<clear />
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
|
</packageSources>
|
||||||
|
<packageSourceMapping>
|
||||||
|
<packageSource key="nuget.org">
|
||||||
|
<package pattern="*" />
|
||||||
|
</packageSource>
|
||||||
|
</packageSourceMapping>
|
||||||
|
</configuration>
|
@ -0,0 +1,59 @@
|
|||||||
|
// 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.Linq;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Properties;
|
||||||
|
using Microsoft.CommandPalette.Extensions;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps;
|
||||||
|
|
||||||
|
public partial class AllAppsCommandProvider : CommandProvider
|
||||||
|
{
|
||||||
|
public static readonly AllAppsPage Page = new();
|
||||||
|
|
||||||
|
private readonly CommandItem _listItem;
|
||||||
|
|
||||||
|
public AllAppsCommandProvider()
|
||||||
|
{
|
||||||
|
Id = "AllApps";
|
||||||
|
DisplayName = Resources.installed_apps;
|
||||||
|
Icon = IconHelpers.FromRelativePath("Assets\\AllApps.svg");
|
||||||
|
Settings = AllAppsSettings.Instance.Settings;
|
||||||
|
|
||||||
|
_listItem = new(Page) { Subtitle = Resources.search_installed_apps };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ICommandItem[] TopLevelCommands() => [_listItem];
|
||||||
|
|
||||||
|
public ICommandItem? LookupApp(string displayName)
|
||||||
|
{
|
||||||
|
var items = Page.GetItems();
|
||||||
|
|
||||||
|
// We're going to do this search in two directions:
|
||||||
|
// First, is this name a substring of any app...
|
||||||
|
var nameMatches = items.Where(i => i.Title.Contains(displayName));
|
||||||
|
|
||||||
|
// ... Then, does any app have this name as a substring ...
|
||||||
|
// Only get one of these - "Terminal Preview" contains both "Terminal" and "Terminal Preview", so just take the best one
|
||||||
|
var appMatches = items.Where(i => displayName.Contains(i.Title)).OrderByDescending(i => i.Title.Length).Take(1);
|
||||||
|
|
||||||
|
// ... Now, combine those two
|
||||||
|
var both = nameMatches.Concat(appMatches);
|
||||||
|
|
||||||
|
if (both.Count() == 1)
|
||||||
|
{
|
||||||
|
return both.First();
|
||||||
|
}
|
||||||
|
else if (nameMatches.Count() == 1 && appMatches.Count() == 1)
|
||||||
|
{
|
||||||
|
if (nameMatches.First() == appMatches.First())
|
||||||
|
{
|
||||||
|
return nameMatches.First();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
119
src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Apps/AllAppsPage.cs
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
// 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.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using ManagedCommon;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Properties;
|
||||||
|
using Microsoft.CommandPalette.Extensions;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps;
|
||||||
|
|
||||||
|
public sealed partial class AllAppsPage : ListPage
|
||||||
|
{
|
||||||
|
private readonly Lock _listLock = new();
|
||||||
|
private AppListItem[] allAppsSection = [];
|
||||||
|
|
||||||
|
public AllAppsPage()
|
||||||
|
{
|
||||||
|
this.Name = Resources.all_apps;
|
||||||
|
this.Icon = IconHelpers.FromRelativePath("Assets\\AllApps.svg");
|
||||||
|
this.ShowDetails = true;
|
||||||
|
this.IsLoading = true;
|
||||||
|
this.PlaceholderText = Resources.search_installed_apps_placeholder;
|
||||||
|
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
lock (_listLock)
|
||||||
|
{
|
||||||
|
BuildListItems();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IListItem[] GetItems()
|
||||||
|
{
|
||||||
|
if (allAppsSection.Length == 0 || AppCache.Instance.Value.ShouldReload())
|
||||||
|
{
|
||||||
|
lock (_listLock)
|
||||||
|
{
|
||||||
|
BuildListItems();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return allAppsSection;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BuildListItems()
|
||||||
|
{
|
||||||
|
this.IsLoading = true;
|
||||||
|
|
||||||
|
Stopwatch stopwatch = new();
|
||||||
|
stopwatch.Start();
|
||||||
|
|
||||||
|
List<AppItem> apps = GetPrograms();
|
||||||
|
|
||||||
|
this.allAppsSection = apps
|
||||||
|
.Select((app) => new AppListItem(app, true))
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
|
this.IsLoading = false;
|
||||||
|
|
||||||
|
AppCache.Instance.Value.ResetReloadFlag();
|
||||||
|
|
||||||
|
stopwatch.Stop();
|
||||||
|
Logger.LogTrace($"{nameof(AllAppsPage)}.{nameof(BuildListItems)} took: {stopwatch.ElapsedMilliseconds} ms");
|
||||||
|
}
|
||||||
|
|
||||||
|
internal List<AppItem> GetPrograms()
|
||||||
|
{
|
||||||
|
IEnumerable<AppItem> uwpResults = AppCache.Instance.Value.UWPs
|
||||||
|
.Where((application) => application.Enabled)
|
||||||
|
.Select(app =>
|
||||||
|
new AppItem()
|
||||||
|
{
|
||||||
|
Name = app.Name,
|
||||||
|
Subtitle = app.Description,
|
||||||
|
Type = UWPApplication.Type(),
|
||||||
|
IcoPath = app.LogoType != LogoType.Error ? app.LogoPath : string.Empty,
|
||||||
|
DirPath = app.Location,
|
||||||
|
UserModelId = app.UserModelId,
|
||||||
|
IsPackaged = true,
|
||||||
|
Commands = app.GetCommands(),
|
||||||
|
});
|
||||||
|
|
||||||
|
IEnumerable<AppItem> win32Results = AppCache.Instance.Value.Win32s
|
||||||
|
.Where((application) => application.Enabled && application.Valid)
|
||||||
|
.Select(app =>
|
||||||
|
{
|
||||||
|
string icoPath = string.IsNullOrEmpty(app.IcoPath) ?
|
||||||
|
(app.AppType == Win32Program.ApplicationType.InternetShortcutApplication ?
|
||||||
|
app.IcoPath :
|
||||||
|
app.FullPath) :
|
||||||
|
app.IcoPath;
|
||||||
|
|
||||||
|
// icoPath = icoPath.EndsWith(".lnk", System.StringComparison.InvariantCultureIgnoreCase) ? (icoPath + ",0") : icoPath;
|
||||||
|
icoPath = icoPath.EndsWith(".lnk", System.StringComparison.InvariantCultureIgnoreCase) ?
|
||||||
|
app.FullPath :
|
||||||
|
icoPath;
|
||||||
|
return new AppItem()
|
||||||
|
{
|
||||||
|
Name = app.Name,
|
||||||
|
Subtitle = app.Description,
|
||||||
|
Type = app.Type(),
|
||||||
|
IcoPath = icoPath,
|
||||||
|
ExePath = !string.IsNullOrEmpty(app.LnkFilePath) ? app.LnkFilePath : app.FullPath,
|
||||||
|
DirPath = app.Location,
|
||||||
|
Commands = app.GetCommands(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return uwpResults.Concat(win32Results).OrderBy(app => app.Name).ToList();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
// 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.Threading.Tasks;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Storage;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Utils;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps;
|
||||||
|
|
||||||
|
public sealed class AppCache : IDisposable
|
||||||
|
{
|
||||||
|
private Win32ProgramFileSystemWatchers _win32ProgramRepositoryHelper;
|
||||||
|
|
||||||
|
private PackageRepository _packageRepository;
|
||||||
|
|
||||||
|
private Win32ProgramRepository _win32ProgramRepository;
|
||||||
|
|
||||||
|
private bool _disposed;
|
||||||
|
|
||||||
|
public IList<Win32Program> Win32s => _win32ProgramRepository.Items;
|
||||||
|
|
||||||
|
public IList<UWPApplication> UWPs => _packageRepository.Items;
|
||||||
|
|
||||||
|
public static readonly Lazy<AppCache> Instance = new(() => new());
|
||||||
|
|
||||||
|
public AppCache()
|
||||||
|
{
|
||||||
|
_win32ProgramRepositoryHelper = new Win32ProgramFileSystemWatchers();
|
||||||
|
_win32ProgramRepository = new Win32ProgramRepository(_win32ProgramRepositoryHelper.FileSystemWatchers.Cast<IFileSystemWatcherWrapper>().ToList(), AllAppsSettings.Instance, _win32ProgramRepositoryHelper.PathsToWatch);
|
||||||
|
|
||||||
|
_packageRepository = new PackageRepository(new PackageCatalogWrapper());
|
||||||
|
|
||||||
|
var a = Task.Run(() =>
|
||||||
|
{
|
||||||
|
_win32ProgramRepository.IndexPrograms();
|
||||||
|
});
|
||||||
|
|
||||||
|
var b = Task.Run(() =>
|
||||||
|
{
|
||||||
|
_packageRepository.IndexPrograms();
|
||||||
|
UpdateUWPIconPath(ThemeHelper.GetCurrentTheme());
|
||||||
|
});
|
||||||
|
|
||||||
|
Task.WaitAll(a, b);
|
||||||
|
|
||||||
|
AllAppsSettings.Instance.LastIndexTime = DateTime.Today;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateUWPIconPath(Theme theme)
|
||||||
|
{
|
||||||
|
if (_packageRepository != null)
|
||||||
|
{
|
||||||
|
foreach (UWPApplication app in _packageRepository)
|
||||||
|
{
|
||||||
|
app.UpdateLogoPath(theme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ShouldReload() => _packageRepository.ShouldReload() || _win32ProgramRepository.ShouldReload();
|
||||||
|
|
||||||
|
public void ResetReloadFlag()
|
||||||
|
{
|
||||||
|
_packageRepository.ResetReloadFlag();
|
||||||
|
_win32ProgramRepository.ResetReloadFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(disposing: true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (!_disposed)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
_win32ProgramRepositoryHelper?.Dispose();
|
||||||
|
_disposed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
34
src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Apps/AppItem.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// 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.Collections.Generic;
|
||||||
|
using Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps;
|
||||||
|
|
||||||
|
internal sealed class AppItem
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Subtitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Type { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string IcoPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string ExePath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string DirPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string UserModelId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsPackaged { get; set; }
|
||||||
|
|
||||||
|
public List<CommandContextItem>? Commands { get; set; }
|
||||||
|
|
||||||
|
public AppItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
104
src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Apps/AppListItem.cs
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
// 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.Threading.Tasks;
|
||||||
|
using Microsoft.CommandPalette.Extensions;
|
||||||
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||||
|
using Windows.Storage.Streams;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
internal sealed partial class AppListItem : ListItem
|
||||||
|
{
|
||||||
|
private readonly AppItem _app;
|
||||||
|
private static readonly Tag _appTag = new("App");
|
||||||
|
|
||||||
|
private readonly Lazy<Details> _details;
|
||||||
|
private readonly Lazy<IconInfo> _icon;
|
||||||
|
|
||||||
|
public override IDetails? Details { get => _details.Value; set => base.Details = value; }
|
||||||
|
|
||||||
|
public override IIconInfo? Icon { get => _icon.Value; set => base.Icon = value; }
|
||||||
|
|
||||||
|
public AppListItem(AppItem app, bool useThumbnails)
|
||||||
|
: base(new AppCommand(app))
|
||||||
|
{
|
||||||
|
_app = app;
|
||||||
|
Title = app.Name;
|
||||||
|
Subtitle = app.Subtitle;
|
||||||
|
Tags = [_appTag];
|
||||||
|
MoreCommands = _app.Commands!.ToArray();
|
||||||
|
|
||||||
|
_details = new Lazy<Details>(() => BuildDetails());
|
||||||
|
_icon = new Lazy<IconInfo>(() =>
|
||||||
|
{
|
||||||
|
var t = FetchIcon(useThumbnails);
|
||||||
|
t.Wait();
|
||||||
|
return t.Result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private Details BuildDetails()
|
||||||
|
{
|
||||||
|
var metadata = new List<DetailsElement>();
|
||||||
|
metadata.Add(new DetailsElement() { Key = "Type", Data = new DetailsTags() { Tags = [new Tag(_app.Type)] } });
|
||||||
|
if (!_app.IsPackaged)
|
||||||
|
{
|
||||||
|
metadata.Add(new DetailsElement() { Key = "Path", Data = new DetailsLink() { Text = _app.ExePath } });
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Details()
|
||||||
|
{
|
||||||
|
Title = this.Title,
|
||||||
|
HeroImage = this.Icon ?? new IconInfo(string.Empty),
|
||||||
|
Metadata = metadata.ToArray(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IconInfo> FetchIcon(bool useThumbnails)
|
||||||
|
{
|
||||||
|
IconInfo? icon = null;
|
||||||
|
if (_app.IsPackaged)
|
||||||
|
{
|
||||||
|
icon = new IconInfo(_app.IcoPath);
|
||||||
|
if (_details.IsValueCreated)
|
||||||
|
{
|
||||||
|
_details.Value.HeroImage = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useThumbnails)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var stream = await ThumbnailHelper.GetThumbnail(_app.ExePath);
|
||||||
|
if (stream != null)
|
||||||
|
{
|
||||||
|
var data = new IconData(RandomAccessStreamReference.CreateFromStream(stream));
|
||||||
|
icon = new IconInfo(data, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
icon = icon ?? new IconInfo(_app.IcoPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
icon = new IconInfo(_app.IcoPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_details.IsValueCreated)
|
||||||
|
{
|
||||||
|
_details.Value.HeroImage = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 3.4 KiB |
@ -0,0 +1,29 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_1825_17772)">
|
||||||
|
<path d="M7.2002 8H12.8002C13.242 8 13.6002 8.35817 13.6002 8.8V13.6C13.6002 14.0418 13.242 14.4 12.8002 14.4H7.2002V8Z" fill="url(#paint0_linear_1825_17772)"/>
|
||||||
|
<path d="M0.799805 8H7.1998V14.4H1.59981C1.15798 14.4 0.799805 14.0418 0.799805 13.6V8Z" fill="url(#paint1_linear_1825_17772)"/>
|
||||||
|
<path d="M0.799805 2.39961C0.799805 1.95778 1.15798 1.59961 1.5998 1.59961H6.3998C6.84163 1.59961 7.1998 1.95778 7.1998 2.39961V7.99961H0.799805V2.39961Z" fill="url(#paint2_linear_1825_17772)"/>
|
||||||
|
<rect width="6.4" height="6.4" rx="0.8" transform="matrix(0.701061 0.713102 -0.701061 0.713102 10.7998 0)" fill="url(#paint3_linear_1825_17772)"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_1825_17772" x1="12.5686" y1="15.0983" x2="7.57856" y2="7.74389" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#5C6166"/>
|
||||||
|
<stop offset="1" stop-color="#8A9299"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_1825_17772" x1="6.36596" y1="14.8714" x2="1.98416" y2="7.32118" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#2E3133"/>
|
||||||
|
<stop offset="1" stop-color="#5C6166"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint2_linear_1825_17772" x1="6.17254" y1="8.59747" x2="2.16557" y2="1.7111" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#8A9299"/>
|
||||||
|
<stop offset="1" stop-color="#A1AAB3"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint3_linear_1825_17772" x1="6.75524" y1="3.90242" x2="-0.056471" y2="3.62557" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#0078D4"/>
|
||||||
|
<stop offset="1" stop-color="#3CCBF4"/>
|
||||||
|
</linearGradient>
|
||||||
|
<clipPath id="clip0_1825_17772">
|
||||||
|
<rect width="16" height="16" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,52 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\..\..\Common.Dotnet.CsWinRT.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<RootNamespace>Microsoft.CmdPal.Ext.Apps</RootNamespace>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\WinUI3Apps\CmdPal</OutputPath>
|
||||||
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.IO.Abstractions" />
|
||||||
|
<PackageReference Include="Microsoft.Windows.CsWin32">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
|
||||||
|
<PackageReference Include="WyHash" />
|
||||||
|
|
||||||
|
<ProjectReference Include="..\..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
|
||||||
|
|
||||||
|
<ProjectReference Include="..\..\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\Microsoft.CommandPalette.Extensions.Toolkit.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Assets\AllApps.png" />
|
||||||
|
<None Remove="Assets\AllApps.svg" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="Assets\AllApps.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="Assets\AllApps.svg">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,19 @@
|
|||||||
|
GetPhysicallyInstalledSystemMemory
|
||||||
|
GlobalMemoryStatusEx
|
||||||
|
GetSystemInfo
|
||||||
|
CoCreateInstance
|
||||||
|
SetForegroundWindow
|
||||||
|
IsIconic
|
||||||
|
RegisterHotKey
|
||||||
|
SetWindowLongPtr
|
||||||
|
CallWindowProc
|
||||||
|
ShowWindow
|
||||||
|
SetForegroundWindow
|
||||||
|
SetFocus
|
||||||
|
SetActiveWindow
|
||||||
|
MonitorFromWindow
|
||||||
|
GetMonitorInfo
|
||||||
|
SHCreateStreamOnFileEx
|
||||||
|
CoAllowSetForegroundWindow
|
||||||
|
SHCreateStreamOnFileEx
|
||||||
|
SHLoadIndirectString
|
@ -0,0 +1,14 @@
|
|||||||
|
// 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.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
// Reference : https://stackoverflow.com/questions/32122679/getting-icon-of-modern-windows-app-from-a-desktop-application
|
||||||
|
[Guid("5842a140-ff9f-4166-8f5c-62f5b7b0c781")]
|
||||||
|
[ComImport]
|
||||||
|
public class AppxFactory
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
// 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.Collections.Generic;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using Windows.Win32.System.Com;
|
||||||
|
using static Microsoft.CmdPal.Ext.Apps.Utils.Native;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
public static class AppxPackageHelper
|
||||||
|
{
|
||||||
|
private static readonly IAppxFactory AppxFactory = (IAppxFactory)new AppxFactory();
|
||||||
|
|
||||||
|
// This function returns a list of attributes of applications
|
||||||
|
internal static IEnumerable<IAppxManifestApplication> GetAppsFromManifest(IStream stream)
|
||||||
|
{
|
||||||
|
var reader = AppxFactory.CreateManifestReader(stream);
|
||||||
|
var manifestApps = reader.GetApplications();
|
||||||
|
|
||||||
|
while (manifestApps.GetHasCurrent())
|
||||||
|
{
|
||||||
|
var manifestApp = manifestApps.GetCurrent();
|
||||||
|
var hr = manifestApp.GetStringValue("AppListEntry", out var appListEntry);
|
||||||
|
_ = CheckHRAndReturnOrThrow(hr, appListEntry);
|
||||||
|
if (appListEntry != "none")
|
||||||
|
{
|
||||||
|
yield return manifestApp;
|
||||||
|
}
|
||||||
|
|
||||||
|
manifestApps.MoveNext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static T CheckHRAndReturnOrThrow<T>(HRESULT hr, T result)
|
||||||
|
{
|
||||||
|
if (hr != HRESULT.S_OK)
|
||||||
|
{
|
||||||
|
Marshal.ThrowExceptionForHR((int)hr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
// 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.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
// Reference : https://github.com/MicrosoftEdge/edge-launcher/blob/108e63df0b4cb5cd9d5e45aa7a264690851ec51d/MIcrosoftEdgeLauncherCsharp/Program.cs
|
||||||
|
[Flags]
|
||||||
|
public enum ActivateOptions
|
||||||
|
{
|
||||||
|
None = 0x00000000,
|
||||||
|
DesignMode = 0x00000001,
|
||||||
|
NoErrorUI = 0x00000002,
|
||||||
|
NoSplashScreen = 0x00000004,
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApplicationActivationManager
|
||||||
|
[ComImport]
|
||||||
|
[Guid("2e941141-7f97-4756-ba1d-9decde894a3d")]
|
||||||
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
|
public interface IApplicationActivationManager
|
||||||
|
{
|
||||||
|
IntPtr ActivateApplication([In] string appUserModelId, [In] string arguments, [In] ActivateOptions options, [Out] out uint processId);
|
||||||
|
|
||||||
|
IntPtr ActivateForFile([In] string appUserModelId, [In] IntPtr /*IShellItemArray* */ itemArray, [In] string verb, [Out] out uint processId);
|
||||||
|
|
||||||
|
IntPtr ActivateForProtocol([In] string appUserModelId, [In] IntPtr /* IShellItemArray* */itemArray, [Out] out uint processId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Application Activation Manager Class
|
||||||
|
[ComImport]
|
||||||
|
[Guid("45BA127D-10A8-46EA-8AB7-56EA9078943C")]
|
||||||
|
public class ApplicationActivationManager : IApplicationActivationManager
|
||||||
|
{
|
||||||
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)/*, PreserveSig*/]
|
||||||
|
public extern IntPtr ActivateApplication([In] string appUserModelId, [In] string arguments, [In] ActivateOptions options, [Out] out uint processId);
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||||
|
public extern IntPtr ActivateForFile([In] string appUserModelId, [In] IntPtr /*IShellItemArray* */ itemArray, [In] string verb, [Out] out uint processId);
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||||
|
public extern IntPtr ActivateForProtocol([In] string appUserModelId, [In] IntPtr /* IShellItemArray* */itemArray, [Out] out uint processId);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
// 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.Runtime.InteropServices;
|
||||||
|
using Windows.Win32.System.Com;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
[Guid("BEB94909-E451-438B-B5A7-D79E767B75D8")]
|
||||||
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
|
public interface IAppxFactory
|
||||||
|
{
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "Implements COM Interface")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Implements COM Interface")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Implements COM Interface")]
|
||||||
|
void _VtblGap0_2(); // skip 2 methods
|
||||||
|
|
||||||
|
internal IAppxManifestReader CreateManifestReader(IStream inputStream);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
// 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.Runtime.InteropServices;
|
||||||
|
using static Microsoft.CmdPal.Ext.Apps.Utils.Native;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
[Guid("5DA89BF4-3773-46BE-B650-7E744863B7E8")]
|
||||||
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
|
public interface IAppxManifestApplication
|
||||||
|
{
|
||||||
|
[PreserveSig]
|
||||||
|
HRESULT GetStringValue([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] out string value);
|
||||||
|
|
||||||
|
[PreserveSig]
|
||||||
|
HRESULT GetAppUserModelId([MarshalAs(UnmanagedType.LPWStr)] out string value);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
// 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.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Microsoft.CmdPal.Ext.Apps.Programs;
|
||||||
|
|
||||||
|
[Guid("9EB8A55A-F04B-4D0D-808D-686185D4847A")]
|
||||||
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
|
public interface IAppxManifestApplicationsEnumerator
|
||||||
|
{
|
||||||
|
IAppxManifestApplication GetCurrent();
|
||||||
|
|
||||||
|
bool GetHasCurrent();
|
||||||
|
|
||||||
|
bool MoveNext();
|
||||||
|
}
|