imhex: update to 1.28.0.
This commit is contained in:
parent
072b9a1134
commit
fd41a13654
3 changed files with 33 additions and 91 deletions
|
@ -1,74 +0,0 @@
|
||||||
From 09b7794d7155d7c285ec8c0939a309a0221c9b34 Mon Sep 17 00:00:00 2001
|
|
||||||
From: WerWolv <werwolv98@gmail.com>
|
|
||||||
Date: Fri, 17 Feb 2023 17:52:10 +0100
|
|
||||||
Subject: [PATCH] build: Added option to disable stack traces
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 1 +
|
|
||||||
cmake/build_helpers.cmake | 42 ++++++++++++++++++++-------------------
|
|
||||||
2 files changed, 23 insertions(+), 20 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 94655a8fc698..fc5c0e73d3ed 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -9,6 +9,7 @@ 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)
|
|
||||||
option(IMHEX_IGNORE_BAD_COMPILER "Allow compiling with an unsupported compiler" OFF)
|
|
||||||
option(IMHEX_USE_GTK_FILE_PICKER "Use GTK file picker instead of xdg-desktop-portals" OFF)
|
|
||||||
+option(IMHEX_DISABLE_STACKTRACE "Disables support for printing stack traces" OFF)
|
|
||||||
|
|
||||||
# Basic compiler and cmake configurations
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
|
||||||
diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
|
|
||||||
index 13a08ecc7514..ec258a8e3439 100644
|
|
||||||
--- a/cmake/build_helpers.cmake
|
|
||||||
+++ b/cmake/build_helpers.cmake
|
|
||||||
@@ -515,25 +515,27 @@ macro(addBundledLibraries)
|
|
||||||
set(MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDEDIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
- if (WIN32)
|
|
||||||
- message(STATUS "StackWalk enabled!")
|
|
||||||
- set(LIBBACKTRACE_LIBRARIES DbgHelp.lib)
|
|
||||||
- else ()
|
|
||||||
- find_package(Backtrace)
|
|
||||||
- if (${Backtrace_FOUND})
|
|
||||||
- message(STATUS "Backtrace enabled! Header: ${Backtrace_HEADER}")
|
|
||||||
-
|
|
||||||
- if (Backtrace_HEADER STREQUAL "execinfo.h")
|
|
||||||
- set(LIBBACKTRACE_LIBRARIES)
|
|
||||||
- set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
|
||||||
- add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
|
|
||||||
- add_compile_definitions(HEX_HAS_EXECINFO)
|
|
||||||
- elseif (Backtrace_HEADER STREQUAL "backtrace.h")
|
|
||||||
- set(LIBBACKTRACE_LIBRARIES backtrace)
|
|
||||||
- set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
|
||||||
- add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
|
|
||||||
- add_compile_definitions(HEX_HAS_BACKTRACE)
|
|
||||||
- endif ()
|
|
||||||
- endif()
|
|
||||||
+ if (NOT IMHEX_DISABLE_STACKTRACE)
|
|
||||||
+ if (WIN32)
|
|
||||||
+ message(STATUS "StackWalk enabled!")
|
|
||||||
+ set(LIBBACKTRACE_LIBRARIES DbgHelp.lib)
|
|
||||||
+ else ()
|
|
||||||
+ find_package(Backtrace)
|
|
||||||
+ if (${Backtrace_FOUND})
|
|
||||||
+ message(STATUS "Backtrace enabled! Header: ${Backtrace_HEADER}")
|
|
||||||
+
|
|
||||||
+ if (Backtrace_HEADER STREQUAL "execinfo.h")
|
|
||||||
+ set(LIBBACKTRACE_LIBRARIES)
|
|
||||||
+ set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
|
||||||
+ add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
|
|
||||||
+ add_compile_definitions(HEX_HAS_EXECINFO)
|
|
||||||
+ elseif (Backtrace_HEADER STREQUAL "backtrace.h")
|
|
||||||
+ set(LIBBACKTRACE_LIBRARIES backtrace)
|
|
||||||
+ set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
|
||||||
+ add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
|
|
||||||
+ add_compile_definitions(HEX_HAS_BACKTRACE)
|
|
||||||
+ endif ()
|
|
||||||
+ endif()
|
|
||||||
+ endif ()
|
|
||||||
endif ()
|
|
||||||
endmacro()
|
|
|
@ -49,39 +49,55 @@ running the internal update checker is pointless when updates are managed by xbp
|
||||||
static bool enabled = static_cast<int>(setting);
|
static bool enabled = static_cast<int>(setting);
|
||||||
--- a/main/source/init/tasks.cpp
|
--- a/main/source/init/tasks.cpp
|
||||||
+++ b/main/source/init/tasks.cpp
|
+++ b/main/source/init/tasks.cpp
|
||||||
@@ -24,30 +24,6 @@
|
@@ -29,46 +29,6 @@
|
||||||
|
|
||||||
using namespace std::literals::string_literals;
|
using namespace std::literals::string_literals;
|
||||||
|
|
||||||
- static bool checkForUpdates() {
|
- 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);
|
- int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2);
|
||||||
|
-
|
||||||
|
- // Check if we should check for updates
|
||||||
- if (showCheckForUpdates == 1){
|
- if (showCheckForUpdates == 1){
|
||||||
- hex::Net net;
|
- HttpRequest request("GET", GitHubApiURL + "/releases/latest"s);
|
||||||
|
- request.setTimeout(2000);
|
||||||
-
|
-
|
||||||
- auto releases = net.getJson(GitHubApiURL + "/releases/latest"s, 2000).get();
|
- // Query the GitHub API for the latest release version
|
||||||
- if (releases.code != 200)
|
- auto response = request.execute().get();
|
||||||
|
- if (response.getStatusCode() != 200)
|
||||||
- return false;
|
- return false;
|
||||||
-
|
-
|
||||||
- if (!releases.body.contains("tag_name") || !releases.body["tag_name"].is_string())
|
- nlohmann::json releases;
|
||||||
|
- try {
|
||||||
|
- releases = nlohmann::json::parse(response.getData());
|
||||||
|
- } catch (std::exception &e) {
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Check if the response is valid
|
||||||
|
- if (!releases.contains("tag_name") || !releases["tag_name"].is_string())
|
||||||
- return false;
|
- return false;
|
||||||
-
|
-
|
||||||
|
- // Convert the current version string to a format that can be compared to the latest release
|
||||||
- auto versionString = std::string(IMHEX_VERSION);
|
- auto versionString = std::string(IMHEX_VERSION);
|
||||||
- size_t versionLength = std::min(versionString.find_first_of('-'), versionString.length());
|
- size_t versionLength = std::min(versionString.find_first_of('-'), versionString.length());
|
||||||
- auto currVersion = "v" + versionString.substr(0, versionLength);
|
- auto currVersion = "v" + versionString.substr(0, versionLength);
|
||||||
- auto latestVersion = releases.body["tag_name"].get<std::string_view>();
|
|
||||||
-
|
-
|
||||||
|
- // Get the latest release version string
|
||||||
|
- auto latestVersion = releases["tag_name"].get<std::string_view>();
|
||||||
|
-
|
||||||
|
- // Check if the latest release is different from the current version
|
||||||
- if (latestVersion != currVersion)
|
- if (latestVersion != currVersion)
|
||||||
- ImHexApi::System::impl::addInitArgument("update-available", latestVersion.data());
|
- ImHexApi::System::impl::addInitArgument("update-available", latestVersion.data());
|
||||||
-
|
-
|
||||||
- }
|
- }
|
||||||
- return true;
|
- return true;
|
||||||
- }
|
- }
|
||||||
|
-
|
||||||
|
bool setupEnvironment() {
|
||||||
|
hex::log::debug("Using romfs: '{}'", romfs::name());
|
||||||
|
|
||||||
bool createDirectories() {
|
@@ -479,7 +439,6 @@
|
||||||
bool result = true;
|
#endif
|
||||||
@@ -283,7 +283,6 @@
|
|
||||||
{ "Creating directories", createDirectories, false },
|
|
||||||
{ "Loading settings", loadSettings, false },
|
{ "Loading settings", loadSettings, false },
|
||||||
{ "Loading plugins", loadPlugins, false },
|
{ "Loading plugins", loadPlugins, false },
|
||||||
- { "Checking for updates", checkForUpdates, true },
|
- { "Checking for updates", checkForUpdates, true },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'imhex'
|
# Template file for 'imhex'
|
||||||
pkgname=imhex
|
pkgname=imhex
|
||||||
version=1.27.1
|
version=1.28.0
|
||||||
revision=2
|
revision=1
|
||||||
build_wrksrc="ImHex"
|
build_wrksrc="ImHex"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
build_helper=qemu
|
build_helper=qemu
|
||||||
|
@ -10,18 +10,18 @@ configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
|
||||||
-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON
|
-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON
|
||||||
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON"
|
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON"
|
||||||
hostmakedepends="pkg-config clang-tools-extra"
|
hostmakedepends="pkg-config clang-tools-extra"
|
||||||
makedepends="libcurl-devel fmt-devel llvm12 jansson-devel yara-devel json-c++
|
makedepends="libcurl-devel fmt-devel llvm jansson-devel yara-devel json-c++
|
||||||
freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel
|
freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel
|
||||||
clang-tools-extra"
|
clang-tools-extra"
|
||||||
short_desc="Hex editor for reverse engineers and programmers"
|
short_desc="Hex editor for reverse engineers and programmers"
|
||||||
maintainer="classabbyamp <dev@placeviolette.net>"
|
maintainer="classabbyamp <void@placeviolette.net>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="https://imhex.werwolv.net/"
|
homepage="https://imhex.werwolv.net/"
|
||||||
changelog="https://github.com/WerWolv/ImHex/releases"
|
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
|
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"
|
https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz"
|
||||||
checksum="66ce038024dbd5f0d09fd9359915340efd79bc8b51698e62277a8e88236965ca
|
checksum="6ee6f85dfa58e8bfb8008d1b9794cf38fed0bcc975df24bef3674abbda609d98
|
||||||
0be0ab3d3cce35874a48aececc79af4136e32cf4c7eb3f45b1a1863264111229"
|
bccfb8fbaa1dfcef8b38a132fa540be672fcaaadef7e5e97aabddfa620e87f1c"
|
||||||
patch_args="-Np1 -d $build_wrksrc"
|
patch_args="-Np1 -d $build_wrksrc"
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue