1
0
mirror of synced 2024-11-14 11:07:43 +01:00
Commit Graph

277 Commits

Author SHA1 Message Date
WerWolv
9e1c2d5a2c build: Fix copy-paste bug 2024-07-10 20:50:20 +02:00
WerWolv
03d344c0a2 build: Streamline definition on plugin features 2024-07-08 18:12:46 +02:00
WerWolv
1f5e4ceb0c feat: Added basic support for lz4 decompression to the pattern language 2024-07-07 10:26:24 +02:00
WerWolv
4020ac9843 impr: Added nicer console warning when .NET runtime isn't installed 2024-07-02 23:15:54 +02:00
WerWolv
11498bd09b build: Properly look for boost and libimhex library in sdk again 2024-06-30 21:55:29 +02:00
WerWolv
b94a4288bf fix: Standard magic file not getting bundled into executable correctly 2024-06-29 19:43:24 +02:00
WerWolv
2aef5e4eef build: Lock install path in rpath behind an option 2024-06-28 22:21:10 +02:00
WerWolv
91f6aae9ef impr: Make Win32 API properly use unicode support 2024-06-28 11:12:17 +02:00
WerWolv
5a10613dd2 build: Add lib folder to all plugin's RPATH 2024-06-25 23:17:15 +02:00
WerWolv
d7c5c84110 build: Don't link plugins with plugin test library except in the test CI 2024-06-25 21:54:48 +02:00
WerWolv
80cb126200 build: Cleanup configure step logging 2024-06-18 22:09:38 +02:00
WerWolv
18e2b0eaa2 fix: Regex crashes with too long input strings 2024-06-07 23:12:18 +02:00
WerWolv
de8465a8f4 feat: Added limited support for the process memory provider to macOS 2024-06-07 19:17:14 +02:00
WerWolv
c217b1b100 build: Replace -WIP version suffix with .WIP 2024-06-05 20:59:48 +02:00
iTrooz
92b1234ddb
build: Reduce debug info produced (#1720) 2024-05-27 16:33:15 +02:00
iTrooz
0b0bf90e0b
build: Compress debug info (#1719)
This PR compress the debug info in the ELF files built.

This has no impact on the packages (e.g. .deb files) because they themselves have compression, but once installed in the filesystem, they this compression will be beneficial

The compression is opportunistic, happens automatically when possible

For some reason, the web version doesn't work with this (most compiler tests after this seem to fail ?) so it is disabled there

More information: https://github.com/WerWolv/ImHex/issues/1714#issuecomment-2131373826
2024-05-26 20:48:14 +02:00
iTrooz
e5b83d0ddf
chore: add comment about IMHEX_COMMON_FLAGS 2024-05-23 14:44:01 +02:00
David Mentler
bdaf1e4151
build: Xcode accomodating CMake setup (#1688)
### Problem description
This PR implements some rudimentary Xcode support for building and
editing ImHex.

### Implementation description

#### Problem 1: Xcode is a multi-configuration buildsystem
The project is already rather CMake generator independent, thus it did
not need to change much to support Xcode's multi-configuration paradigm:

By default, CMake generates a `.xcodeproj` in which targets build their
artifacts into the specified `<>_OUTPUT_DIRECTORY`, postfixed by the
currently active configuration. To better fit the existing paradigm, I
instead opted ot introduce `IMHEX_MAIN_OUTPUT_DIRECTORY`. This variable
is equal to the previously used `RUNTIME_OUTPUT_DIRECTORY` when using
other generators, and is changed to include a configuration specific
_prefix_ when used with Xcode.

The result is different output directories when using Xcode, and no
changes when using any other generator.

#### Problem 2: ImHex does not support AppleClang
To allow building the codebase with Xcode, I have introduced
`IMHEX_IDE_HELPERS_OVERRIDE_XCODE_COMPILER`. Specifying this option to
`ON` will force CMake to honor the user specified compiler settings,
even when using the Xcode generator.

In practice this can be used together with the new "xcode" CMakePreset
to build the project with mainline clang using `xcodebuild`, or Xcode
itself by generating a buildsystem like so:
```
cmake --preset xcode -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/llvm@17
```

This solution is of course not without flaws. The inner workings are a
particularly ugly hack, and mainline clang does not implement the
necessary extensions to allow Xcode to index the code. Regardless this
option is useful to enable future work in terms of bundling/signing
macOS applications in the "intended" way using Xcode without additional
source modifications.

#### Problem 3: Vanilla CMake + Xcode = Bad developer UX 
By default, the CMake generated `.xcodeproj` is a mess. Tons of targets
are scattered about, and source files are not organized beyond grouping
them into a "Source Files" and "Header Files" group.

Even "Header Files" is missing, because the ImHex build system does not
regard private header files of libraries as sources of a target, and
Xcode does not try to guess this information.

The solution is twofold:
* Additional code has been added which organizes the targets into a neat
folder structure
* Additional code was added behind a configuration flag
`IMHEX_IDE_HELPERS_INTRUSIVE_IDE_TWEAKS` which automatically creates
source file trees in Xcode targets, and discovers the non-declared
header files via the folder convention.

### Screenshots
N/A

### Additional things

As a bonus: `IMHEX_OFFLINE_BUILD` assumes that ImHex-Patterns is cloned
into the source tree. I have added an additional fallback that tries to
locate it as a sibling folder of `${CMAKE_SOURCE_DIR}`, as this meshes
better with my filesystem setup.

The setup was tested with `CMake 3.29.2`, `Xcode 15.2`, and `llvm@17`
from homebrew.
2024-05-20 10:12:57 +00:00
WerWolv
1e91505e6e fix: .NET script loader not initializing correctly on macOS 2024-05-18 11:10:55 +02:00
WerWolv
1df0eea6c6 impr: Added support for SVG loading, improved texture loading API 2024-05-01 20:36:10 +02:00
WerWolv
08fc393451 build: Get rid of liblibimhex 2024-04-27 20:19:26 +02:00
WerWolv
5d0b474a7e build: Move renaming of the macOS bundle to the CI 2024-03-23 00:33:46 +01:00
WerWolv
d09f2c4f26 build: Fix creating the macOS bundle from within the M1 docker 2024-03-22 23:47:24 +01:00
WerWolv
567ccbfc3a build: Don't postprocess libimhex.dylib 2024-03-22 22:18:18 +01:00
WerWolv
28ea91e6c3 build: Move macOS rpath fixing to install step 2024-03-22 17:31:53 +01:00
WerWolv
0d58307e82 build: Fix bundling issues on macOS 2024-03-22 17:24:44 +01:00
WerWolv
4615dce0a9 build: Try fixing packaging issues with macOS bundles 2024-03-21 21:56:27 +01:00
Nobutaka Mantani
05ffcab911
build: Added support patches for FreeBSD (#1584)
This pull request fixes build on FreeBSD. The changes are conditioned
with `#if defined(__FreeBSD__)` preprocessor macro and they should not
affect build for other operating systems.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
Co-authored-by: iTrooz <hey@itrooz.fr>
2024-03-21 21:31:17 +01:00
iTrooz
0fb43ccc2b
fix: Use find_library() instead of find_file() to find system yara library (#1581)
Discord discussion:
https://discord.com/channels/789833418631675954/789840633414025246/1213564050848485427
2024-03-19 20:23:33 +01:00
WerWolv
a1437658af impr: Generate more useful stack traces on Linux 2024-03-15 17:53:12 +01:00
WerWolv
c610d804b1 build: Added cimgui 2024-03-11 21:09:56 +01:00
WerWolv
deafb6fe08 build: Allow precompiled headers to be turned off 2024-03-02 11:51:33 +01:00
WerWolv
091be1440a build: Added option to disable precompiled headers 2024-03-02 11:28:24 +01:00
WerWolv
030aee17f5 build: Disable precompiled headers in plugins again 2024-03-02 10:57:51 +01:00
WerWolv
fdaa56fd86 build: Disable unknown pragmas warning 2024-02-29 21:49:36 +01:00
WerWolv
bb3de7d510 fix: Build with precompiled headers on Linux 2024-02-29 21:15:51 +01:00
WerWolv
dd62bee264 build: Added precompiled headers 2024-02-29 19:57:20 +01:00
iTrooz
47362559ef
tests: Add infrastructure for testing plugins (#1538)
This PR adds a test architecture to be able to test plugins

Main infrastructure done by @WerWolv

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-02-26 20:51:08 +01:00
WerWolv
3fa06cc7c0 build: Remove compression from sdk again 2024-02-25 01:57:42 +01:00
WerWolv
d551e39a1c build: Handle install prefix being absolute when installing sdk package 2024-02-25 01:27:48 +01:00
WerWolv
b57eaca365 build: Try to fix sdk packaging 2024-02-24 23:41:22 +01:00
WerWolv
8bf7aa9ceb build: Respect DISTDIR env var when packing SDK 2024-02-24 22:46:16 +01:00
WerWolv
0d4d8efe4e build: Compress SDK package 2024-02-24 16:09:48 +01:00
WerWolv
b2edb0441a build: Make external plugins build again 2024-02-24 15:06:10 +01:00
Nik
e475e763db
build: Hopefully fix macOS x86 build issues (#1556)
#1109
2024-02-17 21:01:57 +01:00
WerWolv
f113a2befe build: Only do dynamic linking of libpl on Windows 2024-02-15 16:10:16 +01:00
iTrooz
f332963c75
build: remove IMHEX_COMMIT_HASH_SHORT cmake flag (#1539) 2024-02-10 01:40:33 +00:00
WerWolv
dfc249135f build: Make plugin RPATH on Linux point to the plugins folder 2024-02-07 21:51:59 +01:00
WerWolv
24815c0370 fix: libpl not being installed correctly 2024-02-03 14:43:41 +01:00
WerWolv
ab842cbd73 build: Fix pattern language shared library ending up in the wrong folder on Linux 2024-02-03 10:41:11 +01:00