mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Default magic database not being bundled correctly
This commit is contained in:
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include(ImHexPlugin)
|
||||
|
||||
find_file(DEFAULT_MAGIC_FILE_PATH magic.mgc HINTS ${MAGIC_INCLUDE_DIRS}/../share/misc)
|
||||
find_file(DEFAULT_MAGIC_FILE_PATH magic.mgc HINTS ${LIBMAGIC_INCLUDE_DIR}/../share/misc)
|
||||
if (DEFAULT_MAGIC_FILE_PATH)
|
||||
add_romfs_resource(${DEFAULT_MAGIC_FILE_PATH} always_auto_extract/magic/magic.mgc)
|
||||
endif ()
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <wolv/io/file.hpp>
|
||||
#include <romfs/romfs.hpp>
|
||||
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
void extractBundledFiles() {
|
||||
@@ -17,6 +19,7 @@ namespace hex::plugin::builtin {
|
||||
for (const auto &romfsPath : romfs::list(extractFolder)) {
|
||||
for (const auto &imhexPath : fs::getDataPaths()) {
|
||||
const auto path = imhexPath / std::fs::relative(romfsPath, extractFolder);
|
||||
log::info("Extracting {} to {}", romfsPath.string(), path.string());
|
||||
if (!alwaysExtract && wolv::io::fs::exists(path))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user