sailfish-keyboard / sailfishos-presage-predictor

Presage based input predictor for the Sailfish OS
https://openrepos.net/content/sailfishkeyboard/maliit-plugin-presage
GNU General Public License v3.0
7 stars 4 forks source link

Use of static presage libs #13

Closed rinigus closed 6 years ago

rinigus commented 6 years ago

First of all, sorry for opening so many issues per day. I just hope it will help us to move forward and would allow me to help you as much as I can.

When developing OSM Scout Server, I found out hard way that its better to statically link as many dependencies as I can. I suggest to use the same approach with presage libraries and prediction plugin.

I have added changes in presage build spec (https://github.com/rinigus/presage/commit/1bf402f70dae3bde708200a14c672c405a2672a5) and made changes in sailfishos-presage-predictor build script as well (https://github.com/rinigus/sailfishos-presage-predictor/commit/eddcdcf18a297ac6b8472739142db3754279c53b). The resulting build dependencies are shown at OBS (current link is https://build.merproject.org/package/binary/home:rinigus:keyboard/sailfishos-presage-predictor?arch=i586&filename=presage_predictor-1.0%2Bobs.static.20180204161455.eddcdcf-10.6.1.jolla.i486.rpm&repository=sailfish_latest_i486 this will change in future to the current version, available via https://build.merproject.org/package/binaries/home:rinigus:keyboard/sailfishos-presage-predictor?arch=i586&repository=sailfish_latest_i486 )

If we also make presage XML path configurable in constructor (issue at https://github.com/rinigus/presage/issues/7), this would allow us to drop presage-data from requirements and use on-fly generated XML that can be altered by this plugin as well as configuration app.

What do you think, should I push these changes as well to PR?

martonmiklos commented 6 years ago

No worries about opening issues it is better to keep things in issues than in mind :D. I do not have too much resources now (I have several another projects close to deadline) but we will see how it goes.

Static linking: I agree. Or even an another idea around the same tip: we could create a pri file for the presage, and add to the predictor as a submodule and include it to the pro file.

rinigus commented 6 years ago

Maybe we could start with static libs and see if that's fine. It would allow to separate GUI and the backend as well as use Presage build system. While possible with submodule, maybe static lib is sufficient.

Since its easy now to build at OBS, the local SDK would just need to have presage repo enabled and updated when new build is done.

I'll add then static build logic to submitted PR. When all merged, we'll close the issue

rinigus commented 6 years ago

PR merged, closing