[evolution/wip/cmake] help directory



commit b995f94882e2ee395dd549e1e3eb052b14b925a0
Author: Milan Crha <mcrha redhat com>
Date:   Tue Oct 4 17:45:38 2016 +0200

    help directory

 CMakeLists.txt               |   18 ++-
 calendar/gui/CMakeLists.txt  |    2 +-
 help/CMakeLists.txt          |  330 ++++++++++++++++++++++++++++++++++++++++++
 help/quickref/CMakeLists.txt |    9 +
 4 files changed, 353 insertions(+), 6 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50083be..ecc1050 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -298,6 +298,13 @@ endif(ENABLE_AUTOAR)
 
 add_printable_option(WITH_HELP "Build user documentation" ON)
 
+if(WITH_HELP)
+       find_program(ITSTOOL itstool)
+       if(NOT ITSTOOL)
+               message(FATAL_ERROR "Cannot find itstool, either install it or disable help build by adding 
-DWITH_HELP=OFF argument to cmake command")
+       endif(NOT ITSTOOL)
+endif(WITH_HELP)
+
 # ******************************
 # iconv checking
 # ******************************
@@ -399,7 +406,7 @@ if(ENABLE_YTNEF)
        unset(CMAKE_REQUIRED_LIBRARIES)
 
        if((NOT HAVE_YTNEF_H) AND (NOT HAVE_LIBYTNEF_YTNEF_H))
-               message(FATAL_ERROR "Cannot find ytnef library, either install it or disable use of it by 
using -DENABLE_YTNEF=OFF argument to cmake command")
+               message(FATAL_ERROR "Cannot find ytnef library, either install it or disable use of it by 
adding -DENABLE_YTNEF=OFF argument to cmake command")
        endif((NOT HAVE_YTNEF_H) AND (NOT HAVE_LIBYTNEF_YTNEF_H))
 endif(ENABLE_YTNEF)
 
@@ -673,7 +680,8 @@ add_subdirectory(plugins)
 add_subdirectory(po)
 add_subdirectory(shell)
 add_subdirectory(sounds)
-add_subdirectory(ui)
+add_subdirectory(sounds)
+#add_subdirectory(tests)
 add_subdirectory(views)
 add_subdirectory(web-extensions)
 
@@ -681,9 +689,9 @@ if(ENABLE_GTK_DOC)
        add_subdirectory(doc)
 endif(ENABLE_GTK_DOC)
 
-#if(WITH_HELP)
-#      add_subdirectory(help)
-#endif(WITH_HELP)
+if(WITH_HELP)
+       add_subdirectory(help)
+endif(WITH_HELP)
 
 if(WITH_GLADE_CATALOG)
        add_subdirectory(maint)
diff --git a/calendar/gui/CMakeLists.txt b/calendar/gui/CMakeLists.txt
index b974014..18a0cb3 100644
--- a/calendar/gui/CMakeLists.txt
+++ b/calendar/gui/CMakeLists.txt
@@ -186,7 +186,7 @@ target_compile_definitions(evolution-calendar PRIVATE
        -DEVOLUTION_PRIVDATADIR=\"${privdatadir}\"
 )
 
-target_compile_options(evolution-shell PUBLIC
+target_compile_options(evolution-calendar PUBLIC
        ${EVOLUTION_DATA_SERVER_CFLAGS}
        ${GNOME_PLATFORM_CFLAGS}
        ${LIBSOUP_CFLAGS}
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
new file mode 100644
index 0000000..1b61360
--- /dev/null
+++ b/help/CMakeLists.txt
@@ -0,0 +1,330 @@
+set(HELP_ID ${PROJECT_NAME})
+
+set(HELP_FIGURES_DIR figures)
+
+set(HELP_MEDIA
+       ${HELP_FIGURES_DIR}/color-000000.png
+       ${HELP_FIGURES_DIR}/color-204a87.png
+       ${HELP_FIGURES_DIR}/color-2e3436.png
+       ${HELP_FIGURES_DIR}/color-4e9a06.png
+       ${HELP_FIGURES_DIR}/color-5c3566.png
+       ${HELP_FIGURES_DIR}/color-8f5902.png
+       ${HELP_FIGURES_DIR}/color-a40000.png
+       ${HELP_FIGURES_DIR}/color-c4a000.png
+       ${HELP_FIGURES_DIR}/color-ce5c00.png
+       ${HELP_FIGURES_DIR}/evolutionlogo.png
+       ${HELP_FIGURES_DIR}/html-composer-insert-image.png
+       ${HELP_FIGURES_DIR}/html-composer-insert-link.png
+       ${HELP_FIGURES_DIR}/html-composer-insert-rule.png
+       ${HELP_FIGURES_DIR}/html-composer-insert-table.png
+       ${HELP_FIGURES_DIR}/minus-icon.png
+       ${HELP_FIGURES_DIR}/new-mail-notification.png
+       ${HELP_FIGURES_DIR}/new-mail-switcher.png
+       ${HELP_FIGURES_DIR}/plus-icon.png
+       ${HELP_FIGURES_DIR}/search-icon.png
+       ${HELP_FIGURES_DIR}/window-overview-layers.png
+)
+
+set(HELP_FILES
+       backup-restore.page
+       calendar-alarms-and-reminders.page
+       calendar-caldav.page
+       calendar-classifications.page
+       calendar-free-busy.page
+       calendar-google.page
+       calendar-layout-appointment-display.page
+       calendar-layout-general-formatting.page
+       calendar-layout.page
+       calendar-layout-views.page
+       calendar-local.page
+       calendar-marcus-bains-line.page
+       calendar-meetings-delegating.page
+       calendar-meetings.page
+       calendar-meetings-replying-to-invitation.page
+       calendar-meetings-sending-invitation.page
+       calendar-organizing.page
+       calendar-publishing.page
+       calendar-recurrence.page
+       calendar-searching.page
+       calendar-sharing-information.page
+       calendar-timezones.page
+       calendar-usage-add-appointment.page
+       calendar-usage-delete-appointment.page
+       calendar-usage-edit-appointment.page
+       calendar-usage.page
+       calendar-using-several-calendars.page
+       calendar-weather.page
+       calendar-webdav.page
+       change-switcher-appearance.page
+       contacts-add-automatically.page
+       contacts-autocompletion.page
+       contacts-google.page
+       contacts-ldap.page
+       contacts-libreoffice.page
+       contacts-local.page
+       contacts-organizing.page
+       contacts-searching.page
+       contacts-usage-add-contact.page
+       contacts-usage-delete-contact.page
+       contacts-usage-edit-contact.page
+       contacts-usage.page
+       contacts-using-contact-lists.page
+       contacts-using-several-addressbooks.page
+       credits.page
+       data-storage.page
+       default-browser.page
+       deleting-appointments.page
+       deleting-emails.page
+       deleting-to-free-disk-space.page
+       exchange-connectors-overview.page
+       exchange-placeholder.page
+       exporting-data-calendar.page
+       exporting-data-contacts.page
+       exporting-data-mail.page
+       exporting-data.page
+       google-services.page
+       import-apps-mozilla.page
+       import-apps-outlook.page
+       import-data.page
+       import-single-files.page
+       import-supported-file-formats.page
+       index.page
+       intro-application.page
+       intro-first-run.page
+       intro-main-window.page
+       legal.xml
+       mail-access-gmail-imap-account.page
+       mail-access-gmail-pop-account.page
+       mail-account-manage-imap-plus.page
+       mail-account-manage-local-delivery.page
+       mail-account-manage-maildir-format-directories.page
+       mail-account-management.page
+       mail-account-manage-mh-format-directories.page
+       mail-account-manage-microsoft-exchange-evo-ews.page
+       mail-account-manage-microsoft-exchange-evo-mapi.page
+       mail-account-manage-microsoft-exchange.page
+       mail-account-manage-pop.page
+       mail-account-manage-unix-mbox-spool-directory.page
+       mail-account-manage-unix-mbox-spool-file.page
+       mail-account-manage-usenet-news.page
+       mail-attachments.page
+       mail-attachments-received.page
+       mail-attachments-sending.page
+       mail-calendar-sending-invitations.page
+       mail-cannot-see.page
+       mail-change-columns-in-message-list.page
+       mail-change-time-format.page
+       mail-composer-change-quotation-string.page
+       mail-composer-custom-header-lines.page
+       mail-composer-enable-html-format.page
+       mail-composer-external-editor.page
+       mail-composer-forward.page
+       mail-composer-forward-as-attachment.page
+       mail-composer-from-field-override.page
+       mail-composer-html-image.page
+       mail-composer-html-link.page
+       mail-composer-html.page
+       mail-composer-html-rule.page
+       mail-composer-html-table.page
+       mail-composer-html-text.page
+       mail-composer-mail-signatures-manage.page
+       mail-composer-mail-signatures.page
+       mail-composer-mail-signatures-per-account.page
+       mail-composer-message-templates.page
+       mail-composer-message-templates-reply.page
+       mail-composer-message-templates-save.page
+       mail-composer-message-templates-variables.page
+       mail-composer-plain-text.page
+       mail-composer-priority.page
+       mail-composer-reply.page
+       mail-composer-search.page
+       mail-composer-send-account-overrides.page
+       mail-composer-several-recipients.page
+       mail-composer-spellcheck.page
+       mail-composer-write-new-message.page
+       mail-default-CC-and-BCC.page
+       mail-default-folder-locations.page
+       mail-delete-and-undelete.page
+       mail-displaying-character-encodings.page
+       mail-displaying-collapsible-headers.page
+       mail-displaying-images-in-html.page
+       mail-displaying-message.page
+       mail-displaying-sender-photograph.page
+       mail-display-message-source.page
+       mail-duplicates.page
+       mail-encryption-gpg-create-key.page
+       mail-encryption-gpg-decrypting.page
+       mail-encryption-gpg-getting-keys.page
+       mail-encryption-gpg-set-up.page
+       mail-encryption-gpg-signing-encrypting.page
+       mail-encryption.page
+       mail-encryption-s-mime-manage.page
+       mail-encryption-s-mime-signing-encrypting.page
+       mail-filters-actions.page
+       mail-filters-conditions.page
+       mail-filters-not-working.page
+       mail-filters.page
+       mail-folders.page
+       mail-follow-up-flag.page
+       mail-imap-subscriptions.page
+       mail-labels.page
+       mail-layout-changing.page
+       mail-localized-re-subjects.page
+       mail-moving-emails.page
+       mail-not-sent.page
+       mail-organizing.page
+       mail-reading-keyboard-shortcuts.page
+       mail-read-receipts.page
+       mail-received-notification.page
+       mail-receiving-options-exchange-ews.page
+       mail-receiving-options-exchange-mapi.page
+       mail-receiving-options-imap-plus.page
+       mail-receiving-options-local-delivery.page
+       mail-receiving-options-maildir-format-directories.page
+       mail-receiving-options-mh-format-directories.page
+       mail-receiving-options.page
+       mail-receiving-options-pop.page
+       mail-receiving-options-unix-mbox-spool-directory.page
+       mail-receiving-options-unix-mbox-spool-file.page
+       mail-receiving-options-usenet-news.page
+       mail-recognized-thread-related-headers.page
+       mail-refresh-folders.page
+       mail-save-as-pdf.page
+       mail-search-folders-add.page
+       mail-search-folders-conditions.page
+       mail-search-folders-enable.page
+       mail-search-folders.page
+       mail-search-folders-refresh.page
+       mail-searching-attachment-type.page
+       mail-searching.page
+       mail-send-and-receive-automatically.page
+       mail-send-and-receive-manual.page
+       mail-send-and-receive.page
+       mail-sending-options-smtp.page
+       mail-several-pop-accounts.page
+       mail-sorting-message-list.page
+       mail-spam-marking.page
+       mail-spam.page
+       mail-spam-settings.page
+       mail-two-trash-folders.page
+       mail-usenet-subscriptions.page
+       mail-vertical-view.page
+       mail-word-wrap.page
+       mail-working-offline.page
+       memos-searching.page
+       memos-usage-add-memo.page
+       memos-usage-delete-memo.page
+       memos-usage-edit-memo.page
+       memos-usage.page
+       offline.page
+       organizing.page
+       problems-debug-how-to.page
+       problems-getting-help.page
+       problems-reporting-bugs.page
+       searching-items.page
+       sync-with-other-devices.page
+       tasks-caldav.page
+       tasks-display-settings.page
+       tasks-local.page
+       tasks-organizing.page
+       tasks-searching.page
+       tasks-usage-add-task.page
+       tasks-usage-delete-task.page
+       tasks-usage-edit-task.page
+       tasks-usage.page
+       tasks-using-several-tasklists.page
+       tasks-webdav.page
+       using-categories.page
+       xinclude-filter-vfolder-conditions.xml
+       xinclude-mail-account-identity.xml
+       xinclude-searching.xml
+)
+
+add_custom_target(help-files ALL)
+
+macro(create_help_files_for_lang _lang _helpfilesvar)
+       set(pofile "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_lang}.po")
+       set(mofile "${CMAKE_CURRENT_BINARY_DIR}/${dir}/${_lang}.mo")
+
+       if(NOT EXISTS ${pofile})
+               message(FATAL_ERROR "Passed incorrect language '${_lang}' to create_help_files_for_lang()")
+       endif(NOT EXISTS ${pofile})
+
+       set(installed)
+       set(deps)
+       foreach(_file ${HELP_FILES})
+               list(APPEND installed ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_file})
+               list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/C/${_file})
+               if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+                       list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+               endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+       endforeach(_file)
+       foreach(_file ${HELP_MEDIA})
+               list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/C/${_file})
+               if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+                       list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+               endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
+       endforeach(_file)
+
+       add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/index.page
+               COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${_lang}"
+               COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o "${mofile}" "${pofile}"
+               COMMAND ${CMAKE_COMMAND} -E env d="${CMAKE_CURRENT_SOURCE_DIR}/C"
+                       itstool -m "${mofile}" ${${_helpfilesvar}} --output 
${CMAKE_CURRENT_BINARY_DIR}/${_lang}/
+               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/C
+               COMMENT "Generating '${_lang}' help files"
+       )
+
+       add_custom_target(${_lang}-help-files
+               DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/index.page
+                       ${pofile}
+                       ${deps}
+       )
+
+       add_dependencies(help-files ${_lang}-help-files)
+
+       install(FILES ${installed}
+               DESTINATION ${SHARE_INSTALL_DIR}/help/${_lang}/${HELP_ID}/
+       )
+endmacro(create_help_files_for_lang)
+
+file(GLOB directories RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
+foreach(dir ${directories})
+       if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${dir}.po")
+               list(APPEND helpdeps "${CMAKE_CURRENT_BINARY_DIR}/${dir}/index.page")
+               create_help_files_for_lang(${dir} HELP_FILES)
+
+               foreach(_media ${HELP_MEDIA})
+                       if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
+                               install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}
+                                       DESTINATION 
${SHARE_INSTALL_DIR}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
+                               )
+                       else(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
+                               # Pity, no symlink ability here
+                               install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/C/${_media}
+                                       DESTINATION 
${SHARE_INSTALL_DIR}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
+                               )
+                       endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
+               endforeach(_media)
+       endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${dir}.po")
+endforeach(dir)
+
+set(cinstalled)
+foreach(_file ${HELP_FILES})
+       list(APPEND cinstalled "${CMAKE_CURRENT_SOURCE_DIR}/C/${_file}")
+endforeach(_file)
+
+install(FILES ${cinstalled}
+       DESTINATION ${SHARE_INSTALL_DIR}/help/C/${HELP_ID}/
+)
+
+set(cinstalled)
+foreach(_file ${HELP_MEDIA})
+       list(APPEND cinstalled "${CMAKE_CURRENT_SOURCE_DIR}/C/${_file}")
+endforeach(_file)
+
+install(FILES ${cinstalled}
+       DESTINATION ${SHARE_INSTALL_DIR}/help/C/${HELP_ID}/${HELP_FIGURES_DIR}
+)
+
+add_subdirectory(quickref)
diff --git a/help/quickref/CMakeLists.txt b/help/quickref/CMakeLists.txt
new file mode 100644
index 0000000..7050575
--- /dev/null
+++ b/help/quickref/CMakeLists.txt
@@ -0,0 +1,9 @@
+file(GLOB directories RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
+
+foreach(dir ${directories})
+       if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/quickref.pdf")
+               install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/quickref.pdf
+                       DESTINATION ${evolutionhelpdir}/quickref/${dir}/
+               )
+       endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/quickref.pdf")
+endforeach(dir)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]