IDEIntf: added TLazProject.SetAlternativeCompile

git-svn-id: trunk@32605 -
This commit is contained in:
mattias 2011-10-01 21:24:58 +00:00
parent f514fe58d5
commit cf0a46e3a8
4 changed files with 27 additions and 0 deletions

View File

@ -80,6 +80,8 @@ begin
AProject.LazCompilerOptions.UnitOutputDirectory:='';
AProject.LazCompilerOptions.TargetFilename:='program1';
AProject.LazCompilerOptions.Win32GraphicApp:=false;
AProject.LazCompilerOptions.SetAlternativeCompile(
'instantfpc --skip-run -B -gl "-Fu$(ProjUnitPath)" $Name($(ProjFile))',true);
// create program source
NewSource:=TStringList.Create;

View File

@ -503,6 +503,9 @@ type
function CreateDiff(CompOpts: TBaseCompilerOptions;
Tool: TCompilerDiffTool = nil): boolean; virtual;// true if differ
procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean
); override;
function MakeOptionsString(Flags: TCompilerCmdLineOptions): String;
function MakeOptionsString(const MainSourceFileName: string;
Flags: TCompilerCmdLineOptions): String; virtual;
@ -3358,6 +3361,16 @@ begin
if Result then debugln(['TBaseCompilerOptions.CreateDiff END']);
end;
procedure TBaseCompilerOptions.SetAlternativeCompile(const Command: string;
ScanFPCMsgs: boolean);
begin
CompilerPath:='';
ExecuteBefore.Command:=Command;
ExecuteBefore.ScanForFPCMessages:=ScanFPCMsgs;
ExecuteBefore.ScanForMakeMessages:=ScanFPCMsgs;
ExecuteBefore.ShowAllMessages:=false;
end;
{ TAdditionalCompilerOptions }

View File

@ -531,6 +531,8 @@ type
Tool: TCompilerDiffTool = nil): boolean; override; // true if differ
procedure InvalidateOptions;
function GetEffectiveLCLWidgetType: string; override;
procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean
); override;
public
property LazProject: TProject read FProject;
published
@ -6017,6 +6019,13 @@ begin
Result:= LCLPlatformDirNames[GetDefaultLCLWidgetType];
end;
procedure TProjectCompilerOptions.SetAlternativeCompile(const Command: string;
ScanFPCMsgs: boolean);
begin
inherited SetAlternativeCompile(Command, ScanFPCMsgs);
CompileReasons:=[];
end;
class function TProjectCompilerOptions.GetInstance: TAbstractIDEOptions;
begin
Result := Project1.CompilerOptions;

View File

@ -398,6 +398,9 @@ type
write SetCustomConfigFile;
property ConfigFilePath: String read fConfigFilePath write SetConfigFilePath;
property CustomOptions: string read GetCustomOptions write SetCustomOptions;
// execute other
procedure SetAlternativeCompile(const Command: string; ScanFPCMsgs: boolean); virtual; abstract; // disable normal compile and call this instead
end;
implementation