Hi!
During my tests of geany 0.13 on windows, I failed to find a way to get the output of vcdiff. The command is correctly called but the console is closed immediately after it is finished.
Is there a way to keep the cmd open?
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 imagine a vcdiff to some online pastebin service then :)
Thanks for your great work!
Cheers,
On Feb 17, 2008 6:50 AM, Pierre Joye pierre.php@gmail.com wrote:
Hi!
During my tests of geany 0.13 on windows, I failed to find a way to get the output of vcdiff. The command is correctly called but the console is closed immediately after it is finished.
Is there a way to keep the cmd open?
Maybe try the /k switch for cmd.exe? cmd /k vcdiff blah blah...
- Jeff
hi Jeff,
On Feb 17, 2008 1:56 PM, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
On Feb 17, 2008 6:50 AM, Pierre Joye pierre.php@gmail.com wrote:
Hi!
During my tests of geany 0.13 on windows, I failed to find a way to get the output of vcdiff. The command is correctly called but the console is closed immediately after it is finished.
Is there a way to keep the cmd open?
Maybe try the /k switch for cmd.exe? cmd /k vcdiff blah blah...
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?
I don't have a gtk build environment ready on windows, sadly, can't test where it fails exactly.
On Feb 17, 2008 7:52 AM, Pierre Joye pierre.php@gmail.com wrote:
hi Jeff,
On Feb 17, 2008 1:56 PM, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
On Feb 17, 2008 6:50 AM, Pierre Joye pierre.php@gmail.com wrote:
During my tests of geany 0.13 on windows, I failed to find a way to get the output of vcdiff. The command is correctly called but the console is closed immediately after it is finished.
Is there a way to keep the cmd open?
Maybe try the /k switch for cmd.exe?
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...
- Jeff
On Sun, 17 Feb 2008 10:04:22 -0600, "Jeff Pohlmeyer" yetanothergeek@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 ;-). 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.
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.
Regards, Enrico
Hi Enrico,
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
On Sun, 17 Feb 2008 10:04:22 -0600, "Jeff Pohlmeyer" yetanothergeek@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,
On Sun, 17 Feb 2008 19:35:04 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
Hi Enrico,
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
On Sun, 17 Feb 2008 10:04:22 -0600, "Jeff Pohlmeyer" yetanothergeek@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 :)
In the opened console window, but not in Geany, right?
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
yes ;-).
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
I would prefer the clipboard and then paste it into Geany. But in general YES, I'm interested in such a patch. I don't know the Windows API very well(read: almost none). This patch can later also be used in the GeanyVC plugin which has the same problem and for the build-related code in Geany itself.
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
What do you mean? We already got a console window for debugging output (stdout, stderr) on Windows, it's only activated when Geany is started with -d. But maybe I didn't understand you correctly.
Regards, Enrico
Hi!
On Feb 17, 2008 9:09 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
Well, the diff itself works, I can see the diff output :)
In the opened console window, but not in Geany, right?
yes, I was trying to keep it open, as lazy fix :)
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
I would prefer the clipboard and then paste it into Geany. But in general YES, I'm interested in such a patch. I don't know the Windows API very well(read: almost none). This patch can later also be used in the GeanyVC plugin which has the same problem and for the build-related code in Geany itself.
Ok, I first have to refresh my mind about all these things. Maybe a first independent code to show how it works on both platforms may help, we can then merge it.
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
What do you mean? We already got a console window for debugging output (stdout, stderr) on Windows, it's only activated when Geany is started with -d. But maybe I didn't understand you correctly.
I meant the terminal tab (the shell), or did I miss an option on windows?
Cheers,
On Sun, 17 Feb 2008 21:53:29 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
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
What do you mean? We already got a console window for debugging output (stdout, stderr) on Windows, it's only activated when Geany is started with -d. But maybe I didn't understand you correctly.
I meant the terminal tab (the shell), or did I miss an option on windows?
Ah, the VTE on Linux, the embedded terminal in the messages window. It would be cool to have something similar on Windows. I have no idea whether the default Windows shell cmd.exe can be embedded in any way. But there seems to be a port of libvte to Windows, see http://bugzilla.gnome.org/show_bug.cgi?id=369310. Looks promising.
Regards, Enrico
Hi Enrico,
On Feb 18, 2008 6:18 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
I meant the terminal tab (the shell), or did I miss an option on windows?
Ah, the VTE on Linux, the embedded terminal in the messages window. It would be cool to have something similar on Windows. I have no idea whether the default Windows shell cmd.exe can be embedded in any way.
It can be embedded relatively easily. I image more headaches/issues to get a common interface for both unix and windows (from a geany point of view) :)
But there seems to be a port of libvte to Windows, see http://bugzilla.gnome.org/show_bug.cgi?id=369310. Looks promising.
Thanks for the link, I will give it a try.
Cheers,