aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/CMakeLists.txt50
-rw-r--r--main/data/dino.desktop12
-rw-r--r--main/src/main.vala11
3 files changed, 52 insertions, 21 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 76f5e507..60d91c7b 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -1,19 +1,12 @@
-find_package(Vala REQUIRED)
-find_package(PkgConfig REQUIRED)
-include(${VALA_USE_FILE})
-include(GlibCompileResourcesSupport)
-
-set(MAIN_PACKAGES
- gee-0.8
- glib-2.0
- gtk+-3.0
- gmodule-2.0
- libnotify
- sqlite3
+find_packages(MAIN_PACKAGES REQUIRED
+ Gee
+ GLib>=2.38
+ GModule
+ GObject
+ GTK3>=3.22
+ Libnotify
)
-pkg_check_modules(MAIN REQUIRED ${MAIN_PACKAGES})
-
set(RESOURCE_LIST
icons/dino-double-tick-symbolic.svg
icons/dino-status-away.svg
@@ -107,14 +100,29 @@ PACKAGES
${MAIN_PACKAGES}
GRESOURCES
${MAIN_GRESOURCES_XML}
-OPTIONS
- --target-glib=2.38
- ${GLOBAL_DEBUG_FLAGS}
- --thread
)
-set(CFLAGS ${VALA_CFLAGS} ${MAIN_CFLAGS})
-add_definitions(${CFLAGS})
+add_definitions(${VALA_CFLAGS})
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
add_dependencies(dino dino-vapi dino-gsettings-schema-compiled)
-target_link_libraries(dino libdino ${MAIN_LIBRARIES}) \ No newline at end of file
+target_link_libraries(dino libdino ${MAIN_PACKAGES})
+
+if(WIN32)
+ target_link_libraries(dino -mwindows)
+endif(WIN32)
+
+install(TARGETS dino ${TARGET_INSTALL})
+install(FILES data/dino.desktop DESTINATION ${APPLICATION_INSTALL_DIR})
+install(FILES data/icons/dino.svg DESTINATION ${ICON_INSTALL_DIR}/hicolor/scalable/apps)
+install(FILES data/icons/dino-symbolic.svg DESTINATION ${ICON_INSTALL_DIR}/hicolor/symbolic/apps)
+install(FILES
+ data/icons/dino-status-away.svg
+ data/icons/dino-status-chat.svg
+ data/icons/dino-status-dnd.svg
+ data/icons/dino-status-online.svg
+
+ data/icons/dino-double-tick-symbolic.svg
+ data/icons/dino-tick-symbolic.svg
+DESTINATION
+ ${ICON_INSTALL_DIR}/hicolor/scalable/status
+)
diff --git a/main/data/dino.desktop b/main/data/dino.desktop
new file mode 100644
index 00000000..924cc587
--- /dev/null
+++ b/main/data/dino.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Name=Dino
+GenericName=Jabber/XMPP Client
+Keywords=chat;talk;im;message;xmpp;jabber;
+Exec=dino
+Icon=dino
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=GTK;Network;Chat;InstantMessaging;
+X-GNOME-UsesNotifications=true \ No newline at end of file
diff --git a/main/src/main.vala b/main/src/main.vala
index ba326ad8..96744e12 100644
--- a/main/src/main.vala
+++ b/main/src/main.vala
@@ -15,6 +15,17 @@ void main(string[] args) {
Plugins.Loader loader = new Plugins.Loader(exec_path);
Gtk.init(ref args);
Dino.Ui.Application app = new Dino.Ui.Application();
+
+ app.add_main_option("show-plugin-paths", 0, 0, OptionArg.NONE, "Display plugin search paths and exit", null);
+ app.handle_local_options.connect((options) => {
+ Variant v = options.lookup_value("show-plugin-paths", VariantType.BOOLEAN);
+ if (v != null && v.get_type() == VariantType.BOOLEAN && v.get_boolean()) {
+ loader.print_search_paths();
+ return 0;
+ }
+ return -1;
+ });
+
foreach (string plugin in new string[]{"omemo", "openpgp"}) {
try {
loader.load(plugin, app);