Skip to content

Commit

Permalink
Some small Ultibo extras
Browse files Browse the repository at this point in the history
  • Loading branch information
LongDirtyAnimAlf committed Jan 26, 2021
1 parent 4310f21 commit fecfaaa
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 36 deletions.
10 changes: 10 additions & 0 deletions fpcup.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,16 @@ ArchiveURL=https://github.com/ZGabrovski/DBTreeViewAndDBCntrlGrid/archive/main.z
AddPackage=$(Installdir)/dbcontrols.lpk
UnInstall=rm -Rf $(Installdir)

[FPCUPModule238]
Name=sywebsocket
Description="Websocket Server and Client for Lazarus Applications."
Installdir=$(basedir)/ccr/$(name)
Enabled=0
GITURL=https://github.com/seryal/sywebsocket
ArchiveURL=https://github.com/seryal/sywebsocket/archive/master.zip
AddPackage=$(Installdir)/sywebsocket.lpk
UnInstall=rm -Rf $(Installdir)

[HiddenModule1]
Name=encconv
Description="Lazarus library to convert encoding in string."
Expand Down
Binary file modified fpcupdeluxe.res
Binary file not shown.
6 changes: 3 additions & 3 deletions fpcupdeluxemainform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,15 @@ procedure TForm1.FormCreate(Sender: TObject);
btnGetOpenSSL.Visible:=false;
{$endif}

{$IF defined(CPUAARCH64) OR defined(CPUARM) OR (defined(CPUPOWERPC64) AND defined(FPC_ABI_ELFV2)) OR defined(Haiku) OR defined(AROS) OR defined(Morphos) OR (defined(CPUPOWERPC) AND defined(Darwin)) OR (defined(CPUPOWERPC64) AND defined(Darwin))}
{$IF defined(Haiku) OR defined(AROS) OR defined(Morphos) OR (defined(CPUPOWERPC64) AND defined(FPC_ABI_ELFV2)) OR (defined(CPUPOWERPC) AND defined(Darwin)) OR (defined(CPUPOWERPC64) AND defined(Darwin))}
// disable some features
OldBtn.Visible:=False;
{DinoBtn.Visible:=False;}
CrossSheet.TabVisible:=false;
{$endif}
{$IF defined(CPUAARCH64) OR (defined(CPUPOWERPC64) AND defined(FPC_ABI_ELFV2))}
// disable some features
FixesBtn.Visible:=False;
StableBtn.Visible:=False;
OldBtn.Visible:=False;
{$endif}

{$ifdef Darwin}
Expand Down Expand Up @@ -3191,6 +3190,7 @@ function TForm1.ButtonProcessCrossCompiler(Sender: TObject):boolean;
begin
if GetTargetCPU=GetCPU(TCPU.i386) then BaseBinsURL:='linuxi386crossbins';
if GetTargetCPU=GetCPU(TCPU.x86_64) then BaseBinsURL:='linuxx64crossbins';
if GetTargetCPU=GetCPU(TCPU.arm) then BaseBinsURL:='linuxarmcrossbins';
end
else
if GetTargetOS=GetOS(TOS.freebsd) then
Expand Down
57 changes: 31 additions & 26 deletions installercore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,16 @@ TUtilsList= record

TInstaller = class(TObject)
private
FURL: string;
FKeepLocalChanges: boolean;
FReApplyLocalChanges: boolean;
FCrossInstaller:TCrossInstaller;
FCrossCPU_Target: TCPU; //When cross-compiling: CPU, e.g. x86_64
FCrossOS_Target: TOS; //When cross-compiling: OS, e.g. win64
FCrossOS_SubArch: string; //When cross-compiling for embedded: CPU, e.g. for Teensy SUBARCH=ARMV7EM
FCrossToolsDirectory: string;
FCrossLibraryDirectory: string;
FURL : string;
FUltibo : boolean;
FKeepLocalChanges : boolean;
FReApplyLocalChanges : boolean;
FCrossInstaller : TCrossInstaller;
FCrossCPU_Target : TCPU; //When cross-compiling: CPU, e.g. x86_64
FCrossOS_Target : TOS; //When cross-compiling: OS, e.g. win64
FCrossOS_SubArch : string; //When cross-compiling for embedded: CPU, e.g. for Teensy SUBARCH=ARMV7EM
FCrossToolsDirectory : string;
FCrossLibraryDirectory : string;
procedure SetURL(value:string);
procedure SetSourceDirectory(value:string);
procedure SetBaseDirectory(value:string);
Expand Down Expand Up @@ -469,6 +470,8 @@ TInstaller = class(TObject)
property SolarisOI: boolean write FSolarisOI;
// do we have musl instead of libc
property MUSL: boolean write FMUSL;
// Are we installing Ultibo
property Ultibo: boolean read FUltibo;
property Log: TLogger write FLog;
// Directory where make (and the other binutils on Windows) is located
property MakeDirectory: string write FMakeDir;
Expand Down Expand Up @@ -742,6 +745,7 @@ procedure TInstaller.SetURL(value:string);
FMinorVersion := -1;
FReleaseVersion := -1;
FPatchVersion := -1;
FUltibo:=(Pos('github.com/ultibohub',FURL)>0);
end;
end;

Expand Down Expand Up @@ -2369,8 +2373,7 @@ function TInstaller.DownloadOpenSSL: boolean;

Infoln(localinfotext+'No OpenSLL library files available for SSL. Going to download them.',etWarning);


//if (NOT CheckWin32Version(6,2)) then
if (NOT OperationSucceeded) {AND (NOT CheckWin32Version(6,2))} then
begin
if SVNClient.ValidClient then
begin
Expand All @@ -2394,6 +2397,22 @@ function TInstaller.DownloadOpenSSL: boolean;
then Infoln(localinfotext+'SVN OpenSLL library files download from '+OPENSSL_URL_LATEST_SVN+' ok.',etWarning)
end;

// Direct download OpenSSL from from Lazarus binaries
if (NOT OperationSucceeded) AND (NOT SVNClient.ValidClient) then
begin
OpenSSLFileName:='libeay32.dll';
OperationSucceeded:=GetFile(OPENSSL_URL_LATEST_SVN+'/'+OpenSSLFileName,SafeGetApplicationPath+OpenSSLFileName,true,true);
if OperationSucceeded then
begin
OpenSSLFileName:='ssleay32.dll';
OperationSucceeded:=GetFile(OPENSSL_URL_LATEST_SVN+'/'+OpenSSLFileName,SafeGetApplicationPath+OpenSSLFileName,true,true);
end;

if OperationSucceeded
then Infoln(localinfotext+'Direct OpenSLL library files download from '+OPENSSL_URL_LATEST_SVN+' ok.',etWarning)
end;

// Direct download OpenSSL from public sources
if (NOT OperationSucceeded) then
begin
OpenSSLFileName := GetTempFileNameExt('FPCUPTMP','zip');
Expand Down Expand Up @@ -2459,21 +2478,6 @@ function TInstaller.DownloadOpenSSL: boolean;
SysUtils.Deletefile(OpenSSLFileName); //Get rid of temp zip if success.
end;

// Real last resort: direct download OpenSSL from from Lazarus binaries
if (NOT OperationSucceeded) AND (NOT SVNClient.ValidClient) then
begin
OpenSSLFileName:='libeay32.dll';
OperationSucceeded:=GetFile(OPENSSL_URL_LATEST_SVN+'/'+OpenSSLFileName,SafeGetApplicationPath+OpenSSLFileName,true,true);
if OperationSucceeded then
begin
OpenSSLFileName:='ssleay32.dll';
OperationSucceeded:=GetFile(OPENSSL_URL_LATEST_SVN+'/'+OpenSSLFileName,SafeGetApplicationPath+OpenSSLFileName,true,true);
end;

if OperationSucceeded
then Infoln(localinfotext+'Direct OpenSLL library files download from '+OPENSSL_URL_LATEST_SVN+' ok.',etWarning)
end;

result := OperationSucceeded;
end;
{$endif}
Expand Down Expand Up @@ -4196,6 +4200,7 @@ constructor TInstaller.Create;

FMUSL := false;
FSolarisOI := false;
FUltibo := false;

{$ifdef Linux}
FMUSLLinker:='/lib/ld-musl-'+GetTargetCPU+'.so.1';
Expand Down
5 changes: 0 additions & 5 deletions installerfpc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ TFPCInstaller = class(TBaseFPCInstaller)
private
FSoftFloat : boolean;
FUseLibc : boolean;
FUltibo : boolean;
FTargetCompilerName: string;
FBootstrapCompiler: string;
FBootstrapCompilerDirectory: string;
Expand Down Expand Up @@ -151,7 +150,6 @@ TFPCInstaller = class(TBaseFPCInstaller)
public
property UseLibc: boolean read FUseLibc;
property SoftFloat: boolean write FSoftFloat;
property Ultibo: boolean read FUltibo;
//Directory that has compiler needed to compile compiler sources. If compiler doesn't exist, it will be downloaded
property BootstrapCompilerDirectory: string write FBootstrapCompilerDirectory;
// Build module
Expand Down Expand Up @@ -2333,8 +2331,6 @@ function TFPCInstaller.InitModule(aBootstrapVersion:string):boolean;
if FMUSL then NativeFPCBootstrapCompiler:=false;
{$endif}

FUltibo:=(Pos('github.com/ultibohub',URL)>0);

if (aBootstrapVersion<>'') then
begin
FBootstrapCompilerOverrideVersionCheck:=false;
Expand Down Expand Up @@ -4234,7 +4230,6 @@ constructor TFPCInstaller.Create;

FCompiler := '';
FUseLibc := false;
FUltibo := false;

InitDone:=false;
end;
Expand Down
6 changes: 4 additions & 2 deletions installerhelp.pas
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function THelpInstaller.ConfigModule(ModuleName: string): boolean;

function THelpInstaller.GetModule(ModuleName: string): boolean;
const
HELPSOURCEURL : array [0..15,0..1] of string = (
HELPSOURCEURL : array [0..17,0..1] of string = (
('0.9.28','/Old%20releases/Lazarus%200.9.28/fpc-lazarus-0.9.28-doc-chm.tar.bz2'),
('0.9.30','/Old%20releases/Lazarus%200.9.30/fpc-lazarus-doc-chm-0.9.30.tar.bz2'),
('0.9.30.4','/Old%20releases/Lazarus%200.9.30.4/fpc-lazarus-doc-chm-0.9.30.4.tar.bz2'),
Expand All @@ -297,7 +297,9 @@ function THelpInstaller.GetModule(ModuleName: string): boolean;
('2.0.0','/Lazarus%202.0.0/doc-chm-fpc3.0.4-laz2.0.zip'),
('2.0.2','/Lazarus%202.0.2/doc-chm-fpc3.0.4-laz2.0.2.zip'),
('2.0.4','/Lazarus%202.0.4/doc-chm-fpc3.0.4-laz2.0.4.zip'),
('2.0.6','/Lazarus%202.0.6/doc-chm-fpc3.0.4-laz2.0.6.zip')
('2.0.6','/Lazarus%202.0.6/doc-chm-fpc3.0.4-laz2.0.6.zip'),
('2.0.8','/Lazarus%202.0.8/doc-chm-fpc3.0.4-laz2.0.8.zip'),
('2.0.10','/Lazarus%202.0.10/doc-chm-fpc3.2.0-laz2.0.10.zip')
);
HELP_URL_BASE='https://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation';
HELP_URL_BASE_ALTERNATIVE='http://mirrors.iwi.me/lazarus/releases/Lazarus%20Documentation';
Expand Down

0 comments on commit fecfaaa

Please sign in to comment.