From bd45fdf1e16e7d4ff49e1472ee30f269867f531e Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 17 Dec 2019 23:52:05 +0100 Subject: [PATCH] Add version and adjust some cmake --- CMakeLists.txt | 125 +++++++++++++++++++++++------------ cmake/ComputeVersion.cmake | 104 +++++++++++++++++++++++++++++ cmake/FindGDK3.cmake | 7 +- cmake/UseVala.cmake | 7 ++ configure | 22 +++--- libdino/src/application.vala | 8 ++- main/CMakeLists.txt | 2 +- main/data/menu_app.ui | 4 ++ main/src/ui/application.vala | 16 +++++ plugins/CMakeLists.txt | 16 ++--- xmpp-vala/CMakeLists.txt | 4 +- 11 files changed, 250 insertions(+), 65 deletions(-) create mode 100644 cmake/ComputeVersion.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e007ad3..9a074e0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,33 +1,73 @@ cmake_minimum_required(VERSION 3.0) -project(Dino LANGUAGES C) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +include(ComputeVersion) +if (NOT VERSION_FOUND) + project(Dino LANGUAGES C) +elseif (VERSION_IS_RELEASE) + project(Dino VERSION ${VERSION_FULL} LANGUAGES C) +else () + project(Dino LANGUAGES C) + set(PROJECT_VERSION ${VERSION_FULL}) +endif () # Prepare Plugins -set(PLUGINS omemo;openpgp;http-files) -if(DISABLED_PLUGINS) - list(REMOVE_ITEM PLUGINS ${DISABLED_PLUGINS}) -endif(DISABLED_PLUGINS) -if(ENABLED_PLUGINS) - list(APPEND PLUGINS ${ENABLED_PLUGINS}) -endif(ENABLED_PLUGINS) +set(DEFAULT_PLUGINS omemo;openpgp;http-files) +foreach (plugin ${DEFAULT_PLUGINS}) + if ("$CACHE{DINO_PLUGIN_ENABLED_${plugin}}" STREQUAL "") + if (NOT DEFINED DINO_PLUGIN_ENABLED_${plugin}}) + set(DINO_PLUGIN_ENABLED_${plugin} "yes" CACHE BOOL "Enable plugin ${plugin}") + else () + set(DINO_PLUGIN_ENABLED_${plugin} "${DINO_PLUGIN_ENABLED_${plugin}}" CACHE BOOL "Enable plugin ${plugin}" FORCE) + endif () + if (DINO_PLUGIN_ENABLED_${plugin}) + message(STATUS "Enabled plugin: ${plugin}") + else () + message(STATUS "Disabled plugin: ${plugin}") + endif () + endif () +endforeach (plugin) + +if (DISABLED_PLUGINS) + foreach(plugin ${DISABLED_PLUGINS}) + set(DINO_PLUGIN_ENABLED_${plugin} "no" CACHE BOOL "Enable plugin ${plugin}" FORCE) + message(STATUS "Disabled plugin: ${plugin}") + endforeach(plugin) +endif (DISABLED_PLUGINS) + +if (ENABLED_PLUGINS) + foreach(plugin ${ENABLED_PLUGINS}) + set(DINO_PLUGIN_ENABLED_${plugin} "yes" CACHE BOOL "Enable plugin ${plugin}" FORCE) + message(STATUS "Enabled plugin: ${plugin}") + endforeach(plugin) +endif (ENABLED_PLUGINS) list(REMOVE_DUPLICATES PLUGINS) -foreach(plugin ${PLUGINS}) - message(STATUS "Building plugin: ${plugin}") - set(PLUGIN_ENABLED_${plugin} "yes") -endforeach(plugin) +set(PLUGINS "") +get_cmake_property(all_variables VARIABLES) +foreach (variable_name ${all_variables}) + if (variable_name MATCHES "^DINO_PLUGIN_ENABLED_(.+)$" AND ${variable_name}) + list(APPEND PLUGINS ${CMAKE_MATCH_1}) + endif() +endforeach () +list(SORT PLUGINS) +list(JOIN PLUGINS ", " PLUGINS_TEXT) + +message(STATUS "Configuring Dino ${PROJECT_VERSION} with plugins: ${PLUGINS_TEXT}") # Prepare instal paths macro(set_path what val desc) - if(NOT ${what}) + if (NOT ${what}) unset(${what} CACHE) set(${what} ${val}) + endif () + if (NOT "${${what}}" STREQUAL "${_${what}_SET}") + message(STATUS "${desc}: ${${what}}") + set(_${what}_SET ${${what}} CACHE INTERNAL ${desc}) endif() - message(STATUS "${desc}: ${${what}}") endmacro(set_path) string(REGEX REPLACE "^liblib" "lib" LIBDIR_NAME "lib${LIB_SUFFIX}") -message(STATUS "Installation directory for architecture-independent files: ${CMAKE_INSTALL_PREFIX}") +set_path(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Installation directory for architecture-independent files") set_path(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Installation directory for architecture-dependent files") set_path(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Installation directory for read-only architecture-independent data") @@ -52,22 +92,22 @@ include(CheckCSourceCompiles) macro(AddCFlagIfSupported flag) string(REGEX REPLACE "[^a-z^A-Z^_^0-9]+" "_" flag_name ${flag}) check_c_compiler_flag(${flag} COMPILER_SUPPORTS${flag_name}) - if(${COMPILER_SUPPORTS${flag_name}}) + if (${COMPILER_SUPPORTS${flag_name}}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") - endif() + endif () endmacro() macro(AddValaCFlagIfSupported flag) string(REGEX REPLACE "[^a-z^A-Z^_^0-9]+" "_" flag_name ${flag}) check_c_compiler_flag(${flag} COMPILER_SUPPORTS${flag_name}) - if(${COMPILER_SUPPORTS${flag_name}}) + if (${COMPILER_SUPPORTS${flag_name}}) set(VALA_CFLAGS "${VALA_CFLAGS} ${flag}") - endif() + endif () endmacro() -if("Ninja" STREQUAL ${CMAKE_GENERATOR}) - AddCFlagIfSupported(-fdiagnostics-color COMPILER_SUPPORTS_fdiagnistics-color) -endif() +if ("Ninja" STREQUAL ${CMAKE_GENERATOR}) + AddCFlagIfSupported(-fdiagnostics-color COMPILER_SUPPORTS_fdiagnistics-color) +endif () AddCFlagIfSupported(-Wall) AddCFlagIfSupported(-Werror=format-security) @@ -82,36 +122,37 @@ AddValaCFlagIfSupported(-Wno-unused-function) AddValaCFlagIfSupported(-Wno-unused-label) try_compile(__WITHOUT_FILE_OFFSET_BITS_64 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/LargeFileOffsets.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}) -if(NOT __WITHOUT_FILE_OFFSET_BITS_64) +if (NOT __WITHOUT_FILE_OFFSET_BITS_64) try_compile(__WITH_FILE_OFFSET_BITS_64 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/LargeFileOffsets.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64) - if(__WITH_FILE_OFFSET_BITS_64) + if (__WITH_FILE_OFFSET_BITS_64) AddCFlagIfSupported(-D_FILE_OFFSET_BITS=64) AddValaCFlagIfSupported(-D_FILE_OFFSET_BITS=64) message(STATUS "Enabled large file support using _FILE_OFFSET_BITS=64") - else(__WITH_FILE_OFFSET_BITS_64) + else (__WITH_FILE_OFFSET_BITS_64) message(STATUS "Large file support not available") - endif(__WITH_FILE_OFFSET_BITS_64) + endif (__WITH_FILE_OFFSET_BITS_64) unset(__WITH_FILE_OFFSET_BITS_64) -endif(NOT __WITHOUT_FILE_OFFSET_BITS_64) +endif (NOT __WITHOUT_FILE_OFFSET_BITS_64) unset(__WITHOUT_FILE_OFFSET_BITS_64) -if($ENV{USE_CCACHE}) +if ($ENV{USE_CCACHE}) # Configure CCache if available - find_program(CCACHE_FOUND ccache) - if(CCACHE_FOUND) + find_program(CCACHE_BIN ccache) + mark_as_advanced(CCACHE_BIN) + if (CCACHE_BIN) message(STATUS "Using ccache") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) - else(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_BIN}) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_BIN}) + else (CCACHE_BIN) message(STATUS "USE_CCACHE was set but ccache was not found") - endif(CCACHE_FOUND) -endif($ENV{USE_CCACHE}) + endif (CCACHE_BIN) +endif ($ENV{USE_CCACHE}) -if(NOT NO_DEBUG) +if (NOT NO_DEBUG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} -g") -endif(NOT NO_DEBUG) +endif (NOT NO_DEBUG) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) @@ -119,15 +160,15 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(GTK3_GLOBAL_VERSION 3.22) set(GLib_GLOBAL_VERSION 2.38) -if(NOT VALA_EXECUTABLE) +if (NOT VALA_EXECUTABLE) unset(VALA_EXECUTABLE CACHE) -endif() +endif () find_package(Vala 0.34 REQUIRED) -if(VALA_VERSION VERSION_GREATER "0.34.90" AND VALA_VERSION VERSION_LESS "0.36.1" OR # Due to a bug on 0.36.0 (and pre-releases), we need to disable FAST_VAPI - VALA_VERSION VERSION_EQUAL "0.44.10" OR VALA_VERSION VERSION_EQUAL "0.46.4" OR VALA_VERSION VERSION_EQUAL "0.47.1") # See Dino issue #646 +if (VALA_VERSION VERSION_GREATER "0.34.90" AND VALA_VERSION VERSION_LESS "0.36.1" OR # Due to a bug on 0.36.0 (and pre-releases), we need to disable FAST_VAPI + VALA_VERSION VERSION_EQUAL "0.44.10" OR VALA_VERSION VERSION_EQUAL "0.46.4" OR VALA_VERSION VERSION_EQUAL "0.47.1") # See Dino issue #646 set(DISABLE_FAST_VAPI yes) -endif() +endif () include(${VALA_USE_FILE}) include(MultiFind) diff --git a/cmake/ComputeVersion.cmake b/cmake/ComputeVersion.cmake new file mode 100644 index 00000000..3a962671 --- /dev/null +++ b/cmake/ComputeVersion.cmake @@ -0,0 +1,104 @@ +include(CMakeParseArguments) + +function(_compute_version_from_file) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/VERSION) + if (NOT EXISTS ${CMAKE_SOURCE_DIR}/VERSION) + set(VERSION_FOUND 0 PARENT_SCOPE) + return() + endif () + file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION VERSION_FILE) + string(REPLACE " " ";" VERSION_FILE "${VERSION_FILE}") + cmake_parse_arguments(VERSION_FILE "" "RELEASE;PRERELEASE" "" ${VERSION_FILE}) + if (DEFINED VERSION_FILE_RELEASE) + string(STRIP "${VERSION_FILE_RELEASE}" VERSION_FILE_RELEASE) + set(VERSION_IS_RELEASE 1 PARENT_SCOPE) + set(VERSION_FULL "${VERSION_FILE_RELEASE}" PARENT_SCOPE) + set(VERSION_FOUND 1 PARENT_SCOPE) + elseif (DEFINED VERSION_FILE_PRERELEASE) + string(STRIP "${VERSION_FILE_PRERELEASE}" VERSION_FILE_PRERELEASE) + set(VERSION_IS_RELEASE 0 PARENT_SCOPE) + set(VERSION_FULL "${VERSION_FILE_PRERELEASE}" PARENT_SCOPE) + set(VERSION_FOUND 1 PARENT_SCOPE) + else () + set(VERSION_FOUND 0 PARENT_SCOPE) + endif () +endfunction(_compute_version_from_file) + +function(_compute_version_from_git) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/.git) + if (NOT GIT_EXECUTABLE) + find_package(Git QUIET) + if (NOT GIT_FOUND) + return() + endif () + endif (NOT GIT_EXECUTABLE) + + # Git tag + execute_process( + COMMAND "${GIT_EXECUTABLE}" describe --tags --abbrev=0 + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_tag + ERROR_VARIABLE git_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if (NOT git_result EQUAL 0) + return() + endif (NOT git_result EQUAL 0) + + if (git_tag MATCHES "^v?([0-9]+[.]?[0-9]*[.]?[0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$") + set(VERSION_LAST_RELEASE "${CMAKE_MATCH_1}") + else () + return() + endif () + + # Git describe + execute_process( + COMMAND "${GIT_EXECUTABLE}" describe --tags + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_describe + ERROR_VARIABLE git_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if (NOT git_result EQUAL 0) + return() + endif (NOT git_result EQUAL 0) + + if ("${git_tag}" STREQUAL "${git_describe}") + set(VERSION_IS_RELEASE 1) + else () + set(VERSION_IS_RELEASE 0) + if (git_describe MATCHES "g([0-9a-f]+)$") + set(VERSION_COMMIT_HASH "${CMAKE_MATCH_1}") + endif () + execute_process( + COMMAND "${GIT_EXECUTABLE}" show --format=%cd --date=format:%Y%m%d -s + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_time + ERROR_VARIABLE git_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if (NOT git_result EQUAL 0) + return() + endif (NOT git_result EQUAL 0) + set(VERSION_COMMIT_DATE "${git_time}") + endif () + if (NOT VERSION_IS_RELEASE) + set(VERSION_SUFFIX ".git${VERSION_COMMIT_DATE}.${VERSION_COMMIT_HASH}") + else (NOT VERSION_IS_RELEASE) + set(VERSION_SUFFIX "") + endif (NOT VERSION_IS_RELEASE) + set(VERSION_IS_RELEASE ${VERSION_IS_RELEASE} PARENT_SCOPE) + set(VERSION_FULL "${VERSION_LAST_RELEASE}${VERSION_SUFFIX}" PARENT_SCOPE) + set(VERSION_FOUND 1 PARENT_SCOPE) +endfunction(_compute_version_from_git) + +_compute_version_from_file() +if (NOT VERSION_FOUND) + _compute_version_from_git() +endif (NOT VERSION_FOUND) \ No newline at end of file diff --git a/cmake/FindGDK3.cmake b/cmake/FindGDK3.cmake index f90868e1..fcbfa13c 100644 --- a/cmake/FindGDK3.cmake +++ b/cmake/FindGDK3.cmake @@ -25,9 +25,12 @@ if(GDK3_FOUND AND NOT GDK3_VERSION) endif() endif() -if(GDK3_FOUND) +if (GDK3_FOUND) find_file(GDK3_WITH_X11 "gdk/gdkx.h" HINTS ${GDK3_INCLUDE_DIRS}) -endif() + if (GDK3_WITH_X11) + set(GDK3_WITH_X11 yes CACHE INTERNAL "Does GDK3 support X11") + endif (GDK3_WITH_X11) +endif () include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GDK3 diff --git a/cmake/UseVala.cmake b/cmake/UseVala.cmake index 822ac005..b08b8a19 100644 --- a/cmake/UseVala.cmake +++ b/cmake/UseVala.cmake @@ -193,6 +193,9 @@ function(vala_precompile output) endif(ARGS_GENERATE_HEADER) string(REPLACE " " ";" VALAC_FLAGS ${CMAKE_VALA_FLAGS}) + if (VALA_VERSION VERSION_GREATER "0.38") + set(VALAC_COLORS "--color=always") + endif () if(ARGS_FAST_VAPI) foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS}) @@ -211,6 +214,7 @@ function(vala_precompile output) COMMAND ${VALA_EXECUTABLE} ARGS + ${VALAC_COLORS} --fast-vapi ${fast_vapi_file} ${vala_define_opts} ${ARGS_OPTIONS} @@ -246,6 +250,7 @@ function(vala_precompile output) COMMAND ${VALA_EXECUTABLE} ARGS + ${VALAC_COLORS} "-C" "-d" ${dir} ${vala_pkg_opts} @@ -271,6 +276,7 @@ function(vala_precompile output) COMMAND ${VALA_EXECUTABLE} ARGS + ${VALAC_COLORS} -C -q --disable-warnings ${header_arguments} ${vapi_arguments} @@ -306,6 +312,7 @@ function(vala_precompile output) COMMAND ${VALA_EXECUTABLE} ARGS + ${VALAC_COLORS} -C ${header_arguments} ${vapi_arguments} diff --git a/configure b/configure index da82fd64..c60488ab 100755 --- a/configure +++ b/configure @@ -191,9 +191,16 @@ if ! [ -x "$ninja_bin" ]; then ninja_bin="$(which ninja 2>/dev/null)" fi if [ -x "$ninja_bin" ]; then - ninja_version=$($ninja_bin --version 2>/dev/null) + ninja_version=`$ninja_bin --version 2>/dev/null` if [ $? -eq 0 ]; then - echo "-- Found Ninja: $ninja_bin (found version \"$ninja_version\")" + if [ -d build ]; then + last_ninja_version=`cat build/.ninja_version 2>/dev/null` + else + last_ninja_version=0 + fi + if [ "$ninja_version" != "$last_ninja_version" ]; then + echo "-- Found Ninja: $ninja_bin (found version \"$ninja_version\")" + fi cmake_type="Ninja" exec_bin="$ninja_bin" exec_command="$exec_bin" @@ -219,14 +226,12 @@ if ! [ -x "$exec_bin" ]; then fi -if [ -f ./build ] -then +if [ -f ./build ]; then echo "-!- ./build file exists. ./configure can't continue" exit 2 fi -if [ -d build ] -then +if [ -d build ]; then last_type=`cat build/.cmake_type` if [ "$cmake_type" != "$last_type" ] then @@ -241,6 +246,7 @@ mkdir -p build cd build echo "$cmake_type" > .cmake_type +echo "$ninja_version" > .ninja_version cmake -G "$cmake_type" \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DENABLED_PLUGINS="$ENABLED_PLUGINS" \ @@ -256,10 +262,10 @@ cmake -G "$cmake_type" \ -DBIN_INSTALL_DIR="$BINDIR" \ -DINCLUDE_INSTALL_DIR="$INCLUDEDIR" \ -DLIB_INSTALL_DIR="$LIBDIR" \ + -Wno-dev \ .. || exit 9 -if [ "$cmake_type" = "Ninja" ] -then +if [ "$cmake_type" = "Ninja" ]; then cat << EOF > Makefile default: @sh -c "$exec_command" diff --git a/libdino/src/application.vala b/libdino/src/application.vala index 9c53d88a..86283823 100644 --- a/libdino/src/application.vala +++ b/libdino/src/application.vala @@ -1,6 +1,9 @@ using Dino.Entities; -public interface Dino.Application : GLib.Application { +namespace Dino { +extern const string VERSION; + +public interface Application : GLib.Application { public abstract Database db { get; set; } public abstract Dino.Entities.Settings settings { get; set; } @@ -76,7 +79,7 @@ public interface Dino.Application : GLib.Application { jid = jid.substring(1); } string query = "message"; - Gee.Map options = new Gee.HashMap(); + Gee.Map options = new Gee.HashMap(); if (m.length == 2) { string[] cmds = m[1].split(";"); query = cmds[0]; @@ -127,3 +130,4 @@ public interface Dino.Application : GLib.Application { } } +} \ No newline at end of file diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 2e9e6632..893137ee 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -169,7 +169,7 @@ OPTIONS ${MAIN_EXTRA_OPTIONS} ) -add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\") +add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\") add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c) add_dependencies(dino ${GETTEXT_PACKAGE}-translations) target_include_directories(dino PRIVATE src) diff --git a/main/data/menu_app.ui b/main/data/menu_app.ui index 20bd66b6..55eb9551 100644 --- a/main/data/menu_app.ui +++ b/main/data/menu_app.ui @@ -16,6 +16,10 @@ app.open_shortcuts Keyboard Shortcuts + + app.about + About Dino + diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 0f932d18..42f4d6d5 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -80,6 +80,10 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { settings_action.activate.connect(show_settings_window); add_action(settings_action); + SimpleAction about_action = new SimpleAction("about", null); + about_action.activate.connect(show_about_window); + add_action(about_action); + SimpleAction quit_action = new SimpleAction("quit", null); quit_action.activate.connect(quit); add_action(quit_action); @@ -169,6 +173,18 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { dialog.present(); } + private void show_about_window() { + show_about_dialog(get_active_window(), + logo_icon_name: "im.dino.Dino", + program_name: "Dino", + version: Dino.VERSION.strip().length == 0 ? null : Dino.VERSION, + comments: "Dino. Communicating happiness.", + website: "https://dino.im/", + website_label: "dino.im", + copyright: "Copyright © 2016-2019 - Dino Team", + license_type: License.GPL_3_0); + } + private void show_join_muc_dialog(Account? account, Jid jid) { Dialog dialog = new Dialog.with_buttons(_("Join Channel"), window, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, _("Join"), ResponseType.OK, _("Cancel"), ResponseType.CANCEL); dialog.modal = true; diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 2d79cf14..6cccec3b 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,18 +1,18 @@ -if(PLUGIN_ENABLED_http-files) +if(DINO_PLUGIN_ENABLED_http-files) add_subdirectory(http-files) -endif(PLUGIN_ENABLED_http-files) +endif(DINO_PLUGIN_ENABLED_http-files) -if(PLUGIN_ENABLED_openpgp) +if(DINO_PLUGIN_ENABLED_openpgp) add_subdirectory(gpgme-vala) add_subdirectory(openpgp) -endif(PLUGIN_ENABLED_openpgp) +endif(DINO_PLUGIN_ENABLED_openpgp) -if(PLUGIN_ENABLED_omemo) +if(DINO_PLUGIN_ENABLED_omemo) add_subdirectory(crypto-vala) add_subdirectory(omemo) add_subdirectory(signal-protocol) -endif(PLUGIN_ENABLED_omemo) +endif(DINO_PLUGIN_ENABLED_omemo) -if(PLUGIN_ENABLED_notification-sound) +if(DINO_PLUGIN_ENABLED_notification-sound) add_subdirectory(notification-sound) -endif(PLUGIN_ENABLED_notification-sound) +endif(DINO_PLUGIN_ENABLED_notification-sound) diff --git a/xmpp-vala/CMakeLists.txt b/xmpp-vala/CMakeLists.txt index 57347282..e4f94dff 100644 --- a/xmpp-vala/CMakeLists.txt +++ b/xmpp-vala/CMakeLists.txt @@ -18,8 +18,6 @@ endif() vala_precompile(ENGINE_VALA_C SOURCES - "src/glib_fixes.vapi" - "src/core/namespace_state.vala" "src/core/stanza_attribute.vala" "src/core/stanza_node.vala" @@ -101,6 +99,8 @@ GENERATE_VAPI xmpp-vala GENERATE_HEADER xmpp-vala +CUSTOM_VAPIS + "${CMAKE_CURRENT_SOURCE_DIR}/src/glib_fixes.vapi" DEFINITIONS ${ENGINE_DEFINITIONS} )