Placeholders: install mimetype on linux
authorOlivier Goffart <ogoffart@woboq.com>
Mon, 15 Jan 2018 18:43:33 +0000 (19:43 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:57:48 +0000 (10:57 +0100)
mirall.desktop.in
src/gui/CMakeLists.txt
src/gui/owncloud.xml [new file with mode: 0644]

index 890796380f6b52093adf241e4e92bcfedb35f104..bde42a49fd240f8e531073963f97485c7fe4e027 100644 (file)
@@ -8,6 +8,7 @@ GenericName=Folder Sync
 Icon=@APPLICATION_ICON_NAME@
 Keywords=@APPLICATION_NAME@;syncing;file;sharing;
 X-GNOME-Autostart-Delay=3
+MimeType=application/x-owncloud
 # Translations
 
 
index b6a66692487faf591ce28284b1b763e5435cb8a1..215945c2e593bdd67142c0c25c501957bb973d0a 100644 (file)
@@ -430,5 +430,15 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32)
     configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
                    ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop)
     install(FILES  ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${DATADIR}/applications )
+
+    #FIXME! branding
+    install(FILES owncloud.xml DESTINATION ${DATADIR}/mime/packages )
+
+    find_package(ECM 1.2.0 CONFIG)
+    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+    find_package(SharedMimeInfo)
+    if(SharedMimeInfo_FOUND)
+        update_xdg_mimetypes( ${DATADIR}/mime/packages )
+    endif(SharedMimeInfo_FOUND)
 endif()
 
diff --git a/src/gui/owncloud.xml b/src/gui/owncloud.xml
new file mode 100644 (file)
index 0000000..7198b76
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/x-owncloud">
+    <comment>ownCloud placeholder style</comment>
+    <glob pattern="*.owncloud"/>
+  </mime-type>
+</mime-info>