mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 11:29:18 +02:00
removed CustApp defines
git-svn-id: trunk@4721 -
This commit is contained in:
parent
87c8cd928e
commit
6a07969e0d
@ -173,8 +173,10 @@ begin
|
||||
DoDirSeparators(TheFilename);
|
||||
{$IFDEF win32}
|
||||
// windows
|
||||
Result:=(copy(TheFilename,1,2)='\\') or ((length(TheFilename)>3) and
|
||||
(upcase(TheFilename[1]) in ['A'..'Z']) and (copy(TheFilename,2,2)=':\'));
|
||||
Result:=((length(TheFilename)>=2) and (TheFilename[1] in ['A'..'Z','a'..'z'])
|
||||
and (TheFilename[2])=':'))
|
||||
or ((length(TheFilename)>=2)
|
||||
and (TheFilename[1]='\') and (TheFilename[2]='\'));
|
||||
{$ELSE}
|
||||
Result:=(TheFilename<>'') and (TheFilename[1]='/');
|
||||
{$ENDIF}
|
||||
|
34
lcl/forms.pp
34
lcl/forms.pp
@ -40,14 +40,10 @@ interface
|
||||
{ $DEFINE UseFCLDataModule}
|
||||
{$ENDIF}
|
||||
|
||||
{$DEFINE UseCustApp This flag will soon become permanent and be deleted}
|
||||
|
||||
uses
|
||||
Classes, Controls, LCLStrConsts, VCLGlobals, SysUtils, LCLType, LCLProc,
|
||||
LCLIntf, InterfaceBase, GraphType, Graphics, Menus, LMessages, CustomTimer,
|
||||
ActnList, ClipBrd
|
||||
{$IFDEF UseCustApp},CustApp{$ENDIF}
|
||||
;
|
||||
ActnList, ClipBrd,CustApp;
|
||||
|
||||
type
|
||||
TProcedure = procedure;
|
||||
@ -729,11 +725,7 @@ type
|
||||
);
|
||||
TApplicationFlags = set of TApplicationFlag;
|
||||
|
||||
{$IFDEF UseCustApp}
|
||||
TApplication = class(TCustomApplication)
|
||||
{$ELSE}
|
||||
TApplication = class(TComponent)
|
||||
{$ENDIF}
|
||||
private
|
||||
FCaptureExceptions: boolean;
|
||||
FFlags: TApplicationFlags;
|
||||
@ -764,12 +756,6 @@ type
|
||||
FOnUserInput: TOnUserInputEvent;
|
||||
FOnUserInputHandler: TMethodList;
|
||||
FShowHint: Boolean;
|
||||
{$IFNDEF UseCustApp}
|
||||
FHelpFile: string;
|
||||
FTerminate : Boolean;
|
||||
FTitle : String;
|
||||
FOnException: TExceptionEvent;
|
||||
{$ENDIF}
|
||||
procedure DoOnIdleEnd;
|
||||
function GetCurrentHelpFile: string;
|
||||
function GetExename: String;
|
||||
@ -788,16 +774,14 @@ type
|
||||
function ValidateHelpSystem: Boolean;
|
||||
procedure WndProc(var AMessage : TLMessage);
|
||||
protected
|
||||
{$IFDEF UseCustApp}
|
||||
Function GetConsoleApplication: boolean; override;
|
||||
{$ENDIF}
|
||||
procedure NotifyIdleHandler;
|
||||
procedure NotifyIdleEndHandler;
|
||||
function IsHintMsg(var Msg: TMsg): Boolean;
|
||||
procedure DoOnMouseMove; virtual;
|
||||
procedure ShowHintWindow(const Info: THintInfoAtMouse);
|
||||
procedure OnHintTimer(Sender: TObject);
|
||||
procedure SetTitle(const AValue: String); {$IFDEF UseCustApp}override;{$ENDIF}
|
||||
procedure SetTitle(const AValue: String); override;
|
||||
procedure StartHintTimer(Interval: integer; TimerType: TAppHintTimerType);
|
||||
procedure UpdateVisible;
|
||||
public
|
||||
@ -807,7 +791,7 @@ type
|
||||
Procedure BringToFront;
|
||||
procedure CreateForm(InstanceClass: TComponentClass; var Reference);
|
||||
function HandleAllocated: boolean;
|
||||
procedure HandleException(Sender: TObject); {$IFDEF UseCustApp}override;{$ENDIF}
|
||||
procedure HandleException(Sender: TObject); override;
|
||||
procedure HandleMessage;
|
||||
function HelpCommand(Command: Integer; Data: Longint): Boolean;
|
||||
function HelpContext(Context: THelpContext): Boolean;
|
||||
@ -819,13 +803,13 @@ type
|
||||
procedure HideHint;
|
||||
procedure HintMouseMessage(Control : TControl; var AMessage: TLMessage);
|
||||
property Icon: TIcon read FIcon write SetIcon;
|
||||
procedure Initialize; {$IFDEF UseCustApp}override;{$ENDIF}
|
||||
procedure Initialize; override;
|
||||
function MessageBox(Text, Caption: PChar; Flags: Longint): Integer;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
Procedure ProcessMessages;
|
||||
procedure Run;
|
||||
procedure ShowException(E: Exception); {$IFDEF UseCustApp}override;{$ENDIF}
|
||||
procedure Terminate; {$IFDEF UseCustApp}override;{$ENDIF}
|
||||
procedure ShowException(E: Exception); override;
|
||||
procedure Terminate; override;
|
||||
procedure NotifyUserInputHandler(Msg: Cardinal);
|
||||
procedure NotifyKeyDownHandler(Sender: TObject;
|
||||
var Key : Word; Shift : TShiftState);
|
||||
@ -858,12 +842,6 @@ type
|
||||
property OnUserInput: TOnUserInputEvent read FOnUserInput write FOnUserInput;
|
||||
property ShowHint: Boolean read FShowHint write SetShowHint;
|
||||
property Title: String read GetTitle write SetTitle;
|
||||
{$IFNDEF UseCustApp}
|
||||
property Exename: String read GetExeName;
|
||||
property HelpFile: string read FHelpFile write FHelpFile;
|
||||
property Terminated: Boolean read FTerminate;
|
||||
property OnException: TExceptionEvent read FOnException write FOnException;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
||||
|
@ -210,9 +210,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TApplication.Initialize;
|
||||
begin
|
||||
{$IFDEF UseCustApp}
|
||||
inherited Initialize;
|
||||
{$ENDIF}
|
||||
// interface object and screen
|
||||
if (InterfaceObject=nil)
|
||||
or (AnsiCompareText(InterfaceObject.Classname,'TINTERFACEBASE')=0) then begin
|
||||
@ -387,9 +385,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TApplication.SetTitle(const AValue: String);
|
||||
begin
|
||||
{$IFDEF UseCustApp}
|
||||
inherited SetTitle(AValue);
|
||||
{$ENDIF}
|
||||
// ToDo: tell the interface
|
||||
end;
|
||||
|
||||
@ -691,10 +687,8 @@ begin
|
||||
Halt;
|
||||
end;
|
||||
Include(FFlags,AppHandlingException);
|
||||
{$IFDEF UseCustApp}
|
||||
if StopOnException then
|
||||
inherited Terminate;
|
||||
{$ENDIF}
|
||||
// before we do anything, write it down
|
||||
if ExceptObject is Exception then begin
|
||||
writeln('TApplication.HandleException ',Exception(ExceptObject).Message);
|
||||
@ -865,12 +859,10 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF UseCustApp}
|
||||
function TApplication.GetConsoleApplication: boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TApplication.SetHint(const AValue: string);
|
||||
begin
|
||||
@ -933,7 +925,7 @@ begin
|
||||
if AppNoExceptionMessages in FFlags then exit;
|
||||
Msg := E.Message;
|
||||
if (Msg <> '') and (Msg[length(Msg)] <> '.') then Msg := Msg + '.';
|
||||
if (not {$IFDEF UseCustApp}Terminated{$ELSE}FTerminate{$ENDIF})
|
||||
if (not Terminated)
|
||||
and (Self<>nil) then begin
|
||||
MsgResult:=MessageBox(PChar(Msg),PChar(GetTitle),
|
||||
MB_OKCANCEL + MB_ICONERROR);
|
||||
@ -943,11 +935,7 @@ begin
|
||||
Halt;
|
||||
end;
|
||||
end else
|
||||
{$IFDEF UseCustApp}
|
||||
inherited ShowException(E);
|
||||
{$ELSE}
|
||||
SysUtils.ShowException(ExceptObject, ExceptAddr);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -956,11 +944,7 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TApplication.Terminate;
|
||||
begin
|
||||
{$IFDEF UseCustApp}
|
||||
inherited Terminate;
|
||||
{$ELSE}
|
||||
FTerminate := True;
|
||||
{$ENDIF}
|
||||
InterfaceObject.AppTerminate;
|
||||
end;
|
||||
|
||||
@ -1131,6 +1115,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.63 2003/10/21 18:44:10 mattias
|
||||
removed CustApp defines
|
||||
|
||||
Revision 1.62 2003/08/22 13:51:25 mattias
|
||||
fixed TApplication.GetTitle
|
||||
|
||||
|
@ -116,6 +116,10 @@ else
|
||||
cat fpcsrc.spec | \
|
||||
sed -e "s/LAZVERSION/$LazVersion/g" -e "s/LAZRELEASE/$LazRelease/" \
|
||||
> $SpecFile
|
||||
|
||||
# copy custom rpm scripts
|
||||
cp smart_strip.sh /tmp/smart_strip.sh
|
||||
cp do_nothing.sh /tmp/do_nothing.sh
|
||||
|
||||
# build rpm
|
||||
rpmbuild -ba $SpecFile || rpm -ba $SpecFile
|
||||
|
@ -12,6 +12,15 @@ BuildRoot: %{_tmppath}/fpcsrc-build%{version}
|
||||
%define fpcsrcdir %{_datadir}/fpcsrc
|
||||
%define destdir %{buildroot}%{fpcsrcdir}/
|
||||
|
||||
# The normal redhat rpm scripts tests every installed file for requirements.
|
||||
# We install only sources, so we don't need the requirements.
|
||||
%define __find_provides /tmp/do_nothing.sh
|
||||
%define __find_requires /tmp/do_nothing.sh
|
||||
|
||||
# The normal redhat rpm scripts does not recognize properly, what files to strip
|
||||
# Hook our own strip command
|
||||
%define __strip /tmp/smart_strip.sh
|
||||
|
||||
%description
|
||||
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
|
||||
Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Author: Mattias Gaertner
|
||||
#
|
||||
# Normally just calls strip with the same parameters. Special files, which can
|
||||
# not be stripped are skipped
|
||||
|
||||
Params=$@
|
||||
for p in $Params; do
|
||||
|
Loading…
Reference in New Issue
Block a user