Wait for console applications only
Follow up for #1606 . Possibly as an example and possibly as a real solution. This code should be pretty fast because at the moment of execution application is already read and mapped into virtual memory. But we might want it to be run at install time and pass wait flag as an argument, I don't know.
Neat! 😮😍
I guess we should not merge it. I've just understood that some people open programs from Win+R. In this case they would have flickering black window of shim if they run GUI application. I guess we should rewrite this to PowerShell, and run while shimming, setting a flag in .shim like gui = 0/1...
Would it help if we provided a “GUI shim” to call GUI exes, by setting /target:winexe in build.ps1, per here?
Finally, I decided not to skip waiting in GUI mode because some programs may rely on exit time. For example git rebase -i relies on editor (which can be GUI). Flickering of shim of GUI application is gone anyway.
This issue should be fixed in #3998, which was merged into master. To use, type:
scoop config shim kiennq
scoop reset *
or
scoop config shim 71
scoop reset *
Eventually, one of those shims (probably kiennq) will be made the default.
If this issue is still a problem after trying both solutions above, please reopen this issue. Thanks!
@rasa Does it really need 2 years to answer that it is already solved? By the way, alt shims do not allow to automatically determine application subsystem, so you are wrong in that comment.
@excitoon My apologies for closing this. I erroneously thought this issue was fixed by the new shims. Thank you for pointing out that I was mistaken, and for developing this solution.
I resolved the conflicts, but more work needs to be done before this can be merged, so I am going to convert to a draft.
@rasa what shall I do now? I actually switched back to Linux since these times :)
@excitoon Since it was my screw up, I will take on this PR, and move it forward, if that's OK with you. Thanks again for your help.
@rasa okay, no problem, I'm actually not good in PowerShell, anyway
@rasa I just thought we can add a shim for running some applications (16-bit MZ) in DosBox. That is the thing Chocolatey definitely miss.
Hi @rasa . Is there any news? I noticed modern shims can't be killed with Ctrl+C, this is quite inconvenient if you run desktop apps from console.
Merged in #5559