mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:39:25 +02:00
extended quick fix items for jumping, started jumping to linker errors
git-svn-id: trunk@9456 -
This commit is contained in:
parent
797928f45b
commit
9e55b163b0
@ -445,8 +445,10 @@ type
|
|||||||
var FoundInUnits, MissingInUnits, NormalUnits: TStrings): boolean;
|
var FoundInUnits, MissingInUnits, NormalUnits: TStrings): boolean;
|
||||||
function CommentUnitsInUsesSections(Code: TCodeBuffer;
|
function CommentUnitsInUsesSections(Code: TCodeBuffer;
|
||||||
MissingUnits: TStrings): boolean;
|
MissingUnits: TStrings): boolean;
|
||||||
function FindUnit(Code: TCodeBuffer;
|
function FindUnitCaseInsensitive(Code: TCodeBuffer;
|
||||||
var AnUnitName, AnUnitInFilename: string): string;
|
var AnUnitName, AnUnitInFilename: string): string;
|
||||||
|
function FindUnitSource(Code: TCodeBuffer;
|
||||||
|
const AnUnitName, AnUnitInFilename: string): TCodeBuffer;
|
||||||
|
|
||||||
// resources
|
// resources
|
||||||
property OnFindDefinePropertyForContext: TOnFindDefinePropertyForContext
|
property OnFindDefinePropertyForContext: TOnFindDefinePropertyForContext
|
||||||
@ -541,7 +543,7 @@ type
|
|||||||
Proc: TGetStringProc): boolean;
|
Proc: TGetStringProc): boolean;
|
||||||
function PublishedMethodExists(Code:TCodeBuffer; const AClassName,
|
function PublishedMethodExists(Code:TCodeBuffer; const AClassName,
|
||||||
AMethodName: string; TypeData: PTypeData;
|
AMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
||||||
): boolean;
|
): boolean;
|
||||||
function JumpToPublishedMethodBody(Code: TCodeBuffer;
|
function JumpToPublishedMethodBody(Code: TCodeBuffer;
|
||||||
const AClassName, AMethodName: string;
|
const AClassName, AMethodName: string;
|
||||||
@ -558,6 +560,12 @@ type
|
|||||||
DirectiveList: TStrings): boolean;
|
DirectiveList: TStrings): boolean;
|
||||||
function SetIDEDirectives(Code: TCodeBuffer;
|
function SetIDEDirectives(Code: TCodeBuffer;
|
||||||
DirectiveList: TStrings): boolean;
|
DirectiveList: TStrings): boolean;
|
||||||
|
|
||||||
|
// linker jumping
|
||||||
|
function JumpToLinkerIdentifier(Code: TCodeBuffer;
|
||||||
|
const MangledFunction, Identifier: string;
|
||||||
|
out NewCode: TCodeBuffer;
|
||||||
|
out NewX, NewY, NewTopLine: integer): boolean;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
@ -2443,7 +2451,7 @@ end;
|
|||||||
|
|
||||||
function TCodeToolManager.PublishedMethodExists(Code:TCodeBuffer;
|
function TCodeToolManager.PublishedMethodExists(Code:TCodeBuffer;
|
||||||
const AClassName, AMethodName: string; TypeData: PTypeData;
|
const AClassName, AMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
||||||
begin
|
begin
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TCodeToolManager.PublishedMethodExists A ',Code.Filename,' ',AClassName,':',AMethodName);
|
DebugLn('TCodeToolManager.PublishedMethodExists A ',Code.Filename,' ',AClassName,':',AMethodName);
|
||||||
@ -2547,6 +2555,30 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCodeToolManager.JumpToLinkerIdentifier(Code: TCodeBuffer;
|
||||||
|
const MangledFunction, Identifier: string; out NewCode: TCodeBuffer; out
|
||||||
|
NewX, NewY, NewTopLine: integer): boolean;
|
||||||
|
var
|
||||||
|
NewPos: TCodeXYPosition;
|
||||||
|
begin
|
||||||
|
{$IFDEF CTDEBUG}
|
||||||
|
DebugLn('TCodeToolManager.JumpToLinkerIdentifier A ',Code.Filename);
|
||||||
|
{$ENDIF}
|
||||||
|
Result:=false;
|
||||||
|
if not InitCurCodeTool(Code) then exit;
|
||||||
|
try
|
||||||
|
Result:=FCurCodeTool.FindJumpPointForLinkerPos(MangledFunction, Identifier,
|
||||||
|
NewPos,NewTopLine);
|
||||||
|
if Result then begin
|
||||||
|
NewX:=NewPos.X;
|
||||||
|
NewY:=NewPos.Y;
|
||||||
|
NewCode:=NewPos.Code;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
on e: Exception do Result:=HandleException(e);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.CompleteCode(Code: TCodeBuffer; X,Y,TopLine: integer;
|
function TCodeToolManager.CompleteCode(Code: TCodeBuffer; X,Y,TopLine: integer;
|
||||||
var NewCode: TCodeBuffer; var NewX, NewY, NewTopLine: integer): boolean;
|
var NewCode: TCodeBuffer; var NewX, NewY, NewTopLine: integer): boolean;
|
||||||
var
|
var
|
||||||
@ -2962,16 +2994,31 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.FindUnit(Code: TCodeBuffer; var AnUnitName,
|
function TCodeToolManager.FindUnitCaseInsensitive(Code: TCodeBuffer;
|
||||||
AnUnitInFilename: string): string;
|
var AnUnitName, AnUnitInFilename: string): string;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
|
DebugLn('TCodeToolManager.FindUnitCaseInsensitive A ',Code.Filename,' TheUnitName="',TheUnitName,'"');
|
||||||
|
{$ENDIF}
|
||||||
|
if not InitCurCodeTool(Code) then exit;
|
||||||
|
try
|
||||||
|
Result:=FCurCodeTool.FindUnitCaseInsensitive(AnUnitName,AnUnitInFilename);
|
||||||
|
except
|
||||||
|
on e: Exception do HandleException(e);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCodeToolManager.FindUnitSource(Code: TCodeBuffer; const AnUnitName,
|
||||||
|
AnUnitInFilename: string): TCodeBuffer;
|
||||||
|
begin
|
||||||
|
Result:=nil;
|
||||||
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TCodeToolManager.FindUnit A ',Code.Filename,' TheUnitName="',TheUnitName,'"');
|
DebugLn('TCodeToolManager.FindUnit A ',Code.Filename,' TheUnitName="',TheUnitName,'"');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not InitCurCodeTool(Code) then exit;
|
if not InitCurCodeTool(Code) then exit;
|
||||||
try
|
try
|
||||||
Result:=FCurCodeTool.FindUnitCaseInsensitive(AnUnitName,AnUnitInFilename);
|
Result:=FCurCodeTool.FindUnitSource(AnUnitName,AnUnitInFilename,false);
|
||||||
except
|
except
|
||||||
on e: Exception do HandleException(e);
|
on e: Exception do HandleException(e);
|
||||||
end;
|
end;
|
||||||
|
@ -70,11 +70,11 @@ type
|
|||||||
TypeData: PTypeData; Proc: TGetStringProc): boolean;
|
TypeData: PTypeData; Proc: TGetStringProc): boolean;
|
||||||
function PublishedMethodExists(const UpperClassName,
|
function PublishedMethodExists(const UpperClassName,
|
||||||
UpperMethodName: string; TypeData: PTypeData;
|
UpperMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
||||||
): boolean;
|
): boolean;
|
||||||
function PublishedMethodExists(ClassNode: TCodeTreeNode;
|
function PublishedMethodExists(ClassNode: TCodeTreeNode;
|
||||||
const UpperMethodName: string; TypeData: PTypeData;
|
const UpperMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean
|
||||||
): boolean;
|
): boolean;
|
||||||
function JumpToPublishedMethodBody(const UpperClassName,
|
function JumpToPublishedMethodBody(const UpperClassName,
|
||||||
UpperMethodName: string;
|
UpperMethodName: string;
|
||||||
@ -372,7 +372,7 @@ end;
|
|||||||
|
|
||||||
function TEventsCodeTool.PublishedMethodExists(const UpperClassName,
|
function TEventsCodeTool.PublishedMethodExists(const UpperClassName,
|
||||||
UpperMethodName: string; TypeData: PTypeData;
|
UpperMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
||||||
var ClassNode: TCodeTreeNode;
|
var ClassNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
ActivateGlobalWriteLock;
|
ActivateGlobalWriteLock;
|
||||||
@ -395,7 +395,7 @@ end;
|
|||||||
|
|
||||||
function TEventsCodeTool.PublishedMethodExists(ClassNode: TCodeTreeNode;
|
function TEventsCodeTool.PublishedMethodExists(ClassNode: TCodeTreeNode;
|
||||||
const UpperMethodName: string; TypeData: PTypeData;
|
const UpperMethodName: string; TypeData: PTypeData;
|
||||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean): boolean;
|
||||||
var
|
var
|
||||||
FoundContext: TFindContext;
|
FoundContext: TFindContext;
|
||||||
CompListSize: integer;
|
CompListSize: integer;
|
||||||
|
@ -42,10 +42,13 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, FileProcs, CodeTree, CodeAtom, PascalParserTool,
|
Classes, SysUtils, FileProcs, CodeTree, CodeAtom, PascalParserTool,
|
||||||
StdCodeTools, CodeTemplatesTool, KeywordFuncLists, BasicCodeTools,
|
StdCodeTools, CodeTemplatesTool, KeywordFuncLists, BasicCodeTools,
|
||||||
LinkScanner, AVL_Tree;
|
LinkScanner, CodeCache, AVL_Tree;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{ TMethodJumpingCodeTool }
|
||||||
|
|
||||||
TMethodJumpingCodeTool = class(TCodeTemplatesTool)
|
TMethodJumpingCodeTool = class(TCodeTemplatesTool)
|
||||||
protected
|
protected
|
||||||
procedure RemoveCorrespondingProcNodes(Tree1, Tree2: TAVLTree;
|
procedure RemoveCorrespondingProcNodes(Tree1, Tree2: TAVLTree;
|
||||||
@ -74,6 +77,11 @@ type
|
|||||||
Attr: TProcHeadAttributes): TStringList;
|
Attr: TProcHeadAttributes): TStringList;
|
||||||
function FindSubProcPath(SubProcPath: TStrings; Attr: TProcHeadAttributes;
|
function FindSubProcPath(SubProcPath: TStrings; Attr: TProcHeadAttributes;
|
||||||
SkipInterface: boolean): TCodeTreeNode;
|
SkipInterface: boolean): TCodeTreeNode;
|
||||||
|
|
||||||
|
function FindJumpPointForLinkerPos(const MangledFunction,
|
||||||
|
Identifier: string; out NewPos: TCodeXYPosition;
|
||||||
|
out NewTopLine: integer): boolean;
|
||||||
|
|
||||||
procedure WriteCodeTreeNodeExtTree(ExtTree: TAVLTree);
|
procedure WriteCodeTreeNodeExtTree(ExtTree: TAVLTree);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -940,6 +948,30 @@ begin
|
|||||||
Result:=SearchSubProcPath(StartNode,0);
|
Result:=SearchSubProcPath(StartNode,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMethodJumpingCodeTool.FindJumpPointForLinkerPos(
|
||||||
|
const MangledFunction, Identifier: string;
|
||||||
|
out NewPos: TCodeXYPosition; out NewTopLine: integer): boolean;
|
||||||
|
{ Examples:
|
||||||
|
GTK2_GTK_TYPE_CELL_RENDERER_COMBO$$LONGWORD
|
||||||
|
|
||||||
|
GTK2 is the unit.
|
||||||
|
GTK_TYPE_CELL_RENDERER_COMBO is the function or procedure name.
|
||||||
|
LONGWORD is the list of parameter types.
|
||||||
|
|
||||||
|
ADDFILETOAPACKAGEDLG_TADDFILETOAPACKAGEDIALOG_$__ADDFILETOAPACKAGEDLGCLOSE$TOBJECT$TCLOSEACTION
|
||||||
|
|
||||||
|
ADDFILETOAPACKAGEDLG is the unit.
|
||||||
|
TADDFILETOAPACKAGEDIALOG is the class.
|
||||||
|
ADDFILETOAPACKAGEDLGCLOSE is the method name.
|
||||||
|
$TOBJECT$TCLOSEACTION is the list of parameter types
|
||||||
|
}
|
||||||
|
begin
|
||||||
|
Result:=false;
|
||||||
|
BuildTree(false);
|
||||||
|
DebugLn(['TMethodJumpingCodeTool.FindJumpPointForLinkerPos ']);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMethodJumpingCodeTool.WriteCodeTreeNodeExtTree(ExtTree: TAVLTree);
|
procedure TMethodJumpingCodeTool.WriteCodeTreeNodeExtTree(ExtTree: TAVLTree);
|
||||||
var
|
var
|
||||||
AVLNode: TAVLTreeNode;
|
AVLNode: TAVLTreeNode;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/05/31]
|
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/06/19]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
|
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
|
||||||
BSDs = freebsd netbsd openbsd darwin
|
BSDs = freebsd netbsd openbsd darwin
|
||||||
UNIXs = linux $(BSDs) solaris qnx
|
UNIXs = linux $(BSDs) solaris qnx
|
||||||
LIMIT83fs = go32v2 os2 emx watcom
|
LIMIT83fs = go32v2 os2 emx watcom
|
||||||
@ -230,7 +230,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
|||||||
endif
|
endif
|
||||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
||||||
override PACKAGE_NAME=printer4lazarus
|
override PACKAGE_NAME=printer4lazarus
|
||||||
override PACKAGE_VERSION=0.5
|
override PACKAGE_VERSION=0.0.0.2
|
||||||
ifndef LCL_PLATFORM
|
ifndef LCL_PLATFORM
|
||||||
ifeq ($(OS_TARGET),win32)
|
ifeq ($(OS_TARGET),win32)
|
||||||
LCL_PLATFORM=win32
|
LCL_PLATFORM=win32
|
||||||
@ -275,6 +275,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
override TARGET_UNITS+=printer4lazarus.pas
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
override TARGET_UNITS+=printer4lazarus.pas
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
endif
|
endif
|
||||||
@ -344,9 +347,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
override TARGET_UNITS+=printer4lazarus.pas
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
override TARGET_UNITS+=printer4lazarus.pas
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
override TARGET_UNITS+=printer4lazarus.pas
|
override TARGET_UNITS+=printer4lazarus.pas
|
||||||
endif
|
endif
|
||||||
@ -386,6 +395,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
endif
|
endif
|
||||||
@ -455,9 +467,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||||
endif
|
endif
|
||||||
@ -497,6 +515,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
endif
|
endif
|
||||||
@ -566,9 +587,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
override COMPILER_OPTIONS+=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
|
||||||
endif
|
endif
|
||||||
@ -608,6 +635,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
endif
|
endif
|
||||||
@ -677,9 +707,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
override COMPILER_UNITDIR+=unix/ win32/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
|
||||||
endif
|
endif
|
||||||
@ -719,6 +755,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
@ -788,9 +827,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
@ -977,6 +1022,9 @@ endif
|
|||||||
ifndef INSTALL_DATADIR
|
ifndef INSTALL_DATADIR
|
||||||
INSTALL_DATADIR=$(INSTALL_BASEDIR)
|
INSTALL_DATADIR=$(INSTALL_BASEDIR)
|
||||||
endif
|
endif
|
||||||
|
ifndef INSTALL_SHAREDDIR
|
||||||
|
INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
|
||||||
|
endif
|
||||||
ifdef CROSSCOMPILE
|
ifdef CROSSCOMPILE
|
||||||
ifndef CROSSBINDIR
|
ifndef CROSSBINDIR
|
||||||
CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
|
CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
|
||||||
@ -997,7 +1045,9 @@ ASMEXT=.s
|
|||||||
SMARTEXT=.sl
|
SMARTEXT=.sl
|
||||||
STATICLIBEXT=.a
|
STATICLIBEXT=.a
|
||||||
SHAREDLIBEXT=.so
|
SHAREDLIBEXT=.so
|
||||||
|
SHAREDLIBPREFIX=libfp
|
||||||
STATICLIBPREFIX=libp
|
STATICLIBPREFIX=libp
|
||||||
|
IMPORTLIBPREFIX=libimp
|
||||||
RSTEXT=.rst
|
RSTEXT=.rst
|
||||||
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
||||||
ifeq ($(OS_TARGET),go32v1)
|
ifeq ($(OS_TARGET),go32v1)
|
||||||
@ -1110,6 +1160,11 @@ EXEEXT=
|
|||||||
HASSHAREDLIB=1
|
HASSHAREDLIB=1
|
||||||
SHORTSUFFIX=dwn
|
SHORTSUFFIX=dwn
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(OS_TARGET),gba)
|
||||||
|
EXEEXT=.gba
|
||||||
|
SHAREDLIBEXT=.so
|
||||||
|
SHORTSUFFIX=gba
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(OS_TARGET),go32v1)
|
ifeq ($(OS_TARGET),go32v1)
|
||||||
PPUEXT=.pp1
|
PPUEXT=.pp1
|
||||||
@ -1430,12 +1485,17 @@ endif
|
|||||||
endif
|
endif
|
||||||
export ZIPPROG
|
export ZIPPROG
|
||||||
ifndef TARPROG
|
ifndef TARPROG
|
||||||
|
TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
|
ifeq ($(TARPROG),)
|
||||||
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
|
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(TARPROG),)
|
ifeq ($(TARPROG),)
|
||||||
TARPROG= __missing_command_TARPROG
|
TARPROG= __missing_command_TARPROG
|
||||||
else
|
else
|
||||||
TARPROG:=$(firstword $(TARPROG))
|
TARPROG:=$(firstword $(TARPROG))
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
TARPROG:=$(firstword $(TARPROG))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
export TARPROG
|
export TARPROG
|
||||||
ASNAME=$(BINUTILSPREFIX)as
|
ASNAME=$(BINUTILSPREFIX)as
|
||||||
@ -1559,6 +1619,9 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),i386-darwin)
|
||||||
|
REQUIRE_PACKAGES_RTL=1
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),i386-emx)
|
ifeq ($(FULL_TARGET),i386-emx)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
endif
|
endif
|
||||||
@ -1628,9 +1691,15 @@ endif
|
|||||||
ifeq ($(FULL_TARGET),arm-linux)
|
ifeq ($(FULL_TARGET),arm-linux)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-palmos)
|
||||||
|
REQUIRE_PACKAGES_RTL=1
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),arm-wince)
|
ifeq ($(FULL_TARGET),arm-wince)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(FULL_TARGET),arm-gba)
|
||||||
|
REQUIRE_PACKAGES_RTL=1
|
||||||
|
endif
|
||||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
endif
|
endif
|
||||||
@ -1666,6 +1735,9 @@ endif
|
|||||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||||
override FPCOPT+=-T$(OS_TARGET)
|
override FPCOPT+=-T$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CPU_TARGET),$(CPU_SOURCE))
|
||||||
|
override FPCOPT+=-P$(CPU_TARGET)
|
||||||
|
endif
|
||||||
ifeq ($(OS_SOURCE),openbsd)
|
ifeq ($(OS_SOURCE),openbsd)
|
||||||
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
|
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
|
||||||
endif
|
endif
|
||||||
@ -1700,14 +1772,15 @@ override FPCOPT+=-gl
|
|||||||
override FPCOPTDEF+=DEBUG
|
override FPCOPTDEF+=DEBUG
|
||||||
endif
|
endif
|
||||||
ifdef RELEASE
|
ifdef RELEASE
|
||||||
|
ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
|
||||||
ifeq ($(CPU_TARGET),i386)
|
ifeq ($(CPU_TARGET),i386)
|
||||||
FPCCPUOPT:=-OG2p3
|
FPCCPUOPT:=-OG2p3
|
||||||
else
|
endif
|
||||||
ifeq ($(CPU_TARGET),powerpc)
|
ifeq ($(CPU_TARGET),powerpc)
|
||||||
FPCCPUOPT:=-O1r
|
FPCCPUOPT:=-O1r
|
||||||
else
|
|
||||||
FPCCPUOPT:=
|
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
FPCCPUOPT:=-O2
|
||||||
endif
|
endif
|
||||||
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
|
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
|
||||||
override FPCOPTDEF+=RELEASE
|
override FPCOPTDEF+=RELEASE
|
||||||
@ -1716,9 +1789,7 @@ ifdef STRIP
|
|||||||
override FPCOPT+=-Xs
|
override FPCOPT+=-Xs
|
||||||
endif
|
endif
|
||||||
ifdef OPTIMIZE
|
ifdef OPTIMIZE
|
||||||
ifeq ($(CPU_TARGET),i386)
|
override FPCOPT+=-O2
|
||||||
override FPCOPT+=-OG2p3
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
override FPCOPT+=-vwni
|
override FPCOPT+=-vwni
|
||||||
@ -1762,11 +1833,14 @@ override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
|
|||||||
override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
|
override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_TARGET),linux)
|
ifdef CREATESHARED
|
||||||
ifeq ($(FPC_VERSION),1.0.6)
|
override FPCOPT+=-Cg
|
||||||
override FPCOPTDEF+=HASUNIX
|
ifeq ($(CPU_TARGET),i386)
|
||||||
|
override FPCOPT+=-Aas
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifdef LINKSHARED
|
||||||
|
endif
|
||||||
ifdef OPT
|
ifdef OPT
|
||||||
override FPCOPT+=$(OPT)
|
override FPCOPT+=$(OPT)
|
||||||
endif
|
endif
|
||||||
@ -1781,6 +1855,14 @@ override FPCEXTCMD:=$(FPCOPT)
|
|||||||
override FPCOPT:=!FPCEXTCMD
|
override FPCOPT:=!FPCEXTCMD
|
||||||
export FPCEXTCMD
|
export FPCEXTCMD
|
||||||
endif
|
endif
|
||||||
|
override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
|
||||||
|
override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
|
||||||
|
ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
|
||||||
|
override ACROSSCOMPILE=1
|
||||||
|
endif
|
||||||
|
ifdef ACROSSCOMPILE
|
||||||
|
override FPCOPT+=$(CROSSOPT)
|
||||||
|
endif
|
||||||
override COMPILER:=$(FPC) $(FPCOPT)
|
override COMPILER:=$(FPC) $(FPCOPT)
|
||||||
ifeq (,$(findstring -s ,$(COMPILER)))
|
ifeq (,$(findstring -s ,$(COMPILER)))
|
||||||
EXECPPAS=
|
EXECPPAS=
|
||||||
@ -1802,7 +1884,7 @@ ifdef TARGET_RSTS
|
|||||||
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
|
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
|
||||||
override CLEANRSTFILES+=$(RSTFILES)
|
override CLEANRSTFILES+=$(RSTFILES)
|
||||||
endif
|
endif
|
||||||
.PHONY: fpc_all fpc_smart fpc_debug fpc_release
|
.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
|
||||||
$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
|
$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
|
||||||
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
||||||
fpc_all: $(FPCMADE)
|
fpc_all: $(FPCMADE)
|
||||||
@ -1843,6 +1925,38 @@ vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
|||||||
vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
||||||
vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
|
vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
|
||||||
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
||||||
|
.PHONY: fpc_shared
|
||||||
|
override INSTALLTARGET+=fpc_shared_install
|
||||||
|
ifndef SHARED_LIBVERSION
|
||||||
|
SHARED_LIBVERSION=$(FPC_VERSION)
|
||||||
|
endif
|
||||||
|
ifndef SHARED_LIBNAME
|
||||||
|
SHARED_LIBNAME=$(PACKAGE_NAME)
|
||||||
|
endif
|
||||||
|
ifndef SHARED_FULLNAME
|
||||||
|
SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
|
||||||
|
endif
|
||||||
|
ifndef SHARED_LIBUNITS
|
||||||
|
SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
|
||||||
|
override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
|
||||||
|
endif
|
||||||
|
fpc_shared:
|
||||||
|
ifdef HASSHAREDLIB
|
||||||
|
$(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
|
||||||
|
ifneq ($(SHARED_BUILD),n)
|
||||||
|
$(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
@$(ECHO) Shared Libraries not supported
|
||||||
|
endif
|
||||||
|
fpc_shared_install:
|
||||||
|
ifneq ($(SHARED_BUILD),n)
|
||||||
|
ifneq ($(SHARED_LIBUNITS),)
|
||||||
|
ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
|
||||||
|
$(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
|
.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
|
||||||
ifdef INSTALL_UNITS
|
ifdef INSTALL_UNITS
|
||||||
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
|
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
|
||||||
@ -1851,7 +1965,7 @@ ifdef INSTALL_BUILDUNIT
|
|||||||
override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
|
override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
|
||||||
endif
|
endif
|
||||||
ifdef INSTALLPPUFILES
|
ifdef INSTALLPPUFILES
|
||||||
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
||||||
ifneq ($(UNITTARGETDIRPREFIX),)
|
ifneq ($(UNITTARGETDIRPREFIX),)
|
||||||
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
|
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
|
||||||
override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
|
override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
|
||||||
@ -2003,7 +2117,7 @@ ifdef CLEAN_UNITS
|
|||||||
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
|
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
|
||||||
endif
|
endif
|
||||||
ifdef CLEANPPUFILES
|
ifdef CLEANPPUFILES
|
||||||
override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
|
override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
|
||||||
ifdef DEBUGSYMEXT
|
ifdef DEBUGSYMEXT
|
||||||
override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
|
override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
|
||||||
endif
|
endif
|
||||||
@ -2173,7 +2287,7 @@ smart: fpc_smart
|
|||||||
release: fpc_release
|
release: fpc_release
|
||||||
units: fpc_units
|
units: fpc_units
|
||||||
examples:
|
examples:
|
||||||
shared:
|
shared: fpc_shared
|
||||||
install: fpc_install
|
install: fpc_install
|
||||||
sourceinstall: fpc_sourceinstall
|
sourceinstall: fpc_sourceinstall
|
||||||
exampleinstall: fpc_exampleinstall
|
exampleinstall: fpc_exampleinstall
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Makefile.fpc for Printer4Lazarus 0.5
|
# Makefile.fpc for Printer4Lazarus 0.0.0.2
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name=printer4lazarus
|
name=printer4lazarus
|
||||||
version=0.5
|
version=0.0.0.2
|
||||||
|
|
||||||
[compiler]
|
[compiler]
|
||||||
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)
|
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||||
|
@ -9337,7 +9337,6 @@ var MaxMessages: integer;
|
|||||||
NewFilename: String;
|
NewFilename: String;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
//DebugLn('TMainIDE.DoJumpToCompilerMessage Index=',dbgs(Index));
|
|
||||||
MaxMessages:=MessagesView.VisibleItemCount;
|
MaxMessages:=MessagesView.VisibleItemCount;
|
||||||
if Index>=MaxMessages then exit;
|
if Index>=MaxMessages then exit;
|
||||||
if (Index<0) then begin
|
if (Index<0) then begin
|
||||||
@ -9353,8 +9352,13 @@ begin
|
|||||||
inc(Index);
|
inc(Index);
|
||||||
end;
|
end;
|
||||||
if Index>=MaxMessages then exit;
|
if Index>=MaxMessages then exit;
|
||||||
MessagesView.SelectedMessageIndex:=Index;
|
|
||||||
end;
|
end;
|
||||||
|
MessagesView.SelectedMessageIndex:=Index;
|
||||||
|
|
||||||
|
// first try the plugins
|
||||||
|
if MessagesView.ExecuteMsgLinePlugin(imqfoJump) then exit;
|
||||||
|
|
||||||
|
// default: jump to source position
|
||||||
MessagesView.GetVisibleMessageAt(Index,CurMsg,CurDir);
|
MessagesView.GetVisibleMessageAt(Index,CurMsg,CurDir);
|
||||||
if TheOutputFilter.GetSourcePosition(CurMsg,Filename,LogCaretXY,MsgType)
|
if TheOutputFilter.GetSourcePosition(CurMsg,Filename,LogCaretXY,MsgType)
|
||||||
then begin
|
then begin
|
||||||
|
@ -30,8 +30,8 @@ unit MsgQuickFixes;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, IDEMsgIntf, TextTools, LazarusIDEStrConsts,
|
Classes, SysUtils, Dialogs, FileUtil, LCLProc, IDEMsgIntf, TextTools,
|
||||||
LazIDEIntf, CodeCache, CodeToolManager;
|
LazarusIDEStrConsts, ProjectIntf, LazIDEIntf, CodeCache, CodeToolManager;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -43,6 +43,14 @@ type
|
|||||||
function IsApplicable(Line: TIDEMessageLine): boolean; override;
|
function IsApplicable(Line: TIDEMessageLine): boolean; override;
|
||||||
procedure Execute(const Msg: TIDEMessageLine; Step: TIMQuickFixStep); override;
|
procedure Execute(const Msg: TIDEMessageLine; Step: TIMQuickFixStep); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TQuickFixLinkerUndefinedReference }
|
||||||
|
|
||||||
|
TQuickFixLinkerUndefinedReference = class(TIDEMsgQuickFixItem)
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
procedure Execute(const Msg: TIDEMessageLine; Step: TIMQuickFixStep); override;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure QuickFixParameterNotUsed(Sender: TObject; Step: TIMQuickFixStep;
|
procedure QuickFixParameterNotUsed(Sender: TObject; Step: TIMQuickFixStep;
|
||||||
Msg: TIDEMessageLine);
|
Msg: TIDEMessageLine);
|
||||||
@ -121,6 +129,7 @@ begin
|
|||||||
'Unit "[a-z_0-9]+" not used in [a-z_0-9]+',[imqfoMenuItem],
|
'Unit "[a-z_0-9]+" not used in [a-z_0-9]+',[imqfoMenuItem],
|
||||||
nil,@QuickFixUnitNotUsed);
|
nil,@QuickFixUnitNotUsed);
|
||||||
RegisterIDEMsgQuickFix(TQuickFixUnitNotFoundPosition.Create);
|
RegisterIDEMsgQuickFix(TQuickFixUnitNotFoundPosition.Create);
|
||||||
|
RegisterIDEMsgQuickFix(TQuickFixLinkerUndefinedReference.Create);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure FreeStandardIDEQuickFixItems;
|
procedure FreeStandardIDEQuickFixItems;
|
||||||
@ -175,5 +184,94 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TQuickFixLinkerUndefinedReference }
|
||||||
|
|
||||||
|
constructor TQuickFixLinkerUndefinedReference.Create;
|
||||||
|
begin
|
||||||
|
Name:='Linker: undefined reference to';
|
||||||
|
Steps:=[imqfoJump];
|
||||||
|
RegExpression:='^(: .* `(.*)'')|((.*)\(\.text.*?\): .* `([A-Z0-9_$]+)'':)$';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TQuickFixLinkerUndefinedReference.Execute(const Msg: TIDEMessageLine;
|
||||||
|
Step: TIMQuickFixStep);
|
||||||
|
{ Example:
|
||||||
|
/usr/lib/fpc/2.1.1/units/i386-linux/gtk2/gtk2.o(.text+0xbba1): In function `GTK2_GTK_TYPE_CELL_RENDERER_COMBO$$LONGWORD':
|
||||||
|
undefined reference to `gtk_cell_renderer_combo_get_type'
|
||||||
|
}
|
||||||
|
|
||||||
|
procedure Error(const Msg: string);
|
||||||
|
begin
|
||||||
|
DebugLn('TQuickFixLinkerUndefinedReference.Execute ',Msg);
|
||||||
|
MessageDlg('TQuickFixLinkerUndefinedReference.Execute',
|
||||||
|
Msg,mtError,[mbCancel],0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure JumpTo(Line1, Line2: TIDEMessageLine);
|
||||||
|
var
|
||||||
|
Identifier: String;
|
||||||
|
Filename: String;
|
||||||
|
MangledFunction: String;
|
||||||
|
CurProject: TLazProject;
|
||||||
|
CodeBuf: TCodeBuffer;
|
||||||
|
NewCode: TCodeBuffer;
|
||||||
|
NewX, NewY, NewTopLine: integer;
|
||||||
|
AnUnitName: String;
|
||||||
|
begin
|
||||||
|
DebugLn(['JumpTo START ',Line1.Msg]);
|
||||||
|
if not REMatches(Line1.Msg,'^(.*)\(\.text.*?\): .* `([A-Z0-9_$]+)'':$')
|
||||||
|
then
|
||||||
|
exit;
|
||||||
|
Filename:=REVar(1);
|
||||||
|
MangledFunction:=REVar(2);
|
||||||
|
if not REMatches(Line2.Msg,'^: .* `(.*)''$') then exit;
|
||||||
|
Identifier:=REVar(1);
|
||||||
|
DebugLn(['TQuickFixLinkerUndefinedReference.JumpTo Filename="',Filename,'" MangledFunction="',MangledFunction,'" Identifier="',Identifier,'"']);
|
||||||
|
CurProject:=LazarusIDE.ActiveProject;
|
||||||
|
if CurProject=nil then begin
|
||||||
|
Error('no project');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if (CurProject.MainFile=nil) then begin
|
||||||
|
Error('no main file in project');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if (CurProject.MainFile=nil) then begin
|
||||||
|
Error('no main file in project');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
CodeBuf:=CodeToolBoss.FindFile(CurProject.MainFile.Filename);
|
||||||
|
if (CodeBuf=nil) then begin
|
||||||
|
Error('project main file has no source');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
AnUnitName:=ExtractFilenameOnly(Filename);
|
||||||
|
CodeBuf:=CodeToolBoss.FindUnitSource(CodeBuf,AnUnitName,'');
|
||||||
|
if (CodeBuf=nil) then begin
|
||||||
|
Error('unit not found: '+AnUnitName);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if not CodeToolBoss.JumpToLinkerIdentifier(CodeBuf,
|
||||||
|
MangledFunction,Identifier,NewCode,NewX,NewY,NewTopLine)
|
||||||
|
then begin
|
||||||
|
Error('function not found: '+MangledFunction+' Identifier='+Identifier);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
LazarusIDE.DoOpenFileAndJumpToPos(NewCode.Filename,Point(NewX,NewY),
|
||||||
|
NewTopLine,-1,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
inherited Execute(Msg, Step);
|
||||||
|
if Step=imqfoJump then begin
|
||||||
|
DebugLn(['TQuickFixLinkerUndefinedReference.Execute ',Msg.Msg,' ',REMatches(Msg.Msg,'^(.*)\(\.text.*?\): .* `([A-Z0-9_$]+)'':$')]);
|
||||||
|
if (Msg.Position>0) and REMatches(Msg.Msg,'^: .* `(.*)''$') then
|
||||||
|
JumpTo(IDEMessagesWindow[Msg.Position-1],Msg)
|
||||||
|
else if (Msg.Position<IDEMessagesWindow.LinesCount-1)
|
||||||
|
and REMatches(Msg.Msg,'^(.*)\(\.text.*?\): .* `([A-Z0-9_$]+)'':$') then
|
||||||
|
JumpTo(Msg,IDEMessagesWindow[Msg.Position+1]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ type
|
|||||||
function FindNextItem(const Filename: string;
|
function FindNextItem(const Filename: string;
|
||||||
FirstLine, LineCount: integer): TAVLTreeNode;
|
FirstLine, LineCount: integer): TAVLTreeNode;
|
||||||
procedure UpdateMsgSrcPos(Line: TLazMessageLine);
|
procedure UpdateMsgSrcPos(Line: TLazMessageLine);
|
||||||
|
function GetLines(Index: integer): TIDEMessageLine; override;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -137,7 +138,7 @@ type
|
|||||||
procedure BeginBlock;
|
procedure BeginBlock;
|
||||||
procedure EndBlock;
|
procedure EndBlock;
|
||||||
procedure ClearItems;
|
procedure ClearItems;
|
||||||
function ItemCount: integer;
|
function LinesCount: integer; override;
|
||||||
function VisibleItemCount: integer;
|
function VisibleItemCount: integer;
|
||||||
function MsgCount: integer;
|
function MsgCount: integer;
|
||||||
procedure FilterLines(Filter: TOnFilterLine);
|
procedure FilterLines(Filter: TOnFilterLine);
|
||||||
@ -145,18 +146,19 @@ type
|
|||||||
procedure SrcEditLinesInsertedDeleted(const Filename: string;
|
procedure SrcEditLinesInsertedDeleted(const Filename: string;
|
||||||
FirstLine, LineCount: Integer);
|
FirstLine, LineCount: Integer);
|
||||||
procedure UpdateMsgLineInListBox(Line: TLazMessageLine);
|
procedure UpdateMsgLineInListBox(Line: TLazMessageLine);
|
||||||
|
function ExecuteMsgLinePlugin(Step: TIMQuickFixStep): boolean;
|
||||||
procedure ConsistencyCheck;
|
procedure ConsistencyCheck;
|
||||||
public
|
public
|
||||||
property LastLineIsProgress: boolean Read FLastLineIsProgress
|
property LastLineIsProgress: boolean read FLastLineIsProgress
|
||||||
Write SetLastLineIsProgress;
|
write SetLastLineIsProgress;
|
||||||
property Message: string Read GetMessage;
|
property Message: string read GetMessage;
|
||||||
property Directory: string Read GetDirectory;
|
property Directory: string read GetDirectory;
|
||||||
property SelectedMessageIndex: integer Read GetSelectedLineIndex // visible index
|
property SelectedMessageIndex: integer read GetSelectedLineIndex // visible index
|
||||||
Write SetSelectedLineIndex;
|
write SetSelectedLineIndex;
|
||||||
property OnSelectionChanged: TNotifyEvent
|
property OnSelectionChanged: TNotifyEvent
|
||||||
Read FOnSelectionChanged Write FOnSelectionChanged;
|
read FOnSelectionChanged write FOnSelectionChanged;
|
||||||
property Items[Index: integer]: TLazMessageLine Read GetItems;
|
property Items[Index: integer]: TLazMessageLine read GetItems;
|
||||||
property VisibleItems[Index: integer]: TLazMessageLine Read GetVisibleItems;
|
property VisibleItems[Index: integer]: TLazMessageLine read GetVisibleItems;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -372,8 +374,8 @@ begin
|
|||||||
//ConsistencyCheck;
|
//ConsistencyCheck;
|
||||||
//DebugLn('TMessagesView.Add START ItemCount=',dbgs(ItemCount),' VisibleCount=',dbgs(VisibleItemCount),' ListBoxCount=',dbgs(MessageListBox.Items.Count),' ProgressLine=',dbgs(ProgressLine),' VisibleLine=',dbgs(VisibleLine),' OriginalIndex=',dbgs(OriginalIndex),' Msg="',Msg,'"');
|
//DebugLn('TMessagesView.Add START ItemCount=',dbgs(ItemCount),' VisibleCount=',dbgs(VisibleItemCount),' ListBoxCount=',dbgs(MessageListBox.Items.Count),' ProgressLine=',dbgs(ProgressLine),' VisibleLine=',dbgs(VisibleLine),' OriginalIndex=',dbgs(OriginalIndex),' Msg="',Msg,'"');
|
||||||
NewMsg:=nil;
|
NewMsg:=nil;
|
||||||
if ItemCount>0 then begin
|
if LinesCount>0 then begin
|
||||||
LastItem:=Items[ItemCount-1];
|
LastItem:=Items[LinesCount-1];
|
||||||
if (OriginalIndex>=0) and (LastItem.OriginalIndex=OriginalIndex) then begin
|
if (OriginalIndex>=0) and (LastItem.OriginalIndex=OriginalIndex) then begin
|
||||||
// already added
|
// already added
|
||||||
NewMsg:=LastItem;
|
NewMsg:=LastItem;
|
||||||
@ -475,7 +477,7 @@ begin
|
|||||||
if (SrcLines=nil) or (SrcLines.Count=0) then exit;
|
if (SrcLines=nil) or (SrcLines.Count=0) then exit;
|
||||||
|
|
||||||
StartOriginalIndex:=SrcLines[0].OriginalIndex;
|
StartOriginalIndex:=SrcLines[0].OriginalIndex;
|
||||||
DestStartIndex:=ItemCount-1;
|
DestStartIndex:=LinesCount-1;
|
||||||
while (DestStartIndex>=0)
|
while (DestStartIndex>=0)
|
||||||
and (Items[DestStartIndex].OriginalIndex<>StartOriginalIndex) do
|
and (Items[DestStartIndex].OriginalIndex<>StartOriginalIndex) do
|
||||||
dec(DestStartIndex);
|
dec(DestStartIndex);
|
||||||
@ -510,7 +512,7 @@ begin
|
|||||||
SrcLine:=SrcLines[i];
|
SrcLine:=SrcLines[i];
|
||||||
DebugLn('TMessagesView.CollectLineParts i=',dbgs(i),' SrcLine=',MsgAsString(SrcLine));
|
DebugLn('TMessagesView.CollectLineParts i=',dbgs(i),' SrcLine=',MsgAsString(SrcLine));
|
||||||
end;
|
end;
|
||||||
for i:=0 to ItemCount-1 do begin
|
for i:=0 to LinesCount-1 do begin
|
||||||
DestLine:=Items[i];
|
DestLine:=Items[i];
|
||||||
DebugLn('TMessagesView.CollectLineParts i=',dbgs(i),' DestLine=',MsgAsString(DestLine));
|
DebugLn('TMessagesView.CollectLineParts i=',dbgs(i),' DestLine=',MsgAsString(DestLine));
|
||||||
end;}
|
end;}
|
||||||
@ -527,7 +529,7 @@ begin
|
|||||||
if LastSeparator >= 0 then
|
if LastSeparator >= 0 then
|
||||||
begin
|
begin
|
||||||
while (VisibleItemCount > LastSeparator) do
|
while (VisibleItemCount > LastSeparator) do
|
||||||
DeleteLine(ItemCount - 1);
|
DeleteLine(LinesCount - 1);
|
||||||
FLastLineIsProgress := False;
|
FLastLineIsProgress := False;
|
||||||
end;
|
end;
|
||||||
EndBlock;
|
EndBlock;
|
||||||
@ -634,6 +636,34 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMessagesView.ExecuteMsgLinePlugin(Step: TIMQuickFixStep): boolean;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
QuickFixItem: TIDEMsgQuickFixItem;
|
||||||
|
Msg: TLazMessageLine;
|
||||||
|
begin
|
||||||
|
Result:=false;
|
||||||
|
Msg:=GetMessageLine;
|
||||||
|
if Msg=nil then exit;
|
||||||
|
for i:=0 to IDEMsgQuickFixes.Count-1 do begin
|
||||||
|
QuickFixItem:=IDEMsgQuickFixes[i];
|
||||||
|
//DebugLn(['TMessagesView.ExecuteMsgLinePlugin ',Msg.Msg,' ',QuickFixItem.Name]);
|
||||||
|
if (Step in QuickFixItem.Steps)
|
||||||
|
and QuickFixItem.IsApplicable(Msg) then begin
|
||||||
|
Result:=true;
|
||||||
|
QuickFixItem.Execute(Msg,Step);
|
||||||
|
if Msg.Msg='' then begin
|
||||||
|
// message fixed -> delete
|
||||||
|
DeleteLine(Msg.Position);
|
||||||
|
end else begin
|
||||||
|
UpdateMsgSrcPos(Msg);
|
||||||
|
UpdateMsgLineInListBox(Msg);
|
||||||
|
end;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
TMessagesView.Clear
|
TMessagesView.Clear
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -693,7 +723,7 @@ begin
|
|||||||
FLastLineIsProgress:=false;
|
FLastLineIsProgress:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMessagesView.ItemCount: integer;
|
function TMessagesView.LinesCount: integer;
|
||||||
begin
|
begin
|
||||||
Result := FItems.Count;
|
Result := FItems.Count;
|
||||||
end;
|
end;
|
||||||
@ -896,6 +926,7 @@ begin
|
|||||||
UpdateMsgSrcPos(Msg);
|
UpdateMsgSrcPos(Msg);
|
||||||
UpdateMsgLineInListBox(Msg);
|
UpdateMsgLineInListBox(Msg);
|
||||||
end;
|
end;
|
||||||
|
exit;
|
||||||
//ConsistencyCheck;
|
//ConsistencyCheck;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -970,6 +1001,11 @@ begin
|
|||||||
Line.Node:=FSrcPositions.Add(Line);
|
Line.Node:=FSrcPositions.Add(Line);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMessagesView.GetLines(Index: integer): TIDEMessageLine;
|
||||||
|
begin
|
||||||
|
Result:=Items[Index];
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMessagesView.ConsistencyCheck;
|
procedure TMessagesView.ConsistencyCheck;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
@ -113,8 +113,9 @@ type
|
|||||||
{ TIDEMsgQuickFixItem }
|
{ TIDEMsgQuickFixItem }
|
||||||
|
|
||||||
TIMQuickFixStep = (
|
TIMQuickFixStep = (
|
||||||
imqfoMenuItem, // add menu item in popup menu for this item
|
imqfoMenuItem, // add menu item in popup menu for this item
|
||||||
imqfoImproveMessage // rewrites message
|
imqfoImproveMessage, // rewrites message
|
||||||
|
imqfoJump // user clicks on message
|
||||||
);
|
);
|
||||||
TIMQuickFixSteps = set of TIMQuickFixStep;
|
TIMQuickFixSteps = set of TIMQuickFixStep;
|
||||||
|
|
||||||
@ -172,10 +173,16 @@ type
|
|||||||
property Items[Index: integer]: TIDEMsgQuickFixItem read GetItems; default;
|
property Items[Index: integer]: TIDEMsgQuickFixItem read GetItems; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TIDEMessagesWindowInterface }
|
||||||
|
|
||||||
TIDEMessagesWindowInterface = class(TForm)
|
TIDEMessagesWindowInterface = class(TForm)
|
||||||
|
protected
|
||||||
|
function GetLines(Index: integer): TIDEMessageLine; virtual; abstract;
|
||||||
public
|
public
|
||||||
procedure Clear; virtual; abstract;
|
procedure Clear; virtual; abstract;
|
||||||
procedure AddMsg(const Msg, CurDir: string; OriginalIndex: integer); virtual; abstract;
|
procedure AddMsg(const Msg, CurDir: string; OriginalIndex: integer); virtual; abstract;
|
||||||
|
property Lines[Index: integer]: TIDEMessageLine read GetLines; default;
|
||||||
|
function LinesCount: integer; virtual; abstract;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user