added additional search PATHs in the options, close #19

This commit is contained in:
Basile Burg 2016-02-29 12:40:44 +01:00
parent 7451c0e052
commit 4fc39a931e
2 changed files with 39 additions and 2 deletions

View File

@ -260,9 +260,16 @@ type
*)
procedure deleteDups(str: TStrings);
var
// supplementatl directories to find background tools
additionalPath: string;
implementation
uses
ce_main;
procedure TCEPersistentShortcut.assign(aValue: TPersistent);
var
src: TCEPersistentShortcut;
@ -790,6 +797,8 @@ begin
// maybe in current dir
if anExeName.fileExists then
env += PathSeparator + GetCurrentDir;
if additionalPath.isNotEmpty then
env += PathSeparator + additionalPath;
{$IFNDEF CEBUILD}
if Application <> nil then
env += PathSeparator + ExtractFileDir(application.ExeName.ExtractFilePath);

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, LazFileUtils, SynEditKeyCmds, SynHighlighterLFM, Forms, StdCtrls,
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, Controls, Graphics, strutils,
Dialogs, Menus, ActnList, ExtCtrls, process, XMLPropStorage, SynExportHTML,
ce_common, ce_dmdwrap, ce_nativeproject, ce_dcd, ce_synmemo, ce_writableComponent,
ce_common, ce_dmdwrap, ce_nativeproject, ce_synmemo, ce_writableComponent,
ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_projconf,
ce_search, ce_miniexplorer, ce_libman, ce_libmaneditor, ce_todolist, ce_observer,
ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru, ce_processes,
@ -384,11 +384,14 @@ type
fMaxRecentProjs: integer;
fMaxRecentDocs: integer;
fDcdPort: word;
function getAdditionalPATH: string;
procedure setAdditionalPATH(const value: string);
function getDubCompiler: TCECompiler;
function getNativeProjecCompiler: TCECompiler;
procedure setDubCompiler(value: TCECompiler);
procedure setNativeProjecCompiler(value: TCECompiler);
published
property additionalPATH: string read getAdditionalPATH write setAdditionalPath;
property coverModuleTests: boolean read fCovModUt write fCovModUt;
property floatingWidgetOnTop: boolean read fFloatingWidgetOnTop write fFloatingWidgetOnTop;
property reloadLastDocuments: boolean read fReloadLastDocuments write fReloadLastDocuments;
@ -424,7 +427,7 @@ implementation
{$R *.lfm}
uses
SynMacroRecorder, ce_symstring;
SynMacroRecorder, ce_symstring, ce_dcd;
{$REGION TCEApplicationOptions ------------------------------------------------------}
constructor TCEApplicationOptions.Create(AOwner: TComponent);
@ -461,6 +464,31 @@ begin
ce_nativeproject.setNativeProjectCompiler(value);
end;
function TCEApplicationOptionsBase.getAdditionalPATH: string;
begin
exit(ce_common.additionalPath);
end;
procedure TCEApplicationOptionsBase.setAdditionalPath(const value: string);
var
str: TStringList;
cat: string;
i: integer;
begin
str := TStringList.Create;
try
str.Delimiter:= PathSeparator;
str.DelimitedText:= value;
for i := str.Count-1 downto 0 do
if not str[i].dirExists then
str.Delete(i);
cat := str.DelimitedText;
ce_common.additionalPath := cat;
finally
str.Free;
end;
end;
destructor TCEApplicationOptions.Destroy;
begin
EntitiesConnector.removeObserver(self);