diff --git a/components/playsoundpackage/demo/demo.res b/components/playsoundpackage/demo/demo.res index 6c7c81ce6..9865471d2 100644 Binary files a/components/playsoundpackage/demo/demo.res and b/components/playsoundpackage/demo/demo.res differ diff --git a/components/playsoundpackage/TPlaysound.png b/components/playsoundpackage/latest_stable/TPlaysound.png similarity index 100% rename from components/playsoundpackage/TPlaysound.png rename to components/playsoundpackage/latest_stable/TPlaysound.png diff --git a/components/playsoundpackage/aboutplaysound.pas b/components/playsoundpackage/latest_stable/aboutplaysound.pas similarity index 97% rename from components/playsoundpackage/aboutplaysound.pas rename to components/playsoundpackage/latest_stable/aboutplaysound.pas index c4a34065f..4bee04833 100644 --- a/components/playsoundpackage/aboutplaysound.pas +++ b/components/playsoundpackage/latest_stable/aboutplaysound.pas @@ -1,624 +1,624 @@ -{ TAboutPlaySound and TAboutBox Component License - - Copyright (C) 2014 Gordon Bamber minesadorada@charcodelvalle.com - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -} - -// Change the name of this unit and its PAS file to be unique to your component -// Unit Aboutunit -unit aboutplaysound; - -{$mode objfpc}{$H+} - -interface - -uses - Classes, Controls, Dialogs, Forms, Graphics, LResources, SysUtils, - ExtCtrls, StdCtrls, StrUtils,Buttons,PropEdits; -const - C_DEFAULTLICENSEFORMWIDTH = 500; - C_DEFAULTLICENSEFORMWIDTH_LINUX = C_DEFAULTLICENSEFORMWIDTH + 100; - C_DEFAULTLICENSEFORMHEIGHT = 400; - C_DEFAULTLICENSEFORMHEIGHT_LINUX = C_DEFAULTLICENSEFORMHEIGHT + 50; - -type - TLicenseType = (abNone, abGPL, abLGPL, abMIT, abModifiedGPL, abProprietry); - tAboutBox=Class; // Forward declaration - // Do Search/Replace to change all instances of TAboutComonent - // to TAbout - TAboutPlaySound = class(TComponent) - // This class can descend from any component class (TGraphicControl etc - private - { Private declarations } - fAboutBox: tAboutBox; - procedure SetMyComponentName(Const Avalue:String); - procedure SetAboutBoxWidth(Const AValue:Integer); - procedure SetAboutBoxHeight(Const AValue:Integer); - procedure SetAboutBoxDescription(Const AValue:String); - procedure SetAboutBoxFontName(Const AValue:String); - procedure SetAboutBoxFontSize(Const AValue:Integer); - procedure SetAboutBoxBitmap(Const AValue:TBitmap); - procedure SetAboutBoxBackgroundColor(Const AValue:TColor); - procedure SetAboutBoxTitle(Const AValue:String); - - procedure SetAboutBoxVersion(Const AValue:String); - procedure SetAboutBoxAuthorname(Const AValue:String); - procedure SetAboutBoxOrganisation(Const AValue:String); - procedure SetAboutBoxAuthorEmail(Const AValue:String); - procedure SetAboutBoxBackgroundResourceName(Const AValue:String); - procedure SetAboutBoxLicenseType(Const AValue:String); - procedure SetAboutBoxStretchBackgroundImage(Const AValue:Boolean); - protected - { Protected declarations } - public - { Public declarations } - constructor Create(AOwner: TComponent); override; // Constructor must be public - destructor Destroy; override; // Destructor must be public - - // Set these (hidden) properties in your inherited component's Create procedure - property AboutBoxComponentName:String write SetMyComponentName; - property AboutBoxWidth:Integer write SetAboutBoxWidth; - property AboutBoxHeight:Integer write SetAboutBoxHeight; - property AboutBoxDescription:String write SetAboutBoxDescription; - property AboutBoxFontName:String write SetAboutBoxFontName; - property AboutBoxFontSize:Integer write SetAboutBoxFontSize; - property AboutBoxBackgroundColor:TColor write SetAboutBoxBackgroundColor; - property AboutBoxTitle:String write SetAboutBoxTitle; - - property AboutBoxVersion:String write SetAboutBoxVersion; - property AboutBoxAuthorname:String write SetAboutBoxAuthorname; - property AboutBoxOrganisation:String write SetAboutBoxOrganisation; - property AboutBoxAuthorEmail:String write SetAboutBoxAuthorEmail; - property AboutBoxLicenseType:String write SetAboutBoxLicenseType; - property AboutBoxBackgroundResourceName:String write SetAboutBoxBackgroundResourceName; - property AboutBoxStretchBackgroundImage:Boolean write SetAboutBoxStretchBackgroundImage; - published - // The clickable 'About' property will automaticcally appear in any component - // descended from TAboutPlaySound - - // About this component... - property About: tAboutBox read fAboutBox write fAboutBox; - end; - TAboutbox = class(TComponent) - private - { Private declarations } - fDialog: TForm; - fBackgroundbitmap: TBitMap; - fBackgroundResourceName:String; - fDescription: TStrings; - fDialogTitle, fVersion, fAuthorname, fAuthorEmail, fOrganisation, - fComponentName: string; - fDialogHeight, fDialogWidth: integer; - fStretchBackground: boolean; - fFont: TFont; - fColor: TColor; - fLicenseType: TLicenseType; - procedure SetBackgroundBitmap(const AValue: TBitMap); - procedure SetDescriptionStrings(const AValue: TStrings); - procedure SetFont(const AValue: TFont); - procedure ShowLicense(Sender: TObject); - procedure SetDialogTitle(Const AValue:String); - protected - { Protected declarations } - public - { Public declarations } - procedure ShowDialog; - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - published - { Published declarations } - // Set these properties in your component Constructor method - property BackGround: TBitMap read fBackgroundbitmap write SetBackgroundBitmap; - property BackgroundResourceName:String read fBackgroundResourceName write fBackgroundResourceName; - property Description: TStrings read fDescription write SetDescriptionStrings; - property Title: string read fDialogTitle write SetDialogTitle; - property Height: integer read fDialogHeight write fDialogHeight; - property Width: integer read fDialogWidth write fDialogWidth; - property Font: TFont read fFont write SetFont; - property BackGroundColor: TColor read fColor write fColor; - property StretchBackground: boolean read fStretchBackground - write fStretchBackground default False; - property Version: string read fVersion write fVersion; - property Authorname: string read fAuthorname write fAuthorname; - property Organisation: string read fOrganisation write fOrganisation; - property AuthorEmail: string read fAuthorEmail write fAuthorEmail; - property ComponentName: string read fComponentName write fComponentName; - property LicenseType: TLicenseType read fLicenseType write fLicenseType; - end; - - // Declaration for the 'About' property editor - TAboutPropertyEditor = class(TClassPropertyEditor) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -procedure Register; - -{For i8n if required} -resourcestring - rs_Componentname='Component name'; - rs_About='About'; - rs_License='License'; - rs_By='By'; - rs_For='For'; - rs_DatafileMissing='Resource datafile license.lrs is missing'; - rs_LicenseTextError='There is something wrong with the Licence text'; - rs_AboutBoxError = 'Subcomponent TAboutBox Error'; - - -implementation - -{ TABoutBox} - -constructor TAboutbox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - fBackgroundbitmap := TBitMap.Create; - fDescription := TStringList.Create; - fFont := TFont.Create; - fColor := clDefault; - fLicenseType := abNone; - fComponentName:=rs_Componentname; - fDialogTitle:=rs_About + ' ' + fComponentName; - - fDialogWidth:=320; - fDialogHeight:=280; - fVersion:='1.0.0.0'; - fLicenseType:=abNone; -end; - -destructor TAboutbox.Destroy; -begin - FreeAndNil(fFont); - FreeAndNil(fDescription); - FreeAndNil(fBackgroundbitmap); - inherited Destroy; -end; -procedure TAboutbox.SetDialogTitle(Const AValue:String); -begin - if AnsiContainsText(fDialogTitle, rs_About) then - fDialogTitle := AValue - else - fDialogTitle := rs_About + ' ' + Avalue; -end; - -procedure TAboutbox.ShowDialog; -var - OKbutton, LicenseButton: TBitBtn; - lbl_Description: TLabel; - img_BackGround: TImage; - sz: string; - iCount: integer; - r:TLResource; -begin - fDialog := TForm.CreateNew(nil); - try //.. finally FreeAndNil everything - with fDialog do - begin - // Set Dialog properties - position := poScreenCenter; - borderstyle := bsToolWindow; - Caption := fDialogTitle; - formstyle := fsSystemStayOnTop; - color := fColor; - font := fFont; - if (fDialogHeight > 0) then - Height := fDialogHeight - else - Height := 240; - if (fDialogWidth > 0) then - Width := fDialogWidth - else - Width := 320; - - // Create a background image - img_BackGround := Timage.Create(fDialog); - with img_BackGround do - // Set img_BackGround properties - begin - Align := alClient; - Stretch := fStretchBackground; - // Bitmap assigned? - if Assigned(fBackgroundbitmap) then - Picture.Assign(fBackgroundbitmap); - // Resource file? - r := LazarusResources.Find(fBackgroundResourceName); - if r <> nil then - img_BackGround.Picture.LoadFromLazarusResource(fBackgroundResourceName); - SendToBack; - parent := fDialog; - end; - - // Create a BitBtn button - okbutton := TBitBtn.Create(fDialog); - // Set BitBtn properties - with okButton do - begin - Kind := bkClose; - left := (fDialog.Width div 2) - Width div 2; - top := fDialog.Height - Height - 10; - ParentFont:=False; - parent := fDialog; - end; - - // Create a License Button - LicenseButton := TBitBtn.Create(fDialog); - if (fLicenseType <> abNone) then - // Put it on the right - begin - LicenseButton.Top := OKButton.Top; - LicenseButton.Caption := rs_License + '...'; - LicenseButton.left := Width - LicenseButton.Width - 10; - LicenseButton.OnClick := @ShowLicense; - LicenseButton.ParentFont:=False; - LicenseButton.Parent := fDialog; - end; - - - // Create a label control - lbl_Description := Tlabel.Create(fDialog); - // Set label properties - with lbl_Description do - begin - left := 8; - Top := 30; - Width := fDialog.Width - 8; - Height := fDialog.Height - 30; - Autosize := False; - ParentFont := True; - Alignment := taCenter; - end; - - // Build up Label text - sz := ''; - // Component name - if fComponentName <> '' then - sz += fComponentName + LineEnding; - // Author name (+Email) - if fAuthorname <> '' then - sz += rs_By + ': ' + fAuthorname + LineEnding; - if fAuthorEmail <> '' then - sz += ' (' + fAuthorEmail + ')' + LineEnding - else - sz += LineEnding; - - sz += LineEnding; - - // Version - if fVersion <> '' then - sz += 'Version: ' + fVersion + LineEnding; - // License - case fLicenseType of - abGPL: sz += rs_License + ': GPL' + LineEnding; - abLGPL: sz += rs_License + ': LGPL' + LineEnding; - abMIT: sz += rs_License + ': M.I.T.' + LineEnding; - abModifiedGPL: sz += rs_License + ': Modified GPL' + LineEnding; - abProprietry: sz += rs_License + ': Proprietry' + LineEnding; - end; - if fOrganisation <> '' then - sz += rs_For + ': ' + fOrganisation + LineEnding; - if fDescription.Count > 0 then - begin - sz += LineEnding; - for iCount := 1 to fDescription.Count do - sz += fDescription[iCount - 1] + LineEnding; - end; - - lbl_Description.Caption := sz; - lbl_Description.parent := fDialog; - // Display the dialog modally - ShowModal; - end; - finally - // Free all resources - FreeAndNil(img_BackGround); - FreeAndNil(lbl_Description); - FreeAndNil(LicenseButton); - FreeAndNil(okbutton); - end; -end; - -procedure TAboutbox.ShowLicense(Sender: TObject); -// Triggered by License button Click -var - sLicenseString: string; - theList: TStringList; - f: integer; - LicenceForm: TForm; - lblText: TLabel; - closebuttton: TBitBtn; - r: TLResource; - szLicenseFile: string; -begin - // Quit early? - if fLicenseType = abNone then - Exit; - - // Set to resource name in license.lrs - case fLicenseType of - abNone: szLicenseFile := ''; - abGPL: szLicenseFile := 'gpl.txt'; - abLGPL: szLicenseFile := 'lgpl.txt'; - abMIT: szLicenseFile := 'mit.txt'; - abModifiedgpl: szLicenseFile := 'modifiedgpl.txt'; - end; - - - // Use a string list to split the text file into lines - theList := TStringList.Create; - // Create a window, label and close button on-the-fly - LicenceForm := TForm.Create(nil); - lblText := TLabel.Create(LicenceForm); - closebuttton := TBitBtn.Create(LicenceForm); - // Load up the text into variable 'sLicenseString' - sLicenseString := LineEnding + LineEnding + fComponentName + LineEnding; - try - try - begin - // Load license text from resource string - r := LazarusResources.Find(szLicenseFile); - if r = nil then - raise Exception.Create(rs_DatafileMissing); - thelist.Add(r.Value); - for f := 0 to TheList.Count - 1 do - sLicenseString += TheList[f] + LineEnding; - end; - except - On e: Exception do - MessageDlg(rs_AboutBoxError, - rs_LicenseTextError, mtError, [mbOK], 0); - end; - - // Replace boilerplate text if possible - sLicenseString := AnsiReplaceText(sLicenseString, '', -{$I %DATE%} - ); - sLicenseString := AnsiReplaceText(sLicenseString, '', fAuthorname); - sLicenseString := AnsiReplaceText(sLicenseString, '', - '(' + fAuthorEmail + ')'); - sLicenseString := AnsiReplaceText(sLicenseString, '', - fOrganisation); - - // Make up the form window and controls - with LicenceForm do - begin - // Form - {$IFDEF WINDOWS} - // More compact GUI? - Width := C_DEFAULTLICENSEFORMWIDTH; - Height := C_DEFAULTLICENSEFORMHEIGHT; - {$ELSE WINDOWS} - Width := C_DEFAULTLICENSEFORMWIDTH_LINUX; - Height := C_DEFAULTLICENSEFORMHEIGHT_LINUX; - {$ENDIF} - // autosize:=true; - // If you enable autosize, the button placement goes awry! - - // The Modified GPL has an extra clause - if (szLicenseFile = 'modifiedgpl.txt') or - (Pos('As a special exception', sLicenseString) > 0) then - Height := Height + 100; - position := poScreenCenter; - borderstyle := bsToolWindow; - Caption := fComponentName + ': Licensing'; - formstyle := fsSystemStayOnTop; - - // Label - lblText.Align := alClient; - lblText.Alignment := taCenter; - lblText.Caption := sLicenseString; - lblText.Parent := LicenceForm; - - // Close Button - closebuttton.Kind := bkClose; - closebuttton.left := (Width div 2) - closebuttton.Width div 2; - closebuttton.top := Height - closebuttton.Height - 10; - closebuttton.parent := LicenceForm; - // Show modally over the existing modal form - PopupParent := TForm(Sender); - ShowModal; - end; - finally - // Free up all component created resources from memory - FreeAndNil(theList); - FreeAndNil(lblText); - FreeAndNil(closebuttton); - FreeAndNil(LicenceForm); - end; -end; - -procedure TAboutbox.SetBackgroundBitmap(const AValue: TBitMap); -begin - if Assigned(AValue) then - fBackgroundbitmap.Assign(AValue); -end; - -procedure TAboutbox.SetDescriptionStrings(const AValue: TStrings); -begin - if Assigned(AValue) then - fDescription.Assign(Avalue); -end; - -procedure TAboutbox.SetFont(const AValue: TFont); -begin - if Assigned(AValue) then - fFont.Assign(AValue); -end; - -{ TAboutPlaySound } - -procedure Register; -begin - RegisterPropertyEditor(TypeInfo(TAboutbox), - TAboutPlaySound, 'About', TAboutPropertyEditor); -end; - -procedure TAboutPropertyEditor.Edit; -// Communicate with the component properties -Var - AAboutBox:TAboutBox; -begin - AAboutBox:=TAboutBox(GetObjectValue(TAboutBox)); - AABoutBox.ShowDialog; -end; - -function TAboutPropertyEditor.GetAttributes: TPropertyAttributes; - // Show the ellipsis -begin - Result := [paDialog, paReadOnly]; -end; - -// Sets for AboutBox dialog properties -procedure TAboutPlaySound.SetMyComponentName(Const Avalue:String); -begin - fAboutBox.ComponentName:=AValue; - fAboutBox.Title:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxWidth(Const AValue:Integer); -begin - fAboutBox.Width:=Avalue; -end; -procedure TAboutPlaySound.SetAboutBoxHeight(Const AValue:Integer); -begin - fAboutBox.Height:=Avalue; -end; -procedure TAboutPlaySound.SetAboutBoxDescription(Const AValue:String); -begin - fAboutBox.Description.Clear; - fAboutBox.Description.Add(AValue); -end; -procedure TAboutPlaySound.SetAboutBoxFontName(Const AValue:String); -begin - fAboutBox.Font.Name:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxFontSize(Const AValue:Integer); -begin - if (AValue > 6) then fAboutBox.Font.Size:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxTitle(Const AValue:String); -begin - fAboutBox.Title:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxBitmap(Const AValue:TBitmap); -begin - If Assigned(Avalue) then fAboutBox.Assign(AValue); -end; -procedure TAboutPlaySound.SetAboutBoxBackgroundColor(Const AValue:TColor); -begin - fAboutBox.BackGroundColor:=AValue;; -end; -procedure TAboutPlaySound.SetAboutBoxVersion(Const AValue:String); -begin - fAboutBox.Version:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxAuthorname(Const AValue:String); -begin - fAboutBox.Authorname:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxOrganisation(Const AValue:String); -begin - fAboutBox.Organisation:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxAuthorEmail(Const AValue:String); -begin - fAboutBox.AuthorEmail:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxBackgroundResourceName(Const AValue:String); -begin - fAboutBox.BackgroundResourceName:=AValue; -end; -procedure TAboutPlaySound.SetAboutBoxLicenseType(Const AValue:string); -begin - Case Upcase(AValue) of - 'GPL':fAboutBox.LicenseType:=abGPL; - 'LGPL':fAboutBox.LicenseType:=abLGPL; - 'MIT':fAboutBox.LicenseType:=abMIT; - 'MODIFIEDGPL':fAboutBox.LicenseType:=abModifiedGPL; - 'PROPRIETRY':fAboutBox.LicenseType:=abProprietry; - else - fAboutBox.LicenseType:=abNone; - end; -end; -procedure TAboutPlaySound.SetAboutBoxStretchBackgroundImage(Const AValue:Boolean); -begin - fAboutBox.StretchBackground:=AValue; -end; - -// End Sets - -constructor TAboutPlaySound.Create(AOwner: TComponent); -var - TempImage: TPicture; - r:TLResource; -begin - // Inherit default properties - inherited Create(AOwner); - // Use tAboutBox as a subcomponent - fAboutBox := tAboutBox.Create(nil); - with fAboutBox do - begin - SetSubComponent(True); // Tell the IDE to store the modified properties - // Default of TAboutPlaySound values override TAbouBox.Create defaults - ComponentName := 'TAboutPlaySound'; - Description.Add('This is to demonstrate'); //TStrings - Description.Add('the use of TAboutPlaySound'); //TStrings - Description.Add('Set its properties in your Constructor'); //TStrings - Width := 320; //Integer - Height := 280; //Integer - // Set any Font properties or subproperties here - // Font.Name := 'Arial'; - Font.Color := clNavy; - Font.Size:=10; - // BackGroundColor shows if no BackGround image is set - BackGroundColor := clWindow; - Version := '0.0.4.0'; - AuthorName := 'Gordon Bamber'; - AuthorEmail := 'minesadorada@charcodelvalle.com'; - Organisation := 'Public Domain'; - - //Types available: abNone, abGPL, abLGPL, abMIT, abModifiedGPL, abProprietry - LicenseType := abLGPL; - - // BackGround image is optional - // It must be in a resouce file in the initialization section - - //== How to set a background image to your About dialog -- - // The BackGround property is a TBitmap - // Use a Temporary TPicture to load a JPG. - // NOTE a PNG file will create an error when your component is used in an application! - r := LazarusResources.Find(fAboutBox.BackgroundResourceName); - if r <> nil then - begin - TempImage := TPicture.Create; - // .lrs file is in the initialization section - TempImage.LoadFromLazarusResource(fAboutBox.BackgroundResourceName); - BackGround.Assign(TempImage.Bitmap); - TempImage.Free; - StretchBackground := fAboutBox.StretchBackground; //Boolean - end; -end; -end; - -destructor TAboutPlaySound.Destroy; -begin - FreeAndNil(fAboutBox); - inherited Destroy; -end; -initialization -{$I license.lrs} - -end. +{ TAboutPlaySound and TAboutBox Component License + + Copyright (C) 2014 Gordon Bamber minesadorada@charcodelvalle.com + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License + for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +} + +// Change the name of this unit and its PAS file to be unique to your component +// Unit Aboutunit +unit aboutplaysound; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, Controls, Dialogs, Forms, Graphics, LResources, SysUtils, + ExtCtrls, StdCtrls, StrUtils,Buttons,PropEdits; +const + C_DEFAULTLICENSEFORMWIDTH = 500; + C_DEFAULTLICENSEFORMWIDTH_LINUX = C_DEFAULTLICENSEFORMWIDTH + 100; + C_DEFAULTLICENSEFORMHEIGHT = 400; + C_DEFAULTLICENSEFORMHEIGHT_LINUX = C_DEFAULTLICENSEFORMHEIGHT + 50; + +type + TLicenseType = (abNone, abGPL, abLGPL, abMIT, abModifiedGPL, abProprietry); + tAboutBox=Class; // Forward declaration + // Do Search/Replace to change all instances of TAboutComonent + // to TAbout + TAboutPlaySound = class(TComponent) + // This class can descend from any component class (TGraphicControl etc + private + { Private declarations } + fAboutBox: tAboutBox; + procedure SetMyComponentName(Const Avalue:String); + procedure SetAboutBoxWidth(Const AValue:Integer); + procedure SetAboutBoxHeight(Const AValue:Integer); + procedure SetAboutBoxDescription(Const AValue:String); + procedure SetAboutBoxFontName(Const AValue:String); + procedure SetAboutBoxFontSize(Const AValue:Integer); + procedure SetAboutBoxBitmap(Const AValue:TBitmap); + procedure SetAboutBoxBackgroundColor(Const AValue:TColor); + procedure SetAboutBoxTitle(Const AValue:String); + + procedure SetAboutBoxVersion(Const AValue:String); + procedure SetAboutBoxAuthorname(Const AValue:String); + procedure SetAboutBoxOrganisation(Const AValue:String); + procedure SetAboutBoxAuthorEmail(Const AValue:String); + procedure SetAboutBoxBackgroundResourceName(Const AValue:String); + procedure SetAboutBoxLicenseType(Const AValue:String); + procedure SetAboutBoxStretchBackgroundImage(Const AValue:Boolean); + protected + { Protected declarations } + public + { Public declarations } + constructor Create(AOwner: TComponent); override; // Constructor must be public + destructor Destroy; override; // Destructor must be public + + // Set these (hidden) properties in your inherited component's Create procedure + property AboutBoxComponentName:String write SetMyComponentName; + property AboutBoxWidth:Integer write SetAboutBoxWidth; + property AboutBoxHeight:Integer write SetAboutBoxHeight; + property AboutBoxDescription:String write SetAboutBoxDescription; + property AboutBoxFontName:String write SetAboutBoxFontName; + property AboutBoxFontSize:Integer write SetAboutBoxFontSize; + property AboutBoxBackgroundColor:TColor write SetAboutBoxBackgroundColor; + property AboutBoxTitle:String write SetAboutBoxTitle; + + property AboutBoxVersion:String write SetAboutBoxVersion; + property AboutBoxAuthorname:String write SetAboutBoxAuthorname; + property AboutBoxOrganisation:String write SetAboutBoxOrganisation; + property AboutBoxAuthorEmail:String write SetAboutBoxAuthorEmail; + property AboutBoxLicenseType:String write SetAboutBoxLicenseType; + property AboutBoxBackgroundResourceName:String write SetAboutBoxBackgroundResourceName; + property AboutBoxStretchBackgroundImage:Boolean write SetAboutBoxStretchBackgroundImage; + published + // The clickable 'About' property will automaticcally appear in any component + // descended from TAboutPlaySound + + // About this component... + property About: tAboutBox read fAboutBox write fAboutBox; + end; + TAboutbox = class(TComponent) + private + { Private declarations } + fDialog: TForm; + fBackgroundbitmap: TBitMap; + fBackgroundResourceName:String; + fDescription: TStrings; + fDialogTitle, fVersion, fAuthorname, fAuthorEmail, fOrganisation, + fComponentName: string; + fDialogHeight, fDialogWidth: integer; + fStretchBackground: boolean; + fFont: TFont; + fColor: TColor; + fLicenseType: TLicenseType; + procedure SetBackgroundBitmap(const AValue: TBitMap); + procedure SetDescriptionStrings(const AValue: TStrings); + procedure SetFont(const AValue: TFont); + procedure ShowLicense(Sender: TObject); + procedure SetDialogTitle(Const AValue:String); + protected + { Protected declarations } + public + { Public declarations } + procedure ShowDialog; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + { Published declarations } + // Set these properties in your component Constructor method + property BackGround: TBitMap read fBackgroundbitmap write SetBackgroundBitmap; + property BackgroundResourceName:String read fBackgroundResourceName write fBackgroundResourceName; + property Description: TStrings read fDescription write SetDescriptionStrings; + property Title: string read fDialogTitle write SetDialogTitle; + property Height: integer read fDialogHeight write fDialogHeight; + property Width: integer read fDialogWidth write fDialogWidth; + property Font: TFont read fFont write SetFont; + property BackGroundColor: TColor read fColor write fColor; + property StretchBackground: boolean read fStretchBackground + write fStretchBackground default False; + property Version: string read fVersion write fVersion; + property Authorname: string read fAuthorname write fAuthorname; + property Organisation: string read fOrganisation write fOrganisation; + property AuthorEmail: string read fAuthorEmail write fAuthorEmail; + property ComponentName: string read fComponentName write fComponentName; + property LicenseType: TLicenseType read fLicenseType write fLicenseType; + end; + + // Declaration for the 'About' property editor + TAboutPropertyEditor = class(TClassPropertyEditor) + public + procedure Edit; override; + function GetAttributes: TPropertyAttributes; override; + end; + +procedure Register; + +{For i8n if required} +resourcestring + rs_Componentname='Component name'; + rs_About='About'; + rs_License='License'; + rs_By='By'; + rs_For='For'; + rs_DatafileMissing='Resource datafile license.lrs is missing'; + rs_LicenseTextError='There is something wrong with the Licence text'; + rs_AboutBoxError = 'Subcomponent TAboutBox Error'; + + +implementation + +{ TABoutBox} + +constructor TAboutbox.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + fBackgroundbitmap := TBitMap.Create; + fDescription := TStringList.Create; + fFont := TFont.Create; + fColor := clDefault; + fLicenseType := abNone; + fComponentName:=rs_Componentname; + fDialogTitle:=rs_About + ' ' + fComponentName; + + fDialogWidth:=320; + fDialogHeight:=280; + fVersion:='1.0.0.0'; + fLicenseType:=abNone; +end; + +destructor TAboutbox.Destroy; +begin + FreeAndNil(fFont); + FreeAndNil(fDescription); + FreeAndNil(fBackgroundbitmap); + inherited Destroy; +end; +procedure TAboutbox.SetDialogTitle(Const AValue:String); +begin + if AnsiContainsText(fDialogTitle, rs_About) then + fDialogTitle := AValue + else + fDialogTitle := rs_About + ' ' + Avalue; +end; + +procedure TAboutbox.ShowDialog; +var + OKbutton, LicenseButton: TBitBtn; + lbl_Description: TLabel; + img_BackGround: TImage; + sz: string; + iCount: integer; + r:TLResource; +begin + fDialog := TForm.CreateNew(nil); + try //.. finally FreeAndNil everything + with fDialog do + begin + // Set Dialog properties + position := poScreenCenter; + borderstyle := bsToolWindow; + Caption := fDialogTitle; + formstyle := fsSystemStayOnTop; + color := fColor; + font := fFont; + if (fDialogHeight > 0) then + Height := fDialogHeight + else + Height := 240; + if (fDialogWidth > 0) then + Width := fDialogWidth + else + Width := 320; + + // Create a background image + img_BackGround := Timage.Create(fDialog); + with img_BackGround do + // Set img_BackGround properties + begin + Align := alClient; + Stretch := fStretchBackground; + // Bitmap assigned? + if Assigned(fBackgroundbitmap) then + Picture.Assign(fBackgroundbitmap); + // Resource file? + r := LazarusResources.Find(fBackgroundResourceName); + if r <> nil then + img_BackGround.Picture.LoadFromLazarusResource(fBackgroundResourceName); + SendToBack; + parent := fDialog; + end; + + // Create a BitBtn button + okbutton := TBitBtn.Create(fDialog); + // Set BitBtn properties + with okButton do + begin + Kind := bkClose; + left := (fDialog.Width div 2) - Width div 2; + top := fDialog.Height - Height - 10; + ParentFont:=False; + parent := fDialog; + end; + + // Create a License Button + LicenseButton := TBitBtn.Create(fDialog); + if (fLicenseType <> abNone) then + // Put it on the right + begin + LicenseButton.Top := OKButton.Top; + LicenseButton.Caption := rs_License + '...'; + LicenseButton.left := Width - LicenseButton.Width - 10; + LicenseButton.OnClick := @ShowLicense; + LicenseButton.ParentFont:=False; + LicenseButton.Parent := fDialog; + end; + + + // Create a label control + lbl_Description := Tlabel.Create(fDialog); + // Set label properties + with lbl_Description do + begin + left := 8; + Top := 30; + Width := fDialog.Width - 8; + Height := fDialog.Height - 30; + Autosize := False; + ParentFont := True; + Alignment := taCenter; + end; + + // Build up Label text + sz := ''; + // Component name + if fComponentName <> '' then + sz += fComponentName + LineEnding; + // Author name (+Email) + if fAuthorname <> '' then + sz += rs_By + ': ' + fAuthorname + LineEnding; + if fAuthorEmail <> '' then + sz += ' (' + fAuthorEmail + ')' + LineEnding + else + sz += LineEnding; + + sz += LineEnding; + + // Version + if fVersion <> '' then + sz += 'Version: ' + fVersion + LineEnding; + // License + case fLicenseType of + abGPL: sz += rs_License + ': GPL' + LineEnding; + abLGPL: sz += rs_License + ': LGPL' + LineEnding; + abMIT: sz += rs_License + ': M.I.T.' + LineEnding; + abModifiedGPL: sz += rs_License + ': Modified GPL' + LineEnding; + abProprietry: sz += rs_License + ': Proprietry' + LineEnding; + end; + if fOrganisation <> '' then + sz += rs_For + ': ' + fOrganisation + LineEnding; + if fDescription.Count > 0 then + begin + sz += LineEnding; + for iCount := 1 to fDescription.Count do + sz += fDescription[iCount - 1] + LineEnding; + end; + + lbl_Description.Caption := sz; + lbl_Description.parent := fDialog; + // Display the dialog modally + ShowModal; + end; + finally + // Free all resources + FreeAndNil(img_BackGround); + FreeAndNil(lbl_Description); + FreeAndNil(LicenseButton); + FreeAndNil(okbutton); + end; +end; + +procedure TAboutbox.ShowLicense(Sender: TObject); +// Triggered by License button Click +var + sLicenseString: string; + theList: TStringList; + f: integer; + LicenceForm: TForm; + lblText: TLabel; + closebuttton: TBitBtn; + r: TLResource; + szLicenseFile: string; +begin + // Quit early? + if fLicenseType = abNone then + Exit; + + // Set to resource name in license.lrs + case fLicenseType of + abNone: szLicenseFile := ''; + abGPL: szLicenseFile := 'gpl.txt'; + abLGPL: szLicenseFile := 'lgpl.txt'; + abMIT: szLicenseFile := 'mit.txt'; + abModifiedgpl: szLicenseFile := 'modifiedgpl.txt'; + end; + + + // Use a string list to split the text file into lines + theList := TStringList.Create; + // Create a window, label and close button on-the-fly + LicenceForm := TForm.Create(nil); + lblText := TLabel.Create(LicenceForm); + closebuttton := TBitBtn.Create(LicenceForm); + // Load up the text into variable 'sLicenseString' + sLicenseString := LineEnding + LineEnding + fComponentName + LineEnding; + try + try + begin + // Load license text from resource string + r := LazarusResources.Find(szLicenseFile); + if r = nil then + raise Exception.Create(rs_DatafileMissing); + thelist.Add(r.Value); + for f := 0 to TheList.Count - 1 do + sLicenseString += TheList[f] + LineEnding; + end; + except + On e: Exception do + MessageDlg(rs_AboutBoxError, + rs_LicenseTextError, mtError, [mbOK], 0); + end; + + // Replace boilerplate text if possible + sLicenseString := AnsiReplaceText(sLicenseString, '', +{$I %DATE%} + ); + sLicenseString := AnsiReplaceText(sLicenseString, '', fAuthorname); + sLicenseString := AnsiReplaceText(sLicenseString, '', + '(' + fAuthorEmail + ')'); + sLicenseString := AnsiReplaceText(sLicenseString, '', + fOrganisation); + + // Make up the form window and controls + with LicenceForm do + begin + // Form + {$IFDEF WINDOWS} + // More compact GUI? + Width := C_DEFAULTLICENSEFORMWIDTH; + Height := C_DEFAULTLICENSEFORMHEIGHT; + {$ELSE WINDOWS} + Width := C_DEFAULTLICENSEFORMWIDTH_LINUX; + Height := C_DEFAULTLICENSEFORMHEIGHT_LINUX; + {$ENDIF} + // autosize:=true; + // If you enable autosize, the button placement goes awry! + + // The Modified GPL has an extra clause + if (szLicenseFile = 'modifiedgpl.txt') or + (Pos('As a special exception', sLicenseString) > 0) then + Height := Height + 100; + position := poScreenCenter; + borderstyle := bsToolWindow; + Caption := fComponentName + ': Licensing'; + formstyle := fsSystemStayOnTop; + + // Label + lblText.Align := alClient; + lblText.Alignment := taCenter; + lblText.Caption := sLicenseString; + lblText.Parent := LicenceForm; + + // Close Button + closebuttton.Kind := bkClose; + closebuttton.left := (Width div 2) - closebuttton.Width div 2; + closebuttton.top := Height - closebuttton.Height - 10; + closebuttton.parent := LicenceForm; + // Show modally over the existing modal form + PopupParent := TForm(Sender); + ShowModal; + end; + finally + // Free up all component created resources from memory + FreeAndNil(theList); + FreeAndNil(lblText); + FreeAndNil(closebuttton); + FreeAndNil(LicenceForm); + end; +end; + +procedure TAboutbox.SetBackgroundBitmap(const AValue: TBitMap); +begin + if Assigned(AValue) then + fBackgroundbitmap.Assign(AValue); +end; + +procedure TAboutbox.SetDescriptionStrings(const AValue: TStrings); +begin + if Assigned(AValue) then + fDescription.Assign(Avalue); +end; + +procedure TAboutbox.SetFont(const AValue: TFont); +begin + if Assigned(AValue) then + fFont.Assign(AValue); +end; + +{ TAboutPlaySound } + +procedure Register; +begin + RegisterPropertyEditor(TypeInfo(TAboutbox), + TAboutPlaySound, 'About', TAboutPropertyEditor); +end; + +procedure TAboutPropertyEditor.Edit; +// Communicate with the component properties +Var + AAboutBox:TAboutBox; +begin + AAboutBox:=TAboutBox(GetObjectValue(TAboutBox)); + AABoutBox.ShowDialog; +end; + +function TAboutPropertyEditor.GetAttributes: TPropertyAttributes; + // Show the ellipsis +begin + Result := [paDialog, paReadOnly]; +end; + +// Sets for AboutBox dialog properties +procedure TAboutPlaySound.SetMyComponentName(Const Avalue:String); +begin + fAboutBox.ComponentName:=AValue; + fAboutBox.Title:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxWidth(Const AValue:Integer); +begin + fAboutBox.Width:=Avalue; +end; +procedure TAboutPlaySound.SetAboutBoxHeight(Const AValue:Integer); +begin + fAboutBox.Height:=Avalue; +end; +procedure TAboutPlaySound.SetAboutBoxDescription(Const AValue:String); +begin + fAboutBox.Description.Clear; + fAboutBox.Description.Add(AValue); +end; +procedure TAboutPlaySound.SetAboutBoxFontName(Const AValue:String); +begin + fAboutBox.Font.Name:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxFontSize(Const AValue:Integer); +begin + if (AValue > 6) then fAboutBox.Font.Size:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxTitle(Const AValue:String); +begin + fAboutBox.Title:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxBitmap(Const AValue:TBitmap); +begin + If Assigned(Avalue) then fAboutBox.Assign(AValue); +end; +procedure TAboutPlaySound.SetAboutBoxBackgroundColor(Const AValue:TColor); +begin + fAboutBox.BackGroundColor:=AValue;; +end; +procedure TAboutPlaySound.SetAboutBoxVersion(Const AValue:String); +begin + fAboutBox.Version:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxAuthorname(Const AValue:String); +begin + fAboutBox.Authorname:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxOrganisation(Const AValue:String); +begin + fAboutBox.Organisation:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxAuthorEmail(Const AValue:String); +begin + fAboutBox.AuthorEmail:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxBackgroundResourceName(Const AValue:String); +begin + fAboutBox.BackgroundResourceName:=AValue; +end; +procedure TAboutPlaySound.SetAboutBoxLicenseType(Const AValue:string); +begin + Case Upcase(AValue) of + 'GPL':fAboutBox.LicenseType:=abGPL; + 'LGPL':fAboutBox.LicenseType:=abLGPL; + 'MIT':fAboutBox.LicenseType:=abMIT; + 'MODIFIEDGPL':fAboutBox.LicenseType:=abModifiedGPL; + 'PROPRIETRY':fAboutBox.LicenseType:=abProprietry; + else + fAboutBox.LicenseType:=abNone; + end; +end; +procedure TAboutPlaySound.SetAboutBoxStretchBackgroundImage(Const AValue:Boolean); +begin + fAboutBox.StretchBackground:=AValue; +end; + +// End Sets + +constructor TAboutPlaySound.Create(AOwner: TComponent); +var + TempImage: TPicture; + r:TLResource; +begin + // Inherit default properties + inherited Create(AOwner); + // Use tAboutBox as a subcomponent + fAboutBox := tAboutBox.Create(nil); + with fAboutBox do + begin + SetSubComponent(True); // Tell the IDE to store the modified properties + // Default of TAboutPlaySound values override TAbouBox.Create defaults + ComponentName := 'TAboutPlaySound'; + Description.Add('This is to demonstrate'); //TStrings + Description.Add('the use of TAboutPlaySound'); //TStrings + Description.Add('Set its properties in your Constructor'); //TStrings + Width := 320; //Integer + Height := 280; //Integer + // Set any Font properties or subproperties here + // Font.Name := 'Arial'; + Font.Color := clNavy; + Font.Size:=10; + // BackGroundColor shows if no BackGround image is set + BackGroundColor := clWindow; + Version := '0.0.4.0'; + AuthorName := 'Gordon Bamber'; + AuthorEmail := 'minesadorada@charcodelvalle.com'; + Organisation := 'Public Domain'; + + //Types available: abNone, abGPL, abLGPL, abMIT, abModifiedGPL, abProprietry + LicenseType := abLGPL; + + // BackGround image is optional + // It must be in a resouce file in the initialization section + + //== How to set a background image to your About dialog -- + // The BackGround property is a TBitmap + // Use a Temporary TPicture to load a JPG. + // NOTE a PNG file will create an error when your component is used in an application! + r := LazarusResources.Find(fAboutBox.BackgroundResourceName); + if r <> nil then + begin + TempImage := TPicture.Create; + // .lrs file is in the initialization section + TempImage.LoadFromLazarusResource(fAboutBox.BackgroundResourceName); + BackGround.Assign(TempImage.Bitmap); + TempImage.Free; + StretchBackground := fAboutBox.StretchBackground; //Boolean + end; +end; +end; + +destructor TAboutPlaySound.Destroy; +begin + FreeAndNil(fAboutBox); + inherited Destroy; +end; +initialization +{$I license.lrs} + +end. diff --git a/components/playsoundpackage/latest_stable/demo/demo.ico b/components/playsoundpackage/latest_stable/demo/demo.ico new file mode 100644 index 000000000..b623bcdbb Binary files /dev/null and b/components/playsoundpackage/latest_stable/demo/demo.ico differ diff --git a/components/playsoundpackage/latest_stable/demo/demo.lpi b/components/playsoundpackage/latest_stable/demo/demo.lpi new file mode 100644 index 000000000..62dbbbca3 --- /dev/null +++ b/components/playsoundpackage/latest_stable/demo/demo.lpi @@ -0,0 +1,93 @@ + + + + + + + + + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <Icon Value="0"/> + </General> + <i18n> + <EnableI18N LFM="False"/> + </i18n> + <VersionInfo> + <UseVersionInfo Value="True"/> + <RevisionNr Value="1"/> + <StringTable ProductVersion=""/> + </VersionInfo> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> + <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> + </PublishOptions> + <RunParams> + <local> + <FormatVersion Value="1"/> + </local> + </RunParams> + <RequiredPackages Count="4"> + <Item1> + <PackageName Value="RunTimeTypeInfoControls"/> + </Item1> + <Item2> + <PackageName Value="poweredby"/> + </Item2> + <Item3> + <PackageName Value="playwavepackage"/> + <MaxVersion Release="1"/> + </Item3> + <Item4> + <PackageName Value="LCL"/> + </Item4> + </RequiredPackages> + <Units Count="2"> + <Unit0> + <Filename Value="demo.lpr"/> + <IsPartOfProject Value="True"/> + </Unit0> + <Unit1> + <Filename Value="umainform.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="mainform"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + </Unit1> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <Target> + <Filename Value="demo"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + </CompilerOptions> + <Debugging> + <Exceptions Count="3"> + <Item1> + <Name Value="EAbort"/> + </Item1> + <Item2> + <Name Value="ECodetoolError"/> + </Item2> + <Item3> + <Name Value="EFOpenError"/> + </Item3> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/components/playsoundpackage/latest_stable/demo/demo.lpr b/components/playsoundpackage/latest_stable/demo/demo.lpr new file mode 100644 index 000000000..d700d49c1 --- /dev/null +++ b/components/playsoundpackage/latest_stable/demo/demo.lpr @@ -0,0 +1,22 @@ +program demo; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Interfaces, // this includes the LCL widgetset + Forms, runtimetypeinfocontrols, poweredby, umainform + { you can add units after this }; + +{$R *.res} + +begin + Application.Title:='PlaySound component demo'; + RequireDerivedFormResource := True; + Application.Initialize; + Application.CreateForm(Tmainform, mainform); + Application.Run; +end. + diff --git a/components/playsoundpackage/latest_stable/demo/demo.lps b/components/playsoundpackage/latest_stable/demo/demo.lps new file mode 100644 index 000000000..91b203242 --- /dev/null +++ b/components/playsoundpackage/latest_stable/demo/demo.lps @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<CONFIG> + <ProjectSession> + <PathDelim Value="\"/> + <Version Value="9"/> + <BuildModes Active="Default"/> + <Units Count="6"> + <Unit0> + <Filename Value="demo.lpr"/> + <IsPartOfProject Value="True"/> + <UsageCount Value="20"/> + </Unit0> + <Unit1> + <Filename Value="umainform.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="mainform"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + <CursorPos X="32" Y="9"/> + <UsageCount Value="20"/> + <Loaded Value="True"/> + <LoadedDesigner Value="True"/> + </Unit1> + <Unit2> + <Filename Value="D:\Lazarusprojects\playsoundpackage\uplaysound.pas"/> + <TopLine Value="85"/> + <UsageCount Value="10"/> + </Unit2> + <Unit3> + <Filename Value="..\uplaysound.pas"/> + <EditorIndex Value="1"/> + <TopLine Value="118"/> + <CursorPos X="28" Y="118"/> + <UsageCount Value="10"/> + <Loaded Value="True"/> + </Unit3> + <Unit4> + <Filename Value="X:\TEMP\wzbed3\grille.pas"/> + <EditorIndex Value="-1"/> + <TopLine Value="67"/> + <UsageCount Value="10"/> + </Unit4> + <Unit5> + <Filename Value="..\aboutplaysound.pas"/> + <IsVisibleTab Value="True"/> + <EditorIndex Value="2"/> + <TopLine Value="580"/> + <CursorPos X="32" Y="589"/> + <UsageCount Value="10"/> + <Loaded Value="True"/> + </Unit5> + </Units> + <JumpHistory Count="3" HistoryIndex="2"> + <Position1> + <Filename Value="umainform.pas"/> + </Position1> + <Position2> + <Filename Value="umainform.pas"/> + <Caret Line="44" Column="3" TopLine="10"/> + </Position2> + <Position3> + <Filename Value="..\aboutplaysound.pas"/> + </Position3> + </JumpHistory> + </ProjectSession> +</CONFIG> diff --git a/components/playsoundpackage/latest_stable/demo/demo.res b/components/playsoundpackage/latest_stable/demo/demo.res new file mode 100644 index 000000000..6c7c81ce6 Binary files /dev/null and b/components/playsoundpackage/latest_stable/demo/demo.res differ diff --git a/components/playsoundpackage/latest_stable/demo/doorbell.wav b/components/playsoundpackage/latest_stable/demo/doorbell.wav new file mode 100644 index 000000000..f1c8c90ee Binary files /dev/null and b/components/playsoundpackage/latest_stable/demo/doorbell.wav differ diff --git a/components/playsoundpackage/latest_stable/demo/telephone.wav b/components/playsoundpackage/latest_stable/demo/telephone.wav new file mode 100644 index 000000000..41e86c86d Binary files /dev/null and b/components/playsoundpackage/latest_stable/demo/telephone.wav differ diff --git a/components/playsoundpackage/latest_stable/demo/umainform.lfm b/components/playsoundpackage/latest_stable/demo/umainform.lfm new file mode 100644 index 000000000..b0f98feaf --- /dev/null +++ b/components/playsoundpackage/latest_stable/demo/umainform.lfm @@ -0,0 +1,83 @@ +object mainform: Tmainform + Left = 415 + Height = 257 + Top = 305 + Width = 352 + BorderIcons = [biSystemMenu] + Caption = 'mainform' + ClientHeight = 257 + ClientWidth = 352 + DefaultMonitor = dmPrimary + OnCreate = FormCreate + Position = poScreenCenter + LCLVersion = '1.7' + object cmd_Async: TButton + Left = 264 + Height = 25 + Top = 180 + Width = 75 + Caption = 'Play Async' + OnClick = cmd_AsyncClick + TabOrder = 0 + end + object BitBtn1: TBitBtn + Left = 264 + Height = 30 + Top = 216 + Width = 75 + DefaultCaption = True + Kind = bkClose + ModalResult = 11 + TabOrder = 1 + end + object cmd_Sync: TButton + Left = 264 + Height = 25 + Top = 148 + Width = 75 + Caption = 'Play Sync' + OnClick = cmd_SyncClick + TabOrder = 2 + end + object TIPropertyGrid1: TTIPropertyGrid + Left = 4 + Height = 238 + Top = 8 + Width = 252 + CheckboxForBoolean = False + DefaultValueFont.Color = clWindowText + Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper] + Indent = 16 + NameFont.Color = clWindowText + TIObject = playsound1 + ValueFont.Color = clMaroon + end + object cmd_StopSound: TButton + Left = 264 + Height = 25 + Top = 112 + Width = 75 + Caption = 'Stop Sound' + OnClick = cmd_StopSoundClick + TabOrder = 4 + end + object playsound1: Tplaysound + About.Description.Strings = ( + 'Plays WAVE sounds in Windows or Linux' + ) + About.Title = 'About About About About About About PlaySound' + About.Height = 400 + About.Width = 400 + About.Font.Color = clNavy + About.Font.Height = -13 + About.BackGroundColor = clCream + About.Version = '0.0.1' + About.Authorname = 'Gordon Bamber' + About.Organisation = 'Public Domain' + About.AuthorEmail = 'minesadorada@charcodelvalle.com' + About.ComponentName = 'PlaySound' + About.LicenseType = abLGPL + left = 104 + top = 40 + end +end diff --git a/components/playsoundpackage/latest_stable/demo/umainform.pas b/components/playsoundpackage/latest_stable/demo/umainform.pas new file mode 100644 index 000000000..9346ca11a --- /dev/null +++ b/components/playsoundpackage/latest_stable/demo/umainform.pas @@ -0,0 +1,82 @@ +unit umainform; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, ExtCtrls, uplaysound; + +type + + { Tmainform } + + Tmainform = class(TForm) + BitBtn1: TBitBtn; + cmd_StopSound: TButton; + cmd_Async: TButton; + cmd_Sync: TButton; + playsound1: Tplaysound; + TIPropertyGrid1: TTIPropertyGrid; + procedure cmd_AsyncClick(Sender: TObject); + procedure cmd_StopSoundClick(Sender: TObject); + procedure cmd_SyncClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + mainform: Tmainform; + +implementation + +{$R *.lfm} + +{ Tmainform } + +procedure Tmainform.cmd_AsyncClick(Sender: TObject); +// No gap between sounds. App remains responsive +begin + playsound1.PlayStyle:=psASync; + {$IFDEF WINDOWS} + playsound1.SoundFile:='doorbell.wav'; + playsound1.Execute; + playsound1.SoundFile:='telephone.wav'; + playsound1.Execute; + {$ELSE} + // Sound file taken from PropertyGrid + playsound1.Execute; + {$ENDIF} +end; + +procedure Tmainform.cmd_StopSoundClick(Sender: TObject); +begin + playsound1.StopSound; +end; + +procedure Tmainform.cmd_SyncClick(Sender: TObject); +begin + playsound1.PlayStyle:=psSync; + {$IFDEF WINDOWS} + playsound1.SoundFile:='doorbell.wav'; + playsound1.Execute; + playsound1.SoundFile:='telephone.wav'; + playsound1.Execute; + {$ELSE} + // Sound file taken from PropertyGrid + playsound1.Execute; + {$ENDIF} +end; + +procedure Tmainform.FormCreate(Sender: TObject); +begin + Caption:=Application.Title; + Icon:=Application.Icon; +end; + +end. + diff --git a/components/playsoundpackage/license.lrs b/components/playsoundpackage/latest_stable/license.lrs similarity index 98% rename from components/playsoundpackage/license.lrs rename to components/playsoundpackage/latest_stable/license.lrs index 50194e647..49eaf6f05 100644 --- a/components/playsoundpackage/license.lrs +++ b/components/playsoundpackage/latest_stable/license.lrs @@ -1,72 +1,72 @@ -LazarusResources.Add('gpl.txt','TXT',[ - ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This source' - +' is free software; you can redistribute it and/or modify it under'#13#10' ' - +'the terms of the GNU General Public License as published by the Free'#13#10 - +' Software Foundation; either version 2 of the License, or (at your option)' - +#13#10' any later version.'#13#10#13#10' This code is distributed in the h' - +'ope that it will be useful, but WITHOUT ANY'#13#10' WARRANTY; without even' - +' the implied warranty of MERCHANTABILITY or FITNESS'#13#10' FOR A PARTICUL' - +'AR PURPOSE. See the GNU General Public License for more'#13#10' details.' - +#13#10#13#10' A copy of the GNU General Public License is available on the ' - +'World Wide Web'#13#10' at <http://www.gnu.org/copyleft/gpl.html>. You can ' - +'also obtain it by writing'#13#10' to the Free Software Foundation, Inc., 5' - +'9 Temple Place - Suite 330, Boston,'#13#10' MA 02111-1307, USA.' -]); -LazarusResources.Add('lgpl.txt','TXT',[ - ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This librar' - +'y is free software; you can redistribute it and/or modify it'#13#10' under' - +' the terms of the GNU Library General Public License as published by'#13#10 - +' the Free Software Foundation; either version 2 of the License, or (at you' - +'r'#13#10' option) any later version.'#13#10#13#10' This program is distri' - +'buted in the hope that it will be useful, but WITHOUT'#13#10' ANY WARRANTY' - +'; without even the implied warranty of MERCHANTABILITY or'#13#10' FITNESS ' - +'FOR A PARTICULAR PURPOSE. See the GNU Library General Public License'#13#10 - +' for more details.'#13#10#13#10' You should have received a copy of the G' - +'NU Library General Public License'#13#10' along with this library; if not,' - +' write to the Free Software Foundation,'#13#10' Inc., 59 Temple Place - Su' - +'ite 330, Boston, MA 02111-1307, USA.' -]); -LazarusResources.Add('mit.txt','TXT',[ - ' Copyright (c) <year> <copyright holders>'#13#10#13#10' Permission is here' - +'by granted, free of charge, to any person obtaining a copy'#13#10' of this' - +' software and associated documentation files (the "Software"), to'#13#10' ' - +'deal in the Software without restriction, including without limitation the' - +#13#10' rights to use, copy, modify, merge, publish, distribute, sublicense' - +', and/or'#13#10' sell copies of the Software, and to permit persons to who' - +'m the Software is'#13#10' furnished to do so, subject to the following con' - +'ditions:'#13#10#13#10' The above copyright notice and this permission noti' - +'ce shall be included in'#13#10' all copies or substantial portions of the ' - +'Software.'#13#10#13#10' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY' - +' OF ANY KIND, EXPRESS OR'#13#10' IMPLIED, INCLUDING BUT NOT LIMITED TO THE' - +' WARRANTIES OF MERCHANTABILITY,'#13#10' FITNESS FOR A PARTICULAR PURPOSE A' - +'ND NONINFRINGEMENT. IN NO EVENT SHALL THE'#13#10' AUTHORS OR COPYRIGHT HOL' - +'DERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER'#13#10' LIABILITY, WHETHER ' - +'IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING'#13#10' FROM, OUT OF ' - +'OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS'#13#10' IN' - +' THE SOFTWARE.' -]); -LazarusResources.Add('modifiedgpl.txt','TXT',[ - ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This librar' - +'y is free software; you can redistribute it and/or modify it'#13#10' under' - +' the terms of the GNU Library General Public License as published by'#13#10 - +' the Free Software Foundation; either version 2 of the License, or (at you' - +'r'#13#10' option) any later version with the following modification:'#13#10 - +#13#10' As a special exception, the copyright holders of this library give ' - +'you'#13#10' permission to link this library with independent modules to pr' - +'oduce an'#13#10' executable, regardless of the license terms of these inde' - +'pendent modules,and'#13#10' to copy and distribute the resulting executabl' - +'e under terms of your choice,'#13#10' provided that you also meet, for eac' - +'h linked independent module, the terms'#13#10' and conditions of the licen' - +'se of that module. An independent module is a'#13#10' module which is not ' - +'derived from or based on this library. If you modify'#13#10' this library,' - +' you may extend this exception to your version of the library,'#13#10' but' - +' you are not obligated to do so. If you do not wish to do so, delete this' - +#13#10' exception statement from your version.'#13#10#13#10' This program ' - +'is distributed in the hope that it will be useful, but WITHOUT'#13#10' ANY' - +' WARRANTY; without even the implied warranty of MERCHANTABILITY or'#13#10' ' - +' FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public Licen' - +'se'#13#10' for more details.'#13#10#13#10' You should have received a cop' - +'y of the GNU Library General Public License'#13#10' along with this librar' - +'y; if not, write to the Free Software Foundation,'#13#10' Inc., 59 Temple ' - +'Place - Suite 330, Boston, MA 02111-1307, USA.' -]); +LazarusResources.Add('gpl.txt','TXT',[ + ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This source' + +' is free software; you can redistribute it and/or modify it under'#13#10' ' + +'the terms of the GNU General Public License as published by the Free'#13#10 + +' Software Foundation; either version 2 of the License, or (at your option)' + +#13#10' any later version.'#13#10#13#10' This code is distributed in the h' + +'ope that it will be useful, but WITHOUT ANY'#13#10' WARRANTY; without even' + +' the implied warranty of MERCHANTABILITY or FITNESS'#13#10' FOR A PARTICUL' + +'AR PURPOSE. See the GNU General Public License for more'#13#10' details.' + +#13#10#13#10' A copy of the GNU General Public License is available on the ' + +'World Wide Web'#13#10' at <http://www.gnu.org/copyleft/gpl.html>. You can ' + +'also obtain it by writing'#13#10' to the Free Software Foundation, Inc., 5' + +'9 Temple Place - Suite 330, Boston,'#13#10' MA 02111-1307, USA.' +]); +LazarusResources.Add('lgpl.txt','TXT',[ + ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This librar' + +'y is free software; you can redistribute it and/or modify it'#13#10' under' + +' the terms of the GNU Library General Public License as published by'#13#10 + +' the Free Software Foundation; either version 2 of the License, or (at you' + +'r'#13#10' option) any later version.'#13#10#13#10' This program is distri' + +'buted in the hope that it will be useful, but WITHOUT'#13#10' ANY WARRANTY' + +'; without even the implied warranty of MERCHANTABILITY or'#13#10' FITNESS ' + +'FOR A PARTICULAR PURPOSE. See the GNU Library General Public License'#13#10 + +' for more details.'#13#10#13#10' You should have received a copy of the G' + +'NU Library General Public License'#13#10' along with this library; if not,' + +' write to the Free Software Foundation,'#13#10' Inc., 59 Temple Place - Su' + +'ite 330, Boston, MA 02111-1307, USA.' +]); +LazarusResources.Add('mit.txt','TXT',[ + ' Copyright (c) <year> <copyright holders>'#13#10#13#10' Permission is here' + +'by granted, free of charge, to any person obtaining a copy'#13#10' of this' + +' software and associated documentation files (the "Software"), to'#13#10' ' + +'deal in the Software without restriction, including without limitation the' + +#13#10' rights to use, copy, modify, merge, publish, distribute, sublicense' + +', and/or'#13#10' sell copies of the Software, and to permit persons to who' + +'m the Software is'#13#10' furnished to do so, subject to the following con' + +'ditions:'#13#10#13#10' The above copyright notice and this permission noti' + +'ce shall be included in'#13#10' all copies or substantial portions of the ' + +'Software.'#13#10#13#10' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY' + +' OF ANY KIND, EXPRESS OR'#13#10' IMPLIED, INCLUDING BUT NOT LIMITED TO THE' + +' WARRANTIES OF MERCHANTABILITY,'#13#10' FITNESS FOR A PARTICULAR PURPOSE A' + +'ND NONINFRINGEMENT. IN NO EVENT SHALL THE'#13#10' AUTHORS OR COPYRIGHT HOL' + +'DERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER'#13#10' LIABILITY, WHETHER ' + +'IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING'#13#10' FROM, OUT OF ' + +'OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS'#13#10' IN' + +' THE SOFTWARE.' +]); +LazarusResources.Add('modifiedgpl.txt','TXT',[ + ' Copyright (C) <year> <name of author> <contact>'#13#10#13#10' This librar' + +'y is free software; you can redistribute it and/or modify it'#13#10' under' + +' the terms of the GNU Library General Public License as published by'#13#10 + +' the Free Software Foundation; either version 2 of the License, or (at you' + +'r'#13#10' option) any later version with the following modification:'#13#10 + +#13#10' As a special exception, the copyright holders of this library give ' + +'you'#13#10' permission to link this library with independent modules to pr' + +'oduce an'#13#10' executable, regardless of the license terms of these inde' + +'pendent modules,and'#13#10' to copy and distribute the resulting executabl' + +'e under terms of your choice,'#13#10' provided that you also meet, for eac' + +'h linked independent module, the terms'#13#10' and conditions of the licen' + +'se of that module. An independent module is a'#13#10' module which is not ' + +'derived from or based on this library. If you modify'#13#10' this library,' + +' you may extend this exception to your version of the library,'#13#10' but' + +' you are not obligated to do so. If you do not wish to do so, delete this' + +#13#10' exception statement from your version.'#13#10#13#10' This program ' + +'is distributed in the hope that it will be useful, but WITHOUT'#13#10' ANY' + +' WARRANTY; without even the implied warranty of MERCHANTABILITY or'#13#10' ' + +' FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public Licen' + +'se'#13#10' for more details.'#13#10#13#10' You should have received a cop' + +'y of the GNU Library General Public License'#13#10' along with this librar' + +'y; if not, write to the Free Software Foundation,'#13#10' Inc., 59 Temple ' + +'Place - Suite 330, Boston, MA 02111-1307, USA.' +]); diff --git a/components/playsoundpackage/locale/aboutplaysound.po b/components/playsoundpackage/latest_stable/locale/aboutplaysound.po similarity index 100% rename from components/playsoundpackage/locale/aboutplaysound.po rename to components/playsoundpackage/latest_stable/locale/aboutplaysound.po diff --git a/components/playsoundpackage/locale/uplaysound.po b/components/playsoundpackage/latest_stable/locale/uplaysound.po similarity index 100% rename from components/playsoundpackage/locale/uplaysound.po rename to components/playsoundpackage/latest_stable/locale/uplaysound.po diff --git a/components/playsoundpackage/playsound_icon.lrs b/components/playsoundpackage/latest_stable/playsound_icon.lrs similarity index 100% rename from components/playsoundpackage/playsound_icon.lrs rename to components/playsoundpackage/latest_stable/playsound_icon.lrs diff --git a/components/playsoundpackage/playsound_icon.png b/components/playsoundpackage/latest_stable/playsound_icon.png similarity index 100% rename from components/playsoundpackage/playsound_icon.png rename to components/playsoundpackage/latest_stable/playsound_icon.png diff --git a/components/playsoundpackage/playsoundackage.pas b/components/playsoundpackage/latest_stable/playsoundackage.pas similarity index 95% rename from components/playsoundpackage/playsoundackage.pas rename to components/playsoundpackage/latest_stable/playsoundackage.pas index 6c8eca8ee..2002c87d3 100644 --- a/components/playsoundpackage/playsoundackage.pas +++ b/components/playsoundpackage/latest_stable/playsoundackage.pas @@ -1,22 +1,22 @@ -{ This file was automatically created by Lazarus. Do not edit! - This source is only used to compile and install the package. - } - -unit playsoundackage; - -interface - -uses - uplaysound, aboutplaysound, LazarusPackageIntf; - -implementation - -procedure Register; -begin - RegisterUnit('uplaysound', @uplaysound.Register); - RegisterUnit('aboutplaysound', @aboutplaysound.Register); -end; - -initialization - RegisterPackage('playsoundackage', @Register); -end. +{ This file was automatically created by Lazarus. Do not edit! + This source is only used to compile and install the package. + } + +unit playsoundackage; + +interface + +uses + uplaysound, aboutplaysound, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('uplaysound', @uplaysound.Register); + RegisterUnit('aboutplaysound', @aboutplaysound.Register); +end; + +initialization + RegisterPackage('playsoundackage', @Register); +end. diff --git a/components/playsoundpackage/playwavepackage.lpk b/components/playsoundpackage/latest_stable/playwavepackage.lpk similarity index 50% rename from components/playsoundpackage/playwavepackage.lpk rename to components/playsoundpackage/latest_stable/playwavepackage.lpk index ccc35b9a7..79cc88400 100644 --- a/components/playsoundpackage/playwavepackage.lpk +++ b/components/playsoundpackage/latest_stable/playwavepackage.lpk @@ -1,77 +1,52 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CONFIG> - <Package Version="4"> - <Name Value="playwavepackage"/> - <Type Value="RunAndDesignTime"/> - <Author Value="minesadorada"/> - <CompilerOptions> - <Version Value="11"/> - <SearchPaths> - <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <Linking> - <Debugging> - <GenerateDebugInfo Value="False"/> - </Debugging> - </Linking> - </CompilerOptions> - <Description Value="Simple component to play wave files under Windows or Linux"/> - <License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com - Modified GPL - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version with the following modification: - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent modules,and - to copy and distribute the resulting executable under terms of your choice, - provided that you also meet, for each linked independent module, the terms - and conditions of the license of that module. An independent module is a - module which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the library, - but you are not obligated to do so. If you do not wish to do so, delete this - exception statement from your version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -"/> - <Version Release="7"/> - <Files Count="2"> - <Item1> - <Filename Value="uplaysound.pas"/> - <HasRegisterProc Value="True"/> - <UnitName Value="uplaysound"/> - </Item1> - <Item2> - <Filename Value="aboutplaysound.pas"/> - <HasRegisterProc Value="True"/> - <UnitName Value="aboutplaysound"/> - </Item2> - </Files> - <i18n> - <EnableI18N Value="True"/> - <OutDir Value="locale"/> - <EnableI18NForLFM Value="True"/> - </i18n> - <RequiredPkgs Count="1"> - <Item1> - <PackageName Value="IDEIntf"/> - </Item1> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <DestinationDirectory Value="/home/gordon/Lazarusprojects/playsoundpackage/published"/> - </PublishOptions> - </Package> -</CONFIG> +<?xml version="1.0" encoding="UTF-8"?> +<CONFIG> + <Package Version="4"> + <Name Value="playwavepackage"/> + <Type Value="RunAndDesignTime"/> + <Author Value="minesadorada"/> + <CompilerOptions> + <Version Value="11"/> + <SearchPaths> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Debugging> + <GenerateDebugInfo Value="False"/> + </Debugging> + </Linking> + </CompilerOptions> + <Description Value="Simple component to play wave files under Windows or Linux"/> + <License Value=" Copyright (C)2014 minesadorada@charcodelvalle.com + Modified GPL"/> + <Version Release="7"/> + <Files Count="2"> + <Item1> + <Filename Value="uplaysound.pas"/> + <HasRegisterProc Value="True"/> + <UnitName Value="uplaysound"/> + </Item1> + <Item2> + <Filename Value="aboutplaysound.pas"/> + <HasRegisterProc Value="True"/> + <UnitName Value="aboutplaysound"/> + </Item2> + </Files> + <i18n> + <EnableI18N Value="True"/> + <OutDir Value="locale"/> + <EnableI18NForLFM Value="True"/> + </i18n> + <RequiredPkgs Count="1"> + <Item1> + <PackageName Value="IDEIntf"/> + </Item1> + </RequiredPkgs> + <UsageOptions> + <UnitPath Value="$(PkgOutDir)"/> + </UsageOptions> + <PublishOptions> + <Version Value="2"/> + <DestinationDirectory Value="/home/gordon/Lazarusprojects/playsoundpackage/published"/> + </PublishOptions> + </Package> +</CONFIG> diff --git a/components/playsoundpackage/playwavepackage.pas b/components/playsoundpackage/latest_stable/playwavepackage.pas similarity index 95% rename from components/playsoundpackage/playwavepackage.pas rename to components/playsoundpackage/latest_stable/playwavepackage.pas index 8b7b77ce6..dafd4f2d4 100644 --- a/components/playsoundpackage/playwavepackage.pas +++ b/components/playsoundpackage/latest_stable/playwavepackage.pas @@ -1,22 +1,22 @@ -{ This file was automatically created by Lazarus. Do not edit! - This source is only used to compile and install the package. - } - -unit playwavepackage; - -interface - -uses - uplaysound, aboutplaysound, LazarusPackageIntf; - -implementation - -procedure Register; -begin - RegisterUnit('uplaysound', @uplaysound.Register); - RegisterUnit('aboutplaysound', @aboutplaysound.Register); -end; - -initialization - RegisterPackage('playwavepackage', @Register); -end. +{ This file was automatically created by Lazarus. Do not edit! + This source is only used to compile and install the package. + } + +unit playwavepackage; + +interface + +uses + uplaysound, aboutplaysound, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('uplaysound', @uplaysound.Register); + RegisterUnit('aboutplaysound', @aboutplaysound.Register); +end; + +initialization + RegisterPackage('playwavepackage', @Register); +end. diff --git a/components/playsoundpackage/latest_stable/readme.txt b/components/playsoundpackage/latest_stable/readme.txt new file mode 100644 index 000000000..8396069e6 --- /dev/null +++ b/components/playsoundpackage/latest_stable/readme.txt @@ -0,0 +1,25 @@ +PlayWavePackage +=============== + +A simple visual component to play WAVe files in Windows or Linux + +Licence +======= +LGPLv2 + +Author +====== +minesadorada + +Compatibility +============= +Tested in: +Windows Vista 32-bit +Linux Mint 64-bit + +Should work with: +All versions of Windows +Most versions of Linux +Maybe Macintosh OSX + +:Gordon Bamber September 2014 \ No newline at end of file diff --git a/components/playsoundpackage/uplaysound.pas b/components/playsoundpackage/latest_stable/uplaysound.pas similarity index 100% rename from components/playsoundpackage/uplaysound.pas rename to components/playsoundpackage/latest_stable/uplaysound.pas