* * *

Poll

Is it worth to port these components, would you like to use it?

Yes sure, I've been waiting for that, I will use them.
2 (28.6%)
Yes it is good to have them in Lazarus, but I will not use it.
4 (57.1%)
No alternatives enough. (Firebird, Sqlite, TDbf, ..)
1 (14.3%)
They do not  interest me.
0 (0%)

Total Members Voted: 7

Voting closes: April 11, 2017, 06:58:11 pm

Author Topic: Turbo Power Flashfiler Lazarus Port  (Read 1447 times)

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Turbo Power Flashfiler Lazarus Port
« on: November 18, 2016, 02:24:17 am »
Wikipage: http://wiki.freepascal.org/FlashFiler
----

Original message:

Hello guys,
here is TurboPower FlashFiler for Lazarus. It is not complete. All  parts compile but only client-components are working without errors. Servercomponents has errors.
(caused by variant-strings).
You have to use original server compiled with delphi.


Sorry guys, i wanted it publish earlier but i forget it and I wanted also publish completed. Someone from here wrote me today so I publish it now.
I tested only with Windows.

Also look this thread:
http://forum.lazarus.freepascal.org/index.php/topic,29786.0.html

Download:
You must still download original from Sourceforge and merge both:
https://sourceforge.net/projects/tpflashfiler/files/tpflashfiler/2.13/

Here is my lazarus-port:
https://1drv.ms/u/s!AvJGv-C_3b-WgQMD-ogFIVkgTF8e

Zipfile Contains readme-files, lazarus-package and source.


Edit: New Zip-File with all files:
https://1drv.ms/u/s!AvJGv-C_3b-WgQT63o0GHCCdYksJ
« Last Edit: March 12, 2017, 06:03:16 pm by Soner A. »
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Has anyone solved server error?
« Reply #1 on: December 07, 2016, 07:53:40 am »
Has anyone solved server error?
Please can one put this component to Lazarus-CCR?

I put copy of EmbeddedServer-example as runtime version. Maybe it's better to debug.
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

wp

  • Hero Member
  • *****
  • Posts: 3261
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #2 on: December 07, 2016, 02:47:05 pm »
The files now are uploaded to ccr (components/flashfiler). As I noticed the library is not yet working (at least all demos are crashing). Soner A., I hope that you contribute to fix the issues (I myself do not plan to fully dedicate to this project). If this project would seem to be abondoned like many of the other ccr projects I'd take the freedom to remove it again.
Lazarus trunk / fpc 3.0.0 / Win32

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #3 on: December 10, 2016, 12:52:10 pm »
The files now are uploaded to ccr (components/flashfiler). As I noticed the library is not yet working (at least all demos are crashing). Soner A., I hope that you contribute to fix the issues (I myself do not plan to fully dedicate to this project). If this project would seem to be abondoned like many of the other ccr projects I'd take the freedom to remove it again.

You need the server-binaries from sourceforge, but forget it. I made better package with all neccessary files and better readme-text with instructions to use the package. Maybe the readme can be used for wiki page.

Sorry guys,  the server components still don't work. There is stream error caused in fflldict.pas-file in procedure TffDataDictionary.ReadFromStream(S : TStream); (Look readme.txt for more information)
I could not resolve it, it is pascal stream error, maybe someone more skilled with fpc can solve it.
This is real good database software, better then sqlite and fast as firebird, all in pascal.


Here is the dowload link for all files (except help files and delphi package files):
https://1drv.ms/u/s!AvJGv-C_3b-WgQT63o0GHCCdYksJ

Edit:
I made wiki page for this.
http://wiki.freepascal.org/FlashFiler
« Last Edit: December 10, 2016, 01:10:47 pm by Soner A. »
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

wp

  • Hero Member
  • *****
  • Posts: 3261
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #4 on: December 10, 2016, 01:19:49 pm »
Hmm... I don't think that sourceforge should not be the home of server binaries. Wouldn't it be better to clearly state in the readme and the wiki that the ccr site does not contain them, and they *MUST* be downloaded before using the ff2 lib. We even can prepare an empty folder for them with another note reminding the users to download the binaries. The situation is similar to what DonAlfredo did with mORMot and tvplanit (http://forum.lazarus.freepascal.org/index.php/topic,33748.msg220583.html#msg220583).

Beyond the server binaries in flashfiler/bin and the readme, are the files identical with the current version on ccr? Once a file base has established you should upload only patch files which make it much easier for me to keep track of the changes.
Lazarus trunk / fpc 3.0.0 / Win32

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #5 on: December 10, 2016, 01:28:19 pm »
Yes only the readme and server binaries are new.
We can make empty binary folder with dowload link file to binary files on source forge. (https://sourceforge.net/projects/tpflashfiler/files/tpflashfiler/2.13/tpflashfiler_bin.zip/download)

Binary files are only needed until we get the server components working.
« Last Edit: December 10, 2016, 01:31:41 pm by Soner A. »
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

wp

  • Hero Member
  • *****
  • Posts: 3261
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #6 on: December 10, 2016, 01:57:52 pm »
Done (with minor reformatting of readme).

In the readme you write
Quote
Client components are Working.
Does this mean that these Delphi-precompiled server files are needed for testing? Which demo projects could be used for testing?
Lazarus trunk / fpc 3.0.0 / Win32

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #7 on: December 10, 2016, 02:08:22 pm »
All Examples except LazEmbeddedServer and LazEmbeddedServer-RT.
Without server components we need precompiled server program. You must first start server programm then the examples.
I wrote it in wiki http://wiki.freepascal.org/FlashFiler
« Last Edit: December 10, 2016, 02:11:07 pm by Soner A. »
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

BrunoK

  • New member
  • *
  • Posts: 38
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #8 on: December 11, 2016, 06:39:33 pm »
I tried to convert FF2 and was partially successful but met with the following difficulty regarding (IN FPC 2.6.4) the pred(SomeWordVar) that is not evaluated the same in DELPHI  and FPC 2.6.4.
The following program illustrates the problem
Code: Pascal  [Select]
  1. program project_pred;
  2.  
  3. { Same program for BDS2006 and FPC 2.6.4}
  4. {$ifdef FPC}
  5. {$mode DELPHI}
  6. {$else}
  7. {$APPTYPE CONSOLE}
  8. {$endif FPC}
  9.  
  10. var
  11.   ix: integer;
  12.   // ixEnd: CARDINAL; // <-Ok
  13.   ixEnd: word; // <-unsigned causing some trouble in for...loops
  14. begin
  15.   ixEnd := 0;
  16.   writeln('Pred(ixEnd)=',Pred(ixEnd));  // FPC 2.6.4=65535<>BDS2006=-1
  17.   writeln('for ix:=0 to Pred(ixEnd) do ...');
  18.   for ix := 0 to Pred(ixEnd) do begin // Delphi wont enter for...loop but FPC will
  19.     writeln(ix);                    // loop to 65535
  20.     if ix > ixEnd then              // avoid too many iteration
  21.       break;
  22.   end;
  23.   writeln;
  24.   writeln('for ix:=0 to ixEnd-1 do ...');
  25.   for ix := 0 to ixEnd - 1 do begin // <-- probably FPC casts ixEnd-1 to an Integer
  26.     writeln(ix);                //     prior to testing the end loop condition
  27.     if ix > ixEnd then
  28.       break;
  29.   end;
  30.   writeln;
  31.   writeln('Finished, hit enter');
  32.   readln;
  33. end.
  34.  
Output for FPC and DBS2006 :
Quote
FPC 2.6.4
Pred(ixEnd)=65535
for ix:=0 to Pred(ixEnd) do ...
0
1

for ix:=0 to ixEnd-1 do ...

Finished, hit enter
Quote
BDS 2006
Pred(ixEnd)=-1
for ix:=0 to Pred(ixEnd) do ...

for ix:=0 to ixEnd-1 do ...

Finished, hit enter
What are your results for that simple program and what version of FPC do you use ?

This has influence on iterations on many arrays in FlashFiler where indexes overflows, for example in
procedure TffDataDictionary.BindIndexHelpers;
IndexCount is a Word and if it is equal to 0 you'll have an overflow. In some other cases, the WORD variable is assigned to a local integer prior to for loops, thus not showing this behavior.

If of any use I join my FF2_FPC.lrs file with the glyphs for the Lazarus 1.4.4 component pallette.

I found also (in DELPHI/FastMM4) that there are memory leaks when executing  SQL from a client, some FF2 objects being not freed. Probably that would be solvable.



Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #9 on: December 17, 2016, 09:40:38 am »
1) I converted it, why reinvent the wheel?
There is some problems with TffServerEngine, maybe you can help to solve it.

2)I know about this problem.
For all integers delphi returns for:
Pred(0)=-1
and fpc return for signed integers:
Pred(0)=-1
and for unsigned integers:
Pred(0)=High of Integer type.

You have to fix it manually. i.e.:
Code: Pascal  [Select]
  1. var
  2.   ix: integer;
  3.   ixEnd: word;
  4. begin
  5.   ixEnd := 0;
  6.   for ix := 0 to Pred(ixEnd) do begin // Delphi wont enter for...loop but FPC will
  7.        // Because for Delphi: Pred(ixEnd)=-1 and for fpc Pred(ixEnd)=65535
  8.        // solution: change Pred(ixEnd) to (ixEnd-1)
  9.   end;
  10.  end;
  11.  
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port (not complete)
« Reply #10 on: December 17, 2016, 09:48:25 am »
...
This has influence on iterations on many arrays in FlashFiler where indexes overflows, for example in
procedure TffDataDictionary.BindIndexHelpers;
IndexCount is a Word and if it is equal to 0 you'll have an overflow. In some other cases, the WORD variable is assigned to a local integer prior to for loops, thus not showing this behavior.

If of any use I join my FF2_FPC.lrs file with the glyphs for the Lazarus 1.4.4 component pallette.

I found also (in DELPHI/FastMM4) that there are memory leaks when executing  SQL from a client, some FF2 objects being not freed. Probably that would be solvable.
IndexCount and other variables from procedure TffDataDictionary.BindIndexHelpers;  is integer, have you old version?
Where is fastmm4 used in flashfiler?
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

Soner A.

  • Full Member
  • ***
  • Posts: 125
    • My Blog
Re: Turbo Power Flashfiler Lazarus Port
« Reply #11 on: March 12, 2017, 05:49:09 pm »
Yesterday and today I worked on server component now it is working.
"Now, it can be used only with Lazarus for client/server and embedded database server applications."
It has still some work and tests.
The new version is not online, I must restructure the package and folder. I upload it in the next days/weeks.

I am thinking to drop this components, because it takes to much time and i use firebird for professional application.
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus