* Windowless Perl @ 2019-06-10 17:56 Chris Wagner 2019-06-10 19:24 ` Achim Gratz 0 siblings, 1 reply; 8+ messages in thread From: Chris Wagner @ 2019-06-10 17:56 UTC (permalink / raw) To: cygwin Perl maintainers, I was wondering why the Cygwin Perl distribution does not contain a windowless Perl executable, wperl.exe. Directly executing the standard perl.exe from Windows causes a command console to pop up. I've had it before in other distros but it would be super handy to execute completely headless Perl scripts with Cygwin access. Anyone know how I could build it or how to get it added to the distro? Or make it its own package? Thanks. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-10 17:56 Windowless Perl Chris Wagner @ 2019-06-10 19:24 ` Achim Gratz 2019-06-10 20:13 ` Chris Wagner 0 siblings, 1 reply; 8+ messages in thread From: Achim Gratz @ 2019-06-10 19:24 UTC (permalink / raw) To: cygwin Chris Wagner writes: > Perl maintainers, I was wondering why the Cygwin Perl distribution > does not contain a windowless Perl executable, wperl.exe. Because nobody needs it? > Directly executing the standard perl.exe from Windows causes a command > console to pop up. I've had it before in other distros but it would > be super handy to execute completely headless Perl scripts with Cygwin > access. That's what "run" is for, actually. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-10 19:24 ` Achim Gratz @ 2019-06-10 20:13 ` Chris Wagner 2019-06-10 21:23 ` Bill Stewart 2019-06-11 18:12 ` L A Walsh 0 siblings, 2 replies; 8+ messages in thread From: Chris Wagner @ 2019-06-10 20:13 UTC (permalink / raw) To: cygwin On 2019-06-10 3:24 pm, Achim Gratz wrote: > Chris Wagner writes: >> Perl maintainers, I was wondering why the Cygwin Perl distribution >> does not contain a windowless Perl executable, wperl.exe. > > Because nobody needs it? > >> Directly executing the standard perl.exe from Windows causes a command >> console to pop up. I've had it before in other distros but it would >> be super handy to execute completely headless Perl scripts with Cygwin >> access. > > That's what "run" is for, actually. Well I would have a good use for it. I didn't know about run, thanks for the tip. However when I use it to launch something from the Start Menu Run command, it still pops open a terminal window of some kind for a fraction of a second. I'm on Windows 7. Thanks. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-10 20:13 ` Chris Wagner @ 2019-06-10 21:23 ` Bill Stewart 2019-06-11 18:12 ` L A Walsh 1 sibling, 0 replies; 8+ messages in thread From: Bill Stewart @ 2019-06-10 21:23 UTC (permalink / raw) To: cygwin On Mon, Jun 10, 2019 at 2:13 PM Chris Wagner wrote: > I didn't know about run, thanks for the tip. However when I use it to > launch something from the Start Menu Run command, it still pops open a > terminal window of some kind for a fraction of a second. I'm on Windows > 7. I wrote a little tool called Exec/ExecGUI a while back that can do it: https://westmesatech.com/?page_id=49 Try ExecGUI with -s 0 (hidden window). Regards, Bill -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-10 20:13 ` Chris Wagner 2019-06-10 21:23 ` Bill Stewart @ 2019-06-11 18:12 ` L A Walsh 2019-06-18 15:35 ` Andrey Repin 1 sibling, 1 reply; 8+ messages in thread From: L A Walsh @ 2019-06-11 18:12 UTC (permalink / raw) To: cygwin On 2019/06/10 13:12, Chris Wagner wrote: > I didn't know about run, thanks for the tip. However when I use it to > launch something from the Start Menu Run command, it still pops open a > terminal window of some kind for a fraction of a second. I'm on Windows > 7. > Windows has a flag set in each EXE as to whether or not it is a console or GUI program. There are tools that can set the flag in a given EXE file. Perhaps that's similar to the util that Bill Stewart is talking about, dunno. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-11 18:12 ` L A Walsh @ 2019-06-18 15:35 ` Andrey Repin 2019-06-18 18:15 ` Jon Turney 0 siblings, 1 reply; 8+ messages in thread From: Andrey Repin @ 2019-06-18 15:35 UTC (permalink / raw) To: L A Walsh, cygwin Greetings, L A Walsh! > On 2019/06/10 13:12, Chris Wagner wrote: >> I didn't know about run, thanks for the tip. However when I use it to >> launch something from the Start Menu Run command, it still pops open a >> terminal window of some kind for a fraction of a second. I'm on Windows >> 7. >> > Windows has a flag set in each EXE as to whether or not it is a console > or GUI program. There are tools that can set the flag in a given EXE file. It's not a flag, it's an exported function. If a program exports winmain(), it's a gui program, if it exports main(), it's a console program. > Perhaps that's similar to the util that Bill Stewart is talking about, > dunno. -- With best regards, Andrey Repin Tuesday, June 18, 2019 18:26:18 Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-18 15:35 ` Andrey Repin @ 2019-06-18 18:15 ` Jon Turney 2019-06-19 19:17 ` Brian Inglis 0 siblings, 1 reply; 8+ messages in thread From: Jon Turney @ 2019-06-18 18:15 UTC (permalink / raw) To: The Cygwin Mailing List On 18/06/2019 16:27, Andrey Repin wrote: >> On 2019/06/10 13:12, Chris Wagner wrote: >>> I didn't know about run, thanks for the tip. However when I use it to >>> launch something from the Start Menu Run command, it still pops open a >>> terminal window of some kind for a fraction of a second. I'm on Windows >>> 7. >>> >> Windows has a flag set in each EXE as to whether or not it is a console >> or GUI program. There are tools that can set the flag in a given EXE file. > > It's not a flag, it's an exported function. > If a program exports winmain(), it's a gui program, if it exports main(), it's > a console program. No. It really is a flag. See https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#windows-subsystem You are describing the behaviour of (recent versions of) the Microsoft linker, which guesses the default value of this flag based on what symbols are defined See https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol, specifically the sentence "If the /DLL or /SUBSYSTEM option is not specified, the linker selects a subsystem and entry point depending on whether main or WinMain is defined." -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Windowless Perl 2019-06-18 18:15 ` Jon Turney @ 2019-06-19 19:17 ` Brian Inglis 0 siblings, 0 replies; 8+ messages in thread From: Brian Inglis @ 2019-06-19 19:17 UTC (permalink / raw) To: cygwin On 2019-06-18 12:15, Jon Turney wrote: > On 18/06/2019 16:27, Andrey Repin wrote: >>> On 2019/06/10 13:12, Chris Wagner wrote: >>>> I didn't know about run, thanks for the tip. However when I use it to >>>> launch something from the Start Menu Run command, it still pops open a >>>> terminal window of some kind for a fraction of a second. I'm on >>>> Windows 7. >>> Windows has a flag set in each EXE as to whether or not it is a console >>> or GUI program. There are tools that can set the flag in a given EXE >>> file. >> It's not a flag, it's an exported function. >> If a program exports winmain(), it's a gui program, if it exports main(), >> it's a console program. > No. It really is a flag. Strictly speaking a field flag value: $ objdump -x $(dirname $(cygpath $COMSPEC))/csrss | grep -w '^Subsystem' Subsystem 00000001 (NT native) $ objdump -x /setup | grep -w '^Subsystem' Subsystem 00000002 (Windows GUI) $ objdump -x /bin/cygwin1.dll | grep -w '^Subsystem' Subsystem 00000003 (Windows CUI) > See > https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#windows-subsystem > You are describing the behaviour of (recent versions of) the Microsoft linker, > which guesses the default value of this flag based on what symbols are defined > See > https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol, > specifically the sentence "If the /DLL or /SUBSYSTEM option is not specified, > the linker selects a subsystem and entry point depending on whether main or > WinMain is defined." -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-06-19 19:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-10 17:56 Windowless Perl Chris Wagner 2019-06-10 19:24 ` Achim Gratz 2019-06-10 20:13 ` Chris Wagner 2019-06-10 21:23 ` Bill Stewart 2019-06-11 18:12 ` L A Walsh 2019-06-18 15:35 ` Andrey Repin 2019-06-18 18:15 ` Jon Turney 2019-06-19 19:17 ` Brian Inglis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).