diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 0000000..97fa9ad --- /dev/null +++ b/install.ps1 @@ -0,0 +1,22 @@ +Param( + [string]$target = "Debug", + [string]$distributionTool = "C:/tools/DistributionTool.exe", + [string]$outputDir = "C:/temp" +) + +Push-Location -Path "bin/$target/" + +$uuid = "dev.duerrenberger.clockify" + +Stop-Process -Name "StreamDeck" -Force -ErrorAction SilentlyContinue +Stop-Process -Name "$uuid" -Force -ErrorAction SilentlyContinue + +Start-Sleep -Seconds 2 + +Remove-Item -Path "$outputDir/$uuid.streamDeckPlugin" -Recurse -Force -ErrorAction SilentlyContinue +Start-Process "$distributionTool" -ArgumentList "--build --input $uuid.sdPlugin --output $outputDir" -NoNewWindow -Wait +Remove-Item -Path "$env:APPDATA/Elgato/StreamDeck/Plugins/$uuid.sdPlugin" -Recurse -Force -ErrorAction SilentlyContinue + +Invoke-Item -Path "$outputDir/$uuid.streamDeckPlugin" + +Pop-Location \ No newline at end of file