Sorry. My system is Win10/64 bit, Laz-trunk 32 bit/fpc3.0.
Yes, the server starts with admin rights. But if I run it the next time as standard user it runs fine as well. Seems to be registered somewhere...
The SimpleDemo and mORMotFullDemo run fine now. Then I copied the mORMotDataStoreDS, the server files and the SimpleDemo to my tvplanit installation. Reinstalled tvplanit, added the requirement for laz_visualplanit to SimpleDemo (because I think this will be standard application), removed the tvplanit source from the SearchPath, recompiled --> Running fine.
All relevant files are now in the ccr repository. A user wanting to run the demo must download the mORMot sources and copy them to folder mORMotSourceHere, same with the sqlite3 obj files. We should mention the download sources in the readme file.
Currently I am testing with other Lazarus/FPC versions:
- Laz 1.6/fpc 3.0: Seems to work fine. Initially a got an error (I did not write down the exact words) indicating that the existing exe cannot be rewritten. It looks as if the server does not end when ENTER is pressed. But not 100% sure on this... After a restart this issue did not happen any more, so far.
- Laz 1.44/fpc 2.6.4 does not compile mORMot: "Identifier not found TRegisters" in SynCommons.crc32fast, line 30107 (maybe it can be bypassed by defining PUREPASCAL, but I did not check that). (*see below)
I will have to think about the fulldemo. Definitely I will not duplicate its code into a mORMot application, taking care of two programs which are 99.9% identical will end up in a mess. What could work would be to put the datastore into a run-time created datamodule; the standard fulldemo would have the TVpBufDSDatastore, the mORMot fulldemo the TVpmORMotDatastore in this datamodule. A define would decide which one of the datamodules would be linked in; the rest of the application would be the same. I'll still have to test that, though.
*[EDIT]
Laz144 or fpc 2.6.4 seem to lack a define CPUX86. After setting this manually, compilation passes this location, but finds another error in mORMot.pas, line 30868: "aSQLFrom := aSQLFrom+SQLTableName+' '+ToUTF8(aField[1]);" - "Can't determine which overloaded function to call (ToUTF8)".