Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

Wait for console applications only

Open excitoon opened this issue 6 years ago • 13 comments

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.

excitoon avatar Dec 20 '18 20:12 excitoon

Neat! 😮😍

r15ch13 avatar Dec 20 '18 21:12 r15ch13

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...

excitoon avatar Dec 20 '18 21:12 excitoon

Would it help if we provided a “GUI shim” to call GUI exes, by setting /target:winexe in build.ps1, per here?

rasa avatar Dec 21 '18 06:12 rasa

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.

excitoon avatar Dec 21 '18 10:12 excitoon

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 avatar Dec 23 '20 15:12 rasa

@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 avatar Jun 25 '22 15:06 excitoon

@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.

rasa avatar Jun 27 '22 06:06 rasa

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 avatar Jun 27 '22 06:06 rasa

@rasa what shall I do now? I actually switched back to Linux since these times :)

excitoon avatar Jun 28 '22 13:06 excitoon

@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 avatar Jun 28 '22 15:06 rasa

@rasa okay, no problem, I'm actually not good in PowerShell, anyway

excitoon avatar Jun 28 '22 15:06 excitoon

@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.

excitoon avatar Jun 28 '22 15:06 excitoon

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.

excitoon avatar Jul 28 '22 03:07 excitoon

Merged in #5559

rashil2000 avatar Oct 26 '23 07:10 rashil2000