Closed phraemer closed 2 years ago
Hi @phraemer,
Since the creation of this issue, I had some time to experiment and reproduce it, and like you suggest I can confirm that the problem comes from the executable shimming feature of Chocolatey. ππ
I have also found a workaround to allow you to use pluginval
installed via Chocolatey without problem, by using the option --shimgen-waitforexit
.
I will work on excluding pluginval executable from getting shims, and ping you when I will have a working solution π
@Xav83 hey thanks a lot!
Hi @phraemer,
I have create a Pull Request (#3) which seems to fix this problem. I will do more tests in the next week, with some plugins I have on my computer, to be sure that the behavior is the one we actually want.
Feel free to review this Pull Request (#3), ask question or add some commentaries π
Moreover, if you have some plugins in mind, for me to check, with some specific pluginval command line options, please add a comment on the Pull Request (#3). This will help me make sure that integrating this fix won't broke setup π
Finally, if you want to test this package on your machine, I can also give you the process to do it π
Looks good! If you would like me to test it let me know. I can do that for you.
@phraemer So I have integrated the Pull Request #3, after testing it with VST and VST3 plugins on Windows.
I have tried to upgrade the version 0.2.9 of the pluginval package, but, unfortunately, it seems that Chocolatey want to avoid having package modified once they have been validated and published.
[10/10] pluginval ERROR:
Chocolatey v0.10.15 Attempting to push pluginval.0.2.9.nupkg to https://push.chocolatey.org An error has occurred. It's possible the package version already exists on the repository. (30.31s)
We may have to wait for the next version of pluginval to be published to have the correction of #3 available in a chocolatey package. And meanwhile, use the workaround --shimgen-waitforexit
.
@Xav83 nice!
And thanks :)
Hi @phraemer ! π
I have been experimenting a little bit more with Chocolatey and AU Framework, as I had the same problem with another package (I needed to correct the package on Chocolatey server, since it was completely broken π), and I've found a working solution πΎ
By adding the instruction param([switch]$Force)
in the update script of the package, we are able to force a new build of the package, even if the version stays the same (actually, it appends automatically the date of the build to the version of the package to have a new package version and by pass the version check π)
So I've also updated pluginval chocolatey package using the same solution. You will soon find a new version of the pluginval Chocolatey package here, which fix the shimming !
If you want, here is the link to the commit containing the fix.
If you can confirm that the new version of the pluginval package works on you machine (when Chocolatey will have validated it), it would be great, as it will allow me to close this issue π
Thanks again for your help and your patience π
Hi @Xav83 ! Thanks for continuing to look into this.
The package updated fine but it still needs the --shimgen-waitforexit
switch in order to wait for the process to exit.
π€
@phraemer, can you look which pluginval
executable you are running, by using the command which pluginval
, please ?
Your system may still use the pluginval
installed before the shimming correction.
On my machine, for example, the pluginval
corrected binary is in /c/ProgramData/chocolatey/lib/pluginval/tools/pluginval
while the older version of the chocolatey package installed it in /c/ProgramData/chocolatey/bin
.
So it is possible that all you have to do is to remove an old version of pluginval in /c/ProgramData/chocolatey/bin
.
Ah yes, choco did indeed leave that binary behind! Which is surprising because I did choco uninstall pluginval
.
Once I manually removed it then it works as expected, thanks!
I wonder if it's possible for you to add something to the package to ensure that binary is removed on uninstall if it exists?
Awesome, so the fix works, which is a great thing πΎπ
Yes, it is probably possible to remove the old binary in a script launch automatically during the chocolatey package update. I don't know yet how to do it, so it may take me a bit of time before I have a working solution to do it π I will update you on this issue when I will have some news about that π
Great job! Thanks again.
To reproduce the issue install pluginval with choco and call it with like so from the command line:
You'll see that no version information is printed. However, you can start it by just running
pluginval
without any arguments. Validating a vst3, for example, with--validate-in-process
reveals that the child process is launched but the original process does not wait on it and ends.I suspected this is some problem with the shim generated during install by choco. https://docs.chocolatey.org/en-us/features/shim
You can confirm this by instead calling the pluginval exe directly
And validating in process works this way too, the parent process does not exit until validation is complete.
The documentation suggests shimming can be disabled
https://docs.chocolatey.org/en-us/create/create-packages#how-do-i-exclude-executables-from-getting-shims
Although perhaps shims need to be specified that they are gui shims. I haven't tried these steps yet as I have no experience with creating choco packages.
https://docs.chocolatey.org/en-us/create/create-packages#how-do-i-set-up-shims-for-applications-that-have-a-gui
Link to original pluginval issue comment: https://github.com/Tracktion/pluginval/issues/26#issuecomment-769762329