[Geany] vcdiff output on windows

Pierre Joye pierre.php at xxxxx
Sun Feb 17 18:35:04 UTC 2008


Hi Enrico,

On Feb 17, 2008 6:55 PM, Enrico Tröger <enrico.troeger at uvena.de> wrote:
> On Sun, 17 Feb 2008 10:04:22 -0600, "Jeff Pohlmeyer"
> <yetanothergeek at gmail.com> wrote:
>
> Hi,
>
> > Would it make sense to use a proc_open and store the output in a temp
> > file (new tab) instead or to some custom output/handler? I can even
> what is proc_open? Is this anything from the Windows API?
>
> > > It may work but it does not seem to use the "cmd" preference content
> > > to call the cmd. Or can I set a cmd call specifically for vcdiff?
> >
> >
> > oops, sorry - you're right, that won't work.
> >
> > Maybe you can try starting Geany with the -d option
> > to see if the debug output shows you anything...
> No, this won't help either.
> The vcdiff plugin doesn't work on Windows, at the moment. This is
> because some Windows binaries work different to others ;-).

Well, the diff itself works, I can see the diff output :)

> The whole story:
> in the vcdiff plugin, we execute the svn command line binary using
> g_spawn_sync() and then reading the commands stdout. This works for
> some commands like gcc.exe and g++.exe. It works also with the grep.exe
> and make.exe but only if you use the ones from the UnxUtils package.
> grep.exe and mingw-make.exe from the Mingw package, doesn't work on
> Windows with Geany. "Doesn't work" means, the commands are executed and
> they return. But they don't send their stdout to g_spawn_sync(), instead
> they send the output to the opening console prompt. I don't know a way
> how to retrieve this output.
> And this is also what happens when executing the svn command.

My experiences with the various posix compliant functions told me that
windows is crap, nothing new :) The best way is to use the native
windows IO and shell APIs.

Will you be interested in a patch to store the output of the diff in a
custom location? Ideally I would like to use a proc open-like system
to fetch the output of the VC commands and store it somewhere (be the
clipboard, a new tab or send it to a pastebin service for example). It
should be work with createprocess and some pipes to get the output. I
did it in C for some windows or linux only application, but I may
miserably fail to do it for both linux and windows, suggestions
welcome :)

> The strange thing is that exactly the same code works for e.g. gcc.exe
> (Mingw) and grep.exe, make.exe from the UnxUtils package.
>
> If anyone has an idea about this, please tell us.

I can take that as an yes to my question?

The next thing I was thinking about is to add a non portable
implementation of the console for the window versions. However I have
no idea if it is even possible to mix native win32 controls and gtk,
any thoughts? :)

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org



More information about the Users mailing list