Skip to content

Commit a239b18

Browse files
authored
Merge pull request #10 from futag/ability-debug
Add ability for debug plugins
2 parents 2a7a6ba + 5c2d270 commit a239b18

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
dotnet publish Flow.Launcher.Plugin.MyFlowPlugin -c Debug -r win-x64 --no-self-contained
2+
3+
$AppDataFolder = [Environment]::GetFolderPath("ApplicationData")
4+
$flowLauncherExe = "$env:LOCALAPPDATA\FlowLauncher\Flow.Launcher.exe"
5+
6+
if (Test-Path $flowLauncherExe) {
7+
Stop-Process -Name "Flow.Launcher" -Force -ErrorAction SilentlyContinue
8+
Start-Sleep -Seconds 2
9+
10+
if (Test-Path "$AppDataFolder\FlowLauncher\Plugins\MyFlowPlugin") {
11+
Remove-Item -Recurse -Force "$AppDataFolder\FlowLauncher\Plugins\MyFlowPlugin"
12+
}
13+
14+
Copy-Item "Flow.Launcher.Plugin.MyFlowPlugin\bin\Debug\win-x64\publish" "$AppDataFolder\FlowLauncher\Plugins\" -Recurse -Force
15+
Rename-Item -Path "$AppDataFolder\FlowLauncher\Plugins\publish" -NewName "MyFlowPlugin"
16+
17+
Start-Sleep -Seconds 2
18+
Start-Process $flowLauncherExe
19+
} else {
20+
Write-Host "Flow.Launcher.exe not found. Please install Flow Launcher first"
21+
}

0 commit comments

Comments
 (0)