diff --git a/components/ideintf/compoptsintf.pas b/components/ideintf/compoptsintf.pas index e8161dd7d1..05dfa894f9 100644 --- a/components/ideintf/compoptsintf.pas +++ b/components/ideintf/compoptsintf.pas @@ -288,6 +288,8 @@ type function GetSrcPath: string; virtual; abstract; function GetUnitOutputDir: string; virtual; abstract; function GetUnitPaths: String; virtual; abstract; + function GetExecuteBeforeCommand: string; virtual; abstract; + function GetExecuteAfterCommand: string; virtual; abstract; procedure SetCompilerPath(const AValue: String); virtual; abstract; procedure SetConditionals(AValue: string); virtual; abstract; procedure SetCustomOptions(const AValue: string); virtual; abstract; @@ -306,6 +308,8 @@ type procedure SetTargetProc(const AValue: string); virtual; abstract; procedure SetUnitOutputDir(const AValue: string); virtual; abstract; procedure SetUnitPaths(const AValue: String); virtual; abstract; + procedure SetExecuteBeforeCommand(const ACommand: string); virtual; abstract; + procedure SetExecuteAfterCommand(const ACommand: string); virtual; abstract; public constructor Create(const TheOwner: TObject); virtual; destructor Destroy; override; @@ -448,9 +452,10 @@ type property CustomOptions: string read GetCustomOptions write SetCustomOptions; property UseCommentsInCustomOptions: Boolean read fUseCommentsInCustomOptions write SetUseCommentsInCustomOptions; - // execute property CompilerPath: String read GetCompilerPath write SetCompilerPath; + property ExecuteBeforeCommand: String read GetExecuteBeforeCommand write SetExecuteBeforeCommand; + property ExecuteAfterCommand: String read GetExecuteAfterCommand write SetExecuteAfterCommand; procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean); virtual; abstract; // disable normal compile and call this instead end; diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index 2591924752..bfb5549eab 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -453,6 +453,8 @@ type function GetSrcPath: string; override; function GetUnitOutputDir: string; override; function GetUnitPaths: String; override; + function GetExecuteBeforeCommand: string; override; + function GetExecuteAfterCommand: string; override; procedure SetBaseDirectory(AValue: string); procedure SetCompilerPath(const AValue: String); override; procedure SetConditionals(AValue: string); override; @@ -471,6 +473,8 @@ type procedure SetTargetOS(const AValue: string); override; procedure SetTargetFileExt(const AValue: String); override; procedure SetTargetFilename(const AValue: String); override; + procedure SetExecuteBeforeCommand(const ACommand: string); override; + procedure SetExecuteAfterCommand(const ACommand: string); override; protected function GetModified: boolean; override; procedure SetModified(const AValue: boolean); override; @@ -3703,6 +3707,28 @@ begin ExecuteBefore.Parsers.Clear; end; +function TBaseCompilerOptions.GetExecuteBeforeCommand: string; +begin + Result := ExecuteBefore.Command; +end; + +function TBaseCompilerOptions.GetExecuteAfterCommand: string; +begin + Result := ExecuteAfter.Command; +end; + +procedure TBaseCompilerOptions.SetExecuteBeforeCommand(const ACommand: string); +begin + ExecuteBefore.Command := ACommand; + IncreaseChangeStamp; +end; + +procedure TBaseCompilerOptions.SetExecuteAfterCommand(const ACommand: string); +begin + ExecuteAfter.Command := ACommand; + IncreaseChangeStamp; +end; + { TAdditionalCompilerOptions }