finally remove dirty struct copy in linux my_application.cc and nsis path fix for flutter 3.19.3
This commit is contained in:
parent
db1f0ed41e
commit
9f982ae167
|
@ -24,17 +24,6 @@ struct _MyApplication {
|
|||
|
||||
FlMethodChannel* channel;
|
||||
|
||||
// Redefining from flutter/engine::shell/platform/linux/fl_dart_project.cc
|
||||
// struct def required here to enable compiler to allow access to variables
|
||||
struct _FlDartProject {
|
||||
GObject parent_instance;
|
||||
|
||||
gchar* aot_library_path;
|
||||
gchar* assets_path;
|
||||
gchar* icu_data_path;
|
||||
gchar** dart_entrypoint_args;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
@ -99,7 +88,7 @@ static void my_application_activate(GApplication* application) {
|
|||
if( stat("lib/cwtch", &info) == 0) {
|
||||
// use local dir structure
|
||||
fl_dart_project_set_assets_path(project, g_build_filename("data", "flutter_assets", nullptr));
|
||||
project->aot_library_path = g_build_filename("lib", "libapp.so", nullptr);
|
||||
fl_dart_project_set_aot_library_path(project, g_build_filename("lib", "libapp.so", nullptr));
|
||||
fl_dart_project_set_icu_data_path(project, g_build_filename("data", "icudtl.dat", nullptr));
|
||||
gtk_window_set_icon_from_file(window, "./cwtch.png", NULL);
|
||||
} else if( stat("/usr/share/cwtch/data/flutter_assets", &info ) != 0 ) {
|
||||
|
@ -109,7 +98,7 @@ static void my_application_activate(GApplication* application) {
|
|||
// /home/$USER/.local/share/cwtch/data/flutter_assets
|
||||
fl_dart_project_set_assets_path(project, g_build_filename(homedir, ".local", "share", "cwtch", "data", "flutter_assets", nullptr));
|
||||
// /home/$USER/.local/lib/cwtch/
|
||||
project->aot_library_path = g_build_filename(homedir, ".local", "lib", "cwtch", "libapp.so", nullptr);
|
||||
fl_dart_project_set_aot_library_path(project, g_build_filename(homedir, ".local", "lib", "cwtch", "libapp.so", nullptr));
|
||||
// /home/$USER/.local/share/cwtch/data
|
||||
fl_dart_project_set_icu_data_path(project, g_build_filename(homedir, ".local", "share", "cwtch", "data", "icudtl.dat", nullptr));
|
||||
gtk_window_set_icon_from_file(window, g_build_filename(homedir, ".local", "share", "icons", "cwtch.png", nullptr), NULL);
|
||||
|
@ -118,7 +107,7 @@ static void my_application_activate(GApplication* application) {
|
|||
// /usr/share/cwtch/data/flutter_assets
|
||||
fl_dart_project_set_assets_path(project, g_build_filename("/", "usr", "share", "cwtch", "data", "flutter_assets", nullptr));
|
||||
// /usr/lib/cwtch
|
||||
project->aot_library_path = g_build_filename("/", "usr", "lib", "cwtch", "libapp.so", nullptr);
|
||||
fl_dart_project_set_aot_library_path(project, g_build_filename("/", "usr", "lib", "cwtch", "libapp.so", nullptr));
|
||||
// /usr/share/cwtch/data
|
||||
fl_dart_project_set_icu_data_path(project, g_build_filename("/", "usr", "share", "cwtch", "data", "icudtl.dat", nullptr));
|
||||
gtk_window_set_icon_from_file(window, "/usr/share/icons/cwtch.png", NULL);
|
||||
|
|
|
@ -87,7 +87,7 @@ Section
|
|||
# define what to install and place it in the output path
|
||||
# Filler for .sh to populate with contents of deploy/windows
|
||||
#FILESLISTSTART
|
||||
FILE /r "..\..\build\windows\runner\Release\"
|
||||
FILE /r "..\..\build\windows\x64\runner\Release\"
|
||||
#FILESLISTEND
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\Cwtch"
|
||||
|
|
Loading…
Reference in New Issue