<div dir="ltr"><div>There are many ways to do this. I can think of at least two:<br></div><div><br></div><div>Static linking:</div><div>1. As the first step of your compilation, create the db file.<br></div><div>2. Use an rcc to embed the sqlite file into the application binary.</div><div>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.</div><div>4. If not found, Extract the embedded sqlite file into that known path.</div><div>5. Continue initialization.</div><div><br></div><div>Download from AWS:<br></div><div>1. Upload that sqlite.db to a S3 bucket.</div><div>2. Download it during initialization</div><div><br></div><div>I would not go for the option of generating that sqlite.db on the user's machine - primarily because 15 minutes is incredibly long.</div><div>The user's patience is precious.</div><div><br></div><div>Thanks,</div><div>-Uv</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 20, 2017 at 12:29 PM, J Pablo Navarro <span dir="ltr"><<a href="mailto:elfio@hiperones.es" target="_blank">elfio@hiperones.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi SFOS devs!<br>
<br>
I think this is my first email over here and I don't have too much experice<br>
with apps, so please be kind :)<br>
<br>
I want to ship an sqlite database with the app. The main reason is that<br>
generating this database takes around 15 minutes... and it weights 104 KiB, so<br>
I think the best solution would be to shipt it as part of the app instead of<br>
download it from somewhere (I don't have a server, so that would be a problem)<br>
or generate it the first time the app is opened.<br>
<br>
My question is, what's the best way to do this?<br>
<br>
Thank you,<br>
Pablo.<br>
______________________________<wbr>_________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.<wbr>sailfishos.org</a></blockquote></div><br></div>