mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 23:12:39 +02:00
IDEIntf: added TLazProject.RunParameters
git-svn-id: trunk@32606 -
This commit is contained in:
parent
cf0a46e3a8
commit
4cec37047a
@ -82,6 +82,7 @@ begin
|
|||||||
AProject.LazCompilerOptions.Win32GraphicApp:=false;
|
AProject.LazCompilerOptions.Win32GraphicApp:=false;
|
||||||
AProject.LazCompilerOptions.SetAlternativeCompile(
|
AProject.LazCompilerOptions.SetAlternativeCompile(
|
||||||
'instantfpc --skip-run -B -gl "-Fu$(ProjUnitPath)" $Name($(ProjFile))',true);
|
'instantfpc --skip-run -B -gl "-Fu$(ProjUnitPath)" $Name($(ProjFile))',true);
|
||||||
|
AProject.RunParameters.HostApplicationFilename:='$(InstantFPCCache)/$NameOnly($(ProjFile))';
|
||||||
|
|
||||||
// create program source
|
// create program source
|
||||||
NewSource:=TStringList.Create;
|
NewSource:=TStringList.Create;
|
||||||
|
@ -787,7 +787,6 @@ type
|
|||||||
fProjectInfoFileDate: LongInt;
|
fProjectInfoFileDate: LongInt;
|
||||||
FPublishOptions: TPublishProjectOptions;
|
FPublishOptions: TPublishProjectOptions;
|
||||||
FRevertLockCount: integer;
|
FRevertLockCount: integer;
|
||||||
FRunParameterOptions: TRunParamsOptions;
|
|
||||||
FSessionModifiedBackup: boolean;
|
FSessionModifiedBackup: boolean;
|
||||||
FSessionStorePathDelim: TPathDelimSwitch;
|
FSessionStorePathDelim: TPathDelimSwitch;
|
||||||
FSkipCheckLCLInterfaces: boolean;
|
FSkipCheckLCLInterfaces: boolean;
|
||||||
@ -806,6 +805,7 @@ type
|
|||||||
function GetMainFilename: String;
|
function GetMainFilename: String;
|
||||||
function GetMainUnitInfo: TUnitInfo;
|
function GetMainUnitInfo: TUnitInfo;
|
||||||
function GetProjResources: TProjectResources;
|
function GetProjResources: TProjectResources;
|
||||||
|
function GetRunParameterOptions: TRunParamsOptions;
|
||||||
function GetTargetFilename: string;
|
function GetTargetFilename: string;
|
||||||
function GetUnits(Index: integer): TUnitInfo;
|
function GetUnits(Index: integer): TUnitInfo;
|
||||||
function JumpHistoryCheckPosition(
|
function JumpHistoryCheckPosition(
|
||||||
@ -1095,7 +1095,7 @@ type
|
|||||||
read FPublishOptions write FPublishOptions;
|
read FPublishOptions write FPublishOptions;
|
||||||
property ProjResources: TProjectResources read GetProjResources;
|
property ProjResources: TProjectResources read GetProjResources;
|
||||||
|
|
||||||
property RunParameterOptions: TRunParamsOptions read FRunParameterOptions;
|
property RunParameterOptions: TRunParamsOptions read GetRunParameterOptions;
|
||||||
property SourceDirectories: TFileReferenceList read FSourceDirectories;
|
property SourceDirectories: TFileReferenceList read FSourceDirectories;
|
||||||
property StateFileDate: longint read FStateFileDate write FStateFileDate;
|
property StateFileDate: longint read FStateFileDate write FStateFileDate;
|
||||||
property StateFlags: TLazProjectStateFlags read FStateFlags write FStateFlags;
|
property StateFlags: TLazProjectStateFlags read FStateFlags write FStateFlags;
|
||||||
@ -2575,7 +2575,7 @@ begin
|
|||||||
FSourceDirectories.OnChanged:=@SourceDirectoriesChanged;
|
FSourceDirectories.OnChanged:=@SourceDirectoriesChanged;
|
||||||
UpdateProjectDirectory;
|
UpdateProjectDirectory;
|
||||||
FPublishOptions:=TPublishProjectOptions.Create(Self);
|
FPublishOptions:=TPublishProjectOptions.Create(Self);
|
||||||
FRunParameterOptions:=TRunParamsOptions.Create;
|
FRunParameters:=TRunParamsOptions.Create;
|
||||||
Title := '';
|
Title := '';
|
||||||
FUnitList := TFPList.Create; // list of TUnitInfo
|
FUnitList := TFPList.Create; // list of TUnitInfo
|
||||||
|
|
||||||
@ -2603,7 +2603,7 @@ begin
|
|||||||
FreeThenNil(FJumpHistory);
|
FreeThenNil(FJumpHistory);
|
||||||
FreeThenNil(FSourceDirectories);
|
FreeThenNil(FSourceDirectories);
|
||||||
FreeThenNil(FPublishOptions);
|
FreeThenNil(FPublishOptions);
|
||||||
FreeThenNil(FRunParameterOptions);
|
FreeThenNil(FRunParameters);
|
||||||
FreeThenNil(FDefineTemplates);
|
FreeThenNil(FDefineTemplates);
|
||||||
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
@ -3699,7 +3699,7 @@ begin
|
|||||||
for i:=0 to UnitCount-1 do Units[i].Free;
|
for i:=0 to UnitCount-1 do Units[i].Free;
|
||||||
FUnitList.Clear;
|
FUnitList.Clear;
|
||||||
|
|
||||||
FRunParameterOptions.Clear;
|
RunParameters.Clear;
|
||||||
|
|
||||||
FActiveWindowIndexAtStart := -1;
|
FActiveWindowIndexAtStart := -1;
|
||||||
FSkipCheckLCLInterfaces:=false;
|
FSkipCheckLCLInterfaces:=false;
|
||||||
@ -4293,6 +4293,11 @@ begin
|
|||||||
Result:=TProjectResources(Resources);
|
Result:=TProjectResources(Resources);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TProject.GetRunParameterOptions: TRunParamsOptions;
|
||||||
|
begin
|
||||||
|
Result:=TRunParamsOptions(FRunParameters);
|
||||||
|
end;
|
||||||
|
|
||||||
function TProject.GetProjectInfoFile:string;
|
function TProject.GetProjectInfoFile:string;
|
||||||
begin
|
begin
|
||||||
Result:=fProjectInfoFile;
|
Result:=fProjectInfoFile;
|
||||||
|
@ -49,7 +49,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, LCLProc, Controls, Forms, Buttons, StdCtrls, ComCtrls,
|
Classes, SysUtils, LCLProc, Controls, Forms, Buttons, StdCtrls, ComCtrls,
|
||||||
Dialogs, ExtCtrls, Laz_XMLCfg,
|
Dialogs, ExtCtrls, Laz_XMLCfg,
|
||||||
BaseIDEIntf, IDEContextHelpEdit, IDEHelpIntf,
|
BaseIDEIntf, IDEContextHelpEdit, IDEHelpIntf, ProjectIntf,
|
||||||
IDEProcs, SysVarUserOverrideDlg, InputHistory, LazarusIDEStrConsts, FileUtil,
|
IDEProcs, SysVarUserOverrideDlg, InputHistory, LazarusIDEStrConsts, FileUtil,
|
||||||
ButtonPanel;
|
ButtonPanel;
|
||||||
|
|
||||||
@ -67,46 +67,16 @@ type
|
|||||||
|
|
||||||
{ TRunParamsOptions }
|
{ TRunParamsOptions }
|
||||||
|
|
||||||
TRunParamsOptions = class
|
TRunParamsOptions = class(TAbstractRunParamsOptions)
|
||||||
private
|
|
||||||
// local options
|
|
||||||
fHostApplicationFilename: string;
|
|
||||||
fCmdLineParams: string;
|
|
||||||
fUseDisplay: boolean;
|
|
||||||
fUseLaunchingApplication: boolean;
|
|
||||||
fLaunchingApplicationPathPlusParams: string;
|
|
||||||
fWorkingDirectory: string;
|
|
||||||
fDisplay: string;
|
|
||||||
|
|
||||||
// environment options
|
|
||||||
fUserOverrides: TStringList;
|
|
||||||
fIncludeSystemVariables: boolean;
|
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Clear;
|
procedure Clear; override;
|
||||||
function Load(XMLConfig: TXMLConfig; const Path: string;
|
function Load(XMLConfig: TXMLConfig; const Path: string;
|
||||||
AdjustPathDelims: boolean): TModalResult;
|
AdjustPathDelims: boolean): TModalResult;
|
||||||
function Save(XMLConfig: TXMLConfig; const Path: string;
|
function Save(XMLConfig: TXMLConfig; const Path: string;
|
||||||
UsePathDelim: TPathDelimSwitch): TModalResult;
|
UsePathDelim: TPathDelimSwitch): TModalResult;
|
||||||
procedure AssignEnvironmentTo(Strings: TStrings);
|
procedure AssignEnvironmentTo(Strings: TStrings); override;
|
||||||
|
|
||||||
// local options
|
|
||||||
property HostApplicationFilename: string
|
|
||||||
Read fHostApplicationFilename Write fHostApplicationFilename;
|
|
||||||
property CmdLineParams: string Read fCmdLineParams Write fCmdLineParams;
|
|
||||||
property UseLaunchingApplication: boolean
|
|
||||||
Read fUseLaunchingApplication Write fUseLaunchingApplication;
|
|
||||||
property LaunchingApplicationPathPlusParams: string
|
|
||||||
Read fLaunchingApplicationPathPlusParams Write fLaunchingApplicationPathPlusParams;
|
|
||||||
property WorkingDirectory: string Read fWorkingDirectory Write fWorkingDirectory;
|
|
||||||
property UseDisplay: boolean Read fUseDisplay Write FUseDisplay;
|
|
||||||
property Display: string Read fDisplay Write fDisplay;
|
|
||||||
|
|
||||||
// environment options
|
|
||||||
property UserOverrides: TStringList Read fUserOverrides;
|
|
||||||
property IncludeSystemVariables: boolean
|
|
||||||
Read fIncludeSystemVariables Write fIncludeSystemVariables;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -316,6 +316,42 @@ type
|
|||||||
property Descriptor: TProjectDescriptor read FDescriptor write FDescriptor;
|
property Descriptor: TProjectDescriptor read FDescriptor write FDescriptor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TAbstractRunParamsOptions = class
|
||||||
|
protected
|
||||||
|
// local options
|
||||||
|
fHostApplicationFilename: string;
|
||||||
|
fCmdLineParams: string;
|
||||||
|
fUseDisplay: boolean;
|
||||||
|
fUseLaunchingApplication: boolean;
|
||||||
|
fLaunchingApplicationPathPlusParams: string;
|
||||||
|
fWorkingDirectory: string;
|
||||||
|
fDisplay: string;
|
||||||
|
|
||||||
|
// environment options
|
||||||
|
fUserOverrides: TStringList;
|
||||||
|
fIncludeSystemVariables: boolean;
|
||||||
|
public
|
||||||
|
procedure Clear; virtual; abstract;
|
||||||
|
procedure AssignEnvironmentTo(Strings: TStrings); virtual; abstract;
|
||||||
|
|
||||||
|
// local options
|
||||||
|
property HostApplicationFilename: string
|
||||||
|
Read fHostApplicationFilename Write fHostApplicationFilename;
|
||||||
|
property CmdLineParams: string Read fCmdLineParams Write fCmdLineParams;
|
||||||
|
property UseLaunchingApplication: boolean
|
||||||
|
Read fUseLaunchingApplication Write fUseLaunchingApplication;
|
||||||
|
property LaunchingApplicationPathPlusParams: string
|
||||||
|
Read fLaunchingApplicationPathPlusParams Write fLaunchingApplicationPathPlusParams;
|
||||||
|
property WorkingDirectory: string Read fWorkingDirectory Write fWorkingDirectory;
|
||||||
|
property UseDisplay: boolean Read fUseDisplay Write FUseDisplay;
|
||||||
|
property Display: string Read fDisplay Write fDisplay;
|
||||||
|
|
||||||
|
// environment options
|
||||||
|
property UserOverrides: TStringList Read fUserOverrides;
|
||||||
|
property IncludeSystemVariables: boolean
|
||||||
|
Read fIncludeSystemVariables Write fIncludeSystemVariables;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TLazProject - interface class to a Lazarus project }
|
{ TLazProject - interface class to a Lazarus project }
|
||||||
|
|
||||||
TProjectFileSearchFlag = (
|
TProjectFileSearchFlag = (
|
||||||
@ -355,6 +391,7 @@ type
|
|||||||
FLazCompilerOptions: TLazCompilerOptions;
|
FLazCompilerOptions: TLazCompilerOptions;
|
||||||
FFlags: TProjectFlags;
|
FFlags: TProjectFlags;
|
||||||
FResources: TObject;
|
FResources: TObject;
|
||||||
|
FRunParameters: TAbstractRunParamsOptions;
|
||||||
function GetUseManifest: boolean; virtual; abstract;
|
function GetUseManifest: boolean; virtual; abstract;
|
||||||
procedure SetUseManifest(AValue: boolean); virtual; abstract;
|
procedure SetUseManifest(AValue: boolean); virtual; abstract;
|
||||||
function GetMainFile: TLazProjectFile; virtual; abstract;
|
function GetMainFile: TLazProjectFile; virtual; abstract;
|
||||||
@ -424,6 +461,7 @@ type
|
|||||||
property UseAppBundle: Boolean read FUseAppBundle write FUseAppBundle;
|
property UseAppBundle: Boolean read FUseAppBundle write FUseAppBundle;
|
||||||
property Resources: TObject read FResources; // TAbstractProjectResources
|
property Resources: TObject read FResources; // TAbstractProjectResources
|
||||||
property UseManifest: boolean read GetUseManifest write SetUseManifest;
|
property UseManifest: boolean read GetUseManifest write SetUseManifest;
|
||||||
|
property RunParameters: TAbstractRunParamsOptions read FRunParameters;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TLazProjectClass = class of TLazProject;
|
TLazProjectClass = class of TLazProject;
|
||||||
|
Loading…
Reference in New Issue
Block a user