renamed TPathOpts.Sources to extraSources

This commit is contained in:
Basile Burg 2014-11-30 18:14:58 +01:00
parent 9e2750ce61
commit 96422af474
3 changed files with 24 additions and 16 deletions

View File

@ -204,7 +204,7 @@ type
*) *)
TPathsOpts = class(TOptsGroup) TPathsOpts = class(TOptsGroup)
private private
fSrcs: TStringList; fExtraSrcs: TStringList;
fIncl: TStringList; fIncl: TStringList;
fImpt: TStringList; fImpt: TStringList;
fFname: string; fFname: string;
@ -218,9 +218,10 @@ type
published published
property outputFilename: string read fFname write setFname; property outputFilename: string read fFname write setFname;
property objectDirectory: string read fObjDir write setObjDir; property objectDirectory: string read fObjDir write setObjDir;
property Sources: TStringList read fSrcs write setSrcs; // not common srcs, made for static libs property Sources: TStringList read fExtraSrcs write setSrcs stored false; deprecated;// will be reloaded but saved as extraSources
property Includes: TStringList read fIncl write setIncl; property extraSources: TStringList read fExtraSrcs write setSrcs; // not common srcs, made for static libs
property Imports: TStringList read fImpt write setImpt; property includes: TStringList read fIncl write setIncl;
property imports: TStringList read fImpt write setImpt;
public public
constructor create; constructor create;
destructor destroy; override; destructor destroy; override;
@ -821,12 +822,12 @@ end;
{$REGION TPathsOpts ------------------------------------------------------------} {$REGION TPathsOpts ------------------------------------------------------------}
constructor TPathsOpts.create; constructor TPathsOpts.create;
begin begin
fSrcs := TStringList.Create; fExtraSrcs := TStringList.Create;
fIncl := TStringList.Create; fIncl := TStringList.Create;
fImpt := TStringList.Create; fImpt := TStringList.Create;
// setSrcs(), setIncl(), setImpt() are not called when reloading from // setSrcs(), setIncl(), etc are not called when reloading from
// a stream but rather the TSgringList.Assign() // a stream but rather the TSgringList.Assign()
fSrcs.OnChange:= @strLstChange; fExtraSrcs.OnChange := @strLstChange;
fIncl.OnChange := @strLstChange; fIncl.OnChange := @strLstChange;
fImpt.OnChange := @strLstChange; fImpt.OnChange := @strLstChange;
end; end;
@ -842,7 +843,7 @@ procedure TPathsOpts.getOpts(const aList: TStrings);
var var
str: string; str: string;
begin begin
for str in fSrcs do for str in fExtraSrcs do
begin begin
str := symbolExpander.get(str); str := symbolExpander.get(str);
if not listAsteriskPath(str, aList, dExtList) then if not listAsteriskPath(str, aList, dExtList) then
@ -865,7 +866,7 @@ begin
if (aValue is TPathsOpts) then if (aValue is TPathsOpts) then
begin begin
src := TPathsOpts(aValue); src := TPathsOpts(aValue);
fSrcs.Assign(src.fSrcs); fExtraSrcs.Assign(src.fExtraSrcs);
fIncl.Assign(src.fIncl); fIncl.Assign(src.fIncl);
fImpt.Assign(src.fImpt); fImpt.Assign(src.fImpt);
fFName := patchPlateformPath(src.fFname); fFName := patchPlateformPath(src.fFname);
@ -876,7 +877,7 @@ end;
destructor TPathsOpts.destroy; destructor TPathsOpts.destroy;
begin begin
fSrcs.free; fExtraSrcs.free;
fIncl.free; fIncl.free;
fImpt.free; fImpt.free;
inherited; inherited;
@ -899,8 +900,8 @@ end;
procedure TPathsOpts.setSrcs(const aValue: TStringList); procedure TPathsOpts.setSrcs(const aValue: TStringList);
begin begin
fSrcs.Assign(aValue); fExtraSrcs.Assign(aValue);
patchPlateformPaths(fSrcs); patchPlateformPaths(fExtraSrcs);
doChanged; doChanged;
end; end;

View File

@ -169,8 +169,11 @@ begin
endUpdateByEvent; endUpdateByEvent;
end; end;
procedure TCEProjectConfigurationWidget.GridFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean); procedure TCEProjectConfigurationWidget.GridFilter(Sender: TObject; aEditor: TPropertyEditor;
var aShow: boolean);
begin begin
if fProj = nil then exit;
// filter TComponent things.
if getGridTarget = fProj then if getGridTarget = fProj then
begin begin
if aEditor.GetName = 'Name' then if aEditor.GetName = 'Name' then
@ -178,6 +181,10 @@ begin
if aEditor.GetName = 'Tag' then if aEditor.GetName = 'Tag' then
aShow := false; aShow := false;
end; end;
// deprecated field
if getGridTarget = fProj.currentConfiguration.pathsOptions then
if aEditor.GetName = 'Sources' then
aShow := false;
end; end;
function TCEProjectConfigurationWidget.getGridTarget: TPersistent; function TCEProjectConfigurationWidget.getGridTarget: TPersistent;

View File

@ -338,7 +338,7 @@ begin
end; end;
fInclNode.Collapse(false); fInclNode.Collapse(false);
// display extra sources (external .lib, *.a, *.d) // display extra sources (external .lib, *.a, *.d)
for src in FProject.currentConfiguration.pathsOptions.Sources do for src in FProject.currentConfiguration.pathsOptions.extraSources do
begin begin
if src = '' then if src = '' then
continue; continue;