feat(branding): 新增 SceneRename 图标并用于右键菜单

- assets/scenerename.ico(16-256 共 7 档)+ assets/scenerename.png
- install-explorer-menu.ps1 的 Icon 指向该 .ico,替换掉默认的 pwsh 图标
- README 顶部展示 logo
This commit is contained in:
ali
2026-11-17 12:37:25 +08:00
parent 66f399dbed
commit cf2e4e66d7
4 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -38,6 +38,10 @@ function New-MenuCommand([string]$Token) {
$menuText = 'SceneRename 重命名'
$repoRoot = Split-Path -Parent $PSScriptRoot
$iconPath = Join-Path $repoRoot 'assets\scenerename.ico'
if (-not (Test-Path -LiteralPath $iconPath)) { $iconPath = $pwsh }
$targets = @(
@{ Key = 'HKCU:\Software\Classes\Directory\shell\SceneRename'; Token = '%1' },
@{ Key = 'HKCU:\Software\Classes\Directory\Background\shell\SceneRename'; Token = '%V' },
@@ -51,7 +55,7 @@ foreach ($item in $targets) {
New-Item -Path $item.Key -Force | Out-Null
New-Item -Path $commandKey -Force | Out-Null
New-ItemProperty -Path $item.Key -Name '(default)' -Value $menuText -PropertyType String -Force | Out-Null
New-ItemProperty -Path $item.Key -Name 'Icon' -Value $pwsh -PropertyType String -Force | Out-Null
New-ItemProperty -Path $item.Key -Name 'Icon' -Value $iconPath -PropertyType String -Force | Out-Null
New-ItemProperty -Path $commandKey -Name '(default)' -Value (New-MenuCommand $item.Token) -PropertyType String -Force | Out-Null
}