mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 10:29:28 +02:00
MG: added command line help
git-svn-id: trunk@1707 -
This commit is contained in:
parent
f9f85ea7c2
commit
784fb02b29
@ -47,13 +47,13 @@ interface
|
||||
|
||||
// activate for debug:
|
||||
|
||||
{$DEFINE CTDEBUG}
|
||||
{ $DEFINE CTDEBUG}
|
||||
{ $DEFINE ShowSearchPaths}
|
||||
{ $DEFINE ShowTriedFiles}
|
||||
{$DEFINE ShowTriedContexts}
|
||||
{ $DEFINE ShowTriedContexts}
|
||||
{ $DEFINE ShowTriedIdentifiers}
|
||||
{$DEFINE ShowExprEval}
|
||||
{$DEFINE ShowFoundIdentifier}
|
||||
{ $DEFINE ShowExprEval}
|
||||
{ $DEFINE ShowFoundIdentifier}
|
||||
{ $DEFINE ShowInterfaceCache}
|
||||
{ $DEFINE ShowNodeCache}
|
||||
{ $DEFINE ShowBaseTypeCache}
|
||||
|
@ -55,6 +55,7 @@ uses
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
TMainIde.ParseCmdLineOptions;
|
||||
|
||||
// Show splashform
|
||||
SplashForm := TSplashForm.Create(nil);
|
||||
@ -83,6 +84,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.34 2002/05/27 17:58:40 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.33 2002/05/15 05:58:16 lazarus
|
||||
MG: added TMainMenu.Parent
|
||||
|
||||
|
30
ide/main.pp
30
ide/main.pp
@ -247,7 +247,6 @@ type
|
||||
procedure OnApplyWindowLayout(ALayout: TIDEWindowLayout);
|
||||
|
||||
// methods for start
|
||||
procedure ParseCmdLineOptions;
|
||||
procedure LoadGlobalOptions;
|
||||
procedure SetupMainMenu;
|
||||
procedure AddRecentSubMenu(ParentMenuItem: TMenuItem; FileList: TStringList;
|
||||
@ -312,6 +311,8 @@ type
|
||||
function DoCompleteLoadingProjectInfo: TModalResult;
|
||||
|
||||
public
|
||||
class procedure ParseCmdLineOptions;
|
||||
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
@ -528,6 +529,30 @@ const
|
||||
SecondaryConfPathOpt='--secondary-config-path=';
|
||||
var i: integer;
|
||||
begin
|
||||
if (ParamCount>0)
|
||||
and ((AnsiCompareText(ParamStr(1),'--help')=0)
|
||||
or (AnsiCompareText(ParamStr(1),'-?')=0)) then
|
||||
begin
|
||||
writeln('lazarus [options] <project-filename>');
|
||||
writeln('');
|
||||
writeln('IDE Options:');
|
||||
writeln('');
|
||||
writeln('--help or -? this help message');
|
||||
writeln('');
|
||||
writeln('--primary-config-path primary config directory, where Lazarus');
|
||||
writeln(' stores its config files. Default is ');
|
||||
writeln(' ',GetPrimaryConfigPath);
|
||||
writeln('');
|
||||
writeln('--secondary-config-path secondary config directory, where Lazarus');
|
||||
writeln(' searches for config template files.');
|
||||
writeln(' Default is ',GetSecondaryConfigPath);
|
||||
writeln('');
|
||||
writeln('');
|
||||
writeln('LCL Interface specific options:');
|
||||
writeln('');
|
||||
writeln(GetCmdLineParamDescForInterface);
|
||||
Halt;
|
||||
end;
|
||||
for i:=1 to ParamCount do begin
|
||||
if AnsiCompareText(LeftStr(ParamStr(i),length(PrimaryConfPathOpt)),
|
||||
PrimaryConfPathOpt)=0 then
|
||||
@ -6375,6 +6400,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.301 2002/05/27 17:58:40 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.300 2002/05/27 14:38:32 lazarus
|
||||
MG; fixed find declaration of overloaded procs and expression input types
|
||||
|
||||
|
@ -249,6 +249,19 @@ begin
|
||||
Result := InterfaceObject.GetClientRect(handle, Rect);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: GetCmdLineParamDescForInterface
|
||||
Params: none
|
||||
Returns: ansistring
|
||||
|
||||
Returns a description of the command line parameters, that are understood by
|
||||
the interface.
|
||||
------------------------------------------------------------------------------}
|
||||
Function GetCmdLineParamDescForInterface: string;
|
||||
begin
|
||||
Result := InterfaceObject.GetCmdLineParamDescForInterface;
|
||||
end;
|
||||
|
||||
Function GetCursorPos(var lpPoint:TPoint): Boolean;
|
||||
Begin
|
||||
Result := InterfaceObject.GetCaretPos(lpPoint);
|
||||
@ -1116,6 +1129,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.31 2002/05/27 17:58:42 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.30 2002/05/24 07:16:32 lazarus
|
||||
MG: started mouse bugfix and completed Makefile.fpc
|
||||
|
||||
|
@ -88,6 +88,7 @@ function GetCapture : HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function GetCaretPos(var lpPoint: TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
Function GetClientBounds(handle : HWND; var Rect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
Function GetClientRect(handle : HWND; var Rect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
Function GetCmdLineParamDescForInterface: string; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function GetCursorPos(var lpPoint: TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} //pbd
|
||||
function GetDC(hWnd: HWND): HDC; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
@ -267,6 +268,9 @@ function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): Boolean
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.26 2002/05/27 17:58:42 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.25 2002/05/24 07:16:32 lazarus
|
||||
MG: started mouse bugfix and completed Makefile.fpc
|
||||
|
||||
|
@ -2022,6 +2022,60 @@ begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: GetCmdLineParamDescForInterface
|
||||
Params: none
|
||||
Returns: ansistring
|
||||
|
||||
Returns a description of the command line parameters, that are understood by
|
||||
the interface.
|
||||
------------------------------------------------------------------------------}
|
||||
Function TGTKObject.GetCmdLineParamDescForInterface: string;
|
||||
const
|
||||
e = {$IFDEF win32}#13+{$ENDIF}#10;
|
||||
begin
|
||||
Result:=
|
||||
'--gtk-module module Load the specified module at startup.'+e+
|
||||
e+
|
||||
'--g-fatal-warnings Warnings and errors generated by Gtk+/GDK will'+e+
|
||||
' halt the application.'+e+
|
||||
e+
|
||||
'--gtk-debug flags Turn on specific Gtk+ trace/debug messages.'+e+
|
||||
e+
|
||||
'--gtk-no-debug flags Turn off specific Gtk+ trace/debug messages.'+e+
|
||||
e+
|
||||
'--gdk-debug flags Turn on specific GDK trace/debug messages.'+e+
|
||||
e+
|
||||
'--gdk-no-debug flags Turn off specific GDK trace/debug messages.'+e+
|
||||
e+
|
||||
'--display h:s:d Connect to the specified X server, where "h" is'+e+
|
||||
' the hostname, "s" is the server number (usually'+e+
|
||||
' 0), and "d" is the display number (typically'+e+
|
||||
' omitted). If --display is not specified, the'+e+
|
||||
' DISPLAY environment variable is used.'+e+
|
||||
e+
|
||||
'--sync Call XSynchronize (display, True) after the X'+e+
|
||||
' server connection has been established. This'+e+
|
||||
' makes debugging X protocol erros easier,'+e+
|
||||
' because X request buffering will be disabled and'+e+
|
||||
' X errors will be received immediatey after the'+e+
|
||||
' protocol request that generated the error has'+e+
|
||||
' been processed by the X server.'+e+
|
||||
e+
|
||||
'--no-xshm Disable use of the X Shared Memory Extension.'+e+
|
||||
e+
|
||||
'--name programe Set program name to "progname". If not'+e+
|
||||
' specified, program name will be set to'+e+
|
||||
' ParamStr(0).'+e+
|
||||
e+
|
||||
'--class classname Following Xt conventions, the class of a'+e+
|
||||
' program is the program name with the initial'+e+
|
||||
' character capitalized. For example, the class'+e+
|
||||
' name for gimp is "Gimp". If --class is'+e+
|
||||
' specified, the class of the program will be'+e+
|
||||
' set to "classname".'+e;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: GetDC
|
||||
Params: none
|
||||
@ -4485,6 +4539,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.72 2002/05/27 17:58:42 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.71 2002/05/24 07:16:34 lazarus
|
||||
MG: started mouse bugfix and completed Makefile.fpc
|
||||
|
||||
|
@ -72,6 +72,7 @@ function GetCaretPos(var lpPoint: TPoint): Boolean; override;
|
||||
function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): Boolean; override;
|
||||
Function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
|
||||
Function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
|
||||
Function GetCmdLineParamDescForInterface: string; override;
|
||||
function GetDC(hWnd: HWND): HDC; override;
|
||||
function GetFocus: HWND; override;
|
||||
function GetKeyState(nVirtKey: Integer): Smallint; override;
|
||||
@ -152,6 +153,9 @@ Function WindowFromPoint(Point : TPoint) : HWND; override;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.30 2002/05/27 17:58:42 lazarus
|
||||
MG: added command line help
|
||||
|
||||
Revision 1.29 2002/05/24 07:16:35 lazarus
|
||||
MG: started mouse bugfix and completed Makefile.fpc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user