Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-05-04 Thread Mark Morgan Lloyd via Lazarus
On 04/05/17 12:00, Graeme Geldenhuys via Lazarus wrote: On 2017-05-04 11:18, Mark Morgan Lloyd via Lazarus wrote:> In case it helps anybody avoid wasted time: looking carefully at what > I've been doing, it turns out that it's not possible to make an > LCL-based program running on unix (i.e. wi

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-05-04 Thread Graeme Geldenhuys via Lazarus
On 2017-05-04 11:18, Mark Morgan Lloyd via Lazarus wrote: > In case it helps anybody avoid wasted time: looking carefully at what > I've been doing, it turns out that it's not possible to make an > LCL-based program running on unix (i.e. with X11 etc.) And it wouldn’t be right if I didn’t offer

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-05-04 Thread Michael Van Canneyt via Lazarus
On Thu, 4 May 2017, Mark Morgan Lloyd via Lazarus wrote: On 11/04/17 09:30, Mark Morgan Lloyd via Lazarus wrote: Apologies if this is an FAQ. Is there an orthodox way that a Lazarus program can very early on look at how it's been started and decide whether it can usefully fall back to a text

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-05-04 Thread Mark Morgan Lloyd via Lazarus
On 11/04/17 09:30, Mark Morgan Lloyd via Lazarus wrote: Apologies if this is an FAQ. Is there an orthodox way that a Lazarus program can very early on look at how it's been started and decide whether it can usefully fall back to a text mode, e.g. to display help info on stdout rather than a messa

Re: [Lazarus] Startup environment: to Gui, or not to GUI? [OT]

2017-04-12 Thread Mark Morgan Lloyd via Lazarus
On 12/04/17 08:30, Lukasz Sokol via Lazarus wrote: On 11/04/17 19:44, Mark Morgan Lloyd via Lazarus wrote:[...]> > Regrettably, investigating that sort of thing in too much depth can> get one flagged as a malware writer. A few days ago I saw something> very odd happen as a result of some search

Re: [Lazarus] Startup environment: to Gui, or not to GUI? [OT]

2017-04-12 Thread Lukasz Sokol via Lazarus
On 11/04/17 19:44, Mark Morgan Lloyd via Lazarus wrote: [...] > > Regrettably, investigating that sort of thing in too much depth can > get one flagged as a malware writer. A few days ago I saw something > very odd happen as a result of some search terms I used when reading > up about a particular

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Mark Morgan Lloyd via Lazarus
On 11/04/17 16:00, Henry Vermaak via Lazarus wrote: On Tue, Apr 11, 2017 at 01:34:35PM +, Mark Morgan Lloyd via Lazarus wrote:> Something like this does appear to work, tested on Linux only.> > function notGui(): boolean;> > var i: integer;> > begin> i := IsaTty(Input);> {$ifdef ISGUI

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Henry Vermaak via Lazarus
On Tue, Apr 11, 2017 at 01:34:35PM +, Mark Morgan Lloyd via Lazarus wrote: > Something like this does appear to work, tested on Linux only. > > function notGui(): boolean; > > var i: integer; > > begin > i := IsaTty(Input); > {$ifdef ISGUI } > exit false; > {$endif ISGUI } > {$ifdef

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Mark Morgan Lloyd via Lazarus
On 11/04/17 10:30, Mark Morgan Lloyd via Lazarus wrote: On 11/04/17 10:00, Henry Vermaak via Lazarus wrote:> On Tue, Apr 11, 2017 at 09:15:16AM +, Mark Morgan Lloyd via Lazarus wrote:> Apologies if this is an FAQ.> > Is there an orthodox way that a Lazarus program can very early on look at> h

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Mark Morgan Lloyd via Lazarus
On 11/04/17 11:00, Tony Whyman via Lazarus wrote: This question could be reformulated as "How do I dynamically determine the correct GUI to use or whether to use the nogui interface." My understanding is that Lazarus programs usually do this at link time as a result of setting the LCL_PLATFORM en

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Alexey via Lazarus
Hi I use text out in CudaText GUI editor. Just call Writeln(.); and then Halt. Inside Form's OnCreate method. On 11.04.2017 12:15, Mark Morgan Lloyd via Lazarus wrote: Is there an orthodox way that a Lazarus program can very early on look at how it's been started and decide whether it

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Tony Whyman via Lazarus
This question could be reformulated as "How do I dynamically determine the correct GUI to use or whether to use the nogui interface." My understanding is that Lazarus programs usually do this at link time as a result of setting the LCL_PLATFORM environment variable. This forces the requested G

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Mark Morgan Lloyd via Lazarus
On 11/04/17 10:00, Henry Vermaak via Lazarus wrote: On Tue, Apr 11, 2017 at 09:15:16AM +, Mark Morgan Lloyd via Lazarus wrote:> Apologies if this is an FAQ.> > Is there an orthodox way that a Lazarus program can very early on look at> how it's been started and decide whether it can usefully

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Graeme Geldenhuys via Lazarus
On 2017-04-11 10:15, Mark Morgan Lloyd via Lazarus wrote: > Is there an orthodox way that a Lazarus program can very early on look > at how it's been started and decide whether it can usefully fall back to > a text mode, e.g. to display help info on stdout rather than a messagebox? In the past I

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Henry Vermaak via Lazarus
On Tue, Apr 11, 2017 at 09:15:16AM +, Mark Morgan Lloyd via Lazarus wrote: > Apologies if this is an FAQ. > > Is there an orthodox way that a Lazarus program can very early on look at > how it's been started and decide whether it can usefully fall back to a text > mode, e.g. to display help in

[Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Mark Morgan Lloyd via Lazarus
Apologies if this is an FAQ. Is there an orthodox way that a Lazarus program can very early on look at how it's been started and decide whether it can usefully fall back to a text mode, e.g. to display help info on stdout rather than a messagebox? I'm tinkering with something (a media test pr