mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +02:00
fixes for debugging lazarus
git-svn-id: trunk@3428 -
This commit is contained in:
parent
6a54c50831
commit
01a8eab6d8
@ -654,61 +654,6 @@ begin
|
||||
Result:=FileCtrl.CompareFilenames(FileName1,FileName2);
|
||||
end;
|
||||
|
||||
function FileIsExecutable(const AFilename: string): boolean;
|
||||
begin
|
||||
try
|
||||
CheckIfFileIsExecutable(AFilename);
|
||||
Result:=true;
|
||||
except
|
||||
Result:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CheckIfFileIsExecutable(const AFilename: string);
|
||||
{$IFNDEF win32}
|
||||
var AText: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
// TProcess does not report, if a program can not be executed
|
||||
// to get good error messages consider the OS
|
||||
if not FileExists(AFilename) then begin
|
||||
raise Exception.Create('file "'+AFilename+'" does not exist');
|
||||
end;
|
||||
{$IFNDEF win32}
|
||||
if not{$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF}.Access(
|
||||
AFilename,{$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF}.X_OK) then
|
||||
begin
|
||||
AText:='"'+AFilename+'"';
|
||||
case LinuxError of
|
||||
{$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
|
||||
AText:='read access denied for '+AText;
|
||||
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
|
||||
AText:='a directory component in '+AText
|
||||
+' does not exist or is a dangling symlink';
|
||||
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
|
||||
AText:='a directory component in '+Atext+' is not a directory';
|
||||
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
|
||||
AText:='insufficient memory';
|
||||
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
|
||||
AText:=AText+' has a circular symbolic link';
|
||||
else
|
||||
AText:=AText+' is not executable';
|
||||
end;
|
||||
raise Exception.Create(AText);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
// ToDo: windows and xxxbsd
|
||||
end;
|
||||
|
||||
function ExtractFileNameOnly(const AFilename: string): string;
|
||||
var ExtLen: integer;
|
||||
begin
|
||||
Result:=ExtractFilename(AFilename);
|
||||
ExtLen:=length(ExtractFileExt(Result));
|
||||
Result:=copy(Result,1,length(Result)-ExtLen);
|
||||
end;
|
||||
|
||||
function FilenameIsAbsolute(Filename: string):boolean;
|
||||
begin
|
||||
Result:=FileProcs.FilenameIsAbsolute(Filename);
|
||||
@ -724,31 +669,11 @@ begin
|
||||
Result:=FileProcs.ForceDirectory(DirectoryName);
|
||||
end;
|
||||
|
||||
function FileIsReadable(const AFilename: string): boolean;
|
||||
begin
|
||||
Result:=FileProcs.FileIsReadable(AFilename);
|
||||
end;
|
||||
|
||||
function FileIsWritable(const AFilename: string): boolean;
|
||||
begin
|
||||
Result:=FileProcs.FileIsWritable(AFilename);
|
||||
end;
|
||||
|
||||
function FileIsText(const AFilename: string): boolean;
|
||||
begin
|
||||
Result:=FileProcs.FileIsText(AFilename);
|
||||
end;
|
||||
|
||||
function AppendPathDelim(const Path: string): string;
|
||||
begin
|
||||
Result:=FileProcs.AppendPathDelim(Path);
|
||||
end;
|
||||
|
||||
function ChompPathDelim(const Path: string): string;
|
||||
begin
|
||||
Result:=FileProcs.ChompPathDelim(Path);
|
||||
end;
|
||||
|
||||
function CompareFilenames(const Filename1, Filename2: string;
|
||||
ResolveLinks: boolean): integer;
|
||||
begin
|
||||
|
18
ide/main.pp
18
ide/main.pp
@ -647,6 +647,8 @@ type
|
||||
const
|
||||
CodeToolsIncludeLinkFile = 'includelinks.xml';
|
||||
|
||||
var
|
||||
ShowSplashScreen: boolean;
|
||||
|
||||
implementation
|
||||
|
||||
@ -698,6 +700,7 @@ procedure TMainIDE.ParseCmdLineOptions;
|
||||
const
|
||||
PrimaryConfPathOpt='--primary-config-path=';
|
||||
SecondaryConfPathOpt='--secondary-config-path=';
|
||||
NoSplashScreenOpt='--no-splash-screen';
|
||||
var i: integer;
|
||||
begin
|
||||
if (ParamCount>0)
|
||||
@ -713,12 +716,14 @@ begin
|
||||
writeln('');
|
||||
writeln('--help or -? ', listhisHelpMessage);
|
||||
writeln('');
|
||||
writeln('--primary-config-path <path>');
|
||||
writeln(PrimaryConfPathOpt,' <path>');
|
||||
writeln(BreakString(lisprimaryConfigDirectoryWhereLazarusStoresItsConfig,
|
||||
75, 22), GetPrimaryConfigPath);
|
||||
writeln('--secondary-config-path <path>');
|
||||
writeln(SecondaryConfPathOpt,' <path>');
|
||||
writeln(BreakString(lissecondaryConfigDirectoryWhereLazarusSearchesFor,
|
||||
75, 22), GetSecondaryConfigPath);
|
||||
writeln(NoSplashScreenOpt,' ',lisDoNotShowSplashScreen);
|
||||
writeln('');
|
||||
writeln('');
|
||||
writeln(lisCmdLineLCLInterfaceSpecificOptions);
|
||||
writeln('');
|
||||
@ -739,6 +744,8 @@ begin
|
||||
SetSecondaryConfigPath(copy(ParamStr(i),length(SecondaryConfPathOpt)+1,
|
||||
length(ParamStr(i))));
|
||||
end;
|
||||
if AnsiCompareText(ParamStr(i),NoSplashScreenOpt)=0 then
|
||||
ShowSplashScreen:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -748,7 +755,7 @@ var
|
||||
InteractiveSetup: boolean;
|
||||
begin
|
||||
InteractiveSetup:=true;
|
||||
|
||||
|
||||
EnvironmentOptions:=TEnvironmentOptions.Create;
|
||||
with EnvironmentOptions do begin
|
||||
SetLazarusDefaultFilename;
|
||||
@ -9287,13 +9294,16 @@ initialization
|
||||
{ $I mainide.lrs}
|
||||
{$I images/laz_images.lrs}
|
||||
{$I images/mainicon.lrs}
|
||||
|
||||
ShowSplashScreen:=true;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.615 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.614 2002/08/18 08:57:49 marc
|
||||
* Improved hint evaluation
|
||||
|
||||
|
@ -271,10 +271,10 @@ implementation
|
||||
|
||||
|
||||
const
|
||||
BitbtnCaption : array[TBitBtnKind] of String = (
|
||||
{BitbtnCaption : array[TBitBtnKind] of String = (
|
||||
'', rsmbOK, rsmbCancel, rsmbHelp, rsmbYes, rsmbNo,
|
||||
rsmbClose, rsmbAbort, rsmbRetry, rsmbIgnore, rsmbAll,
|
||||
rsmbNoToAll, rsmbYesToAll);
|
||||
rsmbNoToAll, rsmbYesToAll);}
|
||||
|
||||
BitBtnModalResults : array[TBitBtnKind] of TModalResult = (
|
||||
0, mrOK, mrCancel, 0, mrYes, mrNo,
|
||||
@ -307,6 +307,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.48 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.47 2002/08/18 00:03:45 mattias
|
||||
fixed bitbtn image for NoToAll
|
||||
|
||||
|
@ -650,7 +650,7 @@ type
|
||||
procedure DoEndDrag(Target: TObject; X,Y : Integer); dynamic;
|
||||
procedure InvalidateControl(IsVisible, IsOpaque : Boolean);
|
||||
procedure InvalidateControl(IsVisible, IsOpaque, IgnoreWinControls: Boolean);
|
||||
procedure SendDockNotification(Msg: Cardinal; WParam, LParam : Integer);
|
||||
procedure SendDockNotification(Msg: Cardinal; WParam, LParam : Integer); virtual;
|
||||
procedure SetColor(Value : TColor); virtual;
|
||||
procedure SetDragMode (Value: TDragMode); virtual;
|
||||
procedure SetEnabled(Value: Boolean); virtual;
|
||||
@ -1536,6 +1536,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.132 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.131 2002/08/19 15:15:23 mattias
|
||||
implemented TPairSplitter
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure SendDockNotification(Msg: Cardinal; WParam, LParam : Integer);
|
||||
Begin
|
||||
//TODO: SendDockNotification
|
||||
//TODO: SendDockNotification
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1864,11 +1864,6 @@ begin
|
||||
SetBounds(FLeft, FTop, Value, FHeight);
|
||||
end;
|
||||
|
||||
procedure SetFont(Value: TFont);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TControl SetHeight
|
||||
------------------------------------------------------------------------------}
|
||||
@ -2424,6 +2419,9 @@ end;
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.137 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.136 2002/08/17 23:41:34 mattias
|
||||
many clipping fixes
|
||||
|
||||
|
@ -314,9 +314,6 @@ end;
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TSpeedbutton.Paint;
|
||||
const
|
||||
DownStyles: array[Boolean] of Integer = (BDR_RAISEDINNER, BDR_SUNKENINNER);
|
||||
FillStyles: array[Boolean] of Integer = (BF_MIDDLE, 0);
|
||||
var
|
||||
PaintRect: TRect;
|
||||
GlyphWidth, GlyphHeight: Integer;
|
||||
@ -701,6 +698,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.41 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.40 2002/08/17 23:41:34 mattias
|
||||
many clipping fixes
|
||||
|
||||
|
@ -249,9 +249,9 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, Buttons, Menus, GTKWinApiWindow, StdCtrls, ComCtrls, CListBox,
|
||||
KeyMap, Calendar, Arrow, Spin, PairSplitter, CommCtrl, ExtCtrls, Dialogs,
|
||||
FileCtrl, LResources, Math, gtkglobals, gtkproc;
|
||||
Graphics, Buttons, Menus, StdCtrls, PairSplitter, Dialogs, Math,
|
||||
GTKWinApiWindow, ComCtrls, CListBox, KeyMap, Calendar, Arrow, Spin, CommCtrl,
|
||||
ExtCtrls, FileCtrl, LResources, gtkglobals, gtkproc;
|
||||
|
||||
{$I gtklistsl.inc}
|
||||
|
||||
@ -345,6 +345,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.132 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.131 2002/08/19 15:15:24 mattias
|
||||
implemented TPairSplitter
|
||||
|
||||
|
@ -30,24 +30,24 @@ const
|
||||
GtkListItemLCLListTag = 'LCLList';
|
||||
|
||||
{*************************************************************}
|
||||
{ Default compare function }
|
||||
{ Default compare functions }
|
||||
{*************************************************************}
|
||||
|
||||
function DefaultCompareFunc(a, b : gpointer) : gint; cdecl;
|
||||
{function DefaultCompareFunc(a, b : gpointer) : gint; cdecl;
|
||||
var AStr, BStr : PChar;
|
||||
begin
|
||||
gtk_label_get(PGtkLabel(PGtkBin(a)^.child), @AStr);
|
||||
gtk_label_get(PGtkLabel(PGtkBin(b)^.child), @BStr);
|
||||
Result:= strcomp(AStr, BStr);
|
||||
end;
|
||||
end;}
|
||||
|
||||
function DefaultCheckCompareFunc(a, b : gpointer) : gint; cdecl;
|
||||
{function DefaultCheckCompareFunc(a, b : gpointer) : gint; cdecl;
|
||||
var AStr, BStr : PChar;
|
||||
begin
|
||||
gtk_label_get(PPointer(PGTKBox(PGtkBin(a)^.child)^.Children^.Next^.Data)^, @AStr);
|
||||
gtk_label_get(PPointer(PGTKBox(PGtkBin(b)^.child)^.Children^.Next^.Data)^, @BStr);
|
||||
Result:= strcomp(AStr, BStr);
|
||||
end;
|
||||
end;}
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function gtkListItemDrawCB(Widget: PGtkWidget; area: PGDKRectangle;
|
||||
@ -760,6 +760,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.20 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.19 2002/08/18 08:54:36 marc
|
||||
* Fixed chrash on saving checklistboxitems
|
||||
|
||||
|
@ -4131,14 +4131,16 @@ begin
|
||||
If GetSystemMetrics(SM_CXSCREEN) >= biWidth then
|
||||
biXPelsPerMeter := GetDeviceCaps(0, LOGPIXELSX)
|
||||
else
|
||||
biXPelsPerMeter := Round((biWidth / GetSystemMetrics(SM_CXSCREEN)) *
|
||||
GetDeviceCaps(0, LOGPIXELSX));
|
||||
biXPelsPerMeter :=
|
||||
Round((single(biWidth) / GetSystemMetrics(SM_CXSCREEN)) *
|
||||
GetDeviceCaps(0, LOGPIXELSX));
|
||||
|
||||
If GetSystemMetrics(SM_CYSCREEN) >= biHeight then
|
||||
biYPelsPerMeter := GetDeviceCaps(0, LOGPIXELSY)
|
||||
else
|
||||
biYPelsPerMeter := Round((biHeight / GetSystemMetrics(SM_CYSCREEN)) *
|
||||
GetDeviceCaps(0, LOGPIXELSY));
|
||||
biYPelsPerMeter :=
|
||||
Round((Single(biHeight) / GetSystemMetrics(SM_CYSCREEN)) *
|
||||
GetDeviceCaps(0, LOGPIXELSY));
|
||||
|
||||
bmWidth := biWidth;
|
||||
bmHeight := biHeight;
|
||||
@ -8481,6 +8483,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.251 2003/06/23 09:42:09 mattias
|
||||
fixes for debugging lazarus
|
||||
|
||||
Revision 1.250 2002/08/19 15:15:24 mattias
|
||||
implemented TPairSplitter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user