mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
IDE: added about IDE info dialog
git-svn-id: trunk@28101 -
This commit is contained in:
parent
46ee94d11d
commit
27461c4823
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -3726,6 +3726,8 @@ ide/idecontexthelpedit.pas svneol=native#text/plain
|
||||
ide/idedefs.pas svneol=native#text/pascal
|
||||
ide/idefpcinfo.lfm svneol=native#text/plain
|
||||
ide/idefpcinfo.pas svneol=native#text/plain
|
||||
ide/ideinfodlg.lfm svneol=native#text/plain
|
||||
ide/ideinfodlg.pas svneol=native#text/plain
|
||||
ide/ideoptiondefs.pas svneol=native#text/pascal
|
||||
ide/ideoptionsdlg.lfm svneol=native#text/plain
|
||||
ide/ideoptionsdlg.pas svneol=native#text/pascal
|
||||
|
@ -29,93 +29,6 @@
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
build modes:
|
||||
|
||||
Done:
|
||||
- IDEIntf build macro: TLazBuildMacro: identifier, description,
|
||||
values, valuedescriptions, defaultvalue:string,
|
||||
- IDE build macro: TIDEBuildMacro, load/save to xmlconfig
|
||||
- BuildMacroChangeStamp:
|
||||
- changed on used packages, IncreaseBuildMacroChangeStamp
|
||||
- remove TBuildModeGraph
|
||||
- remove TBuildModeFlag
|
||||
- remove TBuildMode
|
||||
- remove TDefaultBuildModeGraph
|
||||
- project can define values for build macros
|
||||
- load/save to xmlconfig
|
||||
- project can define values for build macros
|
||||
- edit them in the compiler options
|
||||
- edit name
|
||||
- edit value
|
||||
- add value
|
||||
- delete value
|
||||
- Every package and project can define a list of build macros.
|
||||
- load/save to xmlconfig
|
||||
- Every package and project can define a list of build macros.
|
||||
- edit in compiler options:
|
||||
- new
|
||||
- rename
|
||||
- delete
|
||||
- add value
|
||||
- delete value
|
||||
- edit default value
|
||||
- a function to compute the build macro values
|
||||
- using the project macro values
|
||||
- using the inherited values
|
||||
- using the conditionals
|
||||
- build macro values are invalidated when changing project macro values or
|
||||
any conditionals
|
||||
- using conditionals to extend paths: TParsedCompilerOptions.GetUnparsedWithConditionals
|
||||
- using conditionals to extend package usage paths: TParsedCompilerOptions.GetUnparsedWithConditionals
|
||||
- conditionals editor for project
|
||||
- warn for macro name conflicts
|
||||
- on renaming
|
||||
- IDE macros like CompPath
|
||||
- keywords
|
||||
- with standard macros
|
||||
- prefix with package name
|
||||
- with macros from other packages/projects
|
||||
- show build macros in inherited compiler options
|
||||
- use syntax highlighter settings like the editor previews
|
||||
- show syntax errors of conditionals
|
||||
- when package is renamed, rename macros too
|
||||
- moved the project target file to compiler options
|
||||
- code completion
|
||||
- keywords
|
||||
- operands
|
||||
- inherited macros
|
||||
- project macros
|
||||
- own macros
|
||||
- words in conditionals
|
||||
- result identifiers
|
||||
- history
|
||||
- refactor compiler options (default options, load, save to file)
|
||||
- disabled project compiler options, used only for storage
|
||||
- replaced project compiler options OwnerProject+Project with LazProject
|
||||
- addded changestamp, assign, equals to compiler options
|
||||
- added buildmodes to project
|
||||
- moved compileroptions and macrovalues to active buildmode
|
||||
- compiler options: work on real options
|
||||
- backup before read with modified flags
|
||||
- restore on cancel
|
||||
- TProjectBuildMacros: CreateDiff
|
||||
- a project can save the set of build macros and compiler options
|
||||
- store sets in lpi
|
||||
- the default build mode is stored in the old xml path, so that
|
||||
old IDEs can open newer projects.
|
||||
- store sets in lps
|
||||
- store active build mode in session
|
||||
- edit build modes:
|
||||
- add
|
||||
- delete
|
||||
- move up, down
|
||||
- make active
|
||||
- a popup menu on IDE palette to quickly switch the build mode
|
||||
- a diff tool to compare two build modes
|
||||
- Makefile:
|
||||
- create special Makefile.compiled file, which is copied after compile
|
||||
to be used by the IDE
|
||||
|
||||
ToDo:
|
||||
- create Makefile:
|
||||
- create a special .compiled file
|
||||
|
@ -74,7 +74,7 @@ end;
|
||||
|
||||
procedure TIDEFPCInfoDialog.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:='Information about used FPC';
|
||||
Caption:=lisInformationAboutUsedFPC;
|
||||
|
||||
UpdateMemo;
|
||||
end;
|
||||
@ -102,8 +102,8 @@ begin
|
||||
FPCSrcDir:=EnvironmentOptions.GetFPCSourceDirectory; // needs FPCVer macro
|
||||
UnitSetCache:=CodeToolBoss.FPCDefinesCache.FindUnitSet(
|
||||
CompilerFilename,TargetOS,TargetCPU,'',FPCSrcDir,true);
|
||||
|
||||
GatherFPCExecutable(UnitSetCache,sl);
|
||||
|
||||
Memo1.Lines.Assign(sl);
|
||||
finally
|
||||
sl.Free;
|
||||
|
22
ide/ideinfodlg.lfm
Normal file
22
ide/ideinfodlg.lfm
Normal file
@ -0,0 +1,22 @@
|
||||
object IDEInfoDialog: TIDEInfoDialog
|
||||
Left = 269
|
||||
Height = 330
|
||||
Top = 294
|
||||
Width = 644
|
||||
Caption = 'IDEInfoDialog'
|
||||
ClientHeight = 330
|
||||
ClientWidth = 644
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.29'
|
||||
object Memo1: TMemo
|
||||
Left = 0
|
||||
Height = 330
|
||||
Top = 0
|
||||
Width = 644
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
133
ide/ideinfodlg.pas
Normal file
133
ide/ideinfodlg.pas
Normal file
@ -0,0 +1,133 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
Author: Mattias Gaertner
|
||||
|
||||
Abstract:
|
||||
IDE dialog showing stats about the IDE.
|
||||
}
|
||||
unit IDEInfoDlg;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
DefineTemplates, EnvironmentOpts, AboutFrm, LazConf;
|
||||
|
||||
type
|
||||
|
||||
{ TIDEInfoDialog }
|
||||
|
||||
TIDEInfoDialog = class(TForm)
|
||||
Memo1: TMemo;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
procedure GatherIDEVersion(sl: TStrings);
|
||||
procedure GatherEnvironmentVars(sl: TStrings);
|
||||
procedure GatherGlobalOptions(sl: TStrings);
|
||||
public
|
||||
procedure UpdateMemo;
|
||||
end;
|
||||
|
||||
var
|
||||
IDEInfoDialog: TIDEInfoDialog;
|
||||
|
||||
function ShowIDEInfo: TModalResult;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
function ShowIDEInfo: TModalResult;
|
||||
var
|
||||
Dlg: TIDEInfoDialog;
|
||||
begin
|
||||
Dlg:=TIDEInfoDialog.Create(nil);
|
||||
try
|
||||
Result:=Dlg.ShowModal;
|
||||
finally
|
||||
Dlg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TIDEInfoDialog }
|
||||
|
||||
procedure TIDEInfoDialog.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:='Information about the IDE';
|
||||
|
||||
UpdateMemo;
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.GatherIDEVersion(sl: TStrings);
|
||||
const
|
||||
LazarusVersionStr= {$I version.inc};
|
||||
begin
|
||||
sl.Add('Lazarus version: '+GetLazarusVersionString);
|
||||
sl.Add('Lazarus svn revision: '+LazarusRevisionStr);
|
||||
sl.Add('Lazarus build date: '+{$I %date%});
|
||||
sl.Add('Lazarus was compiled for '+GetCompiledTargetCPU+'-'+GetCompiledTargetOS);
|
||||
sl.Add('Lazarus was compiled with fpc '+{$I %FPCVERSION%});
|
||||
sl.Add('');
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.GatherEnvironmentVars(sl: TStrings);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
sl.Add('Environment variables:');
|
||||
for i:=0 to GetEnvironmentVariableCount-1 do
|
||||
sl.Add(GetEnvironmentStringUTF8(i)+'='+GetEnvironmentVariableUTF8(GetEnvironmentStringUTF8(i)));
|
||||
sl.Add('');
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.GatherGlobalOptions(sl: TStrings);
|
||||
begin
|
||||
sl.add('Global IDE options:');
|
||||
sl.Add('Primary config directory='+GetPrimaryConfigPath);
|
||||
sl.Add('Secondary config directory='+GetSecondaryConfigPath);
|
||||
sl.Add('LazarusDirectory='+EnvironmentOptions.LazarusDirectory);
|
||||
sl.Add('CompilerFilename='+EnvironmentOptions.CompilerFilename);
|
||||
sl.Add('CompilerMessagesFilename='+EnvironmentOptions.CompilerMessagesFilename);
|
||||
sl.Add('FPC source directory='+EnvironmentOptions.GetFPCSourceDirectory);
|
||||
sl.Add('Test directory='+EnvironmentOptions.GetTestBuildDirectory);
|
||||
sl.Add('');
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.UpdateMemo;
|
||||
var
|
||||
sl: TStringList;
|
||||
begin
|
||||
sl:=TStringList.Create;
|
||||
try
|
||||
GatherIDEVersion(sl);
|
||||
GatherGlobalOptions(sl);
|
||||
GatherEnvironmentVars(sl);
|
||||
Memo1.Lines.Assign(sl);
|
||||
finally
|
||||
sl.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -56,7 +56,7 @@
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="74">
|
||||
<Units Count="75">
|
||||
<Unit0>
|
||||
<Filename Value="lazarus.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -562,6 +562,13 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="CheckCompOptsForNewUnitDlg"/>
|
||||
</Unit73>
|
||||
<Unit74>
|
||||
<Filename Value="ideinfodlg.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="IDEInfoDialog"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="IDEInfoDlg"/>
|
||||
</Unit74>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -305,6 +305,7 @@ resourcestring
|
||||
lisMenuIDEInternals = 'IDE internals';
|
||||
lisMenuPackageLinks = 'Package links ...';
|
||||
lisMenuAboutFPC = 'About FPC';
|
||||
lisAboutIDE = 'About IDE';
|
||||
|
||||
lisMenuNewProject = 'New Project ...';
|
||||
lisMenuNewProjectFromFile = 'New Project from file ...';
|
||||
@ -4951,6 +4952,7 @@ resourcestring
|
||||
lisDirectivesForNewUnit = 'Directives for new unit';
|
||||
lisRemoveFromInstallList = 'Remove from install list';
|
||||
lisKeepInInstallList = 'Keep in install list';
|
||||
lisInformationAboutUsedFPC = 'Information about used FPC';
|
||||
|
||||
implementation
|
||||
|
||||
|
19
ide/main.pp
19
ide/main.pp
@ -137,12 +137,12 @@ uses
|
||||
IDEProcs, ExtToolDialog, ExtToolEditDlg, OutputFilter, JumpHistoryView,
|
||||
BuildLazDialog, BuildProfileManager, BuildManager, CheckCompOptsForNewUnitDlg,
|
||||
MiscOptions, InputHistory, UnitDependencies, ClipBoardHistory,
|
||||
IDEFPCInfo, ProcessList, InitialSetupDlgs, NewDialog, MakeResStrDlg,
|
||||
DialogProcs, FindReplaceDialog, FindInFilesDlg, CodeExplorer, BuildFileDlg,
|
||||
ProcedureList, ExtractProcDlg, FindRenameIdentifier, AbstractsMethodsDlg,
|
||||
EmptyMethodsDlg, UnusedUnitsDlg, FindOverloadsDlg, CleanDirDlg,
|
||||
CodeContextForm, AboutFrm, CompatibilityRestrictions, RestrictionBrowser,
|
||||
ProjectWizardDlg, IDECmdLine, CodeExplOpts,
|
||||
IDEFPCInfo, IDEInfoDlg, ProcessList, InitialSetupDlgs, NewDialog,
|
||||
MakeResStrDlg, DialogProcs, FindReplaceDialog, FindInFilesDlg, CodeExplorer,
|
||||
BuildFileDlg, ProcedureList, ExtractProcDlg, FindRenameIdentifier,
|
||||
AbstractsMethodsDlg, EmptyMethodsDlg, UnusedUnitsDlg, FindOverloadsDlg,
|
||||
CleanDirDlg, CodeContextForm, AboutFrm, CompatibilityRestrictions,
|
||||
RestrictionBrowser, ProjectWizardDlg, IDECmdLine, CodeExplOpts,
|
||||
// main ide
|
||||
MainBar, MainIntf, MainBase;
|
||||
|
||||
@ -273,6 +273,7 @@ type
|
||||
procedure mnuViewComponentPaletteClicked(Sender: TObject);
|
||||
procedure mnuViewIDESpeedButtonsClicked(Sender: TObject);
|
||||
procedure mnuViewFPCInfoClicked(Sender: TObject);
|
||||
procedure mnuViewIDEInfoClicked(Sender: TObject);
|
||||
|
||||
// project menu
|
||||
procedure mnuNewProjectClicked(Sender: TObject);
|
||||
@ -2433,6 +2434,7 @@ begin
|
||||
itmViewIDESpeedButtons.OnClick := @mnuViewIDESpeedButtonsClicked;
|
||||
|
||||
itmViewFPCInfo.OnClick:=@mnuViewFPCInfoClicked;
|
||||
itmViewIDEInfo.OnClick:=@mnuViewIDEInfoClicked;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2575,6 +2577,11 @@ begin
|
||||
ShowFPCInfo;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuViewIDEInfoClicked(Sender: TObject);
|
||||
begin
|
||||
ShowIDEInfo;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.SetDesigning(AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
SetComponentDesignMode(AComponent, Value);
|
||||
|
@ -223,6 +223,7 @@ type
|
||||
//itmViewIDEInternalsWindows: TIDEMenuSection;
|
||||
itmViewPackageLinks: TIDEMenuCommand;
|
||||
itmViewFPCInfo: TIDEMenuCommand;
|
||||
itmViewIDEInfo: TIDEMenuCommand;
|
||||
|
||||
// project menu
|
||||
//mnuProject: TIDEMenuSection;
|
||||
|
@ -590,6 +590,7 @@ begin
|
||||
begin
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewPackageLinks, 'itmViewPackageLinks', lisMenuPackageLinks);
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewFPCInfo, 'itmViewFPCInfo', lisMenuAboutFPC);
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewIDEInfo, 'itmViewIDEInfo', lisAboutIDE);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user