Use bundled sqlite3

This commit is contained in:
2024-05-27 11:11:20 +08:00
parent 44a23cd532
commit de2bc89cdf
9 changed files with 21 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ jobs:
with: with:
channel: stable channel: stable
- name: Install dependencies - name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev liblzma-dev libstdc++-12-dev ninja-build libsqlite3-dev run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev liblzma-dev libstdc++-12-dev ninja-build
- name: Build - name: Build
run: flutter build linux --release run: flutter build linux --release
- name: Package files - name: Package files

View File

@@ -36,8 +36,6 @@ jobs:
uses: microsoft/setup-msbuild@v2 uses: microsoft/setup-msbuild@v2
- name: Build resources - name: Build resources
run: cd windows/resources && msbuild /p:Configuration=Release && Copy-Item "x64/Release/resources.dll" -Destination "../../build/windows/x64/runner/Release/resources.dll" run: cd windows/resources && msbuild /p:Configuration=Release && Copy-Item "x64/Release/resources.dll" -Destination "../../build/windows/x64/runner/Release/resources.dll"
- name: Download required dynamic library
run: Invoke-WebRequest -OutFile build/windows/x64/runner/Release/sqlite3.dll "https://github.com/tekartik/sqflite/raw/master/sqflite_common_ffi/lib/src/windows/sqlite3.dll"
- name: Package files - name: Package files
run: cd build/windows/x64/runner/Release && 7z a -mx9 -y ../../../../../windows.7z run: cd build/windows/x64/runner/Release && 7z a -mx9 -y ../../../../../windows.7z
- name: Upload files - name: Upload files

View File

@@ -8,6 +8,7 @@
#include <irondash_engine_context/irondash_engine_context_plugin.h> #include <irondash_engine_context/irondash_engine_context_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h> #include <screen_retriever/screen_retriever_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <super_native_extensions/super_native_extensions_plugin.h> #include <super_native_extensions/super_native_extensions_plugin.h>
#include <window_manager/window_manager_plugin.h> #include <window_manager/window_manager_plugin.h>
@@ -18,6 +19,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) screen_retriever_registrar = g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) super_native_extensions_registrar = g_autoptr(FlPluginRegistrar) super_native_extensions_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SuperNativeExtensionsPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "SuperNativeExtensionsPlugin");
super_native_extensions_plugin_register_with_registrar(super_native_extensions_registrar); super_native_extensions_plugin_register_with_registrar(super_native_extensions_registrar);

View File

@@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
irondash_engine_context irondash_engine_context
screen_retriever screen_retriever
sqlite3_flutter_libs
super_native_extensions super_native_extensions
window_manager window_manager
) )

View File

@@ -12,6 +12,7 @@ import package_info_plus
import path_provider_foundation import path_provider_foundation
import screen_retriever import screen_retriever
import shared_preferences_foundation import shared_preferences_foundation
import sqlite3_flutter_libs
import super_native_extensions import super_native_extensions
import window_manager import window_manager
@@ -23,6 +24,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin")) SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin"))
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
} }

View File

@@ -891,6 +891,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.3" version: "2.4.3"
sqlite3_flutter_libs:
dependency: "direct main"
description:
name: sqlite3_flutter_libs
sha256: "1e62698dc1ab396152ccaf3b3990d826244e9f3c8c39b51805f209adcd6dbea3"
url: "https://pub.dev"
source: hosted
version: "0.5.22"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:

View File

@@ -38,6 +38,7 @@ dependencies:
retrofit: ^4.0.1 retrofit: ^4.0.1
shared_preferences: ^2.2.0 shared_preferences: ^2.2.0
sqflite_common_ffi: ^2.3.3 sqflite_common_ffi: ^2.3.3
sqlite3_flutter_libs: any
super_clipboard: ^0.8.15 super_clipboard: ^0.8.15
super_context_menu: ^0.8.15 super_context_menu: ^0.8.15
ua_parser_js: ^1.0.1 ua_parser_js: ^1.0.1

View File

@@ -8,6 +8,7 @@
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h> #include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
#include <screen_retriever/screen_retriever_plugin.h> #include <screen_retriever/screen_retriever_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <super_native_extensions/super_native_extensions_plugin_c_api.h> #include <super_native_extensions/super_native_extensions_plugin_c_api.h>
#include <window_manager/window_manager_plugin.h> #include <window_manager/window_manager_plugin.h>
@@ -16,6 +17,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi")); registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi"));
ScreenRetrieverPluginRegisterWithRegistrar( ScreenRetrieverPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
SuperNativeExtensionsPluginCApiRegisterWithRegistrar( SuperNativeExtensionsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SuperNativeExtensionsPluginCApi")); registry->GetRegistrarForPlugin("SuperNativeExtensionsPluginCApi"));
WindowManagerPluginRegisterWithRegistrar( WindowManagerPluginRegisterWithRegistrar(

View File

@@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
irondash_engine_context irondash_engine_context
screen_retriever screen_retriever
sqlite3_flutter_libs
super_native_extensions super_native_extensions
window_manager window_manager
) )