[gnome-games/wip/exalm/3ds: 5/9] flatpak: Install 3DS MIME types




commit e70387264f43267e395511dc6258ac218b1872d1
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun Nov 8 15:22:02 2020 +0100

    flatpak: Install 3DS MIME types

 flatpak/mime/mime.json        | 15 +++++++++++++++
 flatpak/mime/nintendo-3ds.xml | 20 ++++++++++++++++++++
 flatpak/org.gnome.Games.json  |  1 +
 3 files changed, 36 insertions(+)
---
diff --git a/flatpak/mime/mime.json b/flatpak/mime/mime.json
new file mode 100644
index 00000000..44fb1404
--- /dev/null
+++ b/flatpak/mime/mime.json
@@ -0,0 +1,15 @@
+        {
+            "name": "mime-types",
+            "buildsystem": "simple",
+            "build-commands": [
+                "mkdir -p /app/share/mime/packages/",
+                "install -m644 -p -t /app/share/mime/packages *",
+                "update-mime-database /app/share/mime"
+            ],
+            "sources": [
+                {
+                    "type": "file",
+                    "path": "nintendo-3ds.xml"
+                }
+            ]
+        }
diff --git a/flatpak/mime/nintendo-3ds.xml b/flatpak/mime/nintendo-3ds.xml
new file mode 100644
index 00000000..e455e410
--- /dev/null
+++ b/flatpak/mime/nintendo-3ds.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info";>
+  <mime-type type="application/x-nintendo-3ds-rom">
+    <comment>Nintendo 3DS ROM</comment>
+    <generic-icon name="application-x-executable"/>
+    <glob pattern="*.3ds"/>
+    <glob pattern="*.cci"/>
+    <magic>
+      <match offset="256" type="string" value="NCSD"/>
+    </magic>
+  </mime-type>
+  <mime-type type="application/x-nintendo-3ds-executable">
+    <comment>Nintendo 3DS Executable</comment>
+    <generic-icon name="application-x-executable"/>
+    <glob pattern="*.3dsx"/>
+    <magic>
+      <match offset="0" type="string" value="3DSX"/>
+    </magic>
+  </mime-type>
+</mime-info>
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 2b1b5996..4636fad5 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -159,6 +159,7 @@
                 "/include"
             ]
         },
+        "mime/mime.json",
         {
             "name" : "libevdev",
             "buildsystem" : "meson",


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