diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile index 97a1b8889cc4..b7a7eaed1b31 100644 --- a/editors/imhex/Makefile +++ b/editors/imhex/Makefile @@ -1,104 +1,105 @@ PORTNAME= imhex -PORTVERSION= 1.26.2 +PORTVERSION= 1.27.1 DISTVERSIONPREFIX= v CATEGORIES= editors MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg DISTFILES= xdg.hpp:xdg DIST_SUBDIR= imhex MAINTAINER= nobutaka@FreeBSD.org COMMENT= Hex editor for reverse engineers and programmers WWW= https://github.com/WerWolv/ImHex LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= i386 powerpc NOT_FOR_ARCHS_REASON= __uint128_t and __int128_t are not supported EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \ btzy-nativefiledialog-extended-${GH_TAG_NATIVEFILEDIALOG}_GH0${EXTRACT_SUFX} \ capstone-engine-capstone-${GH_TAG_CAPSTONE}_GH0${EXTRACT_SUFX} \ CLIUtils-CLI11-${GH_TAG_CLI11}_GH0${EXTRACT_SUFX} \ fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \ josuttis-jthread-${GH_TAG_JTHREAD}_GH0${EXTRACT_SUFX} \ VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \ WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \ WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \ WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX} BUILD_DEPENDS= glm>0:math/glm \ nlohmann-json>0:devel/nlohmann-json \ + ${LOCALBASE}/include/hpx/functional.hpp:devel/hpx \ ${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3 \ - ${LOCALBASE}/include/hpx/functional.hpp:devel/hpx + ${LOCALBASE}/include/tl/expected.hpp:devel/tl-expected LIB_DEPENDS= libcurl.so:ftp/curl \ libglfw.so:graphics/glfw \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libmbedtls.so:security/mbedtls \ libtre.so:textproc/libtre USES= cmake gl gnome pkgconfig python:3.8+ xorg -USE_GL= gl +USE_GL= gl glu USE_GNOME= cairo gdkpixbuf2 gtk30 USE_XORG= x11 xcb xau xdmcp USE_GITHUB= yes GH_ACCOUNT= WerWolv GH_PROJECT= ImHex GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \ capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \ CLIUtils:CLI11:${GH_TAG_CLI11}:cli11 \ fmtlib:fmt:${GH_TAG_FMT}:fmt \ josuttis:jthread:${GH_TAG_JTHREAD}:jthread \ VirusTotal:yara:${GH_TAG_YARA}:yara \ WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \ WerWolv:PatternLanguage:${GH_TAG_PATTERN_LANGUAGE}:pattern_language \ WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs GH_TAG_CAPSTONE= d5141c0 GH_TAG_CLI11= faea921 GH_TAG_FMT= a337011 -GH_TAG_IMHEX_PATTERNS= a4a1430 +GH_TAG_IMHEX_PATTERNS= ea4dda0 GH_TAG_JTHREAD= 0fa8d39 -GH_TAG_LIBROMFS= 59d8cec +GH_TAG_LIBROMFS= 40cd303 GH_TAG_NATIVEFILEDIALOG= 6efc824 -GH_TAG_PATTERN_LANGUAGE= 58f1702 +GH_TAG_PATTERN_LANGUAGE= 0e32a23 GH_TAG_YARA= ba94b4f CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \ -DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \ - -DIMHEX_OFFLINE_BUILD=ON + -DIMHEX_OFFLINE_BUILD=ON -DIMHEX_USE_GTK_FILE_PICKER=ON PORTDOCS= README.md OPTIONS_DEFINE= DOCS NLS NLS_USES= gettext .include OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # Before LLVM13 import to the base system .if (${OSMAJOR} == 12 && ${OSVERSION} < 1203505) \ || (${OSMAJOR} == 14 && ${OSVERSION} < 1400042) IGNORE= will not build due to C++20 API functions unavailable in old libc++ .endif post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/external/xdgpp ${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/external/capstone ${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/fmt ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/libimhex/include ${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs ${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/external/nativefiledialog ${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language ${CP} -R ${WRKSRC_cli11}/* ${WRKSRC}/lib/external/pattern_language/external/cli11 ${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/external/yara/yara ${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src ${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo index 49ab0dc33b8c..82517e4c5c78 100644 --- a/editors/imhex/distinfo +++ b/editors/imhex/distinfo @@ -1,23 +1,23 @@ -TIMESTAMP = 1673255964 +TIMESTAMP = 1676468817 SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec SIZE (imhex/xdg.hpp) = 7674 -SHA256 (imhex/WerWolv-ImHex-v1.26.2_GH0.tar.gz) = bd5b24ec8b5e3cf907eb88f3769b6b8d4aeca5e8cb5b43fe880dd012c92d75ed -SIZE (imhex/WerWolv-ImHex-v1.26.2_GH0.tar.gz) = 11058206 +SHA256 (imhex/WerWolv-ImHex-v1.27.1_GH0.tar.gz) = c0eaba25b6b01242ad23a6872d815372815d40d22a0f727e0b61da5dc59366a4 +SIZE (imhex/WerWolv-ImHex-v1.27.1_GH0.tar.gz) = 11716724 SHA256 (imhex/btzy-nativefiledialog-extended-6efc824_GH0.tar.gz) = 9ada1814eaedcdb8aaae1829443747ab385b6f296e3e756a483c34456e15dcbd SIZE (imhex/btzy-nativefiledialog-extended-6efc824_GH0.tar.gz) = 412533 SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7 SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632 SHA256 (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78 SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718 SHA256 (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = ba190d69d8b7994ef2ceb533c56bc34feec296fef2f87efab4cfb981a04601cf SIZE (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = 837936 SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc859cec9b233541be7501e5cef9eaa367e1280 SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456 SHA256 (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 4c81120bff451a55deaa23b48155d3eb35955ce11a1d76fbfcbbe2c2e33770b9 SIZE (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 1288534 -SHA256 (imhex/WerWolv-ImHex-Patterns-a4a1430_GH0.tar.gz) = 9de0d582a266df555548f941c1c3ba57f576056dad2315a7bf727ee00cc4c6ba -SIZE (imhex/WerWolv-ImHex-Patterns-a4a1430_GH0.tar.gz) = 6853083 -SHA256 (imhex/WerWolv-PatternLanguage-58f1702_GH0.tar.gz) = 80081c0962d4de1c0bd9287db0805451631956978814e071b81f14c74739082a -SIZE (imhex/WerWolv-PatternLanguage-58f1702_GH0.tar.gz) = 426049 -SHA256 (imhex/WerWolv-libromfs-59d8cec_GH0.tar.gz) = 2ece573aefce05d42969097a26ff8e3eb81a5bbdc35650f2b45338c1a0304d0c -SIZE (imhex/WerWolv-libromfs-59d8cec_GH0.tar.gz) = 4286 +SHA256 (imhex/WerWolv-ImHex-Patterns-ea4dda0_GH0.tar.gz) = da07b7b99386fba50db7132fcb67a40ac990d298c92a3a3687870d062e9cb5c3 +SIZE (imhex/WerWolv-ImHex-Patterns-ea4dda0_GH0.tar.gz) = 6896993 +SHA256 (imhex/WerWolv-PatternLanguage-0e32a23_GH0.tar.gz) = 596bc2636eb07c7de71de3fd6582d7c18ecdf1ac5bc6f55d593c07e12ce8653e +SIZE (imhex/WerWolv-PatternLanguage-0e32a23_GH0.tar.gz) = 428847 +SHA256 (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = e785499616e1dfc2644be61706cf1fba49a8d8282c6aecf78efee02c6fbbca13 +SIZE (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = 4301 diff --git a/editors/imhex/files/patch-CMakeLists.txt b/editors/imhex/files/patch-CMakeLists.txt index 210b207d0448..4839db5e37f7 100644 --- a/editors/imhex/files/patch-CMakeLists.txt +++ b/editors/imhex/files/patch-CMakeLists.txt @@ -1,20 +1,11 @@ ---- CMakeLists.txt.orig 2022-11-14 09:07:21 UTC +--- CMakeLists.txt.orig 2023-02-15 08:39:23 UTC +++ CMakeLists.txt -@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.20) - # Options - option(IMHEX_USE_BUNDLED_CA "Use the CA bundle in romfs instead of the system one" OFF) - option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF) --option(IMHEX_STRIP_RELEASE "Strip the release builds" ON) -+option(IMHEX_STRIP_RELEASE "Strip the release builds" OFF) - option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF) - option(IMHEX_IGNORE_BAD_CLONE "Disable the bad clone prevention checks" OFF) - option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF) -@@ -23,8 +23,6 @@ project(imhex VERSION ${IMHEX_VERSION}) +@@ -28,8 +28,6 @@ project(imhex # Make sure project is configured correctly setDefaultBuiltTypeIfUnset() -detectBadClone() -verifyCompiler() # List plugin names here. Project name must match folder name set(PLUGINS diff --git a/editors/imhex/files/patch-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake index 3aed175bcc8d..375109f88029 100644 --- a/editors/imhex/files/patch-cmake_build__helpers.cmake +++ b/editors/imhex/files/patch-cmake_build__helpers.cmake @@ -1,34 +1,26 @@ ---- cmake/build_helpers.cmake.orig 2023-01-05 08:53:49 UTC +--- cmake/build_helpers.cmake.orig 2023-02-15 13:56:27 UTC +++ cmake/build_helpers.cmake @@ -370,13 +370,13 @@ function(downloadImHexPatternsFiles dest) else () # Maybe patterns are cloned to a subdirectory - set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns") + set(imhex_patterns_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src") endif () if (EXISTS ${imhex_patterns_SOURCE_DIR}) set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic) foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL}) - install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest}) + install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/") endforeach () endif () @@ -384,7 +384,6 @@ endfunction() macro(setupCompilerWarnings target) set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror") - set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}") -@@ -434,7 +433,6 @@ macro(addBundledLibraries) - endif() - - if (NOT USE_SYSTEM_NFD) -- set(NFD_PORTAL ON CACHE BOOL "Use Portals for Linux file dialogs" FORCE) - add_subdirectory(${EXTERN_LIBS_FOLDER}/nativefiledialog EXCLUDE_FROM_ALL) - set_target_properties(nfd PROPERTIES POSITION_INDEPENDENT_CODE ON) - set(NFD_LIBRARIES nfd) diff --git a/editors/imhex/files/patch-lib_external_pattern__language_CMakeLists.txt b/editors/imhex/files/patch-lib_external_pattern__language_CMakeLists.txt deleted file mode 100644 index 23723b28f688..000000000000 --- a/editors/imhex/files/patch-lib_external_pattern__language_CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/external/pattern_language/CMakeLists.txt.orig 2023-01-05 15:06:41 UTC -+++ lib/external/pattern_language/CMakeLists.txt -@@ -8,8 +8,6 @@ option(LIBPL_ENABLE_TESTS "Enable testing" OFF) - option(LIBPL_ENABLE_CLI "Enable building the CLI tool" ON) - option(LIBPL_ENABLE_EXAMPLE "Enable building the examples" OFF) - --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-overflow -Wno-array-bounds") -- - if (WIN32) - add_compile_definitions(OS_WINDOWS) - elseif (APPLE) diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp index 51443a6ce271..d33644543603 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp @@ -1,252 +1,256 @@ ---- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-01-09 11:44:49 UTC +--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-02-13 14:23:14 UTC +++ lib/external/pattern_language/lib/include/pl/core/token.hpp -@@ -151,14 +151,14 @@ namespace pl::core { +@@ -155,7 +155,7 @@ namespace pl::core { bool global; std::string comment; - constexpr bool operator==(const DocComment &) const = default; + bool operator==(const DocComment &) const = default; }; - using Literal = std::variant; + struct Literal : public std::variant { +@@ -183,7 +183,7 @@ namespace pl::core { + using ValueTypes = std::variant; -+ // These changes are necessary for Clang -+ inline Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {} - constexpr Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {} -- ++ inline Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {} + [[nodiscard]] constexpr static inline bool isInteger(const ValueType &type) { return isUnsigned(type) || isSigned(type); - } -@@ -227,134 +227,134 @@ namespace pl::core { +@@ -220,136 +220,136 @@ namespace pl::core { namespace tkn { - constexpr inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) { -+ inline pl::core::Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) { ++ inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) { return { type, value, 1, 1 }; } namespace Keyword { - constexpr auto If = createToken(core::Token::Type::Keyword, Token::Keyword::If); - constexpr auto Else = createToken(core::Token::Type::Keyword, Token::Keyword::Else); - constexpr auto While = createToken(core::Token::Type::Keyword, Token::Keyword::While); - constexpr auto For = createToken(core::Token::Type::Keyword, Token::Keyword::For); - constexpr auto Return = createToken(core::Token::Type::Keyword, Token::Keyword::Return); - constexpr auto Break = createToken(core::Token::Type::Keyword, Token::Keyword::Break); - constexpr auto Continue = createToken(core::Token::Type::Keyword, Token::Keyword::Continue); - constexpr auto Struct = createToken(core::Token::Type::Keyword, Token::Keyword::Struct); - constexpr auto Enum = createToken(core::Token::Type::Keyword, Token::Keyword::Enum); - constexpr auto Union = createToken(core::Token::Type::Keyword, Token::Keyword::Union); - constexpr auto Function = createToken(core::Token::Type::Keyword, Token::Keyword::Function); - constexpr auto Bitfield = createToken(core::Token::Type::Keyword, Token::Keyword::Bitfield); - constexpr auto LittleEndian = createToken(core::Token::Type::Keyword, Token::Keyword::LittleEndian); - constexpr auto BigEndian = createToken(core::Token::Type::Keyword, Token::Keyword::BigEndian); - constexpr auto Parent = createToken(core::Token::Type::Keyword, Token::Keyword::Parent); - constexpr auto Namespace = createToken(core::Token::Type::Keyword, Token::Keyword::Namespace); - constexpr auto Using = createToken(core::Token::Type::Keyword, Token::Keyword::Using); - constexpr auto This = createToken(core::Token::Type::Keyword, Token::Keyword::This); - constexpr auto In = createToken(core::Token::Type::Keyword, Token::Keyword::In); - constexpr auto Out = createToken(core::Token::Type::Keyword, Token::Keyword::Out); - constexpr auto Reference = createToken(core::Token::Type::Keyword, Token::Keyword::Reference); +- constexpr auto Null = createToken(core::Token::Type::Keyword, Token::Keyword::Null); +- constexpr auto Const = createToken(core::Token::Type::Keyword, Token::Keyword::Const); + inline auto If = createToken(core::Token::Type::Keyword, Token::Keyword::If); + inline auto Else = createToken(core::Token::Type::Keyword, Token::Keyword::Else); + inline auto While = createToken(core::Token::Type::Keyword, Token::Keyword::While); + inline auto For = createToken(core::Token::Type::Keyword, Token::Keyword::For); + inline auto Return = createToken(core::Token::Type::Keyword, Token::Keyword::Return); + inline auto Break = createToken(core::Token::Type::Keyword, Token::Keyword::Break); + inline auto Continue = createToken(core::Token::Type::Keyword, Token::Keyword::Continue); + inline auto Struct = createToken(core::Token::Type::Keyword, Token::Keyword::Struct); + inline auto Enum = createToken(core::Token::Type::Keyword, Token::Keyword::Enum); + inline auto Union = createToken(core::Token::Type::Keyword, Token::Keyword::Union); + inline auto Function = createToken(core::Token::Type::Keyword, Token::Keyword::Function); + inline auto Bitfield = createToken(core::Token::Type::Keyword, Token::Keyword::Bitfield); + inline auto LittleEndian = createToken(core::Token::Type::Keyword, Token::Keyword::LittleEndian); + inline auto BigEndian = createToken(core::Token::Type::Keyword, Token::Keyword::BigEndian); + inline auto Parent = createToken(core::Token::Type::Keyword, Token::Keyword::Parent); + inline auto Namespace = createToken(core::Token::Type::Keyword, Token::Keyword::Namespace); + inline auto Using = createToken(core::Token::Type::Keyword, Token::Keyword::Using); + inline auto This = createToken(core::Token::Type::Keyword, Token::Keyword::This); + inline auto In = createToken(core::Token::Type::Keyword, Token::Keyword::In); + inline auto Out = createToken(core::Token::Type::Keyword, Token::Keyword::Out); + inline auto Reference = createToken(core::Token::Type::Keyword, Token::Keyword::Reference); ++ inline auto Null = createToken(core::Token::Type::Keyword, Token::Keyword::Null); ++ inline auto Const = createToken(core::Token::Type::Keyword, Token::Keyword::Const); } namespace Literal { - constexpr auto IdentifierValue = [](const std::string &name = { }) -> Token { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); }; - constexpr auto NumericValue = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); }; - constexpr auto StringValue = [](const std::string &value = { }) -> Token { return createToken(core::Token::Type::String, Token::Literal(value)); }; - constexpr auto DocComment = [](bool global, const std::string &value) -> Token { return { core::Token::Type::DocComment, Token::DocComment { global, value }, 1, 1 }; }; + inline auto IdentifierValue = [](const std::string &name = { }) -> Token { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); }; + inline auto NumericValue = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); }; + inline auto StringValue = [](const std::string &value = { }) -> Token { return createToken(core::Token::Type::String, Token::Literal(value)); }; + inline auto DocComment = [](bool global, const std::string &value) -> Token { return { core::Token::Type::DocComment, Token::DocComment { global, value }, 1, 1 }; }; - constexpr auto Identifier = createToken(core::Token::Type::Identifier, { }); - constexpr auto Numeric = createToken(core::Token::Type::Integer, { }); - constexpr auto String = createToken(core::Token::Type::String, { }); + inline auto Identifier = createToken(core::Token::Type::Identifier, { }); + inline auto Numeric = createToken(core::Token::Type::Integer, { }); + inline auto String = createToken(core::Token::Type::String, { }); } namespace Operator { - constexpr auto Plus = createToken(core::Token::Type::Operator, Token::Operator::Plus); - constexpr auto Minus = createToken(core::Token::Type::Operator, Token::Operator::Minus); - constexpr auto Star = createToken(core::Token::Type::Operator, Token::Operator::Star); - constexpr auto Slash = createToken(core::Token::Type::Operator, Token::Operator::Slash); - constexpr auto Percent = createToken(core::Token::Type::Operator, Token::Operator::Percent); - constexpr auto LeftShift = createToken(core::Token::Type::Operator, Token::Operator::LeftShift); - constexpr auto RightShift = createToken(core::Token::Type::Operator, Token::Operator::RightShift); - constexpr auto BitAnd = createToken(core::Token::Type::Operator, Token::Operator::BitAnd); - constexpr auto BitOr = createToken(core::Token::Type::Operator, Token::Operator::BitOr); - constexpr auto BitXor = createToken(core::Token::Type::Operator, Token::Operator::BitXor); - constexpr auto BitNot = createToken(core::Token::Type::Operator, Token::Operator::BitNot); - constexpr auto BoolEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolEqual); - constexpr auto BoolNotEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolNotEqual); - constexpr auto BoolLessThan = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThan); - constexpr auto BoolGreaterThan = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThan); - constexpr auto BoolLessThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThanOrEqual); - constexpr auto BoolGreaterThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThanOrEqual); - constexpr auto BoolAnd = createToken(core::Token::Type::Operator, Token::Operator::BoolAnd); - constexpr auto BoolOr = createToken(core::Token::Type::Operator, Token::Operator::BoolOr); - constexpr auto BoolNot = createToken(core::Token::Type::Operator, Token::Operator::BoolNot); - constexpr auto BoolXor = createToken(core::Token::Type::Operator, Token::Operator::BoolXor); - constexpr auto Dollar = createToken(core::Token::Type::Operator, Token::Operator::Dollar); - constexpr auto Colon = createToken(core::Token::Type::Operator, Token::Operator::Colon); - constexpr auto ScopeResolution = createToken(core::Token::Type::Operator, Token::Operator::ScopeResolution); - constexpr auto TernaryConditional = createToken(core::Token::Type::Operator, Token::Operator::TernaryConditional); - constexpr auto AddressOf = createToken(core::Token::Type::Operator, Token::Operator::AddressOf); - constexpr auto SizeOf = createToken(core::Token::Type::Operator, Token::Operator::SizeOf); - constexpr auto At = createToken(core::Token::Type::Operator, Token::Operator::At); - constexpr auto Assign = createToken(core::Token::Type::Operator, Token::Operator::Assign); + inline auto Plus = createToken(core::Token::Type::Operator, Token::Operator::Plus); + inline auto Minus = createToken(core::Token::Type::Operator, Token::Operator::Minus); + inline auto Star = createToken(core::Token::Type::Operator, Token::Operator::Star); + inline auto Slash = createToken(core::Token::Type::Operator, Token::Operator::Slash); + inline auto Percent = createToken(core::Token::Type::Operator, Token::Operator::Percent); + inline auto LeftShift = createToken(core::Token::Type::Operator, Token::Operator::LeftShift); + inline auto RightShift = createToken(core::Token::Type::Operator, Token::Operator::RightShift); + inline auto BitAnd = createToken(core::Token::Type::Operator, Token::Operator::BitAnd); + inline auto BitOr = createToken(core::Token::Type::Operator, Token::Operator::BitOr); + inline auto BitXor = createToken(core::Token::Type::Operator, Token::Operator::BitXor); + inline auto BitNot = createToken(core::Token::Type::Operator, Token::Operator::BitNot); + inline auto BoolEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolEqual); + inline auto BoolNotEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolNotEqual); + inline auto BoolLessThan = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThan); + inline auto BoolGreaterThan = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThan); + inline auto BoolLessThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThanOrEqual); + inline auto BoolGreaterThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThanOrEqual); + inline auto BoolAnd = createToken(core::Token::Type::Operator, Token::Operator::BoolAnd); + inline auto BoolOr = createToken(core::Token::Type::Operator, Token::Operator::BoolOr); + inline auto BoolNot = createToken(core::Token::Type::Operator, Token::Operator::BoolNot); + inline auto BoolXor = createToken(core::Token::Type::Operator, Token::Operator::BoolXor); + inline auto Dollar = createToken(core::Token::Type::Operator, Token::Operator::Dollar); + inline auto Colon = createToken(core::Token::Type::Operator, Token::Operator::Colon); + inline auto ScopeResolution = createToken(core::Token::Type::Operator, Token::Operator::ScopeResolution); + inline auto TernaryConditional = createToken(core::Token::Type::Operator, Token::Operator::TernaryConditional); + inline auto AddressOf = createToken(core::Token::Type::Operator, Token::Operator::AddressOf); + inline auto SizeOf = createToken(core::Token::Type::Operator, Token::Operator::SizeOf); + inline auto At = createToken(core::Token::Type::Operator, Token::Operator::At); + inline auto Assign = createToken(core::Token::Type::Operator, Token::Operator::Assign); } namespace ValueType { - constexpr auto CustomType = createToken(core::Token::Type::ValueType, Token::ValueType::CustomType); - constexpr auto Padding = createToken(core::Token::Type::ValueType, Token::ValueType::Padding); - constexpr auto Unsigned = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned); - constexpr auto Signed = createToken(core::Token::Type::ValueType, Token::ValueType::Signed); - constexpr auto FloatingPoint = createToken(core::Token::Type::ValueType, Token::ValueType::FloatingPoint); - constexpr auto Auto = createToken(core::Token::Type::ValueType, Token::ValueType::Auto); - constexpr auto Any = createToken(core::Token::Type::ValueType, Token::ValueType::Any); + inline auto CustomType = createToken(core::Token::Type::ValueType, Token::ValueType::CustomType); + inline auto Padding = createToken(core::Token::Type::ValueType, Token::ValueType::Padding); + inline auto Unsigned = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned); + inline auto Signed = createToken(core::Token::Type::ValueType, Token::ValueType::Signed); + inline auto FloatingPoint = createToken(core::Token::Type::ValueType, Token::ValueType::FloatingPoint); + inline auto Auto = createToken(core::Token::Type::ValueType, Token::ValueType::Auto); + inline auto Any = createToken(core::Token::Type::ValueType, Token::ValueType::Any); - constexpr auto Unsigned8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned8Bit); - constexpr auto Unsigned16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned16Bit); - constexpr auto Unsigned24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned24Bit); - constexpr auto Unsigned32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned32Bit); - constexpr auto Unsigned48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned48Bit); - constexpr auto Unsigned64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned64Bit); - constexpr auto Unsigned96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned96Bit); - constexpr auto Unsigned128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned128Bit); + inline auto Unsigned8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned8Bit); + inline auto Unsigned16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned16Bit); + inline auto Unsigned24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned24Bit); + inline auto Unsigned32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned32Bit); + inline auto Unsigned48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned48Bit); + inline auto Unsigned64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned64Bit); + inline auto Unsigned96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned96Bit); + inline auto Unsigned128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned128Bit); - constexpr auto Signed8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed8Bit); - constexpr auto Signed16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed16Bit); - constexpr auto Signed24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed24Bit); - constexpr auto Signed32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed32Bit); - constexpr auto Signed48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed48Bit); - constexpr auto Signed64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed64Bit); - constexpr auto Signed96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed96Bit); - constexpr auto Signed128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed128Bit); + inline auto Signed8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed8Bit); + inline auto Signed16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed16Bit); + inline auto Signed24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed24Bit); + inline auto Signed32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed32Bit); + inline auto Signed48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed48Bit); + inline auto Signed64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed64Bit); + inline auto Signed96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed96Bit); + inline auto Signed128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed128Bit); - constexpr auto Float = createToken(core::Token::Type::ValueType, Token::ValueType::Float); - constexpr auto Double = createToken(core::Token::Type::ValueType, Token::ValueType::Double); + inline auto Float = createToken(core::Token::Type::ValueType, Token::ValueType::Float); + inline auto Double = createToken(core::Token::Type::ValueType, Token::ValueType::Double); - constexpr auto Boolean = createToken(core::Token::Type::ValueType, Token::ValueType::Boolean); + inline auto Boolean = createToken(core::Token::Type::ValueType, Token::ValueType::Boolean); - constexpr auto Character = createToken(core::Token::Type::ValueType, Token::ValueType::Character); - constexpr auto Character16 = createToken(core::Token::Type::ValueType, Token::ValueType::Character16); - constexpr auto String = createToken(core::Token::Type::ValueType, Token::ValueType::String); + inline auto Character = createToken(core::Token::Type::ValueType, Token::ValueType::Character); + inline auto Character16 = createToken(core::Token::Type::ValueType, Token::ValueType::Character16); + inline auto String = createToken(core::Token::Type::ValueType, Token::ValueType::String); } namespace Separator { - constexpr auto Comma = createToken(core::Token::Type::Separator, Token::Separator::Comma); - constexpr auto LeftParenthesis = createToken(core::Token::Type::Separator, Token::Separator::LeftParenthesis); - constexpr auto RightParenthesis = createToken(core::Token::Type::Separator, Token::Separator::RightParenthesis); - constexpr auto LeftBracket = createToken(core::Token::Type::Separator, Token::Separator::LeftBracket); - constexpr auto RightBracket = createToken(core::Token::Type::Separator, Token::Separator::RightBracket); - constexpr auto LeftBrace = createToken(core::Token::Type::Separator, Token::Separator::LeftBrace); - constexpr auto RightBrace = createToken(core::Token::Type::Separator, Token::Separator::RightBrace); - constexpr auto Dot = createToken(core::Token::Type::Separator, Token::Separator::Dot); - constexpr auto Semicolon = createToken(core::Token::Type::Separator, Token::Separator::Semicolon); - constexpr auto EndOfProgram = createToken(core::Token::Type::Separator, Token::Separator::EndOfProgram); + inline auto Comma = createToken(core::Token::Type::Separator, Token::Separator::Comma); + inline auto LeftParenthesis = createToken(core::Token::Type::Separator, Token::Separator::LeftParenthesis); + inline auto RightParenthesis = createToken(core::Token::Type::Separator, Token::Separator::RightParenthesis); + inline auto LeftBracket = createToken(core::Token::Type::Separator, Token::Separator::LeftBracket); + inline auto RightBracket = createToken(core::Token::Type::Separator, Token::Separator::RightBracket); + inline auto LeftBrace = createToken(core::Token::Type::Separator, Token::Separator::LeftBrace); + inline auto RightBrace = createToken(core::Token::Type::Separator, Token::Separator::RightBrace); + inline auto Dot = createToken(core::Token::Type::Separator, Token::Separator::Dot); + inline auto Semicolon = createToken(core::Token::Type::Separator, Token::Separator::Semicolon); + inline auto EndOfProgram = createToken(core::Token::Type::Separator, Token::Separator::EndOfProgram); } diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp new file mode 100644 index 000000000000..04b38f4f4b6c --- /dev/null +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp @@ -0,0 +1,11 @@ +--- lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp.orig 2023-02-15 14:19:06 UTC ++++ lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp +@@ -317,7 +317,7 @@ namespace pl::ptrn { + auto startOffset = child->getOffset(); + + child->setOffset(offset); +- PL_ON_SCOPE_EXIT { child->setOffset(startOffset); }; ++ [[maybe_unused]] auto PL_ANONYMOUS_VARIABLE(SCOPE_EXIT_) = ::pl::scope_guard::ScopeGuardOnExit() + [&, child=child]() { child->setOffset(startOffset); }; + + auto bytes = child->getBytes(); + std::copy(bytes.begin(), bytes.end(), std::back_inserter(result)); diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp index b0388d966bd2..75f1f09572bf 100644 --- a/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp +++ b/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp @@ -1,10 +1,10 @@ ---- lib/libimhex/include/hex/data_processor/node.hpp.orig 2022-10-08 08:03:47 UTC +--- lib/libimhex/include/hex/data_processor/node.hpp.orig 2023-02-12 18:24:04 UTC +++ lib/libimhex/include/hex/data_processor/node.hpp -@@ -46,6 +46,7 @@ namespace hex::dp { +@@ -49,6 +49,7 @@ namespace hex::dp { struct NodeError { Node *node; std::string message; + NodeError(Node *n, std::string m) : node(n), message(m) {}; }; void resetOutputData() { diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_patches.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_patches.hpp new file mode 100644 index 000000000000..fb97498212b6 --- /dev/null +++ b/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_patches.hpp @@ -0,0 +1,26 @@ +--- lib/libimhex/include/hex/helpers/patches.hpp.orig 2023-02-13 15:24:10 UTC ++++ lib/libimhex/include/hex/helpers/patches.hpp +@@ -4,7 +4,7 @@ + + #include + #include +-#include ++#include + + namespace hex { + +@@ -18,9 +18,9 @@ namespace hex { + MissingEOF + }; + +- std::expected, IPSError> generateIPSPatch(const Patches &patches); +- std::expected, IPSError> generateIPS32Patch(const Patches &patches); ++ tl::expected, IPSError> generateIPSPatch(const Patches &patches); ++ tl::expected, IPSError> generateIPS32Patch(const Patches &patches); + +- std::expected loadIPSPatch(const std::vector &ipsPatch); +- std::expected loadIPS32Patch(const std::vector &ipsPatch); ++ tl::expected loadIPSPatch(const std::vector &ipsPatch); ++ tl::expected loadIPS32Patch(const std::vector &ipsPatch); + } +\ No newline at end of file diff --git a/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp b/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp new file mode 100644 index 000000000000..f8ed1e496d67 --- /dev/null +++ b/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp @@ -0,0 +1,11 @@ +--- lib/libimhex/source/api/project_file_manager.cpp.orig 2023-02-13 15:22:20 UTC ++++ lib/libimhex/source/api/project_file_manager.cpp +@@ -43,7 +43,7 @@ namespace hex { + return false; + } + +- auto providers = auto(ImHexApi::Provider::getProviders()); ++ auto providers = ImHexApi::Provider::getProviders(); + for (const auto &provider : providers) { + ImHexApi::Provider::remove(provider); + } diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp index a1901ae5fa7c..ca035f5b4856 100644 --- a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp +++ b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp @@ -1,18 +1,27 @@ ---- lib/libimhex/source/helpers/fs.cpp.orig 2023-01-05 08:53:49 UTC +--- lib/libimhex/source/helpers/fs.cpp.orig 2023-02-12 18:24:04 UTC +++ lib/libimhex/source/helpers/fs.cpp -@@ -14,10 +14,15 @@ +@@ -15,10 +15,15 @@ #include #elif defined(OS_LINUX) #include +# if defined(__FreeBSD__) + #include +# else #include +# endif #endif #include +#include #include namespace hex::fs { +@@ -101,7 +106,7 @@ namespace hex::fs { + result = NFD::PickFolder(outPath, defaultPath.empty() ? nullptr : defaultPath.c_str()); + break; + default: +- std::unreachable(); ++ pl::hlp::unreachable(); + } + + if (result == NFD_OKAY){ diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_patches.cpp b/editors/imhex/files/patch-lib_libimhex_source_helpers_patches.cpp new file mode 100644 index 000000000000..dd41c9f794f8 --- /dev/null +++ b/editors/imhex/files/patch-lib_libimhex_source_helpers_patches.cpp @@ -0,0 +1,126 @@ +--- lib/libimhex/source/helpers/patches.cpp.orig 2023-02-13 15:36:19 UTC ++++ lib/libimhex/source/helpers/patches.cpp +@@ -18,7 +18,7 @@ namespace hex { + std::memcpy((&buffer.back() - sizeof(T)) + 1, &bytes, sizeof(T)); + } + +- std::expected, IPSError> generateIPSPatch(const Patches &patches) { ++ tl::expected, IPSError> generateIPSPatch(const Patches &patches) { + std::vector result; + + pushStringBack(result, "PATCH"); +@@ -43,9 +43,9 @@ namespace hex { + bytes.push_back(values[i]); + + if (bytes.size() > 0xFFFF) +- return std::unexpected(IPSError::PatchTooLarge); ++ return tl::unexpected(IPSError::PatchTooLarge); + if (startAddress > 0xFFFF'FFFF) +- return std::unexpected(IPSError::AddressOutOfRange); ++ return tl::unexpected(IPSError::AddressOutOfRange); + + u32 address = startAddress.value(); + auto addressBytes = reinterpret_cast(&address); +@@ -68,7 +68,7 @@ namespace hex { + return result; + } + +- std::expected, IPSError> generateIPS32Patch(const Patches &patches) { ++ tl::expected, IPSError> generateIPS32Patch(const Patches &patches) { + std::vector result; + + pushStringBack(result, "IPS32"); +@@ -93,9 +93,9 @@ namespace hex { + bytes.push_back(values[i]); + + if (bytes.size() > 0xFFFF) +- return std::unexpected(IPSError::PatchTooLarge); ++ return tl::unexpected(IPSError::PatchTooLarge); + if (startAddress > 0xFFFF'FFFF) +- return std::unexpected(IPSError::AddressOutOfRange); ++ return tl::unexpected(IPSError::AddressOutOfRange); + + u32 address = startAddress.value(); + auto addressBytes = reinterpret_cast(&address); +@@ -119,12 +119,12 @@ namespace hex { + return result; + } + +- std::expected loadIPSPatch(const std::vector &ipsPatch) { ++ tl::expected loadIPSPatch(const std::vector &ipsPatch) { + if (ipsPatch.size() < (5 + 3)) +- return std::unexpected(IPSError::InvalidPatchHeader); ++ return tl::unexpected(IPSError::InvalidPatchHeader); + + if (std::memcmp(ipsPatch.data(), "PATCH", 5) != 0) +- return std::unexpected(IPSError::InvalidPatchHeader); ++ return tl::unexpected(IPSError::InvalidPatchHeader); + + Patches result; + bool foundEOF = false; +@@ -139,7 +139,7 @@ namespace hex { + // Handle normal record + if (size > 0x0000) { + if (ipsOffset + size > ipsPatch.size() - 3) +- return std::unexpected(IPSError::InvalidPatchFormat); ++ return tl::unexpected(IPSError::InvalidPatchFormat); + + for (u16 i = 0; i < size; i++) + result[offset + i] = ipsPatch[ipsOffset + i]; +@@ -148,7 +148,7 @@ namespace hex { + // Handle RLE record + else { + if (ipsOffset + 3 > ipsPatch.size() - 3) +- return std::unexpected(IPSError::InvalidPatchFormat); ++ return tl::unexpected(IPSError::InvalidPatchFormat); + + u16 rleSize = ipsPatch[ipsOffset + 0] | (ipsPatch[ipsOffset + 1] << 8); + +@@ -167,15 +167,15 @@ namespace hex { + if (foundEOF) + return result; + else +- return std::unexpected(IPSError::MissingEOF); ++ return tl::unexpected(IPSError::MissingEOF); + } + +- std::expected loadIPS32Patch(const std::vector &ipsPatch) { ++ tl::expected loadIPS32Patch(const std::vector &ipsPatch) { + if (ipsPatch.size() < (5 + 4)) +- return std::unexpected(IPSError::InvalidPatchHeader); ++ return tl::unexpected(IPSError::InvalidPatchHeader); + + if (std::memcmp(ipsPatch.data(), "IPS32", 5) != 0) +- return std::unexpected(IPSError::InvalidPatchHeader); ++ return tl::unexpected(IPSError::InvalidPatchHeader); + + Patches result; + bool foundEEOF = false; +@@ -190,7 +190,7 @@ namespace hex { + // Handle normal record + if (size > 0x0000) { + if (ipsOffset + size > ipsPatch.size() - 3) +- return std::unexpected(IPSError::InvalidPatchFormat); ++ return tl::unexpected(IPSError::InvalidPatchFormat); + + for (u16 i = 0; i < size; i++) + result[offset + i] = ipsPatch[ipsOffset + i]; +@@ -199,7 +199,7 @@ namespace hex { + // Handle RLE record + else { + if (ipsOffset + 3 > ipsPatch.size() - 3) +- return std::unexpected(IPSError::InvalidPatchFormat); ++ return tl::unexpected(IPSError::InvalidPatchFormat); + + u16 rleSize = ipsPatch[ipsOffset + 0] | (ipsPatch[ipsOffset + 1] << 8); + +@@ -218,7 +218,7 @@ namespace hex { + if (foundEEOF) + return result; + else +- return std::unexpected(IPSError::MissingEOF); ++ return tl::unexpected(IPSError::MissingEOF); + } + + } +\ No newline at end of file diff --git a/editors/imhex/files/patch-main_CMakeLists.txt b/editors/imhex/files/patch-main_CMakeLists.txt new file mode 100644 index 000000000000..47e20ae36dda --- /dev/null +++ b/editors/imhex/files/patch-main_CMakeLists.txt @@ -0,0 +1,11 @@ +--- main/CMakeLists.txt.orig 2023-02-13 15:50:24 UTC ++++ main/CMakeLists.txt +@@ -30,7 +30,7 @@ set_target_properties(main PROPERTIES + + add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}") + +-target_link_libraries(main PRIVATE libromfs-imhex libimhex ${FMT_LIBRARIES}) ++target_link_libraries(main PRIVATE libromfs-imhex libimhex ${FMT_LIBRARIES} execinfo) + if (WIN32) + target_link_libraries(main PRIVATE usp10 wsock32 ws2_32 Dwmapi.lib) + else () diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp index a4402a37bf5a..554360faa23e 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp @@ -1,12 +1,12 @@ ---- plugins/builtin/source/content/settings_entries.cpp.orig 2023-01-05 08:53:49 UTC +--- plugins/builtin/source/content/settings_entries.cpp.orig 2023-02-12 18:24:04 UTC +++ plugins/builtin/source/content/settings_entries.cpp -@@ -22,8 +22,7 @@ namespace { +@@ -24,8 +24,7 @@ namespace { userFolders.clear(); std::vector paths = setting; for (const auto &path : paths) { - // JSON reads char8_t as array, char8_t is not supported as of now - std::u8string_view uString(reinterpret_cast(&path.front()), reinterpret_cast(std::next(&path.back()))); + std::string_view uString(&path.front()); // This is necessary for Clang13 userFolders.emplace_back(uString); } } diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp index c548e2681e57..10e2dd5a7c40 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp @@ -1,126 +1,20 @@ ---- plugins/builtin/source/content/views/view_find.cpp.orig 2023-01-05 08:53:49 UTC +--- plugins/builtin/source/content/views/view_find.cpp.orig 2023-02-12 18:24:04 UTC +++ plugins/builtin/source/content/views/view_find.cpp -@@ -153,34 +153,86 @@ namespace hex::plugin::builtin { - } - - template -- static std::tuple, size_t> parseNumericValue(const std::string &string) { -+ static std::tuple parseNumericValue_u(const std::string &string) { - static_assert(sizeof(StorageType) >= sizeof(Type)); - - StorageType value = 0x00; -- auto result = std::from_chars(string.data(), string.data() + string.size(), value); -- if (result.ec != std::errc() || result.ptr != string.data() + string.size()) -+ try { -+ value = std::stoull(string.data()); -+ } catch (...) { - return { false, { }, 0 }; -+ } -+ if (value < std::numeric_limits::lowest() || value > std::numeric_limits::max()) -+ return { false, { }, 0 }; - -+ return { true, value, sizeof(Type) }; -+ } -+ -+ template -+ static std::tuple parseNumericValue_i(const std::string &string) { -+ static_assert(sizeof(StorageType) >= sizeof(Type)); -+ -+ StorageType value = 0x00; -+ try { -+ value = std::stoll(string.data()); -+ } catch (...) { -+ return { false, { }, 0 }; -+ } -+ - if (value < std::numeric_limits::lowest() || value > std::numeric_limits::max()) - return { false, { }, 0 }; - - return { true, value, sizeof(Type) }; - } - -+ template -+ static std::tuple parseNumericValue_f(const std::string &string) { -+ static_assert(sizeof(StorageType) >= sizeof(Type)); -+ -+ StorageType value = 0x00; -+ try { -+ value = std::stof(string.data()); -+ } catch (...) { -+ return { false, { }, 0 }; -+ } -+ -+ if (value < std::numeric_limits::lowest() || value > std::numeric_limits::max()) -+ return { false, { }, 0 }; -+ -+ return { true, value, sizeof(float) }; -+ } -+ -+ template -+ static std::tuple parseNumericValue_d(const std::string &string) { -+ static_assert(sizeof(StorageType) >= sizeof(Type)); -+ -+ StorageType value = 0x00; -+ try { -+ value = std::stod(string.data()); -+ } catch (...) { -+ return { false, { }, 0 }; -+ } -+ -+ if (value < std::numeric_limits::lowest() || value > std::numeric_limits::max()) -+ return { false, { }, 0 }; -+ -+ return { true, value, sizeof(Type) }; -+ } -+ - std::tuple, size_t> ViewFind::parseNumericValueInput(const std::string &input, SearchSettings::Value::Type type) { - switch (type) { - using enum SearchSettings::Value::Type; - -- case U8: return parseNumericValue(input); -- case U16: return parseNumericValue(input); -- case U32: return parseNumericValue(input); -- case U64: return parseNumericValue(input); -- case I8: return parseNumericValue(input); -- case I16: return parseNumericValue(input); -- case I32: return parseNumericValue(input); -- case I64: return parseNumericValue(input); -- case F32: return parseNumericValue(input); -- case F64: return parseNumericValue(input); -+ case U8: return parseNumericValue_u(input); -+ case U16: return parseNumericValue_u(input); -+ case U32: return parseNumericValue_u(input); -+ case U64: return parseNumericValue_u(input); -+ case I8: return parseNumericValue_i(input); -+ case I16: return parseNumericValue_i(input); -+ case I32: return parseNumericValue_i(input); -+ case I64: return parseNumericValue_i(input); -+ case F32: return parseNumericValue_f(input); -+ case F64: return parseNumericValue_d(input); - default: return { false, { }, 0 }; - } - } -@@ -293,7 +345,7 @@ namespace hex::plugin::builtin { +@@ -305,7 +305,7 @@ namespace hex::plugin::builtin { auto occurrence = reader.begin(); while (true) { - occurrence = std::search(reader.begin(), reader.end(), std::boyer_moore_horspool_searcher(bytes.begin(), bytes.end())); + occurrence = std::search(reader.begin(), reader.end(), bytes.begin(), bytes.end()); if (occurrence == reader.end()) break; -@@ -377,8 +429,12 @@ namespace hex::plugin::builtin { - reader.seek(searchRegion.getStartAddress()); - reader.setEndAddress(searchRegion.getEndAddress()); +@@ -407,7 +407,7 @@ namespace hex::plugin::builtin { + if (validBytes == size) { + bytes &= hex::bitmask(size * 8); -- const auto [validMin, min, sizeMin] = parseNumericValueInput(settings.inputMin, settings.type); -- const auto [validMax, max, sizeMax] = parseNumericValueInput(settings.inputMax, settings.type); -+ const auto validMin = std::get<0>(parseNumericValueInput(settings.inputMin, settings.type)); -+ const auto min = std::get<1>(parseNumericValueInput(settings.inputMin, settings.type)); -+ const auto sizeMin = std::get<2>(parseNumericValueInput(settings.inputMin, settings.type)); -+ const auto validMax = std::get<0>(parseNumericValueInput(settings.inputMax, settings.type)); -+ const auto max = std::get<1>(parseNumericValueInput(settings.inputMax, settings.type)); -+ const auto sizeMax = std::get<2>(parseNumericValueInput(settings.inputMax, settings.type)); +- auto result = std::visit([&](auto tag) { ++ auto result = std::visit([&, min=min, max=max](auto tag) { + using T = std::remove_cvref_t>; - if (!validMin || !validMax || sizeMin != sizeMax) - return { }; + auto minValue = std::get(min); diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp index ba671e2666d4..d2e69f0e0684 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp @@ -1,11 +1,11 @@ ---- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-11-14 09:07:21 UTC +--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-02-12 18:24:04 UTC +++ plugins/builtin/source/content/views/view_hex_editor.cpp -@@ -296,7 +296,7 @@ namespace hex::plugin::builtin { +@@ -297,7 +297,7 @@ namespace hex::plugin::builtin { reader.seek(this->m_searchPosition.value_or(provider->getBaseAddress())); constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) { - return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, needleEnd)); + return std::search(haystackBegin, haystackEnd, needleBegin, needleEnd); }; if (!backwards) { diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp index ba4910f07c4d..fe12e229b4fb 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp @@ -1,29 +1,29 @@ ---- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-01-05 08:53:49 UTC +--- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-02-15 08:39:23 UTC +++ plugins/builtin/source/content/views/view_pattern_editor.cpp -@@ -439,7 +439,7 @@ namespace hex::plugin::builtin { +@@ -437,7 +437,7 @@ namespace hex::plugin::builtin { dataProvider->setReadOnly(true); auto hexEditor = ui::HexEditor(); - hexEditor.setBackgroundHighlightCallback([this, id](u64 address, const u8 *, size_t) -> std::optional { -+ hexEditor.setBackgroundHighlightCallback([this, id = id](u64 address, const u8 *, size_t) -> std::optional { ++ hexEditor.setBackgroundHighlightCallback([this, id=id](u64 address, const u8 *, size_t) -> std::optional { if (this->m_runningEvaluators != 0) return std::nullopt; if (!ImHexApi::Provider::isValid()) -@@ -461,7 +461,7 @@ namespace hex::plugin::builtin { +@@ -459,7 +459,7 @@ namespace hex::plugin::builtin { auto patternProvider = ImHexApi::Provider::get(); - this->m_sectionWindowDrawer[patternProvider] = [id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable { + this->m_sectionWindowDrawer[patternProvider] = [id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable { hexEditor.setProvider(dataProvider.get()); hexEditor.draw(480_scaled); -@@ -934,7 +934,7 @@ namespace hex::plugin::builtin { +@@ -931,7 +931,7 @@ namespace hex::plugin::builtin { if (type->isTemplateType()) continue; - createNestedMenu(hex::splitString(typeName, "::"), [&] { + createNestedMenu(hex::splitString(typeName, "::"), [&, typeName=typeName] { std::string variableName; for (char &c : hex::replaceStrings(typeName, "::", "_")) variableName += static_cast(std::tolower(c)); diff --git a/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp new file mode 100644 index 000000000000..3a6ff03be6c5 --- /dev/null +++ b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp @@ -0,0 +1,12 @@ +--- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-02-12 18:24:04 UTC ++++ plugins/builtin/source/ui/pattern_drawer.cpp +@@ -134,7 +134,8 @@ namespace hex::plugin::builtin::ui { + ImGui::TextUnformatted("hex.builtin.pattern_drawer.visualizer.invalid_parameter_count"_lang); + } else { + try { +- visualizer.callback(pattern, iteratable, reset, { arguments.begin() + 1, arguments.end() }); ++ const std::vector args = { arguments.begin() + 1, arguments.end() }; ++ visualizer.callback(pattern, iteratable, reset, args); + } catch (std::exception &e) { + this->m_lastVisualizerError = e.what(); + } diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist index 99cc78bdcf59..a050fd7085a4 100644 --- a/editors/imhex/pkg-plist +++ b/editors/imhex/pkg-plist @@ -1,144 +1,152 @@ bin/imhex -lib/libimhex.so.1.26.2 +lib/libimhex.so.1.27.1 share/applications/imhex.desktop %%DATADIR%%/constants/_schema.json %%DATADIR%%/constants/crc16.json %%DATADIR%%/constants/crc32.json %%DATADIR%%/constants/http_status.json %%DATADIR%%/constants/linux_errors.json -%%DATADIR%%/includes/hex/core.pat -%%DATADIR%%/includes/hex/dec.pat -%%DATADIR%%/includes/hex/http.pat -%%DATADIR%%/includes/hex/impl/imhex_check.pat -%%DATADIR%%/includes/hex/type/mangled.pat -%%DATADIR%%/includes/std/array.pat -%%DATADIR%%/includes/type/types/010.pat -%%DATADIR%%/includes/type/types/c.pat -%%DATADIR%%/includes/type/types/linux.pat -%%DATADIR%%/includes/type/types/rust.pat -%%DATADIR%%/includes/type/types/win32.pat -%%DATADIR%%/includes/type/base.pat -%%DATADIR%%/includes/type/bcd.pat -%%DATADIR%%/includes/type/color.pat -%%DATADIR%%/includes/type/magic.pat -%%DATADIR%%/patterns/bson.hexpat -%%DATADIR%%/patterns/chm.hexpat -%%DATADIR%%/patterns/coff.hexpat -%%DATADIR%%/patterns/cpio.pat -%%DATADIR%%/patterns/dmg.hexpat -%%DATADIR%%/patterns/fdt.pat -%%DATADIR%%/patterns/flac.hexpat -%%DATADIR%%/patterns/gif.hexpat -%%DATADIR%%/patterns/gzip.hexpat -%%DATADIR%%/patterns/id3.hexpat -%%DATADIR%%/patterns/macho.hexpat -%%DATADIR%%/patterns/minidump.hexpat -%%DATADIR%%/patterns/msgpack.hexpat -%%DATADIR%%/patterns/nbt.hexpat -%%DATADIR%%/patterns/ne.hexpat -%%DATADIR%%/patterns/pbzx.hexpat -%%DATADIR%%/patterns/pcx.hexpat -%%DATADIR%%/patterns/pfs0.hexpat -%%DATADIR%%/patterns/qoi.hexpat -%%DATADIR%%/patterns/sit5.hexpat -%%DATADIR%%/patterns/tar.hexpat -%%DATADIR%%/patterns/usb.hexpat -%%DATADIR%%/patterns/wad.hexpat -%%DATADIR%%/patterns/xci.hexpat -%%DATADIR%%/patterns/xilinx_bit.hexpat -%%DATADIR%%/patterns/zstd.hexpat %%DATADIR%%/encodings/arabic_iso.tbl %%DATADIR%%/encodings/arabic_windows.tbl -%%DATADIR%%/encodings/ascii.tbl %%DATADIR%%/encodings/ascii_ansi.tbl %%DATADIR%%/encodings/ascii_oem.tbl +%%DATADIR%%/encodings/ascii.tbl %%DATADIR%%/encodings/baltic_iso.tbl %%DATADIR%%/encodings/baltic_windows.tbl %%DATADIR%%/encodings/cyrillic_cp866.tbl %%DATADIR%%/encodings/cyrillic_iso.tbl %%DATADIR%%/encodings/cyrillic_koi8_r.tbl %%DATADIR%%/encodings/cyrillic_koi8_u.tbl %%DATADIR%%/encodings/cyrillic_windows.tbl %%DATADIR%%/encodings/eastern_europe_iso.tbl %%DATADIR%%/encodings/eastern_europe_windows.tbl %%DATADIR%%/encodings/ebcdic.tbl %%DATADIR%%/encodings/euc_jp.tbl %%DATADIR%%/encodings/euc_kr.tbl %%DATADIR%%/encodings/greek_iso.tbl %%DATADIR%%/encodings/greek_windows.tbl %%DATADIR%%/encodings/hebrew_iso.tbl %%DATADIR%%/encodings/hebrew_windows.tbl %%DATADIR%%/encodings/iso_646.tbl %%DATADIR%%/encodings/iso_6937.tbl %%DATADIR%%/encodings/jis_x_0201.tbl %%DATADIR%%/encodings/jis_x_0211.tbl %%DATADIR%%/encodings/jis_x_0213.tbl %%DATADIR%%/encodings/macintosh.tbl +%%DATADIR%%/encodings/ms932.tbl %%DATADIR%%/encodings/pokegen1_en.tbl %%DATADIR%%/encodings/shiftjis.tbl %%DATADIR%%/encodings/thai.tbl %%DATADIR%%/encodings/turkish_iso.tbl %%DATADIR%%/encodings/turkish_windows.tbl %%DATADIR%%/encodings/utf8.tbl %%DATADIR%%/encodings/vietnamese.tbl +%%DATADIR%%/includes/hex/core.pat +%%DATADIR%%/includes/hex/dec.pat +%%DATADIR%%/includes/hex/http.pat +%%DATADIR%%/includes/hex/impl/imhex_check.pat +%%DATADIR%%/includes/hex/type/mangled.pat +%%DATADIR%%/includes/std/array.pat %%DATADIR%%/includes/std/bit.pat %%DATADIR%%/includes/std/core.pat %%DATADIR%%/includes/std/ctype.pat %%DATADIR%%/includes/std/file.pat %%DATADIR%%/includes/std/fxpt.pat %%DATADIR%%/includes/std/hash.pat %%DATADIR%%/includes/std/io.pat %%DATADIR%%/includes/std/limits.pat %%DATADIR%%/includes/std/math.pat %%DATADIR%%/includes/std/mem.pat %%DATADIR%%/includes/std/ptr.pat %%DATADIR%%/includes/std/string.pat %%DATADIR%%/includes/std/sys.pat %%DATADIR%%/includes/std/time.pat +%%DATADIR%%/includes/type/base.pat +%%DATADIR%%/includes/type/bcd.pat %%DATADIR%%/includes/type/byte.pat +%%DATADIR%%/includes/type/color.pat %%DATADIR%%/includes/type/float16.pat %%DATADIR%%/includes/type/guid.pat %%DATADIR%%/includes/type/ip.pat %%DATADIR%%/includes/type/leb128.pat %%DATADIR%%/includes/type/mac.pat +%%DATADIR%%/includes/type/magic.pat %%DATADIR%%/includes/type/path.pat %%DATADIR%%/includes/type/size.pat %%DATADIR%%/includes/type/time.pat +%%DATADIR%%/includes/type/types/010.pat +%%DATADIR%%/includes/type/types/c.pat +%%DATADIR%%/includes/type/types/linux.pat +%%DATADIR%%/includes/type/types/rust.pat +%%DATADIR%%/includes/type/types/win32.pat %%DATADIR%%/magic/nintendo_switch_magic %%DATADIR%%/magic/portable_executable_magic %%DATADIR%%/patterns/afe2.hexpat %%DATADIR%%/patterns/ar.hexpat %%DATADIR%%/patterns/arm_cm_vtor.hexpat %%DATADIR%%/patterns/bencode.hexpat %%DATADIR%%/patterns/bmp.hexpat +%%DATADIR%%/patterns/bson.hexpat +%%DATADIR%%/patterns/cchva.hexpat +%%DATADIR%%/patterns/ccpal.hexpat +%%DATADIR%%/patterns/ccvxl.hexpat +%%DATADIR%%/patterns/chm.hexpat +%%DATADIR%%/patterns/coff.hexpat +%%DATADIR%%/patterns/cpio.pat %%DATADIR%%/patterns/dds.hexpat +%%DATADIR%%/patterns/dmg.hexpat %%DATADIR%%/patterns/elf.hexpat +%%DATADIR%%/patterns/fdt.pat +%%DATADIR%%/patterns/flac.hexpat %%DATADIR%%/patterns/fs.hexpat +%%DATADIR%%/patterns/gif.hexpat +%%DATADIR%%/patterns/gzip.hexpat %%DATADIR%%/patterns/ico.hexpat +%%DATADIR%%/patterns/id3.hexpat %%DATADIR%%/patterns/intel_hex.hexpat %%DATADIR%%/patterns/ip.hexpat %%DATADIR%%/patterns/iso.hexpat %%DATADIR%%/patterns/java_class.hexpat +%%DATADIR%%/patterns/jpeg.hexpat %%DATADIR%%/patterns/lnk.hexpat +%%DATADIR%%/patterns/macho.hexpat %%DATADIR%%/patterns/midi.hexpat +%%DATADIR%%/patterns/minidump.hexpat +%%DATADIR%%/patterns/msgpack.hexpat %%DATADIR%%/patterns/nacp.hexpat +%%DATADIR%%/patterns/nbt.hexpat +%%DATADIR%%/patterns/ne.hexpat %%DATADIR%%/patterns/nro.hexpat %%DATADIR%%/patterns/ntag.hexpat %%DATADIR%%/patterns/ogg.hexpat +%%DATADIR%%/patterns/pbzx.hexpat %%DATADIR%%/patterns/pcap.hexpat +%%DATADIR%%/patterns/pcx.hexpat %%DATADIR%%/patterns/pe.hexpat +%%DATADIR%%/patterns/pfs0.hexpat +%%DATADIR%%/patterns/pif.hexpat %%DATADIR%%/patterns/png.hexpat %%DATADIR%%/patterns/prodinfo.hexpat %%DATADIR%%/patterns/protobuf.hexpat +%%DATADIR%%/patterns/qbcl.hexpat +%%DATADIR%%/patterns/qoi.hexpat +%%DATADIR%%/patterns/sit5.hexpat %%DATADIR%%/patterns/spirv.hexpat %%DATADIR%%/patterns/stl.hexpat +%%DATADIR%%/patterns/tar.hexpat %%DATADIR%%/patterns/tga.hexpat %%DATADIR%%/patterns/uf2.hexpat +%%DATADIR%%/patterns/usb.hexpat %%DATADIR%%/patterns/vdf.hexpat %%DATADIR%%/patterns/vhdx.hexpat +%%DATADIR%%/patterns/wad.hexpat %%DATADIR%%/patterns/wav.hexpat +%%DATADIR%%/patterns/xbeh.hexpat +%%DATADIR%%/patterns/xci.hexpat +%%DATADIR%%/patterns/xilinx_bit.hexpat %%DATADIR%%/patterns/zip.hexpat +%%DATADIR%%/patterns/zstd.hexpat %%DATADIR%%/plugins/builtin.hexplug share/metainfo/net.werwolv.imhex.appdata.xml share/metainfo/net.werwolv.imhex.metainfo.xml share/pixmaps/imhex.png