[lazarus] Hello screenshots in GTK and QT
Michael Van Canneyt
michael.vancanneyt at wisa.be
Mon Apr 17 11:41:53 EDT 2000
On Mon, 17 Apr 2000, Shane Miller wrote:
> I quickly tried the TProcess class.
> I used the following:
>
> var
> CProcess : TProcess;
> Begin
> CProcess := TProcess.Create('ppc386 lazarus.pp',[poRunSuspended]);
> CProcess.ShowWindow := true;
> CProcess.Execute;
> end;
>
> I ended up with a few errors and it crashed Lazarus.
> Am I using it correctly or am I missing something.
> Shane
The showwindow doesn't work under Linux yet. The component was originally
written for Win32 and not all of the windows features have been ported.
Look at the testproc.pp example; the options you should use for compiling
are in that example:
Var S : TProcess;
Buf : Array[1..BUFSIZE] of char;
I,Count : longint;
Line : String
begin
S:=TProcess.Create('/path/to/ppc386 myfile.pp',[poExecuteOnCreate,poUsePipes,poNoConsole]);
Repeat
Count:=s.output.read(buf,BufSize);
// Display buf in a memo, or parse it...
until Count=0;
writeln;
S.Free;
end.
>
>
> >>> michael.vancanneyt at wisa.be 04/17/00 03:00AM >>>
>
>
> On Sun, 16 Apr 2000, Curtis White wrote:
>
> > I actually have some info on how to do this, including how to capture the
> > output. I will try to get the compiler working within the next couple days. I
> > already have the compiler options dialog created, so it just needs to put those
> > options together and send them to the compiler. I will see if I can get it
> > going.
>
> To keep things portable, have a look at the TProcess class in the FCL. This allows
> you to spawn the compiler, and capture it's output in streams. Using the asyncio
> unit you can make it as if it was a background process. There are example programs
> for both units.
>
> Both components are well-tested. TProcess is even used in commercial apps...
>
> Michael.
>
> >
> >
> > Curtis
> >
> >
> > Shane Miller wrote:
> >
> > > One thing that would be cool to add soon would be the ability to compile
> > > within Lazarus. All I want to be able to do a spawn the compiler and add a
> > > define to it. The define would be to define GTK or QT for selecting a
> > > widget.
> > >
> > > How do I do this under Linux? How do I execute the ppc386 compiler or
> > > makefile?
> > > Also, I would like to capture the output to show in a window in Lazarus...
> > >
> > > ---------------------------------------
> > > Shane Miller
> > > Take a look at other product/projects of mine below!
> > >
> > > Get paid to surf the net!
> > > http://alladvantage.com/go.asp?refid=DEX-870
> > >
> > > Get paid to surf the net by clicking here too!!!
> > > http://epipo.com/sine.asp?dex870
> > >
> > > Home page : http://www.lakefield.net/~smiller
> > >
> > > Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip
> > >
> > > Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard
> > >
> > > Lazarus : http://www.lazarus.freepascal.org
> > >
> > > ----- Original Message -----
> > > From: "codepunk" <vbman at pcpros.net>
> > > To: <lazarus at miraclec.com>
> > > Sent: Monday, April 17, 2000 1:28 AM
> > > Subject: [lazarus] Hello screenshots in GTK and QT
> > >
> > > > Here are the screenshots of hello world in QT and GTK.
> > > >
> > > > Qt is at http://www.codepunk.com/files/hqt.jpg
> > > > GTK is at http://www.codepunk.com/files/hgtk.jpg
> > > >
> > > > To bad they look almost exactly the same. Or maybe that is a good thing,
> > > yes
> > > > methinks it is good.
> > > >
> > > > All I did to build it is compiled the gtk one then i blew away all the old
> > > > ppu's and .o files. I opened interfaces.pp and uncommented qt and
> > > recompiled
> > > > pretty cool stuff.
> > > >
> > > > Cliff
> > > >
> > > > _________________________________________________________________
> > > > To unsubscribe: mail lazarus-request at miraclec.com with
> > > > "unsubscribe" as the Subject
> > > > archives at http://www.miraclec.com/list_archives/lazarus
> > > >
> > >
> > > _________________________________________________________________
> > > To unsubscribe: mail lazarus-request at miraclec.com with
> > > "unsubscribe" as the Subject
> > > archives at http://www.miraclec.com/list_archives/lazarus
> >
> > --
> > ----------------------------------
> > Curtis White
> > cwhite at aracnet.com
> > http://www.aracnet.com/~cwhite/
> > ----------------------------------
> >
> >
> >
> > _________________________________________________________________
> > To unsubscribe: mail lazarus-request at miraclec.com with
> > "unsubscribe" as the Subject
> > archives at http://www.miraclec.com/list_archives/lazarus
> >
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
>
More information about the Lazarus
mailing list