This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New run version with patches for Windows 7


Andy Koppe wrote:
> 2009/8/8 Corinna Vinschen
>> are you still with us in some way?  There hasn't been a new version of
>> the "run" tool for ages.  Now, with the upcoming Windows 7,  it's
>> necessary to workaround a bug in W7 in terms of creating an invisible
>> console.  I have experimented a lot and came up with an incredible
>> simple patch based on an idea from cgf.  I restricted the code to os
>> versions >= Windows 7, but it works fine on Windows XP and later if the
>> os_version checks are changed from checking for >= 0x0601 to checking for
>>> = 0x0501.  XP is the minimum version providing the AttachConsole function.
> 
> Couldn't "run" just do nothing but invoke spawnvp() on the given
> command? This way, it would rely on the invisible console code in
> cygwin1.dll, and there'd be no need for duplicating any of that code.

That's a feature, not a bug. run works equally well -- at least, it USED
to -- when compiled as a mingw app and when compiled as a cygwin app.
That same is not quite true of run2 (right now, run2 is strictly
cygwin-only [*]) but I'd like to rely as little as possible on the
underlying cygwin just to leave that possibility open.

[*] it'd take some work, but linking against win32-pthreads and porting
libxml to mingw should just about make run2 cygwin-independent.

Anyway - Corinna, I dunno about Alexander/run but I'd like to see the
"incredibly simple" patch, for run2.


<insert gratuitous plug>
run2 can do almost everything run does, plus more: you can use run2 to
explicitly set environment variables before launching the target app.
Also, it can have two alternate targets -- launching one if an Xserver
is available, and the other if not.

The only thing run2 doesn't do, is the "magic morphing launcher"
behavior, where if you rename 'run.exe' to 'runemacs.exe', the original
run program will automatically launch 'emacs.exe' without requiring the
name to be specified on the command line.

Also, run.exe it dirt-simple to configure -- 'run /path/to/target.exe'
and you're done. For run2, you have to configure an xml script for the
target ('run2 /path/to/target.xml') and that can be icky. So, there are
uses for both.
</end plug>

--
Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]