Rationale: The `IMHEX_PLUGINS_IN_SHARE` is a hack to prevent the appimage from loading plugin from system imhex installation, like /usr/lib/imhex/
In reality, I do not think people compile plugins specifically for the AppImage (plugins must be compiled for the specific imhex & compiler version the imhex binary is used), and this lets us remove the hack
- Fix for vertical scroll bar being too far to the left.
- Fix constructor not initializing from const char pointer properly
- maxcolumn not being set for console text lines causing crashes on
empty pattern evaluation
- A replacement using replace all is now undone in one step.
- Find/replace no longer need to have enter or return key to accept
text. You can use arrows or shortcuts.
- More efficient search replace implementation with plans to add even
faster.
- Tooltips added to find/replace window
- Providers now save both horizontal and vertical scroll positions when
switching to another one and restore them when switching back. This is
independent to the cursor position which is also saved.
- Pattern editor no longer takes focus when changing providers via a tab
click. This has the effect that menus won't change by just clicking on a
tab.
- Small fixes and code refactoring.
- fixed crash when utf8 chars were present in text editor
- fixed unable to scroll when cursor at line 1
- removed dependencies on thext editor that were not being used.
I had to go back to the old code (old for me) and fit in the changes
that were applied to the new code.That was only possible by
incorporating some of the new structural differences to the text editor.
This created new bugs and crashes that I ve have fixed but there may be
ones that I couldn't find in the very small amount of time I could spend
testing so that this commit wouldn't be delayed. If more crashes are
found due to the mixing of old and new code they should be resolved when
the new code is brought in.
This is a trivial change which adds virtual methods to View, `onOpen()`
and `onClose()`, which are called when the view is opened or closed.
This information is already tracked inside the View, but not exposed via
the API. There is `didWindowJustOpen()` and `didWindowJustClose()`, but
these fetch and then reset the flag, so they can't be used more than
once in a frame (and are sometimes called by the frame, meaning the flag
has already been consumed by the time the View's draw callback gets
called).
The use case here is that I have a View which needs to do some work
every time it's shown.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
Projects weren't being saved as recent when a new project was saved.
They were only added as recent when re-opening the project
### Implementation description
<!-- Explain what you did to correct the problem -->
I also save projects as recent when saving them (I don't make a
difference between saving existing and new projects)
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
### Additional things
<!-- Anything else you would like to say -->
Adds keyboard shortcuts (currently `n` and `N`) in the diffing plugin
view to jump to the next/prev difference in the list.
IMPORTANT NOTE: Depends on changes made in a library submodule. [This
PR](https://github.com/WerWolv/libwolv/pull/34) must be accepted first.
---------
Co-authored-by: Nik <werwolv98@gmail.com>
…attern selection popup when pattern is already open
This PR does two things. Most importantly, it fixes a segfault that can
be caused by opening a recent file with pattern sync enabled.
Secondly, it makes it so that the pattern selection popup does not
appear if you already have text in the pattern editor for a given
provider (due to CLI args, a project file, pattern sync, etc.). If you
open a file normally, that text field is empty and the popup will appear
so you can select a pre-made pattern like usual.
The current CLI argument parsing did not work as documented and had a
number of issues related to multi-flag (subcommand) parsing. I've
reworked the logic in such a way that should maintain full compatibility
with any existing scripts/use-cases but with added functionality.
---------
Co-authored-by: Nik <werwolv98@gmail.com>
Unfortunately, I had to create a new fork and branch because GitHub kept
rejecting my push due to the workflow files (nightly_release.yml and
release.yml), even though they were not intentionally modified.
I only made changes in two language files and added a helper script
Formatter.py.
Please test if everything works correctly in the interface.
Thanks for the project, and I’m happy to help further if needed.
---------
Co-authored-by: Nik <werwolv98@gmail.com>
Add block list for intel hex and motorola srec
TEST: Load various hex and srec files
- Test search capability
- Test jump to section
### Problem description
The intel-hex/motorola formats can be loaded but not quite ideally,
including there is no list of segments/blocks that
can be extracted from file layout (metadata).
### Implementation description
I implemented similar feature as process monitor provider does, to
extract chunks while parsing the file and show
them as a sidebar list
### Screenshots
Looks like this:
<img width="1893" height="897" alt="image"
src="https://github.com/user-attachments/assets/c37d46cb-d129-4f9a-bb9a-d8969f397c6e"
/>
### Additional things
There are some improvements that could be made:
1. There is currently no API to jump to address, which would be useful
to jump to beginning of a hex/srec segment.
2. When jumping with setSelection, jumping backwards makes the first
visible line the jump address/line, however, when jumping forward, the
jump address is at the bottom (see image).
3. Unsure about convention for searches, should we search elements as
startsWith given user string, or contains or including 0x prefix or not,
whether to keep prefix zeros since the region size is 8 bytes, but
addresses should be <= 32 bits, etc.
When I implemented the changes to allow creating breakpoints without
losing focus in the pattern editor and without forcing it to scroll to
the cursor position I broke the code that ensures the cursor is visible
after being moved to the source code that caused the error. All I needed
to do is to explicitly set the argument because the default is to not
scroll to the cursor when focus is given to the pattern editor
Editor was attempting to delete non-existent chars which is UB. Fixed by
checking before deleting. Also fixed was a problem created by having to
press enter to change the search string which advanced the selection to
the first match. In the next step one would expect that pressing enter
on the replace field would replace the selected item but was replacing
the item found after he first.
This was fixed by always replacing the current selection first. If the
replacement is the same as the searched term then replacing won't
advance the cursor, but if they are different then the current match
will no longer exist so it would search fora new one.
Attempt to fix WerWolv's strange off by one problem when using the
mouse. Added a popup question for files that contain long lines (>1024
bytes). Also improved the handling of large lines, so it won't stall the
app. May also contain other smaller issue fixes.
Fixed by only processing text that's visible.
Also fixed the cursor jumping to breakpoint line when selected by
clicking the line number and added highlighting of the current editing
line. An optimization that caches the number of utf-8 chars in each line
was included as well.
Finally, an error that caused ImHex to crash if a pattern was saved as
itself was also fixed.
If you project has two patterns and one is very big, switching providers
while the big file is being highlighted makes the small one skip its own
coloring. The error was caused by a failure to interrupt the ongoing
lengthy highlighting process in a timely manner. It appears that calling
task interrupt allows the task to run to completion and when the task
runs to completion then the retrying mechanism is not trigger and the
small pattern never has a task assigned for coloring.
This was fixed by creating a variable that signals the intention to
interrupt the current highlighting process. The most used function in
the highlighter (used to update the current token) checks the variable
and throws an out of range exception causing the interruption of the
current highlighter and triggering the retry mechanic.
Reorganized source code into files named in the fashion of imhex and
split large functions into smaller ones. Moved all function definitions
out of the header except for one-liners. All variable types were
switched to use imHex standard (u8,...) and removed duplicated functions
that were needed when the text editor was isolated.
Minor improvements to find/replace while making sure they still worked
with utf-8 chars.
### Problem description
In current Chinese translation, "Windows context menu entry" in General
settings has been tranlated to 窗口上下文菜单项. and for Traditional Chinese,
it's 視窗內容功能表項目 (basically the same).
The previous translations were not conveying the correct meaning
associated with the term "Windows context menu entry". They were too
literal and did not clearly describe the functionality related to the
Windows Explorer context menu.
"窗口" in Chinese means a physical window, **not the Microsoft Windows
OS**. The Windows OS is usually referred to as "微软视窗" (rare) or left as
"Windows".
"上下文菜单" is a very "direct" translation of "Context menu" that is hard to
understand for most users. Chinese user usually call it "右键菜单", which is
"Right-Click Menu".
### Implementation description
I've changed it to 添加到文件资源管理器右键菜单 for Simplified Chinese, and
加至檔案總管的環境選單 for Tranditional Chinese.
### Problem description
Messages in the TCP tool were only visible as a text string in the
messages list and unable to be opened in the hex view.
There was also no way to send data other than as a typed in text string
in the input field.
### Implementation description
* Added the ability to double-click on a message in the messages list to
open it in a provider tab.
* Added a new button to the client tab to send the current provider to
the connected server.
* Updated the list look to show the message index in a column
### Screenshots
https://github.com/user-attachments/assets/198d78c7-7c94-4f48-ac8c-3581e2ac12e4
---------
Co-authored-by: Nik <werwolv98@gmail.com>
This PR improves the safety and reliability of the deleteOldFiles()
function by:
Preventing symlink attacks
Uses std::filesystem::canonical() to resolve all paths, eliminating ./..
and symlinks
Verifies each file is actually inside the target directory before
deletion
Safer file operations
Explicitly skips non-regular files (directories/symlinks)
---------
Co-authored-by: Nik <werwolv98@gmail.com>
This PR implements a neat little feature I missed - the ability to jump
to the next/previous differing byte, skipping the chunk of repeating
bytes. Very useful when you analyze a raw flash dump and want to skip
the large sections of `0x00`s/`0xFF`s.
Some implementation details worth validating:
- I wasn't sure what is the correct place to put the new menu entries
into. The possible candidates were `File -> Go to address...` and `Edit
-> Follow selection`. I chose the former, although the latter may be a
better fit since it already states that the action is related to the
selection. Overall, it may be a good moment to refine these menu entries
in general.
- I didn't add any tests since I'm not sure what is the project's policy
for those. Please let me know if I need to add some!
- I added the machine-generated translations for the new menu entries
which may be considered a questionable thing. Please let me know if
you're unhappy with those, I'll drop the commit.
Also, thanks for such a nice tool, I use it a lot and was glad to build
a new feature for it!
With an initial Window size of 1 by 1, the program aborts during launch
on my Debian 12 (bookworm) system running the Mate Desktop environment
on X11.
The exception from X is the following:
```
$ ./imhex
[18:36:33] [INFO] [main | Main] Welcome to ImHex 1.38.0.WIP!
[18:36:33] [INFO] [main | Main] Compiled using commit master@59c6d30
[18:36:33] [INFO] [main | Main] Running on Linux 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) (x86_64)
[18:36:33] [INFO] [main | Main] Linux distribution: Debian GNU/Linux 12 (bookworm). Version: 12
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 18 (X_ChangeProperty)
Resource id in failed request: 0x5400009
Serial number of failed request: 152
Current serial number in output stream: 163
```
The culprit is in `hex::init::WindowSplash::initGLFW()`, specifically
the `glfwCreateWindow` call with a window size of 1 by 1, that's the
last call in the ImHex codebase, after that it's libglfw and libX11.
The issue can be worked around by inhibiting the splash screen using the
`IMHEX_SKIP_SPLASH_SCREEN=1` environment variable, setting the window to
be a size larger than 1 by 1 also seems to resolve the situation.
My hunch is that an underflow occurs somewhere with the smaller values,
but I did no further investigation into analysing the root cause.
----
Above the line is the commit message.
### Problem description
See https://github.com/WerWolv/ImHex/issues/2215, which I think is the
same problem, and commit description above. Edit; I did another search
in the issues, I wouldn't be surprised if #2233 is a duplicate of the
2215 issue.
### Implementation description
Please see the commit message.
Analysis was done by setting an X11 error handler, making that throw and
running it in a debugger. This is available in this dev commit;
4a24e16a2ef100a9417e572f6b16c4a95711e94e.
### Screenshots
No apparent glitches if I make the splash window stick around with
`return std::nullopt;` in the `loop()` function. I don't know if there's
an issue at the beginning, but given that the window is set to
transparent before it is created and resized I don't expect any.
Here's a compulsory screenshot of the splash screen over an editor;
<img width="1247" height="666" alt="image"
src="https://github.com/user-attachments/assets/8ce05565-f207-4134-892d-9c074c4c840c"
/>
### Additional things
> Anything else you would like to say
Yes! I don't use ImHex often, but it's really useful when I do, thank
you!
Added the ui namespace and broke the main rendering function into a set
of smaller functions. Reorganized the header code separating functions
into rough groups that eventually will be in separate files.
Where one door opens, another one closes (said someone) and in this
situation i mean view, because there's no event for closing a view only
opening one, so please add this :c
### Problem description
Simply adds an **EventViewClosed** to match the pre-existing
**EventViewOpened**. Also fixes the issue where EventViewOpened wouldn't
trigger for windows that were popups (even if they are technically a
View.
### Implementation description
I mirrored the current functionality of EventViewOpened for closing.
---------
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
Also fixes two bugs:
1) error messages not staying visible
2) uncaught exception when struct name is duplicated.
A lot of the code using coordinates for start and end has been moved to
use Selections instead. Created more string manipulation code that uses
utf8 indices aka Coordinates directly. This makes implementing editing
functions easier by not having to go back and forth from string indices
to char indices and back. Currently, the substring, erase and []
operator support coordinates and str indices.
The error was caused when the search for the closing delimiter extended
past the last token in the sequence, which happened because the initial
increments before the loop starts were not being accounted for in the
loop ending condition. This was fixed by decrementing the limit of
possible steps to account for the initial steps taken.
Problem was that a recent commit allowed any subview window to become
the current subview with focus which also included the context menu
popup. The fix is to list all the subviews that can acquire focus so
that they are the only ones that will be detected by the menu condition.
I noticed that an earlier fix was missing parenthesis, so I checked a
file of a big size and used a segment size of 1 and only 3 digits were
being displayed in spite of needing 6.
The error occurred because only one of two subviews (the text editor or
the console) were allowed to report having focus. By extending this
functionality to all subviews, each one can use its own set of shortcuts
thus fixing the problem.
Currently setting the time interval to auto save the project has no
effect other than creating one initial save if the input file is
unsaved. When a file is created and not saved it remains in a dirty
state which prevented setting the state of the autosaved project to
needing to be saved. Fixed by decoupling the state of the provider from
the state of the autosave. When a provider is detected as being dirty it
always makes the autosave as being needed once the time interval has
elapsed.
feat: Implemented the menus on the main menu bar that will be available
when the text editor has focus. It allows you to load and save patterns
using open and save and will tack changes if files on disk are modified
externally. It also only opens the file chooser the first time you save
a pattern file and subsequent changes save to the same file.
If you want to save into another file and have the new file be tracked
you can use Save As. Finally, export doesn't track the file on disk at
all. this feature uses the same changes tracker class used elsewhere in
imHex.
fix: Changed the defaults of various shortcuts that were using Alt + a
key to avoid possible problems with some keyboards. Shouldn't affect end
users as their shortcuts are loaded from internal file but those who
complain about the Alt key misbehaving will be asked to reset the keys
to the new defaults. In addition, all globally accessible shortcuts were
added the Allow while typing flag so that they can be used in any field
that accepts text.
New menu entries were added for debugging to make the pattern editor and
the hex editor menus more like each other.
Finally, the call to RegisterMainMenuEntries() when initializing views
was moved to occur after the call to registerViews() so that menus are
not repeated when set for different views.
### Problem description
The current edlib submodule references a commit that's not present in
<https://github.com/blawrence-ont/edlib>. This throws off submodule
initialization and makes building an ImHex Flatpak using upstream Git
HEAD require some nasty Git bodges.
### Implementation description
Switching to <https://github.com/Martinsos/edlib> in `.gitmodules` is
all that is necessary, since
<0ddc23ea06>
properly exists.
### Screenshots
_This section was intentionally left blank._
### Additional things
For those curious, I'm currently working around this by manually
appending
```gitconfig
[url "https://github.com/Martinsos/edlib"]
insteadOf = "https://github.com/blawrence-ont/edlib"
```
to
`${flatpak_builder_state}/git/https_github.com_blawrence-ont_edlib/config`
after `flatpak-builder` has cloned the repository and failed. I know
this is a brittle solution.
With only one menu entry and having set it to use the text editor then
the console losses that functionality. Since both the console and the
text editor are on the same view, it follows that they must share the
menu entries. In some cases it is necessary to determine which of the
two editors needs to be processed inside the menu entry itself.
Also an error that caused the creation of invalid coordinates when
console is still empty was fixed by setting coordinates to 0,0 for empty
files. Another problem was that left clicking on the console didn't
select the word under the cursor but it does when left clicking on the
text editor. Now it works in both.
The menu entries on the console were removed completely and swapped with
a call to obtain the default 'edit' menu for the context popup. Also,
the console in write-only, so some of the entries like `Paste` or
`Replace` must be greyed out.
This PR is only to fix the bugs that exist currently. More work is still
needed for:
1) Removing the remaining shortcuts and creating new menu entries for
them and
2) Adding support for `Open` and `Save` in the pattern editor with path
tracking.
I tested all combinations of menus and shorcuts with console and pattern
editor and there were no problems I could detect.
The problem was that imported files didn't have token sequences to
obtain the UDT variables. The fix was to create maps from the file name
to the token sequence and then process each imported file to obtain all
the variables needed. Function variables are skipped since they can be
part of the code.
There are also some minor code style corrections and a fix in the text
editor where the last line of a selection was not being deleted.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
### Implementation description
<!-- Explain what you did to correct the problem -->
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
### Additional things
<!-- Anything else you would like to say -->
Co-authored-by: Nik <werwolv98@gmail.com>
Gets RPM builds back in sync with Fedora/EPEL and changes to mock
instead of fedpkg (slight efficiency improvement since fedpkg is a
wrapper around mock).
---------
Co-authored-by: WerWolv <werwolv98@gmail.com>
Users can now synchronize the content of the pattern editor with a file
on disk when exporting a pattern. Any modifications made in the pattern
editor are automatically saved to the file and when the pattern editor
gains focus it will automatically load any changes to the file on disk.
This feature is brand new and can have unforeseen problems so test it
fully before risking losing work.
Added major changes to how the text editor handles utf8 characters with
the added ability to obtain them using the [] operator and column
coordinates as indices. Sanitize coordinates was renamed to Set
Coordinates and can be used instead of the constructor to guarantee no
out of range asserts and/or exceptions. Improved move left and right
readability and cursor accuracy when clicking. Fixed single character
selection by double-clicking it. Deleted old and unused code and other
changes that I can't remember about atm.
These changes are part of an effort aimed at removing tabs from ImHex
that started some time ago. Here text preprocessing is removed from all
the places were it was done before and moved to the places where files
are read that go in the pattern editor with two notable exceptions.
1) Pattern import reads patterns in order to present a list that can be
filtered.That can safely ignore preprocessing since only needs to get
information needed to filter.
2) The pattern editor can incorporate text from the clipboard so that
needs to be preprocessed as well.
find/replace is unable to add tabs or carriage returns so this should
cover all angles.
The scrollbar, mini map and the segment delimiters were also using the
incorrect bytes per row value when changing data size forced a change in
the number of bytes per row. From the definition of the new value it
follows that bytesPerRow/bytesPercell == m_bytesPerRow/bytesPerCell, so
it is not necessary to switch it when it is divided by that quantity.
The error was that if `m_bytesPerRow` was not divisible by the number of
bytes per column then ImHex would crash but wouldn't crash if it was.
When `m_bytesPerRow` is not equal to the resultant bytes per row
obtained by the product of column count and bytes per column, then the
later bytes per row were be allocated but the former bytes per row were
being written causing heap corruption and crashes.
Instead of resetting `m_bytePerRow` when it can't be used, a new
variable (`bytesPerRow`) is created with the correct value and used in
the rest of the function. This way if the user goes back to choose a
data size that divides the old `m_bytesPerRow` then the number would
still be available and not overwritten. Test indicate that this approach
works and previous crashes are eliminated while producing the desired
output.
Added clion-like bracket matching feature with shortcut to go to the
other one. Also improved some cumbersome repeated function call.
Added support for using negative indices in coordinates so -1 is the last
line or column, -2 the previous, etc..
Pattern library has fixes for column errors being incorrectly set for lines
containing tabs that are not replaced by 4 spaces.
Fix a typo in `screenshot_descriptions.json` reported in #2330. While I
was presented with the contributing doc, I came across another typo
that's fixed in the second commit.
allows the ability to assign colors to global placed and non-placed
variables, pattern, local and calculated pointer variables, template
arguments, function variables and arguments, etc etc etc. It
accomplishes this using the parser and the token sequence generated by
the lexer. It still uses the original colorizing code but the underlying
data holding the pattern has been updated to be easier to use and to
debug. The changes are too numerous to cite here.It is a big but
necessary step to bring the pattern editor to a somewhat useful state.
There may be one commit in the pattern language repo needed to be able
to run this code
This pr updates the pattern language library to include two fixes.
The first fix deal with local variables that are children of a
structure, a union, a bitfield or an array losing their offsets when the
parent's `setOffset()` is called.
The second fix is that local variables of unions were being used as size
contributors of the patterns place with said unions.
Further details may be found in the pattern language pull requests for
the files listed as changed in the PL submodule in this pr.
Following the documentation (which is not being updated for this type)
on using `hex::type::Instruction` fails to produce any patterns
regardless of how you format the string that is passed to capstone to
select architecture and options.
The error is traced back to mishandling the input string so that the
correct parts are not selected properly. Rather than manually selecting
the parts of the input string from the result of find it is much simpler
to use splitString() (which uses find internally) and does all the work
for us with fewer chances for errors.
There are still problems. The resulting string for the formatter doesn't
return the disassembled instruction and prints the variable name with
the @ used to place it. To view the instruction you need to unseal the
pattern and open the child which then shows the instruction. That only
happens after this fix has been applied.
Issue #2196: Disassembler region range upper bound not inclusive
### Problem description
The issue is described
[here](https://github.com/WerWolv/ImHex/issues/2196)
### Implementation description
Some off by 1s
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
Feature description
This pull request introduces full Polish language support to ImHex.
It is a new feature that allows users to switch the UI to Polish,
improving accessibility for Polish-speaking users.
Implementation description
-Translated a total of 10 JSON language files into Polish (pl_PL.json)
-All translations were done manually, with the help of tools such as
DeepL, large language models (LLMs), and technical dictionaries
-Validated the JSON files using [jsonlint.com](https://jsonlint.com/)
-Performed initial UI testing — all translated strings appear and render
correctly
Screenshots
Below is an example of the UI in Polish:


Additional things
-I'm a beginner with both ImHex and English, so I may have missed some
things
-I'm fully open to any suggestions or corrections — whether related to
translation accuracy or JSON formatting/style
-I would greatly appreciate it if the reviewer could:
-Confirm that the project still compiles correctly (it built fine on my
side using ninja)
-Check that the pl_PL.json files are properly formatted and follow the
project's standards
If there are preferred tools or workflows for validating and formatting
JSON in this repository, I’d be happy to adopt them in the future.
---------
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
Updated
[plugins/builtin/romfs/lang/zh_CN.json](https://github.com/only9464/ImHex/blob/master/plugins/builtin/romfs/lang/zh_CN.json)
file to add support for Chinese language
### Implementation description
<!-- Explain what you did to correct the problem -->
Updated
[plugins/builtin/romfs/lang/zh_CN.json](https://github.com/only9464/ImHex/blob/master/plugins/builtin/romfs/lang/zh_CN.json)
<br/>The original
file:[plugins/builtin/romfs/lang/zh_CN.json](https://github.com/WerWolv/ImHex/blob/master/plugins/builtin/romfs/lang/zh_CN.json)
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

### Additional things
<!-- Anything else you would like to say -->
Nothing
### Problem description
While working with the section view, I noticed the window wasn't
resizable.
### Implementation description
This simply removes the `ImGuiWindowFlags_NoResize` flag, and then when
drawing the section window sets the hex editor to 70% of the available
window, leaving 30% to the pattern data. This is not ideal, but I think
before a full rewrite of the section window system this would probably
be a simple change to make it a lot more usable.
### Screenshots

Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
A while back there were some changes to the pattern language library
that changed the way shared_pointers are created using
shared_from_this(). Unfortunatelly the changes were not complete and
various bugs were created among them 2234, json type not working, unable
to export files, static arrays of bitfields,... The cause of the errors
was that in class Pattern the member m_parent was left as a raw pointer
and it needs to be handled by shared pointers. Also there were some
cases in which share pointers were needed but unique pointers were used
instead. Both cause crashes when shared_from_this is used on pointers
that are not managed by shared_ptr. Another source of errors were
infinite loops of clone and reference that caused stack overflow. The
fixes include making m_parent a weak pointer, turning unique pointers
into shared pointers and moving codefrom the copy constructors into
clone to break the infinite loops.These changes are the bare minimum
needed to bring the pattern language back to the full functionality that
it had before shared_from_this was introduced or at least thats the
hope.
This pr aims at fixing for negative values in advanced search for
numerical values. For a simple example try searching for -1 for int32_t
which is 0xFFFFFFFF. With the changes you can now find -1 for 1,2,4 or 8
byte integers.
Internal types are bigger than or equal to the types selected in the
options. Search keys are converted to the bigger type, but the values
read from the input file are not. This works ok for positive numbers,
but for negatives it needs some casting.
The casting is performed inside a newly added function that takes the
value returned by read, the size in bytes of the selected type in the
options and a template argument for the 64 bit type the value is stored
into.
I have tested positive and negative values for several different sizes
of signed integers. Also tested unsigned integers both in the low range
(near lowest limit) and in the high range (near largest possible value
for that type)
The bitmap visualizer has been simplified considerably. The previous version was designed to work with the TIM format which has some peculiarities that are not general enough. The current implementation has the following specifications.
. Whether colors are in a lookup table or part of the image itself they are always 32 bit R8G8B8A8.
. If using a color LUT the image then has indices as its element. Indices can have 16(32000 colors), 8 (256 colors) or 4(16 colors) bits each.
.For the cases 0f 16 and 8 bits, the data should be an array of N*M elements of the given size where N is the number of rows and M is the number of columns of the image.
. For the 4 bit case use an array of N*M/2 bytes so that each column contains two indices.
ToDo: Documentation, sample patterns and unit tests.
The 3-d visualizer can now handle textures from both the command line or the user interface and things should work as expected. A command line entry will be automatically displayed in the user interface, but changes will be applied immediately as you type or use the file picker. If the user interface text is deleted, then the command line texture will be used again. If a texture is invalid for any reason, then the previous one, if any, will be still in use and an error message will be displayed until the problem is cleared. Valid textures are image files that the stb library can open.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
This is a fix for the ImHex bug "ImHex crashes when analysing any PE
file #2221"
### Implementation description
This is a fix for the ImHex bug "ImHex crashes when analysing any PE
file #2221". The fix requires changes to the Pattern Language and the
ImHex UI. Revision would be wise. We want to avoid collateral damage.
It's a big code base and I'm new to it and the compilers/build-systems
used. And the bug is complex and low-level. I suspect this will fix
other random crashes. The problem is caused by two issues:
- The std::sort algorithm conjuring up garbage due to the sorting
criteria not being a strict weak ordering. See
[this](https://github.com/Voultapher/sort-research-rs/blob/main/writeup/sort_safety/text.md)
link.
- We sort shared_ptr<ptrn::Pattern> by pointer value, and the
object is a clone. In essence we're changing the values as we're
sorting.
Fixes#2221
### IMPORTANT
I'm not sure how "plugins/builtin/source/content/data_formatters.cpp"
got into the PR. Been trying for an hour to rectify. I'm not a Git
expert (the last time I used source control seriously SourceSafe was a
thing) please ignore that file. It's a fix for another PR I submitted. I
suspect I stuffed up the branching and merging.
---------
Co-authored-by: Nik <werwolv98@gmail.com>
The recent update that made importing patterns undoable had the side
effect of undoing tab changes as well. When working on a fix for that it
became clear that the undo/redo stacks were being shared by all
providers so that you could undo changes done in a separate file. The
problem was fixed by making the text editors (and the console editors as
well) to be per provider which gives better control on things like
breakpoints and selections and a more robust focusing system that
preserves the cursor positions and removes the need to click on a
pattern to start editing. There are a lot of changes, but they are
mostly all the uses of text editors being now coded differently to
manage the providers. File imports are still undoable, but switching
providers is not.
Further changes suggested by reviewer were implemented namely a mull provider was being used and there was a get function missing which prevented the use of the preferred syntax.
The recent changes to the text editor to fix the longest line length
problems broke the console horizontal scrollbar. The code that displays
the console editor was more complicated that it needed be, and it had
the bad side effect of resetting the cursor which prevented horizontal
scrolling. Adding a function that appends lines to the text editor fixes
all problems and makes the code clearer. To accommodate for strings
containing zeros, the code that inserts text was changed to print a '.'
when zeros are encountered thus keeping the line length the same.
The implementation of subpixel rendering using draw call lists with
callbacks prevents call list merging and their associated clip rects in
tables. As a result clip rects become as narrow as the columns of the
table which can clip previously renderable primitives. The hex editor
has several draw calls that render outside their column so if subpixel
rendering is selected those primitives cease to be displayed.
To fix this issue, and to verify that this was indeed the cause behind
the issue, we simply push an adequately sized clip rect before the draw
call command and pop it right after.
A problem with segment vertical separators not being rendered in the
first tow was also fixed.
If you tried to collect the indices using addressof like stl pattern
collects vertices you get a small square for visualizer and no error
message. The changes here are able to extract the indices if they can be
extracted and give an error message if they can't.
MSVC build failing because of a warning treated as an error for
variables being used without initializing even though they are being
passed as references.
Proof of concept for implementing subpixel processing in ImGui. This is
work in progress, and it is bound to have problems.
What it does:
1) Uses freetype own subpixel processing implementation to build a
32-bit color atlas for the default font only (no icons, no unifont) . 2)
Avoids pixel perfect font conversion when possible. 3) Self contained,
no ImGui source code changes.
4) Results in much improved legibility of fonts rendered on low dpi LCD
screens that use horizontal RGB pixel layouts (no BRG or OLED or CRT if
they even exist anymore)
What it doesn't:
1) Fancy class based interface. The code is barely the minimum needed to
show it can work. 2) Dual source color blending. That needs to be
implemented in shader code, so it needs to change ImGui source code
although minimally. This will result in some characters appearing dimmer
than others. Easily fixed with small fragment and vertex shaders. 3)
subpixel positioning. If characters are very thin they will look
colored, or they can be moved to improve legibility. 4) deal with
detection of fringe cases including rare pixel layouts, non LCD screens,
Mac-OS not handling subpixel rendering and any other deviation from the
standard LCD. 5) tries to be efficient in speed or memory use. Font
Atlases will be 4 times the size they were before, but there are no
noticeable delays in font loading in the examples I have tried.
Any comments and code improvements are welcome.
---------
Co-authored-by: Nik <werwolv98@gmail.com>
This was caused by the variable that holds the bar location not being
updated when window was resized.
The bar can be moved until only one line is shown in the smaller window.
When ImJex window is resized, the proportion of editor/console height is
maintained.
### Problem description
It is possible for the maximum and minimum value arguments to std::clamp to be swapped which is defined in the standard as undefined behavior
### Implementation description
Swap the values if necessary.
---------
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
The horizontal scroll bar length is set using the maximum line length across the input file. The original setup had the lengths of imported and included files added so changes are made to insure that only changes from the input file are taken. This required changes to the Pattern Language library so the library is updated to the latest version as well.
The function SetSelection() in the text editor is used as its name implies to set the part of text that will be shown highlighted as a selection. It has two parameter for the selection start and end.
Strangely it also uses a third argument to choose one of 3 selection modes (line, word and normal). This is strange because it seems that if one wanted to select a line one would simply choose the line start and end as the selection values.
Furthermore using selection mode creates a bug when the word boundaries are advanced twice during a single word left or right selection and a second bug when SetSelection is used to set the cursor when the window acquires focus breaking selections in the console editor.
This PR simply eliminates the extraneous argument to SetSelection() ensuring that any problems related to it are fixed once and for all improving code readability by removing the use of inconsistent argument values to cover for the functionality duplication design flaw.
### Problem description
This PR addresses two small issues regarding the cursor in the pattern
editor (TextEditor.cpp):
1. It was not possible to move the cursor to the start of a line, if it
contained leading white space characters. With my fix, the editor will
behave more like other code editors. Pressing Home once will jump to the
first non-whitespace character (as it did before), but pressing it again
will jump to column 0. Subsequent presses will alternate between the two
positions.
2. When expanding a selection with Ctrl+Shift+{Left/Right}, the new
selection position would skip an additional word, resulting in the
cursor landing "inside" the selection. This PR fixes this bug.
### Implementation description
1. To fix the first issue, I simply added a condition in
`TextEditor::MoveHome` to check if the cursor is already on the first
meaningful character, or on one of the whitespaces preceding it, in
which case the jump offset is set to 0. If we're already on column 0,
then jump forwards to the first non-whitespace character.
2. This bug was happening because the word boundary jump calculations
were essentially happening twice. Once in
`TextEditor::MoveLeft`/`TextEditor::MoveRight`, and then a second time
in `TextEditor::SetSelection`, leading to the selection skipping an
additional word. I fixed this by replacing the ternary operator with
just `SelectionMode::Normal`.
---------
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
fixes Issue #1621.
Using shift-tab on an empty line caused a crash. Additionally, changed
the hard coded value of 4 to the tab size variable it really needs to be.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
Saving a layout using the "Workspace -> Layout -> Save Layout ..."
button saved to the last writable path in the list that can be found in
the "Help -> About" menu. Instead, it should write to the first working
path encountered.
### Implementation description
Getting all of the writable paths, then picking the first one.
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
### Additional things
<!-- Anything else you would like to say -->
Now that line numbers are not part of the line of code clicking them
makes the text editor lose focus. This PR changes that by allowing the
user to toggle breakpoints by clicking the field where the line number
is located.
Not only will the text editor retain focus when breakpoints are set, but
if other parts of ImHex had focus, then it will be transferred to the
text editor's current cursor position when the line number field is
clicked.
It is also possible to keep the focus where it was and only retain the
focus if the text editor was focused when the break point is set. The
change is very trivial so if that is preferred I can easily switch it.
A user complained that they imported a file by accident when they meant
to export it and as a result had trouble recovering the changes they
were trying to save. Auto-save saved the day but there is no reason for
not being able to undo changes after importing a pattern.
In fact, the previous implementation treated importing a pattern as a
reset on the editor instance which actually erased all previous undo
entries. Importing now is treated as a normal editing operation where
the entire file is replaced with the imported pattern.
Since all imports use AddText it was easy to add an undo entry to that
function while removing the part where the previous undo records were
being deleted.
Care is taken to add the preprocessed version of the imported file to
the undo buffer so that unwanted chars don't sneak in. A bug was found
in the handling of a tab char as well but hopefully it wont need to be
used anymore.
This change is to fix a bug reported in discord by berkus and Naheulf
about the console missing output lines. The bug was caused by using
SetText which replaces the existing text with the text in the argument.
To fix it use InsertText which puts the text at the current cursor
position that was already set to the end of the current contents.
Code was tested with pattern used to reproduce the bug and seemed to
work when evaluated repeatedly.
'Boost::regex' could not be found unless regex is specified explicitly
on some systems.
cf. https://github.com/AOSC-Dev/aosc-os-abbs/pull/9798
cc. @chenx97
### Problem description
> Target "libimhex" links to: Boost::regex but the target was not found.
when building ImHex with system Boost.
### Implementation description
Add `COMPONENETS regex` to require regex library explicitly.
Signed-off-by: xtex <xtex@aosc.io>
Co-authored-by: Henry Chen <chenx97@aosc.io>
The pattern editor was resetting the flag that marked text changes on
every frame, but resolving a text change may take more than one frame,
so instead I created a function that allows the resetting of the text
changed boolean from view pattern editor.
Currently, when a pattern is evaluated the pattern editor will lose
focus regardless of how evaluation was triggered. This is specially
annoying when using f5 or auto-evaluate. Now whenever a pattern is
evaluated, focus is given to the pattern editor when evaluation ends.
JumptoLine didn't work for empty lines.
Co-authored-by: Nik <werwolv98@gmail.com>
Partially fixes#2068 .
This assumes the headers are in "include" for all plugins - this is
necessary since the INCLUDES argument of add_imhex_plugin may contain
paths to third party libs, whose headers should not be copied.
To fix this I think it is necessary to add a second argument like
"PRIVATE_INCLUDES", which is included, but not installed.
With this it possible to append the ui plugin for example:
```
INCLUDES
$ENV{IMHEX_SDK_PATH}/lib/plugins/ui/
```
and to link against it:
```
LIBRARIES
/usr/local/lib/imhex/plugins/ui.hexpluglib
```
In a follow-up in the CMake Template for plugins imho there should be
fixed, that:
- you can include plugin includes relative to the SDK Path
- you can link plugins relative to the lib path + without the hexpluglib
or hexplug extension
---------
Co-authored-by: Tim Blume <git@3nd.io>
Co-authored-by: Nik <werwolv98@gmail.com>
The banner windows did not scale with the fonts resulting in cropped
text when font size was made bigger than normal.
fixed by ensuring the window is big enough and then making sure text is
centered in the y-axis.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
Brewfile has moved from `dist/Brewfile` to `dist/macOS/Brewfile`.
### Implementation description
Updated build instructions to reflect this previous change
### Screenshots
N/A
### Additional things
N/A
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Description
This pull request introduces a complete Russian translation for ImHex,
ensuring that Russian-speaking users can navigate and utilize the
software in their native language. The translation covers all user
interface elements, menus, dialogs, and messages, providing a seamless
experience for Russian users.
### Testing
The translation has been thoroughly tested to ensure accuracy and
completeness. All translated text has been reviewed for grammatical
correctness and contextual appropriateness.
### Screenshots



Co-authored-by: Lemon4ksan <senya20151718@gmail.com>
Fixes#2084
Error in text editor prevented using shortcuts when language other than
English was chosen.
The code was mistakenly using localized name to test which window had
focus a execute the shortcut.
Fixed it by switching the name of the child window to the constant value
used to check the windows focused identity.
### Problem description
This PR addresses issue #2013 that described a cluttered Event Manager.
This is a DX issue and should not impact the users whatsoever.
### Implementation description
The changes revolve around three main points:
1. the Event Manager (`event_manager.hpp`) was split into four
categories: GUI, Interaction, Lifecycle, and Provider, and two types:
Events, and Requests. This results in the following files:
- `events_gui.hpp`
- `events_interaction.hpp`
- `events_lifecycle.hpp`
- `events_provider.hpp`
- `requests_gui.hpp`
- `requests_interaction.hpp`
- `requests_lifecycle.hpp`
- `requests_provider.hpp`
2. Every event and request now has its own piece of documentation, with
a `@brief`, accompanied by a longer comment if needed, and gets its
`@param`s described.
3. The old `event_manager.hpp` import was removed and replaced by the
correct imports wherever needed, as to reduce spread of those files only
to where they are truly useful.
### Additional things
The commits have been split into (chrono-)logical steps:
- `feat`: split the Event Manager, and replace the imports
- `refactor`, `chore`: make various small changes to match the required
structure
- `docs`: add documentation for events and requests
Hopefully, this will help to review the PR.
*Note: Beware of very long rebuild times in between the commits, use
them sparingly! The Actions will ensure this PR builds anyways*
Closes#2013
---------
Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
Co-authored-by: Nik <werwolv98@gmail.com>
The previous implementation seems to have been broken by Imgui updates.
There is also some improvement in focus handling and also a bug in
replace where the last match was not being replaced has been fixed.
Fixed also slowdown in large files when only one char was typed by not
searching until enter has been pressed.
Added key repetitions for enter and arrows to be able to handle large
number of matches and fixed some formatting problems.
The recently added data checks allowed invalid sized vertex arrays to be
used as if they were valid making ImHex crash.
Moved all the error messages into localization strings for translation.
After successfully finding matches and setting the cursor to them, the
screen would jump to the original window location upon closing the
window.
The error was caused by the wrong assumption that the scroll location
should be restored when window is closed. Instead, the right amount of
scrolling needs to be calculated to account for the window no longer
covering part of the text editor. Unused variable was discarded.
Another unrelated error is that the history of search names cannot be
accessed which will be addressed at a later PR.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
See #2033 (`hex::dec::lzma_decompress` reports an error when
decompressing a small buffer).
### Implementation description
<!-- Explain what you did to correct the problem -->
Set the LZMA decompressor memory limit to 1GiB fixed. Print a warning
when exceeded, and abort with returning `false`.
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
Normal result when decompressing a small buffer

Warning message when `memlimit` is exceeded: (Set to 64B here for a
demo)
> W: lzma_decompress memory usage 1114168 bytes would exceed the limit
(64 bytes), aborting

### Additional things
<!-- Anything else you would like to say -->
Is the warning wording OK? I'm not a native English speaker so please
change it if you want to.
Some issues related to the padding added to scroll past the end for
console that has padding added.
Added a shortcut to scroll editors one pixel at a time.
Fixed whole lines always drawn at the top even if scroll value is chosen
so that only a portion of the top line is visible. This caused errors in
horizontal scrolling.
Fixed Ctrl-F Ctrl-G and Ctrl-H messing the editor display.
Fixed the end of the line could not be clicked with mouse
Fixed line numbers and their lines could be displayed at different
heights.
Made numbers that represented lines floats instead of integers to allow
partial line display.
@ -10,9 +10,7 @@ This document is a guide for developers who want to contribute to ImHex in any w
If you'd like to add new features, the best way to start is by joining our Discord and telling us about your idea. We can then discuss the best way to implement it and how it should be integrated into ImHex or if it should be done in a separate plugin.
There are standalone plugin templates that use ImHex as a submodule. You can find them here:
There are standalone plugin templates that use ImHex as a submodule. You can find them located in the README's [Plugin Development](README.md#plugin-development) section.
### Adding a new language
@ -32,18 +30,18 @@ ImHex is written in C++ and usually uses the latest compiler and standard librar
### Structure
- `main`: Contains the main application code
- Important to understand here is that the main ImHex application is basically just an empty shell.
- Important to understand here is that the main ImHex application is basically just an empty shell.
- All it does is create a Window and a OpenGL context using GLFW, load all available plugins, properly configure ImGui and render it to the screen.
- Everything else is done inside of plugins. ImHex comes with a few plugins by default, most notably the `builtin` plugin which contains the majority of the application code.
- In most cases, this code doesn't need to be modified. Most features should be self-contained inside a plugin.
- `lib`
- `libimhex`: Contains all helper utilities as well as various APIs for plugins to interact with ImHex.
- The library's main purpose is for Dependency Inversion. The ImHex main application as well as libimhex do not know about the existence of plugins at build time. Plugins and the main application instead link against libimhex and use it as a common API to interact with each other.
- Since libimhex is a doesn't know about the existence of plugins, it cannot depend on any of them. This includes localizations and things that get registered by plugins after launch.
- Since libimhex itself doesn't know about the existence of plugins, it cannot depend on any of them. This includes localizations and things that get registered by plugins after launch.
- Even if the builtin plugin is technically always available, it is still a plugin and should be treated that way.
- All important APIs can be found in the `hex/api` include directory and are documented in the respective header file.
- `external`: All libraries that need custom patches or aren't typically available in package managers go into here.
- If you'd like to add new features to the Pattern language, please make a PR to https://github.com/WerWolv/PatternLanguage instead. ImHex usually depends on the latest commit of the master branch of this repo.
- If you'd like to add new features to the Pattern language, please make a PR to https://github.com/WerWolv/PatternLanguage instead. ImHex usually depends on the latest commit of the master branch of this repo.
- `plugins`
- `builtin`: The builtin plugin. Contains the majority of the application code.
- It's the heart of ImHex's functionality. It contains most of the default views, providers, etc. so if you want to add new functionality to ImHex, this is the place to start.
ImHex collects **anonymous** user statistics based on the user's preferences which are set on first launch and can be opted in or out at any moment through the settings interface.
These statistics contain basic system information such as: ImHex Version, System Architecture, OS, OS Version or Linux Distro version of the GPU in use. This information is linked to a randomly generated ID which cannot be used to identify a specific user.
Additionally, we allow uploading of anonymized crash log files in case of an error. These are never uploaded automatically but only after explicit consent by the user. This decision is not saved so logs can be uploaded on a per-error basis.
Information collected may be analyzed by members of our development team and will never be shared with third parties outside of the team. We may occasionally share general usage statistics publically in a summarized manner (For example a graph stating 70% of users are using a specific OS). We will never share information about individual users, even if they are anonymous.
| [](https://www.jetbrains.com) | JetBrains, providing us with free All Products Pack licenses for development |
| [](https://signpath.io/) | SignPath, providing us with free Code Signing Certificates for our Windows builds |
| [](https://aws.amazon.com) | Amazon, providing us with free AWS Cloud Credits for our CI |
Would you like to appear here as well? Contact us at [imhex@werwolv.net](mailto:imhex@werwolv.net)!
## Screenshots




@ -319,21 +336,23 @@ To use ImHex, the following minimal system requirements need to be met.
- **OS**:
- **Windows**: Windows 7 or higher (Windows 10/11 recommended)
- **macOS**: macOS 13 (Ventura) or higher,
- Lower versions should still work too, but you'll need to compile ImHex yourself. The release binaries will NOT work.
- **macOS**: macOS 15 (Sequoia) or higher,
- Lower versions should still work too, but you'll need to compile ImHex yourself. The release binaries will NOT work due to GitHub not having any macOS 15 or lower CI runners available.
- The macOS build is not signed and will require you to manually allow them in the Security & Privacy settings.
- **Linux**: "Modern" Linux. The following distributions have official releases available. Other distros are supported through the AppImage and Flatpak releases.
- **Linux**: "Modern" Linux. The following distributions have official releases available. Other distros are supported through the AppImage, Flatpak and Snap releases.
- Ubuntu and Debian
- Fedora
- RHEL/AlmaLinux
- Arch Linux
- Basically any other distro will work as well when compiling ImHex from sources.
- **CPU**: x86_64 (64 Bit)
- **FreeBSD**: Tested on FreeBSD 14.3
- Other versions will most likely work too but are untested
- **CPU**: Officially supported are x86, AMD64 and ARM64, though any Little Endian CPU should work.
- **GPU**: OpenGL 3.0 or higher
- Integrated Intel HD iGPUs are supported, however certain drivers are known to cause various graphical artifacts, especially on Windows. Use at your own risk.
- In case you don't have a GPU available, there are software rendered releases available for Windows and macOS
- **RAM**: 256MB, more may be required for more complicated analysis
- **Storage**: 150MB
- **RAM**: ~50MiB, more is required for more complex analysis
- **Storage**: ~100MiB
## Installing
@ -342,8 +361,10 @@ Information on how to install ImHex can be found in the [Install](/INSTALL.md) g
## Compiling
To compile ImHex on any platform, GCC (or Clang) is required with a version that supports C++23 or higher.
On macOS, Clang is also required to compile some ObjC code.
All releases are being built using latest available GCC.
Windows and Linux releases are being built using latest available GCC.
MacOS releases are being built using latest available LLVM Clang.
Important to note is, the MSVC and AppleClang compilers are both **NOT** supported since they're both generally severely outdated and lack features GCC and LLVM Clang have.
> [!NOTE]
> Many dependencies are bundled into the repository using submodules so make sure to clone it using the `--recurse-submodules` option.
@ -354,9 +375,20 @@ For more information, check out the [Compiling](/dist/compiling) guide.
## Contributing
See [Contributing](/CONTRIBUTING.md)
## Plugin development
## Plugin development
To develop plugins for ImHex, use the following template project to get started. You then have access to the entirety of libimhex as well as the ImHex API and the Content Registry to interact with ImHex or to add new content.
To build a plugin, you will need to use our SDK
### Getting the SDK locally
You can build the SDK by compiling ImHex like this:
<summary>A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM</summary>
<description>
<p>ImHex is a feature-rich Hex Editor aimed towards Reverse Engineers working with foreign data formats, malware, executables and raw memory.
Besides all the features a common Hex Editor has, ImHex also features a custom scripting language used to declare and dissect data structures, support for running YARA rules, a node-based graphical data pre-processor and support for various data sources such as files, raw disks or GDB Servers.</p>
description:ImHex is a hex editor for reverse engineering, reverse engineering, and analyzing binary files. It provides a powerful and flexible interface for working with binary data, including features like pattern matching, scripting, and a customizable user interface.
# See https://stackoverflow.com/questions/41701849/cannot-modify-accept-encoding-with-fetch https://github.com/AnthumChris/fetch-progress-indicators/issues/13
RUN du -b /build/imhex.wasm | cut -f1 > imhex.wasm.size
<pathstyle="opacity:0.2"d="M 5.3808594,5 C 4.6158118,5 4,5.6158118 4,6.3808594 V 13.619141 C 4,14.384188 4.6158118,15 5.3808594,15 H 31.619141 C 32.384188,15 33,14.384188 33,13.619141 V 6.3808594 C 33,5.6158118 32.384188,5 31.619141,5 Z M 40.400391,5 C 39.624791,5 39,5.6247906 39,6.4003906 V 13.599609 C 39,14.375209 39.624791,15 40.400391,15 H 58.599609 C 59.375209,15 60,14.375209 60,13.599609 V 6.4003906 C 60,5.6247906 59.375209,5 58.599609,5 Z M 5.3808594,50 C 4.6158118,50 4,50.615812 4,51.380859 v 7.238282 C 4,59.384188 4.6158118,60 5.3808594,60 H 31.619141 C 32.384188,60 33,59.384188 33,58.619141 V 51.380859 C 33,50.615812 32.384188,50 31.619141,50 Z"/>
<pathstyle="fill:#ffffff;opacity:0.1"d="M 5.3808594 4 C 4.6158118 4 4 4.6158118 4 5.3808594 L 4 6.3808594 C 4 5.6158118 4.6158118 5 5.3808594 5 L 31.619141 5 C 32.384188 5 33 5.6158118 33 6.3808594 L 33 5.3808594 C 33 4.6158118 32.384188 4 31.619141 4 L 5.3808594 4 z M 40.400391 4 C 39.624791 4 39 4.6247906 39 5.4003906 L 39 6.4003906 C 39 5.6247906 39.624791 5 40.400391 5 L 58.599609 5 C 59.375209 5 60 5.6247906 60 6.4003906 L 60 5.4003906 C 60 4.6247906 59.375209 4 58.599609 4 L 40.400391 4 z M 5.3808594 49 C 4.6158118 49 4 49.615812 4 50.380859 L 4 51.380859 C 4 50.615812 4.6158118 50 5.3808594 50 L 31.619141 50 C 32.384188 50 33 50.615812 33 51.380859 L 33 50.380859 C 33 49.615812 32.384188 49 31.619141 49 L 5.3808594 49 z"/>
<metaname="description"content="Free and extremely powerful Online Hex Editor for your Web Browser. ImHex is a free and open source Hex Editor for Reverse Engineers and Developers and Data Analysts.">