Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

Lazarus Custom Tools issue under Windows

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

For my fpGUI development with Lazarus IDE, I launch the fpGUI UI Designer by pressing Ctrl+Shift+F12. That shortcut is a custom tools setup and passes the current editor file to fpGUI UI Designer. The UI Designer consists out of three forms. The main form containing the component palette, the Object Inspector and the the form designer form itself.

Under Linux everything works fine - the UI Designer loads the current editor file and displays the form to be edited. Under Windows there is a problem. The main form of the UI Designer doesn't display for some reason, but the Object Inspector form does. Yet if I launch the UI Designer from an icon on the desktop or command line and even passing in a file to the UI Designer all works well. It simply doesn't work from the Lazarus Custom Tools.

Anybody got some idea of what could cause this? Anybody experienced issues launching certain programs from Custom Tools under Windows?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Under Linux everything works fine - the UI Designer loads the current editor file and displays the form to be edited. Under Windows there is a problem. The main form of the UI Designer doesn't display for some reason, but the Object Inspector form does.

I searched the Lazarus IDE code and saw that it launches the custom tool via a TProcessUTF8. I just used the standard TProcess class and did the following under Windows. It worked perfectly, so I gather that confirms there is a bug in Lazarus IDE somewhere.

procedure TForm1.Button1Click(Sender: TObject);
var
  p: TProcess;
begin
  p := TProcess.Create(self);
  p.CommandLine := 'C:\Programming\fpGUI\uidesigner\uidesigner.exe'
    + ' ' + 'c:\Programming\fpGUI\examples\gui\animation\anim_test.lpr';
  p.Execute;
end;

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Vincent Snijders
to Graeme Geldenhuys

2008/10/28 Graeme Geldenhuys :

Show quoted text 22 lines
On Tue, Oct 28, 2008 at 8:52 AM, Graeme Geldenhuys wrote: > Under Linux everything works fine - the UI Designer loads the current > editor file and displays the form to be edited. Under Windows there is > a problem. The main form of the UI Designer doesn't display for some > reason, but the Object Inspector form does. I searched the Lazarus IDE code and saw that it launches the custom tool via a TProcessUTF8. I just used the standard TProcess class and did the following under Windows. It worked perfectly, so I gather that confirms there is a bug in Lazarus IDE somewhere. procedure TForm1.Button1Click(Sender: TObject); var p: TProcess; begin p := TProcess.Create(self);
And if you do:
  p := TProcessUTF8.Create(self);
Show quoted text 8 lines
p.CommandLine := 'C:\Programming\fpGUI\uidesigner\uidesigner.exe' + ' ' + 'c:\Programming\fpGUI\examples\gui\animation\anim_test.lpr'; p.Execute; end;

Vincent

Reply by email

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote
And if you do: p := TProcessUTF8.Create(self);

Yup, replaced TProcess with TProcessUTF8 and everything still worked. Lazarus does set process options like pipes etc, but I have no idea how pipes and stuff work. Though I thought pipes are only something under Linux, not Windows.

Lazarus really likes to complicate things. :-) I found another "process" type, but no idea what that does...

[------- ExtToolDialog.pas line 335---------}
TheProcess := TOutputFilterProcess.Create(nil);
TheProcess.CommandLine := Filename+' '+Params;
TheProcess.Options:= [poUsePipes,poStdErrToOutPut];
TheProcess.ShowWindow := swoHide;
TheProcess.CurrentDirectory := WorkingDir;

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

On Tue, Oct 28, 2008 at 10:31 AM, Graeme Geldenhuys wrote:

[------- ExtToolDialog.pas line 335---------}

TheProcess.ShowWindow := swoHide;

I found the culprit!!! Even when using TProcess, the above line causes the main form of fpGUI UI Designer not to display. Why is that line in there it the first place?? Plus it's a Windows only option. Lazarus shouldn't interfere with external tools behavior!

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
AFAIK swoHide is needed to run tools hidden. For example compile scripts. I guess some further checkboxes are needed to control TProcess flags.

That should solve the issue. I'll see if I can create a patch over the weekend. I'm a bit bogged down during the week with work.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email