You are not logged in.
Pages: 1
Hi,
I ported mORMot to Delphi for Android.
It is surely not perfect and not yet tested very much.
Also a bad hack, which is part of mORMots remote call mechanismen, is not portable without the same hacking knowledge about the delphi android compiler.
But this feature is not used in our projects...
In the next step I will only test and verify the functions we use in our projects.
You find the adapted version on github - besides my changes it us uptodate.
https://github.com/ThomasKalten/mORMot
Delphi version used: XE11.
Have fun.
Thomas
Offline
Wow. This is a lot of work!
Not a bad hack at all.
The comparison is very interesting to look at:
https://github.com/synopse/mORMot/compa … Mot:master
Which features do you use? Are they stable enough?
About the remote call asm, you could reuse the very same from FPC, because the ABI (i.e. the raw calling convention) is the same with Delphi or FPC: my guess is that it is platform-specific, no compiler-specific.
Sadly, it is not stable/complete enough to be merged in mORMot 1.
And I don't have a recent Delphi for Android compiler.
But my guess is that it could be much easier and safer to add Delphi for Android support in mORMot 2.
The OS-specific code is well circumvented, in some units only.
Perhaps someone could use your great work as reference to start the mORMot 2 integration.
Thanks a lot for sharing!
- and sorry for the late answer.
Offline
Features we use:
- ORM with a local database
- the testing of this feature is in an early state
Current problem solved - not commited yet:
- dynamic sqlite loading - don't know if Delphi can use a static linked version in Android
- you have to distribute a sqlite.so lib with you app.
Important restriction for Delphi on Android: asm not supported at all
- if somebody has more detailed knowledge of the Delphi-Linker, it may be a solution to link a some precompiled lib, which contains the needed code.
Concerning OS-specific code:
- I touched mostly the parts, where some os-specific code was already in place.
Viele Grüße
Thomas
Offline
Thanks for the input.
We can link some static .o with Delphi for Android - it is what the RTL does.
Especially since there is no asm available
My guess is that we could try to link the FPC static libs with Delphi for Android.
It "should work", since the LLVM linker can link our .o files.
You are right: we need some basic asm for the SOA calls stubs...
One solution may be to generate a very small stand-alone FPC unit, containing only the asm..end needed with no dependency at all, then use directly the compiled .o - it should work directly.
Offline
Thanks for the input.
So if we are already in the topic of asm, here another remark:
Another problem are the RCU128, RCU64, ... thread safe assignments.
The Delphi-Atomic-Operation give a "bus error".
Therefor the FPC solution and using a lib could also be the way out.
Offline
Delphi seems to have some intrinsic to replace the FPC ReadBarrier intrinsic:
https://docwiki.embarcadero.com/Librari … oryBarrier
Offline
Thanks, I did not found this function until now.
The next detail problem solved. :-)
Offline
Pages: 1