Running and deployment
Background
My fork contains a new post-build script. It’s located in /utils
and it’s a complete rewrite of the original batch post-build script that was included in Ryochan7’s fork. It updates the newest.txt
file that contains the latest version. It’s used for checking if you’re running the latest version of the application (it checks it against the file in my repo). It also moves the relevant localisation assemblies to a separate directory, runs Ryochan7’s script that injects relevant code into that build’s .deps.json
file, renames the target folder from net8.0-windows
to DS4Windows
and zips the folder, completely automating the deployment process (from there all you have to do is release it on GitHub).
Running
It is important that you do not have the script execute when you just want to debug/run it quickly from the IDE. It won’t let you do that anyway, because it tries to run an exe thats in a directory called net8.0-windows
that doesn’t exist anymore. I’m trying to keep it commented out in the .csproj
file when I push new commits, however sometimes I might forget to do it and you might come accross an issue where you can’t run the code in the IDE, because it tells you that the file does not exist.
In that case, you need to comment the line that runs the script out in the /DS4Windows/DS4WinWPF.csproj
file by putting REM in front of it (it needs to look like this: REM python $(SolutionDir)utils\post-build.py $(TargetDir) $(ProjectDir) $(Version)
).
Deployment
For deployment, remember to uncomment the post-build script. You also need to remember that a version check is ran against this file so you need to disable version check (like in case of beta versions) or update the code that checks if the app is up to date to fetch this info from your repo.