-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdebug.ps1
29 lines (23 loc) · 788 Bytes
/
debug.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# this script uses [gsudo](https://github.com/gerardog/gsudo)
Push-Location
Set-Location $PSScriptRoot
sudo {
Start-Job { Stop-Process -Name PowerToys* } | Wait-Job > $null
# change this to your PowerToys installation path
$ptPath = 'C:\Program Files\PowerToys'
$projectName = '$projectname$'
$safeProjectName = '$safeprojectname$'
$debug = '.\bin\x64\Debug\net9.0-windows'
$dest = "$env:LOCALAPPDATA\Microsoft\PowerToys\PowerToys Run\Plugins\$projectName"
$files = @(
"Community.PowerToys.Run.Plugin.$safeProjectName.deps.json",
"Community.PowerToys.Run.Plugin.$safeProjectName.dll",
'plugin.json',
'Images'
)
Set-Location $debug
mkdir $dest -Force -ErrorAction Ignore | Out-Null
Copy-Item $files $dest -Force -Recurse
& "$ptPath\PowerToys.exe"
}
Pop-Location