You've already forked lazarus-ccr
Added $(IDEBuildOptions) to custom options
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5710 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -30,7 +30,8 @@
|
|||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CustomOptions Value="-FcUTF8"/>
|
<CustomOptions Value="$(IDEBuildOptions)
|
||||||
|
-FcUTF8"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="This is a TiniFile implementation that is resistant to tampering.
|
<Description Value="This is a TiniFile implementation that is resistant to tampering.
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
<GenerateDebugInfo Value="False"/>
|
<GenerateDebugInfo Value="False"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CustomOptions Value="$(IDEBuildOptions)
|
||||||
|
-FcUTF8"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="Laz AutoUpdater
|
<Description Value="Laz AutoUpdater
|
||||||
A component for SourceForge and GitHub Project Developers and end-users to update their apps easily.
|
A component for SourceForge and GitHub Project Developers and end-users to update their apps easily.
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Other>
|
||||||
|
<CustomOptions Value="$(IDEBuildOptions)"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="TLongTimer is a descendant of TIdleTimer that samples every 30minutes when idle.
|
<Description Value="TLongTimer is a descendant of TIdleTimer that samples every 30minutes when idle.
|
||||||
It is intended for TTrayIcon applications. DailyHour is a 24-hour clock (16 = 4pm) and MonthlyDate is best < 29 "/>
|
It is intended for TTrayIcon applications. DailyHour is a 24-hour clock (16 = 4pm) and MonthlyDate is best < 29 "/>
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
<GenerateDebugInfo Value="False"/>
|
<GenerateDebugInfo Value="False"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CustomOptions Value="$(IDEBuildOptions)
|
||||||
|
-FcUTF8"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="Simple component to play wave files under Windows or Linux"/>
|
<Description Value="Simple component to play wave files under Windows or Linux"/>
|
||||||
<License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com
|
<License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 55 KiB |
@ -49,7 +49,7 @@ Copyright (C)2014 minesadorada@charcodelvalle.com
|
|||||||
along with this library; if not, write to the Free Software Foundation,
|
along with this library; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
"/>
|
"/>
|
||||||
<Version Major="1" Release="4"/>
|
<Version Major="1" Minor="1"/>
|
||||||
<Files Count="2">
|
<Files Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="upoweredby.pas"/>
|
<Filename Value="upoweredby.pas"/>
|
||||||
|
@ -34,8 +34,9 @@ unit uPoweredby;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Controls, Dialogs, Forms, Graphics, LResources, SysUtils,
|
{$IFDEF WINDOWS}Windows, JwaWindows,{$ENDIF}Classes, Controls, Dialogs,
|
||||||
ExtCtrls, InterfaceBase, LCLType,LCLVersion,AboutPoweredbyunit;
|
Forms, Graphics, LResources, SysUtils,
|
||||||
|
ExtCtrls, InterfaceBase, LCLType, LCLVersion, AboutPoweredbyunit;
|
||||||
|
|
||||||
const
|
const
|
||||||
C_VERSIONSTRING = '1.0.4.0';
|
C_VERSIONSTRING = '1.0.4.0';
|
||||||
@ -59,16 +60,19 @@ type
|
|||||||
fVersionString: string;
|
fVersionString: string;
|
||||||
fDelayMilliseconds: integer;
|
fDelayMilliseconds: integer;
|
||||||
fFadeInMilliseconds: integer;
|
fFadeInMilliseconds: integer;
|
||||||
fShowOnlyOnce,fAlreadyShown:Boolean;
|
fShowOnlyOnce, fAlreadyShown: boolean;
|
||||||
// Used by Timer to close the PoweredBy form
|
// Used by Timer to close the PoweredBy form
|
||||||
procedure ClosePoweredByForm(Sender: TObject);
|
procedure ClosePoweredByForm(Sender: TObject);
|
||||||
// Windows only!
|
// Windows only!
|
||||||
procedure FadeInPoweredBy(Sender: TObject);
|
procedure FadeInPoweredBy(Sender: TObject);
|
||||||
procedure SetDelayMilliSeconds(AValue: integer);
|
procedure SetDelayMilliSeconds(AValue: integer);
|
||||||
function GetWidgetSetString: string;
|
function GetWidgetSetString: string;
|
||||||
Function GetFPCTargetInfoString: String;
|
function GetFPCTargetInfoString: string;
|
||||||
Function GetInfoLCLVersion:String;
|
function GetInfoLCLVersion: string;
|
||||||
Function GetInfoFPCVersion:String;
|
function GetInfoFPCVersion: string;
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
procedure MakeTransparentWindow(var AForm: TForm; var AImage: TImage);
|
||||||
|
{$ENDIF}
|
||||||
protected
|
protected
|
||||||
{ Protected declarations }
|
{ Protected declarations }
|
||||||
public
|
public
|
||||||
@ -80,25 +84,27 @@ type
|
|||||||
published
|
published
|
||||||
{ Published declarations }
|
{ Published declarations }
|
||||||
// Minimum delay=1000msec; Maximum delay=10000msec. Fade-in time is automatically adjusted
|
// Minimum delay=1000msec; Maximum delay=10000msec. Fade-in time is automatically adjusted
|
||||||
property DelayMilliSecs: integer read fDelayMilliSeconds write SetDelayMilliSeconds default 1000;
|
property DelayMilliSecs: integer read fDelayMilliSeconds
|
||||||
|
write SetDelayMilliSeconds default 1000;
|
||||||
// Call the method 'ShowPoweredByForm' to show the shaped window
|
// Call the method 'ShowPoweredByForm' to show the shaped window
|
||||||
property Version: string read fVersionString;
|
property Version: string read fVersionString;
|
||||||
// Reports the current WidgetSet
|
// Reports the current WidgetSet
|
||||||
property InfoWidgetSet: string read GetWidgetSetString;
|
property InfoWidgetSet: string read GetWidgetSetString;
|
||||||
// Reports your current Environment
|
// Reports your current Environment
|
||||||
property InfoFPCTarget:String read GetFPCTargetInfoString;
|
property InfoFPCTarget: string read GetFPCTargetInfoString;
|
||||||
// Reports your current Environment
|
// Reports your current Environment
|
||||||
property InfoFPCVersion:String read GetInfoFPCVersion;
|
property InfoFPCVersion: string read GetInfoFPCVersion;
|
||||||
// Reports your current Environment
|
// Reports your current Environment
|
||||||
property InfoLCLVersion:String read GetInfoLCLVersion;
|
property InfoLCLVersion: string read GetInfoLCLVersion;
|
||||||
// Useful if you have ShowPoweredByForm in your TForm.Activate() method
|
// Useful if you have ShowPoweredByForm in your TForm.Activate() method
|
||||||
property ShowOnlyOnce:boolean read fShowOnlyOnce write fShowOnlyOnce default false;
|
property ShowOnlyOnce: boolean read fShowOnlyOnce write fShowOnlyOnce default False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
Uses {$IF (lcl_major > 0) and (lcl_minor > 6)}LCLPlatformDef {$ENDIF};
|
|
||||||
|
uses {$IF (lcl_major > 0) and (lcl_minor > 6)}LCLPlatformDef {$ENDIF};
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
@ -113,35 +119,38 @@ begin
|
|||||||
fVersionString := C_VERSIONSTRING;
|
fVersionString := C_VERSIONSTRING;
|
||||||
fDelayMilliseconds := 1000;
|
fDelayMilliseconds := 1000;
|
||||||
fFadeInMilliseconds := 20;
|
fFadeInMilliseconds := 20;
|
||||||
fAlreadyShown:=False;
|
fAlreadyShown := False;
|
||||||
fShowOnlyOnce:=False;
|
fShowOnlyOnce := False;
|
||||||
// About dialog
|
// About dialog
|
||||||
AboutBoxComponentName:='PoweredBy component';
|
AboutBoxComponentName := 'PoweredBy component';
|
||||||
AboutBoxWidth:=400;
|
AboutBoxWidth := 400;
|
||||||
// AboutBoxHeight (integer)
|
// AboutBoxHeight (integer)
|
||||||
AboutBoxDescription:='Component that shows a Powered By graphic.' + LineEnding +
|
AboutBoxDescription := 'Component that shows a Powered By graphic.' +
|
||||||
'Use method ShowPoweredByForm in your form.create()' + LineEnding +
|
LineEnding + 'Use method ShowPoweredByForm in your form.create()' +
|
||||||
'to use the component';
|
LineEnding + 'to use the component';
|
||||||
AboutBoxBackgroundColor:=clWindow;
|
AboutBoxBackgroundColor := clWindow;
|
||||||
AboutBoxFontName:='Arial';
|
AboutBoxFontName := 'Arial';
|
||||||
AboutBoxFontSize:=10;
|
AboutBoxFontSize := 10;
|
||||||
AboutBoxVersion:=C_VERSIONSTRING;
|
AboutBoxVersion := C_VERSIONSTRING;
|
||||||
AboutBoxAuthorname:='Gordon Bamber';
|
AboutBoxAuthorname := 'Gordon Bamber';
|
||||||
AboutBoxOrganisation:='Public Domain';
|
AboutBoxOrganisation := 'Public Domain';
|
||||||
AboutBoxAuthorEmail:='minesadorada@charcodelvalle.com';
|
AboutBoxAuthorEmail := 'minesadorada@charcodelvalle.com';
|
||||||
AboutBoxLicenseType:='MODIFIEDGPL';
|
AboutBoxLicenseType := 'MODIFIEDGPL';
|
||||||
end;
|
end;
|
||||||
Function TPoweredby.GetInfoLCLVersion:String;
|
|
||||||
|
function TPoweredby.GetInfoLCLVersion: string;
|
||||||
begin
|
begin
|
||||||
result:=lcl_version;
|
Result := lcl_version;
|
||||||
end;
|
end;
|
||||||
Function TPoweredby.GetInfoFPCVersion:String;
|
|
||||||
|
function TPoweredby.GetInfoFPCVersion: string;
|
||||||
begin
|
begin
|
||||||
Result:={$I %FPCVERSION%};
|
Result:={$I %FPCVERSION%};
|
||||||
end;
|
end;
|
||||||
Function TPoweredby.GetFPCTargetInfoString: String;
|
|
||||||
|
function TPoweredby.GetFPCTargetInfoString: string;
|
||||||
begin
|
begin
|
||||||
Result := {$I %FPCTARGETCPU%}+' - '+{$I %FPCTARGETOS%};
|
Result := {$I %FPCTARGETCPU%}+' - '+{$I %FPCTARGETOS%};
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function priv_GetWidgetSetString: string;
|
function priv_GetWidgetSetString: string;
|
||||||
@ -212,35 +221,62 @@ Choices are:
|
|||||||
lpCustomDrawn
|
lpCustomDrawn
|
||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
Result:=FALSE;
|
Result := False;
|
||||||
{
|
|
||||||
case WidgetSet.LCLPlatform of
|
case WidgetSet.LCLPlatform of
|
||||||
lpWin32, lpQT: Result := True;
|
lpWin32, lpQT: Result := True;
|
||||||
else
|
else
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
procedure TPoweredby.MakeTransparentWindow(var AForm: TForm; var AImage: TImage);
|
||||||
|
var
|
||||||
|
BlendFunction: TBlendFunction;
|
||||||
|
Size: TSize;
|
||||||
|
P: TPoint;
|
||||||
|
ExStyle: DWORD;
|
||||||
|
begin
|
||||||
|
with AForm do
|
||||||
|
begin
|
||||||
|
ExStyle := GetWindowLongA(Handle, GWL_EXSTYLE);
|
||||||
|
if (ExStyle and WS_EX_LAYERED = 0) then
|
||||||
|
SetWindowLong(Handle, GWL_EXSTYLE, ExStyle or WS_EX_LAYERED);
|
||||||
|
ClientWidth := AImage.picture.Bitmap.Width;
|
||||||
|
ClientHeight := AImage.picture.Bitmap.Height;
|
||||||
|
P.x := 0;
|
||||||
|
P.y := 0;
|
||||||
|
Size.cx := AImage.picture.Bitmap.Width;
|
||||||
|
Size.cy := AImage.picture.Bitmap.Height;
|
||||||
|
BlendFunction.BlendOp := AC_SRC_OVER;
|
||||||
|
BlendFunction.BlendFlags := 0;
|
||||||
|
BlendFunction.SourceConstantAlpha := 255;
|
||||||
|
BlendFunction.AlphaFormat := AC_SRC_ALPHA;
|
||||||
|
UpdateLayeredWindow(Handle, 0, nil, @Size, AImage.picture.Bitmap.Canvas.Handle,
|
||||||
|
@P, 0, @BlendFunction, ULW_ALPHA);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TPoweredby.ShowPoweredByForm;
|
procedure TPoweredby.ShowPoweredByForm;
|
||||||
|
|
||||||
// Graphics are in masks.lrs
|
// Graphics are in graphics.lrs
|
||||||
// 1 ) Constructs a new TForm with an image control
|
// 1 ) Constructs a new TForm with an image control
|
||||||
// 2 ) Uses the 'SetShape' method of the form canvas to create a transparent mask
|
// 2 ) Sets a timer to fade it in using the Alphablend property
|
||||||
// 3 ) Paints the Timage over it with a color image
|
// 3 ) Sets another timer to close the form
|
||||||
// 4 ) Sets a timer to fade it in using the Alphablend property
|
|
||||||
// 5 ) Sets another timer to close the form
|
|
||||||
|
|
||||||
// Note: Windows can fade in a shaped transparent screen
|
// Note: Windows can fade in a shaped transparent screen
|
||||||
// But some widgetsets (GTK,Carbon) cannot
|
// But some widgetsets (GTK,Carbon) cannot
|
||||||
var
|
var
|
||||||
img_Background: TImage;
|
img_Background: TImage;
|
||||||
MyBitmap: TBitMap;
|
|
||||||
DelayTimer: TTimer;
|
DelayTimer: TTimer;
|
||||||
FadeInTimer: TTImer;
|
FadeInTimer: TTImer;
|
||||||
begin
|
begin
|
||||||
// Respect the ShowOnlyOnce property setting
|
// Respect the ShowOnlyOnce property setting
|
||||||
If ((fShowOnlyOnce=TRUE) AND (fAlreadyShown=TRUE)) then Exit;
|
if ((fShowOnlyOnce = True) and (fAlreadyShown = True)) then
|
||||||
|
Exit;
|
||||||
|
|
||||||
// Try..Finally so we can be sure resources are Freed
|
// Try..Finally so we can be sure resources are Freed
|
||||||
try
|
try
|
||||||
@ -250,12 +286,6 @@ begin
|
|||||||
fPoweredByForm.AlphaBlend := True;
|
fPoweredByForm.AlphaBlend := True;
|
||||||
fPoweredByForm.AlphaBlendValue := 0;
|
fPoweredByForm.AlphaBlendValue := 0;
|
||||||
img_background := TImage.Create(fPoweredByForm);
|
img_background := TImage.Create(fPoweredByForm);
|
||||||
// Bitmap mask - Load from resource
|
|
||||||
MyBitmap := TBitMap.Create;
|
|
||||||
MyBitmap.Monochrome := True;
|
|
||||||
MyBitmap.LoadFromLazarusResource('powered_by_mask');
|
|
||||||
MyBitMap.Transparent := True;
|
|
||||||
MyBitMap.TransparentColor := clBlack;
|
|
||||||
// Delay Timer
|
// Delay Timer
|
||||||
Delaytimer := TTimer.Create(fPoweredByForm);
|
Delaytimer := TTimer.Create(fPoweredByForm);
|
||||||
delaytimer.Interval := fDelayMilliseconds;
|
delaytimer.Interval := fDelayMilliseconds;
|
||||||
@ -272,9 +302,9 @@ begin
|
|||||||
Stretch := True;
|
Stretch := True;
|
||||||
Parent := fPoweredByForm;
|
Parent := fPoweredByForm;
|
||||||
if CanShowRoundedGraphic then
|
if CanShowRoundedGraphic then
|
||||||
Picture.LoadFromLazarusResource('win_powered_by')
|
Picture.LoadFromLazarusResource('powered_by_graphic')
|
||||||
else
|
else
|
||||||
Picture.LoadFromLazarusResource('powered_by');
|
Picture.LoadFromLazarusResource('linux_powered_by_graphic');
|
||||||
OnClick := @ClosePoweredByForm;
|
OnClick := @ClosePoweredByForm;
|
||||||
SendToBack;
|
SendToBack;
|
||||||
end;
|
end;
|
||||||
@ -283,31 +313,27 @@ begin
|
|||||||
begin
|
begin
|
||||||
position := poScreenCenter;
|
position := poScreenCenter;
|
||||||
borderstyle := bsnone;
|
borderstyle := bsnone;
|
||||||
|
bordericons:=[];
|
||||||
formstyle := fsSystemStayOnTop;
|
formstyle := fsSystemStayOnTop;
|
||||||
OnClick := @ClosePoweredByForm;
|
OnClick := @ClosePoweredByForm;
|
||||||
color := clBlack;
|
color := clNone;
|
||||||
Height := MyBitmap.Height;
|
Scaled:=True;
|
||||||
Width := MyBitMap.Width;
|
|
||||||
if CanShowRoundedGraphic then
|
if CanShowRoundedGraphic then
|
||||||
begin
|
begin
|
||||||
MyBitMap.Transparent := True;
|
MakeTransparentWindow(fPoweredByForm,img_background);
|
||||||
MyBitMap.TransparentColor := clBlack;
|
|
||||||
Canvas.Draw(0, 0, MyBitMap);
|
|
||||||
// raises Floating Point Error in linux GTK (!??)
|
|
||||||
SetShape(MyBitMap);
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
// If square graphic, then adjust form size
|
// If square graphic, then adjust form size
|
||||||
height:=img_background.Picture.Height;
|
Height := img_background.Picture.Height;
|
||||||
width:=img_background.picture.width;
|
Width := img_background.picture.Width;
|
||||||
end;
|
end;
|
||||||
// Now show the completed form
|
// Now show the completed form
|
||||||
delaytimer.Enabled := True;
|
delaytimer.Enabled := True;
|
||||||
FadeInTimer.Enabled := True;
|
FadeInTimer.Enabled := True;
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
ShowModal; // Closed via the Timer event or a user click
|
ShowModal; // Closed via the Timer event or a user click
|
||||||
fAlreadyShown:=TRUE;
|
fAlreadyShown := True;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
On E: Exception do
|
On E: Exception do
|
||||||
@ -315,7 +341,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
FreeAndNil(img_background);
|
FreeAndNil(img_background);
|
||||||
FreeAndNil(MyBitMap);
|
|
||||||
FreeAndNil(delayTimer);
|
FreeAndNil(delayTimer);
|
||||||
FreeAndNil(FadeInTimer);
|
FreeAndNil(FadeInTimer);
|
||||||
FreeAndNil(fPoweredByForm);
|
FreeAndNil(fPoweredByForm);
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Other>
|
||||||
|
<CustomOptions Value="$(IDEBuildOptions)
|
||||||
|
-FcUTF8"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="Graphic surface that scrolls (when Active=True) that can be loaded with a Stringlist"/>
|
<Description Value="Graphic surface that scrolls (when Active=True) that can be loaded with a Stringlist"/>
|
||||||
<License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com
|
<License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com
|
||||||
|
Reference in New Issue
Block a user