diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index bfb76fd..4b0bbef 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -v0.0.2-75-g854dc19-2021-06-16-21-56sta \ No newline at end of file +v0.0.2-75-g854dc19-2021-06-16-21-56 diff --git a/linux/cwtch.home.desktop b/linux/cwtch.home.desktop new file mode 100755 index 0000000..82f760c --- /dev/null +++ b/linux/cwtch.home.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Cwtch +Comment=Metadata Resistant Chat +Exec=env LD_LIBRARY_PATH=~/.local/lib/cwtch/ ~/.local/bin/cwtch +Icon=cwtch +Terminal=false +Categories=Network;InstantMessaging; +Keywords=Internet;IM;Instant Messaging;Messaging;Chat; diff --git a/linux/cwtch.local-dir.desktop b/linux/cwtch.local-dir.desktop new file mode 100755 index 0000000..8928ee0 --- /dev/null +++ b/linux/cwtch.local-dir.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Cwtch +Comment=Metadata Resistant Chat +Exec=env LD_LIBRARY_PATH=./lib/ ./cwtch +Icon=cwtch +Terminal=false +Categories=Network;InstantMessaging; +Keywords=Internet;IM;Instant Messaging;Messaging;Chat diff --git a/linux/cwtch.sys.desktop b/linux/cwtch.sys.desktop new file mode 100755 index 0000000..32c566a --- /dev/null +++ b/linux/cwtch.sys.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Cwtch +Comment=Metadata Resistant Chat +Exec=env LD_LIBRARY_PATH=/usr/lib/cwtch /usr/bin/cwtch +Icon=cwtch +Terminal=false +Categories=Network;InstantMessaging; +Keywords=Internet;IM;Instant Messaging;Messaging;Chat diff --git a/linux/install-home.sh b/linux/install-home.sh new file mode 100755 index 0000000..632befd --- /dev/null +++ b/linux/install-home.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +mkdir -p ~/.local/bin +cp cwtch ~/.local/bin/ + +mkdir -p ~/.local/share/icons +cp cwtch.png ~/.local/share/icons + +mkdir -p ~/.local/share/cwtch +cp -r data ~/.local/share/cwtch + +mkdir -p ~/.local/lib/cwtch +cp -r lib/* ~/.local/lib/cwtch + +mkdir -p ~/.local/share/applications +sed "s|~|$HOME|g" cwtch.home.desktop > $HOME/.local/share/applications/cwtch.desktop + diff --git a/linux/install-sys.sh b/linux/install-sys.sh new file mode 100755 index 0000000..9847506 --- /dev/null +++ b/linux/install-sys.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +cp cwtch /usr/bin/ + +cp cwtch.png /usr/share/icons + +mkdir -p /usr/share/cwtch +cp -r data /usr/share/cwtch + +mkdir -p /usr/lib/cwtch +cp -r lib/* /usr/lib/cwtch + +cp cwtch.sys.desktop /usr/share/applications/cwtch.desktop diff --git a/linux/my_application.cc b/linux/my_application.cc index 742330f..792826d 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -69,7 +69,6 @@ static void my_application_activate(GApplication* application) { gtk_window_set_title(window, "cwtch"); } - gtk_window_set_icon_from_file(window, "./cwtch.png", NULL); gtk_window_set_default_size(window, 1280, 720); gtk_widget_show(GTK_WIDGET(window)); @@ -83,20 +82,23 @@ static void my_application_activate(GApplication* application) { const char *homedir = pw->pw_dir; // /home/$USER/.local/share/cwtch/data/flutter_assets project->assets_path = g_build_filename(homedir, ".local", "share", "cwtch", "data", "flutter_assets", nullptr); - // /home/$USER/bin/cwtch/lib - project->aot_library_path = g_build_filename(homedir, "bin", "cwtch", "lib", nullptr); + // /home/$USER/.local/lib/cwtch/ + project->aot_library_path = g_build_filename(homedir, ".local", "lib", "cwtch", "libapp.so", nullptr); // /home/$USER/.local/share/cwtch/data - project->icu_data_path = g_build_filename(homedir, ".local", "share", "cwtch", "data", nullptr); + project->icu_data_path = 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); } else { // /usr/share/cwtch/data/flutter_assets - project->assets_path = g_build_filename("usr", "share", "cwtch", "data", "flutter_assets", nullptr); + project->assets_path = g_build_filename("/", "usr", "share", "cwtch", "data", "flutter_assets", nullptr); // /usr/lib/cwtch - project->aot_library_path = g_build_filename("usr", "lib", "cwtch", nullptr); + project->aot_library_path = g_build_filename("/", "usr", "lib", "cwtch", "libapp.so", nullptr); // /usr/share/cwtch/data - project->icu_data_path = g_build_filename("usr", "share", "cwtch", "data", nullptr); + project->icu_data_path = g_build_filename("/", "usr", "share", "cwtch", "data", "icudtl.dat", nullptr); + gtk_window_set_icon_from_file(window, "/usr/share/icons/cwtch.png", NULL); } + } else { + gtk_window_set_icon_from_file(window, "./cwtch.png", NULL); } - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); FlView* view = fl_view_new(project);