parent
168a7ac618
commit
97bb98a8c6
|
@ -0,0 +1 @@
|
|||
imhex
|
|
@ -0,0 +1,13 @@
|
|||
https://github.com/WerWolv/libromfs/commit/beec45afc942209cc34d30f99eac42b2bb04aa79
|
||||
|
||||
--- a/ImHex/lib/external/libromfs/lib/CMakeLists.txt
|
||||
+++ b/ImHex/lib/external/libromfs/lib/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# Make sure libromfs gets rebuilt when any of the resources are changed
|
||||
add_custom_command(OUTPUT ${ROMFS}
|
||||
- COMMAND $<TARGET_FILE:generator-${LIBROMFS_PROJECT_NAME}>
|
||||
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:generator-${LIBROMFS_PROJECT_NAME}>
|
||||
DEPENDS ../generator ${ROMFS_FILES}
|
||||
)
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From a966cab1551e0e15e4261c55349b27f84d29cecc Mon Sep 17 00:00:00 2001
|
||||
From: WerWolv <werwolv98@gmail.com>
|
||||
Date: Mon, 19 Dec 2022 07:15:18 +0100
|
||||
Subject: [PATCH] build: Use correct fcntl.h include on Linux
|
||||
|
||||
---
|
||||
plugins/builtin/include/content/providers/file_provider.hpp | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ImHex/plugins/builtin/include/content/providers/file_provider.hpp b/ImHex/plugins/builtin/include/content/providers/file_provider.hpp
|
||||
index 61da65cc8db2..ce8ee7084e0c 100644
|
||||
--- a/ImHex/plugins/builtin/include/content/providers/file_provider.hpp
|
||||
+++ b/ImHex/plugins/builtin/include/content/providers/file_provider.hpp
|
||||
@@ -9,10 +9,14 @@
|
||||
#if defined(OS_WINDOWS)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
+#elif defined(OS_MACOS)
|
||||
+ #include <sys/mman.h>
|
||||
+ #include <unistd.h>
|
||||
+ #include <sys/fcntl.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
- #include <sys/fcntl.h>
|
||||
+ #include <fcntl.h>
|
||||
#endif
|
||||
|
||||
namespace hex::plugin::builtin {
|
|
@ -0,0 +1,90 @@
|
|||
running the internal update checker is pointless when updates are managed by xbps
|
||||
|
||||
--- a/ImHex/plugins/builtin/source/content/welcome_screen.cpp
|
||||
+++ b/ImHex/plugins/builtin/source/content/welcome_screen.cpp
|
||||
@@ -517,20 +517,6 @@
|
||||
loadDefaultLayout();
|
||||
});
|
||||
|
||||
- EventManager::subscribe<EventWindowInitialized>([] {
|
||||
- // documentation of the value above the setting definition
|
||||
- int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2);
|
||||
- if (showCheckForUpdates == 2) {
|
||||
- ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 0);
|
||||
- View::showYesNoQuestionPopup("hex.builtin.welcome.check_for_updates_text"_lang,
|
||||
- [] { // yes
|
||||
- ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 1);
|
||||
- ImGui::CloseCurrentPopup();
|
||||
- }, [] { // no
|
||||
- ImGui::CloseCurrentPopup();
|
||||
- });
|
||||
- }
|
||||
- });
|
||||
|
||||
ContentRegistry::Interface::addMenuItem("hex.builtin.menu.file", 1075, [&] {
|
||||
if (ImGui::BeginMenu("hex.builtin.menu.file.open_recent"_lang, !s_recentProvidersUpdating && !s_recentProviders.empty())) {
|
||||
--- a/ImHex/plugins/builtin/source/content/settings_entries.cpp
|
||||
+++ b/ImHex/plugins/builtin/source/content/settings_entries.cpp
|
||||
@@ -35,21 +35,6 @@
|
||||
|
||||
/* General */
|
||||
|
||||
- /* Values of this setting :
|
||||
- 0 - do not check for updates on startup
|
||||
- 1 - check for updates on startup
|
||||
- 2 - default value - ask the user if he wants to check for updates. This value should only be encountered on the first startup.
|
||||
- */
|
||||
- ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2, [](auto name, nlohmann::json &setting) {
|
||||
- static bool enabled = static_cast<int>(setting) == 1;
|
||||
-
|
||||
- if (ImGui::Checkbox(name.data(), &enabled)) {
|
||||
- setting = static_cast<int>(enabled);
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
- return false;
|
||||
- });
|
||||
|
||||
ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.show_tips", 1, [](auto name, nlohmann::json &setting) {
|
||||
static bool enabled = static_cast<int>(setting);
|
||||
--- a/ImHex/main/source/init/tasks.cpp
|
||||
+++ b/ImHex/main/source/init/tasks.cpp
|
||||
@@ -24,30 +24,6 @@
|
||||
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
- static bool checkForUpdates() {
|
||||
- // documentation of the value above the setting definition
|
||||
- int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2);
|
||||
- if (showCheckForUpdates == 1){
|
||||
- hex::Net net;
|
||||
-
|
||||
- auto releases = net.getJson(GitHubApiURL + "/releases/latest"s, 2000).get();
|
||||
- if (releases.code != 200)
|
||||
- return false;
|
||||
-
|
||||
- if (!releases.body.contains("tag_name") || !releases.body["tag_name"].is_string())
|
||||
- return false;
|
||||
-
|
||||
- auto versionString = std::string(IMHEX_VERSION);
|
||||
- size_t versionLength = std::min(versionString.find_first_of('-'), versionString.length());
|
||||
- auto currVersion = "v" + versionString.substr(0, versionLength);
|
||||
- auto latestVersion = releases.body["tag_name"].get<std::string_view>();
|
||||
-
|
||||
- if (latestVersion != currVersion)
|
||||
- ImHexApi::System::impl::addInitArgument("update-available", latestVersion.data());
|
||||
-
|
||||
- }
|
||||
- return true;
|
||||
- }
|
||||
|
||||
bool createDirectories() {
|
||||
bool result = true;
|
||||
@@ -283,7 +283,6 @@
|
||||
{ "Creating directories", createDirectories, false },
|
||||
{ "Loading settings", loadSettings, false },
|
||||
{ "Loading plugins", loadPlugins, false },
|
||||
- { "Checking for updates", checkForUpdates, true },
|
||||
{ "Loading fonts", loadFonts, true },
|
||||
};
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
# Template file for 'imhex'
|
||||
pkgname=imhex
|
||||
version=1.25.0
|
||||
revision=1
|
||||
build_wrksrc="ImHex"
|
||||
build_style=cmake
|
||||
build_helper=qemu
|
||||
# XXX: when capstone v5 is out, -DUSE_SYSTEM_CAPSTONE=ON
|
||||
configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
|
||||
-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON
|
||||
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON"
|
||||
hostmakedepends="pkg-config clang-tools-extra"
|
||||
makedepends="libcurl-devel fmt-devel llvm12 jansson-devel yara-devel json-c++
|
||||
freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel
|
||||
clang-tools-extra"
|
||||
short_desc="Hex editor for reverse engineers and programmers"
|
||||
maintainer="classabbyamp <dev@placeviolette.net>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="https://imhex.werwolv.net/"
|
||||
changelog="https://github.com/WerWolv/ImHex/releases"
|
||||
distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz
|
||||
https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz"
|
||||
checksum="59817990bb1ab2377143480d4a26171ea631bcecdbc6682b2f79bed2a30e7eed
|
||||
aff9b14a67bea48a06365b1d702af3b6c9cee9161912dd4daadd3f34ae8ee204"
|
||||
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
||||
broken="uses i128"
|
||||
fi
|
||||
|
||||
do_check() {
|
||||
cd build
|
||||
ninja ${makejobs} unit_tests
|
||||
# StoreAPI, TipsAPI, ContentAPI tests are flaky
|
||||
ctest ${makejobs} -E '^.*API$'
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vmkdir usr/share/imhex
|
||||
for d in constants encodings includes magic patterns yara; do
|
||||
vcopy ../ImHex-Patterns-ImHex-v${version}/$d usr/share/imhex
|
||||
done
|
||||
}
|
||||
|
||||
imhex-patterns_package() {
|
||||
short_desc+=" - patterns and magic files"
|
||||
depends="imhex"
|
||||
pkg_install() {
|
||||
vmove usr/share/imhex
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue