diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 81d5d4eac..0136c120e 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -225,6 +225,7 @@ macro(createPackage) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/licenses/imhex) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/imhex.mime.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/mime/packages RENAME imhex.xml) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png) downloadImHexPatternsFiles("./share/imhex") diff --git a/dist/Arch/PKGBUILD b/dist/Arch/PKGBUILD index 59bc3a7ec..8acc2a483 100644 --- a/dist/Arch/PKGBUILD +++ b/dist/Arch/PKGBUILD @@ -26,5 +26,5 @@ package() { install -d "$pkgdir/usr/share/imhex" cp -r "$srcdir/usr/share/imhex/"{constants,encodings,includes,magic,patterns} "$pkgdir/usr/share/imhex" - cp -r "$srcdir/usr/share/"{applications,licenses,pixmaps} "$pkgdir/usr/share" + cp -r "$srcdir/usr/share/"{applications,licenses,pixmaps,mime} "$pkgdir/usr/share" } diff --git a/dist/imhex.desktop b/dist/imhex.desktop index 5e02c8ace..d02f96f11 100644 --- a/dist/imhex.desktop +++ b/dist/imhex.desktop @@ -9,3 +9,4 @@ StartupNotify=true Categories=Development;IDE; StartupWMClass=imhex Keywords=static-analysis;reverse-engineering;disassembler;disassembly;hacking;forensics;hex-editor;cybersecurity;security;binary-analysis; +MimeType=application/vnd.imhex.proj; diff --git a/dist/imhex.mime.xml b/dist/imhex.mime.xml new file mode 100644 index 000000000..cddc55494 --- /dev/null +++ b/dist/imhex.mime.xml @@ -0,0 +1,8 @@ + + + + + ImHex Project + + + diff --git a/dist/rpm/imhex.spec b/dist/rpm/imhex.spec index 17ce0ad97..56c67ee75 100644 --- a/dist/rpm/imhex.spec +++ b/dist/rpm/imhex.spec @@ -125,6 +125,7 @@ cp -a lib/third_party/xdgpp/LICENSE %{buildroot %{_bindir}/imhex-updater %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop +%{_datadir}/mime/packages/%{name}.xml %{_libdir}/libimhex.so* %{_libdir}/%{name}/ %{_metainfodir}/net.werwolv.%{name}.metainfo.xml \ No newline at end of file