-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux support (minor change needed) #3918
Comments
Hi @christianfl! ffi.sqfliteFfiInit();
databaseFactory = ffi.databaseFactoryFfi; That could probably be performed only once, at init time, and outside that class, right? |
3 things in total @monsieurtanuki ! Easy to oversee is the
P.S.
|
@christianfl Fair enough: I didn't notice the difference between your We're not going to spoil the current implementation: we're going to use abstraction instead. Then a new parameter in Does that make sense? |
I thought about that and to my mind: Yes! I think the FFI approach is a bit "fiddly" at the moment and also relies on packages installed on the host system. It would be a good idea to only activate that with another parameter for So that would perhaps be used with a new linux entrypoint? This way it would also be easy to add other platforms with FFI later without using statements like:
|
@christianfl Indeed. |
Low priority ideas
|
I also had in mind to open an issue for distributing on Flathub later but didn't want to overwhelm you for now... |
I could potentially help with the Flathub distribution once this is settled. I have several Flutter apps on Flathub myself. So far, I've always released each version manually, but I'm working on automating releases via Github Actions. |
that's great @12people 👍 |
Implemented in #5431 |
Problem
Hey! I noticed you added desktop support but so far tested only Mac OS: #3251 I tested building and running on Linux and it crashed with a database error.
Proposed solution
sqflite does not directly support other platforms than Android, iOS and Mac OS. However, there is the package sqflite_common_ffi from the same author for making it possible to support other desktop platforms. It was relatively easy to use that to make Smooth app running on Linux. These are the necessary steps:
flutter pub add sqflite_common_ffi
packages/smooth_app/lib/database/local_database.dart
:flutter run -d linux -t lib/entrypoints/android/main_fdroid.dart
I did not test wether that brakes support with Android / iOS so far!
Additional context
I would love to sometime use the Smooth app on the Librem 5 (Linux phone) It should definitely be possible as I already compiled some Flutter apps for that and they seem to run fine.
Edit: Hint – The packages
libsqlite3
andlibsqlite3-dev
are required on the build machine andlibsqlite3
on the running host.Part of
The text was updated successfully, but these errors were encountered: