diff --git a/Directory.Build.props b/Directory.Build.props
index 26f6094..3634511 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,4 +6,7 @@
3.6.143
+
+ $(MSBuildThisFileDirectory)
+
\ No newline at end of file
diff --git a/StreamDeckSimHub.Installer/StreamDeckSimHub.Installer.csproj b/StreamDeckSimHub.Installer/StreamDeckSimHub.Installer.csproj
index 3a7f406..3007e2b 100644
--- a/StreamDeckSimHub.Installer/StreamDeckSimHub.Installer.csproj
+++ b/StreamDeckSimHub.Installer/StreamDeckSimHub.Installer.csproj
@@ -22,6 +22,10 @@
+
+
+
+
diff --git a/StreamDeckSimHub.Plugin/Bundle.ps1 b/StreamDeckSimHub.Plugin/Bundle.ps1
new file mode 100644
index 0000000..2fbf48c
--- /dev/null
+++ b/StreamDeckSimHub.Plugin/Bundle.ps1
@@ -0,0 +1,19 @@
+# Copyright (C) 2024 Martin Renner
+# LGPL-3.0-or-later (see file COPYING and COPYING.LESSER)
+
+
+if ($Args.Count -lt 1) {
+ throw 'Arguments are missing'
+}
+
+$PublishDir = $Args[0]
+
+Remove-Item "..\build\*" -Recurse
+
+Copy-Item "$PublishDir" -Destination "..\build" -Recurse
+Pushd ..\build
+Rename-Item -Path "publish" -NewName "net.planetrenner.simhub.sdPlugin"
+
+..\..\DistributionTool.exe -b -i net.planetrenner.simhub.sdPlugin -o .
+
+Popd
diff --git a/StreamDeckSimHub.Plugin/ReplaceVersion.ps1 b/StreamDeckSimHub.Plugin/ReplaceVersion.ps1
index 0bc6740..259a637 100644
--- a/StreamDeckSimHub.Plugin/ReplaceVersion.ps1
+++ b/StreamDeckSimHub.Plugin/ReplaceVersion.ps1
@@ -15,6 +15,18 @@ if ($Args.Count -lt 2) {
$ManifestFile = $Args[0]
$Version = $Args[1]
-$manifest = (Get-Content($ManifestFile) | ConvertFrom-Json)
-$manifest.Version = $Version
-$manifest | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $ManifestFile
+Write-Host "Setting version $Version in file $ManifestFile"
+
+try {
+ $manifest = (Get-Content($ManifestFile) | ConvertFrom-Json)
+ $manifest.Version = $Version
+ $manifest | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 ($ManifestFile + ".new")
+
+ Move-Item ($ManifestFile + ".new") -Destination $ManifestFile -Force
+ Write-Host "Done"
+}
+catch {
+ Write-Host "An error occured:"
+ Write-Host $_
+ Exit 1
+}
diff --git a/StreamDeckSimHub.Plugin/StreamDeckSimHub.Plugin.csproj b/StreamDeckSimHub.Plugin/StreamDeckSimHub.Plugin.csproj
index 3f6bb52..14a3990 100644
--- a/StreamDeckSimHub.Plugin/StreamDeckSimHub.Plugin.csproj
+++ b/StreamDeckSimHub.Plugin/StreamDeckSimHub.Plugin.csproj
@@ -5,7 +5,6 @@
net8.0
true
false
- win-x64
enable
enable
StreamDeckSimHub
@@ -33,13 +32,15 @@
-
+
powershell.exe
pwsh
+
+
diff --git a/StreamDeckSimHub.sln b/StreamDeckSimHub.sln
index f06711c..2b423dd 100644
--- a/StreamDeckSimHub.sln
+++ b/StreamDeckSimHub.sln
@@ -8,7 +8,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{E3F720A4-BDC4-4B7D-B604-BF323E7AB170}"
ProjectSection(SolutionItems) = preProject
README.adoc = README.adoc
- release.bat = release.bat
deploy.bat = deploy.bat
EndProjectSection
EndProject
diff --git a/build/net.planetrenner.simhub.streamDeckPlugin b/build/net.planetrenner.simhub.streamDeckPlugin
deleted file mode 100644
index c31b7ee..0000000
--- a/build/net.planetrenner.simhub.streamDeckPlugin
+++ /dev/null
@@ -1,3 +0,0 @@
-This is only a placeholder to make the build system happy.
-
-StreamDeckSimHub.Installer depends on this file.
diff --git a/doc/Release.adoc b/doc/Release.adoc
index a987ec1..ec67491 100644
--- a/doc/Release.adoc
+++ b/doc/Release.adoc
@@ -1,14 +1,17 @@
= Release Process
-. If there is no release branch yet for the current version: +
+. If there is no release branch yet for the current version: +
`nbgv prepare-release`
-. Switch to the release branch: +
+. Switch to the release branch: +
`git switch release/v1.2`
. Push the release branch
-. Create a tag and push it afterwards:
+. Create a tag and push it afterward:
- `nbgv tag`
- `git push origin v1.2`
. Build the plugin:
- - `release.bat`
-. Create a release in GitHub from the tag and attach the file `net.planetrenner.simhub.streamDeckPlugin`
+ - `dotnet build StreamDeckSimHub.Plugin\StreamDeckSimHub.Plugin.csproj -c Release`
+ - `dotnet publish StreamDeckSimHub.Plugin\StreamDeckSimHub.Plugin.csproj -c Release`
+. Build the installer:
+ - `dotnet publish StreamDeckSimHub.Installer\StreamDeckSimHub.Installer.csproj -c Release`
+. Create a release in GitHub from the tag and attach the file `StreamDeckSimHub.Installer-vX.Y.z.exe`
. Push the main branch.
diff --git a/release.bat b/release.bat
deleted file mode 100644
index 2ff5183..0000000
--- a/release.bat
+++ /dev/null
@@ -1,28 +0,0 @@
-@echo off
-setlocal
-
-set CONFIG=Release
-if "%1%" == "debug" set CONFIG=Debug
-
-echo.
-echo Building for configuration: %CONFIG%
-echo.
-
-dotnet publish StreamDeckSimHub.Plugin\StreamDeckSimHub.Plugin.csproj -c %CONFIG% -r win-x64
-if %errorlevel% neq 0 goto :endFailure
-
-if exist build rmdir /s /q build
-if exist build goto :endFailure
-mkdir build
-xcopy StreamDeckSimHub.Plugin\bin\%CONFIG%\net8.0\win-x64\publish build\net.planetrenner.simhub.sdPlugin /e /i /q
-
-cd build
-..\..\DistributionTool.exe -b -i net.planetrenner.simhub.sdPlugin -o .
-rem 7z.exe a -bd net.planetrenner.simhub.streamDeckPlugin.zip
-rem ren net.planetrenner.simhub.streamDeckPlugin.zip net.planetrenner.simhub.streamDeckPlugin
-goto end
-
-:endFailure
-exit /b 1
-
-:end