Re: [SailfishDevel] Ship a sqlite dabase with an app

2017-07-23 Thread Pablo
Hi all, and thank you for your answers :) I finally added the sqlite db with the rpm following the example of Sebastian. I also found somewhere that the name of the ini and sqlite files is the md5 sum of the name the db receives in the ini follow, so it is perfectly working now. Thank you! Pabl

Re: [SailfishDevel] Ship a sqlite dabase with an app

2017-07-20 Thread Sebastian Wolf
Hi Pablo, Am Do. Juli 20 21:29:39 2017 GMT+0200 schrieb J Pablo Navarro: > 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 th

Re: [SailfishDevel] Ship a sqlite dabase with an app

2017-07-20 Thread Yuvraaj Kelkar
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 e

Re: [SailfishDevel] Ship a sqlite dabase with an app

2017-07-20 Thread rinigus
Hi Pablo, if its 0.1 MB it should be no issue to include the database into the RPM with the app. Just add it into data directory (/usr/share/appname/) and load it from there. Note that it will be read-only in this case. If you need to write into the database, make a copy under /home/nemo/.local in

Re: [SailfishDevel] Ship a sqlite dabase with an app

2017-07-20 Thread Niel Nielsen
Perhaps use compression to minimize the data and that way include the database with the app ? Best Niel On Thursday, July 20, 2017, J Pablo Navarro 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

[SailfishDevel] Ship a sqlite dabase with an app

2017-07-20 Thread J Pablo Navarro
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 solu