IDE: allow running a library when a host application is defined in run parameters.

git-svn-id: trunk@28347 -
This commit is contained in:
juha 2010-11-19 13:23:32 +00:00
parent f4f719b5eb
commit c89970ffba
2 changed files with 8 additions and 5 deletions

View File

@ -2190,9 +2190,11 @@ begin
// For 'run' and 'step' bypass 'idle', so we can set the filename later
CanRun:=false;
if Project1<>nil then
CanRun:=((AnUnitInfo<>nil) and (AnUnitInfo.RunFileIfActive)) or
((Project1.CompilerOptions.ExecutableType=cetProgram)
and (pfRunnable in Project1.Flags));
CanRun:=( (AnUnitInfo<>nil) and (AnUnitInfo.RunFileIfActive) ) or
( ((Project1.CompilerOptions.ExecutableType=cetProgram) or
(Project1.RunParameterOptions.HostApplicationFilename<>''))
and (pfRunnable in Project1.Flags)
);
RunSpeedButton.Enabled := CanRun and (DebuggerInvalid
or (dcRun in FDebugger.Commands) or (FDebugger.State = dsIdle));
itmRunMenuRun.Enabled := RunSpeedButton.Enabled;

View File

@ -11097,8 +11097,9 @@ begin
// Check if we can run this project
debugln('TMainIDE.DoInitProjectRun A ',dbgs(pfRunnable in Project1.Flags),' ',dbgs(Project1.MainUnitID));
if not ((Project1.CompilerOptions.ExecutableType=cetProgram) and
(pfRunnable in Project1.Flags) and (Project1.MainUnitID >= 0)) then Exit;
if not ( ((Project1.CompilerOptions.ExecutableType=cetProgram) or
(Project1.RunParameterOptions.HostApplicationFilename<>''))
and (pfRunnable in Project1.Flags) and (Project1.MainUnitID >= 0) ) then Exit;
debugln('TMainIDE.DoInitProjectRun B');
// Build project first