mirror of https://gitlab.com/basile.b/dexed.git
disabled gdc in CE proj compiler selection
This commit is contained in:
parent
fc24add7e3
commit
f5cfb89d5e
|
@ -1,24 +0,0 @@
|
||||||
object CurrentProject: TCENativeProject
|
|
||||||
OptionsCollection = <
|
|
||||||
item
|
|
||||||
name = 'default'
|
|
||||||
outputOptions.boundsCheck = onAlways
|
|
||||||
pathsOptions.outputFilename = '../bin/cegdcldc'
|
|
||||||
runOptions.options = [poUsePipes, poStderrToOutPut]
|
|
||||||
runOptions.parameters.Strings = (
|
|
||||||
'-main'
|
|
||||||
'-gdc'
|
|
||||||
)
|
|
||||||
end
|
|
||||||
item
|
|
||||||
name = 'release'
|
|
||||||
outputOptions.inlining = True
|
|
||||||
outputOptions.boundsCheck = offAlways
|
|
||||||
outputOptions.optimizations = True
|
|
||||||
outputOptions.release = True
|
|
||||||
end>
|
|
||||||
Sources.Strings = (
|
|
||||||
'main.d'
|
|
||||||
)
|
|
||||||
ConfigurationIndex = 0
|
|
||||||
end
|
|
|
@ -1,72 +0,0 @@
|
||||||
module cegdcldc;
|
|
||||||
|
|
||||||
import
|
|
||||||
core.thread, std.stdio, std.process, std.file;
|
|
||||||
|
|
||||||
void convertToGdc(string option, ref string[] options)
|
|
||||||
{
|
|
||||||
// files
|
|
||||||
if (option.exists)
|
|
||||||
options ~= option;
|
|
||||||
// switches
|
|
||||||
else switch(option)
|
|
||||||
{
|
|
||||||
default: break;
|
|
||||||
case "w": break;
|
|
||||||
case "wi": break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void convertToLdc2(string option, ref string[] options)
|
|
||||||
{
|
|
||||||
// files
|
|
||||||
if (option.exists)
|
|
||||||
options ~= option;
|
|
||||||
// switches
|
|
||||||
switch(option)
|
|
||||||
{
|
|
||||||
default: break;
|
|
||||||
case "w": break;
|
|
||||||
case "wi": break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(string[] args)
|
|
||||||
{
|
|
||||||
string[] commandLine = [readln];
|
|
||||||
|
|
||||||
if (args.length == 1)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (commandLine[0] != "gdc" && commandLine[0] != "ldc2")
|
|
||||||
return 2;
|
|
||||||
|
|
||||||
switch(commandLine[0])
|
|
||||||
{
|
|
||||||
case "gdc":
|
|
||||||
foreach(option; args[1..$])
|
|
||||||
convertToGdc(option, commandLine);
|
|
||||||
break;
|
|
||||||
case "ldc2":
|
|
||||||
foreach(option; args[1..$])
|
|
||||||
convertToLdc2(option, commandLine);
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProcessPipes ppid = pipeProcess(commandLine);
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
Thread.sleep(dur!"msecs"(250));
|
|
||||||
auto result = tryWait(ppid.pid);
|
|
||||||
|
|
||||||
foreach(line; ppid.stdout.byLine)
|
|
||||||
stdout.writeln(line);
|
|
||||||
foreach(line; ppid.stderr.byLine)
|
|
||||||
stderr.writeln(line);
|
|
||||||
|
|
||||||
if (result.terminated)
|
|
||||||
return result.status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
Coedit Gdc - Ldc
|
|
||||||
================
|
|
||||||
|
|
||||||
This small program converts the options of a Coedit project (aka _native project_) to [LDC]() or [GDC]() options.
|
|
|
@ -165,7 +165,7 @@ begin
|
||||||
fTxtSyn.Assign(TxtSyn);
|
fTxtSyn.Assign(TxtSyn);
|
||||||
//
|
//
|
||||||
fDDocDelay:=200;
|
fDDocDelay:=200;
|
||||||
fAutoDotDelay:=200;
|
fAutoDotDelay:=20;
|
||||||
fCurrLineAttribs := TSynSelectedColor.Create;
|
fCurrLineAttribs := TSynSelectedColor.Create;
|
||||||
fSelAttribs := TSynSelectedColor.Create;
|
fSelAttribs := TSynSelectedColor.Create;
|
||||||
fFoldedColor := TSynSelectedColor.Create;
|
fFoldedColor := TSynSelectedColor.Create;
|
||||||
|
|
|
@ -5,7 +5,8 @@ unit ce_inspectors;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Dialogs, PropEdits, ce_common;
|
Classes, SysUtils, Dialogs, PropEdits, GraphPropEdits, Graphics, typinfo,
|
||||||
|
LCLType, ce_common;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -38,8 +39,144 @@ type
|
||||||
procedure Edit; override;
|
procedure Edit; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
TListDrawValueProc = procedure(const CurValue: ansistring; Index: integer;
|
||||||
|
ACanvas: TCanvas; const ARect:TRect; AState: TPropEditDrawState) of object;
|
||||||
|
|
||||||
|
TCEColorEditor = class(TColorPropertyEditor)
|
||||||
|
procedure ListDrawValue(const CurValue: ansistring; Index: integer;
|
||||||
|
ACanvas: TCanvas; const ARect:TRect; AState: TPropEditDrawState); override;
|
||||||
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
procedure TCEColorEditor.ListDrawValue(const CurValue: ansistring; Index: integer;
|
||||||
|
ACanvas: TCanvas; const ARect:TRect; AState: TPropEditDrawState);
|
||||||
|
|
||||||
|
function ColorToBorderColor(AColor: TColorRef): TColor;
|
||||||
|
type
|
||||||
|
TColorQuad = record
|
||||||
|
Red,
|
||||||
|
Green,
|
||||||
|
Blue,
|
||||||
|
Alpha: Byte;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
if (TColorQuad(AColor).Red > 192) or
|
||||||
|
(TColorQuad(AColor).Green > 192) or
|
||||||
|
(TColorQuad(AColor).Blue > 192) then
|
||||||
|
Result := clBlack
|
||||||
|
else
|
||||||
|
if pedsInEdit in AState then
|
||||||
|
begin
|
||||||
|
if pedsSelected in AState then
|
||||||
|
Result := clWindow
|
||||||
|
else
|
||||||
|
Result := TColor(AColor);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if pedsSelected in AState then
|
||||||
|
Result := clHighlight
|
||||||
|
else
|
||||||
|
Result := clWindow;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
vRight, vBottom: Integer;
|
||||||
|
vOldPenColor, vOldBrushColor: TColor;
|
||||||
|
vOldPenStyle: TPenStyle;
|
||||||
|
noFill: Boolean;
|
||||||
|
proc: TListDrawValueProc;
|
||||||
|
Style : TTextStyle;
|
||||||
|
OldColor : TColor;
|
||||||
|
rc: TRect;
|
||||||
|
begin
|
||||||
|
vRight := (ARect.Bottom - ARect.Top) + ARect.Left - 2;
|
||||||
|
vBottom:=ARect.Bottom-2;
|
||||||
|
with ACanvas do
|
||||||
|
begin
|
||||||
|
// save off things
|
||||||
|
vOldPenStyle := Pen.Style;
|
||||||
|
vOldPenColor := Pen.Color;
|
||||||
|
vOldBrushColor := Brush.Color;
|
||||||
|
|
||||||
|
// frame things
|
||||||
|
if pedsInEdit in AState then
|
||||||
|
begin
|
||||||
|
if pedsSelected in AState then
|
||||||
|
Brush.Color := clWindow
|
||||||
|
else
|
||||||
|
Brush.Color := ACanvas.Brush.Color;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if pedsSelected in AState then
|
||||||
|
Brush.Color := clHighlightText
|
||||||
|
else
|
||||||
|
Brush.Color := clWindow;
|
||||||
|
end;
|
||||||
|
Pen.Color := Brush.Color;
|
||||||
|
Pen.Style := psSolid;
|
||||||
|
FillRect(ARect);
|
||||||
|
Rectangle(ARect.Left, ARect.Top, vRight, vBottom);
|
||||||
|
|
||||||
|
// set things up and do the work
|
||||||
|
noFill := CurValue = 'clNone';
|
||||||
|
if noFill then
|
||||||
|
Brush.Color := clWindow
|
||||||
|
else
|
||||||
|
Brush.Color := StringToColorDef(CurValue,clNone);
|
||||||
|
Pen.Color := ColorToBorderColor(ColorToRGB(Brush.Color));
|
||||||
|
Rectangle(ARect.Left + 1, ARect.Top + 1, vRight - 1, vBottom - 1);
|
||||||
|
if noFill then
|
||||||
|
begin
|
||||||
|
Line(ARect.Left + 1, ARect.Top + 1, vRight - 2, vBottom - 2);
|
||||||
|
Line(ARect.Left + 1, vBottom - 2, vRight - 2, ARect.Top + 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
// restore the things we twiddled with
|
||||||
|
Brush.Color := vOldBrushColor;
|
||||||
|
Pen.Color := vOldPenColor;
|
||||||
|
Pen.Style := vOldPenStyle;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//TMethod(proc).Code:= @TPropertyEditor.ListDrawValue;
|
||||||
|
//TMethod(proc).Data:= self;
|
||||||
|
//proc(CurValue, Index, ACanvas, Rect(vRight, ARect.Top, ARect.Right, ARect.Bottom),AState);
|
||||||
|
|
||||||
|
rc := Rect(vRight, ARect.Top, ARect.Right, ARect.Bottom);
|
||||||
|
|
||||||
|
FillChar(Style{%H-},SizeOf(Style),0);
|
||||||
|
With Style do begin
|
||||||
|
Alignment := taLeftJustify;
|
||||||
|
Layout := tlCenter;
|
||||||
|
Opaque := false;
|
||||||
|
Clipping := True;
|
||||||
|
ShowPrefix := True;
|
||||||
|
WordBreak := False;
|
||||||
|
SingleLine := True;
|
||||||
|
SystemFont := true;
|
||||||
|
end;
|
||||||
|
If (pedsInComboList in AState) and not (pedsInEdit in AState)
|
||||||
|
then begin
|
||||||
|
OldColor := ACanvas.Brush.Color;
|
||||||
|
If pedsSelected in AState then begin
|
||||||
|
ACanvas.Brush.Color := clHighlight;
|
||||||
|
ACanvas.Font.Color := clHighlightText;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
ACanvas.Brush.Color := clwhite{clWindow};
|
||||||
|
ACanvas.Font.Color := clWindowText;
|
||||||
|
end;
|
||||||
|
ACanvas.FillRect(rc);
|
||||||
|
ACanvas.Brush.Color := OldColor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ACanvas.TextRect(rc, rc.Left+2, rc.Top, CurValue, Style);
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
function TCECustomPathEditor.GetAttributes: TPropertyAttributes;
|
function TCECustomPathEditor.GetAttributes: TPropertyAttributes;
|
||||||
begin
|
begin
|
||||||
exit( inherited GetAttributes() + [paDialog]);
|
exit( inherited GetAttributes() + [paDialog]);
|
||||||
|
@ -106,5 +243,6 @@ initialization
|
||||||
RegisterPropertyEditor(TypeInfo(TCEPathname), nil, '', TCEPathnameEditor);
|
RegisterPropertyEditor(TypeInfo(TCEPathname), nil, '', TCEPathnameEditor);
|
||||||
RegisterPropertyEditor(TypeInfo(TCEFilename), nil, '', TCEfilenameEditor);
|
RegisterPropertyEditor(TypeInfo(TCEFilename), nil, '', TCEfilenameEditor);
|
||||||
RegisterPropertyEditor(TypeInfo(TCEEditEvent), nil, '', TCEActionInEditor);
|
RegisterPropertyEditor(TypeInfo(TCEEditEvent), nil, '', TCEActionInEditor);
|
||||||
|
//RegisterPropertyEditor(TypeInfo(TColor), nil, '', TCEColorEditor);
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -367,6 +367,7 @@ type
|
||||||
|
|
||||||
TCEApplicationOptionsBase = class(TWritableLfmTextComponent)
|
TCEApplicationOptionsBase = class(TWritableLfmTextComponent)
|
||||||
private
|
private
|
||||||
|
fNoGdcWarn: boolean;
|
||||||
fFloatingWidgetOnTop: boolean;
|
fFloatingWidgetOnTop: boolean;
|
||||||
fReloadLastDocuments: boolean;
|
fReloadLastDocuments: boolean;
|
||||||
fMaxRecentProjs: integer;
|
fMaxRecentProjs: integer;
|
||||||
|
@ -434,6 +435,13 @@ end;
|
||||||
|
|
||||||
procedure TCEApplicationOptionsBase.setNativeProjecCompiler(value: TCECompiler);
|
procedure TCEApplicationOptionsBase.setNativeProjecCompiler(value: TCECompiler);
|
||||||
begin
|
begin
|
||||||
|
if value = gdc then
|
||||||
|
begin
|
||||||
|
value := dmd;
|
||||||
|
if not fNoGdcWarn then
|
||||||
|
dlgOkInfo('Coedit native projects can not be compiled with GDC');
|
||||||
|
fNoGdcWarn := true;
|
||||||
|
end;
|
||||||
ce_nativeproject.setNativeProjectCompiler(value);
|
ce_nativeproject.setNativeProjectCompiler(value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -427,9 +427,6 @@ end;
|
||||||
|
|
||||||
{$REGION Standard Obj and Comp -------------------------------------------------}
|
{$REGION Standard Obj and Comp -------------------------------------------------}
|
||||||
constructor TCESynMemo.Create(aOwner: TComponent);
|
constructor TCESynMemo.Create(aOwner: TComponent);
|
||||||
var
|
|
||||||
i: integer;
|
|
||||||
mgr: TSynEditMarkupManager;
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
//
|
//
|
||||||
|
|
|
@ -284,6 +284,8 @@ Here are some more or less complex examples which illustrates the project format
|
||||||
- the [metad][lnk_metad] meta repository.
|
- the [metad][lnk_metad] meta repository.
|
||||||
- the tools written for Coedit: [cesyms][lnk_cesyms] and [cetodo][lnk_cetodo].
|
- the tools written for Coedit: [cesyms][lnk_cesyms] and [cetodo][lnk_cetodo].
|
||||||
|
|
||||||
|
Even if designed upon _DMD_ options, it's also possible to compile a CE project using [LDC][https://github.com/ldc-developers/ldc]. To do so, the application option _Native project compiler_ must be set accordingly.
|
||||||
|
|
||||||
# DUB projects.
|
# DUB projects.
|
||||||
|
|
||||||
Since the version 2 alpha 1, Coedit also handles DUB projects (JSON descriptions only).
|
Since the version 2 alpha 1, Coedit also handles DUB projects (JSON descriptions only).
|
||||||
|
@ -468,16 +470,19 @@ The _find and replace_ widget allows to find and replace text patterns in the fo
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- top field: the expression to find. Note that it can be a regular expression.
|
- top field: the pattern to find.
|
||||||
- second field: the expression used as replacement. Only active when **"replace with"** is checked.
|
- second field: the expression used as replacement. Only active when **"replace with"** is checked.
|
||||||
- whole word: only search for the whole expression.
|
- whole word: only search for the whole expression.
|
||||||
- backward: search from the bottom to the top.
|
- backward: search from the bottom to the top.
|
||||||
- from cursor: when unchecked, the operation always starts from the top of the document.
|
- from cursor: when unchecked, the operation always starts from the top of the document.
|
||||||
- case sensitive: when unchecked, character case is ignored.
|
- case sensitive: when unchecked, character case is ignored.
|
||||||
- prompt: a confirmation is required to replace an expression.
|
- prompt: a confirmation is required to replace an expression.
|
||||||
|
- allow regex: when checked, the search is performed by a regex engine.
|
||||||
|
|
||||||
By default <kbd>CTRL</kbd> + <kbd>F</kbd> is used to pass the current source code editor selection to the top field
|
By default <kbd>CTRL</kbd> + <kbd>F</kbd> is used to pass the current source code editor selection to the top field
|
||||||
and <kbd>F3</kbd> to execute a search.
|
and <kbd>F3</kbd> to execute a search. Unless _Find all_ is used, the results are directly visible in the editor.
|
||||||
|
_Find all_ results are displayed in the [messages widget][lnk_widg_msg] and are clickable.
|
||||||
|
|
||||||
The most recent searches and replacements are saved between each session.
|
The most recent searches and replacements are saved between each session.
|
||||||
|
|
||||||
Note that to find a symbol, <kbd>Ctrl</kbd>+<kbd>MB Right</kbd> or the [symbol list][lnk_widg_symlist] are faster.
|
Note that to find a symbol, <kbd>Ctrl</kbd>+<kbd>MB Right</kbd> or the [symbol list][lnk_widg_symlist] are faster.
|
||||||
|
@ -700,7 +705,8 @@ The DUB project editor is widget is divided in two panels:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The first panel displays the sources list and the combination of _each build type_ with each _build configuration_. Sources can be opened in a new editor by double cliking. To select a configuration defines which type and which configuration will be build by DUB when clicking _compile_ in the _project_ menu.
|
The first panel displays the sources list and the combination of _each build type_ with each _build configuration_. Sources can be opened in a new editor by double clicking. To select a configuration defines which type and which configuration will be build by DUB when clicking _compile_ in the _project_ menu.
|
||||||
|
Note that it's possible to specify which compiler DUB uses in the application options _dubCompiler_.
|
||||||
|
|
||||||
### Editor
|
### Editor
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue