You are not logged in.
Pages: 1
Has anyone here tried creating a Delphi package from /src and would like to share how he did it or even share the file? I use Delphi 11.3.
Offline
Could also help if you'd shared, what kind of problems you encountered.
-tee-
Last edited by TPrami (2024-11-13 10:56:18)
Offline
I never used packages on Delphi, so I could not help much.
I remember this statement on StackOverflow: "Unless you want to use optional plugin modules, using runtime packages will almost certainly make your life much harder. – David Heffernan Commented Jan 25, 2017"
What I understand is that the mORMot core should better be in a single package, to avoid issues.
Started from https://github.com/synopse/mORMot2/issues/320
which reports issues with SQLite3 static linking, and ask for guidance when creating Delphi packages.
If anyone is already using packages, please give us some feedback here.
Offline
I have a big package with all the mormot2 units on it
I don't have any multithreading knowledge, and so don't know if the threadvars will work properly on a package. I suppose they will, but as I said, I can't really judge
Last edited by Javierus (2024-11-13 10:27:46)
Offline
I remember this statement on StackOverflow: "Unless you want to use optional plugin modules, using runtime packages will almost certainly make your life much harder. – David Heffernan Commented Jan 25, 2017"
What I understand is that the mORMot core should better be in a single package, to avoid issues.
I've always used packages with Delphi (since D3), as I only work with one app (and ERP), and it was designed from start with the plugin idea in mind. Never had issues with packages
The only thing I don't know about are threadvars: if they are not a problem, then anything else is not a problem, and you can split mORMot2 in as many pacakges as you wish
Offline
I have a big package with all the mormot2 units on it
I don't have any multithreading knowledge, and so don't know if the threadvars will work properly on a package. I suppose they will, but as I said, I can't really judge
Hello Javier. Would you be so kind to share this package with me? It would really help me out a lot! I use Delphi 11.3. Don't know if that matters though.
Offline
Sure; I just made a Github GIST:
https://gist.github.com/JavierusTk/04ab … 47f7344ef8
The conditionals are the ones created by Delphi itself; I have mORMot2 repo cloned at W:\mORMot2, and my DPK stored elsewhere, so you'll need to replace my paths with yours
I've not included mormot.db.rad.nexusdb.pas, mormot.db.rad.bde.pas nor mormot.db.rad.firedac.pas, so it will not require the Delphi packages for BDE, NexusDB or FireDAC
I have Delphi Professional here, and I use UniDAC instead of FireDAC
The package has some time, so I propably have left outside a bunch of newer units, but as I don't use them, it's not a problem for me
Let me know if you have any problem
Offline
Thanks a lot. I will try this one out. Would you care to share how you created that package so I could make my own ones as well?
Offline
My two cents: I guess that there is no "default mORMot package to fit them all".
Perhaps we may supply some packages, one without SQLite3, one with SQLite3, one with FireDac, one with UniDac, etc... but all exclusive to the other...
My question @Javierus: no specific trouble when using your package with mORMot? no trouble with RTTI?
(after looking at how packages work, my wild guess is that a monolith mORMot package could be just fine)
My question @all:
1) can anyone propose some packages?
2) could we share the same package source code between all Delphi versions?
Offline
A little update: Installing the package worked well and now my string building and db insertion combined is about 40% faster than before! Thanks a lot!
Offline
Pages: 1