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:
@@ -1,5 +1,7 @@
|
|||||||
# 🎬 SceneRename
|
# 🎬 SceneRename
|
||||||
|
|
||||||
|
<img src="assets/scenerename.png" width="112" alt="SceneRename logo">
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -38,6 +38,10 @@ function New-MenuCommand([string]$Token) {
|
|||||||
|
|
||||||
$menuText = 'SceneRename 重命名'
|
$menuText = 'SceneRename 重命名'
|
||||||
|
|
||||||
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||||
|
$iconPath = Join-Path $repoRoot 'assets\scenerename.ico'
|
||||||
|
if (-not (Test-Path -LiteralPath $iconPath)) { $iconPath = $pwsh }
|
||||||
|
|
||||||
$targets = @(
|
$targets = @(
|
||||||
@{ Key = 'HKCU:\Software\Classes\Directory\shell\SceneRename'; Token = '%1' },
|
@{ Key = 'HKCU:\Software\Classes\Directory\shell\SceneRename'; Token = '%1' },
|
||||||
@{ Key = 'HKCU:\Software\Classes\Directory\Background\shell\SceneRename'; Token = '%V' },
|
@{ 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 $item.Key -Force | Out-Null
|
||||||
New-Item -Path $commandKey -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 '(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
|
New-ItemProperty -Path $commandKey -Name '(default)' -Value (New-MenuCommand $item.Token) -PropertyType String -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user