There are many ways to do this. I can think of at least two:

Static linking:
1. As the first step of your compilation, create the db file.
2. Use an rcc to embed the sqlite file into the application binary.
3. During run time, at initialization: check if the sqlite.db exists at a
known path, for eg: "$(dirname $0)/sqlite.db" If found, great! Use it.
4. If not found, Extract the embedded sqlite file into that known path.
5. Continue initialization.

Download from AWS:
1. Upload that sqlite.db to a S3 bucket.
2. Download it during initialization

I would not go for the option of generating that sqlite.db on the user's
machine - primarily because 15 minutes is incredibly long.
The user's patience is precious.

Thanks,
-Uv

On Thu, Jul 20, 2017 at 12:29 PM, J Pablo Navarro <el...@hiperones.es>
wrote:

> Hi SFOS devs!
>
> I think this is my first email over here and I don't have too much experice
> with apps, so please be kind :)
>
> I want to ship an sqlite database with the app. The main reason is that
> generating this database takes around 15 minutes... and it weights 104
> KiB, so
> I think the best solution would be to shipt it as part of the app instead
> of
> download it from somewhere (I don't have a server, so that would be a
> problem)
> or generate it the first time the app is opened.
>
> My question is, what's the best way to do this?
>
> Thank you,
> Pablo.
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe@lists.
> sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to