mirror of https://gitlab.com/basile.b/dexed.git
More work related to #336, take explicitly stderr now that it's not done implictly
This commit is contained in:
parent
e261b0e20c
commit
255271bbc7
|
@ -923,6 +923,8 @@ var
|
||||||
begin
|
begin
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
if not fCompilProc.Running then
|
||||||
|
fCompilProc.appendStdErr;
|
||||||
fCompilProc.getFullLines(lst);
|
fCompilProc.getFullLines(lst);
|
||||||
for str in lst do
|
for str in lst do
|
||||||
fMsgs.message(str, fAsProjectItf, amcProj, amkAuto);
|
fMsgs.message(str, fAsProjectItf, amcProj, amkAuto);
|
||||||
|
|
|
@ -944,6 +944,8 @@ var
|
||||||
begin
|
begin
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
if not fDubProc.Running then
|
||||||
|
fDubProc.appendStdErr;
|
||||||
fDubProc.getFullLines(lst);
|
fDubProc.getFullLines(lst);
|
||||||
for str in lst do
|
for str in lst do
|
||||||
fMsgs.message(str, fAsProjectItf, amcProj, amkAuto);
|
fMsgs.message(str, fAsProjectItf, amcProj, amkAuto);
|
||||||
|
|
|
@ -1472,7 +1472,7 @@ object CEMainForm: TCEMainForm
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
OnWindowStateChange = FormWindowStateChange
|
OnWindowStateChange = FormWindowStateChange
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '1.8.2.0'
|
LCLVersion = '1.8.4.0'
|
||||||
Visible = False
|
Visible = False
|
||||||
object mainMenu: TMainMenu
|
object mainMenu: TMainMenu
|
||||||
top = 1
|
top = 1
|
||||||
|
|
|
@ -9,6 +9,9 @@ uses
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
//TODO: follow up https://bugs.freepascal.org/view.php?id=33897
|
||||||
|
//which is the cause of the timer workaround
|
||||||
|
|
||||||
{
|
{
|
||||||
The stanndard process wrapper used in Coedit.
|
The stanndard process wrapper used in Coedit.
|
||||||
|
|
||||||
|
@ -16,6 +19,7 @@ type
|
||||||
|
|
||||||
- OnTerminate event is never called under Linux.
|
- OnTerminate event is never called under Linux.
|
||||||
Here a timer perdiodically check the process and call the event accordingly.
|
Here a timer perdiodically check the process and call the event accordingly.
|
||||||
|
(STILL DOES NOT WORK)
|
||||||
- TAsyncProcess.OnReadData event is not usable to read full output lines.
|
- TAsyncProcess.OnReadData event is not usable to read full output lines.
|
||||||
Here the output is accumulated in a TMemoryStream which allows to keep data
|
Here the output is accumulated in a TMemoryStream which allows to keep data
|
||||||
at the left of an unterminated line when a buffer is available.
|
at the left of an unterminated line when a buffer is available.
|
||||||
|
@ -39,7 +43,6 @@ type
|
||||||
procedure checkTerminated(sender: TObject);
|
procedure checkTerminated(sender: TObject);
|
||||||
procedure setOnTerminate(value: TNotifyEvent);
|
procedure setOnTerminate(value: TNotifyEvent);
|
||||||
procedure setOnReadData(value: TNotifyEvent);
|
procedure setOnReadData(value: TNotifyEvent);
|
||||||
procedure appendStdErr;
|
|
||||||
protected
|
protected
|
||||||
procedure internalDoOnReadData(sender: TObject); virtual;
|
procedure internalDoOnReadData(sender: TObject); virtual;
|
||||||
procedure internalDoOnTerminate(sender: TObject); virtual;
|
procedure internalDoOnTerminate(sender: TObject); virtual;
|
||||||
|
@ -50,7 +53,11 @@ type
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure execute; override;
|
procedure execute; override;
|
||||||
|
// Check if process is terminated (bug 33897).
|
||||||
|
// Not to be called in the OnTerminated handler.
|
||||||
procedure checkTerminated;
|
procedure checkTerminated;
|
||||||
|
// Add stderr to stdout, to be called when terminated
|
||||||
|
procedure appendStdErr;
|
||||||
// reads TProcess.OUtput in OutputStack
|
// reads TProcess.OUtput in OutputStack
|
||||||
procedure fillOutputStack;
|
procedure fillOutputStack;
|
||||||
// fills list with the full lines contained in OutputStack
|
// fills list with the full lines contained in OutputStack
|
||||||
|
|
|
@ -20,7 +20,7 @@ inherited CEProjectGroupWidget: TCEProjectGroupWidget
|
||||||
ClientWidth = 328
|
ClientWidth = 328
|
||||||
object lstProj: TListView[0]
|
object lstProj: TListView[0]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 140
|
Height = 124
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 320
|
Width = 320
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
@ -30,22 +30,22 @@ inherited CEProjectGroupWidget: TCEProjectGroupWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Name'
|
Caption = 'Name'
|
||||||
Width = 47
|
Width = 51
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Type'
|
Caption = 'Type'
|
||||||
Width = 41
|
Width = 42
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Async'
|
Caption = 'Async'
|
||||||
Width = 47
|
Width = 51
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Configuration'
|
Caption = 'Configuration'
|
||||||
Width = 89
|
Width = 174
|
||||||
end>
|
end>
|
||||||
GridLines = True
|
GridLines = True
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
|
@ -59,19 +59,19 @@ inherited CEProjectGroupWidget: TCEProjectGroupWidget
|
||||||
end
|
end
|
||||||
object Panel2: TPanel[1]
|
object Panel2: TPanel[1]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 7
|
Height = 23
|
||||||
Top = 148
|
Top = 132
|
||||||
Width = 320
|
Width = 320
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 7
|
ClientHeight = 23
|
||||||
ClientWidth = 320
|
ClientWidth = 320
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnFreeFocus: TSpeedButton
|
object btnFreeFocus: TSpeedButton
|
||||||
Left = 312
|
Left = 312
|
||||||
Height = 7
|
Height = 23
|
||||||
Hint = 'Put the focus on the ungrouped project'
|
Hint = 'Put the focus on the ungrouped project'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 4
|
Width = 4
|
||||||
|
@ -83,7 +83,7 @@ inherited CEProjectGroupWidget: TCEProjectGroupWidget
|
||||||
end
|
end
|
||||||
object StaticText1: TStaticText
|
object StaticText1: TStaticText
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 3
|
Height = 19
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 308
|
Width = 308
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
@ -94,7 +94,7 @@ inherited CEProjectGroupWidget: TCEProjectGroupWidget
|
||||||
end
|
end
|
||||||
object btnAddUnfocused: TSpeedButton
|
object btnAddUnfocused: TSpeedButton
|
||||||
Left = 316
|
Left = 316
|
||||||
Height = 7
|
Height = 23
|
||||||
Hint = 'Put the ungrouped project in the group'
|
Hint = 'Put the ungrouped project in the group'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 4
|
Width = 4
|
||||||
|
|
|
@ -254,6 +254,8 @@ begin
|
||||||
begin
|
begin
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
if not fProcess.Running then
|
||||||
|
fProcess.appendStdErr;
|
||||||
fProcess.getFullLines(lst);
|
fProcess.getFullLines(lst);
|
||||||
for str in lst do
|
for str in lst do
|
||||||
fMsgs.message(str, nil, amcMisc, amkAuto);
|
fMsgs.message(str, nil, amcMisc, amkAuto);
|
||||||
|
|
Loading…
Reference in New Issue