IDE: package editor: enable compile button: check SkipCompiler

git-svn-id: trunk@42650 -
This commit is contained in:
mattias 2013-09-06 22:50:08 +00:00
parent 79ad84f848
commit f6775ab1f6
2 changed files with 13 additions and 1 deletions

View File

@ -538,6 +538,7 @@ type
function CanBeDefaulForProject: boolean; virtual;
function NeedsLinkerOpts: boolean;
function HasCommands: boolean; // true if there is at least one commad to execute
function HasCompilerCommand: boolean; virtual;
function GetEffectiveTargetOS: string; override;
function GetEffectiveTargetCPU: string; override;
function GetEffectiveLCLWidgetType: string; override;
@ -2058,12 +2059,17 @@ function TBaseCompilerOptions.HasCommands: boolean;
begin
Result:=true;
if CreateMakefileOnBuild then exit;
if CompilerPath<>'' then exit;
if HasCompilerCommand then exit;
if ExecuteBefore.HasCommands then exit;
if ExecuteAfter.HasCommands then exit;
Result:=false;
end;
function TBaseCompilerOptions.HasCompilerCommand: boolean;
begin
Result:=CompilerPath<>'';
end;
function TBaseCompilerOptions.GetEffectiveTargetOS: string;
var
Vars: TCTCfgScriptVariables;

View File

@ -367,6 +367,7 @@ type
procedure InvalidateOptions;
function GetDefaultMainSourceFileName: string; override;
function CreateTargetFilename(const {%H-}MainSourceFileName: string): string; override;
function HasCompilerCommand: boolean; override;
procedure LoadFromXMLConfig(AXMLConfig: TXMLConfig; const Path: string); override;
procedure SaveToXMLConfig(AXMLConfig: TXMLConfig; const Path: string); override;
@ -4069,6 +4070,11 @@ begin
Result:='';
end;
function TPkgCompilerOptions.HasCompilerCommand: boolean;
begin
Result:=(not SkipCompiler) and (CompilerPath<>'');
end;
procedure TPkgCompilerOptions.Assign(Source: TPersistent);
begin
inherited Assign(Source);