You've already forked lazarus-ccr
* Use lazmkunit package for the Lazarus-package
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1390 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1,66 +1,24 @@
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
program fpmake;
|
program fpmake;
|
||||||
|
|
||||||
uses fpmkunit, sysutils, classes;
|
{$IFDEF COMPILED_BY_FPPKG}
|
||||||
|
{$IFNDEF HAS_PACKAGE_LAZMKUNIT}
|
||||||
|
{$FATAL This package depends on the lazmkunit package which is not installed}
|
||||||
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
type
|
uses sysutils, lazmkunit, fpmkunit;
|
||||||
{ TLazInstaller }
|
|
||||||
|
|
||||||
TLazInstaller = class(TCustomInstaller)
|
|
||||||
public
|
|
||||||
procedure DoRegisterLazarusPackages(Sender: TObject);
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
|
||||||
end;
|
|
||||||
|
|
||||||
resourcestring
|
|
||||||
SErrAlreadyInitialized = 'Installer can only be initialized once';
|
|
||||||
|
|
||||||
var
|
|
||||||
InstallLazarusPackageDir : string;
|
|
||||||
|
|
||||||
{ TLazInstaller }
|
|
||||||
|
|
||||||
procedure TLazInstaller.DoRegisterLazarusPackages(Sender: TObject);
|
|
||||||
Var
|
|
||||||
LazarusDir : string;
|
|
||||||
LazPackagerFile : Text;
|
|
||||||
|
|
||||||
begin
|
|
||||||
LazarusDir := GetCustomFpmakeCommandlineOptionValue('lazarusdir');
|
|
||||||
if LazarusDir <> '' then
|
|
||||||
begin
|
|
||||||
BuildEngine.CmdRenameFile(InstallLazarusPackageDir+PathDelim+'GeckoComponents.lpk.fppkg',InstallLazarusPackageDir+PathDelim+'GeckoComponents.lpk');
|
|
||||||
System.assign(LazPackagerFile,IncludeTrailingPathDelimiter(LazarusDir)+'packager'+PathDelim+'globallinks'+PathDelim+'GeckoComponents-0.lpl');
|
|
||||||
System.Rewrite(LazPackagerFile);
|
|
||||||
System.WriteLn(LazPackagerFile,InstallLazarusPackageDir+PathDelim+'GeckoComponents.lpk');
|
|
||||||
System.close(LazPackagerFile);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TLazInstaller.Create(AOwner: TComponent);
|
|
||||||
begin
|
|
||||||
AddCustomFpmakeCommandlineOption('lazarusdir','Location of a Lazarus installation.');
|
|
||||||
if assigned(Defaults) then
|
|
||||||
Error(SErrAlreadyInitialized);
|
|
||||||
Defaults:=TFPCDefaults.Create;
|
|
||||||
inherited Create(AOwner);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Var
|
Var
|
||||||
P : TPackage;
|
P : TLazPackage;
|
||||||
T : TTarget;
|
T : TTarget;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
With Installer(TLazInstaller) do
|
With Installer(TLazInstaller) do
|
||||||
begin
|
begin
|
||||||
P:=AddPackage('gecko');
|
P:=AddPackage('gecko') as TLazPackage;
|
||||||
p.AfterInstall := @TLazInstaller(Installer).DoRegisterLazarusPackages;
|
p.AfterInstall := @TLazInstaller(Installer).DoRegisterLazarusPackages;
|
||||||
|
|
||||||
If Defaults.UnixPaths then
|
|
||||||
InstallLazarusPackageDir:=Defaults.Prefix+'share'+PathDelim+'fpc-'+p.Name
|
|
||||||
else
|
|
||||||
InstallLazarusPackageDir:=Defaults.BaseInstallDir+PathDelim+'fpc-'+p.Name;
|
|
||||||
|
|
||||||
P.Version:='0.9.0-1';
|
P.Version:='0.9.0-1';
|
||||||
P.OSes:=AllUnixOSes+[Win32,Win64];
|
P.OSes:=AllUnixOSes+[Win32,Win64];
|
||||||
P.Author := 'Takanori Ito';
|
P.Author := 'Takanori Ito';
|
||||||
@@ -71,6 +29,7 @@ begin
|
|||||||
P.Options.add('-Sm');
|
P.Options.add('-Sm');
|
||||||
P.Options.add('-Sd');
|
P.Options.add('-Sd');
|
||||||
|
|
||||||
|
P.Dependencies.Add('lazmkunit');
|
||||||
P.Dependencies.Add('fcl-registry',AllWindowsOSes);
|
P.Dependencies.Add('fcl-registry',AllWindowsOSes);
|
||||||
|
|
||||||
P.Targets.AddUnit('nsTypes.pas');
|
P.Targets.AddUnit('nsTypes.pas');
|
||||||
@@ -204,18 +163,18 @@ begin
|
|||||||
P.Sources.AddExample('SampleApps/GBrowser.lpi','examples');
|
P.Sources.AddExample('SampleApps/GBrowser.lpi','examples');
|
||||||
P.Sources.AddExample('SampleApps/GBrowser.dpr','examples');
|
P.Sources.AddExample('SampleApps/GBrowser.dpr','examples');
|
||||||
|
|
||||||
P.Sources.AddDoc('Components/GeckoComponents.lpk.fppkg',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazPackageTemplate('Components/GeckoComponents.template');
|
||||||
P.Sources.AddDoc('Components/BrowserSupports.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/BrowserSupports.pas');
|
||||||
P.Sources.AddDoc('Components/CallbackInterfaces.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/CallbackInterfaces.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoBrowser.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoBrowser.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoBrowser.lrs',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoBrowser.lrs');
|
||||||
P.Sources.AddDoc('Components/GeckoChromeWindow.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoChromeWindow.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoChromeWindow.lfm',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoChromeWindow.lfm');
|
||||||
P.Sources.AddDoc('Components/GeckoChromeWindow.lrs',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoChromeWindow.lrs');
|
||||||
P.Sources.AddDoc('Components/GeckoComponents.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoComponents.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoDirectoryService.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoDirectoryService.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoInit.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoInit.pas');
|
||||||
P.Sources.AddDoc('Components/GeckoSimpleProfile.pas',InstallLazarusPackageDir);
|
P.LazPackageFiles.AddLazFile('Components/GeckoSimpleProfile.pas');
|
||||||
|
|
||||||
Run;
|
Run;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user