#2 Re: mORMot 1 » Make mormot a Lazarus Package » 2018-07-05 20:24:55

What I did with websockets is just copy the files I needed and the compiled files as well. So I don't need to include the entire mormot framework. This goes well with the license? Sorry, I ask here because is related with the distribution, as a package is as well.

#3 Re: mORMot 1 » WebSockets and existing Lazarus GUI Application » 2018-07-05 20:23:37

Hi, I finally managed to get this working.

But it runs only on localhost, despite I set the local ip of my machine in the websockets Add method.

fServer.AddUrlWebSocket('whatever', '8888', False, 'localhost') <-- here I use my local ip

As well I change the ip on the html file.

#4 Re: mORMot 1 » Make mormot a Lazarus Package » 2018-07-05 14:02:03

Ok.

Basically a package contains all the files needed. In the package options you can define the include files and libraries as well.

Package -> New package. There you can go to options and set the relative paths where files must be found.

And when you work like this, you can include a package into a lazarus project, doesn't matter where it's located because the path is found by the IDE when you first open and compile the package.

#5 Re: mORMot 1 » WebSockets and existing Lazarus GUI Application » 2018-07-05 00:03:24

I tried with no success, you or anyone can make a small demo please?

#6 mORMot 1 » Make mormot a Lazarus Package » 2018-07-04 17:46:33

lainz
Replies: 3

Hi, is possible to make this great library into a package?

To make it more simple to install and include into projects.

Thanks.

#7 mORMot 1 » WebSockets and existing Lazarus GUI Application » 2018-07-04 17:21:26

lainz
Replies: 6

Hi,

I've tested the project mORMot\SQLite3\Samples\31 - WebSockets

And works very well.

The problem I have is to include into an existing Lazarus GUI Application.

I need the WebSockets server in a separate thread, to grab data from the main form, and process it into json and send it to the web page.

I'm not using mode delphi on my application, and seems that is needed in order to use mormot. I'm wrong?

The demo can be extended using a GUI application instead of a command line one?

Thanks.

#9 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-12 16:58:56

Hi, the important thing for me is if it's compatible with our existing databases? We can't simply migrate all databases to the new format.

Sorry if it's already answered, but I'm a newby on this matter.

#10 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-10 12:58:06

ab wrote:

If you want to use this encyption, use wxSQLite3 dll itself.
Note that this encryption is proprietary, i.e. specific to the wsSQLite3 library.
We compiled the raw sqlite3.c with standard extensions (FTS, JSON) as static, and propose a simple encryption scheme.

Ok.

ab wrote:

We would like to add a SynCrypto based encryption scheme, in the close future.
Our current encryption is less powerful than this one.

I see. The thing is I not choose the dll to be used, it was choosen long time ago on the company by the original author of the application.

I think your model is easier, less powerful, but it saves us of the dll hell.

I can not change since the customers already have made local databases that rely on the model of wxSQLite3.

So maybe we can't change to this dll less system.

ab wrote:

About missing SQLITE_OK, sqlite3_exec or sqlite3_free, please take a few minutes to read the unit source and documentation.
SQLITE_OK is defined in SynSQlite3.pas which is common to static or dynamic wrapper.
sqlite3.free_ is to be used as sqlite3_free.

Ok. I did not read it fully. My fault. I did of course a quick search in the github repo and find that was in that unit you say. I asked because I wish to acomplish the no dll usage, and I badly think that these unit was only for static.

ab wrote:

Then Sqlite3 doc states: The sqlite3_exec() interface is a convenience wrapper around sqlite3_prepare_v2(), sqlite3_step(), and sqlite3_finalize(), that allows an application to run multiple statements of SQL without having to use a lot of C code.
We have a much powerful wrapper with the TSQLDataBase class. So we didn't define those on purpose.

Ok. Thanks. Is a good reason. Of course if it was possible to use your excelent package, we should change these methods by a better alternative, like the one you say.

#11 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-09 22:25:20

mpv wrote:

About encryption, there is a topic https://synopse.info/forum/viewtopic.php?id=373&p=1

I mean this encryption, because the databases are already encrypted
https://github.com/utelle/wxsqlite3

wxSQLite3 - SQLite3 database wrapper for wxWidgets (>>>> including SQLite3 encryption extension <<<<)

#12 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-09 19:56:54

Hi again, well I was testing it and seems that this method is missing:

sqlite3_exec
sqlite3_free

And also constant

SQLITE_OK

Maybe I'm missing something.

And another thing I notices is that I need to do Run > Build in order to compile.

If I just use the Run button it gives me some errors, for example that can't find some .a files.

Also I have another question, this SQLite you provide comes with the encryption support?

#13 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-09 19:26:44

Thanks. If I need further help I will ask.

#14 mORMot 1 » Embed SQLite C object files into application » 2018-03-09 14:55:13

lainz
Replies: 32

Hi, from the Lazarus forum they sent me to here, this is the original message
http://forum.lazarus.freepascal.org/ind … opic=40408

Hi, according to this file
ftp://ftp.freepascal.org/fpc/docs-pdf/CinFreePascal.pdf

I can use, instead of a .DLL, the object files .o into FPC project.

This is the library I'm using
https://github.com/utelle/wxsqlite3

And instead of using the .dll, I want to incorporate that library into the executable.

My questions:

* There is a wrapping unit already made I can use to do that, I say the unit having all .o files listed, or I need to make it by myself?

* The .o files need to be compiled in each OS I want to deploy my application. Say .o files from Windows are not the same .o files from Mac / Linux?

* About the license of this fork of SQLite, doing that in a commercial application is right? maybe I need to ask in the project, but I also add this here if someone knows.

Thanks.

I've seen that you have a SQLite3 folder with a lot of stuff there.
https://github.com/synopse/mORMot/tree/master/SQLite3

I can in any form copy that and use with Lazarus?

What I need is to embed the SQLite .o files into an application made with Lazarus, for Linux, Mac and Windows.

Any ideas on how I can do that?

Thanks.

Board footer

Powered by FluxBB