mirror of https://gitlab.com/basile.b/dexed.git
bugfixes for the linux version
This commit is contained in:
parent
ff1e518e5a
commit
c38d76d1b1
|
@ -73,7 +73,7 @@ type
|
||||||
function getAbsoluteFilename(const aFilename: string): string;
|
function getAbsoluteFilename(const aFilename: string): string;
|
||||||
procedure addSource(const aFilename: string);
|
procedure addSource(const aFilename: string);
|
||||||
function addConfiguration: TCompilerConfiguration;
|
function addConfiguration: TCompilerConfiguration;
|
||||||
function getOpts: string;
|
procedure getOpts(const aList: TStrings);
|
||||||
//
|
//
|
||||||
property configuration[ix: integer]: TCompilerConfiguration read getConfig;
|
property configuration[ix: integer]: TCompilerConfiguration read getConfig;
|
||||||
property currentConfiguration: TCompilerConfiguration read getCurrConf;
|
property currentConfiguration: TCompilerConfiguration read getCurrConf;
|
||||||
|
@ -313,11 +313,23 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEProject.doChanged;
|
procedure TCEProject.doChanged;
|
||||||
|
{$IFDEF DEBUG}
|
||||||
|
var
|
||||||
|
lst: TStringList;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
fModified := true;
|
fModified := true;
|
||||||
if assigned(fOnChange) then fOnChange(Self);
|
if assigned(fOnChange) then fOnChange(Self);
|
||||||
{$IFDEF DEBUG}
|
{$IFDEF DEBUG}
|
||||||
writeln(getOpts);
|
lst := TStringList.Create;
|
||||||
|
try
|
||||||
|
lst.Add('---------begin----------');
|
||||||
|
getOpts(lst);
|
||||||
|
lst.Add('---------end----------');
|
||||||
|
writeln(lst.Text);
|
||||||
|
finally
|
||||||
|
lst.Free;
|
||||||
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -366,18 +378,17 @@ begin
|
||||||
afterChanged;
|
afterChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEProject.getOpts: string;
|
procedure TCEProject.getOpts(const aList: TStrings);
|
||||||
var
|
var
|
||||||
rel, abs: string;
|
rel, abs: string;
|
||||||
begin
|
begin
|
||||||
result := '';
|
|
||||||
if fConfIx = -1 then exit;
|
if fConfIx = -1 then exit;
|
||||||
for rel in fSrcs do
|
for rel in fSrcs do if rel <> '' then
|
||||||
begin
|
begin
|
||||||
abs := expandFilenameEx(fBasePath,rel);
|
abs := expandFilenameEx(fBasePath,rel);
|
||||||
result += '"' + abs + '" ' ;
|
aList.Add(abs); // process.inc ln 249. double quotes are added anyway if there's a space...
|
||||||
end;
|
end;
|
||||||
result += TCompilerConfiguration(fOptsColl.Items[fConfIx]).getOpts;
|
TCompilerConfiguration(fOptsColl.Items[fConfIx]).getOpts(aList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEProject.getAbsoluteSourceName(const aIndex: integer): string;
|
function TCEProject.getAbsoluteSourceName(const aIndex: integer): string;
|
||||||
|
|
|
@ -22,7 +22,8 @@ type
|
||||||
protected
|
protected
|
||||||
property onChange: TNotifyEvent read fOnChange write fOnChange;
|
property onChange: TNotifyEvent read fOnChange write fOnChange;
|
||||||
public
|
public
|
||||||
function getOpts: string; virtual; abstract;
|
//function getOpts: string; virtual; abstract;
|
||||||
|
procedure getOpts(const aList: TStrings); virtual; abstract;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -45,7 +46,7 @@ type
|
||||||
property JSONFilename: string read fJsonFname write setJSONFile;
|
property JSONFilename: string read fJsonFname write setJSONFile;
|
||||||
public
|
public
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ type
|
||||||
public
|
public
|
||||||
constructor create;
|
constructor create;
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -132,7 +133,7 @@ type
|
||||||
property versionIdentifier: string read fVerId write setVerId;
|
property versionIdentifier: string read fVerId write setVerId;
|
||||||
public
|
public
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(**
|
(**
|
||||||
|
@ -158,7 +159,7 @@ type
|
||||||
property generateMapFile: boolean read fMap write setMap;
|
property generateMapFile: boolean read fMap write setMap;
|
||||||
public
|
public
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -186,7 +187,7 @@ type
|
||||||
constructor create;
|
constructor create;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -202,7 +203,7 @@ type
|
||||||
constructor create;
|
constructor create;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
function getOpts: string; override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -229,7 +230,6 @@ type
|
||||||
procedure setOthers(const aValue: TOtherOpts);
|
procedure setOthers(const aValue: TOtherOpts);
|
||||||
protected
|
protected
|
||||||
function nameFromID: string;
|
function nameFromID: string;
|
||||||
function getCmdLine: string;
|
|
||||||
published
|
published
|
||||||
property name: string read fName write setName;
|
property name: string read fName write setName;
|
||||||
property documentationOptions: TDocOpts read fDocOpts write setDocOpts;
|
property documentationOptions: TDocOpts read fDocOpts write setDocOpts;
|
||||||
|
@ -242,7 +242,7 @@ type
|
||||||
constructor create(aCollection: TCollection); override;
|
constructor create(aCollection: TCollection); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure assign(aValue: TPersistent); override;
|
procedure assign(aValue: TPersistent); override;
|
||||||
property getOpts: string read getCmdLine;
|
procedure getOpts(const aList: TStrings);
|
||||||
property onChanged: TNotifyEvent read fOnChanged write fOnChanged;
|
property onChanged: TNotifyEvent read fOnChanged write fOnChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -259,13 +259,12 @@ end;
|
||||||
(*******************************************************************************
|
(*******************************************************************************
|
||||||
* TDocOpts
|
* TDocOpts
|
||||||
*)
|
*)
|
||||||
function TDocOpts.getOpts: string;
|
procedure TDocOpts.getOpts(const aList: TStrings);
|
||||||
begin
|
begin
|
||||||
result := '';
|
if fGenDoc then aList.Add('-D');
|
||||||
if fGenDoc then result += '-D ';
|
if fGenJson then aList.Add('-X');
|
||||||
if fGenJson then result += '-X ';
|
if fDocDir <> '' then aList.Add('-Dd' + fDocDir);
|
||||||
if fDocDir <> '' then result += '-Dd' + '"' + fDocDir + '" ';
|
if fJsonFname <> '' then aList.Add('-Xf' + fJsonFname);
|
||||||
if fJsonFname <> '' then result += '-Xf' + '"'+ fJsonFname + '" ';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDocOpts.assign(aValue: TPersistent);
|
procedure TDocOpts.assign(aValue: TPersistent);
|
||||||
|
@ -319,16 +318,19 @@ begin
|
||||||
fDepHandling := TDepHandling.warning;
|
fDepHandling := TDepHandling.warning;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMsgOpts.getOpts: string;
|
procedure TMsgOpts.getOpts(const aList: TStrings);
|
||||||
|
var
|
||||||
|
opt : string;
|
||||||
const
|
const
|
||||||
DepStr : array[TDepHandling] of string = ('-d ',''(*-dw*), '-de ');
|
DepStr : array[TDepHandling] of string = ('-d', '', '-de');
|
||||||
begin
|
begin
|
||||||
result := DepStr[fDepHandling];
|
opt := DepStr[fDepHandling];
|
||||||
if fVerb then result += '-v ';
|
if opt <> '' then aList.Add(opt);
|
||||||
if fWarn then result += '-w ';
|
if fVerb then aList.Add('-v');
|
||||||
if fWarnEx then result += '-wi ';
|
if fWarn then aList.Add('-w');
|
||||||
if fVtls then result += '-vtls ';
|
if fWarnEx then aList.Add('-wi');
|
||||||
if fQuiet then result += '-quiet ';
|
if fVtls then aList.Add('-vtls');
|
||||||
|
if fQuiet then aList.Add('-quiet');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMsgOpts.assign(aValue: TPersistent);
|
procedure TMsgOpts.assign(aValue: TPersistent);
|
||||||
|
@ -393,21 +395,25 @@ end;
|
||||||
(*******************************************************************************
|
(*******************************************************************************
|
||||||
* TOutputOpts
|
* TOutputOpts
|
||||||
*)
|
*)
|
||||||
function TOutputOpts.getOpts: string;
|
procedure TOutputOpts.getOpts(const aList: TStrings);
|
||||||
|
var
|
||||||
|
opt: string;
|
||||||
const
|
const
|
||||||
trgKindStr: array[TTargetSystem] of string = ('', '-m32 ','-m64 ');
|
trgKindStr: array[TTargetSystem] of string = ('', '-m32','-m64');
|
||||||
binKindStr: array[TBinaryKind] of string = ('', '-lib ', '-shared ', '-c ');
|
binKindStr: array[TBinaryKind] of string = ('', '-lib', '-shared', '-c');
|
||||||
begin
|
begin
|
||||||
result := binKindStr[fBinKind];
|
opt := binKindStr[fBinKind];
|
||||||
result += trgKindStr[fTrgKind];
|
if opt <> '' then aList.Add(opt);
|
||||||
if fUt then result += '-unittest ';
|
opt := trgKindStr[fTrgKind];
|
||||||
if fVerId <> '' then result += '-version=' + fVerId + ' ';;
|
if opt <> '' then aList.Add(opt);
|
||||||
if fInline then result += '-inline ';
|
if fUt then aList.Add('-unittest');
|
||||||
if fNoBounds then result += '-noboundscheck ';
|
if fVerId <> '' then aList.Add('-version=' + fVerId);
|
||||||
if fOptimz then result += '-O ';
|
if fInline then aList.Add('-inline');
|
||||||
if fGenStack then result += '-gs ';
|
if fNoBounds then aList.Add('-noboundscheck');
|
||||||
if fMain then result += '-main ';
|
if fOptimz then aList.Add('-O');
|
||||||
if fRelease then result += '-release ';
|
if fGenStack then aList.Add('-gs');
|
||||||
|
if fMain then aList.Add('-main');
|
||||||
|
if fRelease then aList.Add('-release');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOutputOpts.assign(aValue: TPersistent);
|
procedure TOutputOpts.assign(aValue: TPersistent);
|
||||||
|
@ -504,14 +510,13 @@ end;
|
||||||
(*******************************************************************************
|
(*******************************************************************************
|
||||||
* TDebugOpts
|
* TDebugOpts
|
||||||
*)
|
*)
|
||||||
function TDebugOpts.getOpts: string;
|
procedure TDebugOpts.getOpts(const aList: TStrings);
|
||||||
begin
|
begin
|
||||||
result := '';
|
if fDbg then aList.Add('-debug');
|
||||||
if fDbg then result += '-debug ';
|
if fDbgIdent <> '' then aList.Add('-debug=' + fDbgIdent);
|
||||||
if fDbgIdent <> '' then result += '-debug=' + fDbgIdent + ' ';
|
if fDbgD then aList.Add('-g');
|
||||||
if fDbgD then result += '-g ';
|
if fDbgC then aList.Add('-gc');
|
||||||
if fDbgC then result += '-gc ';
|
if fMap then aList.Add('-map');
|
||||||
if fMap then result += '-map ';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugOpts.assign(aValue: TPersistent);
|
procedure TDebugOpts.assign(aValue: TPersistent);
|
||||||
|
@ -568,19 +573,18 @@ end;
|
||||||
(*******************************************************************************
|
(*******************************************************************************
|
||||||
* TPathsOpts
|
* TPathsOpts
|
||||||
*)
|
*)
|
||||||
function TPathsOpts.getOpts: string;
|
procedure TPathsOpts.getOpts(const aList: TStrings);
|
||||||
var
|
var
|
||||||
str: string;
|
str: string;
|
||||||
begin
|
begin
|
||||||
result := '';
|
for str in fSrcs do if str <> '' then
|
||||||
for str in fSrcs do
|
aList.Add(str);
|
||||||
result += '"'+ str +'" ';
|
for str in fIncl do if str <> '' then
|
||||||
for str in fIncl do
|
aList.Add('-I'+ str);
|
||||||
result += '-I"'+ str +'" ';
|
for str in fImpt do if str <> '' then
|
||||||
for str in fImpt do
|
aList.Add('-J'+ str);
|
||||||
result += '-J"'+ str +'" ';
|
if fFname <> '' then aList.Add('-of' + fFname);
|
||||||
if fFname <> '' then result += '-of"' + fFname + '" ';
|
if fObjDir <> '' then aList.Add('-od' + fObjDir);
|
||||||
if fObjDir <> '' then result += '-od"' + fObjDir + '" ';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TPathsOpts.create;
|
constructor TPathsOpts.create;
|
||||||
|
@ -672,13 +676,12 @@ begin
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOtherOpts.getOpts: string;
|
procedure TOtherOpts.getOpts(const aList: TStrings);
|
||||||
var
|
var
|
||||||
str: string;
|
str: string;
|
||||||
begin
|
begin
|
||||||
result := '';
|
for str in fCustom do if str <> '' then
|
||||||
for str in fCustom do
|
aList.Add(str);
|
||||||
result += str + ' ';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOtherOpts.setCustom(const aValue: TStringList);
|
procedure TOtherOpts.setCustom(const aValue: TStringList);
|
||||||
|
@ -745,13 +748,14 @@ begin
|
||||||
result := format('<configuration %d>',[ID]);
|
result := format('<configuration %d>',[ID]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCompilerConfiguration.getCmdLine: string;
|
procedure TCompilerConfiguration.getOpts(const aList: TStrings);
|
||||||
begin
|
begin
|
||||||
result :=
|
fDocOpts.getOpts(aList);
|
||||||
fDocOpts.getOpts + fDebugOpts.getOpts + fMsgOpts.getOpts
|
fDebugOpts.getOpts(aList);
|
||||||
+ fOutputOpts.getOpts + fPathsOpts.getOpts + fOthers.getOpts;
|
fMsgOpts.getOpts(aList);
|
||||||
if length(result) > 0 then if result[length(result)] = ' ' then
|
fOutputOpts.getOpts(aList);
|
||||||
setlength(result, length(result)-1);
|
fPathsOpts.getOpts(aList);
|
||||||
|
fOthers.getOpts(aList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompilerConfiguration.setName(const aValue: string);
|
procedure TCompilerConfiguration.setName(const aValue: string);
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
inherited CEEditorWidget: TCEEditorWidget
|
inherited CEEditorWidget: TCEEditorWidget
|
||||||
Left = 1163
|
Left = 1159
|
||||||
Height = 382
|
Height = 382
|
||||||
Top = 91
|
Top = 91
|
||||||
Width = 461
|
Width = 465
|
||||||
Caption = 'Source editor'
|
Caption = 'Source editor'
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 461
|
ClientWidth = 465
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 382
|
Height = 382
|
||||||
Width = 461
|
Width = 465
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 461
|
ClientWidth = 465
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 382
|
Height = 382
|
||||||
Width = 461
|
Width = 465
|
||||||
BevelOuter = bvRaised
|
BevelOuter = bvRaised
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 461
|
ClientWidth = 465
|
||||||
object PageControl: TExtendedNotebook[0]
|
object PageControl: TExtendedNotebook[0]
|
||||||
Left = 3
|
Left = 3
|
||||||
Height = 351
|
Height = 351
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 455
|
Width = 459
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Images = imgList
|
Images = imgList
|
||||||
|
@ -36,7 +36,7 @@ inherited CEEditorWidget: TCEEditorWidget
|
||||||
Left = 3
|
Left = 3
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 356
|
Top = 356
|
||||||
Width = 455
|
Width = 459
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
object CEMainForm: TCEMainForm
|
object CEMainForm: TCEMainForm
|
||||||
Left = 1162
|
Left = 1158
|
||||||
Height = 53
|
Height = 53
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 741
|
Width = 745
|
||||||
AllowDropFiles = True
|
AllowDropFiles = True
|
||||||
Caption = 'Coedit'
|
Caption = 'Coedit'
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
|
117
src/ce_main.pas
117
src/ce_main.pas
|
@ -134,6 +134,7 @@ type
|
||||||
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
fUpdateCount: NativeInt;
|
||||||
fProject: TCEProject;
|
fProject: TCEProject;
|
||||||
fWidgList: TCEWidgetList;
|
fWidgList: TCEWidgetList;
|
||||||
fMesgWidg: TCEMessagesWidget;
|
fMesgWidg: TCEMessagesWidget;
|
||||||
|
@ -263,57 +264,67 @@ var
|
||||||
hasProj: boolean;
|
hasProj: boolean;
|
||||||
begin
|
begin
|
||||||
if fEditWidg = nil then exit;
|
if fEditWidg = nil then exit;
|
||||||
//
|
if fUpdateCount > 0 then exit;
|
||||||
curr := fEditWidg.currentEditor;
|
Inc(fUpdateCount);
|
||||||
hasEd := curr <> nil;
|
try
|
||||||
if hasEd then
|
curr := fEditWidg.currentEditor;
|
||||||
begin
|
hasEd := curr <> nil;
|
||||||
actEdCopy.Enabled := curr.SelAvail;
|
if hasEd then
|
||||||
actEdCut.Enabled := curr.SelAvail;
|
begin
|
||||||
actEdPaste.Enabled := curr.CanPaste;
|
actEdCopy.Enabled := curr.SelAvail;
|
||||||
actEdUndo.Enabled := curr.CanUndo;
|
actEdCut.Enabled := curr.SelAvail;
|
||||||
actEdRedo.Enabled := curr.CanRedo;
|
actEdPaste.Enabled := curr.CanPaste;
|
||||||
actEdMacPlay.Enabled := true;
|
{$IFDEF MSWINDOWS}
|
||||||
actEdMacStartStop.Enabled := true;
|
// close file : raises a segfault on linux UndoStuff.>>fList<<.Count...
|
||||||
//
|
actEdUndo.Enabled := curr.CanUndo;
|
||||||
actFileCompAndRun.Enabled := true;
|
actEdRedo.Enabled := curr.CanRedo;
|
||||||
actFileCompAndRunWithArgs.Enabled := true;
|
{$ENDIF}
|
||||||
actFileSave.Enabled := true;
|
actEdMacPlay.Enabled := true;
|
||||||
actFileSaveAs.Enabled := true;
|
actEdMacStartStop.Enabled := true;
|
||||||
actFileClose.Enabled := true;
|
//
|
||||||
actFileSaveAll.Enabled := true;
|
actFileCompAndRun.Enabled := true;
|
||||||
end
|
actFileCompAndRunWithArgs.Enabled := true;
|
||||||
else begin
|
actFileSave.Enabled := true;
|
||||||
actEdCopy.Enabled := false;
|
actFileSaveAs.Enabled := true;
|
||||||
actEdCut.Enabled := false ;
|
actFileClose.Enabled := true;
|
||||||
actEdPaste.Enabled := false ;
|
actFileSaveAll.Enabled := true;
|
||||||
actEdUndo.Enabled := false ;
|
end
|
||||||
actEdRedo.Enabled := false ;
|
else begin
|
||||||
actEdMacPlay.Enabled := false;
|
actEdCopy.Enabled := false;
|
||||||
actEdMacStartStop.Enabled := false;
|
actEdCut.Enabled := false ;
|
||||||
//
|
actEdPaste.Enabled := false;
|
||||||
actFileCompAndRun.Enabled := false;
|
{$IFDEF MSWINDOWS}
|
||||||
actFileCompAndRunWithArgs.Enabled := false;
|
actEdUndo.Enabled := false;
|
||||||
actFileSave.Enabled := false;
|
actEdRedo.Enabled := false;
|
||||||
actFileSaveAs.Enabled := false;
|
{$ENDIF}
|
||||||
actFileClose.Enabled := false;
|
actEdMacPlay.Enabled := false;
|
||||||
actFileSaveAll.Enabled := false;
|
actEdMacStartStop.Enabled := false;
|
||||||
|
//
|
||||||
|
actFileCompAndRun.Enabled := false;
|
||||||
|
actFileCompAndRunWithArgs.Enabled := false;
|
||||||
|
actFileSave.Enabled := false;
|
||||||
|
actFileSaveAs.Enabled := false;
|
||||||
|
actFileClose.Enabled := false;
|
||||||
|
actFileSaveAll.Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
hasProj := fProject <> nil;
|
||||||
|
actProjSave.Enabled := hasProj;
|
||||||
|
actProjSaveAs.Enabled := hasProj;
|
||||||
|
actProjOpts.Enabled := hasProj;
|
||||||
|
actProjClose.Enabled := hasProj;
|
||||||
|
actProjCompile.Enabled := hasProj;
|
||||||
|
actProjCompileAndRun.Enabled := hasProj;
|
||||||
|
actProjCompAndRunWithArgs.Enabled := hasProj;
|
||||||
|
actProjRun.Enabled := hasProj;
|
||||||
|
actProjRunWithArgs.Enabled := hasProj;
|
||||||
|
actProjSource.Enabled := hasProj;
|
||||||
|
|
||||||
|
actFileAddToProj.Enabled := hasEd and hasProj;
|
||||||
|
|
||||||
|
finally
|
||||||
|
Dec(fUpdateCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
hasProj := fProject <> nil;
|
|
||||||
actProjSave.Enabled := hasProj;
|
|
||||||
actProjSaveAs.Enabled := hasProj;
|
|
||||||
actProjOpts.Enabled := hasProj;
|
|
||||||
actProjClose.Enabled := hasProj;
|
|
||||||
actProjCompile.Enabled := hasProj;
|
|
||||||
actProjCompileAndRun.Enabled := hasProj;
|
|
||||||
actProjCompAndRunWithArgs.Enabled := hasProj;
|
|
||||||
actProjRun.Enabled := hasProj;
|
|
||||||
actProjRunWithArgs.Enabled := hasProj;
|
|
||||||
actProjSource.Enabled := hasProj;
|
|
||||||
|
|
||||||
actFileAddToProj.Enabled := hasEd and hasProj;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.checkWidgetActions(const aWidget: TCEWidget);
|
procedure TCEMainForm.checkWidgetActions(const aWidget: TCEWidget);
|
||||||
|
@ -648,13 +659,13 @@ begin
|
||||||
temppath := GetTempDir(false);
|
temppath := GetTempDir(false);
|
||||||
chDir(temppath);
|
chDir(temppath);
|
||||||
{$IFDEF DEBUG}{$WARNINGS OFF}{$HINTS OFF}{$ENDIF}
|
{$IFDEF DEBUG}{$WARNINGS OFF}{$HINTS OFF}{$ENDIF}
|
||||||
fname := temppath + format('temp_%.8x', [LongWord(@dmdproc)]);
|
fname := temppath + format('temp_%.8x', [NativeInt(@dmdproc)]);
|
||||||
{$IFDEF DEBUG}{$WARNINGS ON}{$HINTS ON}{$ENDIF}
|
{$IFDEF DEBUG}{$WARNINGS ON}{$HINTS ON}{$ENDIF}
|
||||||
fEditWidg.editor[edIndex].Lines.SaveToFile(fname + '.d');
|
fEditWidg.editor[edIndex].Lines.SaveToFile(fname + '.d');
|
||||||
|
|
||||||
dmdproc.Options:= [poWaitOnExit, poStdErrToOutput, poUsePipes];
|
dmdproc.Options:= [poWaitOnExit, poStdErrToOutput, poUsePipes];
|
||||||
dmdproc.Executable:= 'dmd';
|
dmdproc.Executable:= 'dmd';
|
||||||
dmdproc.Parameters.Text := '"'+ fname +'.d"';
|
dmdproc.Parameters.Add(fname + '.d');
|
||||||
try
|
try
|
||||||
dmdproc.Execute;
|
dmdproc.Execute;
|
||||||
ProcessOutputToMsg(dmdproc);
|
ProcessOutputToMsg(dmdproc);
|
||||||
|
@ -731,7 +742,7 @@ begin
|
||||||
procopts[aProject.currentConfiguration.messagesOptions.verbose];
|
procopts[aProject.currentConfiguration.messagesOptions.verbose];
|
||||||
|
|
||||||
dmdproc.Executable := 'dmd';
|
dmdproc.Executable := 'dmd';
|
||||||
dmdproc.Parameters.Text := aProject.getOpts;
|
aProject.getOpts(dmdproc.Parameters);
|
||||||
try
|
try
|
||||||
dmdproc.Execute;
|
dmdproc.Execute;
|
||||||
ProcessOutputToMsg(dmdproc);
|
ProcessOutputToMsg(dmdproc);
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
inherited CEMessagesWidget: TCEMessagesWidget
|
inherited CEMessagesWidget: TCEMessagesWidget
|
||||||
Left = 1163
|
Left = 1160
|
||||||
Height = 172
|
Height = 172
|
||||||
Top = 511
|
Top = 511
|
||||||
Width = 741
|
Width = 744
|
||||||
Caption = 'Messages'
|
Caption = 'Messages'
|
||||||
ClientHeight = 172
|
ClientHeight = 172
|
||||||
ClientWidth = 741
|
ClientWidth = 744
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 172
|
Height = 172
|
||||||
Width = 741
|
Width = 744
|
||||||
ClientHeight = 172
|
ClientHeight = 172
|
||||||
ClientWidth = 741
|
ClientWidth = 744
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 172
|
Height = 172
|
||||||
Width = 741
|
Width = 744
|
||||||
ClientHeight = 172
|
ClientHeight = 172
|
||||||
ClientWidth = 741
|
ClientWidth = 744
|
||||||
object List: TListView[0]
|
object List: TListView[0]
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 168
|
Height = 168
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 737
|
Width = 740
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 733
|
Width = 736
|
||||||
end>
|
end>
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
IconOptions.WrapText = False
|
IconOptions.WrapText = False
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 1163
|
Left = 1160
|
||||||
Height = 278
|
Height = 276
|
||||||
Width = 471
|
Top = 723
|
||||||
|
Width = 474
|
||||||
Caption = 'Project configuration'
|
Caption = 'Project configuration'
|
||||||
ClientHeight = 278
|
ClientHeight = 276
|
||||||
ClientWidth = 471
|
ClientWidth = 474
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 278
|
Height = 276
|
||||||
Width = 471
|
Width = 474
|
||||||
ClientHeight = 278
|
ClientHeight = 276
|
||||||
ClientWidth = 471
|
ClientWidth = 474
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 278
|
Height = 276
|
||||||
Width = 471
|
Width = 474
|
||||||
ClientHeight = 278
|
ClientHeight = 276
|
||||||
ClientWidth = 471
|
ClientWidth = 474
|
||||||
object Tree: TTreeView[0]
|
object Tree: TTreeView[0]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 244
|
Height = 242
|
||||||
Hint = 'filter configuration elements'
|
Hint = 'filter configuration elements'
|
||||||
Top = 30
|
Top = 30
|
||||||
Width = 150
|
Width = 150
|
||||||
|
@ -52,19 +53,19 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 467
|
Width = 470
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 467
|
ClientWidth = 470
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object selConf: TComboBox
|
object selConf: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
Hint = 'select a configuration'
|
Hint = 'select a configuration'
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 376
|
Width = 379
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Top = 1
|
BorderSpacing.Top = 1
|
||||||
BorderSpacing.Right = 1
|
BorderSpacing.Right = 1
|
||||||
|
@ -74,7 +75,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnAddConf: TSpeedButton
|
object btnAddConf: TSpeedButton
|
||||||
Left = 377
|
Left = 380
|
||||||
Height = 24
|
Height = 24
|
||||||
Hint = 'add an empty configuration'
|
Hint = 'add an empty configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
|
@ -120,7 +121,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnDelConf: TSpeedButton
|
object btnDelConf: TSpeedButton
|
||||||
Left = 407
|
Left = 410
|
||||||
Height = 24
|
Height = 24
|
||||||
Hint = 'remove selected configuration'
|
Hint = 'remove selected configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
|
@ -166,7 +167,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnCloneConf: TSpeedButton
|
object btnCloneConf: TSpeedButton
|
||||||
Left = 437
|
Left = 440
|
||||||
Height = 24
|
Height = 24
|
||||||
Hint = 'clone selected configuration'
|
Hint = 'clone selected configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
|
@ -214,15 +215,15 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter[2]
|
object Splitter1: TSplitter[2]
|
||||||
Left = 154
|
Left = 154
|
||||||
Height = 250
|
Height = 248
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 5
|
Width = 5
|
||||||
end
|
end
|
||||||
object Grid: TTIPropertyGrid[3]
|
object Grid: TTIPropertyGrid[3]
|
||||||
Left = 159
|
Left = 159
|
||||||
Height = 244
|
Height = 242
|
||||||
Top = 30
|
Top = 30
|
||||||
Width = 308
|
Width = 311
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -232,6 +233,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Indent = 16
|
Indent = 16
|
||||||
NameFont.Color = clWindowText
|
NameFont.Color = clWindowText
|
||||||
OnEditorFilter = GridEditorFilter
|
OnEditorFilter = GridEditorFilter
|
||||||
|
OnModified = GridModified
|
||||||
PreferredSplitterX = 145
|
PreferredSplitterX = 145
|
||||||
SplitterX = 145
|
SplitterX = 145
|
||||||
ValueFont.Color = clMaroon
|
ValueFont.Color = clMaroon
|
||||||
|
|
|
@ -26,6 +26,7 @@ type
|
||||||
procedure btnDelConfClick(Sender: TObject);
|
procedure btnDelConfClick(Sender: TObject);
|
||||||
procedure btnCloneCurrClick(Sender: TObject);
|
procedure btnCloneCurrClick(Sender: TObject);
|
||||||
procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean);
|
procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean);
|
||||||
|
procedure GridModified(Sender: TObject);
|
||||||
procedure selConfChange(Sender: TObject);
|
procedure selConfChange(Sender: TObject);
|
||||||
procedure TreeChange(Sender: TObject; Node: TTreeNode);
|
procedure TreeChange(Sender: TObject; Node: TTreeNode);
|
||||||
private
|
private
|
||||||
|
@ -94,6 +95,11 @@ begin
|
||||||
if aEditor.ClassType = TCollectionPropertyEditor then aShow := false;
|
if aEditor.ClassType = TCollectionPropertyEditor then aShow := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEProjectConfigurationWidget.GridModified(Sender: TObject);
|
||||||
|
begin
|
||||||
|
setFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject);
|
procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
nme: string;
|
nme: string;
|
||||||
|
|
|
@ -42,11 +42,11 @@ begin
|
||||||
Options2 := [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
Options2 := [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
||||||
//
|
//
|
||||||
Gutter.LineNumberPart.ShowOnlyLineNumbersMultiplesOf := 5;
|
Gutter.LineNumberPart.ShowOnlyLineNumbersMultiplesOf := 5;
|
||||||
Gutter.LineNumberPart.MarkupInfo.Foreground := clSilver;
|
Gutter.LineNumberPart.MarkupInfo.Foreground := clGray;
|
||||||
Gutter.SeparatorPart.LineOffset:=1;
|
Gutter.SeparatorPart.LineOffset:=1;
|
||||||
Gutter.SeparatorPart.LineWidth:=1;
|
Gutter.SeparatorPart.LineWidth:=1;
|
||||||
Gutter.SeparatorPart.MarkupInfo.Foreground := clSilver;
|
Gutter.SeparatorPart.MarkupInfo.Foreground := clGray;
|
||||||
Gutter.CodeFoldPart.MarkupInfo.Foreground := clSilver;
|
Gutter.CodeFoldPart.MarkupInfo.Foreground := clGray;
|
||||||
//
|
//
|
||||||
Highlighter := D2Syn;
|
Highlighter := D2Syn;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue