Closed daniel-pastalab closed 2 years ago
Hi @daniel-pastalab,
Thank you for your suggestion and your thorough comments on what would be needed
You can already change RestartExecutableName
to do this, and it's as easy as updater.RestartExecutableName = "dotnet " + updater.RestartExecutableName;
to do this in your own code. I'm not sure I want to add this parameter as proposed, but I'll leave this issue open for now. Thanks.
@daniel-pastalab, Thanks for the suggestion. After looking at something myself, I realize that this was indeed a needed enhancement, so I have gone ahead and implemented it as you've suggested -- except without putting RelaunchAfterUpdateCommandPrefix
inside quotes. ./
could in theory be set with the original RestartExecutableName
, so the command prefix lets you do things outside of the quotes, e.g. run commands before the actual binary is started.
I added you as a co-author on the commit: https://github.com/NetSparkleUpdater/NetSparkle/commit/79d48dea8c9c9405bca74d1157cebd49c0a57ed5
Thanks! This is in NetSparkleUpdater 2.0.10.
Hi @Deadpikle,
The implementation contains a space that I believe modifies the expected behaviour: https://github.com/NetSparkleUpdater/NetSparkle/blob/e2eacf9681ddd0c70e72bf6ee545b3cd3261e1f4/src/NetSparkle/SparkleUpdater.cs#L1352
Final script line ends up like: ./ "MyApp"
this generates an error in bash: bash: ./: Is a directory
. Where instead ./"MyApp"
would work.
@danielospina-b Thank you for bringing that to my attention. That would be a bug and a mishap on my part that is going to do not-very-happy-things to existing code. A fix will roll out within a few hours. Thank you again for bringing it to my attention.
Fix is rolling out now. Removed the space and trimmed the overall line just in case. Thanks again.
When set
RelaunchAfterUpdate=true
a line with the application is added to to the update.sh
file to run after update. On linux (MANJARO, ZSH) a command or command prefix is needed to run the executable like:dotnet app.dll
or if packed into an linux app:./app
So the idea is to be able to set a
RelaunchAfterUpdatePrefix
that will be added before theRelaunchAfterUpdate
likedotnet
or./
.Here is a sample implementation: