From e5445f2b4382d67c528388e69676dfcd11b1f5fd Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Tue, 19 Apr 2016 11:52:29 +0200 Subject: [PATCH] Add support for opening UBZ files on Linux --- release_scripts/linux/debian_package_files/postinst | 4 ++++ release_scripts/linux/package.sh | 1 + resources/linux/openboard-ubz.xml | 8 ++++++++ 3 files changed, 13 insertions(+) create mode 100644 resources/linux/openboard-ubz.xml diff --git a/release_scripts/linux/debian_package_files/postinst b/release_scripts/linux/debian_package_files/postinst index f3152d3b..c1e93d0e 100644 --- a/release_scripts/linux/debian_package_files/postinst +++ b/release_scripts/linux/debian_package_files/postinst @@ -15,5 +15,9 @@ # --------------------------------------------------------------------- xdg-desktop-menu install --novendor /usr/share/applications/openboard.desktop +xdg-mime install /opt/openboard/etc/openboard-ubz.xml +xdg-mime default /usr/share/applications/openboard.desktop application/ubz + ln -s /opt/openboard/run.sh /usr/bin/openboard + exit 0 diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index 5960ab58..dfb57d8e 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -297,6 +297,7 @@ echo "Icon=/$APPLICATION_PATH/$APPLICATION_CODE/${APPLICATION_NAME}.png" >> $APP echo "StartupNotify=true" >> $APPLICATION_SHORTCUT echo "Terminal=false" >> $APPLICATION_SHORTCUT echo "Type=Application" >> $APPLICATION_SHORTCUT +echo "MimeType=application/ubz" echo "Categories=Education;" >> $APPLICATION_SHORTCUT cp "resources/images/${APPLICATION_NAME}.png" "$PACKAGE_DIRECTORY/${APPLICATION_NAME}.png" diff --git a/resources/linux/openboard-ubz.xml b/resources/linux/openboard-ubz.xml new file mode 100644 index 00000000..cda36e1d --- /dev/null +++ b/resources/linux/openboard-ubz.xml @@ -0,0 +1,8 @@ + + + + OpenBoard document file + Document OpenBoard + + +