mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-02 02:16:35 +01:00
Compare commits
36 Commits
leilzh/tes
...
leilzh/pat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfa490cfde | ||
|
|
b99e62af48 | ||
|
|
18b926c41d | ||
|
|
2eb99f96a3 | ||
|
|
fb260bd098 | ||
|
|
f35f94bbaa | ||
|
|
873a7a2bbe | ||
|
|
0a8b83e528 | ||
|
|
7849079de4 | ||
|
|
1a303301bb | ||
|
|
3206c0b073 | ||
|
|
82d031cf2a | ||
|
|
5c7c8c3009 | ||
|
|
64a48fda97 | ||
|
|
75cbd2d577 | ||
|
|
dd47beabd8 | ||
|
|
29a8bbc40a | ||
|
|
6607b60bd5 | ||
|
|
983591e4e0 | ||
|
|
0a2a3fea93 | ||
|
|
30d67ec078 | ||
|
|
4c87a78b1a | ||
|
|
f12d983025 | ||
|
|
369babc0f8 | ||
|
|
6834fa24af | ||
|
|
14f18f4b95 | ||
|
|
4bf2342a09 | ||
|
|
20243c4b99 | ||
|
|
a19127bf49 | ||
|
|
aeaa5297f9 | ||
|
|
cd45bad9ce | ||
|
|
2ae636a860 | ||
|
|
3bf8a63dd8 | ||
|
|
11b6e15869 | ||
|
|
f59063d285 | ||
|
|
83703d2cf2 |
2
.github/actions/spell-check/expect.txt
vendored
2
.github/actions/spell-check/expect.txt
vendored
@@ -1440,7 +1440,6 @@ secpol
|
||||
securestring
|
||||
SEEMASKINVOKEIDLIST
|
||||
SELCHANGE
|
||||
selfhost
|
||||
SENDCHANGE
|
||||
sendvirtualinput
|
||||
serverside
|
||||
@@ -1880,7 +1879,6 @@ winexe
|
||||
winforms
|
||||
winget
|
||||
wingetcreate
|
||||
wingetpkgs
|
||||
Winhook
|
||||
WINL
|
||||
winlogon
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
param(
|
||||
[string]$Architecture = "x64"
|
||||
)
|
||||
|
||||
# Check if Git is installed
|
||||
function Test-GitInstalled {
|
||||
try {
|
||||
git --version > $null 2>&1
|
||||
return $true
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# Install Git
|
||||
function Install-Git {
|
||||
Write-Host "##[section]Installing Git for Windows ($Architecture)..."
|
||||
|
||||
$gitInstallerUrl = if ($Architecture.ToLower() -eq "arm64") {
|
||||
"https://github.com/git-for-windows/git/releases/latest/download/Git-2.50.1-arm64.exe"
|
||||
} else {
|
||||
"https://github.com/git-for-windows/git/releases/latest/download/Git-2.50.1-64-bit.exe"
|
||||
}
|
||||
|
||||
$installerPath = "$env:TEMP\GitInstaller.exe"
|
||||
|
||||
try {
|
||||
Write-Host "##[command]Downloading Git installer..."
|
||||
Invoke-WebRequest -Uri $gitInstallerUrl -OutFile $installerPath -UseBasicParsing
|
||||
|
||||
Write-Host "##[command]Installing Git silently..."
|
||||
Start-Process -FilePath $installerPath -ArgumentList "/VERYSILENT", "/NORESTART" -Wait
|
||||
|
||||
# Clean up
|
||||
Remove-Item $installerPath -Force -ErrorAction SilentlyContinue
|
||||
|
||||
# Refresh PATH
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
|
||||
|
||||
return $true
|
||||
}
|
||||
catch {
|
||||
Write-Host "##[error]Failed to install Git: $($_.Exception.Message)"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# Main logic
|
||||
Write-Host "##[section]Checking Git installation..."
|
||||
|
||||
if (Test-GitInstalled) {
|
||||
Write-Host "##[section]Git is already installed"
|
||||
} else {
|
||||
Write-Host "##[warning]Git not found, installing..."
|
||||
|
||||
if (Install-Git) {
|
||||
Start-Sleep -Seconds 3
|
||||
|
||||
if (Test-GitInstalled) {
|
||||
Write-Host "##[section]Git installation successful"
|
||||
} else {
|
||||
Write-Host "##[error]Git installation failed"
|
||||
exit 1
|
||||
}
|
||||
} else {
|
||||
Write-Host "##[error]Failed to install Git"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "##[section]Git setup completed successfully"
|
||||
@@ -109,9 +109,12 @@ jobs:
|
||||
sdk: true
|
||||
version: '9.0'
|
||||
|
||||
- template: steps-install-test-dependencies.yml
|
||||
parameters:
|
||||
platform: ${{ parameters.platform }}
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
displayName: Ensure VSTest Platform
|
||||
|
||||
- pwsh: |-
|
||||
& '$(build.sourcesdirectory)\.pipelines\InstallWinAppDriver.ps1'
|
||||
displayName: Download and install WinAppDriver
|
||||
|
||||
- ${{ if not(variables.isBuildNow) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
parameters:
|
||||
- name: platform
|
||||
type: string
|
||||
default: "x64"
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Install NuGet Tool
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: Install Microsoft.UI.Xaml 2.8.7
|
||||
inputs:
|
||||
command: 'custom'
|
||||
arguments: 'install Microsoft.UI.Xaml -Version 2.8.7 -OutputDirectory $(Agent.TempDirectory)\packages -NonInteractive'
|
||||
|
||||
- powershell: |-
|
||||
$arch = if ('${{ parameters.platform }}' -eq 'ARM64') { 'arm64' } else { 'x64' }
|
||||
& '$(build.sourcesdirectory)\.pipelines\EnsureGitInstalled.ps1' -Architecture $arch
|
||||
displayName: "Ensure Git is installed"
|
||||
|
||||
- pwsh: |-
|
||||
# Check if winget is available
|
||||
try {
|
||||
winget --version > $null 2>&1
|
||||
Write-Host "##[section]Winget is already installed"
|
||||
}
|
||||
catch {
|
||||
Write-Host "##[section]Installing Winget..."
|
||||
|
||||
# Download and install App Installer (which includes winget)
|
||||
$wingetUrl = "https://aka.ms/getwinget"
|
||||
$installerPath = "$env:TEMP\Microsoft.DesktopAppInstaller.msixbundle"
|
||||
|
||||
Invoke-WebRequest -Uri $wingetUrl -OutFile $installerPath -UseBasicParsing
|
||||
Add-AppxPackage -Path $installerPath
|
||||
|
||||
# Clean up
|
||||
Remove-Item $installerPath -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "##[section]Winget installation completed"
|
||||
}
|
||||
displayName: "Ensure Winget is installed"
|
||||
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
displayName: Ensure VSTest Platform
|
||||
|
||||
- powershell: |-
|
||||
& '$(build.sourcesdirectory)\.pipelines\InstallWinAppDriver.ps1'
|
||||
displayName: Download and install WinAppDriver
|
||||
@@ -87,13 +87,6 @@
|
||||
|
||||
### Building PowerToys Locally
|
||||
|
||||
#### One stop script for building installer
|
||||
1. Open developer powershell for vs 2022
|
||||
2. Run tools\build\build-installer.ps1
|
||||
> For the first-time setup, please run the installer as an administrator. This ensures that the Wix tool can move wix.target to the desired location and trust the certificate used to sign the MSIX packages.
|
||||
|
||||
The following manual steps will not install the MSIX apps (such as Command Palette) on your local installer.
|
||||
|
||||
#### Prerequisites for building the MSI installer
|
||||
|
||||
1. Install the [WiX Toolset Visual Studio 2022 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2022Extension).
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
## If for any reason, you'd like to test winget install scenario, you can follow this doc:
|
||||
|
||||
### Powertoys winget manifest definition:
|
||||
[winget repository](https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/PowerToys)
|
||||
|
||||
### How to test a winget installation locally:
|
||||
1. Get artifacts from release CI pipeline Pipelines - Runs for PowerToys Signed YAML Release Build, or you can build one yourself by execute the
|
||||
'tools\build\build-installer.ps1' script
|
||||
|
||||
2. Get the artifact hash, this is required to define winget manifest
|
||||
```powershell
|
||||
cd /path/to/your/directory/contains/installer
|
||||
Get-FileHash -Path ".\<Installer-name>.exe" -Algorithm SHA256
|
||||
```
|
||||
3. Host your installer.exe - Attention: staged github release artifacts or artifacts in release pipeline is not OK in this step
|
||||
You can self-host it or you can upload to a publicly available endpoint
|
||||
**How to selfhost it** (A extremely simple way):
|
||||
```powershell
|
||||
python -m http.server 8000
|
||||
```
|
||||
|
||||
4. Download a version folder from wingetpkgs like: [version 0.92.1](https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/PowerToys/0.92.1)
|
||||
and you get **a folder contains 3 yml files**
|
||||
>note: Do not put any files other than these three in this folder
|
||||
|
||||
5. Modify the yml files based on your version and the self hosted artifact link, and modify the sha256 hash for the installer you'd like to use
|
||||
|
||||
6. Start winget install:
|
||||
```powershell
|
||||
#execute as admin
|
||||
winget settings --enable LocalManifestFiles
|
||||
winget install --manifest "<folder_path_of_manifest_files>" --architecture x64 --scope user
|
||||
```
|
||||
@@ -32,7 +32,6 @@ public partial class MainListPage : DynamicListPage,
|
||||
public MainListPage(IServiceProvider serviceProvider)
|
||||
{
|
||||
Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.scale-200.png");
|
||||
PlaceholderText = Properties.Resources.builtin_main_list_page_searchbar_placeholder;
|
||||
_serviceProvider = serviceProvider;
|
||||
|
||||
_tlcManager = _serviceProvider.GetService<TopLevelCommandManager>()!;
|
||||
|
||||
@@ -321,15 +321,6 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Search for apps, files and commands....
|
||||
/// </summary>
|
||||
public static string builtin_main_list_page_searchbar_placeholder {
|
||||
get {
|
||||
return ResourceManager.GetString("builtin_main_list_page_searchbar_placeholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Creates a project for a new Command Palette extension.
|
||||
/// </summary>
|
||||
|
||||
@@ -227,7 +227,4 @@
|
||||
<data name="builtin_disabled_extension" xml:space="preserve">
|
||||
<value>Disabled</value>
|
||||
</data>
|
||||
<data name="builtin_main_list_page_searchbar_placeholder" xml:space="preserve">
|
||||
<value>Search for apps, files and commands...</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user