mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:49:22 +02:00
IDEIntf: added TLazProject.SetAlternativeCompile
git-svn-id: trunk@32605 -
This commit is contained in:
parent
f514fe58d5
commit
cf0a46e3a8
@ -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;
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user