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