Re: Using command line and stdin/stdout with 2.5.1

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Fri Jun 01 2007 - 13:42:33 CEST

If you know a little C++ and can build Abi on Windows, check out our
code from SVN and change abiword/src/wp/main/win/Win32Main.cpp. What
you might want to try is to replace WinMain() with main(). Make a
similar change to AP_Win32App. And then give it a whirl.

Dom

On 6/1/07, Antony Bowesman <adb@teamware.com> wrote:
> Thanks for the comments. It would be a 'nice-to-have' as it would then provide
> a common solution for our platforms. Currently, I must monitor the exec'd
> process to see when it ends before I can then grab the output file, a bit of a
> hack, but...
>
> As Dom pointed out, I raised the bug, so if anyway feels like rising to the
> challenge... I'd do it myself, if I knew much about this GUI stuff ;) Server
> stuff's much easier!
>
> Thanks
> Antony
>
>
> Dominic Lachowicz wrote:
> > He's actually already filed a bug
> > (http://bugzilla.abisource.com/show_bug.cgi?id=11000). And I was the
> > one that suggested that Windows releases the console after the program
> > started :) IIRC, it does this if your application's entry point is
> > WinMain() instead of main().
> >
> > Dom
> >
> > On 5/31/07, Ryan Pavlik <abiryan@ryand.net> wrote:
> >>
> >> I presume (actually, someone suggested it to me, apologies because I
> >> don't remember who) that the reason stdin/stdout doesn't work on Windows
> >> is because Windows releases the console after the program is started,
> >> since we are a full GUI app, and so we don't actually own a stdin or
> >> stdout. If this is a big deal for you, please file a bug
> >> http://bugzilla.abisource.com - I'm not sure there's anything we can do
> >> about it, but may as well record it for the future.
> >>
> >> Ryan
> >>
> >> Dominic Lachowicz wrote:
> >> >
> >> > Hi,
> >> >
> >> > I just tried the following on Ubuntu Linux, and it worked.
> >> >
> >> > abiword --to=html --to-name=fd://1 fd://0 < resume.txt | less
> >> > cat resume.txt | abiword --to=html --to-name=fd://1 fd://0 | less
> >> >
> >> > I'm the author of this feature, but I'm not sure that anyone ever
> >> > tested it on Windows.
> >> >
> >> > Dom
> >> >
> >> > On 5/18/07, Antony Bowesman <adb@teamware.com> wrote:
> >> >>
> >> >> I read that 2.5 supports stdin/stdout (from
> >> http://uwog.net/news/?p=62)
> >> >>
> >> >> I just downloaded and installed the Windows 2.5.1 version
> >> >>
> >> >> I've confirmed that the standard
> >> >>
> >> >> AbiWord --to=txt FastSavedDoc.doc
> >> >>
> >> >> works, which creates FastSavedDoc.txt
> >> >>
> >> >> However, when I try to use the stdin/out mechanism according to the
> >> >> examples in
> >> >> the above web page I get no joy, e.g.
> >> >>
> >> >> AbiWord --to=txt --to-name=fd://1 fd://0 <FastSavedDoc.doc
> >> >> AbiWord --to=txt --to-name=x.txt fd://0 <FastSavedDoc.doc
> >> >> cat FastSavedDoc.doc | AbiWord --to=txt --to-name=fd://1 fd://0
> >> >>
> >> >> I have Cygwin installed for the last version. Nothing happens and
> >> >> there's no
> >> >> output. No files are written to the directory.
> >> >>
> >> >> What am I doing wrong?
> >> >>
> >> >> Thanks
> >> >> Antony
>
>
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
-----------------------------------------------
To unsubscribe from this list, send a message to
abiword-user-request@abisource.com with the word
unsubscribe in the message body.
Received on Fri Jun 1 13:43:19 2007

This archive was generated by hypermail 2.1.8 : Fri Jun 01 2007 - 13:43:19 CEST