Compare commits

...

3471 Commits

Author SHA1 Message Date
WerWolv
f517dc9829 Merge branch 'master' into feature/clipboard_improvements 2025-05-29 20:27:10 +02:00
WerWolv
fe1309fb3d build: Don't link against llvm demangle in external builds 2025-05-29 20:27:03 +02:00
WerWolv
0ea3adcb75 Merge branch 'master' into feature/clipboard_improvements 2025-05-29 20:01:25 +02:00
WerWolv
12d59ce3e4 fix: Bad copy paste 2025-05-29 20:01:17 +02:00
WerWolv
96ef758bbd impr: Added clip library to improve clipboard situation 2025-05-29 19:56:46 +02:00
WerWolv
224fa83c65 fix: Missing <span> include 2025-05-29 19:55:59 +02:00
WerWolv
f591ac8780 fix: UDP Port not being updated correctly when loading provider from recents file 2025-05-29 18:26:07 +02:00
WerWolv
11e70511e6 build: Fix plugin SDK issues 2025-05-29 18:19:20 +02:00
WerWolv
c1e4121d1e build: Updated Windows resource copyright year 2025-05-29 18:00:41 +02:00
WerWolv
03884ddd05 feat: Added simple UDP Data Provider 2025-05-29 18:00:29 +02:00
WerWolv
ac67e985af build: Make tracing library a static library 2025-05-29 14:02:06 +02:00
WerWolv
9d12cd64d3 impr: Add full resolution Windows icon 2025-05-29 13:53:57 +02:00
paxcut
702b5f2888 fix: Problems with textures in 3d visualizer with bitmap visualizer. (#2167)
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.
2025-05-27 09:25:20 -07:00
WerWolv
a5eef3f34d build: Fix more linker errors 2025-05-26 21:57:27 +02:00
WerWolv
1bc9277e3c build: Fix undefined references 2025-05-26 20:25:35 +02:00
WerWolv
b33cb07dc0 build: Include tracing library in plugin SDK 2025-05-26 20:19:27 +02:00
WerWolv
ce74915c14 feat: Add full exception tracing support 2025-05-26 20:15:20 +02:00
WerWolv
f341413248 fix: Crash when opening diff view
#2269
2025-05-26 18:34:00 +02:00
WerWolv
ed3e2f65f8 impr: Set default font size to 12pt 2025-05-25 23:32:43 +02:00
WerWolv
6e5878b5d6 fix: OOBE logo background color 2025-05-25 23:29:01 +02:00
WerWolv
39242097dd fix: --reset-settings not working due to superfluous null bytes in string 2025-05-25 23:23:51 +02:00
WerWolv
0aec3fffe1 fix: Unused lambda captures 2025-05-25 22:21:40 +02:00
WerWolv
38ef00548a impr: Speed up Import Pattern popup
Closes #2264
2025-05-25 21:08:52 +02:00
WerWolv
c78c8072e9 fix: Text Editor Scrollbars being added multiple times 2025-05-25 20:35:03 +02:00
WerWolv
7c98411abe fix: Tutorial highlighting of menu item 2025-05-25 18:21:26 +02:00
WerWolv
e22516662f patterns: Updated pattern language 2025-05-25 18:21:03 +02:00
WerWolv
24c1f48522 build: Updated lunasvg and libyara 2025-05-25 15:32:43 +02:00
WerWolv
69b07d40e4 build: Updated ImGui to v1.91.9b 2025-05-25 15:30:33 +02:00
WerWolv
b96692b1ba fix: Global scale race condition during font loading 2025-05-25 15:11:09 +02:00
WerWolv
53afb7cba0 git: Add Ubuntu 25.04 release 2025-05-25 14:09:56 +02:00
WerWolv
8e0953af1e git: Only put the current web assembly build into the release artifact 2025-05-25 13:46:57 +02:00
WerWolv
724f9aa524 git: Deploy both latest release and nightly to web.imhex.werwolv.net 2025-05-25 13:43:06 +02:00
WerWolv
7067ffafe7 patterns: Display pattern errors in red in the pattern data view 2025-05-25 11:46:41 +02:00
WerWolv
145c88db31 patterns: Updated pattern language
Fixes #2266
2025-05-25 11:00:59 +02:00
paxcut
56615d6c06 patterns: Updated pattern language (#2270) 2025-05-24 16:44:59 -07:00
WerWolv
d26bcc1abe fix: Menu bar being gone on the Web build 2025-05-24 23:10:53 +02:00
WerWolv
04f817c042 fix: Web Assembly build 2025-05-24 22:45:17 +02:00
WerWolv
b58f97c1f1 impr: Added function to Texture class to retrieve raw image from GPU 2025-05-24 22:32:56 +02:00
WerWolv
96dc386694 fix: Linux build errors 2025-05-24 22:32:33 +02:00
WerWolv
c6c70daa5e fix: macOS build errors 2025-05-24 22:32:24 +02:00
WerWolv
de16375903 impr: Slightly simplify subpixel rendering logic and required ImGui patches 2025-05-24 22:32:08 +02:00
WerWolv
c6548d5ad1 fix: Non-subpixel rendered glyphs appearing as white rectangles if subpixel rendering is enabled 2025-05-24 21:59:21 +02:00
WerWolv
bd8c4e807c fix: Remove extra pixel from Hex Editor selection frame 2025-05-24 16:19:13 +02:00
WerWolv
553549302c impr: Use linear scaling for the windows title bar icon 2025-05-24 16:18:59 +02:00
WerWolv
c69a7012c5 fix: Unifont glyphs being rendered too far down 2025-05-24 16:09:15 +02:00
WerWolv
7acc5fc02e impr: Make title bar backdrop actually a backdrop and not an overlay 2025-05-24 11:57:02 +02:00
WerWolv
39bc165f36 build: Prevent frame pointer omission to improve stack traces 2025-05-24 11:56:44 +02:00
WerWolv
707a92281b fix: Multithreaded disk access issues 2025-05-24 11:48:07 +02:00
WerWolv
823013a3d9 fix: Fonts being smaller than their set size value 2025-05-24 11:47:46 +02:00
WerWolv
7089561b21 git: Remove accidentally committed file 2025-05-19 00:01:23 +02:00
WerWolv
0f0bff1685 fix: Remaining Subpixel rendering issues 2025-05-19 00:00:32 +02:00
WerWolv
b6387c3f64 fix: Crash when loading subpixel font didn't work 2025-05-18 11:10:43 +02:00
paxcut
ff0bcfb7da fix: More per-provider data access errors (#2256) 2025-05-17 21:48:36 -07:00
Stephen Hewitt
f729d36214 fix: Crash when sorting for value fields in pattern data view, fix HTML export encoding (#2242)
<!--
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&lt;ptrn::Pattern&gt; 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>
2025-05-17 20:50:21 +00:00
WerWolv
d5a07b6a5b patterns: Updated pattern language 2025-05-17 22:20:05 +02:00
WerWolv
bda0b3ce18 fix: More per-provider data access errors 2025-05-17 22:14:27 +02:00
WerWolv
14d95a7e46 patterns: Updated pattern language 2025-05-17 20:31:38 +02:00
WerWolv
2ef2cdd874 fix: Make sure PerProvider don't get accessed using a nullptr provider 2025-05-17 20:29:54 +02:00
paxcut
57c2d84122 improv: made the text editors to be per provider. (#2255)
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.
2025-05-17 11:26:54 -07:00
paxcut
d263962a06 fix: horizontal scrollbar missing in console (#2253)
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.
2025-05-17 00:23:43 -07:00
WerWolv
e32c5784af impr: Further refine pattern tree indenting 2025-05-16 20:24:38 +02:00
WerWolv
1496a6e755 impr: Improve indentation of pattern data tree
#2252
2025-05-16 18:50:35 +02:00
WerWolv
6dab1063a1 fix: Provider getting marked as dirty immediately on load
#2251
2025-05-16 18:50:03 +02:00
paxcut
ff286f3e05 fix: subpixel effects on hex editor. (#2247)
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.
2025-05-16 01:31:29 -07:00
WerWolv
6f112c2d16 feat: Added custom encoding row to data inspector 2025-05-15 22:00:43 +02:00
paxcut
8f222dab99 fix: unable to display models if indices are not contiguous in the input file (#2248)
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.
2025-05-14 22:08:16 -07:00
paxcut
828951ffe9 build: msvc uninitialized variables. (#2239)
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.
2025-05-12 01:58:10 -07:00
WerWolv
616f34e210 fix: Window being created partially off-screen if monitor is too small
Fixes #2238
2025-05-11 23:54:58 +02:00
WerWolv
fa3ed7e618 impr: Load all unicode planes if requested 2025-05-11 23:26:27 +02:00
WerWolv
a207969dec fix: Unicode enable option not working correctly 2025-05-11 23:07:52 +02:00
WerWolv
7fde40b04e impr: Allow for higher planes of unicode characters to be recognized
#2237
2025-05-11 23:07:27 +02:00
WerWolv
1bce588cdd impr: Make sure settings descriptions are always visible 2025-05-11 18:11:28 +02:00
WerWolv
5a095cc993 fix: Icon scaling when using pixel perfect font 2025-05-11 17:42:36 +02:00
WerWolv
431eab47a2 git: Remove Fedora 40 support, add Fedora 42 support 2025-05-11 17:25:20 +02:00
WerWolv
e9e3d25315 fix: Rendering on macOS being broken 2025-05-11 17:18:43 +02:00
WerWolv
e2735e283e fix: Text not rendering at all on the Web version 2025-05-11 17:07:19 +02:00
WerWolv
3e9cb57dd6 fix: Grayscale antialiasing not blending correctly 2025-05-11 17:07:03 +02:00
paxcut
5c4cf7379f feat: Added Subpixel Font rendering (#2092)
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>
2025-05-11 15:36:32 +02:00
WerWolv
8cd961596e fix: Undo accent color changes as they produced some weird results 2025-05-11 15:24:24 +02:00
WerWolv
d2344418d6 patterns: Updated pattern language 2025-05-11 15:22:27 +02:00
WerWolv
33aa2248d2 fix: Theme color alpha not being applied correctly to accented colors 2025-05-11 11:05:53 +02:00
WerWolv
feb5b209ed web: Adapt new async WASM loading API 2025-05-10 21:30:42 +02:00
WerWolv
34722404f4 build: Emscripten no longer generates imhex.worker.js 2025-05-10 19:25:36 +02:00
WerWolv
b78a234fe1 impr: Make accent colors work more naturally 2025-05-10 18:23:29 +02:00
WerWolv
f19478374f build: Update emscripten to the latest version 2025-05-10 14:24:07 +02:00
WerWolv
51a01c860b patterns: Updated pattern language 2025-05-10 12:17:41 +02:00
WerWolv
eedd044716 build: Updated dependencies 2025-05-10 11:11:18 +02:00
WerWolv
0a327f4ad3 impr: Allow debug banner to be skipped with a env var 2025-05-10 11:00:18 +02:00
WerWolv
eec6a5da0a impr: Unlock frame rate in more cases 2025-05-10 11:00:18 +02:00
WerWolv
fc87bc0cf1 impr: Allow events to be used with a function without args 2025-05-10 11:00:18 +02:00
peelz
1f213408a1 build: Move nlohmann-json to build dependencies (#2218)
nlohmann-json is a headers-only library, so there's no runtime
requirement for it.
2025-05-10 10:59:18 +02:00
WerWolv
bac6fd803f patterns: Updated pattern language 2025-05-09 21:18:31 +02:00
WerWolv
5a74d7e3e2 patterns: Updated pattern language 2025-05-09 19:35:00 +02:00
WerWolv
e289380c39 fix: Crash when selecting invalid time_t 2025-05-09 19:33:01 +02:00
WerWolv
8081dff6b6 build: Updated libfmt (#2234) 2025-05-09 19:00:04 +02:00
WerWolv
7dcf09118b patterns: Updated pattern language 2025-05-09 18:24:50 +02:00
WerWolv
4b9a3d121d fix: Visualizer popups being draggable from their body 2025-05-09 17:23:55 +02:00
WerWolv
cd24cba240 build: Updated libwolv 2025-05-09 17:23:35 +02:00
paxcut
d33fad9d23 fix: The bar between pattern editor and console could be locked even if it seemed like it should be movable. (#2227)
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.
2025-05-05 02:43:14 -07:00
paxcut
b02aa51e09 fix: macos builds
Found post on s.o. about c++ headers not being found when using llvm
clang installed using homebrew
[here](https://stackoverflow.com/questions/77250743/mac-xcode-g-cannot-compile-even-a-basic-c-program-issues-with-standard-libr)
and when I tested the proposed solution in my imhex fork the macos x86
builds were able to complete.
2025-05-04 21:19:29 -07:00
ThePirate42
36eeee5f9c fix: prevent potential UB using std::clamp.
### 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>
2025-05-04 17:24:59 -07:00
paxcut
4883ed0e5a fix: Incorrect horizontal scrollbar displayed. (#2209)
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.
2025-05-04 07:56:39 -07:00
paxcut
78ad0d2592 fix: fixed console selections while improving code clarity.
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.
2025-04-30 22:08:23 -07:00
SparkyTD
f6def74b29 impr: Fix word bound selection and 'MoveHome' behavior in the pattern editor (#2193)
### 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>
2025-04-30 11:57:34 -07:00
Geky
be44676b01 i18n: Added french translation (#2171) 2025-04-24 11:14:41 +02:00
paxcut
60c1c22a73 fix: fixes Issue #1621 (#2189)
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.
2025-04-23 06:54:39 -07:00
WerWolv
02cadc264e build: Try to use macOS 13 SDK if possible 2025-04-14 20:42:37 +02:00
WerWolv
a0ca5b8072 fix: Missing include on clang 20 2025-04-14 20:21:53 +02:00
WerWolv
31fdb73b0e git: Remove --no-lock from brew commands since it was removed 2025-04-14 19:02:07 +02:00
WerWolv
d2caa1859d fix: LayoutManager build issues 2025-04-09 07:26:45 +02:00
PietHelzel
f6c25b30ae fix: Saving layout now picks the first path in the list (#2208)
<!--
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 -->
2025-04-08 21:47:20 +02:00
WerWolv
379d826f18 build: Fix configure issues with cmake 4.0.0 2025-04-04 00:02:39 +02:00
WerWolv
96afccc46c fix: Workspaces not being updated correctly 2025-04-03 23:55:35 +02:00
paxcut
c0a222644b feat: Allow adding breakpoints in pattern editor by clicking on line numbers (#2161)
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.
2025-03-11 14:57:49 +01:00
paxcut
653173945f feat: Make undo work when importing pattern (#2160)
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.
2025-03-11 14:56:44 +01:00
paxcut
7d09cc6d25 fix: Console editor not showing all output (#2133)
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.
2025-03-11 14:56:05 +01:00
Stefan
a4360dfe76 lang: Use ß in German translation where needed (#2135) 2025-03-11 14:55:12 +01:00
WerWolv
9887117e7a build: Updated disassembler library 2025-03-03 15:41:04 +01:00
xtex
9be7eafa39 build: Find regex component of Boost explicitly (#2151)
'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>
2025-02-28 12:29:39 +01:00
WerWolv
774eb18a42 impr: Make custom disassemblers reload on run 2025-02-28 12:04:47 +01:00
WerWolv
4e582d02f5 fix: More issues with OpenGL texture deallocation 2025-02-27 21:44:42 +01:00
WerWolv
38d11dacb7 fix: Crash when choosing Edit -> Disassemble Selection without ever opening disassembler view
Fixes #2149
2025-02-27 08:45:24 +01:00
WerWolv
e17490ee04 build: Install updater binary into bundle on macOS 2025-02-27 08:44:32 +01:00
WerWolv
f3a9ca6d6f fix: Only try to delete textures if OpenGL is still available 2025-02-26 16:03:37 +01:00
WerWolv
2653740a36 fix: Wrong scripts menu rendering on macOS with OS menu bar enabled 2025-02-26 16:03:29 +01:00
WerWolv
335042ec08 impr: Reduce CPU usage further 2025-02-26 16:03:24 +01:00
WerWolv
f6944b15f3 fix: Large CPU usage 2025-02-26 16:03:16 +01:00
WerWolv
d7960dccb4 fix: ID collision when having duplicate fonts installed
Fixes #2141
2025-02-25 11:52:46 +01:00
WerWolv
c974c4257d fix: Crash on exit due to frame rate limiter thread not being shut down
Fixes #2140
2025-02-25 11:50:38 +01:00
WerWolv
40d74dd633 fix: Crashes when switching disassembler architecture while disassembling 2025-02-24 19:58:40 +01:00
WerWolv
602c85b57d fix: Way too low sleep target fps 2025-02-24 19:53:07 +01:00
WerWolv
f96fa596b3 fix: Debug assertion 2025-02-24 19:52:41 +01:00
WerWolv
8c13d0096e build: Remove wrong hexpluglib bundling from rpms 2025-02-23 21:08:22 +01:00
WerWolv
7879f8b6a4 impr: Don't wake up frame rate limiter thread more often than necessary 2025-02-23 20:25:29 +01:00
WerWolv
4c0e8bc1d6 build: Disable fortify source in debug builds 2025-02-23 20:24:10 +01:00
WerWolv
6644df3958 build: Make sure plugin libraries don't end up in lib folder 2025-02-20 11:29:39 +01:00
WerWolv
2b5551d719 fix: Crash when closing provider that's open in the diff view 2025-02-20 10:34:59 +01:00
Jonathan Wright
137063dd21 build: Fix using system lunasvg (#2131)
Fix capitalization for cmake find_package and lunasvg.h path
2025-02-19 20:42:22 +01:00
WerWolv
ca403869ab fix: Broken Plugin API link 2025-02-19 14:46:01 +01:00
WerWolv
daf676b277 fix: Potential division by zero on Windows 7
#2130
2025-02-19 10:58:16 +01:00
WerWolv
66bbdbe6ec patterns: Updated pattern language
Fixes #2126
2025-02-18 22:48:49 +01:00
WerWolv
d3c2516f5f fix: Occasional crash when switching fonts 2025-02-18 21:50:51 +01:00
WerWolv
c39ae84922 impr: Make CLI not hang for a second after each command on Linux 2025-02-18 20:54:25 +01:00
WerWolv
a83843fdab patterns: Updated pattern language 2025-02-18 20:39:59 +01:00
WerWolv
2d48da1c4a fix: Prevent stack overread when calling dbus-send 2025-02-18 15:22:29 +01:00
WerWolv
af0c15f69d impr: Make title bar icon always draw at the correct size 2025-02-18 15:21:56 +01:00
WerWolv
7898df9c2c fix: Pattern Editor losing focus during auto evaluation
Fixes #2122
2025-02-18 10:25:59 +01:00
WerWolv
48abdeaf6b build: Fixed Linux build issues 2025-02-18 10:21:26 +01:00
WerWolv
99a4979b65 build: Fixed Windows build issues 2025-02-18 09:24:20 +01:00
WerWolv
d8beff4f6b build: Only enable module scanning when modules are enabled 2025-02-18 00:47:36 +01:00
WerWolv
ccaf1e33c0 build: Make this modules stuff actually mostly work on Clang 2025-02-18 00:39:53 +01:00
WerWolv
3f119b957e build: Use -fvisibility=hidden for plugins 2025-02-17 22:57:33 +01:00
WerWolv
abf97212fe build: Added some initial test code for C++ Modules 2025-02-17 22:57:21 +01:00
WerWolv
b81c3d2f75 build: Updated dependencies 2025-02-17 16:19:02 +01:00
WerWolv
5651c4d95c git: Updated gcc version in compile instructions 2025-02-17 16:14:49 +01:00
WerWolv
c83a5cc1b7 build: Get rid of unused Toolchain file warning 2025-02-17 13:19:53 +01:00
WerWolv
0499807597 fix: Remove unused event unsubscribes in disassembler 2025-02-17 13:07:01 +01:00
WerWolv
f846afd8a9 fix: Crash when setting invalid font 2025-02-17 13:06:35 +01:00
WerWolv
b822c82d18 impr: Added missing ellipsis on Edit options 2025-02-17 11:21:55 +01:00
WerWolv
e4de551008 fix: Closing one view breaking all other views 2025-02-17 10:16:51 +01:00
WerWolv
5333d0180f fix: Crash when loading process memory provider from project 2025-02-17 10:16:37 +01:00
WerWolv
658d4c4d72 fix: Make sure fps counter values are initialized to zero 2025-02-16 23:46:08 +01:00
WerWolv
efa50a8c39 fix: Revert accent color changes 2025-02-16 22:52:54 +01:00
WerWolv
677dc6192d fix: Don't execute EventDPIChanged multiple times 2025-02-16 22:21:00 +01:00
WerWolv
1ed56c1b1d fix: Wrong native scaling on Wayland 2025-02-16 21:59:30 +01:00
WerWolv
983be04722 impr: Allow accent colors to have darker colors 2025-02-16 21:24:23 +01:00
WerWolv
1bd9c918f6 fix: Crash when custom disassembler returns no bytes 2025-02-16 21:11:02 +01:00
WerWolv
0ba16485bb patterns: Updated pattern language 2025-02-16 21:06:39 +01:00
WerWolv
1d9934830b fix: Pattern editor being shifted to the left on evaluate 2025-02-16 20:50:49 +01:00
WerWolv
806d6148eb fix: Pattern console log logic 2025-02-16 20:08:36 +01:00
WerWolv
e484587778 fix: Don't parse version string on every call 2025-02-16 20:08:10 +01:00
WerWolv
1e4b5104b7 build: Updated libwolv 2025-02-16 20:07:44 +01:00
WerWolv
676d2e2ef5 build: Fixed release note generator script 2025-02-16 19:24:40 +01:00
WerWolv
6122d44bd9 git: Fixed dnf cache key 2025-02-16 19:24:27 +01:00
WerWolv
eb9f0cdf0c build: Bumped version to 1.38.0.WIP 2025-02-16 19:24:10 +01:00
WerWolv
01f4595aab build: Bumped version to 1.37.0 2025-02-16 17:13:50 +01:00
WerWolv
bf10d333cd fix: Default scale of Web version on macOS 2025-02-16 16:35:37 +01:00
WerWolv
267ef37cb6 fix: Use after free when logging during plugin unload 2025-02-16 16:19:00 +01:00
WerWolv
879e4c9d58 build: Move menu items handler into libimhex 2025-02-16 15:48:44 +01:00
WerWolv
67340e1526 impr: Make sure to only ever load plugins once 2025-02-16 15:14:23 +01:00
WerWolv
6ec8f9efe5 fix: Allow --select subcommand to work with hex numbers 2025-02-16 15:02:29 +01:00
WerWolv
c2b0560d91 git: Make sure entitlements are applied correctly to ARM macos builds 2025-02-16 14:58:29 +01:00
WerWolv
388071557e impr: Reduce opacity of modal backdrop 2025-02-16 14:33:17 +01:00
WerWolv
f6e3ede178 impr: Make hyperlink icons gray 2025-02-16 14:30:06 +01:00
WerWolv
a907550567 fix: Title bar backdrop not working correctly on macOS 2025-02-16 14:24:00 +01:00
WerWolv
c75a15dc3b patterns: Updated pattern language 2025-02-16 14:21:19 +01:00
WerWolv
83904aa1f1 fix: Disable alpha display in various color buttons 2025-02-16 14:12:58 +01:00
WerWolv
7d527fd2a6 feat: Added disassemblers tab to content store 2025-02-16 13:58:56 +01:00
paxcut
007e04bf37 fix: Auto evaluate not working when undoing changes (#2106)
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>
2025-02-16 12:20:22 +00:00
paxcut
caff49504e impr: Better home shortcut for pattern editor (#2105)
The old home shortcut moved the cursor to column zero of the current
line.
Most editors move cursor to the first non-space character instead.
2025-02-16 12:53:07 +01:00
WerWolv
aad38beaf5 fix: Dangerous for loop comparison 2025-02-16 11:56:07 +01:00
WerWolv
bdad733331 build: Document disabled MSVC warnings 2025-02-16 11:53:01 +01:00
WerWolv
bc26ade57e fix: Double -> Float truncation 2025-02-16 11:49:32 +01:00
WerWolv
ee52ff3b11 impr: Make toolbar buttons slightly easier to see 2025-02-16 11:48:28 +01:00
WerWolv
40b95f02e4 patterns: Updated pattern language 2025-02-16 11:42:27 +01:00
WerWolv
8777a85630 fix: Make title bar backdrop stay where it is on resize 2025-02-16 11:40:09 +01:00
WerWolv
870aeb34fc feat: Added a title bar backdrop color gradient 2025-02-16 11:33:41 +01:00
WerWolv
b03be212b3 git: Fixed AppImage runner caching 2025-02-16 11:11:24 +01:00
WerWolv
c8f7dbf85e fix: Remove settings scaling warning as it doesn't make any sense anymore now 2025-02-16 10:56:01 +01:00
WerWolv
9e826b4c8b fix: Make sure shortcuts migration routine runs again with this release 2025-02-16 10:48:29 +01:00
WerWolv
05d528b39a git: Disable attestation for pull requests again 2025-02-16 10:03:17 +01:00
Justus Garbe
6828c7c077 fix: crash when disassembler encounters invalid instructions (#2116) 2025-02-16 00:52:30 +01:00
WerWolv
54f3bc0262 impr: Use heuristic to determine backing scale factor on the web 2025-02-15 22:30:06 +01:00
WerWolv
e232a2b33d fix: Web build rendering 2025-02-15 22:23:49 +01:00
WerWolv
73a3b217a4 fix: Scaling on the web version 2025-02-15 21:26:03 +01:00
WerWolv
19f925c60b build: Disable stack protectors for the web build since emscripten doesn't support it 2025-02-15 21:08:05 +01:00
WerWolv
5fb488236b git: Fixed macOS DMGs not having their volume icon set 2025-02-15 21:05:50 +01:00
WerWolv
c84786f9ee git: Fixed name of macOS ARM64 release build 2025-02-15 21:05:35 +01:00
WerWolv
c1925ddf8d fix: Inverted logic of donation nag 2025-02-15 19:34:18 +01:00
WerWolv
cf194e332c impr: Move update button from welcome screen to the title bar and show a toast 2025-02-15 19:25:29 +01:00
WerWolv
d8877e7d8b build: Enabled various hardening flags on GCC and Clang 2025-02-15 19:15:34 +01:00
WerWolv
8b2184f8e3 updater: Fixed updater not working properly on macOS 2025-02-15 17:50:29 +01:00
WerWolv
a42e4c5299 updater: Added updater support for more platforms 2025-02-15 17:14:58 +01:00
WerWolv
419787e17c impr: Make auto updater work better on Windows 2025-02-15 16:46:36 +01:00
WerWolv
2d6da52a86 patterns: Updated pattern language
Fixes #2114
2025-02-15 16:10:09 +01:00
Nik
b46deb3fa0 git: Added MSVC build CI (#2115) 2025-02-15 15:44:16 +01:00
WerWolv
b70120a248 build: Updated libwolv 2025-02-15 11:16:50 +01:00
WerWolv
3a6a4011d0 feat: Added nag banners for donations 2025-02-15 11:15:56 +01:00
WerWolv
999c4d07b7 fix: More double -> float narrowing fixes 2025-02-15 11:15:39 +01:00
WerWolv
44b182c6ae impr: Handle upgrade paths better 2025-02-15 11:15:24 +01:00
WerWolv
de7bec547a build: Make VS preset use Ninja because _my god_ MSBuild sucks 2025-02-15 11:14:46 +01:00
WerWolv
5542c0bc00 fix: Multiple issues with provider load interfaces not working 2025-02-15 11:13:22 +01:00
WerWolv
83e0ce0042 fix: Corporate environment detection not working correctly 2025-02-15 11:09:20 +01:00
WerWolv
4685dea075 git: Fix attestation generation 2025-02-11 23:52:46 +01:00
WerWolv
599f63bc67 build: Updated libwolv 2025-02-11 23:45:55 +01:00
WerWolv
199f2aea77 build: Updated disassembler library 2025-02-11 23:09:15 +01:00
WerWolv
bff9b8b4b1 feat: Fixed string/char names in data inspector, added utf16 and utf32 string and char types 2025-02-11 23:05:56 +01:00
WerWolv
a83610bc06 build: Updated libwolv 2025-02-11 23:05:25 +01:00
WerWolv
b3d208e6e6 impr: Allow sidebar to be only resized from the right 2025-02-10 21:42:12 +01:00
WerWolv
e8b391c0f6 feat: Added option to randomize window title 2025-02-10 14:02:32 +01:00
WerWolv
02b5df03ab impr: Drastically reduce font-related memory usage 2025-02-10 12:02:05 +01:00
WerWolv
e1580e51cf build: Make ImHex fully compile with warnings enabled in MSVC 2025-02-10 09:42:35 +01:00
WerWolv
3a7578879f fix: RGBA8 data processor node not working correctly 2025-02-09 23:38:35 +01:00
WerWolv
ea3d4b41a9 patterns: Updated pattern language 2025-02-09 10:28:46 +01:00
WerWolv
e0c2a39ce7 build: Fix ARM64 macOS build issues 2025-02-08 11:27:40 +01:00
WerWolv
1fa27b7f09 build: Fix remaining wasm build issues 2025-02-08 10:50:04 +01:00
WerWolv
f980f1dae2 build: Compress wasm build romfs 2025-02-07 23:56:50 +01:00
WerWolv
b81ad53449 build: Move vcpkg.json away 2025-02-07 23:56:50 +01:00
WerWolv
a9727171e2 build: vcpkg is already installed in the macOS docker 2025-02-07 23:37:10 +01:00
WerWolv
a1634fb337 build: Properly update vcpkg pages in web and macOS ARM docker 2025-02-07 23:34:05 +01:00
WerWolv
94a2f9460e impr: Use proper main() return values in forwarder 2025-02-07 22:19:35 +01:00
WerWolv
18cd39270a fix: Very slow processing of large pattern console outputs 2025-02-07 22:19:15 +01:00
WerWolv
72c2bca363 fix: Severe lack of easter eggs 2025-02-07 16:24:57 +01:00
WerWolv
4c153dc76d fix: Windows forwarder application not working when piping output 2025-02-07 16:23:27 +01:00
WerWolv
e63606f6bb feat: Added separate --version-short command 2025-02-07 15:46:11 +01:00
WerWolv
ed6da7fe14 fix: Writing not working correctly through a provider view 2025-02-07 15:45:38 +01:00
WerWolv
a588c96440 fix: Properly trigger global shortcuts 2025-02-06 22:34:34 +01:00
WerWolv
4c284b224e fix: Properly trigger all shortcuts 2025-02-06 22:33:14 +01:00
WerWolv
96afa650d1 fix: Properly trigger shortcuts on selected view on macOS 2025-02-06 22:13:06 +01:00
WerWolv
f17d0d3ae1 impr: Added simplified output option for --version 2025-02-06 21:46:27 +01:00
WerWolv
930d2b4280 fix: Some shortcuts not working correctly on macOS 2025-02-06 15:58:18 +01:00
WerWolv
f67b78bd91 build: Update vcpkg baseline on build 2025-02-06 15:24:57 +01:00
WerWolv
540e8ed602 build: Install vcpkg again in the ARM64 macOS docker 2025-02-06 15:21:07 +01:00
WerWolv
99cb51e813 build: Updated vcpkg baseline 2025-02-06 15:08:48 +01:00
WerWolv
db000c4b12 fix: Missing GLFW include on macOS 2025-02-06 14:12:52 +01:00
WerWolv
0cd557a686 impr: Remove frame from selectable text regions 2025-02-06 14:00:32 +01:00
WerWolv
6142bf859b fix: Missing new line 2025-02-06 13:27:48 +01:00
WerWolv
b6498b5c2d fix: Build error when including file in ObjC code 2025-02-06 13:04:36 +01:00
WerWolv
c15030e96e git: Remove libpl from PDB extraction process 2025-02-06 13:04:01 +01:00
WerWolv
cd2acd73b4 build: Fix libpl linking 2025-02-06 12:08:57 +01:00
WerWolv
cfe06ea1b6 build: Statically link libpl again everywhere 2025-02-06 12:03:20 +01:00
WerWolv
ca5c3e0e94 build: Fix linking against libpl in external plugins 2025-02-05 20:09:42 +01:00
WerWolv
6252fd399a fix: Loading/Storing of shortcut keys 2025-02-05 20:09:24 +01:00
WerWolv
de571e2c2a build: Updated libwolv 2025-02-05 20:09:12 +01:00
WerWolv
0cbd052b91 build: Updated dependencies 2025-02-05 15:09:09 +01:00
WerWolv
aa3ec3ece8 build: Updated dependencies 2025-02-05 13:49:16 +01:00
WerWolv
6b11028b72 impr: Use proper function to get environment variables 2025-02-05 13:47:38 +01:00
WerWolv
269c3e7398 fix: Wrong keys being loaded from settings for shortcuts 2025-02-05 13:47:17 +01:00
WerWolv
08335041f5 fix: Crash on Linux uf XDG_SESSION_TYPE is not set 2025-02-05 09:40:13 +01:00
WerWolv
d75b9cf942 build: Properly link plugins against libpl if it's a shared library 2025-02-04 12:16:46 +01:00
WerWolv
b55c40523f fix: Crash when closing ImHex with one or more view providers open 2025-02-04 09:35:26 +01:00
WerWolv
99a2dee7a2 build: Updated libromfs 2025-02-03 22:06:43 +01:00
WerWolv
c94265c77b build: Only add magic library dir in regular build 2025-02-03 21:48:13 +01:00
WerWolv
7ddfba1b4c build: Exclude more libraries from external plugin builds 2025-02-03 21:46:21 +01:00
WerWolv
9ecdd28eea build: Don't link against libcurl in external plugin builds 2025-02-03 21:43:57 +01:00
WerWolv
d8b36242f6 build: Don't set EXPORT_SYMBOLS when doing an external plugin build 2025-02-03 21:33:41 +01:00
WerWolv
3f470aabe9 fix: Compile errors 2025-02-03 21:11:48 +01:00
WerWolv
1e8dd54b3e build: Don't set -Wno-unused-result on MSVC 2025-02-03 20:51:47 +01:00
WerWolv
0a6681ccb7 impr: Remove dependencies on curl, mbedTLS and GLFW in the SDK 2025-02-03 20:50:11 +01:00
WerWolv
0140e24822 build: Fixed warning in miniaudio library 2025-02-03 16:05:40 +01:00
WerWolv
9fb38922ea impr: Disable main menu items for views that aren't selected right now 2025-02-02 22:32:24 +01:00
WerWolv
7752354598 impr: Make dark theme text slightly off-white 2025-02-02 21:48:12 +01:00
WerWolv
497670c4c3 fix: Don't apply backing scale factor twice to splash screen 2025-02-02 21:36:49 +01:00
WerWolv
84954cd2f1 build: Fixed more SDK errors 2025-02-02 21:22:42 +01:00
WerWolv
8b6eab401e fix: "Other Data Sources" welcome screen sub-window being too tall 2025-02-02 21:15:56 +01:00
WerWolv
71c11a5923 fix: Banner position being wrong while provider is loaded 2025-02-02 21:15:31 +01:00
WerWolv
f345edb252 fix: Banners not being part of the main viewport 2025-02-02 21:06:18 +01:00
WerWolv
be40fd9563 build: Apply flags correctly for imported libraries 2025-02-02 20:50:49 +01:00
WerWolv
5ee2ebfb4f build: Fix addXXXFlag functions for interface targets 2025-02-02 20:32:24 +01:00
WerWolv
cfa6b706a8 patterns: Updated pattern language 2025-02-02 20:32:06 +01:00
WerWolv
42f2a62d62 build: Make plugin library sdk path relative 2025-02-02 19:05:10 +01:00
WerWolv
41b6ef930a build: Fix MinGW build 2025-02-02 17:19:34 +01:00
WerWolv
948cbe0a9c build: Updated dependencies 2025-02-02 13:08:08 +01:00
WerWolv
18669f3230 build: Move back to upstream lunasvg 2025-02-02 12:14:32 +01:00
Tim Blume
4e9f944204 build: Install include folders of plugin libraries to SDK (#2074)
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>
2025-02-02 12:12:40 +01:00
WerWolv
fe18cbaa41 fix: Always properly jump to cursor position when scrolling with arrow keys
Fixes #1582
2025-02-02 12:06:34 +01:00
WerWolv
ed3712e1b9 fix: Shortcuts not working until a modal is opened 2025-02-02 12:00:59 +01:00
WerWolv
20dc4f31f0 impr: Show a loading spinner while providers are loading 2025-02-02 11:24:50 +01:00
WerWolv
19f9296a40 feat: Added blocking tasks that show a full-screen modal when active 2025-02-02 11:24:28 +01:00
WerWolv
06c019387c build: Fix most remaining warnings 2025-02-01 22:11:19 +01:00
WerWolv
645b43e9cc fix: Various MSVC warnings 2025-02-01 20:54:00 +01:00
WerWolv
ed37a3711f build: Fix extra comma 2025-02-01 20:23:02 +01:00
WerWolv
a3460de9dc build: Make VS CMake Preset do a 64 bit build 2025-02-01 20:20:42 +01:00
WerWolv
5084009d62 fix: Invalid iterator dereference when removing providers 2025-02-01 20:10:13 +01:00
WerWolv
e5c003d726 fix: Only use __declspec on with MSVC 2025-02-01 19:57:39 +01:00
WerWolv
327a02b87d fix: Plugins not having a proper entry point on MSVC 2025-02-01 19:14:15 +01:00
WerWolv
e9bf1a9f7a fix: Crash when no plugins were loaded 2025-02-01 18:08:47 +01:00
WerWolv
0c6fa768ea build: Fix building for 64bit with MSVC 2025-02-01 18:08:35 +01:00
WerWolv
483468a6c7 impr: Make WorkspaceManager internals static 2025-02-01 16:02:45 +01:00
WerWolv
8039ae1b90 build: Make ImHex fully compile with MSVC and Clang CL
This does NOT make ImHex work yet. However it can now be compiled
2025-02-01 15:13:13 +01:00
WerWolv
466b372d41 build: Added vcpkg manifest 2025-01-31 23:48:52 +01:00
WerWolv
3f6b5203ca fix: Further MSVC compile fixes 2025-01-31 23:48:38 +01:00
WerWolv
8d1352ddff fix: Remaining compile errors 2025-01-31 20:23:47 +01:00
WerWolv
e6ab2c3b7e impr: Various small fixes and improvements 2025-01-31 19:43:39 +01:00
WerWolv
e603c75bd3 build: Updated dependencies 2025-01-31 19:40:58 +01:00
WerWolv
4f28f97141 git: Fix workflow indentation 2025-01-30 22:34:50 +01:00
WerWolv
d0b32e5224 git: Try creating dmg a few times again in case XProtect is being a bitch 2025-01-30 22:25:00 +01:00
WerWolv
2062a23347 patterns: Updated pattern language 2025-01-30 22:12:04 +01:00
WerWolv
8c9236a066 patterns: Updated pattern language 2025-01-30 21:31:14 +01:00
paxcut
2f981ef91e fix: Banners not scaling properly with font size (#2096)
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.
2025-01-30 20:18:44 +01:00
WerWolv
6725c170ea build: Updated dependencies 2025-01-30 20:12:19 +01:00
WerWolv
c8cf6e7c08 build: Fix compile errors on platforms where sizeof(long double) > sizeof(unsigned long long) 2025-01-29 22:16:42 +01:00
Connor Gibson
e0b4acee12 build: Updated macOS compile instructions as Brewfile has moved (#2093)
<!--
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
2025-01-29 21:38:47 +01:00
WerWolv
803ebe34ed build: Update for software defined 128 bit types 2025-01-29 21:37:41 +01:00
WerWolv
e981eff1e6 fix: Uninitialized buffers in resize operation 2025-01-29 18:39:19 +01:00
WerWolv
aee7a09b6c feat: Added new --select, --pattern and --debug-mode subcommands 2025-01-29 18:32:54 +01:00
WerWolv
e74e4e92a0 build: Updated libwolv 2025-01-29 18:32:35 +01:00
WerWolv
6dba15defd impr: Removed black border from splash screen bytes 2025-01-28 23:41:44 +01:00
WerWolv
fee7a16692 fix: Exception being thrown while loading projects
Fixes #2091
2025-01-28 23:23:31 +01:00
WerWolv
141030344b fix: Crash when certain pattern language exceptions were thrown
Fixes #2091
2025-01-28 23:23:08 +01:00
WerWolv
4fa9586206 impr: Added Russian language to WiX installer and ImHex Web 2025-01-28 20:55:10 +01:00
WerWolv
fbbc430b7c fix: Body text being displayed in response text field 2025-01-28 20:53:01 +01:00
WerWolv
bfc68c4d28 fix: Replace HTTP Requests text editors with input text boxes 2025-01-28 20:52:00 +01:00
WerWolv
53fc018ada fix: --pl subcommand not working correctly anymore 2025-01-28 19:47:20 +01:00
WerWolv
d45dd45720 fix: Windows system error messages not being encoded correctly 2025-01-28 19:33:31 +01:00
WerWolv
19a9786bbf impr: Make ImHex cli work more like other tools 2025-01-28 18:41:29 +01:00
WerWolv
b8caf41423 fix: Make sure splash screen is rendered consistently on all platforms 2025-01-28 18:38:20 +01:00
WerWolv
0b3866a56a fix: Wrong usage of windows icon texture 2025-01-27 22:35:27 +01:00
WerWolv
53a7577416 impr: Allow resizing of settings window 2025-01-27 22:20:15 +01:00
WerWolv
f5515417d6 fix: Message dispatching related build issues 2025-01-27 22:15:39 +01:00
WerWolv
24e7c2f3db fix: Make sure all textures are destroyed before glfw gets uninitialized 2025-01-27 22:10:30 +01:00
WerWolv
6e6c5bbc67 fix: Splash screen texture scaling 2025-01-27 21:20:59 +01:00
WerWolv
f4403ff480 impr: Make splash screen use SVG directly 2025-01-27 20:45:30 +01:00
WerWolv
098da20761 fix: Delete splash textures before destroying splash screen 2025-01-27 19:08:01 +01:00
WerWolv
ef2373e8c0 feat: Implement messaging support for Linux 2025-01-27 19:07:22 +01:00
WerWolv
b2c8ed17d5 feat: Added shortcut for opening settings 2025-01-26 22:41:20 +01:00
Nik
bb594a459f feat: Implemented macOS messaging support (#2088) 2025-01-26 18:50:19 +01:00
WerWolv
7340a30650 impr: Make scalable font the default 2025-01-26 14:26:57 +01:00
WerWolv
403104dda1 fix: Properly scale unifont glyphs 2025-01-26 14:21:17 +01:00
WerWolv
8334fbb236 fix: Properly apply backing scaling to pixel perfect default font 2025-01-26 14:18:20 +01:00
WerWolv
0a0323ce5d git: Run CI on feature branches 2025-01-26 13:42:19 +01:00
WerWolv
726d36ba3d git: Fix creation of ARM64 DMG trying to enter wrong path 2025-01-26 11:26:04 +01:00
WerWolv
8bb1521963 git: Fix ARM64 .app path 2025-01-26 10:54:26 +01:00
WerWolv
9457c1f2b9 git: Install ImageMagick so create-dmg can make a pretty volume icon 2025-01-26 10:45:26 +01:00
WerWolv
2b24330f9f build: Updated ImHex icons in MSI installer 2025-01-26 10:40:53 +01:00
WerWolv
9329170e59 git: Ignore missing signature when building DMG 2025-01-26 10:32:37 +01:00
WerWolv
98f3de828a git: Add create-dmg to PATH 2025-01-26 10:27:09 +01:00
WerWolv
3f38f42259 git: Produce nicer looking DMG file for macOS 2025-01-26 10:19:05 +01:00
WerWolv
058a8cdc15 fix: Missing <cstdlib> include 2025-01-26 09:22:53 +01:00
WerWolv
d0c1213ea0 fix: Crash on systems where XDG_SESSION_TYPE isn't defined 2025-01-25 23:30:00 +01:00
WerWolv
30967bac6d fix: Modifier keys not working correctly on X11 2025-01-25 23:24:56 +01:00
WerWolv
09c9bcb046 fix: Pattern data filter not working correctly without a compare value 2025-01-25 23:17:03 +01:00
WerWolv
93f1f5d076 impr: Better font scaling with larger backing scale factors 2025-01-25 22:27:59 +01:00
WerWolv
93e5d62782 fix: Web build scaling 2025-01-25 20:12:21 +01:00
Bananchiki
4d7021ece1 lang: Added Russian translation (#1964)
<!--
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

![image](https://github.com/user-attachments/assets/455ca03d-0b33-45d2-9ed5-ddb404bd0728)

![image](https://github.com/user-attachments/assets/a7ebdb40-806f-43d9-ab36-deea730505c1)

![image](https://github.com/user-attachments/assets/29c5d21b-7443-4751-9129-e5fa054066d3)

Co-authored-by: Lemon4ksan <senya20151718@gmail.com>
2025-01-25 20:06:18 +01:00
WerWolv
f976988c75 impr: Try to detect backing scaling factor on the web build 2025-01-25 19:08:56 +01:00
WerWolv
1eee31fdbb fix: Debug mode only being enabled after everything has been initialized already 2025-01-25 16:54:16 +01:00
paxcut
048c483903 fix: Pattern Editor shortcuts not working correctly on different languages (#2085)
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.
2025-01-25 16:34:27 +01:00
Wolf
b646ece14b impr: Refactor and restructure Event Manager (#2082)
### 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>
2025-01-25 15:32:07 +00:00
WerWolv
35e8acd69d impr: Only enable font config Apply button when setting has changed 2025-01-25 15:50:52 +01:00
WerWolv
de4135d1ad fix: ID collision with multiple items of the same name in the Accept Pattern popup 2025-01-25 15:47:09 +01:00
WerWolv
a44959ce1b feat: Added option to enable debug features in release builds 2025-01-25 15:38:57 +01:00
WerWolv
f4bad0053a fix: Linking errors in the web build 2025-01-25 15:24:44 +01:00
WerWolv
26af5987a5 fix: Properly check if distro info exists before printing it 2025-01-25 15:24:25 +01:00
WerWolv
9cf3250751 impr: Replace GitBook AI garbage with simple search API 2025-01-24 22:31:49 +01:00
WerWolv
acc77205bb fix: Image visualizer data processor nodes not working
Fixes #2081
2025-01-24 21:36:29 +01:00
WerWolv
a6b4f62d75 fix: Opening files in existing instance not working 2025-01-23 19:22:40 +01:00
WerWolv
69c5d553b5 fix: Disable postprocessing shaders in Web version 2025-01-22 19:55:17 +01:00
WerWolv
637cdd7084 git: Only generate attestation on main repo 2025-01-22 19:19:19 +01:00
WerWolv
8978e193db impr: Better OS-specific handling of system exceptions 2025-01-21 23:28:22 +01:00
WerWolv
242b100aa3 fix: Properly detect Windows 10 2025-01-20 21:45:53 +01:00
WerWolv
3a888d48df fix: ID collision with color inline visualizer 2025-01-20 21:25:00 +01:00
WerWolv
721de39dbb impr: Make icon context menu use MenuItemEx for its icons 2025-01-20 21:24:49 +01:00
WerWolv
07e29f2030 feat: Added support for OpenGL post processing shaders 2025-01-20 21:24:25 +01:00
WerWolv
c117d9b3e5 fix: Crash when changing DPI 2025-01-19 23:07:53 +01:00
WerWolv
16eae89151 fix: Save/Save As toolbar items being missing by default 2025-01-19 21:49:34 +01:00
WerWolv
95cb6d8ee6 patterns: Updated pattern language 2025-01-19 19:23:48 +01:00
WerWolv
af27c09204 fix: I guess we can still not use std::views::enumerate 2025-01-19 17:54:18 +01:00
WerWolv
5e3532267c fix: Missing glfw include 2025-01-19 17:52:32 +01:00
WerWolv
7c0331df65 impr: Hide window on macOS when close button is pressed 2025-01-19 17:04:31 +01:00
WerWolv
04ab87cd8e patterns: Updated pattern language 2025-01-19 14:42:02 +01:00
WerWolv
91f5e84250 impr: Don't insert a new line at the end of settings pages 2025-01-19 10:56:00 +01:00
WerWolv
b1edd95ebc impr: Shortcut code cleanup 2025-01-19 10:55:27 +01:00
WerWolv
758738da5c fix: Default font not being the default font 2025-01-19 10:34:54 +01:00
WerWolv
41c8be275b fix: Assert when selecting selectable text 2025-01-19 00:26:26 +01:00
WerWolv
117eb1e2a7 feat: Added more granular font settings
Fixes #1260
2025-01-18 23:34:43 +01:00
WerWolv
3129d6e8fd impr: Simplified custom font selection 2025-01-18 19:03:55 +01:00
WerWolv
2ba7db184b build: Fix favicon transparency for ImHex Web 2025-01-18 17:47:36 +01:00
WerWolv
2cb0df4080 build: Properly optimize web build 2025-01-18 16:53:11 +01:00
WerWolv
3adc2c44e6 fix: Font customization not unlocking correctly 2025-01-18 16:05:11 +01:00
WerWolv
6d3ff64894 fix: ImHex using a lot of CPU 2025-01-18 14:57:06 +01:00
WerWolv
cf84ad6196 fix: Added back old constructor for Widgets::DropDown 2025-01-18 14:56:53 +01:00
WerWolv
6259190ad9 impr: Make localization fall back to english if it doesn't exist 2025-01-18 14:40:10 +01:00
WerWolv
181be1a58e fix: Missing paste behaviour option translations 2025-01-18 14:36:31 +01:00
WerWolv
771e191f28 fix: Windows icon not being transparent anymore 2025-01-18 14:11:49 +01:00
WerWolv
d4d6893eb3 git: Make sure PORTABLE flag is created correctly 2025-01-18 13:58:20 +01:00
WerWolv
9e75562662 build: Fix RPM icon path 2025-01-18 13:45:57 +01:00
WerWolv
2b3168163b git: Extract PDBs for for portable version properly 2025-01-18 13:45:32 +01:00
WerWolv
252c06eb12 build: Extract PDBs from build files 2025-01-18 13:26:12 +01:00
WerWolv
2a51d8169a build: Move icon to correct location 2025-01-18 13:18:33 +01:00
WerWolv
7405c4b411 build: Updated disassembler library 2025-01-18 13:06:31 +01:00
WerWolv
309ae7b619 build: Fixed disassembler library git messup 2025-01-18 12:38:20 +01:00
WerWolv
64ef56a0df git: Fixed Windows PDB extraction process 2025-01-18 12:04:46 +01:00
WerWolv
fbfe7b0d25 impr: Unlock frame rate for the first few seconds after startup 2025-01-18 11:58:49 +01:00
WerWolv
8c7e1a3b2d impr: Replace icon with Papyrus icon.
Special thanks to @varlesh and @morganist
See https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/issues/3909
2025-01-18 11:55:17 +01:00
WerWolv
bf249cdafe build: Updated disassembler library 2025-01-18 11:07:28 +01:00
WerWolv
59ba6f50cc build: Disable install targets of libfmt to fix Windows WIX installer 2025-01-18 11:03:51 +01:00
WerWolv
8d6e7c7d44 fix: Decompressor compile errors 2025-01-18 10:28:20 +01:00
WerWolv
52934ae166 feat: Make decompress functions return number of read bytes 2025-01-18 10:14:47 +01:00
WerWolv
56c4f2aa47 fix: ID collision with multiple banners on screen 2025-01-17 23:12:09 +01:00
WerWolv
a1d8cbd7ba fix: Properly update window position during resize 2025-01-17 23:11:53 +01:00
Nik
63a219a32b build: Added ARM64 AppImage build (#2073) 2025-01-17 22:55:41 +01:00
WerWolv
14fb256a6a build: Updated dependencies 2025-01-17 21:09:56 +01:00
WerWolv
95df7a23c3 build: Add new SDK files to Fedora package 2025-01-17 20:41:49 +01:00
WerWolv
bb17690cf5 build: Fix cv2pdb extraction errors 2025-01-17 19:56:25 +01:00
WerWolv
a943b02e43 build: Make sure unzip is installed on the CI 2025-01-17 19:50:41 +01:00
WerWolv
199f78347f build: Move PDB extraction to CI 2025-01-17 19:44:33 +01:00
WerWolv
d3d9a42d57 build: Added library plugin files to SDK 2025-01-17 19:32:52 +01:00
WerWolv
1fa45a8c84 fix: Replace bookmark comment Text Editor with multi-line text input
Closes #2056, Closes #2055
2025-01-17 17:28:13 +01:00
WerWolv
0b6316ea23 fix: Added back deleted variable to make web build work again 2025-01-17 17:26:46 +01:00
WerWolv
466a843263 build: Fix backwards compat with older cmake versions 2025-01-17 13:01:40 +01:00
WerWolv
b6ade8b101 fix: Shortcuts not working in detached windows 2025-01-17 12:39:55 +01:00
WerWolv
ff66b97e90 build: Get rid of some cmake warnings 2025-01-17 12:39:39 +01:00
WerWolv
c604ec8fb9 patterns: Updated pattern language 2025-01-16 21:23:22 +01:00
WerWolv
7564651dd5 patterns: Updated pattern language 2025-01-16 19:52:45 +01:00
WerWolv
cad17ddefd fix: Banners being misplaced on macOS 2025-01-16 19:27:22 +01:00
WerWolv
25d2f209e5 patterns: Updated pattern language 2025-01-16 19:15:39 +01:00
WerWolv
8d660c3ffe fix: Missing <numbers> include 2025-01-16 17:37:51 +01:00
WerWolv
209055d0b0 impr: Show a banner about degraded performance in debug mode 2025-01-16 17:09:17 +01:00
WerWolv
599b55965a impr: Improve the shadow of banners 2025-01-16 17:09:04 +01:00
WerWolv
69a9af5322 patterns: Added error pattern to pattern drawer 2025-01-16 17:08:49 +01:00
WerWolv
0303cd0ad0 patterns: Updated pattern language 2025-01-16 17:08:23 +01:00
WerWolv
8eb7e9fb05 fix: ID collision in provider data information section 2025-01-15 20:34:25 +01:00
WerWolv
6a1de5fc4e build: Updated ImGui to v1.91.7 2025-01-15 19:52:24 +01:00
WerWolv
a4af55cb66 build: Rename imgui_custom to imgui_backend 2025-01-15 19:52:19 +01:00
paxcut
1e17422f5e fix: Pattern Editor Find and Replace history (#2064)
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.
2025-01-15 19:40:12 +01:00
paxcut
8abaafab79 fix: Crash in 3D Visualizer, improved error messages (#2062)
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.
2025-01-15 19:38:38 +01:00
WerWolv
71e1465524 fix: Image visualizer node trying to create texture in non-main thread 2025-01-15 19:34:58 +01:00
WerWolv
3d2ea3753b fix: Missing <clocale> include 2025-01-15 19:31:33 +01:00
Nik
88530eff8b git: Updated screenshots in readme 2025-01-15 18:31:41 +01:00
WerWolv
df3decf71b build: Updated libwolv 2025-01-15 18:08:45 +01:00
WerWolv
565ee4cb2d fix: Banner positions with multi-viewports enabled 2025-01-15 18:08:05 +01:00
WerWolv
40fc325ba9 fix: Disable bogus Keypad to function key conversions on macOS 2025-01-15 17:59:57 +01:00
WerWolv
6aca16102d impr: Move up the right column on the welcome screen to avoid a scrollbar at default size 2025-01-15 17:54:35 +01:00
WerWolv
cb11b57ab1 feat: Added banners, replace some modals with them 2025-01-15 17:54:07 +01:00
WerWolv
d504937d50 fix: Empty regions in Intel Hex and Motorola SREC files not being displayed correctly 2025-01-14 23:54:07 +01:00
WerWolv
6bfdb7ca4e fix: Make sure provider switch buttons and close button don't overlap 2025-01-14 22:10:58 +01:00
WerWolv
e1637824c6 impr: Make strings in the data information view selectable and copyable 2025-01-14 22:05:29 +01:00
WerWolv
e36f2f2bcb fix: Replace "data processor" text with "data inspector" for the custom data inspector row hint 2025-01-14 17:51:26 +01:00
WerWolv
1a54e08f11 fix: Remove constexpr from functions that really aren't constexpr 2025-01-14 17:50:48 +01:00
WerWolv
ecc86ee429 fix: ImNodes not being deinitialized correctly 2025-01-14 17:50:29 +01:00
WerWolv
185a593bc2 fix: AllowWhileTyping shortcuts only working while typing 2025-01-14 17:50:06 +01:00
WerWolv
4a916ebb89 feat: Added New File option to the GNOME launcher and a --new cli option 2025-01-14 17:49:48 +01:00
WerWolv
1c305ca762 fix: Icons still following custom font size when using default font 2025-01-13 22:34:30 +01:00
WerWolv
17fff56fa0 impr: Make sure Windows title icon is scaled correctly 2025-01-13 22:31:24 +01:00
WerWolv
ec1b1c2b7d impr: More constexpr 2025-01-13 22:31:06 +01:00
WerWolv
7bae22f56f fix: Font selector still saying "Custom Font Path" 2025-01-13 22:20:53 +01:00
WerWolv
21e5eeef16 impr: Reduce default font size slightly, adjust element sizes on welcome screen 2025-01-13 22:17:14 +01:00
WerWolv
bf5eea80f6 impr: Make font size setting use points instead of pixels 2025-01-13 22:04:55 +01:00
WerWolv
9f9a6d9827 impr: Move Jetbrains mono into regular font selector, allow it to be scaled 2025-01-13 22:04:44 +01:00
WerWolv
ae622e6d75 git: Merge WebAssembly build into main build artifacts script, add to releases 2025-01-12 23:08:09 +01:00
WerWolv
68fbff631f git: Fix github pages artifact name 2025-01-12 22:50:39 +01:00
WerWolv
6cdce75095 git: Upload artifact for ImHex Web build 2025-01-12 22:03:50 +01:00
WerWolv
f699e76c56 build: Fix comment causing issues with docker 2025-01-11 21:41:14 +01:00
WerWolv
a729329cd4 impr: Added missing [[nodiscard]]s 2025-01-11 21:40:42 +01:00
WerWolv
d5020ce9bb impr: Rename Jump To option to Follow Selection to avoid confusion with Go To 2025-01-11 21:40:26 +01:00
WerWolv
126868c251 fix: Hang when filtering for a large number of items in the pattern data view 2025-01-11 17:22:53 +01:00
WerWolv
b206e9fc95 fix: Copy-paste error with "Extend selection left" shortcut name 2025-01-11 16:42:00 +01:00
WerWolv
4b6ff68464 git: Fixed CI permissions 2025-01-11 16:28:29 +01:00
WerWolv
b23a0febb5 git: Added build provenance attestation for most artifacts 2025-01-11 16:17:27 +01:00
WerWolv
05ad547341 git: Use zstd to compress .deb builds 2025-01-11 15:57:42 +01:00
paxcut
f10af882a7 fix: Text Editor find option jumping to the wrong location (#2060)
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.
2025-01-09 18:39:00 +01:00
WerWolv
98f32ebcad impr: Made interactive help api easier to use 2025-01-09 18:34:39 +01:00
WerWolv
e2c302836f feat: Added support for scanning binaries for UTF-8 strings 2025-01-09 18:33:45 +01:00
WerWolv
f1d9642cf6 impr: Better color picker widgets in the settings 2025-01-07 21:46:26 +01:00
WerWolv
5c58e5b545 fix: Selection highlight color setting not working
Fixes #2059
2025-01-07 18:09:56 +01:00
WerWolv
803cb335e1 feat: Added interface accent colors 2025-01-07 00:06:52 +01:00
WerWolv
ae4dde8255 impr: Unlock frame rate in more cases to make the UI feel more responsive 2025-01-06 20:34:00 +01:00
WerWolv
cb34f68b1b patterns: Updated pattern language 2025-01-06 20:15:21 +01:00
WerWolv
96ef983cfb fix: ASCII column not getting highlighted anymore 2025-01-06 20:14:27 +01:00
WerWolv
d8c3d67dfe build: Disable romfs compression in web build 2025-01-05 21:25:28 +01:00
WerWolv
5de5153663 impr: Simplify hex editor class API 2025-01-05 21:24:13 +01:00
WerWolv
1e747b6831 patterns: Updated pattern language 2025-01-05 19:18:46 +01:00
WerWolv
fbe9d16073 build: Updated libromfs 2025-01-05 17:52:04 +01:00
WerWolv
d02c0073a0 build: Ignore pdb copy file errors 2025-01-05 15:27:54 +01:00
WerWolv
1090b9879c build: Make pdb copy operation happen at install time 2025-01-05 15:20:03 +01:00
WerWolv
5a6af976cd build: Rename output pdb file if necessary 2025-01-05 15:14:25 +01:00
WerWolv
55e39a5d30 build: Fix dwarf stripping logic 2025-01-05 15:00:45 +01:00
WerWolv
c9b1ddfb59 build: Updated libromfs 2025-01-05 14:56:16 +01:00
WerWolv
f7dd696ffc build: Silence stupid brew errors 2025-01-05 14:51:03 +01:00
WerWolv
70f210ac5d build: Updated libromfs 2025-01-05 14:37:39 +01:00
WerWolv
cad1c11f8b build: Updated dependencies 2025-01-05 14:17:54 +01:00
WerWolv
f7fa305e82 build: Generate pdb file for libpl, significantly reduce binary size 2025-01-05 12:06:32 +01:00
WerWolv
f96c51e854 impr: Added shortcut for Copy as -> Custom Encoding 2025-01-05 11:12:56 +01:00
WerWolv
c19705d3e5 git: Try to silence brew error messages again 2025-01-05 10:42:29 +01:00
WerWolv
1190511994 impr: Cleanup frame rate unlocking code 2025-01-04 23:43:10 +01:00
WerWolv
69ee7ef63c build: Updated libwolv 2025-01-04 23:42:56 +01:00
WerWolv
fc95e5a9a8 impr: Unlock frame rate when scrolling or focusing 2025-01-04 22:00:26 +01:00
WerWolv
6ecc495d43 feat: Added visibility toggle to hide bookmark highlighting 2025-01-04 21:40:18 +01:00
WerWolv
6e861001cf impr: Allow all highlights to overlap each other 2025-01-04 21:40:03 +01:00
WerWolv
c56af08c7e impr: Allow highlights of multiple overlapping bookmarks to render 2025-01-04 20:46:56 +01:00
WerWolv
e68abefe48 impr: Use info icon for more help hovers 2025-01-04 19:21:22 +01:00
WerWolv
fd0635cb82 fix: Hex editor right click menu not working on macOS 2025-01-04 19:08:37 +01:00
WerWolv
baa3cfb354 fix: User folders being added twice 2025-01-04 18:30:57 +01:00
iTrooz
aea9bab853 build: Make MacOS arm64 build use clang 19 (#2050) 2025-01-04 18:10:48 +01:00
WerWolv
48de609f53 impr: Added telemetry about whether ImHex runs on a corporate machine 2025-01-04 16:11:35 +01:00
WerWolv
71f4f87288 impr: Make sure init tasks always get executed 2025-01-04 16:11:05 +01:00
WerWolv
48b202c56b patterns: Updated pattern language 2025-01-04 15:38:20 +01:00
Nik
d975019a7b impr: Revamp frame rate limiting system to make ImHex feel less laggy in certain cases (#2049) 2025-01-04 15:35:19 +01:00
Nik
6009b5013b feat: Let ImHex use the native menu bar on macOS (#2048) 2025-01-04 15:35:06 +01:00
WerWolv
24979d7fbd impr: Other Providers -> Other Data Sources 2025-01-04 14:06:03 +01:00
WerWolv
b4bf42e377 fix: Unit test build error due to changed Provider::getTypeName() signature 2025-01-04 13:57:48 +01:00
WerWolv
f94819351a impr: Make maximum in-memory file size setting easier to use. Bump value to 512MiB 2025-01-04 13:56:20 +01:00
WerWolv
8da69c11d9 impr: Remove the word "Provider" from places where it doesn't fit 2025-01-04 13:28:35 +01:00
WerWolv
635a825095 fix: Signed/Unsigned comparison error 2025-01-04 13:03:38 +01:00
WerWolv
bbffdbf56f feat: Allow #pragma magic to index from the end of the data with negative addresses
Closes #2047
2025-01-04 12:49:14 +01:00
WerWolv
1c30533d19 fix: Off-by-one when calculating hashes of selected regions
Fixes #2046
2025-01-04 00:15:35 +01:00
WerWolv
dcd80fe6ad impr: Properly scale window on wayland 2025-01-03 15:09:06 +01:00
WerWolv
525ab8d945 fix: Settings not being saved correctly anymore 2025-01-03 14:07:09 +01:00
WerWolv
d8fb3f526a fix: Shortcut migration not working correctly in some cases
Fixes #2045
2025-01-03 10:16:22 +01:00
WerWolv
a55df1d111 fix: Exception being thrown when custom disassembler folders didn't exist 2025-01-03 00:15:52 +01:00
WerWolv
2cf32ba38d fix: Default smooth font not being scaled correctly 2025-01-03 00:15:28 +01:00
AlexGuo1998
c82907153e fix: Set LZMA decompressor memory limit to 1GiB (#2044)
<!--
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


![image](https://github.com/user-attachments/assets/5b9e6b07-464e-41f6-bdc7-f5b1cd351069)

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


![image](https://github.com/user-attachments/assets/04abf3ef-1d29-4846-bb41-214695c7d09c)

### 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.
2025-01-02 08:42:28 +00:00
WerWolv
165403da67 fix: ImHex freezing on AMD GPUs when resizing
Fixes #1842
2025-01-01 20:39:12 +01:00
WerWolv
0e4d94946e fix: Disable recent files on web build since they can't work there 2025-01-01 17:08:31 +01:00
WerWolv
9f9c5abf35 impr: Prevent window from being moved while hovering over items on macOS 2025-01-01 16:45:11 +01:00
WerWolv
6a3b10111f feat: Highlight main menu item when using a shortcut 2025-01-01 16:19:38 +01:00
WerWolv
0a55f4bf83 patterns: Updated pattern language
Fixes #2042
2025-01-01 11:36:04 +01:00
WerWolv
493d66d991 fix: Crash when using hex editor when provider == nullptr 2024-12-31 21:30:05 +01:00
WerWolv
268b495a29 fix: Make capstone use little endian by default 2024-12-31 21:17:19 +01:00
WerWolv
180f4926f8 impr: Make disassembly view contain data per-provider 2024-12-31 21:16:27 +01:00
WerWolv
c853349b78 impr: Force reset window decoration to expected value after exiting full screen mode 2024-12-31 21:04:09 +01:00
WerWolv
ee555e0da9 fix: Make sure WM_NCCALCSIZE never tries to sleep a negative amount of time
#1842
2024-12-31 18:06:31 +01:00
WerWolv
3dec4cc698 fix: Signed/Unsigned integer compare 2024-12-31 17:21:37 +01:00
WerWolv
d7b2b94cec impr: Reduce jittering when changing the number of hex columns 2024-12-31 17:04:32 +01:00
WerWolv
c9e88586aa feat: Added option to fit hex columns to screen width 2024-12-31 11:35:09 +01:00
WerWolv
1d641504b1 fix: Format string issues 2024-12-31 10:01:01 +01:00
WerWolv
655e068b9b impr: Added changed data information to diff view table 2024-12-31 00:47:32 +01:00
WerWolv
67a9f314cc impr: Added icons to more context menus 2024-12-31 00:45:47 +01:00
WerWolv
ff2b58e8a3 fix: Copy paste errors 2024-12-30 23:58:34 +01:00
WerWolv
a1482cb40e fix: Tooltips not being hidden when disabling hex editor highlights 2024-12-30 23:45:48 +01:00
WerWolv
89111059f9 feat: Added setting to disable hex editor highlights entirely 2024-12-30 23:24:59 +01:00
WerWolv
0ae823716a feat: Added a preview to the Edit -> Copy as options
Closes #2026
2024-12-30 23:16:11 +01:00
WerWolv
dab3f722e8 feat: Added "Jump to address" option to data inspector row context menu 2024-12-30 22:32:06 +01:00
WerWolv
0dc1af0747 feat: Added option to change radix of numbers in hex editor view 2024-12-30 21:00:43 +01:00
WerWolv
021206e052 impr: Added icons to pattern editor context menu 2024-12-30 12:18:55 +01:00
WerWolv
cb09cf3734 feat: Added context menu and next/previous buttons to the data inspector 2024-12-30 12:07:21 +01:00
WerWolv
f0525d6463 fix: Building issues with the web build 2024-12-30 10:10:38 +01:00
WerWolv
e22424ffa4 fix: Settings not being saved correctly on the web version 2024-12-29 23:53:23 +01:00
WerWolv
6e666c64e8 patterns: Updated pattern language 2024-12-29 22:42:32 +01:00
WerWolv
5f5f6ac539 feat: Added option to move selection back to hex editor footer
Closes #2024
2024-12-29 21:08:08 +01:00
WerWolv
3024c79f4f impr: Allow the favorite column in the pattern data view to be hidden 2024-12-29 20:38:51 +01:00
WerWolv
ba96d86dc2 impr: Properly align favorite icons inside of the buttons in the pattern drawer 2024-12-29 20:38:25 +01:00
WerWolv
40ec7195d1 patterns: Updated pattern language 2024-12-29 15:20:57 +01:00
WerWolv
f10dfa0c20 patterns: Updated pattern language 2024-12-29 14:40:51 +01:00
WerWolv
6a5473f6fe impr: Moved Windows DPI awareness to manifest file, added detached console allocation
Closes #1543
2024-12-28 23:47:42 +01:00
WerWolv
f79de6fbe8 fix: Web build not starting fully anymore 2024-12-28 22:48:06 +01:00
Nik
ec4ee3132b git: Added note about launching assertion failures when launching the AppImage (#2038) 2024-12-28 22:31:34 +01:00
WerWolv
1298f2b688 impr: Refactor previous commits to work with other environments too 2024-12-28 21:37:45 +01:00
WerWolv
534a2f1d28 impr: Apply framebuffer scaling to SVGs as well 2024-12-28 20:52:49 +01:00
WerWolv
c8e95cf3c3 impr: Keep default font at whole-integer sizes 2024-12-28 20:46:26 +01:00
WerWolv
c4918a963c fix: Default font not being scaled on macOS 2024-12-28 20:45:12 +01:00
WerWolv
bf6f738d2e impr: Make text look super pretty on macOS finally 2024-12-28 20:42:05 +01:00
Nik
1605904eb1 git: Updated more runners to Ubuntu 24.04 2024-12-28 16:49:33 +01:00
Nik
138517f116 git: Updated system requirements and compile info in the readme 2024-12-28 16:48:32 +01:00
WerWolv
d4a4cb2e80 fix: Crash when providing invalid version string to semantic version class
Fixes #2036
2024-12-28 15:59:13 +01:00
WerWolv
9a9dc328e3 build: Switch to custom lunasvg repo to allow offline builds 2024-12-28 13:39:07 +01:00
WerWolv
50eea0a4f1 impr: Replace Firacode with JetbrainsMono font 2024-12-28 12:43:34 +01:00
WerWolv
528a8b5b46 fix: Exception being thrown when getting version parts from invalid version 2024-12-28 11:45:05 +01:00
WerWolv
0db0bc53fa revert: Make pattern editor scroll bar look more like all other scrollbars 2024-12-28 00:39:10 +01:00
WerWolv
0297c267e9 impr: Display "ImHex" in title bar when null provider is open 2024-12-27 23:56:14 +01:00
WerWolv
5af85f24f6 impr: Allow command palette to be closed by clicking on the menu bar 2024-12-27 23:53:55 +01:00
WerWolv
5110a7578e fix: Rendering issues with text editor in bookmark view 2024-12-27 23:36:21 +01:00
WerWolv
5af28670f0 fix: Ctrl sometimes getting stuck when pressing ALT GR and other keys at the same time
#2019
2024-12-27 23:15:20 +01:00
WerWolv
efa2b781dd impr: Better create hash popup size 2024-12-27 23:14:39 +01:00
WerWolv
979f151181 fix: Don't show library plugins in --plugins subcommand 2024-12-27 20:06:17 +01:00
WerWolv
6f125f18c3 impr: Make pattern editor scroll bar look more like all other scrollbars 2024-12-27 20:01:00 +01:00
WerWolv
edba7051f0 impr: Make interactive tutorials select windows when they're highlighted 2024-12-27 19:41:45 +01:00
WerWolv
fa1ae8d746 fix: Tutorial highlights not working anymore correctly 2024-12-27 18:28:22 +01:00
WerWolv
a476617432 build: Fix remaining build issues 2024-12-27 00:02:37 +01:00
WerWolv
ffac13bfef disasm: Updated disassembler library 2024-12-26 23:28:38 +01:00
WerWolv
f877bf21ba fix: Warning on macOS about wrong format argument 2024-12-26 23:01:19 +01:00
WerWolv
4bc4882b1f disasm: Updated disassembler library 2024-12-26 23:00:59 +01:00
WerWolv
084c17dc26 fix: Missing endian setting in ARM64 disassembler 2024-12-26 22:39:57 +01:00
WerWolv
26c39d6822 fix: ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback -> ImGui_ImplGlfw_InstallEmscriptenCallbacks 2024-12-26 20:19:55 +01:00
WerWolv
aefc173227 fix: Wrong --reset-settings subcommand description 2024-12-26 20:05:07 +01:00
WerWolv
bf44a1cce6 feat: Added initial support for custom disassemblers 2024-12-26 20:04:45 +01:00
WerWolv
a76c6c653d impr: Refactor disassembler system to make it more modular 2024-12-26 18:41:34 +01:00
WerWolv
f11205bba7 build: Updated more dependencies 2024-12-26 14:41:43 +01:00
WerWolv
72d9c5019c build: Updated dependencies 2024-12-26 14:30:52 +01:00
WerWolv
58d66e3e97 fix: Added migration routine to fix shortcuts 2024-12-26 14:01:54 +01:00
WerWolv
43c88a2fab feat: Added system to handle version migrations 2024-12-26 14:01:46 +01:00
paxcut
9ce64ec6e1 fix: Pattern Editor console scroll jumping. (#2029)
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.
2024-12-25 18:51:58 +01:00
WerWolv
c749d6a7dc fix: Disable ImGui assert that causes random crashes on resize 2024-12-25 18:49:50 +01:00
WerWolv
f3e6d35c98 build: Updated ImGui glfw backend 2024-12-25 18:44:43 +01:00
WerWolv
0be539b8a5 feat: Added option to copy data as escaped string
#2026
2024-12-25 16:45:34 +01:00
WerWolv
0454a369e5 fix: Crashes when disassembling data
Fixes #2025
2024-12-25 16:36:53 +01:00
WerWolv
010025cbfa fix: Wrong localStorage key for achievements 2024-12-25 16:21:38 +01:00
WerWolv
61cae0a9f8 fix: Missing emscripten include 2024-12-25 16:19:50 +01:00
WerWolv
9e83d9e68c fix: Disable browser ctrl + S in web build 2024-12-25 16:17:51 +01:00
WerWolv
248acd5e26 fix: Properly save achievements in web version 2024-12-25 16:17:33 +01:00
WerWolv
42c1f5601a fix: Saving files in web version not working correctly 2024-12-25 15:57:54 +01:00
WerWolv
9c1a673047 impr: Force update all installed content store items after an update 2024-12-25 14:29:41 +01:00
WerWolv
99b90f90ac fix: Unused variable in wasm build 2024-12-25 13:03:55 +01:00
WerWolv
6ead8d8b49 fix: Certain shortcuts not being captured by ImHex Web 2024-12-25 12:36:06 +01:00
WerWolv
9b12232e9f revert: Broken fix for cursor not being set at end of line 2024-12-25 01:41:50 +01:00
WerWolv
c1ed1baaad fix: Shortcuts not working correctly in Web build 2024-12-25 01:34:11 +01:00
WerWolv
ab34312089 fix: Clicking past end of line in text editor putting cursor before last character 2024-12-25 01:33:41 +01:00
WerWolv
a25d92fbb7 build: Bumped version to 1.37.0.WIP 2024-12-25 01:33:36 +01:00
WerWolv
6005af1595 build: Bumped version to 1.36.0 2024-12-24 13:43:04 +01:00
WerWolv
9a4329807a patterns: Updated pattern language 2024-12-24 13:07:26 +01:00
WerWolv
8e01da4c12 lang: Fixed settings language string in hashes view 2024-12-24 13:06:38 +01:00
WerWolv
eb8ea520c7 build: Make ImGui use old CRC algorithm 2024-12-24 11:09:45 +01:00
WerWolv
512fcd361b impr: Modernize the disassembler, hashes and yara view 2024-12-24 10:57:09 +01:00
WerWolv
aad6f6bcbe build: Updated ImGui to v1.91.6 2024-12-24 00:37:04 +01:00
WerWolv
0af21505d7 git: Add retry mechanism for creating dmg on x86 mac 2024-12-24 00:00:22 +01:00
WerWolv
2ae69e8e72 feat: Allow command palette to work with previous results 2024-12-23 23:42:45 +01:00
WerWolv
9274fac8e1 build: Updated libwolv
Fixes #2007
2024-12-23 23:24:38 +01:00
WerWolv
e2f82c60e6 fix: Crash when using text editor as last item in a window 2024-12-23 23:17:19 +01:00
WerWolv
bfddf24204 impr: Added hints to various input fields 2024-12-23 23:16:55 +01:00
WerWolv
382599dcf6 fix: Better icon text input width calculation 2024-12-23 23:16:35 +01:00
WerWolv
5f2c07f2d8 fix: Icon text inputs not being the same length as other items 2024-12-23 21:48:47 +01:00
WerWolv
914024c0b5 impr: Added note about adding new data inspector row 2024-12-23 21:47:16 +01:00
WerWolv
c5d3387962 impr: Replaced centered text notes with overlays 2024-12-23 21:30:31 +01:00
WerWolv
7cc99c6fc9 impr: Added better notes to the settings tabs in the pattern editor view 2024-12-23 21:26:22 +01:00
WerWolv
a29b502a33 impr: Made pattern editor resize separator taller 2024-12-23 20:15:50 +01:00
paxcut
20cb74364f fix: Jumpy text editor scrolling (#2023)
Two major improvements:
1) see through scrollbars when not hovered.
2) un-scrollable line numbers.

Also enlarged display region by eliminating padding. There is still a
problem with lines jumping when the scrollbar is dragged but it is
limited to one line and probably due to floating point error for scroll
bar number. It is much less noticeable than the previous jumping which
could involve several pages.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-12-23 20:14:42 +01:00
WerWolv
1c5a50c8d8 impr: Added better file open error messages to the file provider 2024-12-23 14:07:35 +01:00
WerWolv
470523cc86 fix: Jittery scrolling in Text Editor 2024-12-23 11:44:34 +01:00
WerWolv
f6bc3d4650 impr: Replace more assert() calls with IM_ASSERT() 2024-12-23 11:22:20 +01:00
WerWolv
41b1228d31 fix: Make sure all text editor members are correctly initialized 2024-12-23 11:21:39 +01:00
paxcut
2cb4462274 impr: Better top margin handling for text editor. (#2021)
The top margin changes when popups block some portion on the screen.
Previously it was implemented adding blank lines at the bottom which
created problems if the windows was scrolled all the way to the bottom
and the popups were issued. The newer implementation doesn't use spaces
and simply resets the top of the window to be higher making the popup
interaction with the window more natural (no text disappears on the
lines the popup overlaps the text). changes can be identified form the
variables mTopMargin,mOldTopMargin and mNewTopMargin.

Unfortunately those changes revealed problems in cursor navigation that
needed to be addressed. Namely, the window will scroll up and down on
the line before last/second line at the top and similar problems for the
left and right. Those changes correspond to the function
EnsureCUrsorVisible()

Fixing those reveled yet more problems with scrolling past the end of
the file using the keyboard which required adding some more variables
and functions to support the correct handling, You find those changes in
the function MoveDown.

I also renamed some variables that had the wrong casing and fixed the
pasting but that is missing one line.
2024-12-23 10:35:53 +01:00
WerWolv
810cd40ccd impr: Replace strerror with C++ functions 2024-12-23 01:42:06 +01:00
WerWolv
f931beb49a impr: Make inserting bytes at the start of the file with insert mode work better 2024-12-23 01:33:52 +01:00
WerWolv
1c3dfc9b2f fix: ID collision in Jump To menu 2024-12-23 01:00:58 +01:00
WerWolv
a1d4545e29 fix: Don't allow negative regions in region widgets 2024-12-23 01:00:41 +01:00
WerWolv
8865db2007 lang: Added missing memory file rename key 2024-12-23 01:00:13 +01:00
WerWolv
d2056d9409 fix: Crash on exit 2024-12-23 00:59:55 +01:00
Nik
74e74ddc38 git: Make CodeQL CI use ninja 2024-12-23 00:06:59 +01:00
WerWolv
5fcb737559 fix: Only update widgets of settings that were changed
Fixed crashing on exit and speeds up settings writes
2024-12-20 21:23:19 +01:00
Nik
9303025427 git: Just disable coverage generation for now 2024-12-18 22:56:44 +01:00
WerWolv
680985fc13 git: Update gcovr filters 2024-12-18 21:57:40 +01:00
WerWolv
5a360eb614 patterns: Updated pattern language 2024-12-18 20:33:05 +01:00
paxcut
4a74bd78fd fix: Console either printed no newlines or printed extra ones. (#2016)
The reason for the error were the text preprocessor added to deal with
tabs was created to process entire files, not just lines or words. In
that context it cleaned trailing new lines if any existed but in the new
role that's not only unwanted but erroneous.

### Problem description
After that was fixed the console started to add two empty lines between
each output line. When splitting a string using new lines you need to
not add a new line to the last line created. Even if the text ends in an
end line, the split screen code is set to not discard empty lines.

### Implementation description
The fixes are straightforward.
2024-12-18 20:19:18 +01:00
WerWolv
0f53656952 build: Small ImPlot3D fixes to make it build on all platforms 2024-12-18 20:18:27 +01:00
WerWolv
9ca40d3651 build: Added ImPlot3D 2024-12-17 23:51:45 +01:00
WerWolv
ab12503f62 patterns: Drastically improved time it takes to find favorites 2024-12-17 23:37:39 +01:00
paxcut
b446d7fd4a impr: Make scrolling in pattern editor feel less janky (#2009)
I have implemented a fix that makes the scrollbars behave like they do
in VScode. Vertically you can scroll past the end of the file until only
the last line can be seen at the top. The horizontal bar behaves as if
every line was the same length which is the length of the longest line
in the file. Not only this creates a better user experience, but it also
fixes the annoying flicker that occurs when scrolling through large
files. Also, I have switched all the old draw calls to render text to
regular TextUnformatted calls which adds extra stability to the
resulting display.

To implement the behavior I added a dummy widget with the desired
dimensions.
2024-12-17 22:44:40 +01:00
WerWolv
fd46d85762 git: Another attempt fixing gcovr 2024-12-17 22:42:48 +01:00
WerWolv
fa421afb00 git: Ignore all gcov errors related to missing files 2024-12-17 22:07:16 +01:00
paxcut
a79d3e28ca fix: Crashes when getting tabs into text editor (#2008)
This time it may be for good. 


### Implementation description
As requested I added the preprocessing functionality into the pattern
editor. I had to duplicate a few functions and update the c++ library to
version 20. but now I can make sure the pattern editor doesn't see a tab
again. I also removed the preprocessor from where it was before because
it is not needed anymore. The changes were tested using a file that used
tabs for all its white space. The file was pasted into the pattern
editor and imported as well. I both cases no crashes occurred and the
files had no tabs on them.
2024-12-17 21:36:00 +01:00
WerWolv
fbb4f65735 patterns: Updated pattern language 2024-12-17 21:34:18 +01:00
WerWolv
00c62c90f6 git: Try to fix coverage scan 2024-12-17 21:33:53 +01:00
WerWolv
384aa6e6a9 fix: Narrow to wide type compare in loop in timestamp visualizer 2024-12-16 22:17:58 +01:00
WerWolv
1c755249ec git: Use ninja for building everything 2024-12-16 22:10:22 +01:00
WerWolv
2c303b5bf2 build: Actually fixed unit tests 2024-12-16 21:47:40 +01:00
WerWolv
415e3b4a93 impr: Added commit hash and branch to nightly popup on welcome screen 2024-12-16 21:37:34 +01:00
WerWolv
8d9b056c8c build: Fixed building of unit tests 2024-12-16 21:37:11 +01:00
WerWolv
a527a7f0b0 patterns: Updated pattern language 2024-12-16 21:32:19 +01:00
WerWolv
d78d955d11 impr: Better ellipsis usage in menus 2024-12-16 21:27:57 +01:00
BioTheWolff
9375a60cd9 feat: Implement paste behaviour popup when pasting over one-byte regions (#2004)
### Problem description
This PR implements the feature request described in #1995, that
describes a problem with the `Paste` vs `Paste all` commands. Users
could be thrown off by having `Ctrl+V` act as a simple "Paste over
selection", whereas it's generally accepted as a "Paste all".

### Implementation description
<!-- Explain what you did to correct the problem -->
This PR introduces a new setting, called "Paste behaviour" (under the
"Hex Editor" category).
This setting has three values:
- `Paste over selection`: the current implementation for ImHex. Pastes
only over the selection region, in this case pasting only one byte;
- `Paste everything`: allows ImHex's `Paste` to behave like a `Paste
all` when selecting one-byte regions;
- `Ask me next time`: prompts the user for a choice of behaviour
(default value).

*Note: as users generally use `Paste all` when selecting one-byte
regions, calling `Paste` when selecting over two or more bytes is not
affected by this change, and will still behave like the usual `Paste`
command.*

When selecting a one-byte region, and calling the Paste command, users
that have not defined a preferred behaviour in the settings will be
prompted to choose one, using a brand new popup. The popup also allows
the user to cancel, which will not change the settings' value, and will
cancel the paste action altogether.

### Screenshots
The new popup:

![image](https://github.com/user-attachments/assets/2b0fd532-d4e7-4209-9dd7-8a79278692ea)

The new setting:

![image](https://github.com/user-attachments/assets/2644c35e-7332-422e-8fae-ae8ad0507126)

### Additional things
I'm not very good with long descriptions, so I'm open to any suggestions
regarding the text that is included in the popup!
I do think however that we should keep a hint indicating that `Paste
all` is always an option, which could solve the issue altogether for
very new users.

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
Co-authored-by: Nik <werwolv98@gmail.com>
2024-12-16 20:35:48 +01:00
WerWolv
bb99b9a0ef fix: Shortcuts acting as duplicates in settings 2024-12-16 20:26:04 +01:00
WerWolv
313e59d7f9 fix: Shortcuts applying to multiple views at once 2024-12-16 20:14:26 +01:00
WerWolv
e34e0e62f2 patterns: Fixed json builtin types throwing non-patternlanguage exceptions 2024-12-15 23:13:43 +01:00
paxcut
212f75f1cb fix: Tabs messing up content of text editor (#2005)
<!--
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 -->
2024-12-15 23:08:26 +01:00
WerWolv
a07c79efcb fix: Pattern editor shortcuts being set to use CTRL on macOS 2024-12-15 22:39:24 +01:00
WerWolv
89090b25e3 impr: Various shortcut improvements 2024-12-15 21:44:43 +01:00
WerWolv
721164e562 fix: Deinitialization order 2024-12-15 21:44:36 +01:00
BioTheWolff
b8ba980a20 fix: Chinese (Simplified) translation showing up twice (#2006)
### Problem description
As described in issue #1841, there was a duplicate on the `Chinese
(Simplified)` translation.
After closer inspection, this came from an i18n file (Script loader,
specifically) having a bad ISO code (`zh_CN` instead of the expected
`zh-CN`).

This also caused a big impact on end users, as loading the latter
(`zh_CN`) would cause the whole UI to be displayed in English (the
fallback language), and only the script loader being translated into
Chinese.

### Implementation description
Fixed the i18n code in the Script loader file.

### Additional things
Closes issue #1841

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
2024-12-15 17:20:04 +01:00
WerWolv
79ded38434 patterns: Updated pattern language 2024-12-15 14:12:27 +01:00
WerWolv
f52db884a9 lang: Update casing of next provider / previous provider options 2024-12-15 12:16:57 +01:00
WerWolv
ee4bb33b0a impr: Display sub menus for shortcut settings 2024-12-15 11:54:10 +01:00
WerWolv
caf8fa8e25 impr: Show byte relationship diagrams side by side if there's enough space 2024-12-15 11:46:54 +01:00
WerWolv
c46dea4c9e impr: Update settings menu values when settings are changed 2024-12-15 11:12:56 +01:00
WerWolv
002b7b4f87 impr: Make Copy as ASCII string use ALT + C to be more consistent 2024-12-15 11:02:34 +01:00
WerWolv
0a6a8c671f impr: Better naming for various menu entries 2024-12-15 11:02:20 +01:00
WerWolv
36014b706d fix: Wrong header location in disassembler view 2024-12-15 10:52:11 +01:00
paxcut
df5e01d4eb impr: Better 3D Visualizer error messages, wrap long visualizer errors (#1969)
### Problem description
Long error messages were forcing the width of the window to span the
entire screen.

### Implementation description
The fix was sending the long message to the log and outputting a short
message to the 3d visualizer window.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-12-15 10:12:14 +01:00
WerWolv
c6f1525f55 git: Silence last brew call 2024-12-15 10:01:24 +01:00
WerWolv
5511259f2d git: Updated more workflows 2024-12-15 00:44:32 +01:00
WerWolv
f2ea7ca5d1 git: Silence brew github actions annotations 2024-12-15 00:28:22 +01:00
WerWolv
6184bbeae2 build: Updated libwolv 2024-12-14 23:55:04 +01:00
WerWolv
21506578f5 impr: Removed more instanced of codecvt 2024-12-14 22:39:07 +01:00
WerWolv
f39f395393 impr: Replace codecvt with libwolv conversion functions 2024-12-14 22:20:48 +01:00
WerWolv
ed0a94659e impr: Added load and base address to instruction pl types 2024-12-14 21:52:19 +01:00
WerWolv
7f75706584 impr: Replace hex::unused with std::ignore 2024-12-14 21:35:54 +01:00
WerWolv
3f316e42f2 build: Remove unavailable warning flags from gcc builds 2024-12-14 21:35:42 +01:00
WerWolv
4a331c0331 git: Replace gcc-toolset-12 with gcc-toolset-14 fir EL9 runner 2024-12-14 20:36:32 +01:00
WerWolv
6a28de100c impr: Rename font definition files 2024-12-14 20:36:09 +01:00
WerWolv
992f18b94b impr: Optimize build times a bit 2024-12-14 19:15:49 +01:00
Nik
040a606b39 feat: Added various custom built-in types to the pattern language (#1991) 2024-12-14 16:52:36 +01:00
BioTheWolff
13e079d1b8 feat: Add capability to paste as string literal in files (#1998)
### Problem description
As suggested in #1904, ImHex could benefit from having the capability of
pasting text directly into the editor.
This also complements the "Copy as... ASCII string" capability already
implemented in the software.

### Implementation description
A new shortcut called `Paste all as string` (to resemble the naming of
the `ASCII string` copy option) now allows to paste plaintext directly.
This shortcut is mapped to the `CTRL + ALT + SHIFT + V` keybind.

Internally, a new flag called `asPlainText` has been added to the
`pasteBytes` function, to minimise code changes and streamline code
readability.
The buffer is a simple type cast of the clipboard, without any
modification applied, which is then handed to the provider's `write`
function.

### Screenshots
The new shortcut is visible in the menu, just below the other paste
options:

![image](https://github.com/user-attachments/assets/41a2a512-5c39-4984-bab6-114c58266351)

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
2024-12-14 16:52:14 +01:00
Roman
d9a7f40eb4 fix: Shortcuts not being disabled correctly when menu items are disabled (#1992)
Fix crash on UNDO/REDO shortcut press when in "title screen"

### Problem description
ImHex crashes when (by default CTRL + Z/Y) undo/redo is pressed when on
"title"/"starting" screen (no file open, tested on Windows release build
and Linux [WSL] from-source build).

This is due to the shortcut's callback being called even if the
`provider` is `nullptr`. (see `createEditMenu` function).
Theoretically, this is prevented by the `enabledCallback` function
passsed to `addMenuItem`. In this case, though,
`addMenuItem` correctly propagates `enabledCallback` to menu item
creation but does not pass `enabledCallback` to
shortcut creation. Thus, when handling shortcuts, `enabledCallback` is
not used at all and the shortcut's callback
can be called in contradiction with its preconditions. (specified by
`enabledCallback`)

### Implementation description
The implementation wraps the callback in a check that decides whether
the shortcut is enabled or not.

(see changed files)
```c++
        auto callbackIfEnabled  = [enabledCallback, function]{ if (enabledCallback()) { function(); } };
```

This function is then passed along instead of the `function` (shortcut's
callback).

Alternatively, we can check for `nullptr` in the callback directly. This
would require modification of `createEditMenu`'s contents.
(I did not choose this implementation because I do not think it
addresses the root of the issue).

### Screenshots
None

### Additional things
I'm not sure how big of a deal it is but I am unsure whether I can
capture (`[enabledCallback, function]`) by reference or not.
2024-12-14 16:51:40 +01:00
paxcut
8d123da847 feat: Added goto line popup to text editors (#1984)
Since the popup is fairly small I opted for a straight addition parallel
to the find/replace. To make code more clear the functions that create
each popup were coalesced and made their interface simpler. That forced
a reorganization of the data processing which translates to a larger
number of changes than usual. Most of those changes are just moving some
action from one function to another.

The old method to identify popups using the size and position of the
window was dropped in favor of one based on child windows and using
their names for a much easier and robust identification.

Added specialized functions to text editor to jump to a line or to given
coordinates with a simple interface that simplifies older code that
performed the same task.

Because this PR modifies heavily the same code as the previous PR (1983)
it is also included here to make merging easier.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-12-14 16:50:45 +01:00
Nik
093310a9e5 git: Updated CI to latest available compilers and distros (#2003) 2024-12-13 00:07:46 +01:00
WerWolv
21b315b97e impr: Added image load and image base address to disassembler
#1994
2024-12-10 20:33:28 +01:00
Nik
c70cc3a6f1 git: Disable AppArmor to make fedpkg not fail anymore (#1997) 2024-12-10 13:34:39 +01:00
WerWolv
1e71d8afc0 feat: Added Disassemble selection option to the Edit menu
#1994
2024-12-09 21:35:08 +01:00
WerWolv
cb6b74b269 fix: Use after free when deleting data processor nodes with errors 2024-12-09 14:40:07 +01:00
WerWolv
a1e399aa1a fix: Use after free in Text Editor when copying ErrorHoverBoxes 2024-12-09 14:39:46 +01:00
WerWolv
e1dfdd9400 fix: Missing include 2024-12-09 00:05:36 +01:00
iTrooz
6ab2e81f1c chore: Add documentation about popup opening 2024-12-06 23:40:05 +01:00
paxcut
cf09029847 feat: Added clickable links to error messages in the pattern editor (#1988)
Errors printed in the console can be clicked to have the cursor jump to
the source code line where the error is at.

The mouse cursor changes its shape to indicate which parts of the error
message can be clicked on the console. When the cursor jumps, the text
editor takes the focus away from the console and it scrolls the window
to make the line with the error is visible if it isn't. This code uses
the function created for the go-to PR but adds code to switch focus to
the target. When the codes are merged please keep both the part that
jumps the cursor and the part that sets the focus.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-12-06 22:45:36 +01:00
WerWolv
d02e170dac fix: Build issue on systems where size_t is not u64 2024-12-06 22:03:12 +01:00
WerWolv
2b715bb0de impr: Batch fills into larger chunks 2024-12-06 10:15:32 +01:00
BioTheWolff
2dcaf2c77b fix: Various achievements issues (Edit the Hex, ROM Hacks) (#1985)
### Problem description
As described in #1846:
- the `Edit the Hex` achievement doesn't unlock when it should
- the `ROM Hacks` achievement is not using event-driven architecture
(the functions call `unlockAchievement` themselves)

### Implementation description
Firstly, for the `Edit the Hex` achievement:
- replaced the old event listener on `EventPatchCreated` with a listener
on `EventProviderDataModified`, which picks up bytes changes
- ensured the provider data change comes from a File provider, else
unlocking the achievement wouldn't make sense
- *Note*: a discovered side effect is that the "Fill" function modifies
the provider byte per byte (with a for loop)
- there is no use in testing the size of the data change, as it is
always 1 byte
- the Fill function could probably be reworked to fill in whole regions
at a time?

About the `ROM Hacks` achievement:
- implemented the new, still unused `EventPatchCreated` event.
- signal signature is `const unsigned char *, u64, const IPSKind`:
buffer pointer, buffer size, and IPS kind (IPS/IPS32)
- make use of the `::post` and `::subscribe` methods on said event to
unlock the achievement
- **WARNING::behaviour change**: the event's `post` signal has been
moved in the success branch of the IPS generation condition, meaning
that achievement will only unlock if IPS patch export has worked. I felt
it would make more sense than unlocking an achievement on an error, if
there was any to raise.

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
2024-12-06 00:36:42 +01:00
BioTheWolff
1b9f4f33de feat: Added export disassembler results to ASM file (#1987)
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
This PR implements the feature request #1781, that suggests adding a
button to export disassembled instructions into an ASM file.

### Implementation description
This adds a button to export the current disassembled instructions to an
ASM file. Said file is suffixed by an `.asm` extension if not specified
at file creation.

*Note: the file is written to for every `Disassembly` item in the
vector, as it was the easiest and most memory-conservative way of doing
it.*

The file creation task is implemented based on IPS patch exports, so it
fits the same pattern.
A `ToastError` is raised when the ASM export could not complete
successfully.

Translations have been implemented for both `en_US` and `de_DE` for the
two new keys:
- `hex.disassembler.view.disassembler.export`: file export button
- `hex.disassembler.view.disassembler.export.popup.error`: error popup
text

### Screenshots
The button is disabled when the disassembler is working, or when the
disassembly vector is empty.

Here is a complete breakdown of the visual changes:

![image](https://github.com/user-attachments/assets/af0ce701-9d77-45f1-9a5a-90d68d00bb0d)

### Additional things
As expected, the exporter writes every item's `mnemonic` and `operators`
to the file, producing an output like this:

`example.asm`
```asm
.byte 0x7f, 0x45, 0x4c, 0x46
andeq r0, r1, r2, lsl #2
andeq r0, r0, r0
andeq r0, r0, r0
eorseq r0, lr, r3
andeq r0, r0, r1
andeq r1, r0, r0, asr #32
andeq r0, r0, r0
andeq r0, r0, r0, asr #32
```

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
2024-12-05 23:04:38 +01:00
Justus Garbe
3c73f88a52 fix: AES ECB mode in Data processor not working at all (#1986)
Fix the AES ECB mode in the data processor along with some other misc
fixes:
- Fixed nullpointer node not working
- Fixed crypto module incorrectly using mbedtls api
- Fixed crypto module ignoring mbedtls errors
- Fixed silently ignoring of errors in AES node
2024-12-05 20:56:43 +01:00
paxcut
8acdc19be4 fix: Pattern Editor context menus being entries greyed out when they shouldn't be (#1983)
Some context menu entries that were available as shortcuts were greyed
out. This PR aims to fix them and improve how context menus work for the
text editor and the console. The improvements include:
- automatic focus on right click
- automatic selection on right click. If selected text is right-clicked
then copy, cut and find will use the selection, if no selection is
clicked but there is text were right-clicked, then the word will be
selected and used. If right-clicking empty space copy and cut will be
greyed out and find will start empty.
- similar functionality now exists for the console as well except the
menu has fewer options due to it being read-only.
- added esc to close console context menu
2024-12-05 19:34:51 +01:00
WerWolv
22252d9044 fix: Patterns in pattern data view not being editable in providers that are not writable from the start 2024-12-05 16:37:31 +01:00
WerWolv
5948a74ad1 fix: Multiple memory corruption issues 2024-12-05 16:36:27 +01:00
alexkar598
e46d9d7650 fix: HexII visualisation does not allow hex characters in the edit field (#1982)
### Problem description
At the moment, attempting to edit files using HexII data visualization
is impossible as the editing fields only allow numeric characters but is
interpreted as a hex value

### Implementation description
I yoinked the params used for the hex visualization edit field. 

### Screenshots

![image](https://github.com/user-attachments/assets/2d61bf61-9893-4cfb-a2bf-6ff954aef903)

### Additional things
Ideally this should instead accept the format used by HexII, but I have
what scientists describe as a skill issue and this at least makes it
possible to use HexII without switching back to hex for editing.
2024-12-03 23:05:00 +01:00
Justus Garbe
813276c907 feat: Add constant data input to buffer node (#1981)
Added a hex data input field to the buffer node in the data processor.


![image](https://github.com/user-attachments/assets/a98e1174-7d35-4130-b9f7-9ef5d0703bc7)
2024-12-03 23:03:04 +01:00
BioTheWolff
7032473ecf impr: Added MIME types for project files on UNIX systems (#1980)
<!--
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 -->
This PR addresses issue #491 regarding the inability to open ImHex
project files (`.hexproj`) directly from various UNIX Desktop
Environments.

_NB: This PR's scope is limited to UNIX systems, as I have no access to
MacOS systems and could not find a way to automatically create file
associations on Windows._

### Implementation description
<!-- Explain what you did to correct the problem -->
In order for project files to be recognised as such, we need to create a
new MIME type. According to [RFC 6838 section
3.2](https://www.rfc-editor.org/rfc/rfc6838#section-3.2), additional
application MIME types should be defined with a vendor prefix.
_NB: This is preferred over the deprecated `x-` prefix, although RFC
6838 states that the vendor should be "a well known producer"_

This PR proposes a new mime type for ImHex project files:
`application/vnd.imhex.proj`, and associates it with the file format
`*.hexproj`.

It also implements small changes in the Arch Linux and RPM builds, in
order to correctly ship the MIME XML file during installation.

### Additional things
<!-- Anything else you would like to say -->
The implemented change has been manually tested in the following UNIX
systems and graphical environments:
- Arch Linux, with Gnome 47.2
- Arch Linux, with XFCE4
- Fedora 41 Workstation Edition, with Gnome 47.0
- Fedora 41 Plasma, with KDE Plasma 24.08.2
- Ubuntu 22.04.5, with Gnome 42.9

Which tests the functionality of the following build types:
- Arch Linux's `.zst` packages
- Debian `.deb` packages
- RPM packages

For Arch Linux and RPM packages, this has been tested to ensure that
post-installation hooks (such as regeneration of the MIME database) is
correctly executed (which it is). No further changes than those
implemented in the PR are needed.

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
2024-12-03 23:02:40 +01:00
WerWolv
807f1fb561 patterns: Updated pattern language 2024-12-02 21:16:35 +01:00
WerWolv
296f80ffe5 fix: Data information sections getting duplicated in NullProvieders 2024-12-02 21:16:20 +01:00
paxcut
d45e0d1cac impr: Replace all asserts with IM_ASSERT in the Text Editor (#1979)
All asserts in TextEditor.cpp were replaced with IM_ASSERTs so that if
they are hit ImHex won't crash and give a nice popup message instead.
2024-12-02 20:21:57 +01:00
WerWolv
4b8f9984d5 fix: Get rid of ranges again because still not all compilers support it 2024-12-02 20:21:15 +01:00
WerWolv
7623610704 build: Updated dependencies 2024-12-01 23:24:57 +01:00
WerWolv
a7fe384a31 feat: Added entropy drop/spike annotations to the entropy graph 2024-12-01 22:27:04 +01:00
WerWolv
485ce887ea patterns: Updated pattern language 2024-12-01 17:38:59 +01:00
Nik
2a0bb79513 fix: Potential overflow when calculating audio sample index
Fixes
[https://github.com/WerWolv/ImHex/security/code-scanning/223](https://github.com/WerWolv/ImHex/security/code-scanning/223)

To fix the problem, we need to ensure that the multiplication is
performed using a larger integer type to avoid overflow. This can be
achieved by casting one of the operands to `u64` before performing the
multiplication. This way, the multiplication will be done in the larger
type, preventing overflow.

We will modify the line `index += frameCount *
device->playback.channels;` to cast `frameCount` to `u64` before the
multiplication.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-12-01 16:07:24 +01:00
paxcut
21ae88702f fix: Empty text editor has no cursor. (#1976)
Even if focus is given to the pattern editor the cursor will not show
until the editor contains printable chars.

### Problem description
I was using the wrong condition to enter the loop that skipped the
default empty document.

### Implementation description
The fix was to check if there are lines of text that need to be
processed even if they are empty.
2024-12-01 09:58:37 +01:00
BobSmun
0ff1bb392c fix: CRC64 parameters being limited to 32bit (#1975)
This addresses #1974
2024-11-30 18:35:03 +01:00
WerWolv
01af2f364c patterns: Updated pattern language 2024-11-30 13:49:27 +01:00
paxcut
a639dddd19 impr: Turned static variables into member variable in the Text Editor (#1973)
to avoid potential problems in the future if opening several popup
windows at the same time becomes possible.
2024-11-29 20:44:56 +01:00
WerWolv
71ec6c5061 fix: Separator stride setting displaying incorrect values 2024-11-29 20:44:04 +01:00
WerWolv
8c4c4f5e8b impr: Hide segment number in hex editor when holding down shift 2024-11-29 20:43:37 +01:00
WerWolv
2c2d3b2de3 feat: Display visualizers in pattern tooltips 2024-11-29 20:23:36 +01:00
WerWolv
caae5c9711 fix: Move visualizer drawer to correct library 2024-11-29 17:37:02 +01:00
paxcut
72822d03aa fix: Stereo sound visualizations (#1970)
Even tough the sound visualizer has `channels` as one of its parameters
it wasn't using it properly.

### Problem description
The biggest problem is that at each frame the index was being advanced
per channel frame_count increments. The number of channels also
determines how many graph will be needed to display the graphs of the
visualized sound files. Besides these two problems there were many
others like incorrect playback time, cracking audio, etc. which will not
be mentioned.

### Implementation description
To sample the signal a channel sampler was created based on the one used
previously that returns as many sampled signals as there are channels.
This PR aims hopefully at fixing all the problems encountered, and it
has been tested extensively using `Audacity` exported samples to ensure
the visualizer fidelity on playback and graph appearance.

### Screenshots

![image](https://github.com/user-attachments/assets/03453860-693f-4af4-b6c6-e828a102c389)
2024-11-29 17:22:22 +01:00
paxcut
9de3dd89c5 feat: Added support for inline visualizers in custom data inspectors (#1966)
### Problem description
This PR aims at making inline visualizers work on the data inspector so
that more rgb encodings can be added as custom pattern language
inspector rows. This was never setup to work because the inline
visualizer rendering function was a private member function.

### Implementation description
In order to be accessible from the inspector class the rendering
function was made public.

### Additional things
Missing still is the tooltip to make it behave like other color entries.
2024-11-29 17:20:28 +01:00
dependabot[bot]
bcb69b9855 git: bump dawidd6/action-download-artifact from 3 to 6 (#1972)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 3 to 6.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-29 13:55:41 +01:00
paxcut
6d2761f141 feat: Added multiline search/replace and fixed various crashes. (#1911)
### Problem description
Previous implementation ignored everything after the first newline.
Other changes include:
- Added isEmpty() function that checks if editor has no content.
- replaced asserts with default behavior to avoid unneeded crashes.
- fixed off by one error in DeleteRange()
- some crashes occurred because readily available corrective actions
were not being taken. For example start/end being -1 in DeleteRange().
- At the heart of search/replace is the ability to translate from
indices into the text string to line/column coordinates used for
everything. To this end a function (StringIndexToCoordinates) was added
to do the translation taking utf-8 chars into account. This made the
recently added Utf8BytesToChars function unneeded, so it was removed.
- Removed commented out code that is not useful anymore. Also removed
tooltip code which is also unused.
- Removed unused parameter wrapAround to FindNext().
2024-11-29 09:37:05 +01:00
WerWolv
05c25b6aff patterns: Updated pattern language 2024-11-28 21:27:02 +01:00
WerWolv
9be9eb90f6 feat: Added hex editor segment separators 2024-11-28 21:26:55 +01:00
WerWolv
71f2f3a5fc patterns: Updated pattern language 2024-11-27 20:44:14 +01:00
WerWolv
862b1d407c patterns: Updated pattern language 2024-11-26 21:27:09 +01:00
WerWolv
5da0da48c8 build: Fix building for webassembly 2024-11-25 00:08:08 +01:00
WerWolv
3f1a51e350 patterns: Updated pattern language 2024-11-24 23:48:13 +01:00
WerWolv
d167e43252 impr: Optimization for searching for favorite and group patterns 2024-11-24 23:21:23 +01:00
WerWolv
fe9eecd031 build: Updated ImGui to v1.91.5 2024-11-24 18:55:56 +01:00
WerWolv
ded8cff415 build: Update to macOS 13 in more places 2024-11-24 15:51:22 +01:00
WerWolv
3497716a00 git: Bumped macOS runners to macOS 13 2024-11-24 15:33:55 +01:00
WerWolv
c78b4a3343 patterns: Updated pattern language 2024-11-24 15:16:06 +01:00
WerWolv
17359be58a build: Fixed remaining build issues 2024-11-24 14:16:48 +01:00
paxcut
382a62343d fix: Fixes for breakpoints (#1923)
WARNING: this PR won't compile unless [PR 132 from pattern language
repository](https://github.com/WerWolv/PatternLanguage/pull/132) is
merged first. Some changes here are shared by at least another PR to
this repository but there should not be any conflicts as the shared
changes are identical.

### Problem description
fix: Editing patterns with breakpoints sets behaves unexpectedly. As a
simple example, set a breakpoint and insert a blank line somewhere
before the breakpoint location. The breakpoint will appear to move but
in reality it hasn't. To see this set another breakpoint elsewhere in
the file and the old one will be displayed where it is really located
at.

The reason for this and many other problems with breakpoints is that
currently ImHex keeps two set of breakpoints in text editor and in
evaluator that are independent of each other, ie, changes to one don't
affect the other. This PR aims at synchronizing the two sets through the
per provider breakpoints that exist in view pattern editor.

### Implementation description

It accomplishes this by making the text editor version of breakpoints
the principal source of vectors and the ones in evaluator the effective
version. The first allows one to modify the text around and at the
breakpoint and notify others that the changes have induced changes in
the breakpoint locations. The effective breakpoints allow the insertion
and deletion of breakpoints.

View pattern editor is where breakpoints are updated. It receives
notifications from text editor about changes and then makes sure the
version in evaluator is updated with those changes. View pattern editor
also manages breakpoint addition and deletion so before making changes
it gets a copy of the current ones from text editor, sets the ones in
evaluator, uses the evaluator functions to add or delete breakpoints and
finally sets the text editor version with the new version.
2024-11-24 12:06:44 +01:00
paxcut
7e0f60615b fix: Achievements resetting after restart (#1965)
### Problem description
Loading a file on the command line or using the context menu in windows
was triggering an achievement before the achievements file was loaded.
This resulted on the achievements.json file to be overwritten with all
the achievements reset except for the one to open files.

### Implementation description
This PR fixes the problem by introducing a boolean that is used to check
if the file has been loaded.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-11-24 11:34:44 +01:00
Kirill R.
e1a49b38a7 build: Fix macos blurry flicker (#1956)
<!--
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 -->

seem to fix #1809. I couldn't build the app, so hoping that's the right
place to update resulting `Info.plist`

### 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 -->
2024-11-24 11:31:30 +01:00
paxcut
4333b8c351 fix: Text cursor not moving to the correct location with ctrl+c -> ctrl+v (#1951)
This code fixes issue #1950 This PR depends on PR [#27
](https://github.com/WerWolv/libwolv/pull/27) on libwolv repo


### Problem description
See description of the problem on the issue linked above

### Implementation description
The code in the PR uses function added to the libwolv repository to
remove tabs if they exist on the provider. Additionally, any pasted tab
on the pattern editor will be translated to spaces automatically. This
code was tested successfully using the pattern posted in the issue.
2024-11-24 11:31:06 +01:00
paxcut
6464377a89 impr: Added code so that when debugger pauses at a line, the line is highlighted (#1932)
regardless of the method used to pause the evaluation at that line.
2024-11-24 11:29:08 +01:00
Shubhankar Sarangi
4fcf732814 impr: Reserve space to avoid multiple allocations when loading scripts (#1929)
std::forward ensures that the arguments are perfectly forwarded to
loadScript
By reserving space in the features vector based on the size of scripts,
we can avoid multiple memory allocations during the loop. If an
exception occurs, returning an empty vector immediately clarifies that
no scripts were loaded. Without reservation, each call to emplace_back
could potentially trigger a reallocation if the current capacity is
exceeded, which is costly in terms of performance. This leads to more
efficient memory management and can significantly speed up the execution
time when dealing with a large number of scripts.


![image](https://github.com/user-attachments/assets/3e290162-fb8b-4f00-a71b-6009494b2dab)
2024-11-24 11:28:45 +01:00
paxcut
0d4f3e5735 fix: ImHex hangs when pressing F5 while in a breakpoint (#1920)
### Problem description
fix: pressing F5 (start pattern execution ) while being in a break point
hangs ImHex.


The reason for hanging ImHex was that the shortcut procedure was not
checking if the pattern was already running, and it attempted to start
another one. This makes ImHex wait indefinitely for a lock to be
released

### Implementation description

To fix the hanging of ImHex we check the runtime for current evaluation
and if detected we stop it. In all cases the evaluation is started
again.
2024-11-24 11:24:42 +01:00
paxcut
1f2e453e20 fix: Various pattern editor settings not being per-provider (#1917)
### Problem description
Fixes provided for the following unreported bugs.

- Environment variables are set to be per provider but used as if they
are not. When a project is loaded all the environment variables for each
provider are assigned to the first provider making it impossible to add
new ones to the other providers.

- When switching providers, the text editor selection, the text editor
breakpoints, the console text, the console selection and the console
cursor position of the old provider are being assigned to the new
provider

### Implementation description

This PR aims at fixing both errors by:
- using variable defined to be per provider so that they affect their
provider only when necessary.

- creating new per provider variables and using them so that each
provider has their own console, selections and breakpoints.

In order to support the newly added per provided features new functions
were added to the text processor for selections and breakpoints. All the
new per provider variables are defined and used in view pattern editor.
2024-11-24 11:24:14 +01:00
Paulo Casaretto
5236c7b468 fix: Use machine headers to auto select arch for macOS process memory provider (#1910)
Fixes https://github.com/WerWolv/ImHex/issues/1807

### Problem description

Build fails for MacOS x86-64 due to using a wrong architecture header.

### Implementation description

Used the headers for mach that auto select the correct architecture.

### Additional things

This is being used in https://github.com/NixOS/nixpkgs/pull/330303 as a
patch

Co-authored-by: Nik <werwolv98@gmail.com>
2024-11-24 11:21:29 +01:00
Ikko Eltociear Ashimine
1738e8883f fix: Typo in tar.hpp (#1909)
occured -> occurred
2024-11-24 11:20:51 +01:00
paxcut
cc4563afb0 impr: Added back missing runtime error markers (#1907)
### Problem description
Moving error markers to be underwaved created s couple of errors: 
- Markers that were 1 char long and located at the end of the line
didn't show on text editor.
- Markers that had zero length or no stack trace didn't show on text
editor.

### Implementation description

- The first error was caused by an off by one error in the column index.
- There was no implementation for errors that had no location or zero
length. Now errors with no location will be shown at the beginning of
the line where they occur. Errors with zero length will be marked from
their location to the end of the line, therefore, errors with no stack
trace will be marked from the beginning to the end of the line.
2024-11-24 11:20:15 +01:00
paxcut
4b3bf2f358 fix: Textures, uv coordinates and light source not updating properly. (#1872)
### Problem description
The only time textures would update was through the file picker. Once UV
coordinates were used, disabling them didn't have any effect because the
vertex array didn't invalidate the corresponding buffer array. When
`shouldUpdate` is true, the light source needs to know as well,
otherwise it will set the location at 0,0.

### Implementation description

Textures were fixed by creating a member variable that holds the file
name of the texture used in the last model rendering.

Instead of invalidating buffer arrays it is much simpler to define a
default UV coordinate set for the case when no UV is specified. if a
texture is not present then the values of UV will not be used. If there
is a texture it must be a minimum of 1 pixel in size. So we choose the
UV coordinates so that every vertex gets assigned the color at the 0,0
coordinate of the texture.

When `shouldUpdate` is on, we also turn `shouldUpdateLightSource` on.

Also included are some formatting changes that are purely aesthetic.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-11-24 11:18:19 +01:00
WerWolv
80084f5c5a patterns: Updated pattern language 2024-11-24 11:17:29 +01:00
descawed
6d14b3f6bd Fix process memory provider on Linux (#1933)
### Problem description
The process memory provider currently doesn't function correctly on
Linux due to incorrect handling of the special procfs file
`/proc/<pid>/maps`. I don't know if some of this behavior could vary by
distro and/or kernel version, but I've observed the following issues in
my Ubuntu 24.04 environment.

- The current code in master calls `file.readString()` which attempts to
determine the size of the file by [seeking to the
end](https://github.com/WerWolv/libwolv/blob/master/libs/io/source/io/file_unix.cpp#L148).
However, procfs files don't have a defined size, so this fails with a
return of -1. libwolv [interprets this as the file size and attempts to
allocate an enormous
buffer](https://github.com/WerWolv/libwolv/blob/master/libs/io/source/io/file.cpp#L30),
which results in an exception, so ultimately the process memory provider
is unusable on the current code.
- The previous version of the code that went out in 1.35.4 was calling
`readString` with a fixed maximum size of `0xF'FFFF`. This avoids the
seek issue, but when working with special files, a single `read` call
isn't guaranteed to read the requested number of bytes even if that many
bytes are available. In practice, on my machine, this call only ever
reads the first few dozen lines of the file. So the feature works in
this version, but it's unable to see the vast majority of the process'
address space.
- On a more minor note, on rows in the `maps` file that have a filename,
the filenames are visually aligned by padding spaces between the inode
column and filename column. ImHex includes these spaces as part of the
filename, resulting in most of the path being pushed out of the visible
area of the window.

### Implementation description

- To ensure the entire `maps` file is read, I've changed the code to
read from the file in a loop until we stop getting data. I've also set a
fixed limit on the maximum number of bytes to read in one go to avoid
issues with trying to determine the file size.
- I've added a `trim` call to remove any padding around the filename.

### Screenshots
Exception in `file.readString()` in current code (for some reason this
also causes the window to become transparent):

![mem_regions_exception](https://github.com/user-attachments/assets/ac9f472b-3d60-446d-be9c-b028b041e547)

Abridged memory region list in 1.35.4:

![mem_regions_truncated](https://github.com/user-attachments/assets/44e60b23-49f8-41b9-a56b-54cb5c82ee72)

Complete memory region list after this PR:

![mem_regions_working](https://github.com/user-attachments/assets/bdb42dc6-bcd3-42b1-b605-a233b98e8d2e)

### Additional things
I was focused on fixing this ImHex feature here, but I wonder if some of
this should be addressed in libwolv. Maybe `readBuffer` in file_unix.cpp
should read in a loop until it has the requested number of bytes or
encounters EOF/error?

---------

Co-authored-by: Justus Garbe <55301990+jumanji144@users.noreply.github.com>
2024-11-07 13:41:04 +01:00
iTrooz
592f613a61 fix: re-enable C/C++ languages in CMake (#1942) 2024-10-24 08:14:07 +02:00
WerWolv
3739bcc40c fix: Multiple race conditions with pattern sorting 2024-10-22 16:20:08 +02:00
WerWolv
101c7a36fb patterns: Updated pattern language 2024-09-18 23:54:56 +02:00
WerWolv
21be959cba fix: Another text editor merge issue 2024-09-15 16:14:43 +02:00
WerWolv
b3a0ebe7b6 fix: Some merge issues 2024-09-15 15:55:21 +02:00
paxcut
96a588bd86 fix: F3 failed to locate the correct set of matches if file was edited after doing a search (#1867)
### Problem description
The bug can be reproduced as follows:
1) Using Ctrl-F do a search for a term that occurs several times in the
file. and press F3 to visit them.
2) Go back to the fop of the file and insert 3 blank lines. 
3) Pressing F3 once or many times will not find the term entered above.


### Implementation description
The reason for this bug is that the positions of the matches are not
being reset when changes can potentially move them.
The fix consists on resetting the search locations when changing the
contents of the file and redoing the search after the changes are made.
The bug was specially problematic when doing replace because the
replacement position would be identified as a match. This PR fixes
replace as well.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:32:10 +02:00
paxcut
866b956680 feat: Added per provider cursor position for the Pattern editor (#1861)
### Problem description
Currently, the pattern editor does not remember where the cursor is
located in each provider. For example, suppose you have 2 providers in
your project, and you scrolled down to line 200 in the first pattern to
make some changes and remembered that the code you want to insert is in
the second provider. Then you switch to the second provider, look for
the code and find it in line 235. Switch back to the first one, and you
are at the beginning of the file. So you again look for the line to edit
paste it to realize that it needs code a few lines before the place you
found it. You switch to the second provider, and you are at the top
again. This gets annoying very fast.

### Implementation description

This PR ensures that, when you return to the pattern in the editor for
any of the opened providers, the cursor will still be at the same place
it was when you switched to a different one. Each provider pattern saves
its cursor position and returns to it when you switch to that provider.
It does that by creating a PerProvider variable and using it when
providers are first opened to set it to the origin and when switching
providers it first saves the position of the old provider and then loads
and sets the saved position of the new provider.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:28:37 +02:00
paxcut
d88252c6fd fix: Unable to resize 3d-visualizer window in x-direction (#1860)
changes needed were:
1) add an extra dummy empty widget so that width of child and parent are
not always the same. 2) Width of reset button needs to be adjusted when
the width of the child is decreased so that the parent is decreased too.

<!--
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 -->
2024-09-15 15:27:39 +02:00
paxcut
414e7d36a0 fix: Double-clicking a string selects the closing double quotes (#1862)
This is a simple fix for a simple issue. Just check if the last char in
the selection is a double quote and if it is, make the selection one
char shorter.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:27:24 +02:00
paxcut
e0b4931a54 fix: 3D visualizer running very slowly with energy saving enabled (#1866)
### Problem description
The bug described in #1663 was caused by an optimization of the display
rendering that uses drawlists to detect changes. The changes in the 3-d
visualizer don't contain drawlists when axes are turned off.

### Implementation description
The fix is to identify the 3d visualizer among the command lists of the
main window and, if found, avoid skipping frames regardless of the
result of the comparison of drawlists.

Closes #1663
2024-09-15 15:23:58 +02:00
paxcut
a587c5ff74 feat: Added a quarter precision (8 bits) button to IEEE 745 tool (#1868)
Per discussions on Discord.
2024-09-15 15:22:35 +02:00
paxcut
0b2eca3066 fix: LZMA decompressor memory errors (#1873)
<!--
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
I was unable to use the LZMA de-compressor even though 7zip was able to
identify them as LZMA compressed and decompress them without a problem.
Under the debugger the `lzma_code()` call was returning
`LZMA_MEMLIMIT_ERROR`.
### Implementation description
I found online that the error can be fixed using `lzma_memlimit_set()`
using a value obtained with `lzma_memusage()`. I tried to avoid having
to call `lzma_code()` twice but if the functions are called before the
first `lzma_code()`the values of memory obtained fall short and error
occurs again.

I suspect that there are better ways to deal with this other than the
code proposed in this PR, but I haven't been able to find any.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:20:17 +02:00
paxcut
fa28052958 fix: Avoid crashing ImHex when passing invalid data to the 3D visualizer (#1874)
### Problem description
There are some obvious constrains in the various array data sizes that
we can use to determine if their sizes and in some cases their values
are correct.

### Implementation description
To test their validity, the most important of the various arrays are the
indices, so their definition and use has been simplified a great deal.
In order to treat all variables in a similar manner the changes to the
uv variable posted in an earlier PR were also added here.

With this one, all the recently opened PR's combined should contain
exactly the same changes and fixes as the older 3-d visualizer PR #1850
which I will close shortly after this one is opened.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:19:41 +02:00
paxcut
54f5bd1d80 feat: Added underwaved text functions (#1889)
### Problem description
Currently when errors are found the entire line where the error occurred
is highlighted and one has to look at the error message in order to find
where the error is located on the line. With this PR the line will no
longer be highlighted and the location of the error will be marked with
an red waved line under the error location. Hovering over the text where
the error occurred produces an error overlay so if several errors occur
on the same line they can all be seen separately.

### Implementation description
The definition of error marker was switched to include column and size
as well as line and message like before.
This change required changing the way view pattern editor draws the
error markers because the errors themselves don't have size information.
Also, a new errorHoverBoxes type was defined to help in the detection of
the floating error messages when error is hovered.

Note that the underwave code depends on having a monospaced. If font is
not monospaced the underwaved text can be short/long or displaced.


### Screenshots

![image](https://github.com/user-attachments/assets/f0b08e10-612c-404a-8863-d4f00054d198)


![image](https://github.com/user-attachments/assets/911fcacb-2a1e-431f-bbc8-8e05bcd61341)
2024-09-15 15:19:04 +02:00
paxcut
4b3bbb4a97 impr: Moved pattern editor shortcuts to the Shortcut manager (#1892)
### Problem description
There are some recent issues about Mac keys not configured properly for
the pattern editor. This PR moves all the shortcuts to the shortcut
manager, so they can be edited at will. Even if the key is not
identified correctly it should be possible to use preferred keys for any
action.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:18:50 +02:00
xtex
187d90e8f2 lang: Update Chinese (Simplified) translations (#1894)
Co-authored-by: JustFor <35858818+zhongqingsong@users.noreply.github.com>
2024-09-15 15:17:25 +02:00
rockisch
2f60f61c15 impr: Add streaming decompression to zstd_decompress (#1898)
<!--
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

https://github.com/WerWolv/ImHex/issues/1895

### Implementation description

Added code that handles streamed zstd data. It is based around the
[official
documentation](http://facebook.github.io/zstd/zstd_manual.html) and the
[example](https://github.com/facebook/zstd/blob/dev/examples/simple_decompression.c)
provided at the main zstd repo.

The loop around the non-streamed version was also removed because I
don't think it was doing anything (no `continue`s, `sourceSize` was
always being set to 0).

### Additional things

To test, I generated streamed zstd data with this python script:

```py
import io; import pyzstd;
with open("data.zstd", "wb") as f:
    pyzstd.compress_stream(io.BytesIO(b'ab' * 100), f)
```

And then I ran this pattern script:
```
import std.mem;
import hex.dec;

u8 data[while(!std::mem::eof())] @ 0x00;
std::mem::Section data_sec = std::mem::create_section("data_sec");
hex::dec::zstd_decompress(data, data_sec);
```

Inspecting the section shows the correct data:

![image](https://github.com/user-attachments/assets/83fc9d4c-e6fa-49ee-9923-29dc0c280739)

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:16:57 +02:00
paxcut
057543da15 feat: Extended bitmap visualizer to handle indexed colormaps (#1901)
### Problem description
Older image format use to store color values in a small lookup table so
that the image could simply store an index to the table. The pattern
language is not designed to handle this sort of operation which makes
this extension necessary to be able to visualize images of this type.

### Implementation description

The changes add an optional parameter to the bitmap visualizer which
holds the color lookup table. If the image contains values that are
outside the range of possible colors then the first color in the map is
chosen. The dimensions of the image can be equal to or smaller than
rows*columns depending on how the indices to the color map are stored.
For example, you can use 4 bit indices which would make the image half
the size (in bytes) but that limits the number of colors to 16. To store
colors in sizes larger than one byte use an array of the appropriate
sized integers.

### Screenshots


![image](https://github.com/user-attachments/assets/d068cb7e-3ff3-450d-8ac2-1bfc6e38043f)
2024-09-15 15:16:36 +02:00
paxcut
3c060cc57a fix: Finding utf-8 strings failed to select their location. (#1902)
other separate, but closely related fixes are:

- fix: The previous fix also solved the (unreported) bug of being unable
to select utf-8 works by double-clicking.
- fix: The move to next/previous word (Ctr-arrow) behaved differently
depending on the direction. I made both the move left/right functions
share a much simpler algorithm and rewrote the find start/end of word
functions share the same code structure.


### Problem description
The code was using the byte index of the match into the utf-8 string to
store the match locations, but the code that sets the selection uses the
char index into the utf-8 string instead. Another problem was that the
search uses the byte index to determine if it needs to find more
matches.

### Implementation description
Both problems were solved by introducing two functions to switch from
coordinates in units of bytes to coordinates in units of chars and vice
versa.

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:16:19 +02:00
paxcut
928b4c6c4c fix: Reset cursor blink when moving selection (#1903)
### Problem description
When this feature was implemented the text editor handled all the
keyboard input so the blink reset function could be called in one place
for all the key presses. Now that shortcuts are done in the shortcut
manager we need to reset the blink state inside all the functions that
can affect cursor movement.

### Implementation description
Every function that moves the cursor now calls the blink state reset
function at the very start. There may be more functions that need this
that haven't been merged but git should show merging conflicts so it
should be easy to deal with.
2024-09-15 15:15:14 +02:00
WerWolv
871a0d535c build: Fix building issues on macOS with clang 18 2024-09-08 10:45:38 +02:00
WerWolv
87db9def32 build: Updated libwolv 2024-09-03 11:09:01 +02:00
WerWolv
04763eaeea patterns: Updated pattern language 2024-08-23 21:37:46 +02:00
JustFor
b6c08a1a11 lang: Updated zh_CN language definition (#1827)
### Problem description
1. Old Chinese text json, the order is chaotic. It doesn't compare well
with English.
2. Missing a batch of new English strings.

### Implementation description
1. Synchronize the key sequence of English files.
2. Added a missing batch of text, and translate to CN.

### Screenshots
None

### Additional things
None
2024-08-20 20:31:33 +02:00
xtex
811c995047 build: Find boost with name "Boost" (#1840)
On many distributions like AOSC OS, Alpine Linux, Arch Linux, etc.,
boost should be searched with name "Boost".

This should fix the packaging issue on AOSC OS.

### Problem description
CMake fails to find system boost when `USE_SYSTEM_BOOST` is set to ON.

### Implementation description
Find Boost.

Signed-off-by: xtex <xtexchooser@duck.com>
2024-08-20 20:29:03 +02:00
WerWolv
7011df2ced fix: Reading entire file content of base64 file into memory not working 2024-08-20 20:27:08 +02:00
WerWolv
a24692b4be fix: Revert ndf-extended changes for now to fix file dialogs on Linux 2024-08-20 20:08:01 +02:00
WerWolv
0e7a32470b patterns: Updated pattern language 2024-08-20 20:04:52 +02:00
WerWolv
212d2f9db4 patterns: Updated pattern language 2024-08-10 09:17:41 +02:00
Colin Snover
0263d3538e fix: Don't supress stderr anymore (#1822)
### Problem description

Typing `--help` causes ImHex to exit without outputting anything.
Diagnostic messages from glib, ASan, other libraries that might have
something important to say, etc. are also suppressed.

### Implementation description

This effectively reverts 7c1e33dde6, which
was partially reverted only on Windows by code that was left commented
out in f114239f51.

Allowing other libraries to print to stderr may make the output ‘ugly’,
but lots of things print to stderr that are important for figuring out
why something is bugged, like ASan and glib.

### Additional things


![image](https://github.com/user-attachments/assets/fa6771e2-da2e-45ea-93cd-06c3f6bfd3bf)
2024-08-09 22:15:34 +02:00
WerWolv
63c6028522 build: Updated ImGui to v1.91.0 2024-08-03 23:49:47 +02:00
WerWolv
075ece2da7 impr: Clean up windows window code 2024-08-03 22:18:16 +02:00
WerWolv
e9fb02285e impr: Allow tasks to be created without getting the task handle as parameter 2024-08-03 22:01:18 +02:00
WerWolv
5dfd8c89a3 feat: Display pattern descriptions in file chooser and pattern popup 2024-08-03 22:00:47 +02:00
WerWolv
e9f7908afb git: Increase stale issue operations to 200 2024-08-03 20:10:09 +02:00
WerWolv
fafce72c01 fix: Errors causing #pragma magic to not work as expected 2024-08-03 20:09:10 +02:00
WerWolv
c3d15157ad git: Silence brew commands spewing errors into the CI log 2024-08-03 18:41:17 +02:00
WerWolv
e0712f73c2 git: Better build CI script formatting 2024-08-03 18:40:56 +02:00
WerWolv
3dd5b2365a git: Increased stale issue operations per run to 100 2024-08-03 18:39:26 +02:00
WerWolv
b523f55984 git: Kill XProtect on git runners to work around race condition 2024-08-03 18:32:45 +02:00
Nik
79b8b77b25 git: Allow inactive issues ci to be triggered manually 2024-08-03 18:24:31 +02:00
WerWolv
c6065808a7 git: Skip codecov CI step if token isn't set 2024-08-03 18:22:15 +02:00
Justus Garbe
d69ae39b6f git: Added stale issues action (#1836)
Added stale issues action:
- Runs on cron every 30 days
- Marks issues as stale after 11 months
- Closes issues marked as stale after 1 month
2024-08-03 18:22:11 +02:00
WerWolv
35739d6d0d feat: Display pattern description on the accept pattern popup 2024-08-03 18:15:30 +02:00
WerWolv
e726fce360 patterns: Updated pattern language
Fixes #1835
2024-08-03 17:56:13 +02:00
WerWolv
0a038fecff impr: Re-parse patterns only when the user stopped typing 2024-08-03 17:00:23 +02:00
WerWolv
0184bf9a7d impr: Only mark providers dirty when they're not dirty already 2024-08-03 17:00:09 +02:00
WerWolv
60663babc8 impr: Optimize hovering over patterns in the hex editor 2024-08-03 16:50:30 +02:00
WerWolv
a7115d4300 fix: Race condition during data processor execution 2024-08-03 15:17:35 +02:00
WerWolv
29558c9910 impr: Remove superfluous concatenation operators for Lang strings 2024-08-03 11:35:36 +02:00
WerWolv
7c1d643f97 patterns: Updated pattern language 2024-08-03 11:33:15 +02:00
WerWolv
b2fc80f970 impr: Fix various issues with runtime-generated language strings 2024-08-03 11:32:17 +02:00
WerWolv
efee128c1c patterns: Updated pattern language 2024-07-28 10:43:15 +02:00
WerWolv
c3ddd68866 fix: Correct more language strings 2024-07-27 16:54:05 +02:00
WerWolv
3cde4472c8 impr: Jump to selection in main hex editor as well when clicking on diff entries 2024-07-27 16:52:15 +02:00
WerWolv
4c38fe261d feat: Make diff table resizable 2024-07-27 16:51:43 +02:00
WerWolv
33f7191c0d fix: Copy paste error 2024-07-27 16:46:10 +02:00
WerWolv
cda9ad3b30 patterns: Updated pattern language 2024-07-27 16:33:37 +02:00
WerWolv
1a7bd49361 impr: Make all task names properly translatable 2024-07-27 16:29:06 +02:00
WerWolv
cf2e189049 fix: Building issues on Fedora 2024-07-27 15:55:59 +02:00
WerWolv
d5f5ba941a patterns: Updated pattern language 2024-07-27 14:16:01 +02:00
WerWolv
9a973be7ba fix: Background service thread names 2024-07-27 14:15:51 +02:00
WerWolv
d8e1284946 fix: Task names not displaying correctly anymore 2024-07-27 14:09:52 +02:00
WerWolv
ce26fe1db7 impr: Move language string interpretation to compile time 2024-07-27 11:23:21 +02:00
WerWolv
a8ad045248 fix: Parent offset calculation with non-zero base addresses 2024-07-26 19:43:15 +02:00
WerWolv
d097f6ada0 impr: Make pattern tooltips more appropriately sized 2024-07-26 19:38:21 +02:00
WerWolv
1b26db40f7 feat: Added parent offset to pattern hover tooltip 2024-07-26 19:38:01 +02:00
WerWolv
602b946fc9 patterns: Updated pattern language 2024-07-24 19:52:03 +02:00
WerWolv
48fc1a7a1e fix: Allow ImHex to build under wayland again 2024-07-24 19:41:34 +02:00
WerWolv
416889f49d impr: Optimize time it takes to find favorites in patterns 2024-07-24 19:41:12 +02:00
WerWolv
5ca3222e5b patterns: Updated pattern language
Fixes #1828
2024-07-24 19:40:27 +02:00
WerWolv
d49d82e982 fix: Building with latest pattern language changes 2024-07-23 20:32:16 +02:00
WerWolv
a4d5679219 fix: Crash when opening hex editor popups 2024-07-23 20:32:04 +02:00
WerWolv
bead103f3d patterns: Updated pattern language 2024-07-23 18:29:37 +02:00
Jean-François Nguyen
e50b6733c4 fix: Segfault when hashing regions spanning multiple MiBs (#1804)
### Problem description

Attempting to do an MD5 hash of a large region (e.g. 2 MiB, ``u8
data[0x200000]``) crashes with a segfault.

### Implementation description

In ``hex::plugin::hashes::hashProviderRegionWithHashLib()``,
``hashFunction->TransformBytes()`` is called with an offset of 0,
because it iterates over ``data`` and not the entire region.
2024-07-21 20:35:38 +02:00
xndcn
75e5dbaaa4 build: Fix incorrect name case in FindmbedTLS.cmake (#1817)
Corrected MBEDTLS_FIND_REQUIRED to mbedTLS_FIND_REQUIRED, since the
package name is "mbedTLS" for case sensitive environment
2024-07-21 20:34:23 +02:00
xndcn
965113c2b4 fix: Fix lzma stream end constant name (#1818)
Corrected BZ_STREAM_END to LZMA_STREAM_END.
Also removed redundant condition of LZMA_STREAM_END for error checking.
2024-07-21 20:33:46 +02:00
checkraisefold
3bddaf509d fix: Textures provided through the pattern language not rendering in the 3D visualizer (#1819)
<!--
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
Because of `s_drawTexture` never being set to true, textures rarely or
never drew in the 3D visualizer.

### Implementation description
Set `s_drawTexture` to true when correct (valid texture file/object).
2024-07-21 20:33:05 +02:00
Colin Snover
c1c51e0baf feat: Enumerate fonts on Linux using Fontconfig when available (#1821)
### Problem description

The fonts list on Linux does not show all system fonts, and does not
show font names at all.

### Implementation description

Use Fontconfig to make the list less bad if Fontconfig headers are
available.

### Additional things

I like fonts.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-07-21 20:28:37 +02:00
WerWolv
09b6c2ab5b fix: Error log spamming when viewing invalid regions in process memory provider on linux 2024-07-21 20:24:26 +02:00
Colin Snover
13fd956039 fix: Do not connect to api on startup when server contact setting is disabled (#1823)
### Problem description

ImHex asks users whether they wish to opt-in to network connections on
start (excellent!), then ignores that and tries to connect to the
network anyway when the welcome screen loads (less excellent!).

### Implementation description

Also don’t connect to the network on the welcome screen if it is
supposed to not do that.
2024-07-21 20:14:02 +02:00
WerWolv
b6f0ee90af fix: Sidebar panels not being resizable anymore properly 2024-07-16 18:15:28 +02:00
WerWolv
90e11e1c5d fix: Crash when parsing process memory provider regions 2024-07-16 18:11:06 +02:00
WerWolv
fc40e8ba70 fix: Process memory provider region parsing skipping unnamed regions 2024-07-16 17:58:49 +02:00
WerWolv
7652b4a5b8 fix: Compiling on Linux with older glfw versions 2024-07-16 17:58:19 +02:00
Colin Snover
fb249767f1 fix: Crash on exit when using custom font from file (#1815)
### Problem description
WerWolv/ImHex#1814

### Implementation description
1. Remove the flag that wrongly tells `ImFontAtlas` that it owns font
data, and remove that parameter from the function signature entirely
since now it is always `false`.
2. Rename `takeAtlas` to `getAtlas` since it no longer transfers
ownership as of b652565b57.
2024-07-15 22:22:02 +02:00
WerWolv
d7ed311bcf impr: Don't auto-scale the framebuffer on Linux 2024-07-12 17:34:20 +02:00
WerWolv
8422965d0b impr: Run data processor in a worker task 2024-07-11 23:30:54 +02:00
WerWolv
7975edade4 feat: Added loop data processor node 2024-07-11 20:38:33 +02:00
WerWolv
1e18935513 impr: Handle demangling of identifiers without leading underscore 2024-07-11 20:38:22 +02:00
WerWolv
c311b5315f patterns: Updated pattern language 2024-07-11 18:02:48 +02:00
WerWolv
26a73e0fba patterns: Updated pattern language 2024-07-11 17:40:18 +02:00
WerWolv
07c259c9c1 fix: Multiple issues causing visualizers to crash when used _slightly_ incorrectly 2024-07-10 20:50:58 +02:00
WerWolv
9e1c2d5a2c build: Fix copy-paste bug 2024-07-10 20:50:20 +02:00
WerWolv
d7fb1b737f fix: Occasional crash when closing providers 2024-07-09 19:01:49 +02:00
iTrooz
84c9c69fa3 fix: Remove DSA key from AUR deploy action (#1806) 2024-07-09 09:23:33 +00:00
WerWolv
12ca4e29cf fix: Multiple definitions errors with plugin features 2024-07-08 21:34:47 +02:00
WerWolv
27b1a5dc98 impr: Make highlight hovering more efficient 2024-07-08 21:34:27 +02:00
WerWolv
de36cc8445 impr: Disable pattern debug mode after evaluation has finished 2024-07-08 19:49:31 +02:00
WerWolv
03d344c0a2 build: Streamline definition on plugin features 2024-07-08 18:12:46 +02:00
WerWolv
39f01538c7 git: Update Mesa3D link for Windows NoGPU version 2024-07-07 16:17:03 +02:00
WerWolv
28c57cf666 patterns: Updated pattern language 2024-07-07 15:47:58 +02:00
WerWolv
59d120537d feat: Added non-frame lz4 compression support to the pattern language 2024-07-07 15:23:18 +02:00
WerWolv
66d18e9475 patterns: Updated pattern language 2024-07-07 13:59:56 +02:00
WerWolv
1f5e4ceb0c feat: Added basic support for lz4 decompression to the pattern language 2024-07-07 10:26:24 +02:00
Sébastien Szymanski
0cbc65a52f build: Fix Gentoo ebuild (#1787)
### Problem description
Ebuild is invalid, i.e:
```
# ebuild ImHex-9999.ebuild manifest
Error(s) in metadata for 'app-editors/ImHex-9999':
  RDEPEND: Invalid atom (dbus), token 5
```

### Implementation description
* mbedtls is in net-libs category
* RDEPEND must contain atoms (category/packagename)

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Co-authored-by: Nik <werwolv98@gmail.com>
2024-07-07 10:25:10 +02:00
WerWolv
2b0367cca6 impr: Better handling of the scaling warning when using custom fonts 2024-07-06 11:30:59 +02:00
WerWolv
1f01f480e0 impr: Enable native scaling by default again 2024-07-06 11:29:52 +02:00
WerWolv
7a167962d6 fix: Font scaling not always being applied consistently 2024-07-06 11:29:14 +02:00
WerWolv
dae028d25d fix: Build issue due to uncaptured this pointer 2024-07-05 21:03:24 +02:00
WerWolv
88e2fa04e7 fix: Crash on macOS when dirtying or undirtying a provider from a thread
Fixes #1799
2024-07-05 20:59:20 +02:00
WerWolv
bb0a8047ea fix: Hex editor popups getting transparent when hovering over combo box popup 2024-07-05 19:26:08 +02:00
WerWolv
b652565b57 feat: Added DPI awareness on Windows, added FiraCode as optional default font 2024-07-05 17:39:07 +02:00
WerWolv
9aaf6f3105 web: Trigger right click when long touching area 2024-07-04 23:15:33 +02:00
WerWolv
c26eccfe28 web: Fix canvas to the top left of the screen 2024-07-04 21:37:51 +02:00
WerWolv
9fd547112d impr: Only handle SIGINT on release builds so IDEs can fast-kill ImHex 2024-07-04 21:28:43 +02:00
WerWolv
14bfc8af72 fix: Remove unnecessary touch padding 2024-07-04 21:18:46 +02:00
WerWolv
20f3458e37 patterns: Updated pattern language 2024-07-04 21:18:34 +02:00
WerWolv
6326e2d141 web: Improve logo size on mobile 2024-07-03 22:35:47 +02:00
WerWolv
23ca3c1d2d patterns: Updated pattern language 2024-07-03 22:35:47 +02:00
WerWolv
0656ab4b88 fix: Make sure welcome screen always stays in the background 2024-07-03 22:35:47 +02:00
WerWolv
90bb5d187c web: Fix touch input 2024-07-03 22:35:47 +02:00
WerWolv
75a62e2bde fix: Wrong start/end offset and size for static array entries in pattern data view 2024-07-03 16:58:56 +02:00
WerWolv
7cd36b80eb impr: Added tooltips to toolbar buttons 2024-07-03 16:58:25 +02:00
Bernard Teo
dd607621d7 build: Update nativefiledialog and keep dialogs on top (#1771)
This PR updates the nativefiledialog submodule and uses its new feature
to set the ImHex main window as the parent of the dialog window. This
ensures that the dialog stays on top of the main window. This is
currently supported by NFDe on Windows, macOS, and Linux/X11.
Linux/Wayland behaves as it did previously due to limitations in NFDe.

Note that macOS file dialogs have already been parented properly as NFDe
previously used the key window (the window currently receiving keyboard
events) on macOS. However, it's probably better to do the correct thing
and pass the main window to NFDe even on macOS.

### Problem description
The file dialog go behind the main window if the main window is clicked
while the file dialog is open.

### Implementation description
Update nativefiledialog and pass the `GLFWwindow*` of the main window to
the library function.

### Screenshots
Before:


https://github.com/WerWolv/ImHex/assets/6948096/589c3401-702a-4b0a-99ed-02d3e4d9080e

After:


https://github.com/WerWolv/ImHex/assets/6948096/8fef4900-eedc-48d5-8a4e-7bd81e37e3c0

### Additional things
I have tested this on Windows and Linux/X11, but did not test this on
macOS. It would be ideal if someone can help with this. (But as far as
NFDe is concerned, macOS `NSWindow*` handles have been tested (with
SDL2) and works.)

Co-authored-by: Nik <werwolv98@gmail.com>
2024-07-03 05:53:55 +00:00
WerWolv
2595febf14 patterns: Updated pattern language 2024-07-02 23:46:06 +02:00
WerWolv
dc058c4cf3 fix: Remove interactive help debug code 2024-07-02 23:17:12 +02:00
WerWolv
25824e1821 patterns: Updated pattern language 2024-07-02 23:16:32 +02:00
WerWolv
381c2d52ee web: Improved canvas webgl creation logic 2024-07-02 23:16:19 +02:00
WerWolv
4020ac9843 impr: Added nicer console warning when .NET runtime isn't installed 2024-07-02 23:15:54 +02:00
WerWolv
b3b7a19df4 fix: Wrong end address for bitfield fields in pattern data view 2024-07-02 17:38:53 +02:00
WerWolv
313e3e748f impr: Improved size display in pattern data view 2024-07-02 17:38:39 +02:00
WerWolv
09b9f26e6f patterns: Updated pattern language 2024-07-02 17:37:47 +02:00
WerWolv
01b9cc64d6 impr: Disable tab overlines 2024-07-01 23:53:14 +02:00
WerWolv
97bf1dc850 fix: Potential race condition with sorting in the pattern drawer 2024-07-01 23:36:17 +02:00
WerWolv
f94794fe3e patterns: Updated pattern language 2024-07-01 22:14:51 +02:00
WerWolv
68e528dd3a impr: Added Boost.Regex to about page 2024-07-01 22:01:28 +02:00
WerWolv
06ab1d34aa build: Updated ImGui, libfmt and libyara 2024-07-01 22:00:08 +02:00
WerWolv
2f2717e9aa impr: Completely eradicate Window resize flickering on Windows 2024-07-01 20:50:10 +02:00
WerWolv
88d24c2a03 web: Fix ImHex logo and progress bar default fill 2024-07-01 20:36:55 +02:00
WerWolv
ec2a2a6fbb git: Improve GPU information in the readme 2024-07-01 20:09:30 +02:00
WerWolv
60b81e714b impr: Prevent canvas flickering in web build 2024-07-01 20:09:16 +02:00
WerWolv
2cd8b13c1d build: Use ninja to build web version 2024-07-01 20:07:21 +02:00
Ikko Eltociear Ashimine
4afedb5131 chore: Fixed typo in cmake script (#1783)
<!--
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 -->
Accomodate -> Accommodate
### 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 -->
2024-07-01 08:24:59 +02:00
WerWolv
71880ad2ad git: Checkout correct repositories in plugin test CI 2024-06-30 22:35:15 +02:00
WerWolv
a30cce4cbc git: Checkout ImHex main repo in plugin template test runner 2024-06-30 22:25:09 +02:00
WerWolv
08b4f60ead git: Added CI runner to test plugin template building 2024-06-30 22:15:04 +02:00
WerWolv
11498bd09b build: Properly look for boost and libimhex library in sdk again 2024-06-30 21:55:29 +02:00
Nik
7384c88ad6 git: Update resource requirement in readme 2024-06-30 10:46:00 +02:00
WerWolv
6f22d70d59 fix: Updater executable not being launched correctly when path had spaces in it
Fixes #1780
2024-06-30 07:59:25 +02:00
WerWolv
adc279d681 impr: Further try to improve window resize flickering on Windows 2024-06-29 23:32:44 +02:00
WerWolv
f90dc5d619 fix: ImHex hanging at startup in certain cases 2024-06-29 21:13:04 +02:00
WerWolv
6fd594c1f4 fix: Don't delete font atlas after passing it to ImGui 2024-06-29 20:26:46 +02:00
WerWolv
b94a4288bf fix: Standard magic file not getting bundled into executable correctly 2024-06-29 19:43:24 +02:00
WerWolv
cbf415256b fix: Default folders still not being created correctly on Linux 2024-06-29 19:15:09 +02:00
WerWolv
4b1884944d fix: Exception when opening a null provider 2024-06-29 18:49:23 +02:00
WerWolv
5ff752c9af build: Bumped version to 1.36.0.WIP 2024-06-29 18:48:36 +02:00
WerWolv
0e331a7cd1 build: Bumped version to 1.35.1 2024-06-29 13:01:53 +02:00
WerWolv
10970d170c fix: Default folders not being created correctly anymore 2024-06-29 13:01:25 +02:00
WerWolv
ac1a28311c build: Bumped version to 1.35.0 2024-06-29 11:27:24 +02:00
WerWolv
01d1938fea git: Update macOS version requirement in readme
#1647
2024-06-29 10:34:41 +02:00
WerWolv
802694ec68 build: Silence macOS CI build warnings 2024-06-28 22:29:38 +02:00
WerWolv
2aef5e4eef build: Lock install path in rpath behind an option 2024-06-28 22:21:10 +02:00
WerWolv
9a0a4d47dc build: Disable source_date_epoch_from_changelog 2024-06-28 21:53:34 +02:00
WerWolv
96b7366d53 build: Try fixing fedora build spec again 2024-06-28 21:29:49 +02:00
WerWolv
90ac96298a impr: Only re-render frame once during window resize or move operations 2024-06-28 21:27:35 +02:00
WerWolv
a6e5040e8f fix: Build issues on Fedora due to missing Changelog value 2024-06-28 18:29:24 +02:00
WerWolv
19e5aafc85 fix: String truncating being completely borken 2024-06-28 18:29:10 +02:00
WerWolv
77301fd018 impr: Swap some items between File and Edit menu to fit better 2024-06-28 11:13:03 +02:00
WerWolv
ed56b3dd12 impr: Limit string length by cutting out part of the middle instead 2024-06-28 11:12:41 +02:00
WerWolv
91f6aae9ef impr: Make Win32 API properly use unicode support 2024-06-28 11:12:17 +02:00
WerWolv
b642c493d7 fix: Opening files with unicode paths in external program/explorer not working 2024-06-27 23:12:20 +02:00
WerWolv
a950796306 fix: Recent file entry name encoding being broken 2024-06-27 22:40:19 +02:00
WerWolv
8672a2cfe0 fix: Content store downloads getting stuck sometimes 2024-06-27 19:54:45 +02:00
WerWolv
301e8c5a96 impr: Improve contrast of text in pattern data table when hovering 2024-06-27 19:45:49 +02:00
WerWolv
699a91c46b fix: Path in pattern tooltip wrapping too quickly 2024-06-27 19:27:54 +02:00
WerWolv
e43016735d fix: Open file in containing folder not working 2024-06-27 19:25:02 +02:00
WerWolv
d9cecbbb5f impr: Don't flash bang people when the ImHex main window appears 2024-06-27 17:11:28 +02:00
WerWolv
6e186e7d6a impr: Clean up .NET script loader error messages 2024-06-27 17:11:28 +02:00
WerWolv
af3680649c patterns: Updated pattern language 2024-06-27 17:10:48 +02:00
WerWolv
82f1d08dd7 fix: Race condition when loading projects while other providers are loaded already 2024-06-27 17:10:42 +02:00
WerWolv
b1b54a5fe7 impr: Drastically optimize event handler 2024-06-27 17:10:01 +02:00
WerWolv
ced3af3935 fix: Revert pattern include path back to the original paths 2024-06-27 17:09:48 +02:00
WerWolv
e5c782ebe9 impr: Further optimize ImGui text rendering 2024-06-27 17:09:20 +02:00
WerWolv
7d42742684 fix: Properly check return value of std::fgets 2024-06-26 22:46:01 +02:00
FireNX70
41820311cc fix: Off-by-one error in "Export selection to file" (#1774)
### Problem description
Export selection to file would never finish and wouldn't export the last
byte.

### Implementation description
It was just a simple off by one when using the selection's end address
to calculate the remaining data size. Add one to the remaining size
calculation.

### Additional things
Fixes https://github.com/WerWolv/ImHex/issues/1733,
https://github.com/WerWolv/ImHex/issues/1619 and
https://github.com/WerWolv/ImHex/issues/1597.
2024-06-26 22:44:10 +02:00
WerWolv
e132adad5d impr: Add short delay before a hover tooltip appears 2024-06-26 20:38:06 +02:00
WerWolv
2132e5adbf feat: Added tooltip to nightly icon on welcome screen 2024-06-26 20:37:39 +02:00
WerWolv
e2d55446fe impr: Get rid of more unnecessary ImGui::Text() calls 2024-06-26 19:41:06 +02:00
WerWolv
1dfce6a5c2 feat: Added --reset-settings command 2024-06-26 19:38:25 +02:00
WerWolv
a84db9821c impr: Optimize default hex cell visualizer 2024-06-26 19:15:49 +02:00
WerWolv
ec080ad69f fix: Indentation and wrapping of pattern hex editor tooltips 2024-06-26 19:14:43 +02:00
WerWolv
75cc9e4d84 fix: Pattern data filtering not applying correctly after rerunning pattern 2024-06-26 19:14:23 +02:00
WerWolv
d241a3ed5f impr: Make PageUp and PageDown not move the selection anymore 2024-06-26 19:14:01 +02:00
WerWolv
682aab8b23 feat: Allow faster hex editor scrolling by holding down CTRL or SHIFT + CTRL 2024-06-26 19:13:42 +02:00
WerWolv
474862b4af impr: Replace hardcoded pattern syntax highlighting colors style colors 2024-06-26 19:13:15 +02:00
WerWolv
dd02ec7a8e impr: Make the highlights minimap visualizer the default 2024-06-26 19:12:20 +02:00
WerWolv
1eadb77722 fix: Item tooltips being sized incorrectly 2024-06-26 19:11:59 +02:00
WerWolv
95f71bcb10 fix: Sub windows being used incorrectly 2024-06-26 19:11:31 +02:00
WerWolv
e1a4707569 impr: Make sure assertion handler doesn't get called too often 2024-06-26 19:10:43 +02:00
WerWolv
5a10613dd2 build: Add lib folder to all plugin's RPATH 2024-06-25 23:17:15 +02:00
WerWolv
c6a569ed88 impr: Don't reconstruct toolbar items list every frame 2024-06-25 23:14:05 +02:00
WerWolv
de24453fb9 impr: Open windowing menu on mouse down instead of on mouse up 2024-06-25 22:59:46 +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
95166ccfb8 impr: Further cleanup hex editor footer 2024-06-25 21:19:59 +02:00
WerWolv
c56667b0dd patterns: Updated pattern language 2024-06-25 20:57:45 +02:00
WerWolv
f754560bca patterns: Allow bitfield fields to be edited properly, improve type formatting 2024-06-25 16:14:28 +02:00
WerWolv
b54bb6cd56 patterns: Updated pattern language 2024-06-25 14:30:03 +02:00
WerWolv
b03b159907 impr: Better UI/UX for pattern drawer 2024-06-25 14:29:27 +02:00
WerWolv
bb7e6c9775 patterns: Updated pattern language 2024-06-25 13:54:55 +02:00
WerWolv
4bc724791d impr: Optimize frame times 2024-06-25 13:54:46 +02:00
WerWolv
ba7c10f4b1 feat: Fix sub menus, allow recent items to be collapsed 2024-06-25 13:54:29 +02:00
WerWolv
c1561c7b6a impr: Only allow scaling factors between 0.1x and 4.0x with slider
The old scaling values can still be entered by ctrl-clicking the slider and entering it manually
2024-06-24 23:04:20 +02:00
WerWolv
91a0be2d78 impr: Better UI/UX for interactive help 2024-06-24 23:01:46 +02:00
WerWolv
1f27530241 impr: Optimize event processing 2024-06-24 22:53:45 +02:00
WerWolv
e236872af3 feat: Added simple interactive help system 2024-06-24 22:53:25 +02:00
WerWolv
3d301c4202 fix: Don't automatically create directories in read-only locations
Fixes #1767
2024-06-24 21:51:37 +02:00
WerWolv
a5aaa60d29 fix: Build error due to uninitialized variable in web builds 2024-06-24 21:49:59 +02:00
WerWolv
d4a2de3b23 patterns: Updated pattern language 2024-06-24 14:27:32 +02:00
WerWolv
e85746ddba fix: Data paths being stored in config paths instead 2024-06-24 14:27:24 +02:00
WerWolv
a002eb1bc1 fix: Mixed path separators in default paths 2024-06-23 15:03:36 +02:00
WerWolv
7d4486f407 fix: Remove accidentally committed test code 2024-06-22 23:03:54 +02:00
WerWolv
a9915579a0 impr: Better detection of Intel GPUs with really bad driver bugs 2024-06-22 22:58:58 +02:00
iTrooz
65dfd4da0f feat: log stacktrace implementation used (#1769) 2024-06-22 21:33:52 +02:00
WerWolv
b93fd523aa fix: Remove last remaining getDefaultPaths 2024-06-22 12:57:13 +02:00
WerWolv
24621e6612 fix: Build issues on Linux due to unused parameter 2024-06-22 12:02:19 +02:00
WerWolv
1b383bdcf1 patterns: Updated pattern language 2024-06-22 11:56:17 +02:00
WerWolv
f47b357b23 impr: Reset unicode loading and scaling factor values if fonts fail to load 2024-06-22 11:25:32 +02:00
WerWolv
f9b778ecb8 impr: Use 1.0x scaling by default 2024-06-22 11:25:07 +02:00
WerWolv
f36d9831bb patterns: Updated pattern language 2024-06-22 10:45:03 +02:00
WerWolv
b60a262b58 fix: Replace old defaults path system with a new one
#1767
2024-06-22 10:44:55 +02:00
WerWolv
beef0fff33 impr: Better background opacity for the digital signal visualizer 2024-06-20 22:33:55 +02:00
WerWolv
24f535474a fix: Sidebar background and separator line overlapping footer 2024-06-20 22:33:42 +02:00
WerWolv
2e3f523f32 feat: Added digital signal pattern visualizer 2024-06-20 14:04:05 +02:00
WerWolv
c5f5973a9d feat: Added per-byte highlights to the hex editor minimap 2024-06-20 11:21:20 +02:00
WerWolv
5d59b8599d fix: Loading of file providers from UNC paths 2024-06-20 11:11:01 +02:00
WerWolv
3bfb0096e6 fix: Undefined behaviour when sending empty arguments to main instance 2024-06-20 11:09:57 +02:00
WerWolv
ca5763650b patterns: Updated pattern language 2024-06-19 13:59:58 +02:00
WerWolv
bf7beab0ab impr: Make auto backups not remove dirty status from project 2024-06-19 13:51:36 +02:00
SparkyTD
9b594d81bd feat: Added CSV, TSV and JSON as export options for Find results (#1673)
### Problem description
The default result export functionality of the Find tool is limited to
only exporting data in a nonstandard text format. This PR adds support
for exporting the results in CSV, TSV or JSON format. The PR also
removes the old format.

### Implementation description
I added the classes `ExportFormatter`, `ExportFormatterCsv`,
`ExportFormatterTsv` and `ExportFormatterJson`, with similar
implementations to the pattern data exporters.

~~I also moved the `ViewFind::Occurrence` class into
`hex/helpers/types.hh`, so the exporters can access it.~~

### Screenshots

![image](https://github.com/WerWolv/ImHex/assets/45818400/c7a1016b-6494-416d-a963-86484952837c)

### Additional things
Another small change I made is moving the "{} entries found" line on the
same line as the Search and Reset buttons. I think it looks cleaner this
way, but if anyone disagrees, I can revert it.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-06-18 20:57:55 +00:00
WerWolv
6a26c6002b git: Added ImHex pronunciation to readme 2024-06-18 22:12:01 +02:00
WerWolv
4fa64500af impr: Make sure footer items all start at the same height 2024-06-18 22:11:43 +02:00
WerWolv
085737af15 fix: Opening files on network drives (using UNC paths) crashing ImHex on startup 2024-06-18 22:11:26 +02:00
WerWolv
3e347fb6d4 impr: Improve icon scaling a bit 2024-06-18 22:10:02 +02:00
WerWolv
80cb126200 build: Cleanup configure step logging 2024-06-18 22:09:38 +02:00
WerWolv
f49715c7a0 impr: Better font loading logic 2024-06-16 22:41:16 +02:00
WerWolv
deee76e455 patterns: Updated pattern language 2024-06-16 15:42:04 +02:00
WerWolv
33885b863a fix: Disassembler always using little endian, no matter the setting
Fixes #1763
2024-06-16 15:06:30 +02:00
WerWolv
3ce9dbb278 fix: Alt and Ctrl being swapped in the text editor on macOS 2024-06-16 14:59:48 +02:00
WerWolv
bee4b906fb fix: Crash when closing providers 2024-06-16 14:48:31 +02:00
WerWolv
b3b79b3ee8 impr: Show document edited icon in close button on macOS 2024-06-12 19:51:12 +02:00
iTrooz
bd085dd495 git: Remove Fedora 38 and add Fedora 40 (#1755)
Fedora 38 is EOL
2024-06-12 09:21:35 +02:00
WerWolv
bf518b3590 fix: Pattern data view filter text box being too wide 2024-06-09 21:36:25 +02:00
WerWolv
32a8fcb84d fix: ImGui ID Push/Pop mismatch when disabling inspector rows 2024-06-09 21:18:29 +02:00
WerWolv
4fd65403c0 impr: Don't show separator in bookmark drag tooltip if no comment is present 2024-06-09 21:01:22 +02:00
WerWolv
ecf871a6f1 impr: Allow files to be switched between memory loaded and direct access 2024-06-09 20:59:06 +02:00
WerWolv
531c049bb0 impr: Improve bookmark drag-n-drop logic
Fixes #1745
2024-06-09 20:11:55 +02:00
WerWolv
99716eff1e impr: Make sure floating windows don't get reopened after restart 2024-06-09 20:11:21 +02:00
WerWolv
74205d5438 impr: Make sure icon input text boxes are the expected width 2024-06-09 14:56:56 +02:00
WerWolv
0136877978 fix: Bookmark "Open in View" tooltip not being displayed
Fixes #1749
2024-06-09 14:56:40 +02:00
Murmele
fb7d40ddbe fix: Allow bookmark region to be set to 1 Byte length (#1747)
<!--
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 -->
When entering for the end value the same value as the start it is not
recorgnized as valid region, because end must be strictly greater than
begin. Due to the +1 in the Region constructor this is not correct,
because the end is included in the range.

### 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 -->
After:

![image](https://github.com/WerWolv/ImHex/assets/10099533/c45d2001-8790-430a-8f1a-4b65130f4d01)


### Additional things
<!-- Anything else you would like to say -->
2024-06-09 10:54:09 +02:00
WerWolv
c761054805 feat: Allow view providers to be renamed
Closes #1746
2024-06-09 10:51:59 +02:00
WerWolv
55e24b5e23 fix: Bookmarks not being correctly reorderable anymore
Fixes #1745
2024-06-09 10:28:58 +02:00
WerWolv
9cff5b8af4 fix: Release notes in about page not working in nightly builds 2024-06-08 14:07:52 +02:00
Justus Garbe
41b2523005 impr: Refactor various view drawing code (#1698)
Refactored:
- ViewDatainspector
- ViewAbout

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-06-08 13:56:48 +02:00
WerWolv
2ef256ee74 impr: Show full error message for custom data inspector row errors 2024-06-08 13:40:39 +02:00
WerWolv
e954d49c29 feat: Handle SIGINT 2024-06-08 00:57:56 +02:00
WerWolv
041bf47ff4 fix: Title bar height on non-macOS platforms 2024-06-08 00:56:52 +02:00
WerWolv
53ced98529 impr: Enable auto project backup by default 2024-06-08 00:52:27 +02:00
WerWolv
cb475c471d build: Updated libwolv 2024-06-08 00:39:12 +02:00
WerWolv
bf82690c80 fix: Build and drawing of title bar buttons on macOS 2024-06-08 00:28:17 +02:00
WerWolv
72a3a1acab build: Updated libwolv 2024-06-07 23:48:57 +02:00
WerWolv
18e2b0eaa2 fix: Regex crashes with too long input strings 2024-06-07 23:12:18 +02:00
WerWolv
b80a6152b3 fix: Unifont being blurry again 2024-06-07 22:50:47 +02:00
WerWolv
ffe3dae7b2 build: Updated ImGui to v1.90.8 2024-06-07 22:12:50 +02:00
WerWolv
d7845ec690 fix: Build issues 2024-06-07 21:57:39 +02:00
WerWolv
8531a67519 fix: Don't unload background .NET scripts 2024-06-07 21:27:01 +02:00
WerWolv
af59b9d2ca fix: Infinite loop when doing forwards/backwards searches in some cases
Fixes #1734
2024-06-07 21:00:55 +02:00
Tsukasa OI
08bb69c048 fix: Wrong query path when saving layouts (#1735)
### Problem description

At least on Windows (I have tested), it fails to save a layout on the
non-portable version of ImHex (unless we have an administrator
privilege).

The log (after an attempt to save a layout as "sample") will look like:

| Component | Message |
| --------- | ------- |
| `libimhex` | `Failed to save layout 'sample'. No writable path found`
|

But the underlying problem is platform-agnostic. It can be also a
problem on other platforms in other ways.

### Implementation description

The layout manager incorrectly queried whether the empty path
(effectively the current working directory) is writable before saving
the layout (not each "layouts" directories it queried earlier).

This is the snippet of the root cause.

```cxx
std::fs::path layoutPath;
for (const auto &path : hex::fs::getDefaultPaths(fs::ImHexPath::Layouts)) {
    if (!hex::fs::isPathWritable(layoutPath))
        continue;

    layoutPath = path / fileName;
}
```

Look at the argument we are passing to `isPathWritable`. `layoutPath` is
a default (empty) `std::fs::path` object and will not be updated until
the directory describing itself is confirmed to be writable.

That caused a problem on non-portable version of Windows because:

1. The current working directory is usually the one of the executable
(`imhex-gui.exe`) and
2. That directory (`C:\Program Files\ImHex` by default) is usually not
writable unless ImHex is executed with an Administrator privilege.

The argument to `isPathWritable` should be `path` (containing one of the
`layouts` directories) and this PR fixes so that.

### Screenshots

### Additional things

This issue is hard to notice when developing because, to reproduce this
bug, the current working directory MUST NOT BE writable (usually
writable when we develop, even when we are working on the non-portable
Windows builds).
2024-06-07 20:33:43 +02:00
WerWolv
6fb32d20b3 fix: Don't try to compile process memory provider into Web build 2024-06-07 20:32:04 +02:00
WerWolv
ea09bfe8ea feat: Highlight patterns in pattern data view that are fully selected
Fixes #1741
2024-06-07 19:59:11 +02:00
WerWolv
c0dde570e4 feat: Highlight patterns in hex editor when hovering over pattern data row
Fixes #1742
2024-06-07 19:48:10 +02:00
WerWolv
6fd3fa77ed impr: Don't scroll hex editor view when jumping to a region that's on-screen already
Fixes #1743
2024-06-07 19:29:55 +02:00
WerWolv
ff20f81cfd impr: Added back selection size in hex to the footer 2024-06-07 19:21:38 +02:00
WerWolv
de8465a8f4 feat: Added limited support for the process memory provider to macOS 2024-06-07 19:17:14 +02:00
WerWolv
4540e1b561 impr: Select second to last provider when last one is selected and closed 2024-06-05 23:21:15 +02:00
WerWolv
789d469477 impr: Make providers close instantly 2024-06-05 23:02:38 +02:00
WerWolv
4797512207 fix: Variable naming style in splash window 2024-06-05 22:24:00 +02:00
WerWolv
348fe27a3c impr: Added small moon icon to the welcome screen of nightly builds 2024-06-05 22:23:43 +02:00
WerWolv
c217b1b100 build: Replace -WIP version suffix with .WIP 2024-06-05 20:59:48 +02:00
WerWolv
0e757e5fb1 build: Bumped version to 1.35.0-WIP 2024-06-03 23:06:28 +02:00
WerWolv
72d5707d33 build: Bumped version to 1.34.0 2024-06-03 22:22:33 +02:00
WerWolv
a491b85737 build: Added simple script to generate release notes 2024-06-03 22:14:08 +02:00
Alexander Wilms
d9d85cbfcc impr: Added keywords to .desktop file (#1732)
<!--
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 -->
This adds a list of strings which may be used in addition to other
metadata to describe the application. This can be useful e.g. to
facilitate searching through entries.

Reference:
https://webcache.googleusercontent.com/search?q=cache:https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

(The original site is currently down due to a Gitlab upgrade)

These keywords are used by
[Flathub](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#launchable),
[KDE
Discover](https://discuss.kde.org/t/does-kde-discover-parse-the-desktop-file-for-categories-and-keywords/7041)
and [Gnome
Software](https://blogs.gnome.org/hughsie/2016/01/07/the-importance-of-keywords-for-the-software-center/).

### Implementation description
<!-- Explain what you did to correct the problem -->
Add a `Keywords` entry to the .desktop file.

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

Here's how the tags are displayed for TeXstudio on its Flathub page: 

![image](https://github.com/WerWolv/ImHex/assets/3226457/35e00272-433e-46cd-9a9e-c42913aefe3f)


### Additional things
<!-- Anything else you would like to say -->
2024-06-03 19:44:05 +02:00
iTrooz
283fe46230 git: Replace Ubuntu 23.04 with 24.04 LTS (#1731) 2024-06-03 17:25:50 +02:00
iTrooz
2c00aa5def fix: Do not use custom repo gcc 13 for Ubuntu because it doesn't run on vanilla Ubuntu (#1730) 2024-06-03 08:06:49 +00:00
iTrooz
984438e98d feat: show Linux distribution information on startup (#1729) 2024-06-03 10:02:29 +02:00
WerWolv
cf34c4bd95 fix: The font atlas does not own the custom font data 2024-06-01 13:55:06 +02:00
WerWolv
bab1d2e27e fix: Loading custom fonts from paths with unicode characters not working
Fixes #1727
2024-06-01 13:52:41 +02:00
WerWolv
d1b6a21e86 fix: Missing localization 2024-05-31 17:06:18 +02:00
WerWolv
3049590b68 feat: Added full pattern path to hex editor hover tooltip 2024-05-31 17:02:46 +02:00
WerWolv
8a289d2e4f impr: Make hex editor faster to render 2024-05-31 17:02:22 +02:00
WerWolv
7a81fa7ac5 fix: Mutliple potential nullptr derefes with shortcuts 2024-05-31 17:02:08 +02:00
WerWolv
fbf59b6f0b build: Updated ImGui 2024-05-31 16:59:52 +02:00
WerWolv
0ab200f77f fix: Hex editor popups closing when opening sub-popups 2024-05-30 22:01:18 +02:00
WerWolv
a91e40d731 lang: Fixed typo 2024-05-30 21:49:40 +02:00
WerWolv
e553fbc86c patterns: Updated pattern language 2024-05-30 21:49:08 +02:00
WerWolv
b4a810c374 fix: Build error on some platforms due to unused variables 2024-05-30 21:49:01 +02:00
WerWolv
0e97914d94 build: Updated libwolv 2024-05-30 16:57:57 +02:00
WerWolv
a5c250c811 fix: Byte type annotations not being reset correctly 2024-05-30 16:57:28 +02:00
WerWolv
08c2f3fc15 impr: Make window less prone to flickering during resizes on Windows 2024-05-30 16:57:07 +02:00
WerWolv
63f66662ce fix: Workspaces not being deletable correctly in all cases 2024-05-30 16:56:39 +02:00
iTrooz
89eee104ab chore: disable codecov PR comments (#1724) 2024-05-28 13:51:09 +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
974c4ba040 git: remove unused name matrix parameter from Ubuntu builds (#1701) 2024-05-23 15:57:44 +02:00
iTrooz
4e2c1d20b4 git: change key used for web cache 2024-05-23 14:44:01 +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
David Mentler
751eff0edf impr: Restore native macOS title bar double click gesture in borderless mode (#1689)
### Problem description

#### Problem 1
In borderless mode ImHex disables the standard macOS titlebar rendering
and input processing. As a result double clicking the titlebar does not
trigger the native macOS behavior set in `System Settings -> Desktop &
Dock -> Double-click a window's title bar to [Zoom/Minimize/Do
nothing]`.

#### Problem 2
The ImHex window shows up as blank/transparent when de-minimizing it
from the dock.

#### Problem 3
Widgets experience ghost hover inputs from the past position of the
cursor during live resizing.

### Implementation description
ImGui elements consume input events in the order they are drawn. As a
result by "drawing" an `InvisibleButton` over the content area of the
titlebar we can catch unprocessed clicks in the titlebar area.
Connecting this button's double clicks to the native window is then a
trivial endeavour.

The blank windows was caused by the rendering stack clearing the GL
buffer, but proceeding to draw nothing in it. I have short circuited
this path.

Ghost hover inputs were squelched by consistently moving the ImGui
cursor to `0, 0` during a live resize. The OS will dispatch a cursor
positioning event once the resizing ends, restoring normal behavior.

### Screenshots
N/A

### Additional things
N/A

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-20 11:27:57 +02:00
WerWolv
666dc7dccb fix: Build when multisampling isn't available 2024-05-20 10:18:03 +02:00
WerWolv
a172e89620 fix: Don't restore toolbar items when they're empty 2024-05-20 10:16:14 +02:00
iTrooz
ecb9537c4e git: remove mock cache for Fedora because it seems to be duplicated with ccache 2024-05-20 01:35:12 +02:00
WerWolv
bba4cf9578 impr: Keep a safety backup of the last crash backup around 2024-05-19 23:13:46 +02:00
WerWolv
bfdb9b4019 impr: Allow views to opt out of having their open state saved 2024-05-19 21:51:55 +02:00
WerWolv
bad37d0940 fix: Crash when having path set in user folder settings page 2024-05-19 21:41:18 +02:00
WerWolv
62f5640678 patterns: Updated pattern language 2024-05-19 16:41:29 +02:00
WerWolv
71c1bcde0d feat: Added option to specify max file size to load into memory 2024-05-19 15:10:22 +02:00
SparkyTD
e9b492a287 lang: Added Hungarian translations (#1683)
### Problem description
ImHex didn't support Hungarian :(

### Implementation description
I translated ImHex to Hungarian :)

### Translation Coverage
| Plugin        | Percentage |
|---------------|------------|
| builtin       | 99%        |
| diffing       | 100%       |
| disassembler  | 100%       |
| hashes        | 95%        |
| script_loader | 100%       |
| ui            | 100%       |
| visualizers   | 100%       |
| windows       | 100%       |
| yara_rules    | 100%       |

### Additional Notes
There are four Hungarian "special" characters that fall outside the
default Unicode ranges loaded by ImHex, resulting in them being replaced
with the "�" character. These letters are Ő (U+0150), ő (U+0151), Ű
(U+0170) and ű (U+0171), all included in the Latin Extended-A Unicode
block.

The easy fix for this is to include the "Unicode Latin Extended-A" range
when loading the font glyphs in
[init_tasks.cpp:189](99abc4e78a/plugins/builtin/source/content/init_tasks.cpp (L189)).
This change would also unlock the full character range of Bosnian,
Croatian, Czech, Estonian, Latvian, Lithuanian, Maltese, Polish,
Romanian, Slovak, Slovene and Turkish. I can add the commit to this PR
if maintainers are okay with it. **EDIT:** Added a commit that loads
Latin Extended-A by default.

Also note that some words are longer than their English counterparts,
resulting in certain UI labels overflowing from their parent containers,
and being cut off. I might change some of the longer labels to be more
compact in the future, but the container size limitations will have to
be addressed eventually (e.g. with horizontal scrollbars).

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-19 14:33:33 +02:00
FireNX70
9b9b1aa6cc fix: Multisampling trying to use larger sample count than supported (#1670)
### Problem description
https://gitlab.freedesktop.org/mesa/mesa/-/issues/11135
It turns out LLVMpipe only supports 4x multisampling. Checking
GL_MAX_SAMPLES seems like the right thing to do.

### Implementation description
~~Right now, I only check GL_MAX_SAMPLES. Depending on the format, we
might need to check GL_MAX_INTEGER_SAMPLES. I don't know how likely it
is that you might want to use a different format in the future,
glGetInternalformativ might be a safer option to retrieve the max number
of samples we can use.~~

Ended up implementing it with glGetInternalformativ.

### Additional things
I guess I could merge the ```if```s at lines 95, 99 and 103 in
imgui_imhex_extensions.cpp while we're at it.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-19 14:18:12 +02:00
David Mentler
2cb673fd81 impr: Stop rubber banding while resizing on macOS (#1690)
### Problem description
On macOS `glfwSetWindowSizeCallback` is invoked early during window
resizing, rendering a frame in that callback leads to wonky results as
the new framebuffer is swapped before the OS has the chance to actually
resize the window:


https://github.com/WerWolv/ImHex/assets/1068675/46336419-3fc2-4aa1-b16f-68b0c00e3584

### Implementation description
Window contents are redrawn only from `glfwSetWindowRefreshCallback`
during resizing, fixing the issue:


https://github.com/WerWolv/ImHex/assets/1068675/3acc5d4a-b2a5-42f0-9015-5e7172a027cf
2024-05-19 14:14:57 +02:00
WerWolv
d5eb6b5bbc impr: Added data size widget 2024-05-19 10:21:54 +02:00
WerWolv
1e48277566 impr: Removed [Project] prefix from recent project entries 2024-05-19 10:21:30 +02:00
WerWolv
ec748f4a64 impr: Allow full magic analysis, removed unidentified data from magic report 2024-05-19 10:21:02 +02:00
iTrooz
22f1713739 fix: actually generate coverage data when compiling/running program (#1686) 2024-05-18 20:35:49 +02:00
WerWolv
f0e135530a impr: Add warning about using fractional scaling with default font 2024-05-18 20:32:57 +02:00
WerWolv
125d6a3e2a fix: Settings not being written anymore after restart 2024-05-18 20:32:34 +02:00
WerWolv
d078f9d847 fix: Icon size being off when using fractional scaling with default font 2024-05-18 19:39:29 +02:00
WerWolv
6b6a6ae5f0 impr: Added support for returning results from scripts 2024-05-18 12:57:29 +02:00
WerWolv
1d6676f059 fix: Empty tooltip showing when hovering over search bar in welcome screen 2024-05-18 11:58:25 +02:00
WerWolv
1e91505e6e fix: .NET script loader not initializing correctly on macOS 2024-05-18 11:10:55 +02:00
WerWolv
9e2f228d9a fix: Providers not being closable 2024-05-17 23:51:34 +02:00
WerWolv
7a1d163450 fix: Insert mode cursor not being visible 2024-05-17 23:51:26 +02:00
WerWolv
22e717d778 fix: Don't capture the editor pointer by reference 2024-05-17 23:19:28 +02:00
WerWolv
2546c042dc fix: Crash when clicking on Advanced search in find popup 2024-05-17 23:16:49 +02:00
WerWolv
b54f46de30 fix: Crash when setting selection in a hex editor instance without provider 2024-05-17 22:43:35 +02:00
WerWolv
94bc279bd8 impr: Improved colors of toggle switches 2024-05-17 22:20:56 +02:00
WerWolv
2f7c2e79d2 impr: Remove ugly dark edges around light theme backdrop image 2024-05-17 22:18:44 +02:00
WerWolv
2ed5381f5a impr: Make menu bar items collapse less quickly 2024-05-17 22:14:15 +02:00
WerWolv
964d98dd7b impr: Remove frame borders in more cases 2024-05-17 22:05:32 +02:00
WerWolv
0571dae9b7 impr: Added frame borders in light theme 2024-05-17 21:58:16 +02:00
WerWolv
563bf78f03 impr: Allow providers to be closed quicker after being opened 2024-05-17 21:56:43 +02:00
WerWolv
cf480d95db build: Updated dependencies 2024-05-17 21:08:54 +02:00
iTrooz
44331506b2 test: Add code coverage support with CodeCov (#1681) 2024-05-17 19:08:22 +00:00
WerWolv
f6953fd829 impr: Merge in script loader structure improvements from python branch 2024-05-17 21:01:35 +02:00
WerWolv
663b99ed64 impr: Remove border from (?) hover button 2024-05-17 20:47:22 +02:00
WerWolv
0ef3be1851 fix: Look of some buttons and text fields with frame borders turned on 2024-05-17 20:38:30 +02:00
WerWolv
0453a23b12 impr: Cleanup .NET script library and API 2024-05-17 20:38:30 +02:00
WerWolv
7a14e3dac4 fix: Wayland error discarding build errors with older GLFW versions 2024-05-17 20:22:55 +02:00
WerWolv
275774a10a fix: C# OnLoad method not being run correctly 2024-05-17 09:27:00 +02:00
WerWolv
a6277533e8 impr: Better Intel GPU log warning 2024-05-17 09:26:41 +02:00
WerWolv
1426424899 fix: Window scaling defaulting to 1.0x instead of Native 2024-05-17 09:26:28 +02:00
WerWolv
85fa1b2122 fix: Log spam on Wayland 2024-05-17 09:26:13 +02:00
WerWolv
c28522b7ef fix: Settings sometimes being reset on shutdown 2024-05-16 19:00:31 +02:00
WerWolv
d90a04990b fix: Section button tooltips being visible even when not hovering buttons 2024-05-15 18:31:27 +02:00
WerWolv
027ff793ed fix: Icon text input boxes being wider than expected 2024-05-15 18:27:09 +02:00
WerWolv
c69d3bc7f4 fix: Visual glitches with highlights and selections in the hex editor view 2024-05-15 18:27:09 +02:00
WerWolv
ca17054a1e impr: Store settings and achievements immediately 2024-05-15 18:27:09 +02:00
WerWolv
6a9e07729f impr: Make pattern data filter behave more intuitively 2024-05-15 18:27:09 +02:00
iTrooz
ceeda6de3b doc: remove hex.builtin.provider.memory name (#1675) 2024-05-14 12:17:36 +00:00
iTrooz
17ab059b12 fix: fix Pattern::callUserFormatFunc() (previously Pattern::formatDisplayValue() with 3 args) sharing cache with Pattern::getFormattedValue() (#1674) 2024-05-14 09:26:34 +00:00
WerWolv
dedd99f30c patterns: Updated pattern language 2024-05-12 23:19:59 +02:00
WerWolv
add94c5926 fix: Loading of custom data processor nodes 2024-05-12 23:19:39 +02:00
WerWolv
a239edc759 fix: Locking layout not working correctly 2024-05-12 23:19:29 +02:00
iTrooz
ff569417fc test: Add plcli integration tests (#1671) 2024-05-12 00:19:20 +00:00
iTrooz
240bb299f0 fix: Fix CI failure with ImGui::SetTooltip() (#1672) 2024-05-11 21:52:33 +02:00
iTrooz
e2dd12416c git: run CI on tests/** branches 2024-05-11 21:42:27 +02:00
SparkyTD
2a726c7136 fix: TextEditor line numbers were still partially rendered despite mShowLineNumbers being set to false (#1669)
### Problem description
TextEditor line numbers were still partially rendered despite
mShowLineNumbers being set to false

### Implementation description
I wrapped the line no. rendering code in `if (mShowLineNumbers) { ...
}`.

### Screenshots
Before:

![image](https://github.com/WerWolv/ImHex/assets/45818400/58a2cfdd-1ee0-484b-ba05-6e886ad4fd65)

After:

![image](https://github.com/WerWolv/ImHex/assets/45818400/5d204e2b-12a5-4fc9-bcfc-da6b8e6359e1)
2024-05-11 18:11:14 +02:00
SparkyTD
62aea46c61 impr: Ensure that Text Editor's cursor blink state is never invisible after a keyboard event (#1664)
### Problem description
By default, the cursor's blinking cycle is independent from user
actions, which feels unconventional while editing pattern code. This
change ensures that the blinking cycle is reset, and the cursor is made
visible every time the editor receives a keyboard event like character
entry, or arrow navigation.


### Implementation description
I moved the hard-coded blink timing numbers to their dedicated static
constant fields since now they are referenced from multiple different
places.

I added the function `void ResetCursorBlinkTime()` to `TextEditor.cpp`
that will reset the blink cycle to `currentMillis() -
sCursorBlinkOnTime`, ensuring that the cursor is visible. This function
is called for every keyboard and mouse click event.

### Screenshots
Before:


https://github.com/WerWolv/ImHex/assets/45818400/668c6802-79a3-450b-80d3-d6abf2ce27be

After:


https://github.com/WerWolv/ImHex/assets/45818400/ee7f60e0-a75f-416d-b86d-8d12b5cdadf2

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-11 15:58:55 +02:00
SparkyTD
09bffb6745 impr: Add a link to the "Find" view in the search popup (#1665)
### Problem description
This PR adds a shortcut link on the Search (Ctrl+F) popup to the more
advanced "Find" view that is normally accessible at the `View > Find`
menu.

### Implementation description
I added a simple `ImGuiExt::IconHyperlink` link to the `draw()` function
of the `PopupFind` class to display the hyperlink. Clicking the link
will open the Find view, bring it into focus and close the current
popup.

### Screenshots
Before:

![image](https://github.com/WerWolv/ImHex/assets/45818400/0961f594-0548-426a-8622-20093d4a165e)

After:

![image](https://github.com/WerWolv/ImHex/assets/45818400/d40d78f4-1a5d-4bf6-97a4-ff7ab40d0cef)


### Additional things
- Localization keys were added to all .json files, but only `en_US` is
populated for now.
2024-05-11 10:15:17 +02:00
SparkyTD
3c91cb09e3 fix: Crash caused by missing ImGui::BeginDisabled() (#1667)
### Problem description
Merging my previous PRs, #1660 and #1658 has resulted in a conflict
causing an application crash due to a missing `ImGui::BeginDisabled();`
in the `PopupSelect` class. Specifically, none of the code related to
offset validation made it into the final merge. This PR fixes the crash
by reintroducing the deleted lines.

### Additional things
The nightly release build seems to be unaffected by the crash, most
likely because ImGui's `DisabledStack` assertions are only enforced in
Debug mode. The offset validation was still missing before this fix.
2024-05-11 00:52:43 +02:00
WerWolv
881a379fb4 fix: Compile error due to un-unpacked expected value 2024-05-10 23:02:39 +02:00
WerWolv
90a67af887 impr: Added better error messages to intel hex and motorola srec providers 2024-05-10 23:01:36 +02:00
WerWolv
d727100304 impr: Added tooltips for section view and export buttons 2024-05-10 22:54:55 +02:00
WerWolv
543fcf5447 impr: Make in variable values persistent between parser runs again 2024-05-10 22:51:53 +02:00
WerWolv
e9b140b75c impr: Make out variable values selectable and copyable in pattern editor 2024-05-10 22:41:12 +02:00
WerWolv
92a9843ef7 patterns: Updated pattern language 2024-05-10 22:40:53 +02:00
WerWolv
12528d6e6e fix: Edit -> Jump To -> Current Pattern not always resetting request correctly 2024-05-10 22:18:21 +02:00
WerWolv
8fae55487a fix: Closing providers not clearing selection correctly 2024-05-10 22:10:59 +02:00
SparkyTD
973af4650c impr: Convert all hex editor popups to floating, movable windows (#1658)
### Problem description
In previous versions of ImHex, all tool windows were implemented as
static popups fixed in the upper left position of the hex view. This PR
refactors all tool popups to use floating windows that can be dragged
around by the user, or closed with a dedicated close button on the title
bar. These popup also support a stylable transparency when the user is
not hovering their mouse over the window.

### Implementation description
I rewrote the logic in `ViewHexEditor::drawPopup()` to use a custom
`ImGuiExt::BeginHoveringPopup` function for rendering the popup windows.
This new function is an almost exact replica of the built-in
`ImGui::BeginPopupModal`, except it does also displays the default
window title bar with a close button.

A second custom function, `ImGuiExt::PopupTitleBarButton` was also added
for rendering small icon-based buttons into the title bar of the parent
popup window. This new function was used to implement an optional
"Pinning" feature that individual popup implementations can specify. If
a window is pinned, it won't close automatically when its main action is
executed. For example, the "Select" button on the Select dialog will
close the popup by default, unless the window is pinned.

### Screenshots
Popup dialogs before:

![image](https://github.com/WerWolv/ImHex/assets/45818400/7c253181-8284-4076-a066-089403554f0f)

Popup dialogs after:


https://github.com/WerWolv/ImHex/assets/45818400/99d1a628-8ac1-40ac-9146-9062091bb0db



### Additional things
- When the user stops hovering their mouse over a popup window, it
becomes semi-transparent, making it easier to see the content behind it
- This PR also introduces the `styles.imhex.popup-alpha` style, making
the transparency effect configurable, including the ability to disable
the effect completely by setting `popup-alpha` to `1.0`.
- Fixed a bug that caused some popup windows to ignore the Enter and the
KeypadEnter keys. With this PR, all tool windows will execute their main
action when the user presses either one of the two Enter keys, and will
also close automatically unless the window is pinned.

### Possible changes and improvements
- Should the transparency effect be disabled if a window is pinned?
- Should the transparency factor be modifiable on the Settings/Interface
page?
- A keyboard shortcut could be added for quickly pinning / unpinning the
current window.
- Can the pin icon stay on the left, or should it be moved next to the
close button, with a similar circular background?

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-05-10 21:21:19 +02:00
SparkyTD
5f192d5dc7 impr: Don't move hex editor scroll position when jumping to address that's on-screen (#1660)
### Problem description
This PR offers two improvements:
1) When selecting / jumping to an offset that falls within the current
viewport of the scroll view, the scroll offset will no longer force the
selected byte to the top of the view. Instead, the scroll offset will
only be changed if the selected byte is outside the current view.

2) In case a wrong offset is entered into the Select or Goto dialog
(e.g. and offset beyond EoF), the dialog's button will be disabled.

### Implementation description
For the first change, I modified the logic that recalculates the
`m_scrollPosition ` based on the current byte offset.

For the second change, I added validation logic to both popups to ensure
that the entered offsets are valid (using `provider->getActualSize()`).
In case of the Select popup, I wrapped the button into an
`ImGui::Begin/EndDisabled` to enforce the validation check.
2024-05-10 21:20:10 +02:00
WerWolv
ec39546fed patterns: Updated pattern language 2024-05-10 11:14:53 +02:00
SparkyTD
ea0cafa229 fix: Not being able to close certain modal popups with the close button on the title bar (#1659)
### Problem description
When the close button is clicked, `ImGui::BeginPopupModal()` sets the
bool passed into the second parameter (p_open) to false. However, the
closing logic did not take this into account, making it difficult to
actually close modal popups.

For example, closing the "Export pattern File" modal took several clicks
on the "X" button, now it closes instantly.

### Implementation description
I added an additional check for the `open` variable being `false` in the
logic that checks the closing condition.
2024-05-09 17:49:31 +02:00
WerWolv
978fa17932 impr: Make accept pattern popup open faster and close correctly 2024-05-08 23:54:09 +02:00
WerWolv
6602e800ac fix: Make sure texture multisampling framebuffer is being unbinded in all cases
#1653
2024-05-08 23:08:53 +02:00
WerWolv
fdf9209605 build: Updated ImGui to v1.90.6 2024-05-08 22:56:20 +02:00
WerWolv
8a3739ee1c impr: Display background scripts in about page 2024-05-08 22:30:53 +02:00
WerWolv
89f360d1a7 fix: Texture multisampling being used on OpenGL < 3.2
#1653
2024-05-08 22:09:47 +02:00
WerWolv
d7ddf991a9 fix: Missing includes 2024-05-08 21:44:30 +02:00
WerWolv
19c02be673 impr: Only store paths with forward slashes in project files
Fixes #1657
2024-05-08 21:30:20 +02:00
SparkyTD
adbcc48de7 fix: Multiple file reload popups stacking on top of each other (#1654)
<!--
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 PR aims to address #1645 that caused the built in file provider's
change monitor to trigger the notification popup dialog multiple times
in a row after multiple external file changes.

### Implementation description
I added an additional boolean field
`m_changeEventAcknowledgementPending` that tracks whether there are any
pending or unacknowledged change notification dialogs to prevent further
dialogs from being opened. The flag is only reset to its initial value
once the user has acknowledged the first `PopupQuestion` dialog.

Since the file is reloaded only after the user clicks 'Yes', it is
unnecessary to ensure that only the latest popup is acknowledged.
2024-05-07 23:43:20 +02:00
WerWolv
a5eb031401 fix: Pattern data view rendering of bitfields within bitfields being broken 2024-05-07 23:32:51 +02:00
WerWolv
10351c5bdc fix: Text editor cursor not showing up anymore 2024-05-07 23:32:27 +02:00
WerWolv
5bc60d4b63 build: Updated dependencies 2024-05-07 23:32:12 +02:00
WerWolv
32a659a477 fix: Command palette losing focus when pressing Alt
Fixes #1651
2024-05-04 21:30:21 +02:00
WerWolv
40c4dbc20e impr: Make main menu bar not collapse completely when there's not enough space 2024-05-04 21:23:18 +02:00
WerWolv
f2b4e49ff3 fix: Crash when loading oobe screen 2024-05-04 19:54:57 +02:00
WerWolv
39dd67af78 patterns: Updated pattern language 2024-05-03 21:57:57 +02:00
WerWolv
337ec6bca6 impr: Better OpenGL texture load error messages 2024-05-03 21:41:02 +02:00
WerWolv
2994e69c08 impr: Refactor GLFW window hints into individual window files 2024-05-03 21:39:31 +02:00
WerWolv
49987b8793 impr: Indent license information in about page slightly 2024-05-03 21:38:35 +02:00
WerWolv
0f5e125992 impr: Added back multisampling with proper detection logic 2024-05-03 19:27:12 +02:00
WerWolv
57857559f5 fix: Disable texture multisampling for now as it causes issues on certain platforms 2024-05-03 14:02:43 +02:00
WerWolv
4eba620bee fix: Web version not starting due to unsupported texture multisampling 2024-05-02 09:40:39 +02:00
WerWolv
964a2e990e git: Fix broken .gitmodules 2024-05-01 20:51:44 +02:00
WerWolv
761bc941a8 impr: Make right click menus open faster 2024-05-01 20:50:35 +02:00
xtex
aa5a3ed080 lang: Refactored langtool, updated chinese translation (#1623)
- Better argument parsing
- Allow processing all language folders at the same time
- Allow an optional reference language when translating
- Save translations on KeyboardInterrupt
- Fixes a ooold input issues by importing readline
(https://github.com/kovidgoyal/kitty/issues/6560)
- Add untranslate mode to remove translations by a key regex

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-01 20:49:55 +02:00
daver32
6fbbf899b0 fix: Frame rate getting unlocked when inputs are being processed (#1632)
### Problem description
The framerate limiter doesn't work when inputs are being sent (eg mouse
cursor moving over the window), because `glfwWaitEventsTimeout` returns
early when it encounters an event.

### Implementation description
I made it sleep for the remaining time when that happens.
2024-05-01 20:48:41 +02:00
WerWolv
1df0eea6c6 impr: Added support for SVG loading, improved texture loading API 2024-05-01 20:36:10 +02:00
WerWolv
ef99e9d6f8 fix: Selectable text behaving weirdly when selecting 2024-04-29 21:20:54 +02:00
WerWolv
a685d2e97d impr: Make integer node accept math expressions 2024-04-29 21:20:38 +02:00
WerWolv
df04acc1b9 impr: Allow specifying buffer size in integer to buffer cast node 2024-04-29 21:20:22 +02:00
WerWolv
f510faa1da impr: Make integer, float and buffer visualizers selectable, added more radixes to integer node 2024-04-29 21:19:54 +02:00
WerWolv
3ad2c74519 impr: Make right click menu in data processor feel less sluggish 2024-04-29 20:43:25 +02:00
WerWolv
0e58204501 impr: Remove underline from hyperlinks if they're not hovered 2024-04-29 20:06:50 +02:00
WerWolv
f847807df5 fix: Buffer display data processor node being way too wide
#1644
2024-04-29 19:48:02 +02:00
WerWolv
81982aa821 impr: Make windows always fully opaque when they're not docked 2024-04-27 20:19:45 +02:00
WerWolv
08fc393451 build: Get rid of liblibimhex 2024-04-27 20:19:26 +02:00
Nora
a7033b68f7 feat: Support DWM immersive dark mode on Windows (#1636)
### Problem description
Implements support for DWM immersive dark mode.  
Closes #1635.

### Implementation description
Uses the DwmSetWindowAttribute API to enable this feature.

Documentation can be found
[here](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/apply-windows-themes#enable-a-dark-mode-title-bar-for-win32-applications).

### Screenshots
Before:

![image](https://github.com/WerWolv/ImHex/assets/51166756/a2be204f-aa2d-44d7-8628-643a903d6679)

After:

![image](https://github.com/WerWolv/ImHex/assets/51166756/f6c9ab41-c811-45f7-826f-401dd712674b)

### Additional things
Nothing.
2024-04-27 10:03:44 +02:00
WerWolv
3794aa425d feat: Display destination address in goto popup 2024-04-23 23:26:58 +02:00
WerWolv
a1ea8dfd84 fix: Build issue again when GLFW_WAYLAND_APP_ID isn't defined 2024-04-23 21:03:04 +02:00
WerWolv
79e1df1af2 fix: Exporting selection doesn't export last byte 2024-04-23 21:02:16 +02:00
WerWolv
fd61e757f0 impr: Make unsaved changes popup behave more like in other applications 2024-04-23 21:02:16 +02:00
WerWolv
7ec245925a fix: Lockup when changing themes in some cases 2024-04-23 21:02:16 +02:00
WerWolv
f913cd742f impr: Added new ImHex Banners 2024-04-23 21:02:16 +02:00
Nik
cc7a0db35c fix: Build issue when GLFW_WAYLAND_APP_ID isn't defined 2024-04-21 17:04:56 +02:00
Integral
6f11873d7e fix: Missing window icon under wayland (#1633)
<!--
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
When running ImHex under Wayland, the window icon is missing.

### Implementation description
Setting
[```GLFW_WAYLAND_APP_ID```](https://www.glfw.org/docs/latest/group__window.html#gafbf1ce7a4362c75e602a4df9e1bdecd3)
to fix the issue.

### Screenshots
Before:

![Screenshot_20240420_162144](https://github.com/WerWolv/ImHex/assets/71180087/3318970f-6ed7-4161-b686-c2eaa28a0739)


After:

![Screenshot_20240420_161920](https://github.com/WerWolv/ImHex/assets/71180087/e9e35fb6-e3c1-44a8-b7a5-b145dfe225d9)


### Additional things
<!-- Anything else you would like to say -->
2024-04-21 12:24:20 +02:00
WerWolv
4b1b52caf0 fix: Cell highlighting in hex editor view overlapping at non-integer scale factors 2024-04-13 15:34:12 +02:00
WerWolv
e9ebfe36b0 build: Updated ImGui to v1.90.5 2024-04-12 22:56:10 +02:00
WerWolv
43149498cf fix: Main window being hard to resize when bytes are selected in the hex editor view 2024-04-12 22:55:54 +02:00
FireNX70
43070a1f5b fix: Diff table in diffing view displaying incorrect end address (#1627)
Trivial fix for #1617 .
2024-04-11 23:49:58 +02:00
WerWolv
f135bd86ac patterns: Updated pattern language 2024-04-11 22:59:09 +02:00
WerWolv
0bd8c5d115 fix: Color vector in 3D visualizer not getting assigned the correct size 2024-04-10 22:53:51 +02:00
WerWolv
9de10df90d fix: Store hanging when updating all entries in some cases 2024-04-10 22:52:21 +02:00
WerWolv
46ed6e2487 patterns: Updated pattern language 2024-04-10 22:52:06 +02:00
WerWolv
d81d409051 impr: Modernize ImHex logo 2024-04-10 21:05:38 +02:00
WerWolv
5f75c8684f impr: Better UI for the case when no plugins could be loaded 2024-04-10 21:04:57 +02:00
WerWolv
5d08499d20 impr: Use sidebar for settings categories instead of tabs 2024-04-10 19:55:37 +02:00
WerWolv
4115184952 patterns: Updated pattern language 2024-04-05 18:49:40 +02:00
WerWolv
e6a14977b9 fix: Highlight and tooltip flickering when hovering over highlighted patterns 2024-04-05 18:49:19 +02:00
WerWolv
a449f7a5e3 build: Updated libwolv 2024-03-30 13:36:02 +01:00
WerWolv
51302cfd88 build: Lock libmagic to latest release in M1 macOS docker file 2024-03-30 11:03:45 +01:00
WerWolv
696612385a fix: Use std::ranges::find instead of std::ranges::contains for now 2024-03-29 16:34:01 +01:00
WerWolv
edf047dde8 impr: Cleanup bookmark UI 2024-03-29 15:40:15 +01:00
WerWolv
166cd6c426 patterns: Updated pattern language 2024-03-29 15:38:13 +01:00
WerWolv
51010096bb feat: Added provider information to search bar hover tooltip 2024-03-29 15:38:03 +01:00
WerWolv
4e5a7ba483 fix: Closing providers still appearing in the provider list 2024-03-29 15:37:34 +01:00
WerWolv
92803c1536 feat: Added simple insert mode to hex editor 2024-03-29 13:22:28 +01:00
RoboSchmied
cc593fb6c4 fix: Misspelling of Endianness (#1609)
### Problem description
fix 40 typos

### Implementation description
`endianess` => `endianness`

Signed-off-by: RoboSchmied <github@roboschmie.de>
2024-03-28 22:25:28 +01:00
York Waugh
aeabc0c436 lang: Updated Simplified Chinese translation (#1610)
Thank you for an outstanding program! I have updated the Simplified
Chinese translation. Hope you can adopt it.
2024-03-28 22:24:51 +01:00
Kihau
32ad8ddb53 build: Added dependency download script for OpenSUSE Tumbleweed (#1612)
## Add dependency download script for OpenSUSE Tumbleweed.

### Testing
After installing the dependencies, I have managed to successfully
compile the project as described in the building instructions:
https://github.com/WerWolv/ImHex/blob/master/dist/compiling/linux.md

I have tested the script on a fresh installations of the OpenSUSE:
- Tumbleweed Server
- Tumbleweed Generic Desktop

### Note
Dependencies added in the script are based off of scripts for other
Linux distributions.
Because of that, some download dependencies might not be necessary (or
could be already included by other packages), so it is very much
possible that some of them could be removed.
2024-03-28 22:24:10 +01:00
WerWolv
f084bc4147 fix: View registers causing crashes when being deleted 2024-03-28 22:21:00 +01:00
WerWolv
cb1dcc2c9f impr: Disable achievement popups if tutorial is skipped 2024-03-28 22:15:48 +01:00
WerWolv
8030de7af2 fix: Icons not being fractionally scaled anymore 2024-03-28 22:15:30 +01:00
WerWolv
dd5ddbcc0f fix: Settings being overwritten sometimes on crash 2024-03-26 19:49:10 +01:00
WerWolv
f587710d1c fix: Multiple memory corruption issues 2024-03-26 19:49:10 +01:00
WerWolv
99142525b6 patterns: Updated pattern language 2024-03-26 19:47:45 +01:00
WerWolv
2d9ef1142d build: Updated dependencies 2024-03-26 19:47:39 +01:00
WerWolv
547169ea78 fix: Missing includes 2024-03-26 19:46:25 +01:00
WerWolv
8d08ab20ec fix: Added missing ImHex paths to about page 2024-03-26 19:18:34 +01:00
WerWolv
966a780432 impr: Updated contributors list 2024-03-25 21:02:55 +01:00
WerWolv
99abc4e78a fix: Unifont characters being scaled wrongly
Fixes #1616
2024-03-25 20:41:39 +01:00
WerWolv
ce1d581c3f fix: Settings values being uninitialized by default 2024-03-25 20:41:05 +01:00
WerWolv
b31ae6e690 impr: Optimize includes in logger 2024-03-25 20:37:19 +01:00
WerWolv
e984fde966 fix: Crash on some platforms due to empty main menu bar
#1600
2024-03-23 12:26:23 +01: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
dd20a16d3a git: Fix macOS bundle upload path 2024-03-22 22:35:44 +01:00
WerWolv
7d22b71e86 git: Fix bundle path for signing 2024-03-22 22:24:25 +01:00
WerWolv
567ccbfc3a build: Don't postprocess libimhex.dylib 2024-03-22 22:18:18 +01:00
WerWolv
ca40775678 git: Make sure CI bundles correct macOS bundle into dmg 2024-03-22 21:57:33 +01:00
WerWolv
4916e5542a fix: Splash screen being scaled incorrectly 2024-03-22 17:52:10 +01:00
WerWolv
ac8ec2b622 fix: Icons not being scaled correctly anymore 2024-03-22 17:52:00 +01:00
WerWolv
9b9f7e2a1d fix: Decompress functions not extracting full data
Thanks a lot to tocklime
2024-03-22 17:34:49 +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
c8ca84ede9 fix: Prevent view providers from pointing to themselves and being saved as recent provider
#1607
2024-03-22 00:16:28 +01:00
WerWolv
ed2939c39e impr: Better UI and UX for the hex editor footer 2024-03-21 23:50:34 +01:00
WerWolv
d36bd253e8 feat: Allow shift-selecting multiple find view occurrences 2024-03-21 23:50:13 +01:00
WerWolv
4615dce0a9 build: Try fixing packaging issues with macOS bundles 2024-03-21 21:56:27 +01:00
WerWolv
7ce8aa3638 impr: Added better error logging in script loader init 2024-03-21 21:39:29 +01:00
WerWolv
9236b92dc1 fix: Memory leak when closing ImHex 2024-03-21 21:39:29 +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
WerWolv
61b9c0970b impr: Load unifont at correct size
Fixes #1604
2024-03-21 21:27:50 +01:00
paxcut
3b3701135f impr: Various fixes and an enhancement for the pattern editor (#1528)
Fixed console error messages using doc comment syntax highlights. Fixed
results of find not updating when march case was toggled. Fixed syntax
highlights of nested ifdefs. Fixed editor cursor blinks if OS focus goes
to another window. Fixed Highlights of "\\\"" was incorrectly handled.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-03-21 12:58:20 +00:00
iTrooz
f5987fde5a git: Fix MacOS packaging workflow in PRs (#1601)
Fix GeekyEggo/delete-artifact failing in PRs

https://github.com/GeekyEggo/delete-artifact/issues/25
2024-03-21 13:33:46 +01:00
iTrooz
e56b34f174 build: Mark tryDemangle as [[maybe_unused]] (#1606) 2024-03-21 13:33:23 +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
48db4df028 build: Updated libromfs 2024-03-17 13:31:03 +01:00
WerWolv
86a0693081 fix: Crash when trying to open unopenable file 2024-03-17 13:20:02 +01:00
WerWolv
6295c1d0c3 feat: Added table pattern visualizer 2024-03-17 13:19:37 +01:00
WerWolv
35d29c8e30 patterns: Updated pattern language 2024-03-16 14:59:26 +01:00
WerWolv
ca78c4c2fc fix: Build errors when stacktrace headers are not present 2024-03-16 14:59:05 +01:00
WerWolv
f276409cde patterns: Updated pattern language 2024-03-16 10:03:23 +01:00
WerWolv
682f7bee72 patterns: Updated pattern language 2024-03-15 21:11:36 +01:00
WerWolv
43bec6a636 fix: Make sure pattern runtime is always properly configured 2024-03-15 21:08:03 +01:00
WerWolv
6eb9c750a7 fix: File open achievement not triggering when dropping a file onto ImHex 2024-03-15 21:07:45 +01:00
WerWolv
31c93c8c5c impr: Properly clear pattern editor when closing last provider 2024-03-15 21:07:21 +01:00
WerWolv
5aa1046541 fix: Potential crash when log file is unavailable 2024-03-15 21:06:47 +01:00
WerWolv
0f4504476a fix: File changed popup showing up when saving memory mapped file 2024-03-15 17:57:12 +01:00
WerWolv
3897245a7e fix: Control characters ending up in log files 2024-03-15 17:57:12 +01:00
WerWolv
373db3de95 fix: Potential crash on Linux when loading external libraries 2024-03-15 17:54:09 +01:00
WerWolv
a1437658af impr: Generate more useful stack traces on Linux 2024-03-15 17:53:12 +01:00
WerWolv
f4ec69021d impr: Manually implement VSync because GPU manufacturers are terrible at writing drivers 2024-03-14 21:18:57 +01:00
WerWolv
6012f20fb3 fix: Remove unused member variable in script loader provider wrapper 2024-03-14 20:56:08 +01:00
WerWolv
95da957f73 impr: Try to improve framerate limiting once more 2024-03-14 19:56:09 +01:00
WerWolv
642722bdb1 build: Enable cimgui on web builds again 2024-03-14 18:58:39 +01:00
WerWolv
cbc31f3c18 feat: Added short forms for commonly used commands 2024-03-14 18:24:31 +01:00
WerWolv
f2309ba079 impr: Make export selection task cancelable 2024-03-14 18:24:01 +01:00
WerWolv
246ed15d6d fix: Infinite loop when exporting selection to file 2024-03-14 17:52:44 +01:00
WerWolv
88756c83c7 fix: Right clicking reverse selected regions deselecting it 2024-03-14 17:49:46 +01:00
WerWolv
cf320266df fix: Linux build issues 2024-03-14 17:49:04 +01:00
WerWolv
47e7e80afe fix: Various issues with the virtual file system 2024-03-14 13:26:53 +01:00
WerWolv
0d880babfb fix: Advanced data information not showing up correctly 2024-03-13 22:39:21 +01:00
WerWolv
28ba34f1bf fix: Diffing option popup flickering when opening 2024-03-13 22:39:00 +01:00
WerWolv
e786cb8180 feat: Added option to create menu items from scripts 2024-03-13 19:50:05 +01:00
WerWolv
458584d778 feat: Added logger module to script loader 2024-03-13 19:49:48 +01:00
WerWolv
2c711ea206 feat: Load additional libraries from ImHex's /lib folder 2024-03-13 19:49:04 +01:00
WerWolv
7b25be51a5 fix: Base address issues with the data inspector and copy as array option
Fixes #1595
2024-03-13 16:38:44 +01:00
WerWolv
45b05a4846 fix: Denying server contact leaving crash upload option enabled
Fixes #1594
2024-03-13 09:41:04 +01:00
WerWolv
6972736abf fix: Remaining build issues 2024-03-13 09:40:37 +01:00
WerWolv
3798654f92 fix: Unix build issues with dladdr 2024-03-13 08:38:40 +01:00
WerWolv
fdf01dfb50 impr: Get rid of cimgui shared library by hooking pinvoke handler 2024-03-12 23:17:49 +01:00
WerWolv
876f091244 build: Make cimgui a shared library again 2024-03-12 19:44:21 +01:00
WerWolv
2988561f01 build: Try fix building issues with web build and Fedora 2024-03-12 19:09:01 +01:00
WerWolv
fbfc319ac1 build: Make dotnet script loader initialize properly with newer SDK version 2024-03-12 19:08:14 +01:00
WerWolv
9b1417f32d fix: ImHex using a ton of CPU power on Linux 2024-03-12 09:06:58 +01:00
WerWolv
c727762940 impr: Added AxCut to the about page 2024-03-11 21:26:03 +01:00
WerWolv
e3565d5bcb feat: Added support for creating views and drawing ImGui elemts from C# 2024-03-11 21:09:56 +01:00
WerWolv
a3f550c585 fix: Toasts not printing their message to the console correctly 2024-03-11 21:09:56 +01:00
WerWolv
c610d804b1 build: Added cimgui 2024-03-11 21:09:56 +01:00
WerWolv
3d592dbc79 fix: Highlighting not updating correctly when changing bookmark region
Fixes #1591
2024-03-11 14:00:52 +01:00
WerWolv
0186f2f456 feat: Added support for adding custom providers through C# 2024-03-10 22:05:26 +01:00
WerWolv
d817a813b0 fix: Update all task progress not increasing correctly 2024-03-10 18:59:35 +01:00
WerWolv
1d219ba511 build: Updated libwolv 2024-03-10 17:32:46 +01:00
WerWolv
285afb6d4b build: Updated libwolv 2024-03-10 15:58:57 +01:00
WerWolv
ca3708df71 fix: std::bind_front not supporting member functions everywhere 2024-03-10 15:40:32 +01:00
WerWolv
c2aafb14c2 fix: View provider not saving top-level data to project file 2024-03-10 15:32:01 +01:00
WerWolv
d4d1acb555 feat: Added --verbose command line option to enable debug logs 2024-03-10 15:22:14 +01:00
WerWolv
d1a59f8c1b fix: View provider not correctly saving its state to a project file 2024-03-10 15:17:15 +01:00
WerWolv
2fd17f97b6 build: Updated libwolv 2024-03-10 14:38:28 +01:00
WerWolv
45a3bdffe0 impr: Load small files into memory, open larger files as read-only by default
#841, #1585
2024-03-10 14:31:39 +01:00
iTrooz
f050c69ccd fix: fix ui plugin linking to pl when libimhex already does it (#1583) 2024-03-03 15:31:40 +00:00
WerWolv
c31a2551f1 git: Update release actions 2024-03-02 17:42:19 +01:00
WerWolv
90e93492a7 fix: Updater not working correctly on Windows 2024-03-02 17:42:02 +01:00
WerWolv
54266bf63b fix: Remove debug popup function in release mode to avoid build errors 2024-03-02 14:23:52 +01:00
WerWolv
ba12f7aec9 impr: Added testers to About screen 2024-03-02 11:57:30 +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
bbbf836374 fix: Race condition when downloading multiple elements from the content store 2024-03-02 10:57:37 +01:00
WerWolv
f1b91ef360 fix: MIME based auto loading not working correctly 2024-03-02 10:57:13 +01:00
WerWolv
f6c59b456f impr: Move selection information to the top of the hex editor footer 2024-03-02 09:52:40 +01:00
WerWolv
8f3f941600 impr: Prevent ImHex from getting stuck in an infinite crash loop 2024-03-02 09:52:09 +01:00
WerWolv
e561f49e80 impr: Make welcome screen background look more interesting 2024-03-01 20:57:07 +01:00
WerWolv
2ff884fd11 feat: Replaced debug button functions with full debug menu 2024-03-01 20:56:46 +01:00
WerWolv
296af748ee fix: Platform window not being updated when recovering from a crash 2024-03-01 20:55:03 +01:00
WerWolv
0cb10fcc34 fix: Endless loop when throwing exception in deferred tasks 2024-03-01 20:54:27 +01:00
WerWolv
4a67ea0b29 patterns: Updated pattern language 2024-03-01 18:38:11 +01:00
WerWolv
8e94acc98f fix: Compile error 2024-03-01 18:37:28 +01:00
WerWolv
39cda3764b patterns: Updated pattern language 2024-03-01 18:23:45 +01:00
iTrooz
97f5175c84 impr: Better recovery from exceptions thrown in main thread (#1577)
This PR improves many things which can be seen by the commit name, but
the most important thing is the addition of a popup telling the user
when an exception is thrown


![image](https://github.com/WerWolv/ImHex/assets/42669835/db796416-9cce-4aa5-ad60-c22f05b5fc73)
2024-03-01 18:21:15 +01:00
WerWolv
78f8e5055e impr: Show hint if advanced data information section doesn't yield any result 2024-03-01 16:51:02 +01:00
WerWolv
735d896260 git: Run workflows on release branches 2024-02-29 22:28:29 +01:00
WerWolv
cb7a6596ba patterns: Updated pattern language 2024-02-29 22:23:34 +01:00
WerWolv
fdaa56fd86 build: Disable unknown pragmas warning 2024-02-29 21:49:36 +01:00
WerWolv
667b940feb fix: Build with precompiled headers for WebAssembly 2024-02-29 21:29:26 +01:00
WerWolv
bb3de7d510 fix: Build with precompiled headers on Linux 2024-02-29 21:15:51 +01:00
WerWolv
7bdde15796 build: Don't add defines to libimhex after precompiling headers 2024-02-29 20:39:14 +01:00
WerWolv
c412ba66d8 git: Updated compile instructions 2024-02-29 20:16:03 +01:00
WerWolv
dd62bee264 build: Added precompiled headers 2024-02-29 19:57:20 +01:00
WerWolv
f886eac7b5 build: Updated libwolv 2024-02-28 23:52:39 +01:00
WerWolv
623079ca40 fix: Pressing buttons while window is unfocused not working 2024-02-28 23:52:07 +01:00
WerWolv
ce9bd796d6 fix: Inserting bytes and resizing files not working correctly 2024-02-28 22:21:14 +01:00
WerWolv
d5f323a2cd feat: Allow workspaces to be deleted the same way as layouts
Fixed #1576
2024-02-28 22:10:48 +01:00
WerWolv
40592a93ac fix: MIME-based pattern loading not working correctly
Fixes #1574
2024-02-28 20:54:51 +01:00
WerWolv
dc1a5a860c fix: Buggy window detachment 2024-02-28 20:36:22 +01:00
WerWolv
f7b431902d fix: Make sure glfw waits properly on Wayland 2024-02-28 20:16:15 +01:00
WerWolv
686d47a59e fix: Frame limiting not working correctly on Linux 2024-02-28 18:48:01 +01:00
WerWolv
eaa4688182 fix: Crash when using CRC hashes 2024-02-27 22:39:18 +01:00
WerWolv
72645aa800 fix: Read-only file toast showing up for all providers 2024-02-27 20:20:28 +01:00
WerWolv
7044fc8004 fix: Import menu being disabled with read-only providers
Fixes #1573
2024-02-27 19:41:33 +01:00
Justus Garbe
9e8c780d66 fix: Use explicit string argument according to -Wformat-security on clang (#1572) 2024-02-27 19:07:44 +01:00
WerWolv
e1795d687f impr: Implement a better algorithm to determine if the frame content has changed 2024-02-27 18:55:18 +01:00
WerWolv
607f7cba8d fix: Yara rules not being read correctly in data information section 2024-02-27 18:01:30 +01:00
WerWolv
2572e23928 impr: Add better error handling when loading projects 2024-02-26 21:48:56 +01:00
WerWolv
60921031bd fix: Opening project files through the command line opening them as regular files 2024-02-26 21:43:28 +01:00
WerWolv
77550d902c feat: Added option to disable annotations in byte type graph 2024-02-26 21:41:43 +01:00
WerWolv
41935781fb fix: Build error due to use of localized strings 2024-02-26 21:13:57 +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
032ef0722d patterns: Updated pattern language 2024-02-26 20:49:42 +01:00
WerWolv
6e32f03a6b feat: Added plain text and similar bytes regions to byte types diagram 2024-02-26 20:49:35 +01:00
WerWolv
5731dcf135 impr: Make hex editor minimap rows stay a fixed height 2024-02-26 20:49:15 +01:00
WerWolv
66e0f54d0e build: Bumped version to 1.33.0 2024-02-25 21:54:48 +01:00
WerWolv
cadc9cecf1 build: Updated dependencies 2024-02-25 21:21:34 +01:00
WerWolv
491e2dfe56 fix: Parent hover setting name being wrong 2024-02-25 14:38:26 +01:00
WerWolv
29c7b342eb impr: Make file chooser filter bar be focused by default 2024-02-25 14:34:09 +01:00
WerWolv
ea601a7d03 feat: Added option to highlight pattern parents in the hex editor when hovering 2024-02-25 14:30:56 +01:00
WerWolv
dac45659c0 patterns: Updated pattern language 2024-02-25 12:35:09 +01:00
WerWolv
4f72c60eb0 fix: Text editors highlighting doc comments when they shouldn't 2024-02-25 12:35:01 +01:00
WerWolv
7434fdec6f impr: Move advanced analysis yara rules to the patterns repo 2024-02-25 11:32:05 +01:00
WerWolv
c4f3ea901a feat: Added more yara detection rules for languages, compilers and envs 2024-02-25 11:20:35 +01:00
WerWolv
58ad9f2ca8 impr: Small code layout improvements for diagrams 2024-02-25 11:20:04 +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
afede0ff9c fix: Yara rule matching not working properly with non-zero base addresses 2024-02-25 00:16:14 +01:00
WerWolv
d51b065723 fix: Yara information task not being interruptable 2024-02-25 00:09:06 +01:00
WerWolv
752a2d2e8d fix: Magic information querying being wrong with non-zero base address 2024-02-24 23:53:34 +01:00
WerWolv
b57eaca365 build: Try to fix sdk packaging 2024-02-24 23:41:22 +01:00
WerWolv
859574c014 impr: .0f -> .0F 2024-02-24 23:34:29 +01:00
WerWolv
0505b123a0 impr: Remove weird spinner from data information view 2024-02-24 23:34:18 +01:00
WerWolv
00b3d7809c fix: Various issues with the digram and layered distribution diagrams 2024-02-24 23:23:53 +01:00
Nik
ec69849749 feat: Added font picker to the settings (#1570) 2024-02-24 22:46:52 +01:00
WerWolv
8bf7aa9ceb build: Respect DISTDIR env var when packing SDK 2024-02-24 22:46:16 +01:00
WerWolv
ca0b6f2c6d fix: Digram sample size being too low and filter options inverted 2024-02-24 19:04:58 +01:00
WerWolv
5182a61fcc fix: Interacting with popups that extend past the edge of the window 2024-02-24 18:59:01 +01:00
WerWolv
2f7b949bd1 impr: Split out digram and layered distribution in their own section 2024-02-24 18:54:35 +01:00
WerWolv
4100e48fe2 impr: Render digram and layered distribution to texture to improve frame rate 2024-02-24 18:07:20 +01:00
WerWolv
132b211796 impr: Add interactive tutorials button to the welcome screen 2024-02-24 16:10:05 +01:00
WerWolv
0d4d8efe4e build: Compress SDK package 2024-02-24 16:09:48 +01:00
WerWolv
393bea6d4b impr: Don't pass unique_ptr by const reference 2024-02-24 15:06:28 +01:00
WerWolv
b2edb0441a build: Make external plugins build again 2024-02-24 15:06:10 +01:00
WerWolv
9d02379583 impr: Don't allow opening the same file twice
Fixes #1569
2024-02-24 12:06:06 +01:00
WerWolv
3c365d65a4 impr: Nicer looking logger output colors 2024-02-24 11:28:47 +01:00
WerWolv
2049852a80 impr: More consistent naming for information sections 2024-02-24 10:06:56 +01:00
WerWolv
be6a7490fd build: Better formatting for main CMake file 2024-02-24 10:06:21 +01:00
WerWolv
222d0b74d0 patterns: Updated pattern language 2024-02-24 09:37:55 +01:00
WerWolv
cdde0dedc8 impr: Make crash restore popup not show up if there's nothing to restore 2024-02-24 00:37:17 +01:00
WerWolv
6b14facd29 impr: Cleanup task progress handling 2024-02-23 22:09:57 +01:00
WerWolv
a7d6a4968e fix: Certain language strings not loading correctly 2024-02-23 20:33:39 +01:00
WerWolv
2173707925 fix: Building with older libyara versions 2024-02-23 20:20:27 +01:00
WerWolv
75c03d56d2 fix: Opening files on macOS through the Open with... option
Fixes #1070
2024-02-23 20:17:33 +01:00
WerWolv
85ec807417 fix: Localization issue with script loader 2024-02-23 18:57:29 +01:00
WerWolv
e7df0d201f fix: Byte type distribution and entropy slider not updating 2024-02-23 18:44:41 +01:00
WerWolv
026713750d impr: Implement better string limiting algorithm 2024-02-23 18:32:12 +01:00
WerWolv
d19d62b1fc impr: Remember find popup input per provider
Closes #1567
2024-02-23 18:31:58 +01:00
WerWolv
1f9d0181c9 impr: Allow opening multiple files at once
Closes #1566
2024-02-23 18:03:37 +01:00
WerWolv
4d91e7f347 impr: Handle read-only files more gracefully 2024-02-23 17:59:37 +01:00
WerWolv
9bfdfa149e feat: Added search bar to file chooser popup, allow for custom naming functions 2024-02-23 17:52:42 +01:00
WerWolv
214e542da4 impr: Make sure lots of yara matches doesn't lag out the editor 2024-02-23 17:49:20 +01:00
WerWolv
daf74347a3 fix: Try to make menu bar always appear 2024-02-23 17:48:56 +01:00
WerWolv
61fd327aa1 fix: Focus restoring not working correctly 2024-02-23 17:48:37 +01:00
WerWolv
91dcfefc5c fix: Crash when recovering from a thrown exception in the main thread 2024-02-23 17:48:23 +01:00
WerWolv
8059f22a32 impr: Make sure that highlight invalidation doesn't happen more than once per frame 2024-02-23 17:47:59 +01:00
WerWolv
a271658154 impr: Added once execution and task progress increment helpers 2024-02-23 17:47:40 +01:00
WerWolv
e6854d6a6a fix: String limiting slicing unicode characters 2024-02-22 23:44:49 +01:00
WerWolv
1ede41c778 fix: Compile issues using GCC 2024-02-22 23:11:59 +01:00
WerWolv
ed905aa0ff build: Updated ImGui to v1.90.4 2024-02-22 22:32:18 +01:00
WerWolv
e28b72e356 feat: Added a basic C++ and MSVC detector yara signature 2024-02-22 21:31:53 +01:00
WerWolv
daf007fae7 fix: Added missing translations 2024-02-22 21:31:26 +01:00
WerWolv
684c339309 tests: Ignore files in plugins folder when checking languages 2024-02-22 21:31:05 +01:00
WerWolv
3a44b840be impr: Restructure yara rule handling again 2024-02-22 20:49:21 +01:00
WerWolv
5db041adb7 impr: Make sure crashes during logging cannot cause a deadlock 2024-02-22 20:48:35 +01:00
WerWolv
ce704a7d92 git: Update Linux and macOS build instructions to use Ninja 2024-02-22 20:48:15 +01:00
WerWolv
0a9dca5be7 impr: Save data information view settings to projects 2024-02-21 23:21:24 +01:00
WerWolv
5ccb7a7b9a feat: Added simple yara data analyzer 2024-02-21 23:17:12 +01:00
WerWolv
4bd24a4ffe impr: Refactor Yara view 2024-02-21 22:08:26 +01:00
WerWolv
56e7c15064 impr: Refactor and modularize data information view 2024-02-21 00:06:52 +01:00
WerWolv
a2ffac9424 impr: Reorder achievement save routine to never accidentally clear the file 2024-02-20 00:10:05 +01:00
WerWolv
ca35c90cbb fix: Main menu not appearing for the first 200ms 2024-02-19 22:23:17 +01:00
WerWolv
74d59705ad fix: Issues where files are only being partially overwritten instead of truncated 2024-02-19 22:22:59 +01:00
WerWolv
adc51d3773 fix: Crash when restarting ImHex more than once 2024-02-19 22:06:46 +01:00
WerWolv
218946d5de fix: Crash when opening the interface settings tab 2024-02-18 22:45:54 +01:00
Nik
6b32fcef0f git: Remove ugly underlines between banners in readme 2024-02-18 22:32:11 +01:00
WerWolv
016d47b9d7 web: Make sure settings are loaded correctly 2024-02-18 14:02:21 +01:00
WerWolv
1bf1a56b01 git: Add more visible download banners to readme 2024-02-18 13:52:07 +01:00
WerWolv
0413302470 feat: Added setting to disable command palette button 2024-02-18 11:38:22 +01:00
WerWolv
01c934f53a impr: Rework setting change listeners 2024-02-18 11:29:18 +01:00
WerWolv
c1aac6c85e fix: Data inspector showing double negative signs sometimes
Fixes #1534
2024-02-18 10:06:51 +01:00
WerWolv
ed292a1e7a impr: Implement basic exception catching in main thread 2024-02-18 02:12:57 +01:00
WerWolv
61b164a183 feat: Added option to export table in find view 2024-02-17 21:42:41 +01:00
WerWolv
d196169bea fix: Additional folder paths not being loaded from config correctly 2024-02-17 21:30:23 +01:00
WerWolv
a2284a5143 fix: Crash when specifying invalid hash parameters
Fixes #1555
2024-02-17 21:28:30 +01:00
WerWolv
7486468537 fix: Localization issue with custom CRCs 2024-02-17 21:26:31 +01:00
Nik
e475e763db build: Hopefully fix macOS x86 build issues (#1556)
#1109
2024-02-17 21:01:57 +01:00
WerWolv
dfdd06b24c impr: Set name of background service thread 2024-02-15 22:10:11 +01:00
WerWolv
510ed25509 fix: Crash when saving a new file to disk 2024-02-15 22:09:58 +01:00
WerWolv
9f2f01c17d fix: Modification highlighting not working correctly when provider data was moved 2024-02-15 22:09:37 +01:00
WerWolv
12ba05385b fix: Saving not removing red highlighting 2024-02-15 21:54:41 +01:00
WerWolv
f113a2befe build: Only do dynamic linking of libpl on Windows 2024-02-15 16:10:16 +01:00
WerWolv
cc8a1ccc8b git: Try signing x86 macOS build _again_ before packaging
#1500
2024-02-15 15:40:58 +01:00
WerWolv
2f88994c37 fix: Data inspector not updating correctly when data has changed
Fixes #1545
2024-02-15 13:01:34 +01:00
WerWolv
e016c8a702 fix: Double clicking pattern data row not selecting the editing textbox
Fixes #1546
2024-02-15 13:01:03 +01:00
WerWolv
982d367b11 patterns: Updated pattern language 2024-02-15 11:54:59 +01:00
Sten Feldman
d70f7422b7 feat: Support Copy/Paste on WASM build outside the application border (#1542)
### Problem description
WASM build does not support copy/paste beyond the application. Meaning,
there's no practical way of sending text back and forth across the
application border.

There are lengthy threads why this is a technical challenge in
WASM/Browser world, e.g:
- https://github.com/pthom/hello_imgui/issues/3
- https://github.com/emscripten-core/emscripten/pull/19510

### Implementation description
Implements a workaround solution as Header only C++ library, as proposed
and implemented at:
https://github.com/Armchair-Software/emscripten-browser-clipboard

Maybe there are cleaner ways of achieving the functionality. Definitely
would like to have some discussion around this. 👀

ℹ️ The proposed PR "works for me" on Windows, using CTRL-C/V shortcuts
to copy text from and to the application. On MacOS the system shortcut
to Paste is different from what ImHex has defined. This results in
system Paste shortcut of command-V triggering the browser callback to
synchronise the application clipboard, but no actual Paste takes place
within ImHex.

If there would be a clean way to trigger the paste command, that would
be wonderful (or get the context and references to write the data to the
cursor, but I was unable to find a clean solution). The only proposed
solutions in the referenced threads were about triggering paste event
internally via Key events. This seemed wonky 🙃 , so is not currently
implemented. At the moment the paste on MacOS is command+V followed by
control+V.

### Additional things
This is definitely a stopgap solution before the ImGui and Emscripten
take a more proper solution in enabling Copy/Paste outside the
application borders. However, I feel like this is a must have capability
to make the WASM build more useful, not just for trying out ImHex.

Cheers! 🍻

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-02-13 20:30:18 +01:00
reggie
56b2e09b01 build: Fix zstd not being linked in correctly (#1544)
Prior to this, at least on Linux/MacOS/etc, I guess it was not possible
to compile with Zstd included for `hex::dec::zstd_decompress()`:


![image](https://github.com/WerWolv/ImHex/assets/56618074/008dbb3d-eeaf-4f49-a918-4751ec69f00c)

Every other target lib for the decompression plugin would compile,
**except for** Zstd. Additionally, the target name `zstd` caused CMake
to not be able to find `Find(ZSTD).cmake` due to case-sensitivity
differences between Windows and Unix-based file paths, of course.
With that said, I'm not too sure if this will break building w/ Zstd on
Windows... Hopefully not 😄
2024-02-13 20:22:28 +01:00
WerWolv
ee3d6ec24b feat: Made sum hash calculation more useful 2024-02-13 20:20:48 +01:00
WerWolv
03beca1099 fix: Broken editing view column rendering in pattern drawer 2024-02-12 19:40:21 +01:00
WerWolv
588f8af966 impr: Remove separator line in view menu if fullscreen and always on top are disabled 2024-02-11 23:02:34 +01:00
WerWolv
eee5e9cd7f fix: Missing translation string in pattern drawer 2024-02-11 23:00:17 +01:00
WerWolv
27a78a00fd patterns: Updated pattern language 2024-02-11 20:44:21 +01:00
WerWolv
0aae605ac4 fix: Processing and drawing of diffs 2024-02-11 19:29:02 +01:00
WerWolv
5cfcca0bc4 feat: Allow switching off borderless window mode 2024-02-11 14:12:14 +01:00
WerWolv
daf4e5cad6 refactor: More cleanup of the main file 2024-02-11 13:46:06 +01:00
WerWolv
27b5d13733 impr: Store default setting when setting couldn't be loaded 2024-02-11 11:44:58 +01:00
WerWolv
5d405b4d10 build: Updated GLFW and OpenGL3 ImGui Backends 2024-02-11 11:44:44 +01:00
WerWolv
4519e24297 impr: Make corner icon stick out a bit less 2024-02-11 11:21:06 +01:00
WerWolv
2fd81c7ffd impr: Better UI for the main about screen page 2024-02-11 00:35:10 +01:00
WerWolv
106c35344b fix: Fade in and out of language text in oobe screen being broken 2024-02-11 00:18:20 +01:00
WerWolv
12f64e5fde build: Updated ImGui to the latest release 2024-02-11 00:11:56 +01:00
Nik
bcbcb1f23c impr: Various web build improvements, API cleanup (#1541) 2024-02-10 23:31:05 +01:00
WerWolv
4b20e35fd2 fix: macOS window missing decoration after restart 2024-02-10 10:17:15 +01:00
iTrooz
f332963c75 build: remove IMHEX_COMMIT_HASH_SHORT cmake flag (#1539) 2024-02-10 01:40:33 +00:00
WerWolv
a5f6756659 impr: Hide window immediately after render loop finishes 2024-02-09 19:42:47 +01:00
WerWolv
ebe0276141 impr: Add small gap between window frame and title bar buttons 2024-02-09 19:39:26 +01:00
WerWolv
9d47ba9031 impr: Cleanup pattern drawer, added comment column 2024-02-09 18:37:05 +01:00
iTrooz
09dd25dc0a fix: Remove debug package created by makepkg (#1537) 2024-02-08 15:49:28 +00:00
WerWolv
dfc249135f build: Make plugin RPATH on Linux point to the plugins folder 2024-02-07 21:51:59 +01:00
WerWolv
c3d755a3e2 fix: Decoding of Windows error messages being broken 2024-02-07 21:51:37 +01:00
WerWolv
1195d2f2e4 patterns: Updated pattern language 2024-02-05 18:49:51 +01:00
WerWolv
b05f478207 patterns: Updated pattern language 2024-02-04 21:45:53 +01:00
WerWolv
1c28d4f610 fix: Error message formatting 2024-02-04 20:59:33 +01:00
WerWolv
77baf6f522 fix: Native error message formatting on Windows 2024-02-04 20:21:16 +01:00
WerWolv
f583df6c7d impr: Improve overwriting individual characters in the hex editor editing mode 2024-02-04 17:19:08 +01:00
WerWolv
4093fadcae fix: Revert Windows title bar changes since window wasn't draggable anymore 2024-02-04 14:59:33 +01:00
WerWolv
16adacb722 fix: Footer height being wrong 2024-02-04 14:18:20 +01:00
Nik
5e5714baeb patterns: Merged in new pattern language refactor (#1533) 2024-02-04 14:03:42 +01:00
WerWolv
f60986de8e fix: Window title bar not looking correct on Windows 2024-02-04 13:55:15 +01:00
WerWolv
a6f4d0cdec impr: Unfocus ImGui windows when main window loses focus 2024-02-03 23:56:08 +01:00
WerWolv
64d147bf96 fix: Window footer being way too narrow 2024-02-03 22:43:06 +01:00
WerWolv
fe3facfc95 impr: Implement borderless window mode for macOS 2024-02-03 22:39:31 +01:00
WerWolv
3555fc01c5 impr: Allow closing menus by clicking on title bar on Windows 2024-02-03 20:19:45 +01:00
WerWolv
ab02cb0a19 build: Bundle libpl into rpm packages 2024-02-03 19:59:58 +01:00
WerWolv
24815c0370 fix: libpl not being installed correctly 2024-02-03 14:43:41 +01:00
WerWolv
a03e8dd879 impr: Harden settings system to not crash ImHex when having outdated configs
Fixes #1514
2024-02-03 12:16:36 +01:00
WerWolv
2ea0bbe5ca fix: Window title not always updating correctly 2024-02-03 11:29:04 +01:00
WerWolv
21e1d01394 patterns: Updated pattern language 2024-02-03 11:14:08 +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
WerWolv
e864c1aaac fix: Crash due to libmagic bug when using MAGIC_COMPRESS with magic_buffer
#1529
2024-02-02 23:22:46 +01:00
WerWolv
a80f9e9ca7 build: Don't re-sign macOS bundle unless requested 2024-02-01 23:56:14 +01:00
WerWolv
959a404e1c fix: Don't pass nullptrs to libmagic
#1485
2024-02-01 22:35:24 +01:00
iTrooz
7546655695 fix: Fix detected wasm file size being wrong (#1525) 2024-02-01 14:03:33 +00:00
WerWolv
be0e50f983 web: Fix progress bar overflowing 2024-02-01 12:40:37 +01:00
WerWolv
baaf84298c impr: Disable console color output in web version 2024-02-01 12:09:43 +01:00
WerWolv
dfeb9dbc84 web: Allow setting language through URL parameters 2024-02-01 11:57:26 +01:00
WerWolv
4fd4b3dfad fix: Using cli arguments with statically linked plugins not working 2024-02-01 11:40:27 +01:00
WerWolv
7709f4e307 feat: Allow setting language through the command line 2024-02-01 10:58:45 +01:00
WerWolv
26eec66f89 web: Make progress bar prettier 2024-02-01 10:18:54 +01:00
iTrooz
e3c3233b3a feat: Add progress bar to web version (#1523) 2024-01-31 21:15:23 +00:00
WerWolv
f0a44e54d0 feat: Add export selection to file option 2024-01-31 22:07:08 +01:00
WerWolv
7a6ee756b8 patterns: Updated pattern language 2024-01-31 15:40:29 +01:00
WerWolv
944b3a5b6c fix: Selection valid check not working correctly 2024-01-31 15:31:51 +01:00
WerWolv
4a9bac3cd5 fix: Crash when opening file picker 2024-01-31 15:31:23 +01:00
WerWolv
2e630a48f7 build: Downgrade and lock emsdk version for now 2024-01-31 14:36:36 +01:00
iTrooz
baf1e88689 doc: fix --build flag in web docker compose (#1522) 2024-01-31 11:19:26 +00:00
WerWolv
80953a2286 feat: Allow jumping from hex editor to patterns and from patterns to source line 2024-01-31 11:26:22 +01:00
WerWolv
6393bfda37 build: Updated libwolv 2024-01-30 23:36:52 +01:00
WerWolv
d0bdfcd20b git: Update more github actions 2024-01-30 22:31:04 +01:00
WerWolv
e7b615c7e7 fix: Memory leak in event manager 2024-01-30 22:00:42 +01:00
WerWolv
2fd370f4ae tests: Clear events after tests ran 2024-01-30 21:24:26 +01:00
WerWolv
6b86ef3015 fix: Missing include 2024-01-30 21:20:53 +01:00
WerWolv
10f6aa3e4e fix: Default magic database not being bundled correctly 2024-01-30 21:19:43 +01:00
WerWolv
d5365fbf0c git: Update more actions due to NodeJS 16 deprecation 2024-01-30 21:19:25 +01:00
WerWolv
66d4034a4e build: Fix issues with large Windows builds 2024-01-30 21:19:04 +01:00
WerWolv
f4d1049be4 fix: More build errors 2024-01-30 16:32:48 +01:00
WerWolv
c2ff6f4e6b fix: Missing includes 2024-01-30 15:50:00 +01:00
WerWolv
79834b9566 impr: Added language selection to oobe screen 2024-01-30 14:57:36 +01:00
WerWolv
5459be46a4 patterns: Updated pattern language 2024-01-30 12:18:03 +01:00
WerWolv
d584edf546 impr: Improve situation where ImHex crashes on exit when resources aren't cleared properly 2024-01-30 11:21:34 +01:00
WerWolv
0cba735eb3 impr: Discard wayland platform errors 2024-01-30 00:47:02 +01:00
WerWolv
62978e5d34 feat: Added setting to always show provider tabs 2024-01-30 00:11:45 +01:00
WerWolv
3ea32212d7 feat: Added ASCII count minimap visualizer 2024-01-30 00:00:51 +01:00
WerWolv
ba6373daa4 fix: Moving Hex Editor cursor downwards jumping entire page at once 2024-01-29 23:29:18 +01:00
WerWolv
18b717594f fix: Rendering issues with Hex Editor Minimap 2024-01-29 23:28:53 +01:00
WerWolv
76e304c34e build: Fix various issues with linking, clang and unity builds 2024-01-29 22:57:39 +01:00
WerWolv
2e74a78f46 build: Improve unity builds 2024-01-29 21:18:32 +01:00
WerWolv
6a146e239a fix: Workspaces not being exported correctly 2024-01-29 20:50:00 +01:00
WerWolv
cecb8b8d31 fix: Linking issues and menu bar not appearing sometimes 2024-01-29 15:44:18 +01:00
Nik
339541a56f impr: Restructure various components much better (#1520) 2024-01-28 22:14:59 +01:00
WerWolv
6709087760 git: Update actions to latest versions 2024-01-28 22:10:37 +01:00
WerWolv
069544eb93 feat: Added Minimap to Hex Editor 2024-01-28 15:28:55 +01:00
iTrooz
17f769c40d feat: separate cmake configure steps + remove CMakeCache cache (#1519) 2024-01-28 11:40:12 +00:00
WerWolv
ba20790ed2 build: Make libpl not being linked twice 2024-01-28 01:09:26 +01:00
WerWolv
cb3bace15e lang: Update German translation 2024-01-27 22:16:50 +01:00
WerWolv
7c6f4d7bff feat: Added many new Hash algorithms 2024-01-27 20:24:53 +01:00
WerWolv
f0a56b4201 fix: Pattern code not being parsed when loaded from project 2024-01-27 17:33:15 +01:00
WerWolv
d2a26017d7 fix: Build error due to mismatching types 2024-01-27 16:56:18 +01:00
WerWolv
61048757e6 impr: Allow custom encodings with only single-byte characters to be displayed immediately 2024-01-27 16:49:31 +01:00
WerWolv
25b4745997 impr: Make zlib decompress function take in a windowSize parameter 2024-01-27 16:12:02 +01:00
WerWolv
7fec97561b git: Updated build instructions for macOS 2024-01-27 15:05:53 +01:00
paxcut
1957d6f432 feat: Added find-replace to pattern editor (#1465) 2024-01-27 14:52:20 +01:00
WerWolv
823881f7f1 fix: Invalid parameters passed to task progress bar formatter 2024-01-27 14:15:08 +01:00
PerikiyoXD
11f75f72ee feat: Add search options for string encoding and endianness (#1490)
Added search options for string encoding (UTF-8, UTF-16, UTF-32) and
endianness (Little, Big) in the hex editor. This enhancement allows
users to customize the search process based on different string
encodings and byte orders.

Affected files:
- `plugins/builtin/romfs/lang/de_DE.json`
- `plugins/builtin/romfs/lang/en_US.json`
- `plugins/builtin/romfs/lang/es_ES.json`
- `plugins/builtin/romfs/lang/it_IT.json`
- `plugins/builtin/romfs/lang/ja_JP.json`
- `plugins/builtin/romfs/lang/ko_KR.json`
- `plugins/builtin/romfs/lang/pt_BR.json`
- `plugins/builtin/romfs/lang/zh_CN.json`
- `plugins/builtin/romfs/lang/zh_TW.json`
- `plugins/builtin/source/content/views/view_hex_editor.cpp`

Resolves: #1325

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-01-27 14:13:41 +01:00
WerWolv
5747b72a41 fix: Exit hex editor editing mode when right clicking
Fixes #1499
2024-01-27 13:41:38 +01:00
WerWolv
44510b5b64 impr: Make task progress not display -100% when in no progress state 2024-01-27 11:02:14 +01:00
WerWolv
6a1a991c08 fix: Pattern settings resetting at re-evaluation 2024-01-27 10:49:40 +01:00
WerWolv
33637e92b5 impr: Make changing pattern settings re-evaluate the code 2024-01-26 22:08:46 +01:00
WerWolv
4c06fd2fb8 impr: Allow plugins to be loaded in debug builds 2024-01-26 21:11:56 +01:00
WerWolv
f5c529b2b3 build: Define DEBUG macro again only in debug builds 2024-01-26 21:11:42 +01:00
iTrooz
b7349e42c7 feat: Allow users to open multiple files with the same name in the web version + make web Dockerfile able to run web server by itself (#1518) 2024-01-26 18:52:05 +00:00
iTrooz
a4d6932ed8 fix: remove TODO + show error message when reading/write in process provider (#1516) 2024-01-26 18:44:52 +00:00
WerWolv
d23d382038 impr: Disable the initial oobe screen in the web version 2024-01-26 16:54:27 +01:00
WerWolv
bde476dfb7 build: Make sure libraries are correctly linked in external plugins 2024-01-26 12:36:07 +01:00
Nik
6ae86ce906 build: Get rid of pkgconfig as much as possible (#1517) 2024-01-26 12:13:22 +01:00
WerWolv
b2121b25c1 fix: Set windows drop handler effect to copy 2024-01-26 00:08:15 +01:00
WerWolv
a08afcf11a impr: Add fallback file drop handler to Windows 2024-01-25 23:53:41 +01:00
WerWolv
919110b024 impr: Make data information view have per-provider state 2024-01-25 22:49:56 +01:00
WerWolv
9c25a1609e feat: Add more magic information to the information view 2024-01-25 22:49:22 +01:00
iTrooz
d86bf44e39 git: Add script to check localized texts occurrences in code (#1511)
This script will be executed on every CI run as part of tests, and will
ensure no unlocalised strings are present in the code

Note that texts without the `_lang` suffix will not be checked, e.g.
96fe608d60/plugins/builtin/source/content/views/view_provider_settings.cpp (L10)
2024-01-25 21:23:03 +01:00
iTrooz
e61ee528ff fix: Fix theme detection on Linux (#1512) 2024-01-25 19:46:12 +00:00
iTrooz
82b56613e9 fix: fix build with edlib (#1513) 2024-01-25 19:25:51 +00:00
WerWolv
78723887e1 build: Updated dependencies 2024-01-25 11:33:34 +01:00
WerWolv
920b403ee3 build: Fixed libimhex not finding nlohmann json on some platforms 2024-01-25 11:05:02 +01:00
WerWolv
390c1469b1 build: Fix rpath issues on macOS 2024-01-24 22:30:40 +01:00
WerWolv
b605c463a1 impr: Further improve interfacing with external plugins 2024-01-22 23:35:00 +01:00
WerWolv
00491c8d90 git: Put libimhex and the ui plugin library under LGPLv2.1 2024-01-22 19:05:04 +01:00
WerWolv
cc3a9f1e81 build: Fix finding .NET runtime when there's multiple installed versions 2024-01-22 14:59:23 +01:00
WerWolv
60e7362f4e feat: Allow extra plugin folders to be specified with the --plugins cli option 2024-01-22 12:53:07 +01:00
WerWolv
f2bab005d0 fix: Make screenshots on initial launch screen behave better in web version 2024-01-22 08:25:29 +01:00
WerWolv
7068a883ed feat: Added basic byte sum hash 2024-01-21 23:31:53 +01:00
WerWolv
3783ec6a23 impr: Save settings of all hashes to disk 2024-01-21 23:31:44 +01:00
WerWolv
0aaa02b347 fix: Diffing plugin not registering localization strings correctly 2024-01-21 23:30:05 +01:00
WerWolv
1af3bf5da7 fix: Crash on exit 2024-01-21 21:39:55 +01:00
WerWolv
d5a57564fe fix: Build issues due to unused variables 2024-01-21 21:39:50 +01:00
WerWolv
2d92858193 feat: Allow switching to other providers through command palette 2024-01-21 21:29:03 +01:00
WerWolv
f666751f5f build: Disable edlib unit tests 2024-01-21 19:55:10 +01:00
Nik
58603ed12a impr: Better experience when first starting ImHex (#1510) 2024-01-21 18:39:51 +01:00
Nik
d005b5d2d9 feat: Allow toolbar icons to be modified (#1509) 2024-01-21 18:39:32 +01:00
Nik
a13b5bf8c0 feat: Implement Myers' diffing algorithm (#1508) 2024-01-21 18:39:13 +01:00
iTrooz
9d351317b8 impr: Do not mark memory providers as dirty when creating them (#1506)
This is in an effort to avoid unnecessary popups
2024-01-21 18:38:58 +01:00
WerWolv
f29d784e13 build: Update .NET SDK version on Fedora 2024-01-21 18:04:18 +01:00
WerWolv
2e582e3a45 fix: Ambiguous conversion to UnlocalizedString 2024-01-21 14:31:19 +01:00
WerWolv
566147dfae fix: Popups not always appearing when starting ImHex 2024-01-21 14:22:08 +01:00
WerWolv
3e5967c5a7 fix: Dropping files onto ImHex opening them twice 2024-01-20 21:03:46 +01:00
WerWolv
52fda5aeb7 fix: Build issue on AlmaLinux due to missing include 2024-01-20 10:35:51 +01:00
WerWolv
a657a23aaa fix: Crash when hex editor view got too small 2024-01-20 10:33:11 +01:00
WerWolv
b32055290a fix: Assertion when there's too many hex editor rows on the screen 2024-01-20 10:32:31 +01:00
Ada
cc97c0e525 fix: Segfault when launching ImHex with file arguments (#1501)
d511080814 introduced a regression where
running imhex with arguments (i.e. `imhex blob1.bin blob2.bin`) will
segfault due to a null pointer dereference.

### Implementation description
This patch updates `getSubCommands` to follow the same control flow as
`getFeatures`, where if the function returns a null pointer, it will
return gracefully rather than crash.
2024-01-18 11:11:06 +01:00
WerWolv
ffb324f685 patterns: Updated pattern language 2024-01-16 00:46:01 +01:00
WerWolv
ad53a0bf4c build: Make PDB generation slightly better 2024-01-16 00:31:46 +01:00
WerWolv
2cc07f0e73 build: Add option to not generate PDB files in release builds 2024-01-15 23:33:31 +01:00
WerWolv
b3d3794e1d patterns: Updated pattern language 2024-01-15 21:10:44 +01:00
WerWolv
82a3017629 feat: Added always on top and fullscreen mode toggle 2024-01-15 20:52:08 +01:00
WerWolv
d511080814 impr: Make plugin features and subcommands work in statically linked builds 2024-01-13 00:34:13 +01:00
WerWolv
db1373d572 fix: Compile error due to types not being constexpr everywhere 2024-01-13 00:33:55 +01:00
WerWolv
ea7483f9a7 impr: Get rid of the concept of built-in plugins
#1489
2024-01-12 23:03:13 +01:00
WerWolv
7441720a88 fix: Invalid signedness in comparison 2024-01-12 18:33:18 +01:00
WerWolv
0d0dd7d57c fix: Make syncing pattern code not erase pattern code as often 2024-01-11 21:56:54 +01:00
WerWolv
e5c7e52d72 fix: Don't show info banner if there's nothing to show 2024-01-11 20:11:52 +01:00
WerWolv
72f4331703 feat: Added virtual files to the pattern language 2024-01-11 20:11:22 +01:00
WerWolv
5f02320e8e impr: Make drag n drop overlay localizable 2024-01-11 10:20:39 +01:00
WerWolv
3449525ead feat: Added drag-n-drop overlay for windows 2024-01-10 23:46:50 +01:00
WerWolv
1c17ec5599 fix: Avoid heap allocations in thread local storage 2024-01-10 20:13:53 +01:00
WerWolv
6611c865f7 fix: Missing <codecvt> include
Thanks to pxd
2024-01-10 19:48:26 +01:00
WerWolv
016c93e795 build: Update xdgpp submodule to rehosted github mirror 2024-01-10 15:38:27 +01:00
WerWolv
f518bdadbd fix: Properly clear thread-local thread name 2024-01-09 21:46:54 +01:00
WerWolv
b408baf254 impr: Make window management tools work better 2024-01-09 17:24:27 +01:00
WerWolv
58441634d6 fix: Provider information in information view always showing info from current provider 2024-01-09 16:48:49 +01:00
WerWolv
d5c8021b41 fix: Use a thread-local storage for thread names instead 2024-01-09 16:16:20 +01:00
WerWolv
929b5176ce impr: Fallback to old thread name API when new one isn't available 2024-01-09 13:43:34 +01:00
WerWolv
179a65ed8b fix: Crash on exit 2024-01-09 11:49:49 +01:00
WerWolv
dd9a2e1818 fix: Errors being thrown during library init 2024-01-09 11:38:56 +01:00
WerWolv
0b5656dcc4 fix: Manually initialize library plugins 2024-01-09 11:31:56 +01:00
WerWolv
037d77f28e impr: Improve plugin unload logging 2024-01-09 10:54:53 +01:00
WerWolv
301e95b708 impr: Move plugin unload logging to plugins 2024-01-09 10:53:50 +01:00
WerWolv
874bac7de2 impr: Include thread name in log 2024-01-09 10:39:06 +01:00
WerWolv
4668f429fb fix: RGBA8 node not setting outputs correctly, added buffer output 2024-01-09 09:49:07 +01:00
WerWolv
d43f25ec70 impr: Remove spaces from fill command input 2024-01-09 01:26:47 +01:00
WerWolv
bdee628360 fix: Views not being openable 2024-01-09 00:24:17 +01:00
WerWolv
a35530f63b fix: Menu bar being hidden by default in the web version 2024-01-08 23:41:28 +01:00
WerWolv
21d6c1326c fix: Invalid address bound check for jump-to option
Fixes #1487
2024-01-08 22:34:42 +01:00
WerWolv
bfafc692db impr: Added icons to all menu items 2024-01-08 21:51:48 +01:00
WerWolv
3a068b9719 impr: Use ImGui's built-in drag n drop support for bookmarks 2024-01-08 10:56:53 +01:00
WerWolv
9530100455 fix: Texture interpreting raw data as structured images 2024-01-08 09:39:01 +01:00
WerWolv
cab329556c impr: Make sure plugins are only loaded once 2024-01-07 18:45:17 +01:00
WerWolv
1c5d6cbe94 impr: Added error reporting for plugin unloading 2024-01-07 16:07:53 +01:00
WerWolv
576bc80716 impr: Use full windows to draw tutorial popups 2024-01-06 22:54:18 +01:00
Anton Samokhvalov
8042aa39bf fix: ODR issues in plugin bundle generation (#1486)
fix possible ODR - multiple classes with same name in different .cpp
files
2024-01-06 22:13:35 +01:00
WerWolv
409b3ccd6c fix: Popups not appearing at launch sometimes and crashes when exiting 2024-01-06 17:38:55 +01:00
WerWolv
c89d19cd27 impr: Make file provider use atomic file IO instead of memory mappings 2024-01-06 16:09:28 +01:00
WerWolv
f9ab16049b fix: Make sure plugins are unloaded in opposite load order 2024-01-06 16:09:05 +01:00
WerWolv
09300c209f build: Updated libfmt 2024-01-06 09:36:53 +01:00
Nik
d199e0fa0f git: Updated plugin template link 2024-01-05 22:19:05 +01:00
WerWolv
89cab26888 build: Use Arch Docker file to its own folder 2024-01-05 21:37:24 +01:00
WerWolv
31b900a71c git: Make a imhex-download-sdk release when a new ImHex version is released 2024-01-05 21:35:02 +01:00
WerWolv
76a58cd843 fix: Updater not renaming file correctly 2024-01-05 18:12:46 +01:00
WerWolv
dbdc900e94 build: Don't update pacman packages on msys2 2024-01-05 14:52:07 +01:00
WerWolv
e3ec4ebd21 build: Make msys2 deps install script use pacboy 2024-01-05 14:47:30 +01:00
WerWolv
2ab529a3f5 build: Make macos ARM build only require macOS 12.1 as well 2024-01-05 13:52:53 +01:00
Nik
a82fdcca4b build: Remove manual macOS code signing again 2024-01-05 12:39:19 +01:00
Nik
0627b36bf6 git: Fixed rest of the screenshots in the readme 2024-01-04 22:39:28 +01:00
Nik
e8a5b5ab9c git: Fixed screenshots in readme 2024-01-04 22:37:31 +01:00
WerWolv
a1edb1b896 build: Bumped version to 1.32.2 2024-01-04 22:08:00 +01:00
WerWolv
b27e63586e build: Bundle nodes folder with executable 2024-01-04 22:07:49 +01:00
WerWolv
d2bd5b5640 impr: Make antialiasing be enabled by default for custom fonts 2024-01-04 21:33:45 +01:00
WerWolv
f91505ff09 fix: Unnecessary reinterpret_cast 2024-01-04 21:33:30 +01:00
WerWolv
464495987a fix: Crash due to task manager not being fully reset 2024-01-04 21:33:17 +01:00
WerWolv
27aef75e54 build: Added a plugin template to the SDK 2024-01-04 20:25:51 +01:00
WerWolv
70e3b4dd1a build: Cleanup build script a bit 2024-01-04 17:55:53 +01:00
WerWolv
556fd2bbc3 build: Really only build the things that are necessary 2024-01-04 13:18:27 +01:00
WerWolv
0097d1782e build: Fix external plugins not having a imhex version set 2024-01-04 12:01:40 +01:00
WerWolv
f03bdc5f45 build: Exclude libraries from main build target in sdk 2024-01-04 11:34:56 +01:00
WerWolv
ebf379f7c1 build: Fix some sdk variables not being set correctly 2024-01-04 10:39:07 +01:00
WerWolv
cd72ff1f84 build: Fix installing external plugins 2024-01-04 10:25:29 +01:00
WerWolv
eca41cac16 build: Fix more link and define issues 2024-01-04 01:06:38 +01:00
WerWolv
a8e2e132d1 build: Fix library linking and define setting issues 2024-01-04 01:01:51 +01:00
WerWolv
499711b9af build: Updated libfmt 2024-01-04 00:40:40 +01:00
WerWolv
b0eec3a844 build: Added dmg background resource 2024-01-04 00:38:40 +01:00
WerWolv
24e90f0f20 feat: Added simple HTTP request tool 2024-01-04 00:38:21 +01:00
WerWolv
ff48d37598 build: Make SDK not try to link to unbundled libraries 2024-01-04 00:37:56 +01:00
WerWolv
c402d58685 fix: Force scaling of default font to be a integer multiple 2024-01-03 18:26:48 +01:00
WerWolv
ed8934882e impr: Make sure detached windows always have an appropriate size 2024-01-03 18:26:25 +01:00
WerWolv
62093a8dd8 fix: ImHex not always going to sleep correctly 2024-01-02 17:11:52 +01:00
WerWolv
4a5f1038e0 fix: Crash when opening a file that cannot be mapped into memory 2023-12-31 14:58:20 +01:00
WerWolv
8cb833eca9 impr: Improve Documentation AI UX 2023-12-31 13:53:44 +01:00
WerWolv
e2b7a69fc8 fix: Warnings when trying to load progress for achievements that aren't in save file 2023-12-31 13:53:28 +01:00
Nik
950eaea8af impr: Make decompression support actually useful (#1481) 2023-12-31 11:39:24 +01:00
WerWolv
b22d90f9ca impr: Handle hiding of main menu better 2023-12-31 11:39:06 +01:00
WerWolv
b76e7ff678 impr: Remove duplicate window name from macOS title bar 2023-12-30 23:52:25 +01:00
WerWolv
9c386e949d git: Add brewfile lock to gitignore 2023-12-30 19:41:09 +01:00
WerWolv
2b1688be31 build: Don't try to sign unbundled executable on macOS 2023-12-30 19:40:01 +01:00
WerWolv
3d9de1aaa6 git: Fix Ubuntu builds missing commit information 2023-12-30 19:12:04 +01:00
Nik
5a0a5ad445 build: Fix macOS M1 build entirely (#1480) 2023-12-30 19:11:33 +01:00
WerWolv
038b98eacf fix: Foreground color not applying to ASCII column
Fixes #1477
2023-12-29 22:41:12 +01:00
WerWolv
3592d17c93 impr: Allow Home/End to work in hex editor view 2023-12-29 11:30:23 +01:00
WerWolv
4cbd84671c impr: Allow num keys to be interpreted as function keys if numlock isn't set
Closes #1475
2023-12-29 11:29:31 +01:00
WerWolv
c3c9603ea1 fix: Yara rules Add button not doing anything 2023-12-29 11:12:50 +01:00
WerWolv
af63b42eaf impr: Make task progress bar show animation when no progress is set 2023-12-28 22:14:45 +01:00
WerWolv
2f7da91a73 fix: Remove unused update parameter 2023-12-28 21:51:31 +01:00
WerWolv
8fcf08132e fix: Allow store to properly update files 2023-12-28 20:59:34 +01:00
WerWolv
db72ba295a build: Don't try to bundle updater on targets that don't have an updater 2023-12-28 20:44:42 +01:00
WerWolv
2d7a6a7cb5 fix: Uncaught exception when trying to update all store items 2023-12-28 20:35:35 +01:00
WerWolv
390b5a7925 fix: Logs in log view not being filtered correctly 2023-12-28 20:34:49 +01:00
WerWolv
5ca6ed30b4 build: Fix updater not being installed correctly 2023-12-28 20:26:58 +01:00
WerWolv
9685b39969 fix: Missing reference 2023-12-28 19:25:37 +01:00
WerWolv
03dc26d2d4 build: Always extract magic file database 2023-12-28 19:24:56 +01:00
WerWolv
b64bb3bec9 fix: Crashes when opening diffing view 2023-12-28 19:21:15 +01:00
WerWolv
8d3530a4f3 build: Bumped version to 1.32.1 2023-12-28 18:33:36 +01:00
WerWolv
83b1416797 build: Fixed dependencies of plugins not being bundled correctly 2023-12-28 18:05:49 +01:00
WerWolv
5adeac6bbc fix: Make sure library plugins are always initialized 2023-12-28 14:59:23 +01:00
WerWolv
f44b44a881 build: Fix wrong dependency name for libarchive on Ubuntu
Fixes #1474
2023-12-28 14:48:36 +01:00
WerWolv
1ed978f22e impr: Remove telemetry checkboxes from settings in the web version
They are disabled there and should not be enableable
2023-12-28 13:24:31 +01:00
WerWolv
7ed06ae515 git: Fixed set -x wrongfully added to windows CI
Closes  #1473
2023-12-28 11:48:13 +01:00
WerWolv
63042dbba8 build: Bumped version to 1.32.0 2023-12-28 00:37:50 +01:00
WerWolv
144d8d8ed4 web: Prevent canvas flickering when resizing browser window 2023-12-27 22:00:09 +01:00
WerWolv
99ba47a554 impr: Even less laggy UI 2023-12-27 21:23:54 +01:00
WerWolv
0462dab170 impr: Make the UI a bit less laggy 2023-12-27 21:11:40 +01:00
WerWolv
258481b0ba git: Fix errors and warnings thrown by CI 2023-12-27 21:11:27 +01:00
WerWolv
cb35f456ed build: Fix building on clang 2023-12-27 17:42:44 +01:00
WerWolv
686f8f43c3 fix: Pattern editor error tooltip becoming way too large in some cases 2023-12-27 17:29:27 +01:00
WerWolv
99dcd0a020 fix: Crash when receiving invalid data from API 2023-12-27 17:10:50 +01:00
WerWolv
3c6f52f5ea impr: Harden achievement progress store function 2023-12-27 16:57:44 +01:00
WerWolv
874619f62e impr: Harden settings store function 2023-12-27 16:53:03 +01:00
WerWolv
74b5c93caf impr: Code style improvements 2023-12-27 16:33:49 +01:00
WerWolv
ec45d1f564 build: Updated libwolv 2023-12-27 16:26:02 +01:00
WerWolv
42a75fe133 impr: Make ImHex's name not look weird in various places 2023-12-27 13:54:31 +01:00
WerWolv
e414c1cf1e impr: Implement rendering power saving using hashes 2023-12-27 13:54:00 +01:00
WerWolv
1cf692cecf fix: PerProvider move event not being unsubscribed 2023-12-27 11:33:04 +01:00
WerWolv
af5b871383 fix: Provider not having any valid regions by default 2023-12-27 11:31:25 +01:00
WerWolv
37d60411bb fix: Hyperlink items disappearing inside of scrolling containers 2023-12-27 02:14:38 +01:00
WerWolv
d7ba2e7171 feat: Add button to export pattern language section to a file 2023-12-27 01:58:20 +01:00
WerWolv
215be9255e fix: Hex editor not having a default selection color 2023-12-27 01:37:41 +01:00
WerWolv
9d0fd1f5b6 build: Try to fix Fedora build issues 2023-12-27 01:10:08 +01:00
WerWolv
4e0a93fc20 fix: MemoryProvider not having any valid regions 2023-12-27 01:05:34 +01:00
WerWolv
a0fddd2953 build: Try detecting macOS better when updating libarchive include path 2023-12-27 00:38:32 +01:00
WerWolv
40e66313a9 build: Fix library plugin install path 2023-12-27 00:31:47 +01:00
WerWolv
87155f98b3 fix: Bytes not automatically being focused in editing mode anymore 2023-12-26 23:43:11 +01:00
WerWolv
483325990c fix: Byte foreground highlighting being disabled during editing 2023-12-26 23:42:50 +01:00
WerWolv
83fa024fab feat: Added Base64 provider 2023-12-26 23:42:22 +01:00
WerWolv
96fe608d60 impr: Switch most usages of modals over to toasts 2023-12-26 00:22:47 +01:00
WerWolv
52192a3b26 impr: Better FPS graph 2023-12-25 23:23:19 +01:00
WerWolv
75e575fc01 impr: Remove shadow drawn by the no views open window 2023-12-24 14:52:14 +01:00
WerWolv
98bc89cb39 impr: Make sure all views are closed before loading new workspace or layout 2023-12-24 14:51:47 +01:00
WerWolv
d2d244ebc7 build: Make libarchive not required 2023-12-24 14:43:49 +01:00
WerWolv
9952854b53 build: Try different libarchive include path detection method 2023-12-24 14:37:59 +01:00
WerWolv
3bb079216c impr: Make sure welcome screen never gets detached from main window 2023-12-24 14:35:44 +01:00
WerWolv
b845dbb882 git: Ignore local folder produced by docker builds 2023-12-24 14:35:27 +01:00
WerWolv
7eb92c68de build: Only fix libarchive include dirs when necessary 2023-12-24 14:30:10 +01:00
WerWolv
24f8ce9d7f build: Fix macOS M1 build 2023-12-24 13:57:21 +01:00
WerWolv
343e98c99a build: Fix missing libarchive include directories on macOS 2023-12-24 13:41:10 +01:00
WerWolv
bc76eee847 build: Remove minimum required libarchive version 2023-12-24 13:33:18 +01:00
WerWolv
91ae8ba410 build: Add missing dependencies to brewfile and rpm spec 2023-12-24 13:26:05 +01:00
WerWolv
e2489151f3 feat: Added decompressing support 2023-12-24 13:14:51 +01:00
WerWolv
9066891ce2 fix: ImHex not starting on some platforms 2023-12-24 12:20:51 +01:00
WerWolv
65e2f1b5af fix: Synchronized scrolling not working correctly 2023-12-24 00:06:16 +01:00
WerWolv
020efefb25 git: Added new hashes to readme 2023-12-23 23:19:05 +01:00
WerWolv
83f8370e2a impr: Don't display plugins in the list that couldn't be loaded 2023-12-23 23:12:15 +01:00
WerWolv
61accd9569 fix: Hex editor displaying invalid bytes when no data is available 2023-12-23 23:04:40 +01:00
WerWolv
8a428df7df build: Updated HashLibPlus 2023-12-23 22:57:25 +01:00
WerWolv
de6bb5dfb9 build: Updated HashLibPlus 2023-12-23 22:55:41 +01:00
WerWolv
80561001b8 build: Updated HashLibPlus 2023-12-23 22:40:47 +01:00
WerWolv
33d077e997 build: Updated HashLibPlus 2023-12-23 22:25:01 +01:00
WerWolv
fe24db7c57 feat: Move hashes into plugin, merged in extra hashes plugin 2023-12-23 22:01:47 +01:00
Nik
61bfe10bc2 refactor: Rework features that use external libraries into optional plugins (#1470) 2023-12-23 21:09:41 +01:00
Nik
84bfd10416 build: Restructured entire custom plugin system (#1469) 2023-12-22 23:39:38 +01:00
WerWolv
538e79183c fix: Build because i64 is not the same as ImS64 somehow 2023-12-22 21:34:11 +01:00
WerWolv
ec64952cb4 impr: Only auto backup if there's something to backup 2023-12-22 21:16:09 +01:00
WerWolv
b934ca6ad3 impr: Allow a entire 64 bit address space to be displayed in the hex editor 2023-12-22 16:58:50 +01:00
WerWolv
0da6c03a8f git: Highlight collapsible headers better in readme 2023-12-22 13:59:57 +01:00
WerWolv
a54cbca6d2 git: Modernize readme 2023-12-22 13:53:29 +01:00
Justus Garbe
ad8e3e38f0 Revert pattern language until it's stable again (#1468)
- Revert pattern language
2023-12-21 22:01:07 +01:00
WerWolv
ffc1aa6a91 patterns: Updated pattern language 2023-12-21 16:56:21 +01:00
WerWolv
6ee1e72021 impr: Disable close provider button when tasks are running 2023-12-21 16:56:12 +01:00
WerWolv
5bc8e5c57c impr: Only display background color of patterns that have a color 2023-12-21 16:40:08 +01:00
WerWolv
d48acf7fef patterns: Updated pattern language 2023-12-21 16:39:37 +01:00
WerWolv
72260b5323 patterns: Updated pattern language 2023-12-21 16:23:50 +01:00
WerWolv
e84b8cb96d build: Fix glfw linking 2023-12-21 16:02:28 +01:00
WerWolv
adcaad791a patterns: Updated pattern language 2023-12-21 14:58:45 +01:00
WerWolv
b0490cfbbc build: Improve pdb generation 2023-12-21 13:57:40 +01:00
WerWolv
86231d0154 build: Release build on Windows trying to link to glfw3dll for some reason 2023-12-21 13:57:25 +01:00
WerWolv
6163f6c4a0 fix: ImHex crashing when no fonts were loaded 2023-12-20 16:31:31 +01:00
WerWolv
e3e117a14e impr: Close tutorial view when a tutorial is started 2023-12-20 15:26:45 +01:00
WerWolv
e2ae567b9f fix: Logger not printing project prefix properly 2023-12-20 15:10:53 +01:00
WerWolv
a0c2dc43f7 fix: Tutorial highlighting 2023-12-20 14:35:13 +01:00
WerWolv
f47163c4ad build: Updated libromfs 2023-12-20 14:11:51 +01:00
WerWolv
e951359a46 feat: Add frame time graph to FPS display 2023-12-20 13:42:42 +01:00
WerWolv
bf6b2db0cb fix: Infinite loop on crash 2023-12-20 13:38:13 +01:00
WerWolv
1ea8269dec impr: Better frame unlock logic 2023-12-20 12:07:22 +01:00
WerWolv
9bd1970371 fix: Debug breakpoint in crash handler not being triggered at all 2023-12-20 10:50:58 +01:00
WerWolv
5b3ae56912 patterns: Update all pattern language code to use new API 2023-12-20 10:08:40 +01:00
WerWolv
2b5789631f feat: Added basic toast popups 2023-12-19 23:21:20 +01:00
WerWolv
a6025e72fb fix: RGBA8 hex editor data visualizer not working correctly 2023-12-19 23:20:56 +01:00
WerWolv
96db2074c6 feat: Add ignore case and UTF16 search options to sequence searching 2023-12-19 14:34:35 +01:00
WerWolv
c7ab4a4569 refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
WerWolv
dd4be3b772 refactor: Make sure unlocalized strings are always actually unlocalized 2023-12-19 12:22:28 +01:00
WerWolv
8fe490ed03 fix: Escape to deselect bytes not working 2023-12-19 00:03:00 +01:00
WerWolv
eb21a5992f impr: Make sure no empty popup appears when right clicking search box 2023-12-18 22:51:08 +01:00
WerWolv
a3f1a5b0a9 fix: Crash when right clicking search bar when a provider with no menu options is open 2023-12-18 22:45:15 +01:00
WerWolv
71763d108b build: Updated libwolv 2023-12-18 22:39:46 +01:00
WerWolv
dc9ab135c8 impr: Make sure quick settings window always stays attached to bottom right 2023-12-18 14:57:37 +01:00
WerWolv
3dd33d0966 web: Force disable filtering of canvas 2023-12-18 14:57:17 +01:00
WerWolv
1cb2e0d765 impr: Make quick settings floating window auto resize 2023-12-18 13:55:50 +01:00
WerWolv
b34fb2d225 impr: Remove separator from view menu in release mode 2023-12-18 13:55:32 +01:00
WerWolv
4973556fc8 impr: Better UI resize handling on welcome screen 2023-12-18 13:08:17 +01:00
WerWolv
2948e57242 fix: std::views::enumerate not being widely supported yet 2023-12-18 12:43:16 +01:00
WerWolv
521ee5fe2d impr: Better pattern background coloring in pattern data view 2023-12-18 12:02:41 +01:00
WerWolv
478d6118d8 fix: Prevent empty provider menu from being opened 2023-12-18 11:58:31 +01:00
WerWolv
1b43270ae9 fix: Don't show provider as Read Only if it's empty 2023-12-18 11:58:19 +01:00
WerWolv
ec4fdc44ef impr: Draw hint in hex editor if no data can be displayed 2023-12-18 11:58:03 +01:00
WerWolv
91f49e2c6e fix: Window title not updating correctly when renaming memory file 2023-12-18 11:46:39 +01:00
WerWolv
6bc4a7242e fix: Allow search bar to be right clicked to open provider menu 2023-12-18 11:46:23 +01:00
WerWolv
eeab529bfa fix: Welcome screen close button position 2023-12-18 11:30:09 +01:00
WerWolv
d798713c60 fix: Missing includes, rename init function 2023-12-18 11:24:40 +01:00
WerWolv
edc4b18975 impr: Add plugin table to about page 2023-12-18 11:21:33 +01:00
WerWolv
450c93e029 impr: Cleanup welcome screen 2023-12-18 11:03:19 +01:00
WerWolv
c1abbfad7d impr: Make sure welcome screen stays at the back 2023-12-18 10:14:07 +01:00
WerWolv
d2d36c2211 impr: Add localization to color picker tool 2023-12-18 08:58:15 +01:00
WerWolv
aaaa02dbd0 impr: Improve handling of floating tool windows 2023-12-18 08:58:00 +01:00
WerWolv
a844fb3731 fix: Hash string popup being way too small 2023-12-17 23:47:42 +01:00
WerWolv
8f83fe5135 fix: Max field in value search not resetting when disabling range search 2023-12-17 23:38:10 +01:00
WerWolv
978558649e fix: Diffing view not highlighting correctly with a custom base address 2023-12-17 23:34:19 +01:00
WerWolv
3b5efb37e9 fix: Editing data inspector rows not working correctly 2023-12-17 23:31:01 +01:00
WerWolv
90abe982ed fix: Bookmark region setting not being locked correctly 2023-12-17 23:22:39 +01:00
WerWolv
7a0680c2cb impr: Add warning to disk provider if ImHex is not running elevated 2023-12-17 23:16:55 +01:00
WerWolv
71dd349044 fix: Highlighting in hex editor not being drawn correctly anymore 2023-12-17 23:16:04 +01:00
WerWolv
f2a795c51e fix: Provider loader interface being closable and not resizing correctly 2023-12-17 23:15:52 +01:00
WerWolv
7ad7ea061c impr: Refactor init logic 2023-12-17 20:33:17 +01:00
WerWolv
a315ecb831 fix: Flickering of selection frame in hex editor view when scrolling 2023-12-17 18:26:36 +01:00
WerWolv
c3d99e29dc web: Fix various HTML errors 2023-12-16 15:33:22 +01:00
WerWolv
f90f4b00a8 web: Some more SEO 2023-12-16 11:39:07 +01:00
WerWolv
b1aa4fd3f8 fix: Resize operations not working correctly
#1463
2023-12-15 20:59:58 +01:00
WerWolv
b5df20d7c6 feat: Exposed demangling of symbols to CLI 2023-12-15 08:11:51 +01:00
WerWolv
b58463bbaf build: Updated libwolv 2023-12-15 08:11:22 +01:00
WerWolv
b71a776770 fix: Format security error 2023-12-14 20:59:30 +01:00
WerWolv
78ef5b0d07 fix: ProviderChanged Event not being called correctly when closing first provider
Fixes #1421, Fixes #1416
2023-12-14 20:48:30 +01:00
WerWolv
c1f76be3b7 feat: Display complete window title when hovering over search bar 2023-12-14 13:50:26 +01:00
WerWolv
2ebd3c6f35 impr: Better centering of icons in icon buttons 2023-12-14 13:49:46 +01:00
WerWolv
003f9619c3 fix: Multiple localization issues 2023-12-14 11:33:54 +01:00
WerWolv
710ceedf3d fix: Rare case where workspace was saved to wrong file 2023-12-14 09:36:29 +01:00
WerWolv
5b77f511d3 impr: Added shadow to tutorial popups 2023-12-13 23:44:53 +01:00
WerWolv
f000b6bc0a feat: Added basic introduction tutorial 2023-12-13 23:03:39 +01:00
WerWolv
346f1362c6 impr: Allow more popups to be closed with Escape 2023-12-13 15:08:27 +01:00
WerWolv
92043a3d23 feat: Added tutorials view 2023-12-13 13:04:59 +01:00
WerWolv
3bc5295eae impr: Allow tutorials to work correctly with localized strings 2023-12-13 11:48:21 +01:00
WerWolv
5bcfe37b4e feat: Added tutorial system 2023-12-13 11:24:25 +01:00
WerWolv
1a8a9e53e1 impr: More information view UI improvements 2023-12-12 13:20:51 +01:00
WerWolv
c32dad75cd fix: Remove logging from CLI 2023-12-12 13:20:39 +01:00
WerWolv
045733d188 fix: Auto extractor overwriting existing files 2023-12-12 12:15:32 +01:00
WerWolv
f618e634e9 impr: Better UI for the data information view 2023-12-12 12:15:20 +01:00
WerWolv
1b457dae7d fix: Workspaces not always loading layout correctly 2023-12-12 00:16:21 +01:00
WerWolv
690b0df932 fix: Crash after restarting ImHex 2023-12-11 23:05:58 +01:00
WerWolv
e080164305 fix: Restart imhex popup not working correctly 2023-12-11 23:05:47 +01:00
WerWolv
1e4bb8c91e impr: Remove Font Awesome 2023-12-11 23:05:35 +01:00
WerWolv
17a7621342 fix: Style var not being popped correctly 2023-12-11 22:09:13 +01:00
WerWolv
ce27cb11a5 impr: Delete old backup files 2023-12-11 21:29:30 +01:00
WerWolv
b84b82c416 fix: Properly get auto backup file creation time 2023-12-11 21:17:40 +01:00
WerWolv
623e074ba0 build: Updated libromfs 2023-12-11 16:11:49 +01:00
WerWolv
91230ba438 feat: Added workspaces 2023-12-11 15:54:22 +01:00
WerWolv
cc4d61f8f5 build: Allow both libglfw3 and libglfw3-wayland as dependencies for the .deb package
#1227
2023-12-11 15:53:24 +01:00
WerWolv
7a4358a5ec feat: Added automatic backups 2023-12-11 11:42:33 +01:00
WerWolv
e6796d1458 fix: Hex editor footer taking up way too much space 2023-12-10 22:46:34 +01:00
WerWolv
1ba34c233e fix: Various scaling issues 2023-12-10 22:37:26 +01:00
WerWolv
ef7898ea8d impr: Add support for specifying filtering mode when loading textures 2023-12-09 22:00:35 +01:00
WerWolvTranslationBot
e49c3182ce lang: Translations update from Weblate (#1458)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Minseo Lee <itoupluk427@gmail.com>
2023-12-09 16:22:19 +01:00
WerWolv
c58c3dd311 impr: Make banner not as obnoxiously big 2023-12-09 16:20:58 +01:00
WerWolv
7738f8c831 impr: Highlight border of information banner when hovered 2023-12-09 15:56:26 +01:00
WerWolv
27cd3cc83a fix: Missing welcome screen header localization 2023-12-09 15:32:21 +01:00
WerWolv
2f5e04d07f web: Add sitemap to robots.txt 2023-12-09 13:57:55 +01:00
WerWolv
15af0726f1 build: Disable error on unknown warning flags 2023-12-09 13:57:46 +01:00
WerWolv
a60a45fb9d web: Fix various more SEO issues 2023-12-09 13:35:06 +01:00
WerWolv
df03ba3883 build: Fix build on macOS 2023-12-09 12:23:11 +01:00
WerWolv
09a148b8a5 impr: Add hint text about font size when no custom font is selected 2023-12-09 12:14:45 +01:00
WerWolv
350635d464 web: More UI and SEO improvements 2023-12-09 12:06:20 +01:00
WerWolv
cf13404254 web: Let's do some SEO 2023-12-08 16:22:47 +01:00
WerWolv
878f45dd80 fix: Various build errors 2023-12-08 16:22:36 +01:00
WerWolv
48bc0985d9 impr: Make info banner open a web page 2023-12-08 14:46:32 +01:00
WerWolv
e9bca123c2 impr: Allow per-OS info banners 2023-12-08 14:43:59 +01:00
WerWolv
6df3a9243f fix: Rename scaling setting to avoid old values being interpreted wrongly 2023-12-08 14:36:42 +01:00
WerWolv
f1b40d0500 build: Updated libromfs 2023-12-08 14:30:35 +01:00
WerWolv
0cbaf40747 build: Allow for better stacktraces on Linux 2023-12-08 14:00:32 +01:00
Tha_14
54c5d9debb git: Include diffing as a feature in Readme (#1459)
I saw that diffing is not mentioned anywhere in the README.md and people
I referred ImHex to did not consider using the editor due to diffing
being a requirement for them.

### Problem description
Diffing is not mentioned anywhere in the README.md

### Implementation description
Added Diffing to the features list of README.md
2023-12-08 12:56:44 +01:00
WerWolv
411884966b fix: Crash when making pattern editor window too small 2023-12-08 11:15:32 +01:00
WerWolv
ef25542220 impr: Remove old unused files 2023-12-08 11:15:18 +01:00
WerWolv
b4813660b5 refactor: Better interface for the event system 2023-12-08 10:29:44 +01:00
WerWolv
f08d1e265c impr: Make extra providers window wider 2023-12-07 23:51:11 +01:00
WerWolv
470bc8a049 fix: Adjust sidebar items to look better with new layout 2023-12-07 23:47:25 +01:00
Truman Kilen
5c84ef5f72 feat: Added Linux support to the Process Memory Provider (#1331)
<!--
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 -->
Implement a Linux backend for the ProcessMemoryProvider plugin.

### Implementation description
<!-- Explain what you did to correct the problem -->
Most of the provider code is the same between Windows and Linux. The
primary differences are:
- enumerate PIDs in `/proc/` to get the process list
- use `/proc/<PID>/cmdline` as the process name
- parse `/proc/<PID>/maps` to get the module list
- reading/writing from memory is done using
`process_vm_readv`/`process_vm_writev`

NOTE: `sudo setcap CAP_SYS_PTRACE=+eip build/imhex` must be run to give
the binary permission to read another process' memory. Running as root
user should also work but I would not recommend it.

### Additional things
The existing translations keys no longer match since I moved the plugin
from `windows` to `builtin`.

I'm not well versed in C++ so I attempted to keep my changes rather
simple. Feedback is very welcome.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-12-07 23:33:15 +01:00
WerWolv
8ab85a2af1 feat: Added unit converter to command palette 2023-12-07 16:15:00 +01:00
WerWolv
7f69f8bcdb impr: More size_t -> u64 2023-12-07 13:02:12 +01:00
WerWolv
3a016da549 impr: Make providers return a 64 bit size on all platforms 2023-12-07 12:06:26 +01:00
WerWolv
7b3e13c748 fix: Add missing localizations 2023-12-07 11:53:31 +01:00
WerWolv
f5cbcce112 impr: Add close button to toolbar 2023-12-07 11:53:16 +01:00
WerWolv
5f8c813aa7 impr: Only show provider selector bar when more than one is open 2023-12-07 11:21:13 +01:00
WerWolv
f68202a098 impr: Make hex editor footer collapsible 2023-12-07 11:20:54 +01:00
WerWolv
bfb2c6ab5f impr: Automatically remove null provider if another one is opened 2023-12-07 11:20:37 +01:00
WerWolv
00a24bc84b impr: Remove "ImHex" from title bar if a file is loaded 2023-12-07 11:19:08 +01:00
WerWolv
9ba6d7ee1e impr: Added simplified welcome screen 2023-12-07 11:18:49 +01:00
WerWolv
60ff62d018 impr: Disable resource usage widgets by default 2023-12-06 16:20:21 +01:00
WerWolv
5d24f1b691 impr: Fix input field selection in command palette 2023-12-06 16:20:06 +01:00
WerWolv
370ca740e3 feat: Allow layouts to be locked 2023-12-06 13:49:58 +01:00
WerWolv
ba8430d9e7 impr: Code style 2023-12-06 11:05:13 +01:00
WerWolv
0b71568d97 impr: Better UI handling when window is very small 2023-12-06 11:05:02 +01:00
WerWolv
37ac1b66dd refactor: Task Manager related code 2023-12-06 11:04:35 +01:00
WerWolv
1be9e8c5b1 impr: Simplify default layout down a bit 2023-12-06 09:10:16 +01:00
WerWolv
c6b9b947fb fix: Binding shortcuts to already existing shortcuts behaving weirdly 2023-12-06 09:09:32 +01:00
WerWolv
a1ef567ecd impr: Add setting to disable resource usage display in footer 2023-12-05 17:09:42 +01:00
WerWolv
2b22a15e8c feat: Added --hexdump subcommand 2023-12-05 16:45:35 +01:00
WerWolv
760b8c7a88 impr: Make long running tasks not freeze ImHex, fix saving non-continuous providers
Fixes #1454
2023-12-05 14:32:43 +01:00
WerWolvTranslationBot
13145bba03 lang: Translations update from Weblate (#1457)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Justus Garbe <gihihoh@gmail.com>
Co-authored-by: Minseo Lee <itoupluk427@gmail.com>
2023-12-05 10:50:52 +01:00
Nik
f9a9ed4846 impr: Vastly improved 3D Visualizer (#1456)
Based entirely on @paxcut's amazing PR #1443

---------

Co-authored-by: paxcut <paxcut@outlook.com>
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
2023-12-05 10:49:51 +01:00
Jonathan Wright
d5a40d46bc git: Add f39 builds, remove f37 (#1451)
Fedora 37 goes EOL in less than a week.
2023-12-04 23:36:48 +01:00
WerWolv
19f3da556c fix: Native theme detection on Linux not working properly 2023-12-04 23:35:48 +01:00
WerWolv
e8f0a3bd23 impr: Force center modal views 2023-12-04 22:32:25 +01:00
WerWolv
08fd09064a fix: Settings view still using old system and not opening properly 2023-12-04 22:17:43 +01:00
Nik
caee764af3 fix: Crash when destructing a moved plugin 2023-12-04 21:01:48 +01:00
Nik
eae3cd99ee build: Disable network tests in offline builds 2023-12-04 20:01:58 +01:00
WerWolv
f71fa2f704 impr: Better centered text rendering 2023-12-02 23:46:20 +01:00
WerWolv
9afbfec64e impr: Allow bookmark addresses to be changed, better comment editor 2023-12-02 23:11:31 +01:00
WerWolv
ec7e89b5cf feat: Added simple context menu to pattern editor 2023-12-02 20:37:28 +01:00
WerWolv
e6ad54b53b fix: Overlays not being applied properly 2023-12-02 18:42:57 +01:00
WerWolv
768982b67a patterns: Updated pattern language 2023-12-02 14:35:54 +01:00
WerWolv
4fd3167bb3 feat: Added minimal layout 2023-12-02 14:35:44 +01:00
WerWolv
866cb5706d feat: Added highlighting rules 2023-12-02 11:09:32 +01:00
WerWolv
2cf642a2a4 build: Updated libwolv 2023-12-01 14:07:10 +01:00
WerWolv
f26076fb90 build: Fix cmake script 2023-12-01 13:54:12 +01:00
WerWolv
519d965a36 refactor: Move tools to correct namespace, move data processor nodes 2023-12-01 13:53:51 +01:00
WerWolv
a50bb39978 impr: Further improve compile times 2023-11-30 14:40:07 +01:00
WerWolv
8ee234e5a6 impr: Optimize api includes 2023-11-30 11:23:12 +01:00
WerWolv
e370fdb0fc build: Add support for unity builds 2023-11-30 10:22:15 +01:00
WerWolv
09904b77eb feat: Add support for bold and italic fonts 2023-11-29 23:47:37 +01:00
WerWolv
5e32b693f3 fix: Crash when trying to analyze small files 2023-11-29 11:02:23 +01:00
WerWolv
cceac20197 fix: Codicon icons being too far down 2023-11-29 11:02:14 +01:00
WerWolv
540e8458a5 impr: Improve font loading speed 2023-11-29 09:50:57 +01:00
WerWolv
80984f28ec git: Fix formatting of docker instructions 2023-11-28 14:58:51 +01:00
WerWolv
56064df8d5 impr: Properly center icon fonts 2023-11-28 14:21:48 +01:00
WerWolv
df7cc1fefd impr: Make "Load all glyphs" setting require a restart 2023-11-28 13:53:08 +01:00
WerWolv
23fc232c47 impr: Try to align additional fonts automatically 2023-11-28 13:52:26 +01:00
WerWolv
37ce37862a fix: Properly clear font name before loading 2023-11-28 11:11:13 +01:00
WerWolv
75e26458cc build: Remove garbage file that ended up in romfs 2023-11-28 10:59:40 +01:00
WerWolv
e75fcadd8f fix: More strncpy and include issues 2023-11-28 10:56:56 +01:00
WerWolv
2483c421d2 fix: Missing <cstring> include 2023-11-28 10:51:06 +01:00
WerWolv
abf6e37938 impr: More efficiently pack glyphs on font atlas 2023-11-28 10:37:38 +01:00
WerWolv
eae73b3113 fix: Font size not resetting back to default properly 2023-11-28 10:28:06 +01:00
WerWolv
cbf82d7476 impr: Force tables to never collapse to zero height 2023-11-28 10:21:54 +01:00
WerWolv
4ddd293210 fix: Properly delete font atlas when we're done with it 2023-11-28 10:07:02 +01:00
WerWolv
813a95d283 fix: Various font loading issues 2023-11-28 09:49:38 +01:00
WerWolv
c02c27b63d refactor: Moved over to more flexible font loader 2023-11-28 01:55:41 +01:00
WerWolv
f6d4d5ab22 refactor: More init sequence refactors 2023-11-28 00:47:03 +01:00
WerWolv
284f8534ab refactor: Move the builtin plugin specific init tasks to the plugin 2023-11-28 00:19:42 +01:00
WerWolv
8e7716ebcc fix: Zero-sized patches being created 2023-11-27 15:48:56 +01:00
WerWolv
1b665fa1b3 fix: Loading files into memory 2023-11-27 15:48:46 +01:00
WerWolv
9cbfaed5fe fix: Empty popup opening when right clicking some provider tabs 2023-11-27 15:37:22 +01:00
WerWolv
494223fff6 fix: Provider load interface not opening 2023-11-27 15:34:05 +01:00
WerWolv
af77b8dfc4 fix: Numeric search tool not displaying values in correct endianess 2023-11-25 19:40:29 +01:00
WerWolv
47b6826ac4 build: Updated nativefiledialog-extended 2023-11-25 19:32:53 +01:00
WerWolv
64be4e692c impr: More UI adjustments 2023-11-25 19:11:29 +01:00
WerWolv
8e8a926ad9 impr: Better look of footer items 2023-11-25 19:11:29 +01:00
iTrooz
9306017f01 refactor: refactor setupCompilerFlags() function (#1448) 2023-11-25 15:40:12 +00:00
iTrooz
55c0170791 git: add -x to CI steps where multiple commands are run (#1447) 2023-11-25 14:42:51 +00:00
WerWolv
671b032125 impr: Add syntax highlighting to the demangler 2023-11-25 15:36:50 +01:00
iTrooz
f79fd0edbc git: on MacOS CI, force reinstall python and ignore its exit code/patch it manually if failed (#1446) 2023-11-25 14:20:23 +00:00
WerWolv
8d20277a62 feat: Added setting to enable colored pattern row backgrounds 2023-11-25 13:42:51 +01:00
WerWolv
88032a85cd impr: Even more about page UI improvements 2023-11-25 13:15:21 +01:00
WerWolv
c821967633 impr: More about page UI improvements 2023-11-25 12:44:20 +01:00
Nik
7e660450ed feat: Implement better and more complete undo/redo stack (#1433)
This PR aims to implement a more complete undo/redo stack that, unlike
the old one, also supports undoing insertions, deletions and resize
operations
2023-11-25 12:43:48 +01:00
WerWolv
e5f36ca08d impr: Greatly improve UI of about page 2023-11-25 00:43:03 +01:00
WerWolv
d8249b3a7c impr: Make plugins table not get clipped 2023-11-24 21:04:04 +01:00
WerWolv
3c36ef2c69 impr: Disable some more menu items when they're not useful 2023-11-24 20:57:37 +01:00
WerWolv
b050039e35 fix: Duplicate shortcuts not highlighting correctly 2023-11-24 20:17:01 +01:00
WerWolv
920c6f6507 impr: Remove old splash screen graphic 2023-11-24 20:01:23 +01:00
WerWolv
96a3a74e08 fix: New font settings not applying correctly 2023-11-24 20:01:02 +01:00
WerWolv
fb00f688a8 impr: Update ImGui to use new shadows branch 2023-11-24 15:31:33 +01:00
WerWolv
d6d379108b fix: ImHex not closing when trying to exit with unsaved changes 2023-11-24 11:42:27 +01:00
WerWolv
d34ad33c3c feat: Added setting for font bold, italic and antialiasing 2023-11-24 11:29:05 +01:00
WerWolv
8bdb39983e fix: Error being logged when no magic files are found 2023-11-24 11:28:37 +01:00
WerWolv
59b363d9b2 impr: Move custom font setting behind a enable checkbox 2023-11-23 23:15:42 +01:00
WerWolv
71df45a347 build: Compile plugins as cmake module libraries instead of shared libraries 2023-11-23 23:01:11 +01:00
WerWolv
0b06b1e1e8 fix: Way too many bytes being used for digram and layered distribution plot 2023-11-23 23:00:31 +01:00
iTrooz
45a3ea18d0 chore: Add documentation for Docker-based builds (#1439) 2023-11-23 19:19:19 +00:00
WerWolv
951d74e24b git: brew reinstall doesn't support --overwrite 2023-11-23 14:03:27 +01:00
WerWolv
445dba85ac build: Updated nativefiledialog-extended 2023-11-23 13:58:28 +01:00
WerWolv
d50533bbaf git: Try fix macOS dependency installation in CI again 2023-11-23 13:55:57 +01:00
WerWolv
eafeac4e7b feat: Display task progress percentage in footer 2023-11-23 13:19:50 +01:00
WerWolv
58c3b95c84 impr: Drastically improve performance of diagram processing 2023-11-23 13:09:06 +01:00
WerWolv
5a58ed5114 fix: Make sure store and about page are opened correctly 2023-11-23 13:08:45 +01:00
WerWolv
b619744093 fix: Command palette not appearing on Linux 2023-11-23 09:33:47 +01:00
WerWolv
32276b820f build: Updated libwolv 2023-11-23 09:23:28 +01:00
WerWolv
74e246feed impr: Increase performance when updating task progress 2023-11-23 09:20:26 +01:00
WerWolv
de4ea4081a fix: Popup positions when viewports are disabled 2023-11-23 09:19:51 +01:00
WerWolv
af18501726 git: Always overwrite existing files when installing macOS dependencies 2023-11-22 13:36:15 +01:00
paxcut
ae24ccdfe6 fix: Writing X coord of window position to settings (#1442)
The entry is "hex.builtin.setting.interface.window." but I think it
should be "hex.builtin.setting.interface.window.x"
2023-11-22 12:47:28 +01:00
Nik
095da62250 feat: Add Markdown Report export option (#1441) 2023-11-22 07:26:31 +00:00
WerWolv
909f4b7fe8 refactor: Rename and update localization system 2023-11-21 14:38:01 +01:00
WerWolv
c89a870fe9 refactor: Streamline entire view system 2023-11-21 13:47:50 +01:00
WerWolv
fc23efdb25 impr: Move OpenGL loaders into header to avoid issues in the future 2023-11-20 23:58:49 +01:00
WerWolv
3da209b562 fix: Web build not working anymore 2023-11-20 23:51:50 +01:00
WerWolv
9e0b02f86e build: Update .NET version 2023-11-20 22:55:49 +01:00
WerWolv
a4e14497a5 build: Force set .NET library/include directory variables 2023-11-20 22:49:06 +01:00
WerWolv
5daf725ee3 build: Fix building everywhere else 2023-11-20 22:21:12 +01:00
WerWolv
ffbf409174 build: Fix emscripten build 2023-11-20 22:15:16 +01:00
WerWolv
8b3c297514 build: Fix building on macOS M1 2023-11-20 21:47:23 +01:00
WerWolv
2f8481f5e2 patterns: Updated pattern language 2023-11-20 21:41:07 +01:00
WerWolv
448d792988 fix: Centered text not being centered correctly 2023-11-20 21:40:54 +01:00
WerWolv
1e98e641bb patterns: Updated pattern language 2023-11-20 11:12:48 +01:00
WerWolv
4b13cd666b fix: Resetting shortcuts not saving change to settings 2023-11-19 19:08:31 +01:00
WerWolv
836d66a150 fix: Missing include 2023-11-19 16:11:26 +01:00
WerWolv
de3e92e21b build: Use different method of enforcing nethost.h 2023-11-19 16:11:17 +01:00
WerWolv
f9073ee8ee impr: Prettier data inspector edit button 2023-11-19 16:08:21 +01:00
WerWolv
bd59bcda2c fix: Hiding data inspector rows graying out row above it 2023-11-19 15:55:05 +01:00
WerWolv
0e9302ff08 fix: Hiding custom data inspector rows hiding all defined in the same file 2023-11-19 15:50:13 +01:00
WerWolv
69bdebeb98 fix: 3D Visualizer mirroring model 2023-11-19 15:14:47 +01:00
WerWolv
7b25d97ea2 build: Make sure that ImGui libraries have access to dependencies 2023-11-19 14:55:50 +01:00
WerWolv
9a33110ac3 patterns: Updated pattern language 2023-11-19 14:53:19 +01:00
AnnsAnn❄️
99aae87cd2 git: Fix broken handle in Security.md (#1437)
Your outdated handle was mentioned on the security page, it also appears
to break Githubs markdown renderer for some unknown reason.
2023-11-19 13:17:37 +01:00
WerWolv
ee681b5053 fix: Opening files with non-ASCII paths through the command line
Fixes #1380, Fixes #1435
Thanks a lot to @kyle-sylvestre
2023-11-19 12:24:31 +01:00
WerWolv
981ae5067c build: Try force reconfiguring when nethost header isn't found 2023-11-19 12:03:17 +01:00
WerWolv
60b640d9f5 build: Restructure ImGui dependencies, added Readmes and licenses 2023-11-19 11:59:25 +01:00
Eve
7a1efa8b9a fix: MacOS not finding GL.h (#1436)
### Problem description
Commit 1249eb3261 added `#include
<GL/gl.h>` in a file, but MacOS uses `<OpenGL/gl.h>`.

### Implementation description
If compiling on MacOS, use `<OpenGL/gl.h>`. Otherwise, use `<GL/gl.h>`.

### Additional things
There is a redefine, so I used the preprocessor to ignore it for MacOS.
This feels a little awkward to me (but I don't know how to do it
better).

I'm not particularly familiar with C++, so let me know if this is the
right solution. This is also my first pull request, so feel free to
roast me for anything else :)
2023-11-19 11:57:18 +01:00
WerWolv
a3f74098f2 fix: Potential crash when loading null values from settings 2023-11-18 17:23:50 +01:00
WerWolv
8f4839d8ff impr: Catch exceptions thrown by events 2023-11-18 17:23:36 +01:00
WerWolv
3b01dcf230 feat: Allow hiding data inspector rows 2023-11-18 17:23:15 +01:00
WerWolv
37f9f5619c impr: Respect keyboard layouts for shortcuts again 2023-11-18 15:18:33 +01:00
WerWolv
331716dd48 impr: Don't draw recents window if there are none 2023-11-18 15:11:19 +01:00
WerWolv
14f728ab76 refactor: Give API files more consistent names 2023-11-18 14:50:43 +01:00
WerWolv
1249eb3261 impr: Optimize includes in often used header files 2023-11-18 14:34:33 +01:00
WerWolv
98e0a62e6e impr: Make changing shortcuts also adjust the tooltip in the menus 2023-11-18 14:34:16 +01:00
WerWolv
2d45dce075 fix: Shortcuts not working correctly with non-western keyboards 2023-11-17 20:27:42 +01:00
WerWolv
e7bfa483f8 impr: Make settings tab bar always stick to top of window 2023-11-17 16:05:45 +01:00
WerWolv
36a352b096 feat: Draw info banner on welcome screen if one exists 2023-11-17 15:54:38 +01:00
WerWolv
1f05deddc8 fix: Potential error when parsing Intel Hex and Motorola SREC files 2023-11-17 15:01:57 +01:00
WerWolv
cec925bcdc feat: Add shortcut editor to settings 2023-11-17 14:46:21 +01:00
WerWolv
3bd779a607 fix: URL Decoding not working correctly 2023-11-17 13:13:17 +01:00
iTrooz
4a44cddcea build: Add .dockerignore (#1430) 2023-11-17 09:53:35 +00:00
iTrooz
bf53ee8246 git: Use regular artifact upload action instead of pages upload action for macOS arm64 job (#1431) 2023-11-16 23:55:10 +00:00
iTrooz
f75d5dba84 git: Add MacOS M1 GitHub Action (#1425)
I said I'll do it in #1414

Warning: the output zip does not pass SIP (System Integrity Protection),
and I have no plan to do it for now. So if someone here has a Mac, feel
free to to try to fix the problem (which is probably our build system)

Link #1109

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-11-16 21:31:46 +00:00
qux-bbb
2036dc91e6 impr: Make CRC-32 use reflected version by default (#1406)
<!--
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 -->
Before this PR, the CRC-32 value of ImHex is not like most of others.  

### Implementation description
<!-- Explain what you did to correct the problem -->
Just set m_reflectIn and m_reflectOut of CRC-32 true by default.
2023-11-16 22:24:55 +01:00
iTrooz
39252dfe48 refactor: Move custom ImGui functions to ImGuiExt namespace (#1427)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-11-16 22:24:06 +01:00
WerWolvTranslationBot
77c326d300 lang: Translations update from Weblate (#1420)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Minseo Lee <itoupluk427@gmail.com>
2023-11-16 21:17:43 +00:00
WerWolv
164e52207e git: Fix .NET version not being found 2023-11-16 21:46:38 +01:00
Nemoumbra
1f7e2f5ed3 fix: IPS Patch Achievement not being obtainable (#1429)
It turned out that the achievement "ROM hacks" wasn't actually
unlockable.
I'm not sure if the IPS32 patch also has to trigger this achievement,
but it seemed logical to me so I added the call to both methods.
2023-11-16 21:38:20 +01:00
WerWolv
0bace013a1 fix: Unary operators not working correctly in math evaluator 2023-11-16 21:23:58 +01:00
WerWolv
1df8d19399 impr: Display math evaluator errors again 2023-11-16 21:23:38 +01:00
WerWolv
75df797b41 impr: Unlock framerate for the first few seconds to load UI quickly 2023-11-16 21:14:55 +01:00
WerWolv
1136556a0d fix: Don't treat unlocked achievements as invisible anymore 2023-11-16 13:24:09 +01:00
WerWolv
1331b0691f impr: Better highlighting color when hovering over colors in the theme manager 2023-11-16 13:23:47 +01:00
WerWolv
21057d51e1 impr: More Welcome Screen UI improvements 2023-11-16 13:23:28 +01:00
WerWolv
f00daf171b fix: Crash when loading invalid theme file 2023-11-16 09:32:32 +01:00
WerWolv
22eee94436 impr: Better UI for the Welcome screen 2023-11-16 09:32:24 +01:00
WerWolv
0105ed447f patterns: Updated pattern language
Fixes #1412
2023-11-16 08:47:06 +01:00
WerWolv
dd2ecb3dd9 impr: Replace old headers with new ones in UNIX permission calculator 2023-11-15 22:23:17 +01:00
WerWolv
a51f9fd90c impr: Better UI for the settings view 2023-11-15 22:22:57 +01:00
WerWolv
e32def409a build: Upgraded ImGui to v1.90 2023-11-15 20:22:56 +01:00
WerWolv
657744cc28 patterns: Updated pattern language 2023-11-15 13:43:53 +01:00
WerWolv
a561cee54b fix: SHIFT + Tab not removing tabs in pattern editor 2023-11-15 10:04:48 +01:00
WerWolv
2c0553f8fd impr: Don't wrap centered text anymore 2023-11-14 23:04:45 +01:00
WerWolv
13b72c8f93 git: Update .NET runtime to 8.0.0 and pin it 2023-11-14 22:54:33 +01:00
WerWolv
73454905e8 fix: Theme color flashing amount being off 2023-11-14 22:36:48 +01:00
WerWolv
8e58f469b0 impr: Display latest log at the top of the log console table 2023-11-14 22:30:13 +01:00
WerWolv
5ec7826273 feat: Highlight color when hovering over it in the theme manager 2023-11-14 22:27:29 +01:00
WerWolv
1f109ff59b fix: Auto disabling of "Load all unicode glyph" setting on error not working 2023-11-14 21:13:51 +01:00
WerWolv
10217b5530 fix: "Load all unicode glyphs" setting not working 2023-11-14 21:12:09 +01:00
WerWolv
43f1cc7bd0 fix: Highlight color of bookmark not changing with bookmark 2023-11-14 16:50:38 +01:00
WerWolv
5e523f4cd8 impr: Hide sidebar if all items are disabled 2023-11-14 16:09:26 +01:00
WerWolv
b78435c881 feat: Turn provider settings into sidebar 2023-11-14 15:55:34 +01:00
WerWolv
33e20df511 impr: Make sidebars disableable and resizable 2023-11-14 15:55:25 +01:00
WerWolv
53c04a934e patterns: Updated pattern language 2023-11-14 15:54:43 +01:00
WerWolv
46d3402705 impr: Better UI for the command palette 2023-11-14 12:15:37 +01:00
WerWolv
1ff4d76ae7 feat: Add color names to color picker view 2023-11-14 01:40:54 +01:00
WerWolv
273573ce68 impr: Remove unused includes in tools files 2023-11-14 01:40:43 +01:00
WerWolv
d3ed34d5eb impr: Display folder names of files in subfolders in file chooser popup 2023-11-14 00:37:07 +01:00
WerWolv
375c74abe5 impr: Add command palette button to the title bar 2023-11-14 00:03:22 +01:00
iTrooz
e0264a3459 refactor: Split data processor nodes in several files (#1419)
I'm really not sure about how I grouped the nodes, but that's a start.
In need of review

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-11-13 23:36:39 +01:00
WerWolv
1f73a87327 fix: Multi-byte hex editor data visualizers behaving incorrectly 2023-11-13 09:28:57 +01:00
WerWolv
27f420c8ea fix: Main Window being moved when window overlapping titlebar is moved 2023-11-13 00:06:04 +01:00
WerWolv
29dd3d5fc3 git: Updated git submodule names 2023-11-12 22:50:26 +01:00
WerWolv
0e671b1569 patterns: Updated pattern language
Fixes #1196
2023-11-12 22:47:02 +01:00
iTrooz
2c374e9761 chore: Modify my description as a contributor (#1422) 2023-11-12 13:13:42 +00:00
iTrooz
f0465c63ed build: move third party libraries to lib/third_party (#1417)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-11-12 02:02:54 +01:00
iTrooz
b04cb7648e refactor: refactor tools_entries.cpp into several smaller files (#1418) 2023-11-12 00:22:01 +00:00
WerWolv
46b1b0ba17 impr: Use ImGui::SeparatorText to draw headers 2023-11-12 00:57:29 +01:00
WerWolv
60e3a657f0 fix: Prevent exporting of zero-sized files to language arrays 2023-11-12 00:25:37 +01:00
WerWolv
3d04669ef0 fix: Goto and Select being able to select bytes in zero-size files 2023-11-12 00:20:30 +01:00
WerWolv
9fb60a8ab0 fix: Docking two detached tools to each other causing them to vanish 2023-11-12 00:10:16 +01:00
WerWolv
17540b0120 fix: Prevent Goto from making selections that start before the base address 2023-11-11 23:43:48 +01:00
WerWolv
af77819913 fix: Crash when choosing File -> Select without an active selection 2023-11-11 23:43:32 +01:00
WerWolv
1c8af096de fix: Out of bounds read with a zero-size file 2023-11-11 23:11:34 +01:00
WerWolv
7f35d81722 fix: Selecting byte ranges that don't exist causing a crash 2023-11-11 23:00:37 +01:00
WerWolv
26f873a364 impr: Improve UI/UX of color picker and regex replacer tool 2023-11-11 22:43:27 +01:00
WerWolv
b101d11821 fix: Separate calculator and graphing calculator input 2023-11-11 21:22:28 +01:00
WerWolv
50a1956d92 fix: Unary operators in math evaluator not working correctly 2023-11-11 21:22:11 +01:00
WerWolv
5a4f31bfa5 feat: Make color picker tool much more useful 2023-11-11 20:56:50 +01:00
iTrooz
7405219fb8 build: Make ImHex buildable for MacOS arm64 (#1414) 2023-11-11 20:56:30 +01:00
WerWolv
30ce4b6e3c patterns: Updated pattern language 2023-11-11 12:07:38 +01:00
WerWolv
7d53636e10 feat: Added simple graphing calculator 2023-11-11 00:54:16 +01:00
WerWolv
aa93bcb142 impr: Better exit task logging 2023-11-10 23:25:02 +01:00
WerWolv
2073793fcd impr: Make backspace work while holding shift in the text editor
Closes #1409
2023-11-10 22:25:39 +01:00
WerWolv
388523a4ea fix: Build on Windows 2023-11-10 22:21:19 +01:00
WerWolv
ec4942174b fix: Proxy not being disabled correctly when disabling it in the settings 2023-11-10 21:59:20 +01:00
WerWolv
01f7a09012 fix: Build on non-windows 2023-11-10 21:52:28 +01:00
WerWolv
c35ea228e4 fix: Crash when trying to close providers 2023-11-10 21:03:31 +01:00
WerWolv
498d8c1d65 impr: General code cleanup 2023-11-10 20:47:08 +01:00
WerWolv
3aacf0f1fb feat: Added Experiments 2023-11-10 14:48:26 +01:00
WerWolv
4fc2fb7a6f feat: Added support for filtering patterns by value 2023-11-10 14:48:13 +01:00
WerWolv
d12f5016e4 fix: PageUp/PageDown being slightly weird 2023-11-09 16:07:14 +01:00
WerWolv
f1e0960a26 feat: Allow exporting bytes as text to a file 2023-11-09 14:57:58 +01:00
WerWolv
0f5d659ce2 impr: Fade out zero bytes in HTML formatted data 2023-11-09 14:42:29 +01:00
WerWolv
a64aa6941d fix: Force achievement popup to front 2023-11-08 21:57:19 +01:00
WerWolv
66cac8350e fix: Kaboom achievement not triggering 2023-11-08 21:40:27 +01:00
WerWolv
384c2a7701 fix: Format string issue 2023-11-08 12:51:39 +01:00
WerWolv
ad4e7c3355 impr: Don't check for overflow every frame 2023-11-08 12:46:47 +01:00
WerWolv
ea5d4ca3ae impr: Detect overflow in Euclidean algorithm tool 2023-11-08 12:40:33 +01:00
WerWolv
87e7f817c1 feat: Added extended Euclidean algorithm to tools 2023-11-08 11:54:57 +01:00
WerWolv
3af1840c6a fix: Typo and formatting 2023-11-08 11:54:21 +01:00
WerWolv
e5ff04be29 fix: Crash when using too large column count 2023-11-08 11:54:03 +01:00
WerWolv
da851c3c10 fix: Average and Median nodes using wrong output types 2023-11-08 11:53:46 +01:00
WerWolv
d160aeec4b impr: More sidebar visual improvements 2023-11-08 11:53:26 +01:00
WerWolv
e18275c1c0 fix: Division by zero when setting page size to 0 2023-11-08 11:14:56 +01:00
WerWolv
1ca71ec30d impr: Make sidebar look better 2023-11-07 16:40:41 +01:00
iTrooz
759351cec0 git: set fail-fast to false (#1403) 2023-11-07 15:09:13 +00:00
WerWolv
ef320b74b0 impr: Handle showing popups when closing unsaved providers better 2023-11-07 15:31:54 +01:00
iTrooz
6e6c5c4cb7 build: Fix build script for MacOS (#1404)
Fix build problem introduced by
https://github.com/WerWolv/ImHex/pull/1398
I didn't refactor the code well because I thought `CREATE_PACKAGE` was
an option only used for Windows, when it needs to be used for MacOS too
2023-11-07 14:06:38 +01:00
WerWolv
669e1921a4 feat: Added Euclidean Algorithms tools 2023-11-07 00:47:10 +01:00
WerWolv
924b4a9436 impr: Replace various fixed-size boxes with dynamic ones 2023-11-07 00:46:44 +01:00
WerWolv
f49b5efac4 fix: UI issues in the data information view 2023-11-07 00:46:17 +01:00
WerWolv
8581ab9eb3 feat: Added simple data access graph to pattern editor 2023-11-06 15:15:35 +01:00
WerWolv
7efe9acefb fix: Warnings about missing theme/style handlers being printed on launch 2023-11-06 15:15:18 +01:00
WerWolv
94f3664dbc impr: Make TCP Client/Server table visible when detaching tool 2023-11-05 21:52:12 +01:00
WerWolv
d1f8053fbb fix: Format string vulnerability 2023-11-05 21:51:49 +01:00
WerWolv
713ce86e24 build: Updated libwolv 2023-11-05 21:17:44 +01:00
WerWolv
7efdcfd888 fix: Properly align welcome screen again 2023-11-05 21:17:37 +01:00
iTrooz
988a674617 git: Make job fail if no artifacts could be found to be uploaded (#1401) 2023-11-05 19:57:58 +01:00
WerWolv
4e4cdcdf61 feat: Added release notes and commits to about page 2023-11-05 19:57:29 +01:00
WerWolv
0388bbdc6d build: Updated libwolv 2023-11-05 18:44:18 +01:00
WerWolv
30d47fd51b build: Updated libwolv 2023-11-05 18:39:48 +01:00
WerWolvTranslationBot
2e45069882 lang: Translations update from Weblate (#1400)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: xtex <xtexchooser@duck.com>
2023-11-05 12:59:07 +01:00
WerWolv
3b2cf5b851 build: Updated libromfs 2023-11-05 01:03:19 +01:00
WerWolv
4d456f1bc0 impr: Don't display U64_MAX as region size when null provider is open 2023-11-05 00:56:45 +01:00
WerWolv
d6ba41c2d9 fix: Disable IP and Port fields when TCP Client/Server are connected 2023-11-05 00:10:59 +01:00
WerWolv
c9a728c318 fix: Rare crash when monitor connection status changes 2023-11-05 00:04:32 +01:00
WerWolv
4c2fe8e03c impr: Various TCP Client/Server tool improvements 2023-11-05 00:00:32 +01:00
WerWolv
ec95c260bb fix: Only register event shutting down the network interface once 2023-11-04 23:41:52 +01:00
WerWolv
e7eaa2b194 build: Updated libwolv 2023-11-04 23:35:34 +01:00
WerWolv
fe59ce3e60 fix: Splash screen not resizing correctly 2023-11-04 23:16:53 +01:00
WerWolv
45fb046a9a impr: Make events thread safe 2023-11-04 23:16:38 +01:00
WerWolv
055e18058f fix: Network interface not shutting down correctly 2023-11-04 22:20:22 +01:00
WerWolv
fa5e32496c fix: Make sure main window stays within the window at all times 2023-11-04 22:10:34 +01:00
iTrooz
44a1efffa0 git: Make MacOS builds use MacOS 12 instead of 11 (#1399)
Context: MacOS 11 (Big Sur) is EOL + llvm@17 has been released, and it
has no binaries for Big Sur, making the CI hang
2023-11-04 13:51:13 +01:00
iTrooz
c839ee7d13 build: Improve names of packaging cmake options (#1398)
This PR is simply a refactor, to clarify these flags that shouldn't
impact anything
2023-11-04 00:11:50 +00:00
WerWolv
c7c01c1f24 build: Removed old jthread search 2023-11-02 20:48:34 +01:00
WerWolv
615596dfe9 fix: Standard jthread detection 2023-11-02 20:41:47 +01:00
WerWolv
407ec1ceb6 build: Use custom jthread implementation if standard one is not available 2023-11-02 20:21:38 +01:00
WerWolv
eefdbe7ef1 patterns: Updated pattern language 2023-11-02 09:37:14 +01:00
WerWolv
cd6a62dd27 fix: Welcome screen having a weird header 2023-11-02 09:34:03 +01:00
WerWolv
4e6af607e8 fix: Crash when clicking on the welcome screen 2023-11-02 08:54:02 +01:00
WerWolv
363b07fc0c impr: Switch to custom std::expected implementation 2023-11-02 08:53:46 +01:00
WerWolv
a719627be6 build: Updated dependencies 2023-11-01 11:07:11 +01:00
WerWolv
f14f77b4f0 git: Updated Mary's profile link 2023-11-01 10:43:59 +01:00
WerWolv
a92aa58be8 build: Updated libromfs 2023-10-31 21:59:22 +01:00
WerWolv
9617212ef1 impr: Allow visualizers to have optional parameters 2023-10-31 10:56:20 +01:00
WerWolvTranslationBot
4af66f7d3d lang: Translations update from Weblate (#1396)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

Co-authored-by: Minseo Lee <itoupluk427@gmail.com>
2023-10-31 10:02:23 +01:00
WerWolv
c7cee59a77 impr: Added build date and time to about page 2023-10-30 23:24:00 +01:00
WerWolv
7002e3bbf3 impr: Make popups fully opaque 2023-10-30 23:14:22 +01:00
WerWolv
c37c53369b impr: Dock newly opened windows by default 2023-10-30 21:53:44 +01:00
Professor Plum
e827ad4b8d git: Added pcap plugin to plugin list (#1395)
Adds a reference to [Pcap
Plugin](https://github.com/Professor-plum/ImHex-Plugin-Pcap) under
Third-Party Plugins

### Problem description
Adds a reference to an external repository for an ImHex Plugin to view
raw data within pcap files.

### Implementation description
The ImHex Plugin is implemented as an additional Data Provider. It
allows BPFs and selecting multiple packets for data reassembly.

### Screenshots

![screenshot](https://raw.githubusercontent.com/Professor-plum/ImHex-Plugin-Pcap/master/Images/Screenshot.png)

### Additional things
Should there be any questions I'm also available on Discord.
2023-10-30 17:47:47 +00:00
WerWolv
2fee380459 fix: Make sure window is fully opaque by default 2023-10-30 16:40:14 +01:00
WerWolv
94ad6e6072 fix: Crash on exit 2023-10-30 16:39:57 +01:00
WerWolvTranslationBot
a980097d64 lang: Translations update from Weblate (#1393)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Minseo Lee <itoupluk427@gmail.com>
2023-10-30 16:32:55 +01:00
WerWolv
b2774bf472 build: Updated libromfs 2023-10-30 13:28:07 +01:00
WerWolv
44ce81211e build: Updated libromfs 2023-10-29 21:05:11 +01:00
WerWolv
c444ad9280 impr: Bundle default magic file with application 2023-10-29 19:43:45 +01:00
iTrooz
80ca6bf177 feat: do not make splash screen wait for checkForUpdates task (#1390) 2023-10-26 21:45:43 +00:00
WerWolv
a0178ebab9 fix: File picker not handling supported extensions correctly
Fixes #1367
2023-10-26 17:28:36 +02:00
WerWolv
e63af24626 fix: Documentation AI not working correctly often
Fixes #1375
2023-10-26 17:19:23 +02:00
WerWolv
f94c23d64d fix: Copy As -> Go Array producing syntactically invalid code
Fixes #1391
2023-10-26 17:13:59 +02:00
iTrooz
bffc229fa8 feat: handle content store entries managed by the system (in a read-only folder) (#1389) 2023-10-24 20:00:49 +02:00
WerWolv
aae5586b5c fix: Provider tab bar arrow buttons not working
Fixes #1374
2023-10-24 19:29:22 +02:00
iTrooz
4f2d14e220 fix: fix forwarding multiple arguments to subcommands (#1388) 2023-10-24 07:59:23 +00:00
Nik
58189e5403 impr: Allow console output to work when debugging (#1382) 2023-10-22 21:39:14 +00:00
WerWolv
215e1ffdc8 fix: Weird indentation 2023-10-22 23:06:35 +02:00
WerWolv
9fdd4670b7 build: Don't bundle SDK by default 2023-10-22 22:46:29 +02:00
WerWolv
03af1687d9 build: Only copy required libraries to SDK 2023-10-22 22:01:42 +02:00
WerWolv
cb2aee0ed7 fix: Various TCP tool issues 2023-10-22 21:52:55 +02:00
WerWolv
e92f937587 build: Bundle SDK with releases 2023-10-22 21:27:13 +02:00
WerWolv
73d7cc7c12 patterns: Updated pattern language 2023-10-22 21:22:50 +02:00
WerWolv
8cd0561e71 fix: Binary Pattern search being broken with alignments > 1 2023-10-22 20:59:32 +02:00
WerWolv
1b54a8858e lang: Added localization for debug view 2023-10-22 19:51:15 +02:00
WerWolv
c3825fff65 fix: Actually fix dropdown default values 2023-10-22 17:51:00 +02:00
WerWolv
c51db87c34 fix: Language setting not defaulting to English anymore 2023-10-22 17:31:53 +02:00
WerWolv
beca8033cf fix: Modifying last byte in row copies first byte from current row to next row
Fixes #1329
2023-10-22 13:46:21 +02:00
Nik
72f2f0877d feat: Added TCP Client/Server tool (#1379) 2023-10-21 22:46:45 +00:00
WerWolv
79f18d12e6 fix: Native scaling being way too small 2023-10-21 23:58:51 +02:00
Nik
7fe9a768d4 impr: Rewrote entire settings API and UI (#1378) 2023-10-21 21:07:33 +00:00
Nik
f114239f51 feat: Added Auto Updater for Windows, macOS and Ubuntu (#1377) 2023-10-21 18:40:24 +00:00
WerWolv
c46e445a04 impr: Store achievement progress immediately when unlocking one 2023-10-20 13:34:45 +02:00
WerWolv
d91334abcd patterns: Updated pattern language 2023-10-20 12:39:34 +02:00
WerWolv
5227887dbf impr: Added more fine-grained colors to themes 2023-10-20 12:30:21 +02:00
WerWolv
d07d36f784 fix: Loading of data processor workspaces not working correctly 2023-10-19 23:53:20 +02:00
WerWolv
c9cd7ad4a6 fix: Data processor recursion detector triggering too soon 2023-10-19 23:34:05 +02:00
Nik
b4ee02b725 fix: Shift right data processor node displaying shift left in its header 2023-10-19 22:48:11 +02:00
WerWolv
79e25b0889 feat: Added bitwise shift left/right data processor nodes 2023-10-19 22:08:39 +02:00
Gonzalo Avila Alterach
5d50a3927e fix: Updated wrong link to pattern language docs (#1371)
Just a very simple update to point to the right documentation URI
2023-10-18 22:04:39 +02:00
WerWolv
7769b556f7 web: Added more information to the PWA manifest 2023-10-17 13:45:57 +02:00
WerWolv
58870f3057 fix: File load achievement triggering every time a file was opened through the cli 2023-10-17 13:45:12 +02:00
WerWolv
8821f75e6b impr: Display friendly disk name as the tab title of the disk provider 2023-10-17 10:22:56 +02:00
iTrooz
88b2f60291 feat: add WPA manifest to web version (#1369) 2023-10-17 07:31:56 +00:00
WerWolv
c49aad6cd3 impr: List all physical drives on windows in the raw disk provider 2023-10-16 23:45:46 +02:00
WerWolv
afceb34729 fix: Crash when opening invalid files through the CLI 2023-10-16 10:59:49 +02:00
paxcut
93c8a45de0 fix: Fixed spacing in bit labels so it works for any font and any size. (#1365)
Testing various fonts and sizes I realized there were still problems
with the layout of the bit labels. Also I reorganized the code so that
lambdas are defined just before they are used. Comments needed
punctuation too.

Part of the problem was that I had been assuming all along that the
check boxes were ImGui's originals which are always square. In actuality
the width is determined by the width of the character for '0'. Also
ImGui table was adding spacing to separate cells which made the boxes
not start at same place as column. Also for some reason using indent of
zero didn't work as expected but using 0.1 pixels worked. With those
problems fixed it is fairly easy to make sure the labels are centered at
the box except when the first mantissa checkbox gets a label which is
wider that the box width. Before and after show results for different
fonts.

Before:

![image](https://github.com/WerWolv/ImHex/assets/53811119/3778e6d5-6fbd-48e1-ac51-39a6636daea5)

After:

![image](https://github.com/WerWolv/ImHex/assets/53811119/79c0f027-3119-4762-a4e3-315e84505f3b)
2023-10-15 20:07:51 +00:00
mirusu400
1f208dbb21 lang: Sync json key order in each lang file (#1366)
### Implementation description
I synchronized the json key order with `en_US.json` in each lang file.


### Additional things
Here are simple python script that make this change
```python
import json
from collections import OrderedDict
original = "./en_US.json"

modified = [
    "./de_DE.json",
    "./es_ES.json",
    "./it_IT.json",
    "./ja_JP.json",
    "./ko_KR.json",
    "./pt_BR.json",
    "./zh_CN.json",
    "./zh_TW.json",
]

for modify in modified:

    dict_2 = {}
    
    with open(original, 'r', encoding='utf-8') as f1, open(modify, 'r', encoding='utf-8') as f2:
        dict_1 = json.load(f1)
        dict_2 = json.load(f2)
        dict_1_translations = dict_1["translations"]
        dict_2_translations = dict_2["translations"]
        
        ordered_dict_2 = OrderedDict((k, dict_2_translations[k]) for k in dict_1_translations.keys())
        dict_2["translations"] = ordered_dict_2
    
    with open(modify, 'w', encoding='utf-8') as f2:
        json.dump(dict_2, f2, ensure_ascii=False, indent=4)
```
2023-10-15 21:23:07 +02:00
iTrooz
4e9cbd14eb build: use microsoft vcpkg repository for the web build (#1368) 2023-10-14 11:31:37 +00:00
WerWolv
da1b53420f feat: Added debug variables to aid with development 2023-10-13 23:46:48 +02:00
WerWolv
5a71cc2d61 fix: Wikipedia explainer tool randomly resetting input 2023-10-12 20:35:44 +02:00
WerWolv
b98b60a126 fix: Provider hover tooltip always showing information about current provider 2023-10-12 20:28:02 +02:00
WerWolv
929e0e64a5 fix: Achievement hovering popups showing up even when they are covered by another window 2023-10-12 20:24:02 +02:00
WerWolv
48a1e93cfe fix: Tool windows drawing on top of the welcome screen
Fixes #1364
2023-10-12 15:15:05 +02:00
iTrooz
b908965048 feat: log exit tasks to console (#1363) 2023-10-11 20:38:54 +00:00
WerWolv
afa149f2db patterns: Updated pattern language
Fixes #1361
2023-10-11 22:20:25 +02:00
iTrooz
6c3c2849fa build: build appimage using docker instead of github CI (#1358) 2023-10-11 16:17:52 +02:00
iTrooz
6cbfb00cca fix: Small modifications to test webserver (#1360) 2023-10-10 15:28:58 +00:00
iTrooz
7b22c49329 build: Integrate my libmagic patch into the Dockerfile rather than my vcpkg fork (#1359)
This PR integrates my libmagic patch into the Dockerfile rather than my
vcpkg fork (so we can use the official vcpkg repository in the future)
That said, we still use my vcpkg fork for now because official vcpkg
fails to compile freetype
2023-10-10 14:58:43 +00:00
iTrooz
c7c05e2621 fix: Re-enable window transparence on Linux (#1357) 2023-10-09 12:47:48 +00:00
lomekragow
7fc2ff3002 fix: Event unsubscribe not working correcetly when using same key for multiple events (#1309)
<!--
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 -->

Fixed possible bug of  `EventManager::unsubscribe`

`std::map` only allows unique key, but the same token can subscribe to
multiple events.

1a2a926b77/lib/libimhex/include/hex/api/event.hpp (L104-L107)

If the previous token has already subscribed to an event, then when
subscribing again, `getTokenStore().insert` will not do anything
(Because its type is `std::map`)


1a2a926b77/lib/libimhex/include/hex/api/event.hpp (L122-L134)

At this point in `unsubscribe`, the `iter` may not be able to find the
correct event and erase it



### Implementation description
<!-- Explain what you did to correct the problem -->

Change `tokenStore` to `std::multimap` instead of `std::map`, which
cannot unsubscribe multiple events correctly

### 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 -->
2023-10-07 23:35:35 +02:00
iTrooz
bb36000dd9 build: install pixmaps folder in ArchLinux package (to have the icon) (#1355) 2023-10-07 19:41:34 +00:00
iTrooz
19ef188f7b build: Remove some libGL libraries from the AppImage (#1354) 2023-10-07 20:42:07 +02:00
WerWolv
23e1c714d6 patterns: Updated pattern language 2023-10-06 19:31:48 +02:00
WerWolv
a07b678a61 fix: Enable unicode support on the web again 2023-10-06 15:33:55 +02:00
WerWolv
6cf3bfb89f web: Center initial loading text again 2023-10-06 15:30:27 +02:00
WerWolv
85515a729f web: Make sure canvas takes up the full window 2023-10-06 15:23:00 +02:00
WerWolv
d36e299c35 fix: Cut font texture width in half 2023-10-06 14:28:10 +02:00
WerWolv
9e5e3e94a3 fix: Disable auto scaling on the web 2023-10-06 12:57:29 +02:00
WerWolv
4db10f1c8b fix: Disable unicode support on the web version 2023-10-06 11:11:04 +02:00
WerWolv
5faf1380d7 fix: Force font atlas texture to not get too tall 2023-10-06 10:57:48 +02:00
WerWolv
baa5c34b55 fix: Reset popup position back on screen if it's outside of it
Closes #1348
2023-10-05 08:56:00 +02:00
Andreas Källberg
d19d812ccb impr: Don't force using discrete graphics card on macOS (#1341)
<!--
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 -->
When starting ImHex on a MacBook model with both integrated and discrete
graphics, it will force the computer to use the discrete graphics card.
This causes increased power usage, meaning the fans will spin up, the
battery will drain faster, etc. This program is not very graphics
intensive, so using the discrete graphics card shouldn't be needed.

### Implementation description
<!-- Explain what you did to correct the problem -->
I changed the
[`GLFW_COCOA_GRAPHICS_SWITCHING`](https://www.glfw.org/docs/latest/window_guide.html#window_hints_osx)
setting in GLFW to not enforce using the discrete graphics.

### 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 -->
My editor is configured to automatically remove trailing whitespace, so
I hope that those whitespace changes are ok
2023-10-05 08:39:53 +02:00
iTrooz
e2b7427e7b git: cache vcpkg dependencies in web build (#1344) 2023-10-05 00:08:34 +02:00
WerWolv
44ae942de4 web: Improved social embeds 2023-10-04 23:12:01 +02:00
iTrooz
e14efc6ca2 git: Remove CACHE_VERSION secret from cache keys (#1343)
Rationale: secrets (and vars) are not shared with pull requests, so they
can't use the cache

This PR fix that
2023-10-04 22:23:41 +02:00
WerWolvTranslationBot
f982ff62e4 lang: Translations update from Weblate (#1346)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Anonymous <noreply@weblate.org>
2023-10-04 22:22:58 +02:00
WerWolvTranslationBot
5b8947c36b lang: Translations update from Weblate (#1322)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Nik <werwolv98@gmail.com>
Co-authored-by: xtex <xtexchooser@duck.com>
2023-10-04 22:18:45 +02:00
5idereal
07a274fe4c lang: Updated zh_TW translation (#1333)
<!--
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

### Implementation description

Updated Traditional Chinese (Taiwan) translations for ImHex.

### 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 -->
2023-10-04 22:10:28 +02:00
paxcut
081c581b8c fix: Layout of large font labels in IEEE 745 floating point tool (#1337)
### Problem description
The issue seems to only affect the web version of ImHex but it is not
clear why. The labels of the checkboxes that represent bits in the IEEE
745 floating point tool were lay out incorrectly.

### Implementation description
The new code ensures that the bit labels are centered and located in the
middle of the checkbox regardless of the font size and the dear imgui
sized checkboxes.
2023-10-04 22:10:06 +02:00
WerWolv
1c88c3a8bd fix: Reloading ImHex not working in the web version 2023-10-04 21:45:43 +02:00
WerWolv
eb41622a38 feat: Properly detect native theme on the web version 2023-10-04 21:34:50 +02:00
Darío Hereñú
13c9b80bca doc: fix typo in SECURITY.MD (#1332) 2023-10-04 20:22:07 +02:00
iTrooz
c72853596f fix: disable web deployment on forks (#1342) 2023-10-04 20:16:44 +02:00
WerWolv
e57c9ff4f6 build: Updated libwolv 2023-10-04 16:13:40 +02:00
WerWolv
ed8c0794bb fix: Querying default folder paths not working right on the web 2023-10-04 16:10:14 +02:00
WerWolv
d7bf3746f7 build: Enable null sanitizer in the browser to avoid null derefs being okay 2023-10-04 13:53:46 +02:00
WerWolv
6c773c0135 web: Added alert when running in Firefox private mode 2023-10-04 13:41:45 +02:00
WerWolv
a06752b349 build: Updated libwolv 2023-10-04 13:41:21 +02:00
iTrooz
d15bd4771d feat: Support for building ImHex for the web (#1328)
Co-authored-by: WerWolv <werwolv98@gmail.com>
Co-authored-by: AnnsAnn <git@annsann.eu>
2023-10-04 12:00:32 +02:00
WerWolv
a62ede7840 fix: Properly fix possibility of no provider being selected when closing one 2023-10-01 20:56:25 +02:00
WerWolv
bcab657a06 fix: No provider being selected in some cases when closing a provider 2023-10-01 20:18:26 +02:00
WerWolv
9dbae2051b fix: Try search frameworks folder for nethost library on macOS 2023-10-01 18:07:16 +02:00
WerWolv
7400b9ce8a build: Fixed macOS library path 2023-10-01 16:59:04 +02:00
WerWolv
4436e8a589 build: Try to fix script loader on macOS 2023-10-01 16:18:31 +02:00
WerWolv
e241adab0e build: Update windows resource file for the first time ever 2023-09-28 08:16:24 +02:00
WerWolv
51880fc2a8 build: Fixed build/install of refactored forwarder 2023-09-27 15:13:58 +02:00
WerWolv
89bffbd1bc fix: Crash when exceptions are thrown in data processor nodes 2023-09-27 14:19:08 +02:00
WerWolv
e80c7bff1c impr: Refactored forwarder executable and add lots more information to it 2023-09-27 14:14:27 +02:00
WerWolv
b3ef615158 feat: Allow Edit -> Jump to to jump to little and big endian addresses
Closes #1324
2023-09-26 14:01:28 +02:00
StarrFox
25ddaa08dc build: Fix building with capstone < 5 (#1323)
<!--
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 -->
This might fix building with capstone 4 as discussed in
https://discord.com/channels/789833418631675954/1155669027306340393/1155669027306340393

### Implementation description
<!-- Explain what you did to correct the problem -->
moves the max definition inside the if statement that checks for
capstone 5
2023-09-25 21:52:28 +02:00
WerWolv
fb48eb91d6 git: Fixed Ubuntu release commit hash and branch variable setting again 2023-09-25 21:46:37 +02:00
Nik
865d7e9b20 git: Fixed Ubuntu release commit hash and branch variable setting 2023-09-24 22:41:32 +02:00
WerWolv
f5b8021405 build: Bumped version to 1.31.0 2023-09-24 20:05:03 +02:00
WerWolv
89abc8557f feat: Added shortcuts for the pattern debugger 2023-09-24 18:26:42 +02:00
WerWolv
181a7c5b3d feat: Added evaluate pattern shortcut 2023-09-24 18:17:58 +02:00
WerWolv
f79e2df11a feat: Added shortcut to switch between providers 2023-09-24 18:11:17 +02:00
Paul Sorensen
be8c679d4a impr: Return early to remove nested code (#1253)
<!--
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 -->
This will simplify the codebase in the pattern drawer. It returns early
on conditional statements and reduces the amount of nested code making
it easier to read and track while developing.
2023-09-20 10:49:09 +02:00
paxcut
c577a42f62 impr: Refactoring of floating point tool to decrease code complexity. (#1275)
I noticed the bad score on code factor so I reorganized it to make it
more readable and maintainable. In order to break down the big function
into it much smaller parts I encapsulated all the variables that the
functions need to access in two classes, one for the imgui related
statics and the other for non-static variables.

When writing the smaller functions I was noticed that there was room to
simplify the existing algorithms by writing functions that could be
called by parts that previously shared no code. I tested the changes the
same way I tested the original and it seems to work the same way but
maybe a bit faster. Although it may be possible to further optimize the
present code code factor no longer flags the function at all.
2023-09-20 10:48:44 +02:00
Lennard Fonteijn
ad69ac84b1 feat: Added hex::group attribute and various fixes (#1302)
As discussed (many times) on Discord, does the same as the new favorite
tag, but instead allows you to add multiple groups.

Initially, this would cause some insane issues with draw/reset
(apparantly) fighting eachother in the pattern drawer. After a lot of
trial and error, I decided to rewrite the flow that is responsible for
calling reset. Now evaluating patterns is the one to decide when the
reset happens, not the core "game"-loop.

To make sure that draw and reset can never happen at the same time, the
mutex originally used for the favorites has been repurposed. Due to the
restructuring, the mutex in the favorite-task is no longer needed, as
that will only ever kick-off after reset is called and if there are
actually patterns, which can never line up to be accessed on different
threads at the same time.

Last but not least, I noticed that hard crashes could result in your
config file getting overridden. I added a check to prevent that.

Last I issue I can see is that if you use an excessive amount of
favorites/groups, a crash can still happen, but it only happens when you
close the program (occasionally, but unpredictable). Before, this would
happen if you ran the evaluation a second time. I boiled the cause of
the crash down to these lines of code in evaluator.cpp >
patternDestroyed:

```cpp
if (pattern->isPatternLocal()) {
    if (auto it = this->m_patternLocalStorage.find(pattern->getHeapAddress()); it != this->m_patternLocalStorage.end()) {
        auto &[key, data] = *it;

        data.referenceCount--;
        if (data.referenceCount == 0)
            this->m_patternLocalStorage.erase(it);
    } else if (!this->m_evaluated) {
        err::E0001.throwError(fmt::format("Double free of variable named '{}'.", pattern->getVariableName()));
    }
}
```

Specifically, trying to access the `*it` is the reason for the crash
(this was also the cause of the crashes before my fixes, but then during
evaluation).

I'm suspecting the root cause is somewhere in the `.clone` methods of
the patterns. I'd say that for now a crash when closing the program is
more acceptable than during evaluation (which can even happen if you use
favorites).
2023-09-16 13:09:59 +02:00
Imron jehleh
64a30a45d5 fix: Error popup now showing up immediately after click (#1272)
From #1265, Looks like Error Popup doesn't handle properly in some
circumstances.

---------

Co-authored-by: iTrooz <hey@itrooz.fr>
Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-09-16 13:09:24 +02:00
PerikiyoXD
691df0fc83 fix: Implemented forwarder executable (#1308)
Fixes random .NET plugin crash caused by the console window being freed
on the same process.

### Problem description
Sometimes when launching from the explorer ImHex crashes

### Implementation description
We've implemented a launcher to avoid freeing the std streams, that
generated the bug.

### Screenshots
N/A

### Additional things
Blame windows console subsystem
2023-09-16 13:08:19 +02:00
WerWolv
1a2a926b77 fix: "About ... that much" achievement not triggering correctly 2023-09-12 22:24:12 +02:00
WerWolv
da18428f27 fix: Highlighting not being cleared correctly in some cases 2023-09-12 22:23:47 +02:00
iTrooz
5e86f62a98 fix: Handle exceptions thrown by providers on loadSettings() (#1307) 2023-09-12 12:00:00 +02:00
iTrooz
e65021c85e feat: Add more details to startup tasks (#1301) 2023-09-09 12:49:15 +02:00
WerWolv
83e26522b6 fix: Potential use-after-free with the .NET SDK 2023-09-08 22:00:15 +02:00
WerWolv
d011f37658 impr: Added better provider documentation 2023-09-08 21:59:27 +02:00
iTrooz
c07842d7ca refactor: separate loop and frame logic (#1300) 2023-09-07 20:33:49 +02:00
Nik
4e7c3817ed git: Updated windows build instructions 2023-09-05 13:43:29 +02:00
WerWolv
68b203eb75 patterns: Updated pattern language 2023-09-05 10:40:10 +02:00
WerWolv
1bb0a72bed fix: Issues with various float nodes 2023-09-04 19:59:09 +02:00
WerWolv
7685a22c5f fix: Crash when pressing delete twice when data processor nodes are selected 2023-09-04 19:58:55 +02:00
WerWolv
fc91c8e4b0 patterns: Updated pattern language 2023-09-04 19:58:31 +02:00
iTrooz
57084fd797 build: Update libfmt to 10.1.1 (#1286) 2023-09-03 22:49:47 +02:00
WerWolv
2b8a9db0f0 impr: Clean up default layout file 2023-09-03 22:45:03 +02:00
WerWolv
9badfc043b patterns: Updated pattern language 2023-09-03 22:37:58 +02:00
WerWolv
4ff25819c2 fix: Pasting not working correctly on non-zero pages
Fixes #1291
2023-09-03 16:25:51 +02:00
WerWolv
563ff5a774 fix: Future proof the previous fix 2023-09-03 16:18:29 +02:00
WerWolv
b042b8327a fix: Crash when re-opening a custom section window while having a selection in it 2023-09-03 16:09:06 +02:00
WerWolv
971c8739ca fix: Potential crash when preprocessing invalid pattern file when loading a file 2023-09-03 15:49:27 +02:00
WerWolv
26f4aa0d9f fix: Buffer to integer node not working correctly 2023-09-03 15:41:00 +02:00
WerWolv
dc5e5344c5 fix: ImHex not starting at all anymore when launched through the explorer 2023-09-03 14:07:47 +02:00
WerWolv
b2d1568abb fix: First overlay being assigned to all end nodes 2023-09-03 13:44:13 +02:00
WerWolv
632f388ece impr: Make --pl subcommand automatically register ImHex's include dirs 2023-09-03 12:25:00 +02:00
WerWolv
632ca944de impr: Align log output better 2023-09-03 11:45:20 +02:00
WerWolv
0bbd21f25a fix: Build issues with older standard libraries 2023-09-03 11:44:48 +02:00
WerWolv
367c4ec9c8 impr: More view comments and refactoring 2023-09-03 10:27:03 +02:00
WerWolv
5538307838 impr: Make achievement popups stay up for longer 2023-09-03 10:26:40 +02:00
WerWolv
eba8c82699 fix: Crash when using provider overlays 2023-09-03 10:26:25 +02:00
iTrooz
be3ac26306 fix: Remove remannts of #680 bugfix (#1282) 2023-09-02 22:59:09 +02:00
iTrooz
fc1ad592cb feat: Adapt content store view for new API contents (#1268) 2023-09-02 18:36:34 +02:00
Lennard Fonteijn
f725d763d1 feat: Remember bytes per row in Hex Editor (#1276) 2023-09-02 17:52:05 +02:00
iTrooz
c2fe9f0966 fix: verify that file names queried from the store do not allow path traversal (#1277) 2023-09-02 17:51:21 +02:00
iTrooz
235f4e39b4 git: build llvm ourselves in Fedora packages (#1280) 2023-09-02 16:41:20 +02:00
WerWolv
58cef2361b impr: Added hint when patterns are still loading 2023-08-30 10:04:06 +02:00
WerWolv
60649d1cba fix: Occasional crash when using favorites 2023-08-30 09:18:24 +02:00
WerWolv
ea9457c08c patterns: Added [[hex::favorite]] attribute 2023-08-29 21:46:08 +02:00
WerWolv
7bf9634e6e patterns: Updated pattern language 2023-08-29 12:14:34 +02:00
WerWolv
4288f876e2 impr: Added lots of comments and cleaned up many views 2023-08-29 12:14:12 +02:00
iTrooz
10ad239fb9 fix: add _lang suffix to "Load into memory" localization string (#1267) 2023-08-28 02:21:41 +02:00
WerWolv
550392c8d6 fix: Texture loading from romfs 2023-08-26 23:43:35 +02:00
WerWolv
32e05cc62f patterns: Updated pattern language 2023-08-26 23:31:25 +02:00
WerWolv
886c52b322 patterns: Updated pattern language 2023-08-26 12:55:09 +02:00
WerWolv
ba66005585 impr: Various code cleanup 2023-08-26 12:54:52 +02:00
Justus Garbe
bfc835fc54 fix: add new capstone options and fixed overextending name array 2023-08-26 12:21:44 +02:00
iTrooz
32d6ac2241 feat: move PerProvider data to new provider when saving memory provider into file provider (#1264) 2023-08-26 01:47:44 +02:00
WerWolv
758cdd91f3 impr: Make sure logs are always output immediately 2023-08-26 01:44:10 +02:00
WerWolv
6e81ce152e impr: Get rid of some manual memory management 2023-08-25 23:54:39 +02:00
WerWolv
e487fd7450 fix: Crash loop when segfault gets triggered 2023-08-25 23:51:51 +02:00
WerWolv
bd75b70d85 impr: More style and comment fixes in crash handler 2023-08-25 23:19:13 +02:00
WerWolv
6ef96c5533 fix: Missing typeinfo include 2023-08-25 23:11:05 +02:00
WerWolv
6fc62bac94 build: Remove unnecessary yara autoconf file configuring 2023-08-25 22:55:09 +02:00
WerWolv
baecf66716 feat: Added .gdbinit script to aid with debugging 2023-08-25 22:55:09 +02:00
WerWolv
7476ae230c fix: Make ImHex exit cleanly when crashing 2023-08-25 22:55:09 +02:00
iTrooz
175e66a60e feat: Do not save memory providers as recent entries (#1259) 2023-08-25 15:35:15 +02:00
Nik
a1dc979217 build: Fixed plugins not having their C++ version set correctly 2023-08-22 19:29:03 +02:00
iTrooz
fbdcd22117 git: Make CI faster (#1257) 2023-08-21 16:20:36 +02:00
WerWolv
d50fb8d17b fix: Crash when deleting items from file combiner in some cases 2023-08-19 19:18:57 +02:00
WerWolv
83e42ddfd9 fix: Don't show accept pattern popup if no patterns are available 2023-08-19 19:12:48 +02:00
WerWolv
6c8a90720f feat: Added window actions popup when clicking on icon 2023-08-19 19:12:15 +02:00
WerWolv
e70ec10b0e impr: Allow the file combiner tool to select multiple files at once 2023-08-19 19:11:38 +02:00
WerWolv
b4401b7df1 fix: Rest in peace, Anonfiles 2023-08-17 09:27:14 +02:00
WerWolv
f598421705 patterns: Updated pattern language 2023-08-17 08:24:38 +02:00
lorsanta
84ceb45129 impr: Update timestamp when saving a file in windows (#1248)
### Problem description
Ref #1210 

### Implementation description
Call
[`SetFileTime()`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfiletime)
everytime `FileProvider::save()` is called.

### Additional things
I moved the call to `File::close()` from `FileProvider::open()` to
`FileProvider::close()` because `SetFileTime()` requires a file handler
as input, so I need `File::m_file` to be valid.
2023-08-16 23:18:16 +02:00
WerWolv
fc93f8bd66 fix: CI being broken on Arch Linux 2023-08-16 23:07:16 +02:00
WerWolv
8a2afd1c05 fix: Crashes when having pattern auto evaluation enabled 2023-08-16 22:26:05 +02:00
Justus Garbe
33e9ad7775 fix: Draw title bar correctly when no title bar buttons exist 2023-08-13 23:54:22 +02:00
Justus Garbe
2059ad82c3 fix: Update title on project save 2023-08-13 23:36:50 +02:00
Lennard Fonteijn
c25aad552d feat: Selectable demangler (#1250)
Supersedes #1240 - depends on #1249 and
https://github.com/WerWolv/libwolv/pull/8 to work.
2023-08-13 21:51:05 +02:00
Lennard Fonteijn
896091b124 feat: Added toggle for human-readable units in hex editor footer (#1251)
Finalization of #1245 by adding a toggle to the hex editor itself, issue
can be closed afterwards.
2023-08-13 19:08:09 +02:00
Lennard Fonteijn
d2e6d8e4d9 Added ImGui extension to create single- and multiline formatted selec… (#1249)
(Partial) implementation of #1245 with additional functionality to
supersede PR #1240.
2023-08-13 17:08:17 +02:00
Justus Garbe
285b79f31e fix: Crypto buffered hexadecimal encoding 2023-08-13 15:27:01 +02:00
Justus Garbe
d468893bb0 build: Updated libwolv 2023-08-13 14:30:52 +02:00
Lennard Fonteijn
df24d1e1e9 fix: Revert the FPS limiter back to the one used in v1.30.1 (#1247)
As requested on Discord, a PR to revert the FPS limiter back to the one
that was used in v1.30.1.

The new FPS limiter seems to be flawed in that it runs at about half the
speed it is supposed to be.

See this illustration:

![FPS](https://github.com/WerWolv/ImHex/assets/869973/8a101b4c-23d8-4806-8d53-3be7aeb84fed)

Left is v1.30.1, right is the new version (without this fix). See how
long it takes to respectively reach 0xE90.

This is not a performance issue, because when you fully unlock the
framerate on the right, it's just as fluent as on the left.
2023-08-11 22:03:30 +02:00
WerWolv
65c56a887c feat: Added option to load files into memory 2023-08-09 20:04:12 +02:00
WerWolv
ef556d07ed fix: Init task text being offset on larger screen resolutions 2023-08-09 20:02:38 +02:00
WerWolv
882849e73c fix: Highlighting of found elements not being cleared correctly 2023-08-09 20:01:57 +02:00
WerWolv
49d3fe65a3 fix: Allow converting very long hex strings to bytes 2023-08-09 20:01:29 +02:00
WerWolv
a6aafa8cd6 feat: Allow memory files to be renamed 2023-08-08 19:04:00 +02:00
WerWolv
ba9227c1e0 feat: Properly save memory provider data 2023-08-06 21:48:08 +02:00
Nik
e77f138514 feat: Added Achievements (#1230)
This PR adds Achievements to ImHex that serve as both a guide and a fun
way to learn more about ImHex and reverse engineering
2023-08-06 21:33:15 +02:00
WerWolv
64a0c3f6e2 build: Updated json and miniaudio libraries 2023-08-06 11:10:42 +02:00
WerWolv
fae8f0a8d5 build: Fixed cmake not using default settings on Windows 2023-08-06 01:52:23 +02:00
WerWolv
f2cfc70eca fix: Highest / Lowest entropy block address being wrong 2023-08-06 01:51:01 +02:00
iTrooz
55e6761bf1 build: Fix LTO not being enabled correctly (#1217)
Currently, LTO isn't enabled (at least on Linux ?), because LTO doesn't
recognize any language as being enabled.

I fixed that by explicitly enabling C and CXX languages before enabling
LTO
2023-08-05 20:39:20 +02:00
WerWolv
1a765ee5ab build: Updated libromfs 2023-08-05 10:26:27 +02:00
WerWolv
e1ca84d89c patterns: Updated pattern language
Fixes #1228
2023-08-05 09:59:53 +02:00
WerWolv
2082781cf5 fix: Correct endianess of CRC hashes
Fixes #1225
2023-08-04 16:05:21 +02:00
WerWolv
d28d6d1a1b patterns: Updated pattern language
Fixes #958
2023-08-03 23:43:40 +02:00
WerWolv
a61c93e99c impr: Better tooltip for update all button in content store
#1222
2023-08-03 21:50:28 +02:00
WerWolv
e65497ec3b fix: /imhex being appended to Application Support folder paths on macOS
Fixes #1221
2023-08-03 21:49:41 +02:00
WerWolv
50dd6405e9 patterns: Updated pattern language 2023-08-02 20:41:56 +02:00
WerWolv
79eb53eb0d fix: --pl command line interface not working correctly 2023-08-02 20:30:13 +02:00
WerWolv
05ca498343 feat: Added Fill option to hex editor 2023-08-02 13:09:21 +02:00
WerWolv
fbd4bc337b fix: Crash when trying to format invalid timestamps 2023-08-02 12:52:10 +02:00
WerWolv
89115bcdde impr: Added better data processor workspace close button 2023-08-02 12:51:58 +02:00
WerWolv
954c0d5bda fix: Writing to hex cells in big endian mode writing the value as little endian
Fixes #1219
2023-08-02 12:51:33 +02:00
WerWolv
bf8924ae0c feat: Added support for string in/out variables 2023-08-02 12:51:02 +02:00
WerWolv
30b202cf0c patterns: Updated pattern language 2023-08-01 00:00:45 +02:00
WerWolv
84766d5f6e patterns: Updated pattern language 2023-07-31 23:19:23 +02:00
WerWolv
106e669512 feat: Added setting to remember and restore window position and size
Closes #1215
#944
2023-07-31 11:17:37 +02:00
iTrooz
4d6e6cf75a fix: Magic compile dumping files into cwd (#1212)
This PR fix libmagic dumping files in the imhex cwd when compiling them

This code was actually written by you (notice the source branch), this
PR is just a reminder that the fix works and you can merge it ^^

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-07-30 21:36:48 +02:00
iTrooz
26e7e12f09 git: Update custom macOS GLFW build settings (#1214)
<!--
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 -->

There are unused ImHex-specific flags in the custom GLFW build on MacOS.
Also, it isn't built in release mode
2023-07-30 21:36:27 +02:00
WerWolv
b469e68ddb fix: Pattern console not updating correctly 2023-07-30 21:35:31 +02:00
WerWolv
2e5a51bb05 patterns: Updated pattern language 2023-07-30 00:44:09 +02:00
WerWolv
4ae55f69e1 build: Updated libwolv 2023-07-29 11:26:18 +02:00
WerWolv
d079b8c3bb impr: Hide column headers when hiding ASCII or custom encoding column 2023-07-28 10:31:44 +02:00
WerWolv
33f0d59545 fix: Bad formatting of project open error popup 2023-07-28 00:01:49 +02:00
Nik
42c36279d1 build: Properly bundle libcurl into AppImage 2023-07-27 23:36:50 +02:00
WerWolv
b55c6fa3e1 git: Remove updating of the plugin templates from release CI 2023-07-27 11:09:20 +02:00
WerWolv
3a39d3c532 git: Updated plugins list 2023-07-27 11:08:55 +02:00
WerWolv
f67e808d0b build: Add plugins to main dependency 2023-07-27 10:45:11 +02:00
WerWolv
e1d0a057ff build: Set plugin output directory correctly 2023-07-27 02:07:36 +02:00
WerWolv
e829c407e3 fix: Writing behaving weirdly when using a custom base address 2023-07-27 02:05:35 +02:00
WerWolv
94a02c4b6d build: Streamlined plugin creation process 2023-07-27 00:53:04 +02:00
WerWolv
4792a29fac fix: Crash when passing invalid parameters to sound visualizer
Fixes #1208
2023-07-26 22:13:39 +02:00
WerWolv
27c8e19c14 build: Remove all static variables from headers to hopefully fix plugins 2023-07-26 13:50:51 +02:00
WerWolv
866c87b2bf patterns: Updated pattern language 2023-07-26 13:05:47 +02:00
WerWolv
aa4ce01c73 build: Forcefully disable LTO for libimhex 2023-07-26 12:57:38 +02:00
WerWolv
d0a5c144e6 patterns: Updated pattern language 2023-07-26 00:23:09 +02:00
WerWolv
5feb4dce51 build: Try and make libimhex export all symbols 2023-07-25 11:25:59 +02:00
WerWolv
4d4f223357 impr: Improve frame rate when lots of bytes are highlighted 2023-07-24 23:24:31 +02:00
WerWolv
440e2d91fc impr: Better logging during font loading 2023-07-24 23:24:11 +02:00
WerWolv
bca73ef01e fix: Loading of custom fonts not working anymore 2023-07-24 17:25:36 +02:00
WerWolv
a032bfa0f5 feat: Added support for hashing arbitrary strings using the string view 2023-07-24 16:58:52 +02:00
WerWolv
ff8946b851 fix: Pattern array chunks being rendered wrongly 2023-07-24 16:55:35 +02:00
WerWolv
599b43db22 impr: Initialize script loaders during splash screen again 2023-07-24 15:36:57 +02:00
WerWolv
a4e4e01d2d fix: Crash when cleaning log files that are open in another program 2023-07-24 15:36:29 +02:00
WerWolv
8b3cd2d76d impr: Properly print asserts 2023-07-23 23:39:00 +02:00
WerWolv
ffdaf0d16e impr: Use better splash screen selection color generator 2023-07-23 23:38:13 +02:00
WerWolv
b8d5e1e9c5 feat: Added built-in logging console 2023-07-23 23:37:47 +02:00
WerWolv
aa66d4b9e7 impr: Insert short delay before opening popups so the animation finishes 2023-07-23 18:22:53 +02:00
WerWolv
fdd2e1fcde patterns: Added [[hex::spec_name]] 2023-07-23 09:14:00 +02:00
WerWolv
591435761b impr: Added "Close ImHex" button to all plugin-related fatal popups 2023-07-22 22:59:05 +02:00
WerWolv
4979c65566 fix: Missing <array> include in stacktrace helper 2023-07-22 22:47:35 +02:00
WerWolv
f5fda76414 impr: Cleanup main 2023-07-22 21:30:22 +02:00
WerWolv
4b0d980d54 impr: Don't use fmt::println if it's not supported 2023-07-22 20:22:25 +02:00
WerWolv
46ee3f0faa impr: Improve uncaught exception error handling to provide actual stack trace 2023-07-22 20:16:36 +02:00
WerWolv
564ae6dd8c fix: Crash when loading bad font 2023-07-22 19:35:58 +02:00
WerWolv
8aec382440 fix: Loading of plugins and localizations after restart 2023-07-22 18:38:14 +02:00
WerWolv
a99f8f78d0 fix: Crash when trying to paste invalid data 2023-07-22 18:21:58 +02:00
WerWolv
0faea9d7c7 impr: Make splash screen look much nicer 2023-07-22 18:21:47 +02:00
WerWolv
c294619102 impr: Make script loaders be initialized synchronously 2023-07-21 20:25:56 +02:00
WerWolv
f6bbfd7283 impr: Properly print new line characters in cli 2023-07-21 15:17:21 +02:00
WerWolvTranslationBot
d3f493b6c2 lang: Translations update from Weblate (#1200)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

Co-authored-by: Justus Garbe <gihihoh@gmail.com>
2023-07-21 14:30:27 +02:00
WerWolv
bd8868d2c8 impr: Added better help output for cli 2023-07-21 14:28:15 +02:00
WerWolv
ee41a5a046 fix: Selection changes not being handled correctly 2023-07-21 14:22:53 +02:00
WerWolv
0033d9f4eb patterns: Updated pattern language 2023-07-21 14:20:57 +02:00
WerWolv
e5a793e8de fix: Subcommands not working at all on Linux 2023-07-21 14:12:08 +02:00
WerWolv
3149183450 patterns: Updated pattern language 2023-07-21 11:53:37 +02:00
WerWolv
7c321a79c3 impr: Print message if no stacktrace can be collected 2023-07-20 21:41:22 +02:00
WerWolv
7c203e0635 build: Updated libwolv
Fixes #1201
2023-07-20 21:38:37 +02:00
WerWolv
ffd3efe5fa git: Disable .NET scripts in AppImage since it hangs on startup 2023-07-20 20:59:06 +02:00
WerWolv
18dd754b31 impr: Better handling of hex editor selections 2023-07-20 20:58:28 +02:00
WerWolv
3c97759aa7 fix: Crash when trying to load files with invalid paths 2023-07-19 22:35:55 +02:00
WerWolv
f930b6e17d fix: Various .NET and plugin loading fixes 2023-07-19 21:40:24 +02:00
WerWolv
2d4f971d10 impr: Disable endianess switch in hex editor when visualizer only uses one byte 2023-07-18 14:23:02 +02:00
WerWolv
90267ec356 impr: Allow hex editor view to be scrolled slightly past the end 2023-07-18 14:22:39 +02:00
WerWolvTranslationBot
7fc53bf861 lang: Translations update from Weblate (#1199)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Built-in
Plugin](https://weblate.werwolv.net/projects/imhex/built-in-plugin/).


It also includes following components:

* [ImHex/Windows
Plugin](https://weblate.werwolv.net/projects/imhex/windows-plugin/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/built-in-plugin/horizontal-auto.svg)

---------

Co-authored-by: Justus Garbe <gihihoh@gmail.com>
Co-authored-by: xtex <xtexchooser@duck.com>
2023-07-17 16:40:40 +02:00
WerWolv
b9c2955b88 fix: Use ANSI escape codes for --plugins 2023-07-17 11:59:21 +02:00
WerWolv
ed33dd0bb0 git: Make rpm builds a bit less verbose 2023-07-17 11:50:22 +02:00
WerWolv
6d7f217e2a patterns: Updated pattern language 2023-07-17 11:20:17 +02:00
WerWolv
a83ca3c228 feat: Added --pl and --magic command 2023-07-17 10:43:29 +02:00
WerWolv
b9ec1a150d fix: Wrong libfmt header being included 2023-07-17 09:12:22 +02:00
classabbyamp
d9a4906b3c impr: Clarify portal error message (#1197)
<!--
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 #723


### Implementation description
<!-- Explain what you did to correct the problem -->

`xdg-desktop-portal-wlr` is not relevant because it does not provide the
FileChooser interface.

`xdg-desktop-portal` needs the `WAYLAND_DISPLAY` env var on wayland and
the `DISPLAY` and `XAUTHORITY` env vars on xorg. If the dbus user
session bus is not run in a way that it already gets those variables,
they must be given via `dbus-update-activation-environment(1)`.

### 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 -->

fixes #723
2023-07-17 09:11:40 +02:00
WerWolv
a83f87fbfa build: Updated nativefiledialogs-extended to latest version 2023-07-17 08:08:29 +02:00
WerWolv
e9450b490f feat: Added --plugin, --calc, --hash, --encode and --decode subcommands 2023-07-16 23:46:41 +02:00
WerWolv
1588365d4a build: Use the libcurl WinSSL version on Windows to make SSL work again 2023-07-16 21:38:54 +02:00
WerWolv
76e932ecc0 build: Switch to using the system capstone version on Windows 2023-07-16 21:38:29 +02:00
WerWolv
52c517d38d fix: Potential crash when loading incorrect data processor node files 2023-07-16 20:41:06 +02:00
WerWolv
aac9bf3896 fix: Crash when using "Open in new View" button in bookmarks 2023-07-16 20:35:10 +02:00
WerWolv
54891c6d8f impr: Added proper localization for new visualizer endianess toggle 2023-07-16 20:25:31 +02:00
WerWolv
d7238a5f80 impr: Move script library to its own library 2023-07-16 20:13:50 +02:00
WerWolv
0a6815da8f fix: Always use default CA Cert 2023-07-16 19:56:07 +02:00
WerWolv
7631778edb feat: Added support for big endian in data visualizers 2023-07-16 19:53:02 +02:00
Justus Garbe
1a3debd6c9 fix: Raw Disk Provider not working correctly on Linux and macOS (#1195)
<!--
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
- Fixed disk provider not working for linux

### Implementation description
- Used ioctl instead of fstat
- Fixed buffer issues

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-07-16 18:18:41 +02:00
WerWolv
893b06c78b feat: Allow hex editor editing mode to be entered when pressing Enter 2023-07-16 18:14:48 +02:00
WerWolv
709f4b7e80 build: Remove dangerous linker options from script loader plugin 2023-07-15 23:20:38 +02:00
WerWolv
54fba5bf8b build: Always bundle CA Cert on Windows 2023-07-15 23:20:09 +02:00
WerWolv
d977f1f988 impr: Move all .NET scripts to their own subfolder 2023-07-15 14:50:39 +02:00
WerWolv
2fea1975c2 build: Don't set recommended properties if they were already set 2023-07-15 14:29:54 +02:00
Nik
5171bea0bf feat: Added cross-platform .NET scripts support (#1185)
This PR intends to add support for .NET scripts that can extend ImHex's
functionality in a portable and cross-platform way.

---------

Co-authored-by: Justus Garbe <55301990+Nowilltolife@users.noreply.github.com>
2023-07-15 14:29:14 +02:00
WerWolv
4e3b8111fd build: Make sure the arch linux package bundles the correct libraries 2023-07-15 10:33:58 +02:00
WerWolv
afcc01c3dc build: Set default settings only if they haven't been set already 2023-07-15 10:33:42 +02:00
WerWolv
3a775e982f build: Removed outdated and dangerous linker flags in plugins 2023-07-15 10:02:34 +02:00
WerWolv
0f54a3a1f3 build: Added option to disable strict warnings 2023-07-15 10:02:19 +02:00
WerWolv
8500e4cba2 build: Switch to GTK file picker on non-sandboxed Linux builds 2023-07-15 10:01:50 +02:00
WerWolv
c1cdab72ef fix: Weird behaviour when trying to open a non-existing file through the command line 2023-07-15 00:12:09 +02:00
WerWolv
f4ae1fda6d impr: Print welcome message as fast as possible 2023-07-15 00:11:48 +02:00
Nik
aae3004f1f build: Various build improvements (#1193) 2023-07-15 00:10:01 +02:00
WerWolv
1aed960a38 build: Switch build system to Ninja 2023-07-14 22:03:44 +02:00
WerWolv
6c4fdd146f build: Use llvm-ar and llvm-ranlib on Windows 2023-07-14 21:51:18 +02:00
WerWolv
04b56c3d4d patterns: Updated pattern language 2023-07-14 21:39:49 +02:00
iTrooz
1ed658bcdc feat: Added command line interface support (#1172)
System design has been discussed on discord

Should fix #948

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-07-13 14:08:23 +02:00
WerWolv
8c0395bc7c fix: Prevent wayland from spamming the console with useless errors 2023-07-12 14:33:09 +02:00
WerWolv
cdc4f2db89 patterns: Updated pattern language 2023-07-11 09:21:13 +02:00
WerWolv
272b4b0cf8 feat: Added "Update All" button to content store 2023-07-11 09:19:52 +02:00
WerWolv
10756c65a6 patterns: Updated pattern language 2023-07-11 00:04:54 +02:00
WerWolv
8524e93445 impr: Display encoding types in header of hex editor
Closes #1186
2023-07-11 00:04:26 +02:00
WerWolv
511ef3ef2b build: Supress warning generated by libraries setting BUILD_SHARED_LIBS 2023-07-09 22:39:27 +02:00
WerWolv
32ade6136b build: Make sure ImHex Patterns repo gets cloned correctly 2023-07-09 22:18:53 +02:00
WerWolv
65d9509c38 build: Add checked option to enable LTO 2023-07-09 20:34:49 +02:00
WerWolv
ce9ce42c1c impr: Only reload localization when necessary 2023-07-09 20:24:56 +02:00
WerWolv
6343cb092b build: Fixed include issues 2023-07-09 12:53:31 +02:00
WerWolv
7cb26b1499 patterns: Updated pattern language 2023-07-09 12:40:51 +02:00
WerWolv
5d047a335d patterns: Updated pattern language 2023-07-09 12:30:48 +02:00
WerWolv
3e797eeea2 fix: Never create an imgui.ini file
#1166
2023-07-07 09:20:33 +02:00
WerWolv
14bb98a519 build: Updated libwolv 2023-07-07 09:02:31 +02:00
WerWolv
a78d3f9977 fix: Framerate limits not working correctly 2023-07-06 21:15:08 +02:00
WerWolv
2449b08f64 fix: Crash when trying to remove chunks larger than the whole file 2023-07-06 21:14:50 +02:00
WerWolv
33d3bea472 fix: Flickering cursor issues 2023-07-06 10:26:12 +02:00
WerWolv
c9c6f3aadb fix: New visualizers behaving weirdly with large font sizes 2023-07-06 10:08:47 +02:00
WerWolv
c9dbcbb3d3 build: Updated dependencies 2023-07-06 08:26:36 +02:00
WerWolv
924c816dbd fix: Chunk size setting in information view being reset the first time 2023-07-06 00:00:56 +02:00
WerWolv
695e11477e feat: Added single stepping feature to pattern debugger 2023-07-05 21:32:11 +02:00
iTrooz
ac2a609d0a impr: Use execvp() instead of system() on Linux (#1170)
This PR it just a hack to fix #1160 , it doesn't solve the underlying
problem.

It fixes the problem because by using execvp() directly, it avoids the
call to `sh` done with `system()`, which has a bug on Ubuntu 22.04 which
makes it i,compatibles with the glibc inside the AppImage.
It doesn't fix the underlying problem because the programs we call
themselves still link to the AppImage's libraries instead of the system
ones.
2023-07-05 20:50:46 +02:00
iTrooz
e3ae169833 impr: Separate the behaviour of being savable and being dumpable for provider (#1183)
### Problem description

Currently, the providers use the method `isSavable()` to determine both
if they can use "Save" or "Save as".
This behaviour is problematic because some providers may need to be
saveable but not saveable as: for example the view provider. The
original provider may not allow to be saved.

### Implementation description
I separate these two behaviour by creating another function:
`isDumpable()`, that return true by default but can be overridden by the
provider to return false, if the provider should not be dumped in any
way.

### Additional things

While I was at it, I also marked "export" operations as needing the
"dumpable" flag. That way, we can't accidentally export the whole
address space of a process as base64.

I also added documentation for these some functions in Provider
2023-07-05 20:49:57 +02:00
WerWolv
25d6380963 build: Upgraded capstone to full V5 release 2023-07-05 20:45:46 +02:00
WerWolv
f00b9f05ac build: Fixed Ubuntu build issues 2023-07-05 20:25:40 +02:00
WerWolv
b6881d2362 feat: Added timestamp visualizer 2023-07-05 19:54:18 +02:00
WerWolv
8e0349e2ac fix: Projects failing to be loaded when another project is being unloaded 2023-07-04 23:30:37 +02:00
WerWolv
86c4c8fa96 feat: Added new pattern inline visualizers 2023-07-04 22:18:06 +02:00
WerWolv
33566137c2 impr: Allow bitmap visualizers to be zoomed 2023-07-04 22:17:51 +02:00
WerWolv
f16bbfb469 feat: Added coordinates visualizer 2023-07-04 09:40:05 +02:00
WerWolv
b265d8e54a build: Restructure romfs assets 2023-07-04 08:42:33 +02:00
WerWolv
6a667d9493 impr: Allow image visualizer image to be scaled 2023-07-03 21:24:36 +02:00
WerWolv
ceed8c7420 pattern: Properly display Start/End/Size column again for zero sized types 2023-07-03 21:24:15 +02:00
WerWolv
d297b2d1cc impr: Hide sections with an empty name 2023-07-03 12:04:20 +02:00
WerWolv
39e74c627e impr: Handle unidentifiable data in the data information view better 2023-07-02 10:27:56 +02:00
WerWolv
28dea8e5bd fix: Menu Bar being scrollable sideways 2023-07-01 22:55:59 +02:00
WerWolv
a0c89858ed patterns: Don't re-evaluate format functions during highlighting 2023-07-01 14:06:15 +02:00
iTrooz
c6c3ca4d26 fix: Reset terminate handler directly when being called + some other crashes to crash handling (#1174)
This PR fixes some things about crash handling:
- when the terminate handler is called, immediately set it back to the
original one, so can't make a recursion if the crash-handling code fails
- Only save projects if the crash occured after Imhex finished startup
- do not update the project location when saving the crash backup file:
this will remove problems when `EventAbnormalTermination` is called
before `crashCallback()`

I also added a bit more documentation
2023-07-01 12:32:28 +02:00
WerWolv
301418c728 fix: Bookmarks not being loaded correctly when multiple providers are in project 2023-07-01 12:27:59 +02:00
Nik
730e67881b build: Added Ubuntu 23.04 builds (#1173) 2023-06-30 23:58:20 +02:00
iTrooz
aec38328d0 impr: Added "Hold SHIFT for more info" text to provider tooltip (#1171)
As discussed on discord
2023-06-30 22:28:37 +02:00
WerWolv
050a71913a impr: Improved construction of language settings dropdown 2023-06-30 14:00:10 +02:00
WerWolv
8cc6994dd0 fix: Properly apply UI scaling on launch 2023-06-30 13:40:39 +02:00
WerWolv
f9909dab98 fix: Properly clear all global registries 2023-06-30 13:40:16 +02:00
WerWolv
bc98556897 impr: Automatically scroll pattern console to the bottom when new lines are added 2023-06-30 00:11:48 +02:00
WerWolv
4f08ba3590 patterns: Fixed race condition when evaluating patterns 2023-06-30 00:11:26 +02:00
WerWolv
78cb0a2592 patterns: Updated pattern language 2023-06-28 18:15:29 +02:00
WerWolv
a5fac85727 fix: Commit hash/branch in statistics being in wrong order 2023-06-27 01:46:11 +02:00
WerWolv
8fdb60758b impr: Load plugins asynchronously to speed up startup times 2023-06-27 00:52:13 +02:00
WerWolv
7510fa091e patterns: Updated pattern language 2023-06-27 00:26:50 +02:00
WerWolv
b87c32a94b build: Fedora fix again 2023-06-26 14:52:00 +02:00
WerWolv
b13494a192 build: Try fixing Fedora build 2023-06-26 14:37:35 +02:00
WerWolv
d527675bda build: Make sure changing commit hash doesn't trigger a full rebuild
Closes #1137
2023-06-26 14:01:45 +02:00
WerWolv
15cd2b693c fix: Crash when using paste without a valid selection 2023-06-26 11:14:10 +02:00
WerWolv
cda883bb0f fix: Page count displaying wrongly in empty files 2023-06-26 11:13:12 +02:00
WerWolv
e03c91b888 impr: Better UI for all data information diagrams 2023-06-26 10:51:37 +02:00
WerWolv
9282f1fe75 fix: Multiwindow support not being disabled by default on Linux 2023-06-26 09:02:23 +02:00
WerWolv
af147b4f54 fix: Titlebar button localization keys still being inside the windows plugin 2023-06-26 08:54:30 +02:00
WerWolv
13b4201446 build: Clean up build logs 2023-06-26 08:45:33 +02:00
WerWolv
83bcbfebdd patterns: Updated pattern language 2023-06-25 12:45:34 +02:00
WerWolv
1a31b4aaff patterns: Updated pattern language 2023-06-25 00:29:21 +02:00
WerWolv
c280b16787 fix: Make disassembler view not clear selection when typing in region 2023-06-24 20:53:36 +02:00
WerWolv
cc55ca3117 build: Bumped version to 1.30.1 2023-06-24 16:40:57 +02:00
WerWolv
a449478e39 patterns: Make updating favorites and pattern tooltips not lag out ImHex 2023-06-24 16:40:34 +02:00
WerWolv
c1babc2a55 fix: Prevent data inspector table from being scrollable 2023-06-24 15:39:19 +02:00
WerWolv
b644020e0f impr: Allow Accept Pattern popup to be closed with Escape 2023-06-24 15:32:05 +02:00
WerWolv
07ffd21c5a fix: Entropy and byte type graph sometimes stopping in the middle 2023-06-24 15:20:26 +02:00
WerWolv
ddc0457d9a fix: Unifont not being loaded correctly in some cases
Fixes #1155
2023-06-24 14:55:10 +02:00
WerWolv
13599908f8 build: Bumped version to 1.30.0 2023-06-24 12:07:39 +02:00
WerWolv
af951e3526 fix: Entropy and byte type diagram address and display being wrong 2023-06-24 11:53:21 +02:00
WerWolv
568e8d8d42 build: Don't generated PDBs in Debug mode 2023-06-24 11:52:37 +02:00
WerWolv
ade05f8e12 impr: Only load a limited subset of unicode characters by default 2023-06-24 10:58:42 +02:00
WerWolv
cabe9cf995 build: Fixed PDB generation again 2023-06-24 01:48:13 +02:00
WerWolv
1e9cc97263 feat: Added scope selector dropdown to pattern debugger 2023-06-24 00:49:43 +02:00
WerWolv
35d2fda0a4 build: More pdb gen fixes 2023-06-23 23:20:56 +02:00
WerWolv
2c6f1503ef build: Corrected pdb generation and install issues 2023-06-23 23:00:06 +02:00
WerWolv
dd72c0cc46 patterns: Updated pattern language 2023-06-23 21:39:46 +02:00
WerWolv
a7ecefb5a0 fix: Don't load constants files that start with a _ 2023-06-23 21:39:39 +02:00
WerWolv
1b028dfc0a fix: Crash on exit 2023-06-23 21:39:22 +02:00
WerWolv
c787532ed9 build: Fixed pdb creation removing bundled debug info 2023-06-23 21:39:13 +02:00
WerWolv
b019283a2f impr: Force disable unicode support when the NoGPU version is used 2023-06-22 17:56:09 +02:00
WerWolv
ae06954771 fix: Stack trace printing on Windows not working right 2023-06-22 15:15:06 +02:00
WerWolv
cb3b71e2f3 fix: Typo in content registry comment 2023-06-21 23:59:40 +02:00
WerWolv
d65e669bbb impr: Make loading of large table files significantly faster 2023-06-21 23:58:21 +02:00
WerWolv
e1b0c1c268 build: Fixed commit hash define being set incorrectly 2023-06-21 23:09:22 +02:00
iTrooz
b7d8e46288 feat: Display detailed error message when loading of project fails (#1135)
In order to do this I add to make some other additions :
- Add a warning popup (TODO, maybe add some icons to differentiate
error/warning popups in a future PR ?)
- create showError() and showWarning() functions, as helpers to show a
message both to the logs and as a popup
2023-06-21 20:07:36 +02:00
WerWolv
3fe6cd057b impr: Upper case pattern data export options 2023-06-21 17:49:03 +02:00
WerWolv
da11c47693 impr: Better sorting of hex cell visualizers 2023-06-21 17:48:51 +02:00
WerWolv
98395afe9d patterns: Updated pattern language 2023-06-21 13:55:40 +02:00
WerWolv
9cd19063da fix: Occasional crashes when evaluating patterns 2023-06-21 10:30:00 +02:00
WerWolv
6435d8d955 feat: Name runner threads for tasks 2023-06-21 09:29:57 +02:00
WerWolv
0da87cdb68 patterns: Updated pattern language 2023-06-21 09:29:40 +02:00
WerWolv
eed785d73f impr: Better layout for statistics value in statistics popup 2023-06-21 00:33:06 +02:00
shenleban tongying
b223d9b0ff fix: Wrong drawing logic for custom encoding characters (#1150)
fix https://github.com/WerWolv/ImHex/issues/1146
related
3a840c4ced
2023-06-21 00:30:26 +02:00
WerWolv
c8150f3261 impr: Make statistics format not suck a whole lot 2023-06-21 00:21:16 +02:00
WerWolv
6d1f639bc6 impr: Added GPU vendor and portable version flag to statistics 2023-06-20 20:37:17 +02:00
Nik
f703b15165 feat: Added statistics and crash log uploading (#1149)
Co-authored-by: Justus Garbe <gihihoh@gmail.com>
2023-06-20 11:55:56 +02:00
WerWolv
54061c56bf fix: Logging race conditions 2023-06-18 22:32:55 +02:00
WerWolv
25154dd450 build: Force enable exceptions and rtti 2023-06-18 14:42:48 +02:00
WerWolv
d9af85f458 impr: Split offset column into Start and End column in pattern data view 2023-06-18 12:23:47 +02:00
WerWolv
e09b678426 patterns: Updated pattern language 2023-06-18 10:58:24 +02:00
WerWolv
5f6bc2507c impr: Make ImHex not use lots of CPU when waiting for conditions 2023-06-18 10:18:58 +02:00
WerWolv
03f377bf40 fix: Don't try to initialize plugins that failed to load 2023-06-18 10:18:41 +02:00
WerWolv
c2e023f567 fix: Pattern editor console scrolling back to the top constantly 2023-06-16 22:17:01 +02:00
WerWolv
90a576c3c7 fix: Highlighting and updating of the new console not working well 2023-06-14 10:35:23 +02:00
WerWolv
0e5371b298 fix: Properly handle multithreading for new pattern console 2023-06-14 06:57:43 +02:00
WerWolv
fdb1cace2d fix: Properly print fatal error messages when ImHex crashes 2023-06-13 23:31:49 +02:00
KOLANICH
330c8399ce build: Only enable GCC-exclusive warnings on GCC (#1091)
Move all the flags added into an if block, since the flags are for
GCC/Clang and are not suitable for Visual Studio.
2023-06-13 23:01:26 +02:00
WerWolv
dd832bfa7e ui: Make pattern editor console use another text editor 2023-06-13 22:58:57 +02:00
WerWolv
5c31b5cf0d patterns: Updated pattern language 2023-06-13 13:50:01 +02:00
WerWolv
3b514003f8 fix: Pattern editor drag bar not always getting dragged correctly 2023-06-12 08:55:30 +02:00
WerWolv
7de367a944 impr: Properly allow multi-threaded logging without messing up output 2023-06-12 08:24:36 +02:00
WerWolv
ef1d831158 impr: Better UI/UX of the new debugger 2023-06-11 22:00:49 +02:00
WerWolv
54c6c9360a fix: Reverted back reordering of crash callback call 2023-06-11 21:55:48 +02:00
WerWolv
da137b3e3b feat: Allow pattern editor console to be resized 2023-06-11 21:41:24 +02:00
WerWolv
03673b5846 feat: Added basic Pattern Language debugger 2023-06-11 21:41:11 +02:00
WerWolv
9a9b211ebb fix: Crash backups not getting saved when when an exception is thrown 2023-06-11 17:27:09 +02:00
iTrooz
f2509cda1d git: Added pull request template and renamed contributing guide (#1133) 2023-06-11 13:10:30 +02:00
iTrooz
cac9a69ea2 fix: Use Mode::Create instead of Mode::Write when creating crash file (#1134) 2023-06-11 13:10:04 +02:00
WerWolv
f0be585fd8 patterns: Updated pattern language 2023-06-11 12:14:24 +02:00
WerWolv
34732a1ee7 fix: Corrected some memory leaks 2023-06-11 10:47:17 +02:00
WerWolv
ee57c449e7 fix: Crash when clearing old logs on exit 2023-06-11 09:45:06 +02:00
KOLANICH
e8ca139246 fix: Remove unused member variable in HexEditor class (#1129)
Fixes `error: private field 'm_grayZeroHighlighter' is not used
[-Werror,-Wunused-private-field]`
2023-06-11 00:49:34 +02:00
WerWolv
ef9cb31204 patterns: Updated pattern language 2023-06-11 00:08:34 +02:00
WerWolv
cde5940063 fix: Popups sometimes not appearing centered on the main window 2023-06-10 15:15:52 +02:00
WerWolv
e90e414d5a impr: Show infinity icon in pattern editor view when pattern limit is disabled 2023-06-10 15:09:20 +02:00
WerWolv
73d4214fd3 fix: Window title being cleared after ImHex exits 2023-06-10 15:08:56 +02:00
WerWolv
0e8273eaa7 impr: Make sure icons are more centered 2023-06-09 00:30:12 +02:00
WerWolv
a485a0bc3a fix: Crash when loading files in some cases 2023-06-08 17:02:28 +02:00
WerWolv
903d1fb555 impr: Analyze file content of newly loaded files only when they are selected 2023-06-08 17:02:16 +02:00
WerWolv
6e3204b443 patterns: Updated pattern language 2023-06-08 12:16:48 +02:00
WerWolv
9baca91b16 impr: Better unthrown exception error handling 2023-06-08 12:16:37 +02:00
WerWolv
81971eaf4a patterns: Updated pattern language 2023-06-08 09:58:26 +02:00
WerWolv
46270ab213 patterns: Updated pattern language 2023-06-08 09:09:37 +02:00
WerWolv
57bf878312 patterns: Updated pattern language 2023-06-07 23:46:18 +02:00
WerWolv
110c3ac310 patterns: Updated pattern language 2023-06-07 11:08:17 +02:00
WerWolv
99831a66a7 feat: Added file handlers for .hexlyt and .hexproj files 2023-06-06 21:35:13 +02:00
WerWolv
456895a6a6 fix: Various pattern drawer issues 2023-06-06 11:29:58 +02:00
WerWolv
1e2cf87532 fix: Properly clear pattern editor when all providers are closed 2023-06-06 10:36:02 +02:00
WerWolv
48022bc295 fix: Bad formatting of array chunks in pattern data view 2023-06-06 10:06:54 +02:00
Sergei Rebrov
b4ac46f719 impr: Set currently selected address in selection popup (#1125)
Set the Begin field to the current selected address
2023-06-06 08:22:10 +02:00
WerWolv
44bbbb03af fix: Various pattern visualizer issues
Closes #1119
2023-06-06 08:20:58 +02:00
WerWolv
a125408410 patterns: Updated pattern language 2023-06-05 17:09:31 +02:00
WerWolv
b8457439a4 fix: Crash when loading custom encodings 2023-06-05 16:56:50 +02:00
WerWolv
c690f7627f fix: Bad sentence wrapping in advanced provider information popup 2023-06-05 15:36:47 +02:00
WerWolv
849e4ea370 feat: Make paths in about page clickable 2023-06-05 13:50:55 +02:00
WerWolv
9712329924 feat: Added pattern export option to pattern data view 2023-06-05 11:57:26 +02:00
WerWolv
59aa52e744 patterns: Allow console log to be printed immediately and from format functions 2023-06-05 09:45:25 +02:00
WerWolv
60a95eddd7 fix: Crash due to uninitialized data visualizer in hex editor 2023-06-05 09:45:03 +02:00
WerWolv
7c23b215ba impr: Allow detached tools to always be rendered 2023-06-05 09:08:41 +02:00
WerWolv
ae48ae659b impr: Move various settings from settings window to hex editor and pattern data view 2023-06-05 09:07:58 +02:00
WerWolv
e78c21cbfb impr: Use better icons for favorites and filter text boxes 2023-06-04 22:52:36 +02:00
WerWolv
cc55e5ec74 fix: Added missing pattern data favorites lang entry 2023-06-04 18:41:58 +02:00
WerWolv
1134697b90 fix: Pattern filter RValue parsing 2023-06-04 18:35:44 +02:00
WerWolv
e518b8360c feat: Allow patterns to be marked as favorite 2023-06-04 18:30:47 +02:00
WerWolv
244e34ab84 feat: Added pattern data filter field 2023-06-04 16:13:46 +02:00
WerWolv
100b9e3bca fix: Cursor icons on Windows not working correctly after imgui update 2023-06-04 12:12:15 +02:00
WerWolv
07aabe8efa impr: Improved types used in provider functions 2023-06-04 10:42:11 +02:00
iTrooz
25476d4e1e build: Update ImGui and its dependencies (#1122)
This PR updates imgui and its dependencies from the last time, ~1 year
ago
(deabacbd50)

Commits will be refactored before merging

Things you might ask :
- why did you remove `ImGui_ImplGlfw_SetBorderlessWindowMode()` ?
-> Where is it used ? The only usage of it I see is commented
(cb9a3b1f55/lib/external/imgui/source/imgui_impl_glfw.cpp (L757))
- why did you remove the implot anti aliasing flag ?
-> They.. seem to have removed it altogether ?
https://github.com/epezent/implot/issues/479
2023-06-04 00:09:45 +02:00
WerWolv
de76c37ffb fix: Multiple file provider resize issues 2023-06-03 23:57:41 +02:00
WerWolv
6d19b33e32 fix: Don't require providers to be writable to save a project 2023-06-03 23:18:43 +02:00
WerWolv
1dff81f7cd fix: Crash when deleting overlays 2023-06-03 22:50:37 +02:00
WerWolv
aca949175d impr: Disable advanced provider information popup if there are none 2023-06-03 15:57:47 +02:00
WerWolv
d2e455c4cb fix: Intel hex provider not displaying data correctly 2023-06-03 15:53:55 +02:00
WerWolv
09dda0bc5e feat: Added provider information to advanced provider tab tooltip 2023-06-02 14:44:19 +02:00
WerWolv
d10f033439 fix: Key presses not always unlocking frame rate correctly 2023-06-02 14:43:45 +02:00
WerWolv
62ecfb0e0e fix: Make sure crash backup doesn't end up in recents list 2023-06-02 11:03:44 +02:00
WerWolv
504c022f01 patterns: Added hex_viewer visualizer 2023-06-02 10:47:23 +02:00
iTrooz
117832e007 impr: Handle crashes that may happen before the main loop (#1115)
Draft because I absolutely do not trust myself writing good code at 2AM.
I will review it tomorrow
2023-06-01 18:35:41 +02:00
WerWolv
9dafdeb70a patterns: Updated pattern language 2023-05-29 10:52:39 +02:00
WerWolv
5e0ca4ac50 patterns: Properly display exported variables 2023-05-28 15:44:01 +02:00
WerWolv
8d8a5a70f3 fix: Find view replace and hex editor paste logic being wrong 2023-05-28 14:30:33 +02:00
WerWolv
c8c3f5e753 feat: Added primitive replace feature to find view 2023-05-28 11:50:10 +02:00
iTrooz
ea756e620e fix: Explicitely convert std::fs::path to std::string (#1116)
This should fix the current crash when opening a project on Windows
2023-05-28 11:36:08 +02:00
iTrooz
e599d31625 fix: Properly Check if crash.json has valid json, remove it otherwise (#1117) 2023-05-28 11:35:51 +02:00
iTrooz
0ba011dbe1 feat: Add a native error message when glfw window creation fails (#1104)
Draft because I want to test it again tomorrow with all OSes, first

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-27 17:45:41 +02:00
iTrooz
e578127f67 feat: Save opened projects as recent entries (#1105)
This PR does two things :
- save opened projects as recent entries
- refactor stuff about recent entries in a separate file. The reason is
that I felt like welcome_screen.cpp was really big ( 685 lines before
this, 500 now). What do you think ?

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-27 16:59:30 +02:00
WerWolv
acfd89aee0 patterns: Updated pattern language 2023-05-27 14:43:53 +02:00
paxcut
950760691c fix: 3D Visualizer calculating normals incorrectly (#1108) 2023-05-26 09:01:16 +02:00
WerWolv
ba33629e80 patterns: Updated pattern language 2023-05-25 12:03:11 +02:00
iTrooz
d671cde6d2 impr: Ensure program exits when set_terminate() lambda is called (#1101)
Draft for now because I am waiting for feedback from Jay
2023-05-25 09:30:25 +02:00
iTrooz
ee94870e83 fix: Do not loop over 'END' ImHexPath (#1098)
Really small issue, in Help->About->Imhex directories, there would be an
extra entry at the end because you seemed to loop over the
fs::ImHexPath::END entry
2023-05-25 09:27:10 +02:00
iTrooz
d2638c4f27 feat: Display titlebar buttons when not running borderless (#1099)
Tested on Linux (non-borderless) and Windows (borderless)

You may want to also test it just to be sure
2023-05-25 09:26:40 +02:00
iTrooz
7d457998d7 fix: Explicitly convert path to string for crash file (#1102) 2023-05-25 09:25:40 +02:00
iTrooz
79306fa6e1 impr: Show which commit was used to compile ImHex on CLI (#1103) 2023-05-25 09:25:22 +02:00
WerWolv
320973c5ff fix: Crash when sorting Value column 2023-05-24 21:05:14 +02:00
WerWolv
26eac61ddf feat: Allow themes to set the background blur color 2023-05-24 21:05:14 +02:00
WerWolv
cb9a3b1f55 fix: Invalid key code error spam 2023-05-24 21:05:14 +02:00
Nik
5bbf4342ee git: Added plugins list 2023-05-23 15:08:14 +02:00
WerWolv
0e3da22c76 feat: Added support for changing the page size 2023-05-23 11:34:30 +02:00
Jonathan Wright
28778eaf8c build: Remove fedora 36 builds (#1097)
Fedora 36 is EOL.

Build roots for it were taken offline this morning so builds against it
will fail now.
2023-05-22 17:49:49 +02:00
WerWolv
e32fc639c2 fix: Turning off blur again not working 2023-05-22 13:25:11 +02:00
iTrooz
7ce0613977 impr: Added better crash backup and restore mechanism (#1094)
- Add a new file 'crash.json' to store metadata about the crash, like
the log file or project opened
- show the log file of the session that caused the crash to the user
- Correctly restore the project path
2023-05-22 13:24:48 +02:00
iTrooz
91635346be feat: Allow to remove recent providers with right click (#1085)
![image](https://github.com/WerWolv/ImHex/assets/42669835/648d2c8f-6518-4989-bc92-808898cb0f87)
2023-05-22 13:22:18 +02:00
iTrooz
bfe698f883 build: Do not install _schema.json files (#1095) 2023-05-22 13:20:55 +02:00
WerWolv
f81276f7e3 feat: Added support for transparent and blurry window styles 2023-05-22 12:00:35 +02:00
WerWolv
6b28828174 fix: Prevent horizontal scroll on welcome screen 2023-05-22 10:37:30 +02:00
WerWolv
2191eb14ae impr: Cleanup hashes view a bit 2023-05-22 09:58:56 +02:00
WerWolv
e7b51a56a5 feat: Added support for automatically loading patterns using binary pattern magic 2023-05-22 00:01:58 +02:00
WerWolv
df75218ecb fix: Ranges found by find view not being highlighted 2023-05-22 00:00:50 +02:00
WerWolv
f57d4f2f7a impr: Manually sort file chooser popup list 2023-05-21 18:41:43 +02:00
WerWolv
a2333fa22e patterns: Updated pattern language 2023-05-21 18:02:39 +02:00
WerWolv
2179c3c014 fix: View shortcuts acting like global shortcuts 2023-05-21 18:02:29 +02:00
WerWolv
0563a59b1b impr: Reset back all signals when a fatal error occurred 2023-05-21 17:33:33 +02:00
WerWolv
446e0751a6 fix: Force entropy and type distribution graphs to always span the entire plot 2023-05-21 13:46:14 +02:00
iTrooz
5666a5c5fb feat: Added context menu with right-clicking on file provider (#1084)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-21 13:21:53 +02:00
WerWolv
047c39e2c7 build: Checkout repo properly in release CI 2023-05-21 11:12:53 +02:00
WerWolv
dc8245ce4c build: Bumped version to 1.29.0 2023-05-21 10:44:41 +02:00
WerWolv
1b88b3704d feat: Allow layouts to be deleted again 2023-05-21 10:43:35 +02:00
WerWolv
6dbaac4283 impr: Make sure hex editor popups have their input focused 2023-05-21 10:35:14 +02:00
WerWolv
180a27fdc9 fix: Local keybindings not working correctly 2023-05-21 10:28:55 +02:00
WerWolv
c02465b892 fix: Byte type and Entropy graph being shifted 2023-05-21 10:23:33 +02:00
WerWolv
f503a89f98 fix: Typo in IEEE754 tool 2023-05-20 21:49:45 +02:00
WerWolv
f94e5488d4 fix: Mouse cursor not adjusting anymore properly 2023-05-20 21:36:15 +02:00
WerWolv
87621e9337 impr: Disable some Import... options when the provider isn't writable 2023-05-20 21:23:15 +02:00
WerWolv
3219ba68de impr: Better layout of ImHex subtitle on welcome screen 2023-05-20 21:20:32 +02:00
WerWolv
5d608603cb fix: Selection in diff view being retained 2023-05-20 21:13:40 +02:00
WerWolv
7336c8dddc fix: Cursor types on Windows sometimes getting stuck 2023-05-20 21:10:12 +02:00
WerWolv
c91e3875d4 build: Updated libwolv 2023-05-20 19:27:00 +02:00
WerWolv
0181325b64 build: Updated libwolv 2023-05-20 18:10:26 +02:00
WerWolv
11f55a7561 fix: File handles not being closed correctly 2023-05-20 18:07:15 +02:00
WerWolv
9bb3a92e12 build: Updated libwolv 2023-05-20 15:47:21 +02:00
KOLANICH
3e9ba8c636 build: Add EOLs to the end of all "own" CMakeLists.txt files (#1093)
Text editors on Unix-like OSes add them automatically and it is usually
considered to be a good practice.
2023-05-20 13:38:24 +02:00
KOLANICH
4faebf435c impr: Remove an unused std::mutex in TaskManager::runner (#1088) 2023-05-20 13:38:12 +02:00
KOLANICH
749823e044 build: Move -s additional compiler flags into linker flags, and enable it only when gcc/clang are used. (#1087)
Compiler when compiling doesn't use them in those cases and emit a
warning, which is turned into an error by `-Werror`. Unfortunately,
CPack doesn't expose the logic it uses for stripping binaries.
2023-05-20 13:37:57 +02:00
KOLANICH
608c9e2e7a fix: WASM disassembler not being available in Capstone < 5 (#1086)
This fixes build on Debian with Capstone from packages.
2023-05-20 13:37:45 +02:00
WerWolv
96ee544538 build: Updated libwolv 2023-05-20 13:31:41 +02:00
WerWolv
7ea7c531e2 fix: Logs not being written to disk on Windows 2023-05-20 13:10:35 +02:00
WerWolv
969a37877a fix: Crash on exit 2023-05-20 13:10:24 +02:00
WerWolv
3cb8e37182 fix: Broken file open logic
Closes #1090
2023-05-20 11:52:24 +02:00
paxcut
3e4c4430d5 feat: Greatly improved the IEEE754 tool (#1047)
I just realized one feature request existed about this tool and have
added a comment to it referring this pr. Errors and additions are
described in the fork commit already. I'm not sure if I should repeat
them here again. I have tested the changes thoroughly, but it is always
possible some fringe case was not tested and is incorrect. The tests
were done using the many similar online calculators for IEEE 754
floating point formats.
IEEE 745 floating point tool redesign modeled after 'float toy' web app
(http://evanw.github.io/float-toy/)

Streamlined output using colors and compact layout which can be further
simplified.
Chosen display mode (detailed or simplified) is automatically saved and
set on new sessions.
Edit the binary bits, the integer hexadecimal or the floating point
decimal values and the entire app will update with the change.
Supports the main IEEE745 standard formats (half, single and double
precision) together with custom formats of size <= 64 bits.
Each format choice uses and displays the number of significant decimal
digits defined by the mantissa size.
Added labels to identify the location of each bit box inside the binary
representation.
Satisfies round trip / idempotent (reproducing) conversion property
Added theme colors, radio buttons for display mode and a clear button
that resets the tool.
Removed previously and incorrectly added locale translation to various
labels and languages
Attempted to adhere to code style formatting using existing code as
example.
An effort was made to use preferred variable types and functions from
std namespace when appropriate.
Attempted to document code using comments. 

Not implemented / left to complete at an later time

Arbitrary width and precision formats. 
Extended precision formats.
Shortest string property.
hexadecimal floating point display and conversions.
2023-05-19 21:18:38 +02:00
WerWolv
4ad66365d0 fix: Crash when saving patches
Fixes #1077
2023-05-19 20:01:42 +02:00
WerWolv
39276e123e patterns: Allow bitfield values to be edited 2023-05-19 19:56:55 +02:00
WerWolv
0f9434740f fix: Crash when deleting last environment variable in pattern editor 2023-05-19 17:15:37 +02:00
WerWolv
7ed153a47b patterns: Updated pattern language 2023-05-19 16:14:54 +02:00
WerWolv
c9d673ce40 patterns: Updated pattern language 2023-05-19 15:29:18 +02:00
WerWolv
0be610f1cd patterns: Updated pattern language 2023-05-18 23:20:10 +02:00
WerWolv
f75aa1f1b0 git: Fixed color of docs shield 2023-05-18 11:46:51 +02:00
Justus Garbe
5ef58cdf76 feat: Added bit and byte reverse and bit display data processor nodes (#1082)
#1081
2023-05-18 10:25:59 +02:00
WerWolv
511375feb5 patterns: Updated pattern language 2023-05-18 09:51:24 +02:00
WerWolv
8119929ece fix: Don't wait for services on exit 2023-05-16 14:59:14 +02:00
iTrooz
e1620966e5 feat: Keep only 10 latest logs on exit (#1079)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-16 14:45:24 +02:00
WerWolv
a5b0a8614a impr: Automatically re-evaluate pattern when changing provider and code sync is on
Closes #1078
2023-05-16 14:45:04 +02:00
WerWolv
e28f2dfea1 fix: Only 5 patterns per byte being highlighted
Fixes #1076
2023-05-16 14:41:02 +02:00
WerWolv
0dcfeaefb3 fix: Build when git commit hash or branch is not available 2023-05-16 12:02:17 +02:00
WerWolv
3bd4a3ba8b impr: Better JSON error handling in many places 2023-05-16 11:33:00 +02:00
WerWolv
7e9b23de7d impr: Improve network interface error handling 2023-05-16 11:20:46 +02:00
WerWolv
a758676b0d fix: Change network interface port to 31337 2023-05-16 11:01:59 +02:00
WerWolv
636ed0095d feat: Added new imhex/capabilities network interface 2023-05-16 11:01:40 +02:00
WerWolv
14341d611d impr: Handle macOS Open with... correctly 2023-05-15 18:07:49 +02:00
WerWolv
07565eea63 build: Updated libwolv 2023-05-15 18:07:35 +02:00
WerWolv
c006062540 feat: Added basic network interface support 2023-05-15 11:30:24 +02:00
WerWolv
e685d65be8 fix: Scrolling not working correctly on welcome screen
Fixes #1071
2023-05-15 08:33:35 +02:00
WerWolv
ab67e274b2 fix: Hex editor editing value not updating correctly 2023-05-15 08:17:16 +02:00
WerWolv
7656fd7a4e patterns: Updated pattern language 2023-05-15 08:17:02 +02:00
WerWolv
60a2b30e91 fix: Another wrong include on macOS 2023-05-14 22:53:52 +02:00
WerWolv
7ec7e562d1 fix: Wrong editing values in hex editor in some circumstances 2023-05-14 22:52:47 +02:00
WerWolv
c50d52d0a6 fix: Crash when reading from modified bytes 2023-05-14 22:46:19 +02:00
WerWolv
2b765617ce impr: Disallow saving pattern files if they're empty 2023-05-14 22:24:16 +02:00
WerWolv
79cdf51588 fix: Wrong include on macOS 2023-05-14 22:23:05 +02:00
WerWolv
7b048d9b96 fix: Compile on macOS _again_ 2023-05-14 22:03:04 +02:00
WerWolv
d96fc6d41b fix: Compilation on macOS 2023-05-14 21:50:58 +02:00
WerWolv
610f109e2a fix: Crash when too many entries are being logged at once 2023-05-14 21:39:18 +02:00
WerWolv
609afebc55 fix: Updated build script 2023-05-14 20:20:40 +02:00
WerWolv
3bd9ab6349 fix: Hopefully open files now on macOS 2023-05-14 20:20:22 +02:00
WerWolv
5027f36d95 fix: Open with crashing on macOS
#1070
2023-05-14 18:35:35 +02:00
WerWolv
a5498995ff impr: Hopefully allow macOS to open any file type
#1070
2023-05-14 09:58:15 +02:00
WerWolv
f40b5d9811 fix: Search button in numeric find option being active by default 2023-05-13 17:51:16 +02:00
WerWolv
d00fae03a9 fix: Diff table not being cleared when closing providers 2023-05-13 17:50:33 +02:00
WerWolv
3c4e1b2f27 impr: Various cleanup 2023-05-13 17:50:16 +02:00
WerWolv
6e5d6810e7 build: Disable assertions in release builds 2023-05-13 17:49:53 +02:00
WerWolv
4afd5a7905 patterns: Updated pattern language
#1069
2023-05-13 17:21:44 +02:00
WerWolv
6709baa710 patterns: Updated pattern language 2023-05-13 15:43:37 +02:00
WerWolv
aa1bf0b764 impr: Make about page resizable 2023-05-13 12:26:13 +02:00
WerWolv
a7327290ea fix: Only save custom encoding to project file when necessary 2023-05-13 11:17:27 +02:00
WerWolv
857e90a37b fix: ImHex freezing when evaluating patterns 2023-05-13 11:12:38 +02:00
WerWolv
aaeebd3fe9 fix: Various pattern execution race conditions 2023-05-12 15:46:13 +02:00
WerWolv
0a7a190b04 impr: Added tooltips to pattern data view when name or value is too long 2023-05-12 08:49:08 +02:00
WerWolv
21d922113d impr: Make sure to clear selections when all providers are deleted 2023-05-12 08:38:52 +02:00
WerWolv
b0876e1c35 impr: Move some options into a new Extras menu 2023-05-12 08:38:32 +02:00
WerWolv
18bc5de169 fix: Copy-as options not being disabled correctly 2023-05-12 08:38:07 +02:00
WerWolv
0321743f1e fix: Missing save layout localization keys 2023-05-12 08:37:43 +02:00
WerWolv
f2af90fe06 fix: Help hover icon issues 2023-05-11 23:56:51 +02:00
WerWolv
2f511ec4fa impr: Improve frame cap handling 2023-05-11 23:22:06 +02:00
WerWolv
0649e0dcd3 impr: Clean up old layout stuff 2023-05-11 23:21:52 +02:00
WerWolv
0b21e30e44 fix: White border around maximized window on WIndows 2023-05-11 20:49:07 +02:00
WerWolv
ceeaca1a4b feat: Added layout manager to save and restore custom layouts 2023-05-11 18:44:50 +02:00
WerWolv
2da89f4b9b fix: Position of restore layout button being wrong with different scalings 2023-05-11 18:44:33 +02:00
WerWolv
49371398bc fix: Resizing on windows still being janky 2023-05-11 18:43:19 +02:00
iTrooz
2e73d74cea impr: Open .hexproj files as projects when opened though the Open File option (#1061) 2023-05-11 12:38:22 +02:00
WerWolv
688471fd61 build: Updated libfmt to 10.0 2023-05-11 12:06:58 +02:00
WerWolv
ea482ff0f5 fix: Crash when closing providers too quickly 2023-05-11 12:01:06 +02:00
WerWolv
5c9d0e29c2 fix: Left/Right resizing not working correctly on Windows 2023-05-11 12:00:56 +02:00
WerWolv
8f07f0f8ae impr: Better look and feel of the welcome screen close button 2023-05-11 12:00:45 +02:00
WerWolv
4f17a96707 build: Updated libwolv 2023-05-11 10:04:09 +02:00
iTrooz
b0ab8698ec fix: Loading data processor nodes from project thowing errors (#1065)
This will correct the errors `cannot use operator[] with a string
argument with string[..]` when loading a project
2023-05-11 09:57:29 +02:00
WerWolv
ab41899cc2 build: Updated libwolv 2023-05-11 09:54:06 +02:00
WerWolv
50c3cf8272 build: Replace old interval tree in favour of custom libwolv one 2023-05-11 09:27:23 +02:00
WerWolv
1d2b8ac1f3 fix: Closing popups using Esc causing them to re-appear 2023-05-10 22:29:17 +02:00
WerWolv
0b29719fe9 patterns: Updated pattern language 2023-05-10 19:15:01 +02:00
WerWolv
5a6e5d2255 build: Switch to better interval tree implementation 2023-05-07 23:27:43 +02:00
WerWolv
82111617a4 patterns: Updated pattern language 2023-05-06 10:09:33 +02:00
WerWolv
0574387ee1 fix: Properly use absolute paths when compiling magic files 2023-05-06 10:09:23 +02:00
WerWolv
2d1381860d fix: Corrected build issues with GCC 13 2023-05-06 10:07:22 +02:00
classabbyamp
82f5900759 build: Added option to disable update checking (#1036)
This is aimed at use by linux distros, where package updates come from a
central location, and users shouldn't need to worry about updating ImHex
on their own. This disables parts of the ImHex UI that would not be
useful in that case.

Tested and confirmed that this works in both states of the of the
`-DIMHEX_DISABLE_UPDATE_CHECK` switch.
2023-05-05 22:03:45 +02:00
iTrooz
e44eb2aa8e impr: Added more documentation to libimhex (#1052)
This PR adds some documentation. It's actually pretty random, I followed
the function calls I was curious about and commented whenever I wasn't
sure/I thought it needed clarification

You might want to make sure to squash them, because the commits are kind
of a mess, I didn't went through the effort of interactive rebase
2023-05-05 22:02:18 +02:00
iTrooz
34e12e2515 feat: Added a button to restore default layout when there are no views open (#1053)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-05 22:00:17 +02:00
iTrooz
980e4cad06 fix: Handle errors in Tar::readVector() (#1059) 2023-05-05 21:57:37 +02:00
WerWolv
5680b90549 fix: Project files failing to save when no custom encoding is loaded 2023-05-04 23:23:44 +02:00
WerWolv
bec655a8c6 impr: Added event logging in debug mode 2023-05-02 20:35:30 +02:00
WerWolv
0c8b3e31e7 fix: Dangerous function call popup not showing up 2023-05-02 20:34:37 +02:00
WerWolv
a33c7135d1 fix: Crash when closing some popups 2023-05-01 14:15:00 +02:00
iTrooz
13a3942f8f impr: Show an error message when ImHex can't open a file (#1050)
This PR does two correlated things:

- Show a generic error message (Failed to open provider) rather than a
file-specific message (Failed to open file) when a provider fails to
open
- Set the error to something more specific when opening a file fails
2023-04-30 18:37:22 +02:00
WerWolv
1bdc1d7241 build: Added CMakePresets.json file to make configuring/building easier 2023-04-30 11:53:51 +02:00
iTrooz
fe9026b68d build: Update my (iTrooz) email in PKGBUILD (#1049) 2023-04-28 18:01:30 +02:00
XorTroll
b0028b0e51 lang: Added Spanish translations (#1042)
This translates ImHex for the Spanish language

(made a new PR since I got a bit messed up on the other one, this was
faster to fix)
2023-04-21 17:44:36 +02:00
WerWolv
f54617e92f patterns: Updated pattern language 2023-04-21 11:02:12 +02:00
WerWolv
306690762c impr: Drastically improve file read speeds 2023-04-21 10:52:10 +02:00
WerWolv
58a0fe8109 patterns: Updated pattern language 2023-04-20 14:32:45 +02:00
WerWolv
1e39f4354f fix: Provider reader being broken 2023-04-20 13:46:44 +02:00
WerWolv
e1b12546da build: Updated dependencies 2023-04-20 10:48:17 +02:00
WerWolv
1b28bf1474 patterns: Updated pattern language
Fixes #1037
2023-04-20 10:41:27 +02:00
WerWolv
8245f3d4c9 build: Updated libwolv 2023-04-19 21:56:34 +02:00
Nik
5fc8e710a5 git: Added vulnearability report info file 2023-04-18 16:15:48 +02:00
Nik
b8636a8589 git: Added Code of Conduct 2023-04-18 16:11:41 +02:00
WerWolv
bb8b4afb85 patterns: Updated pattern language 2023-04-18 10:32:38 +02:00
WerWolv
d5b1ef7875 patterns: Updated pattern language 2023-04-18 10:17:37 +02:00
WerWolv
6c122e5fbe patterns: Updated to new API 2023-04-18 10:06:47 +02:00
WerWolv
7ae814f7fb fix: Various localization issues 2023-04-17 22:18:50 +02:00
WerWolv
bdc51dd8a5 patterns: Updated pattern language 2023-04-17 17:06:52 +02:00
WerWolv
04a5efc7a3 fix: Crash when evaluating patterns to quickly 2023-04-17 17:02:10 +02:00
WerWolv
99a736df27 impr: Replace horrible pattern extra data class with a more modular system 2023-04-17 16:18:48 +02:00
WerWolv
535aeb5e39 impr: Give access to a console in clion in debug mode 2023-04-17 16:06:06 +02:00
WerWolv
07bef10092 patterns: Updated pattern language 2023-04-17 09:22:21 +02:00
WerWolv
c32515bc44 impr: Clean up some more clang-tidy issues 2023-04-16 22:12:35 +02:00
WerWolv
1690cd2740 fix: Various issues with the new popup system 2023-04-16 21:34:29 +02:00
WerWolv
52925c99e8 impr: Default to monitor synchronized FPS limit 2023-04-13 17:12:40 +02:00
WerWolv
1367e9cebe build: Fixed Objective-C compiler flags 2023-04-13 17:07:34 +02:00
WerWolv
3e87022da1 fix: Provider undo stack not being handled correctly 2023-04-13 16:12:00 +02:00
WerWolv
143fe36d35 build: Fixed various build warnings 2023-04-13 16:11:39 +02:00
WerWolv
18d5fd5d3e fix: Commit link in about page not working correctly 2023-04-13 16:10:55 +02:00
WerWolv
2829bf2640 fix: New lines appearing in pattern editor when switching provider 2023-04-13 15:03:50 +02:00
WerWolv
ffafb05d3d fix: Providers with the same name not being selectable in diff view
Fixes #1034
2023-04-13 15:03:14 +02:00
WerWolv
cf72b5ec5c fix: Some shortcuts triggering twice 2023-04-12 19:50:03 +02:00
WerWolv
803b99f2a9 impr: Immensely improve provider read speeds 2023-04-12 19:21:48 +02:00
WerWolv
86b49f34d9 patterns: Updated pattern language
Fixes #1031
2023-04-12 17:18:46 +02:00
WerWolv
7e144b136b patterns: Updated pattern language
Fixes #1030
2023-04-12 16:03:58 +02:00
WerWolv
aa7c5422c0 fix: Make sure provider data is properly cleared when deleting provider 2023-04-11 15:26:18 +02:00
WerWolv
5512585cc5 fix: Make sure docs question request is always properly formatted 2023-04-10 23:05:44 +02:00
WerWolv
013eaae715 fix: Disable multi window support on Linux by default as it causes issues
Fixes #1026
2023-04-10 22:51:21 +02:00
WerWolv
349b5da810 fix: Prevent constants view from growing past the size of the screen
Fixes #1025
2023-04-10 21:30:27 +02:00
WerWolv
e7494be5e7 fix: Last line of patterns going missing in projects with multiple files
Fixes #1012
2023-04-10 16:50:23 +02:00
WerWolv
320629931c fix: Yet another popup centering issue 2023-04-10 14:10:35 +02:00
WerWolv
87d0aae608 feat: Added selection range radio button to various views
Closes #1024
2023-04-10 14:08:21 +02:00
WerWolv
391c8acfe4 impr: Added path tooltips to accept pattern popup 2023-04-10 01:46:55 +02:00
WerWolv
dc77d81e1b feat: Added documentation helper AI 2023-04-10 01:42:53 +02:00
WerWolv
00c9a92977 fix: Localization being broken in the content store 2023-04-10 01:42:28 +02:00
WerWolv
af4dd9f5b0 fix: Popup positioning being wrong 2023-04-09 23:24:48 +02:00
WerWolv
09f1b56964 fix: Popups not being centered correctly 2023-04-09 15:28:48 +02:00
WerWolv
f9a08f5c11 feat: Allow custom alignment to be used in binary sequence search 2023-04-09 15:28:31 +02:00
WerWolv
e79664256a patterns: Updated pattern language 2023-04-09 12:26:13 +02:00
WerWolv
70f3014390 fix: Some more popup rendering issues 2023-04-08 23:34:46 +02:00
WerWolv
b4d0f984a4 build: Updated libwolv 2023-04-08 21:13:19 +02:00
WerWolv
d4ad457af1 fix: Crash when closing provider that was used in view provider 2023-04-08 21:07:57 +02:00
WerWolv
cb5d197700 impr: Added tooltips to icon buttons in bookmarks view 2023-04-08 21:07:41 +02:00
WerWolv
78e66f8959 feat: Added non-ranged and aligned search to sequence and value finder 2023-04-08 20:59:33 +02:00
WerWolv
f562260e42 fix: Build error again 2023-04-08 12:30:38 +02:00
WerWolv
21f38974a8 impr: Use smart pointers to allocate Views 2023-04-08 12:08:45 +02:00
WerWolv
dfca7e923c feat: Make pins in data processor nodes more visible 2023-04-08 11:58:49 +02:00
WerWolv
6913598de4 fix: Build error 2023-04-08 11:58:12 +02:00
WerWolv
ac858b37ed fix: Main Menu items not being clickable at the outer most pixel
Closes #1020
2023-04-08 11:37:42 +02:00
WerWolv
80edaea392 impr: Update all of ImHex to the new popup system 2023-04-08 00:58:53 +02:00
WerWolv
9c9ac23818 feat: Added a much more flexible popup system 2023-04-07 10:21:27 +02:00
WerWolv
51e615095e fix: Make sure placing a type through the Edit menu re-evaluates the pattern 2023-04-06 23:01:45 +02:00
WerWolv
d92e7d19cc fix: Submenu items ignoring enabled flag 2023-04-06 22:33:02 +02:00
WerWolv
248b93f41a patterns: Updated pattern language 2023-04-06 19:23:16 +02:00
WerWolv
c73f33aac2 impr: Added various new events 2023-04-06 17:36:28 +02:00
WerWolv
7c18ad49ae impr: Allow windows that overlap the main window title bar to be movable 2023-04-06 14:58:05 +02:00
WerWolv
5f713882d4 fix: Occasional crash when loading project files 2023-04-06 12:44:25 +02:00
WerWolv
1698f1599b impr: Allow file chooser to open files using double click 2023-04-05 18:33:05 +02:00
WerWolv
24e584c77b fix: Crash when trying to place pattern language variable through the Edit menu
Fixes #1013
2023-04-05 18:29:30 +02:00
WerWolv
a5568d09d8 patterns: Updated pattern language
Fixes #1011
2023-04-05 18:03:30 +02:00
WerWolv
7a4f909c68 fix: Disassembler arch names not correctly corresponding to their ids
Fixes #1010
2023-04-05 18:02:47 +02:00
WerWolv
89aee456c6 patterns: Updated pattern language
Fixes #1011
2023-04-05 07:26:44 +02:00
WerWolv
4cf92103d8 fix: Names of disassembler architectures not corresponding to their actual type
Fixes #1010
2023-04-05 07:20:06 +02:00
WerWolv
e3b1ebb826 patterns: Updated pattern language 2023-04-04 23:42:39 +02:00
WerWolv
3658d8d96e fix: Disassembler not supporting any Capstone 5 features anymore
Fixes #1010
2023-04-04 23:08:10 +02:00
WerWolv
6c047f01f9 git: Fixed release CI not reading version correctly 2023-04-04 21:59:43 +02:00
WerWolv
fc105ecc3d build: Bumped version to 1.28.0 2023-04-04 12:04:22 +02:00
WerWolv
649f6c28bf patterns: Updated pattern language 2023-04-04 11:20:09 +02:00
WerWolv
867972b7f5 patterns: Updated pattern language 2023-04-04 10:23:01 +02:00
WerWolv
efe3227ef2 patterns: Updated pattern language 2023-04-04 09:34:50 +02:00
H1X4
aab8c88a96 feat: allow loading and saving pattern code via events (#1004)
Currently there is no way to save the pattern code progamically from a
plugin unless the builtin plugin is modified to add those events. This
pull request will be adding ability to load and save pattern code from
specified file.
2023-04-01 11:18:52 +02:00
Thomas
af18ca011b fix: Modified bytes visually reverting back after saving (#1003)
Fix #988

Co-authored-by: Nik <werwolv98@gmail.com>
2023-04-01 11:18:03 +02:00
Thomas
24106b860a impr: Added some documentation to providers (#1001) 2023-04-01 11:17:19 +02:00
WerWolv
60efb6973b fix: Filtering of long strings in find view not working correctly 2023-04-01 11:04:07 +02:00
WerWolv
cffd55bdda fix: UTF-16BE search being broken 2023-03-31 22:20:00 +02:00
WerWolv
88e767aaaf fix: Crash when loading big encoding files 2023-03-31 19:56:20 +02:00
WerWolv
d6cda43618 fix: Modified bytes visually reverting back after saving 2023-03-31 19:18:31 +02:00
WerWolv
3b229cd5cb impr: Added path tooltips to entries in the file chooser popup 2023-03-31 19:17:27 +02:00
WerWolv
72c4dbdb2f patterns: Updated pattern language 2023-03-31 13:49:59 +02:00
WerWolv
4da18d3630 fix: Custom encoding and text padding setting not applying to custom encoding column
Actually fixes #1005
2023-03-31 13:49:33 +02:00
WerWolv
2f04cfd5c6 fix: Entering decimal and float values in hex editor cells being broken 2023-03-31 11:34:08 +02:00
WerWolv
8195db6d4c fix: Prevent occasional crash when having ImHex open and connecting to the computer over RDP 2023-03-31 11:08:53 +02:00
WerWolv
722f6315c4 impr: Make sure shortcuts can't be used when popups are open 2023-03-31 11:07:53 +02:00
WerWolv
173ed5475c fix: Remove empty column when ASCII row is off and custom encoding is on
Fixes #1005
2023-03-31 11:07:32 +02:00
WerWolv
1460044e91 impr: Save custom encoding file to project
Fixes #1005
2023-03-31 11:06:51 +02:00
WerWolv
06a7b6e446 patterns: Fixed namespace of hex::prv:: functions 2023-03-28 10:27:49 +02:00
WerWolv
28b7b4b7f1 fix: File -> Open Others... menu not working correctly 2023-03-28 10:13:41 +02:00
WerWolv
8930adf532 patterns: Updated pattern language 2023-03-28 09:29:49 +02:00
WerWolv
f44b8a5618 patterns: Updated pattern language 2023-03-27 22:40:19 +02:00
WerWolv
6a9f79628e impr: Don't try to apply patches if there are none 2023-03-26 12:48:22 +02:00
Jonathan Wright
245c56ba8a build: Added Fedora 38 build (#928)
Co-authored-by: Thomas <hey@itrooz.fr>
2023-03-26 11:37:46 +02:00
WerWolv
98846421f6 build: Update dependencies 2023-03-26 11:23:32 +02:00
WerWolv
0aaeeffff7 build: Fixed capitalization of ImHex in MSI installer 2023-03-26 11:22:50 +02:00
Thomas
c2823facc2 lang: Fix weblate (#997)
This should (hopefully) fix weblate. I tried to fix merge conflicts
using instructions at
https://weblate.werwolv.net/projects/imhex/windows-plugin/#alerts

---------

Co-authored-by: xtex <xtexchooser@duck.com>
2023-03-26 11:03:30 +02:00
Thomas
fabb1596e5 impr: Handle and show NFD errors (#995)
This PR handles errors that NFD might encounter (both in Init() and the
other method to open the dialog), and log them in the logs and in the
GUI

This (among other) fix the crash I had running ImHex as root and opening
a file
2023-03-26 11:02:51 +02:00
Thomas
725e32250b fix: Move config files to XDG_CONFIG_HOME (#993)
This pull request changes Config Directories on Linux to only include
the XDG_CONFIG_HOME directory, as opposed to all directories in
XDG_DATA_DIRS before (introduced in
https://github.com/WerWolv/ImHex/pull/644/files#diff-c1a4d2b63fed168a9a3568944e9cadeae096f2ddcec3649e4a9b2d29fd104be0L162-L166).

Reasons:
- This changes the location of the config file to the standard directory
meant for configurations
- This prevents the config file from being read/written in system
locations, like /usr/share

This PR also includes a migration task that will run on Linux and move
config/GUI dimensions to the new directory

as a bonus, as discussed on discord, it writes the logs to a Data
directory instead of a Config directory
2023-03-26 11:02:23 +02:00
Zaggy1024
5fa264ea18 patterns: Update pattern_language and implement support for new bitfield features (#992)
This requires https://github.com/WerWolv/PatternLanguage/pull/34 to be
merged first, and then this can be amended to update the submodule and
merged to add support for the new features.
2023-03-26 11:01:37 +02:00
WerWolv
5e175b118d build: Updated libwolv 2023-03-25 11:24:24 +01:00
WerWolv
635173e55a impr: Make sure themes are added correctly when downloaded from the store 2023-03-23 20:35:16 +01:00
WerWolv
eb2ed6852c build: Make SSL work when using system curl on WIndows 2023-03-23 20:12:33 +01:00
WerWolv
2296766746 build: Allow building with capstone 4.X again 2023-03-23 16:45:00 +01:00
WerWolv
13be499510 build: Pull in latest version of libyara and libcurl 2023-03-23 16:30:55 +01:00
WerWolv
fec5c567e1 ui: Improve look and feel of content store 2023-03-23 13:32:47 +01:00
WerWolv
8ef863cae1 fix: Progress not working with with new http wrapper 2023-03-23 13:32:35 +01:00
WerWolv
9463105172 fix: Header memory leak in http requests class 2023-03-23 12:08:33 +01:00
WerWolv
bb4819bce4 sys: Fixed http request stack overflow 2023-03-23 11:43:07 +01:00
WerWolv
15be24db62 sys: Updated to use the new HttpRequest helper instead of Net 2023-03-23 11:23:07 +01:00
WerWolv
e7e2af9f91 patterns: Updated pattern language 2023-03-23 09:41:32 +01:00
WerWolv
8c5fd021f7 api: Hook up new http wrapper to the rest of ImHex 2023-03-22 23:05:18 +01:00
WerWolv
1a1ba19770 api: Added new, more flexible curl http wrapper 2023-03-22 21:48:14 +01:00
WerWolv
f95214d8fe patterns: Updated pattern language 2023-03-22 17:43:45 +01:00
WerWolv
631cfce2f8 impr: Added tooltip informing about font size if no custom font was selected 2023-03-22 16:30:49 +01:00
WerWolv
45649264f9 patterns: Updated pattern language 2023-03-22 13:12:57 +01:00
WerWolv
0fd3cb0c4a fix: Don't jump to previous editing position when selecting new region in hex editor
Potenially fixes issues mentioned in #924
2023-03-22 13:11:09 +01:00
Jacob Creedon
3cfec69020 feat: Added additional CRC hash types (#991)
This adds some common CRC types.

---------

Signed-off-by: Jacob Creedon <jcreedon@gmail.com>
2023-03-22 10:53:57 +01:00
WerWolv
cec62d23b0 fix: Window resizing causing freezes in some cases 2023-03-21 22:39:35 +01:00
WerWolv
f3f0dda3d4 fix: Properly clear valid region when switching to a different provider 2023-03-21 16:11:40 +01:00
WerWolv
be16b66ac0 fix: Make sure files don't get truncated when using Save As on itself
Fixes #987
2023-03-21 15:42:10 +01:00
WerWolv
b9059aaa01 fix: Make find process in the find view more easily cancelable 2023-03-21 15:37:49 +01:00
WerWolv
57a62d0544 impr: Clean up entire API and added doc comments 2023-03-21 15:33:43 +01:00
WerWolv
d82f0e952f fix: Custom data inspector rows not being writable correctly 2023-03-21 13:16:22 +01:00
Thomas
8731b7582b impr: Display a more detailed errors when opening a raw disk provider failed (#970)
PR title is self explaining

I may modify other providers implementations to display a detailed error
message later

I'm not sure how to deal with other locales because the format changed.
Before, I had to add and comment the key in all locale files, now I'm
not so sure.
2023-03-21 10:33:00 +01:00
WerWolv
e6959dc572 patterns: Updated pattern language
Fixes #954
2023-03-21 10:31:13 +01:00
WerWolv
a36b4d65e3 build: Make sure commit hash and branch end up in nightly builds 2023-03-21 10:14:09 +01:00
WerWolv
060ff56f9d impr: Improve file reading performance if opening of files is slow 2023-03-21 09:47:42 +01:00
WerWolv
0a0c0c0d07 feat: Added bytes swapper tool 2023-03-20 22:25:27 +01:00
WerWolv
17c4e405a6 impr: Update the command palette for the modern ages 2023-03-20 17:05:26 +01:00
WerWolv
53afa6ea43 fix: Crash on exit 2023-03-20 15:18:48 +01:00
WerWolv
a182e8daf2 patterns: Updated pattern language
Fixes #983
2023-03-20 15:12:27 +01:00
WerWolv
a4dfaba03f fix: All menu item shortcuts being global 2023-03-20 15:12:12 +01:00
WerWolv
6e23560e80 feat: Added all menu items to command palette 2023-03-20 14:11:43 +01:00
WerWolv
39e8d557e8 sys: Completely revamped main menu item system 2023-03-20 13:11:43 +01:00
WerWolv
677c989664 feat: Allow custom data inspector rows to be edited 2023-03-20 08:30:34 +01:00
WerWolv
c9342d90fb fix: Prevent new line from appearing on every pl code save
Fixes #982
2023-03-20 08:29:00 +01:00
WerWolv
0693bb8d51 git: Fixed documentation shield style 2023-03-18 16:10:39 +01:00
WerWolv
5cd3c305d0 git: Added documentation link to readme 2023-03-18 16:09:45 +01:00
WerWolv
e00b59c393 fix: Properly discard reopened stderr 2023-03-18 11:47:42 +01:00
WerWolv
7c1e33dde6 sys: Prevent libraries from printing garbage to the console through stderr 2023-03-18 11:35:01 +01:00
WerWolv
367bd76046 ui: Mae sure all theme scaling values are scaled correctly 2023-03-18 10:52:50 +01:00
WerWolv
1a1bf98905 impr: Look for magic files recursively 2023-03-17 21:18:28 +01:00
WerWolv
4c1a24058c ui: Fixed various scaling inconsistencies on higher scaling factors 2023-03-17 19:58:08 +01:00
WerWolv
294e95caf8 fix: Store page not clearing nodes and themes section correctly 2023-03-17 17:55:39 +01:00
WerWolv
031884c327 patterns: Updated pattern language
Fixes #979
2023-03-17 17:28:17 +01:00
WerWolv
466dacaab4 ui: Improve the look and feel of the information view 2023-03-17 17:07:39 +01:00
WerWolv
1f8645fd43 fix: Occasional crash when multiple threads are reading data from a file provider 2023-03-17 11:43:50 +01:00
WerWolv
880568cc60 impr: Better find view result filter speeds 2023-03-17 11:32:08 +01:00
WerWolv
f10fb56042 impr: Drastically improve file reading performance 2023-03-17 11:31:50 +01:00
WerWolv
64be6d89ee fix: Moving cursor around using arrow keys behaving weirdly 2023-03-17 09:17:44 +01:00
WerWolv
5442c32a3f impr: Allow non-continuous provider values to be saved 2023-03-17 08:38:38 +01:00
WerWolv
4ee53701e6 impr: Allow Regex find strategy specify string type and minimum length 2023-03-17 08:16:13 +01:00
WerWolv
5097a223e3 impr: Added default saveAs implementation for all providers 2023-03-17 08:15:43 +01:00
WerWolv
7cdba75bef fix: Crash when not making a valid selection in provider load interfaces 2023-03-16 16:48:15 +01:00
WerWolv
0312027ca8 impr: Modernize look and feel of bookmarks 2023-03-16 14:40:26 +01:00
WerWolv
c726c96286 impr: Make comment field in bookmark tooltip more readable 2023-03-16 13:35:29 +01:00
WerWolv
5a2b2e0813 feat: Make yara match list sortable 2023-03-16 13:35:09 +01:00
WerWolv
4271b2e9fd fix: Yara view filtering out all but one match 2023-03-14 17:02:59 +01:00
WerWolv
13ef4c04d1 patterns: Updated pattern language
Closes #961
2023-03-14 14:41:32 +01:00
WerWolv
96c3bb1e38 feat: Limit recent files to 5 files, add option to disable saving them
Closes #950
2023-03-14 14:07:18 +01:00
WerWolv
a0b36925ed fix: Custom styles not being scaled correctly 2023-03-14 13:19:04 +01:00
WerWolv
daadc2ea71 impr: Attempt loading of full unicode plane from font if possible 2023-03-14 12:30:28 +01:00
WerWolv
ec2934b4b8 fix: Advancing to next row when editing bytes loading wrong value
Fixes #973
2023-03-14 10:24:25 +01:00
WerWolv
3a840c4ced impr: Properly display custom encoding characters that are split between lines 2023-03-14 09:35:43 +01:00
WerWolv
bd190d2b65 patterns: Updated pattern language 2023-03-13 11:36:11 +01:00
qux-bbb
9b05a36529 fix: Find view string filters filtering for some wrong characters (#972)
`\r` and `\n` need to be filtered.
2023-03-13 11:06:30 +01:00
WerWolv
d9a498e8ec build: Make sure libwolv is compiled with -fPIC 2023-03-13 10:39:34 +01:00
WerWolv
7d86b277a7 build: Updated curl and libyara 2023-03-13 10:24:56 +01:00
WerWolv
d463b3235e tests: Fixed building of tests 2023-03-13 10:24:48 +01:00
WerWolv
5a8433ede4 build: Updated libwolv 2023-03-13 09:31:24 +01:00
WerWolv
00a5fd2d7c sys: Fixed more build issues 2023-03-13 09:25:07 +01:00
WerWolv
55f9faea10 sys: Updated more code to libwolv 2023-03-13 08:58:08 +01:00
WerWolv
fb2e668589 sys: Moved more functions to libwolv 2023-03-12 18:43:05 +01:00
WerWolv
0dafb3d230 sys: Replaced many helper functions with libwolv 2023-03-12 18:27:33 +01:00
qux-bbb
e958934a22 fix: String search not including string at end of data (#963)
Before:  

![before](https://user-images.githubusercontent.com/18598419/222937056-fec74305-21a3-4bbf-a439-e8df7031bca9.png)

After:  

![after](https://user-images.githubusercontent.com/18598419/222937069-a04cb748-4266-4fbb-8182-727bb8858329.png)
2023-03-11 14:39:50 +01:00
Fenrisfulsur
069221757f feat: Added chunk based entropy analysis to information view (#933)
Issue: https://github.com/WerWolv/ImHex/issues/522

Implementation of chunk based entropy analysis in diagram.hpp available
from the data information view and in the pattern language.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-03-10 16:06:18 +01:00
WerWolv
505c1bc274 build: Fix Fedora build errors 2023-03-10 14:46:15 +01:00
qux-bbb
cdd5d33e89 feat: Make CTRL + N automatically create a memory provider (#966)
"CTRL + N" can open a mem_file directly.
2023-03-07 16:05:03 +01:00
WerWolv
f661f4d1d6 fix: GDB provider not working nicely anymore 2023-03-07 16:04:04 +01:00
Mimi1337
f435191585 fix: Dockerfile syntax error (#945) 2023-02-21 11:29:21 +01:00
WerWolv
00c2d7ea71 patterns: Updated pattern language 2023-02-20 11:35:33 +01:00
WerWolv
cddcc1e85d patterns: Updated pattern language 2023-02-19 10:49:57 +01:00
WerWolv
91928b45d8 fix: Try to fix build again 2023-02-19 10:25:39 +01:00
WerWolv
277c83e6d8 fix: Uninitialized value build issue 2023-02-19 09:18:17 +01:00
WerWolv
0017cd2e40 feat: Added binary hex cell visualizer
Closes #939
2023-02-18 22:20:02 +01:00
WerWolv
774803492c fix: Editing binary value in data inspector not working correctly
Fixes #941
2023-02-18 21:44:43 +01:00
WerWolv
83a9655772 patterns: Updated pattern language 2023-02-17 20:30:41 +01:00
WerWolv
58324b4539 build: Fixed linking against execinfo 2023-02-17 17:56:27 +01:00
WerWolv
09b7794d71 build: Added option to disable stack traces 2023-02-17 17:52:10 +01:00
WerWolv
9e3fe9beb1 patterns: Updated pattern language 2023-02-17 17:35:41 +01:00
WerWolv
ff525fe750 impr: Properly sort choose file dialog entries
Fixes #938
2023-02-17 14:59:19 +01:00
WerWolv
94977ad216 patterns: Updated pattern language 2023-02-17 14:55:56 +01:00
WerWolv
64e34e42b8 patterns: Fixed highlighting of custom sections 2023-02-17 14:53:15 +01:00
WerWolv
21dc65f42a impr: Added comments everywhere in main application 2023-02-17 12:03:53 +01:00
WerWolv
279e085887 impr: Don't create a new font texture for no reason 2023-02-17 12:03:00 +01:00
WerWolv
d84dfa2c42 feat: Allow custom CA Certs to be loaded
Fixes #907
2023-02-17 12:01:46 +01:00
WerWolv
bf8089dc7e impr: Don't memory map files, never keep a write handle open for long
Closes #592
2023-02-17 10:26:09 +01:00
WerWolv
e48761b5c0 fix: Plot lines being invisible 2023-02-17 10:02:43 +01:00
WerWolv
35437c0300 patterns: Added rotation and scale sliders to 3D visualizer 2023-02-16 23:24:24 +01:00
WerWolv
6cecc12d04 patterns: Updated pattern language 2023-02-16 22:20:03 +01:00
WerWolv
dec4231d49 impr: Make sure fonts don't get blurry on non-integer scalings 2023-02-16 20:53:58 +01:00
WerWolv
fb1d12ebf3 sys: Remove some problematic (and rarely used) scaling settings 2023-02-16 20:19:55 +01:00
WerWolv
b19276a3e9 patterns: Added match keyword to syntax highlighting 2023-02-16 19:10:08 +01:00
WerWolv
5ccbfc1ff8 feat: Allow themes and nodes to be downloaded from the content store 2023-02-16 18:55:21 +01:00
WerWolv
d3d6a8a838 patterns: Updated pattern language 2023-02-16 18:23:49 +01:00
WerWolv
ac83bbeb0e feat: Added a theme manager view to make it easier to make new themes 2023-02-16 18:06:40 +01:00
WerWolv
8cb76a26c1 fix: Font being scaled too big 2023-02-16 16:29:41 +01:00
WerWolv
20da22d59e sys: Make sure scrolling counts as an input event 2023-02-16 08:53:23 +01:00
WerWolv
d9fa4b452c impr: Clean up diff view 2023-02-16 08:53:05 +01:00
WerWolv
6216d72aa6 fix: Format string compile issues 2023-02-15 22:22:13 +01:00
WerWolv
851f132188 impr: Make Text Editor word selector also consider underlines 2023-02-15 17:12:16 +01:00
WerWolv
3067ff08ec feat: Greatly improved diff view
Fixes #631
2023-02-15 17:01:36 +01:00
WerWolv
07fd86fc9d git: Split release workflows into multiple steps 2023-02-15 10:21:56 +01:00
WerWolv
504037c115 build: Bumped version to 1.27.1 2023-02-15 09:39:23 +01:00
WerWolv
0fad21a980 patterns: Updated pattern language 2023-02-15 09:39:16 +01:00
WerWolv
8afd698284 impr: Correct some ugly code 2023-02-14 15:43:44 +01:00
WerWolv
9ec7b90192 patterns: Updated pattern language 2023-02-14 15:10:52 +01:00
WerWolv
08f0fff34b patterns: Updated pattern language 2023-02-14 12:53:37 +01:00
WerWolv
2c1073eda9 fix: Safety backup restore popup getting hidden by tip of the day 2023-02-14 11:45:32 +01:00
WerWolv
c9348f0651 patterns: Updated pattern language 2023-02-13 23:27:12 +01:00
WerWolv
accb461c08 impr: Better word select and delete in text editor
Closes #931
2023-02-13 10:21:57 +01:00
Thomas
75adcc0a96 build: Fix Arch package name in release CI (#929)
* Fix Arch package name in release CI

* update email address
2023-02-13 09:05:52 +01:00
WerWolv
61ce88ba9b build: Fix build on systems that have no backtrace or execinfo
Fixes #932
2023-02-13 08:27:08 +01:00
WerWolv
4b451fd1d3 patterns: Fixed pattern data rows not being selectable when color column is hidden 2023-02-13 08:26:43 +01:00
WerWolv
a87190960f build: Fixed one more missing imhex target name 2023-02-12 22:08:35 +01:00
WerWolv
45558027a6 git: Fixed release workflow 2023-02-12 21:55:22 +01:00
WerWolv
e426606542 build: Fixed flatpak build issues 2023-02-12 21:55:09 +01:00
WerWolv
4d60942fea build: Bumped version to 1.27.0 2023-02-12 19:24:04 +01:00
WerWolv
3003dea409 fix: Occasional error when loading recent files 2023-02-12 17:52:09 +01:00
WerWolv
0b18930017 fix: Invalid theme load error 2023-02-12 17:39:47 +01:00
WerWolv
54ef5785cd fix: ImNodes double free 2023-02-12 17:38:13 +01:00
WerWolv
d084ec78e9 nodes: Allow immediate values on integer and float inputs
Closes #427
2023-02-12 17:33:53 +01:00
WerWolv
a59c17aa83 nodes: Fixed loading saved nodes multiple times 2023-02-10 11:22:11 +01:00
WerWolv
6281adc7c3 nodes: Added a few new nodes 2023-02-10 08:18:06 +01:00
WerWolv
5cc01ae89d nodes: Added support for nested, shareable, custom data processor nodes 2023-02-09 23:07:04 +01:00
WerWolv
303dd28c7c fix: Fix macOS build again 2023-02-08 14:11:42 +01:00
WerWolv
dd87dc7046 fix: Building on macOS 2023-02-08 13:51:56 +01:00
WerWolv
235a64deef sys: One more attempt to fix macOS scaling issues 2023-02-08 12:53:34 +01:00
WerWolv
89a96c6d25 sys: Improve pattern visualizer API 2023-02-07 14:18:59 +01:00
WerWolv
4f0e5b99a8 pattern: Make visualizer button actually accessible again 2023-02-06 17:24:06 +01:00
WerWolv
f75f3f4661 pattern: Fixed wrong number of required parameters for image visualizer 2023-02-06 17:23:50 +01:00
WerWolv
b936a28921 fix: Opening files from command line not working 2023-02-06 07:11:21 +01:00
Jonathan Wright
d02507ae4b build: Re-enable Fedora rawhide builds (#920)
* re-enable rawhide builds

* Update build.yml

* Update imhex.spec

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-02-02 21:42:13 +01:00
WerWolv
0b576adcf8 fix: Another P2468R2 issue 2023-02-02 21:26:46 +01:00
WerWolv
22ff033b5e fix: More P2468R2 issues 2023-02-02 21:13:56 +01:00
WerWolv
b1edede53a fix: Invalid json comparison 2023-02-02 20:54:38 +01:00
WerWolv
3877f0853d patterns: Updated pattern language 2023-02-02 20:41:51 +01:00
WerWolv
9af8a0113a patterns: Updated pattern language 2023-02-02 19:06:00 +01:00
WerWolv
0d01f0c9d7 feat: Added function to import patches from a modified file 2023-02-02 14:13:37 +01:00
WerWolv
9911166c24 git: Added translation status batch to readme 2023-02-02 13:12:48 +01:00
WerWolvTranslationBot
01736d6409 lang: Updated German translation (#916)
Currently translated at 100.0% (842 of 842 strings)

Translation: ImHex/Built-in Plugin
Translate-URL: https://weblate.werwolv.net/projects/imhex/built-in-plugin/de/

Co-authored-by: Nik <werwolv98@gmail.com>
2023-02-02 11:58:09 +01:00
WerWolv
4ea8971adf lang: Added base translation files 2023-02-02 10:08:47 +01:00
WerWolv
8da072b602 lang: Get codebase ready for the use with Weblate 2023-02-02 09:41:58 +01:00
Berylskid
f6823d5f13 lang: Updated Japanese translation (#915) 2023-02-02 09:39:40 +01:00
WerWolv
941c7ee61d fix: Still properly divide scaling by 2.0 on macOS 2023-02-01 23:47:22 +01:00
WerWolv
fd259dcde3 fix: Prevent native scaling from going below 1.0 on macOS 2023-02-01 23:45:07 +01:00
WerWolv
79ecf7fa59 build: Fix non-Windows build 2023-02-01 09:38:03 +01:00
WerWolv
4c761df181 build: Improve build script a bit 2023-02-01 09:20:46 +01:00
WerWolv
94dc688324 ui: Change feedback link 2023-02-01 09:20:32 +01:00
WerWolv
357dd883db fix: Hexadecimal string inputs in data processor nodes behaving weirdly 2023-01-31 11:39:08 +01:00
WerWolv
3bad5e1d9c fix: ImHex still opening files when multiple builtin plugins are detected 2023-01-31 11:38:26 +01:00
WerWolv
d09982d99f fix: Crash when opening selection view
Fixes #913
2023-01-30 18:15:42 +01:00
Nik
fe7eb582a4 git: Added code quality tag to readme 2023-01-30 11:36:34 +01:00
WerWolv
c76b4bc9e9 impr: Removed a bunch of trailing white spaces 2023-01-30 11:11:30 +01:00
WerWolv
55d7d7c026 impr: Improve code quality 2023-01-30 10:42:07 +01:00
WerWolv
6b645192d4 fix: Diff view highlighting issues 2023-01-30 10:26:37 +01:00
WerWolv
d6bb408078 fix: All bytes being selected when opening a new provider 2023-01-30 10:10:37 +01:00
WerWolv
434ced44f0 fix: Build failing on macOS 2023-01-28 21:30:17 +01:00
WerWolv
c6e1f45dc3 feat: Added option to copy custom encoding strings from hex view 2023-01-28 21:12:35 +01:00
WerWolv
c861bf9a5e fix: Copying strings and bad names 2023-01-28 21:12:08 +01:00
WerWolv
86be1ef1ec impr: Make find view string filter case insensitive 2023-01-28 20:55:11 +01:00
WerWolv
c4d52da924 ui: Added cancel button to task running popup 2023-01-28 14:36:39 +01:00
WerWolv
a142d4fe20 ui: Make file chooser popup bigger 2023-01-28 14:28:06 +01:00
WerWolv
197e86f327 fix: Duplicate highlightings for every yara rule 2023-01-28 14:27:51 +01:00
WerWolv
b1aa58d446 feat: Allow selected yara rules to be saved to Project file 2023-01-28 14:15:15 +01:00
WerWolv
60a178f75e fix: Last column of diff view displaying all zeros
Fixes #908
2023-01-28 12:44:40 +01:00
WerWolv
6799263317 sys: Added a info popup when closing ImHex while tasks are still running 2023-01-28 12:16:41 +01:00
WerWolv
9b80486285 fix: Process Memory provider search not being case insensitive 2023-01-28 11:41:09 +01:00
WerWolv
3254376d28 fix: Editing static array values being broken 2023-01-28 00:03:20 +01:00
WerWolv
29c1a0cb78 feat: Allow multiple yara files to be selected at once 2023-01-28 00:01:53 +01:00
WerWolv
800ffb5e56 feat: Make it easier to apply multiple yara rules at once 2023-01-27 12:17:10 +01:00
WerWolv
1cf9f7e990 patterns: Updated pattern language 2023-01-27 10:45:07 +01:00
WerWolv
d928325fdf fix: Loading of Intel Hex and Motorola SREC files with new lines inbetween
Fixes #906
2023-01-26 11:06:00 +01:00
WerWolv
b3556c7c91 lang: Updated language files 2023-01-25 10:56:13 +01:00
WerWolv
4b112321d2 feat: Added base64 exporter
Closes #900
2023-01-25 10:51:00 +01:00
WerWolv
fee1b985c0 feat: Added better error messages for generating and importing ips patches 2023-01-25 10:38:04 +01:00
WerWolv
111eabb84c feat: Added scatter plot visualizer 2023-01-25 10:16:46 +01:00
WerWolv
f9bb4d828a ui: Improve visualizer button layout and error messages 2023-01-25 10:16:31 +01:00
WerWolv
434b7649c3 fix: CRC8 hashing algorithm displaying 16 bits result 2023-01-25 00:06:48 +01:00
WerWolv
fc44dd4592 build: Fixed building of miniaudio on macOS 2023-01-24 23:57:43 +01:00
WerWolv
8ea0e9ce9c fix: Sound visualizer being really laggy 2023-01-24 23:57:29 +01:00
WerWolv
94cd83e0dc feat: Added sound visualizer 2023-01-24 23:27:35 +01:00
WerWolv
27790532f8 fix: Crash when closing provider that had pattern loaded in some cases 2023-01-24 23:27:15 +01:00
WerWolv
90d9c91717 build: Cleanup opengl and glfw linking 2023-01-24 14:59:19 +01:00
WerWolv
32ed2c30c0 fix: Flickering task bar progress bar 2023-01-24 13:42:08 +01:00
WerWolv
cf9df6e36d feat: Added ability to query provider information from pattern language 2023-01-24 09:07:11 +01:00
WerWolv
915106f360 patterns: Fixed various issues with the 3d visualizer 2023-01-23 16:25:23 +01:00
WerWolv
a51e4afb05 patterns: Updated pattern language 2023-01-23 13:53:29 +01:00
WerWolv
c30f8fa459 patterns: Updated pattern language 2023-01-23 07:25:44 +01:00
WerWolv
46221e936f feat: Allow the 3d visualizer to use index buffers 2023-01-22 16:17:10 +01:00
WerWolv
c86891e0c3 fix: Custom encodings not rendering correctly on non-zero page 2023-01-22 14:17:55 +01:00
WerWolv
acf6b839e5 patterns: Updated pattern language 2023-01-22 12:16:22 +01:00
WerWolv
1f50e834fc fix: Copying bytes from non-zero page not working 2023-01-22 11:28:17 +01:00
WerWolv
6322dbf46a fix: Revert back macOS scaling fix as it made it worse 2023-01-21 22:59:08 +01:00
WerWolv
0e1aeee3fb patterns: Display bitfield field bit addresses from the start of the bitfield 2023-01-21 22:32:16 +01:00
WerWolv
173f279ac8 fix: Find view not correctly accepting hexadecimal values 2023-01-21 18:44:12 +01:00
WerWolv
89e0df86a2 feat: Added scaling and rotation to 3D visualizer 2023-01-21 13:00:02 +01:00
WerWolv
7ba9349de2 patterns: Updated pattern language 2023-01-21 12:31:33 +01:00
WerWolv
15fb288a5b fix: Yara view only loading in .yar files and not .yara files 2023-01-21 10:10:05 +01:00
WerWolv
f17e04273d fix: IPS patch applying being broken 2023-01-21 00:29:16 +01:00
WerWolv
76d47bf856 fix: MacOS Build errors because of khronos includes 2023-01-21 00:11:33 +01:00
WerWolv
d4967018c2 feat: Added basic lighting and rotations to 3d visualizer model 2023-01-20 23:32:51 +01:00
WerWolv
8e759d9b5f feat: Added basic 3D visualizer, moved visualizers to separate file 2023-01-20 21:16:28 +01:00
WerWolv
a9cebed903 ui: Disable Jump To command when too many bytes are selected 2023-01-19 17:08:17 +01:00
WerWolv
58a70f6ad8 ui: Move around File menu items to make more logical sense 2023-01-19 17:05:54 +01:00
WerWolv
05c8158716 feat: Added a new division by invariant multiplication tool 2023-01-19 17:01:41 +01:00
WerWolv
17b0f2ae77 feat: Added a description to the IEEE754 decoder tool 2023-01-19 17:01:19 +01:00
WerWolv
b54e6ea531 ui: Always add a spacing at the end of all tools 2023-01-19 16:59:59 +01:00
WerWolv
b702ad4190 fix: Occasional crash when loading a provider 2023-01-19 16:59:34 +01:00
WerWolv
4fb544d59d fix: Views starting out super tiny 2023-01-19 16:59:09 +01:00
WerWolv
e37a73ae58 patterns: Updated pattern language 2023-01-19 12:19:09 +01:00
WerWolv
c5d2739a39 fix: File provider sometimes not saving path to project file 2023-01-19 11:09:24 +01:00
WerWolv
def40c908e patterns: Added basic disassembler visualizer 2023-01-18 17:17:34 +01:00
WerWolv
ef12798fe2 feat: Allow custom hashes to be saved to projects 2023-01-18 14:30:56 +01:00
WerWolv
c747c15567 fix: Buffer overflow caused by hex input boxes 2023-01-18 14:30:44 +01:00
Nik
48a57cd981 feat: Added stacktrace printing on crashes (#892)
* feat: Added simple stack trace output

* feat: Added backtrace wrapper

* build: Added libbacktrace include dirs to build

* build: Fixed libbacktrace variables

* build: More backtrace variable fixes

* build: Try to find backtrace include

* build: Get backtrace header from cmake script

* feat: Added backtrace support for execinfo

* feat: Added support for StackWalk on Windows
2023-01-17 21:38:56 +01:00
WerWolv
3ddef07284 fix: ImHex failing to load in Portable mode from a folder with no permissions
Fixes #881
2023-01-17 09:59:57 +01:00
Kuruyia
a65f0a5238 feat: Support macOS keyboard shortcuts (#889) 2023-01-17 08:16:02 +01:00
birdstakes
ca68150970 fix: Frame rate not unlocking correctly (#890)
m_hadEvent could be set during glfwWaitEventsTimeout and then
immediately cleared before ever being checked.
2023-01-17 08:14:40 +01:00
WerWolv
92f0aa9593 fix: Logs always being saved to user folders
Fixes #888
2023-01-16 19:39:00 +01:00
WerWolv
b368b9c6d1 git: Make install instructions reflect actual release names 2023-01-16 18:20:22 +01:00
WerWolv
7e17059154 sys: Improved exception debug output 2023-01-16 18:17:13 +01:00
WerWolv
e078d810de git: Added install instructions for all release builds
#887
2023-01-16 13:41:24 +01:00
WerWolv
62bf877046 patterns: Updated pattern language
Fixes #880, Fixes #863
2023-01-15 22:59:15 +01:00
WerWolv
1b56c7ffae ui: Show task progress in task bar 2023-01-14 14:21:16 +01:00
WerWolv
f7e22ce651 patterns: Updated pattern language 2023-01-14 14:20:48 +01:00
WerWolv
b9c2b1de5f patterns: Updated pattern language 2023-01-13 22:30:57 +01:00
WerWolv
0c302da0db build: Add option to use the GTK file picker instead of portals on Linux
Fixes #882
2023-01-13 20:11:27 +01:00
WerWolv
45492365be fix: Potentially fix scaling issues on macOS 2023-01-13 20:06:03 +01:00
WerWolv
b497e9d867 git: Switch to different repo dispatch action 2023-01-13 08:58:03 +01:00
Nik
2840935f3d build: Added glfw to Brewfile 2023-01-13 01:01:43 +01:00
Thomas
69c0e6ee6e git: Do not run make install for tests (#879)
Co-authored-by: Nik <werwolv98@gmail.com>
2023-01-13 00:32:17 +01:00
Thomas
78b07e0a46 git: Make runner cache keys unique (#878) 2023-01-13 00:10:28 +01:00
Thomas
5a865774d1 git: Cleanup build CI + separate Ubuntu and AppImage builds (#873)
* remove flatpak

rationale: if we need it again we can always get it back from old commits

* remove double spaces

* remove Fedora rawhide

* remove Windows installer signing

* separate Ubuntu and AppImage builds
2023-01-12 23:50:59 +01:00
WerWolv
8d9667c2e0 fix: Yara rules being unable to include files
Fixes #875
2023-01-12 23:29:48 +01:00
WerWolv
1f6acc101f feat: Allow OTF fonts to be selected 2023-01-12 11:37:19 +01:00
WerWolv
0d91db68db patterns: Added bitmap visualizer 2023-01-12 11:18:36 +01:00
WerWolv
825e788646 git: Added more information to the readme requirements section 2023-01-12 08:50:16 +01:00
Thomas
f3815673c0 git: Fix typo on 'Chocolatey' + add uppercase on 'Winget' (#870)
* Fix typo on 'Chocolatey'

* add uppercase on 'Winget'
2023-01-12 08:25:51 +01:00
Thomas
b070092a64 git: Add architecture to build artifacts (#869)
* rename win64 artifact to Windows

* add architecture to all artifact names
2023-01-12 08:25:28 +01:00
WerWolv
25ede7ad18 fix: List all intel hex and motorola srec file extensions manually
Fixes #871
2023-01-12 08:20:15 +01:00
WerWolv
03d216f116 feat: Allow most resources to be loaded relative to the current project 2023-01-11 23:31:25 +01:00
WerWolv
b1cab5ccd2 patterns: Updated pattern language 2023-01-11 11:22:01 +01:00
Jonathan Wright
04d0458ae7 build: Improve Fedora builds and add EL9 build. (#861) 2023-01-10 23:10:34 +01:00
WerWolv
3b5d54dd96 fix: Text Editor behaving a bit weirdly now 2023-01-10 19:27:27 +01:00
WerWolv
87571450f4 patterns: Updated pattern language 2023-01-10 16:20:54 +01:00
WerWolv
766fd626f2 fix: Hex editor editing cursor not advancing on non-zero pages 2023-01-10 13:48:50 +01:00
WerWolv
be1f711fda fix: Pattern editor not scrolling all the way to the right when typing 2023-01-10 13:27:16 +01:00
WerWolv
ef3627321c sys: Clear project after loading crash backup 2023-01-10 08:57:29 +01:00
WerWolv
dbcb13f473 patterns: Disallow application/octet-stream to be used as MIME type 2023-01-09 08:38:19 +01:00
WerWolv
c1359a71d6 feat: Added options to automatically expand or flatten the pattern tree 2023-01-08 16:06:26 +01:00
WerWolv
b1a26d02c1 patterns: Updated pattern language 2023-01-08 10:20:54 +01:00
WerWolv
ceae23eab1 fix: Crash when opening a project file when already having providers open 2023-01-07 22:43:48 +01:00
Thomas
ab29303c2e sys: Clear project context when closing all providers, Display project name in window title (#860)
* clear project context when closing all providers

* Show project name on window title

* refactor RequestChangeWindowTitle to RequestUpdateWindowTitle

* add spaces
2023-01-07 17:31:22 +01:00
Thomas
ed831c6fc9 fix: Do not check for writable provider to save project, disable shortcut when unavailable (#859)
* do not check for writable provider to save project

* disable save project shortcut when we can't save it

* log when project is saved
2023-01-07 17:16:43 +01:00
WerWolv
d86be9d9b3 sys: putenv sucks. Use setenv instead 2023-01-07 10:56:03 +01:00
WerWolv
c26bed894b sys: Add imhex/lib path to plugin libraries search paths 2023-01-07 10:32:01 +01:00
Chien Wong
27cf5953ae fix: Typo of IEEE 754 (#856) 2023-01-06 13:12:10 +01:00
WerWolv
d0b3a60a09 build: Bumped version to 1.26.2 2023-01-05 16:37:53 +01:00
WerWolv
15f2376c62 sys: Fixed some variable names 2023-01-05 16:27:52 +01:00
WerWolv
efeeea37f6 build: Updated libromfs properly 2023-01-05 16:27:16 +01:00
WerWolv
5726e52df2 ui: Make content store resizable again 2023-01-05 13:23:08 +01:00
WerWolv
a1b596adc0 build: Bumped version to 1.26.1 2023-01-05 09:53:49 +01:00
WerWolv
763196f0cc feat: Added filtering to Process Memory Provider 2023-01-05 09:30:15 +01:00
WerWolv
ff9048fcf0 fix: Crash on exit
Fixes #854
2023-01-05 09:29:33 +01:00
WerWolv
7d9c86f584 fix: Crash when loading themes on Linux and MacOS 2023-01-04 23:56:36 +01:00
WerWolv
6129360b06 patterns: Updated pattern language
Fixed #853
2023-01-04 19:39:01 +01:00
WerWolv
3c5e91b611 build: Bumped version to 1.26.0 2023-01-04 16:09:23 +01:00
WerWolv
e529a79ddb fix: Template pattern types being placeable using right click menu 2023-01-04 15:50:37 +01:00
WerWolv
45bb9e6706 build: Fix some more ObjC issues 2023-01-04 14:55:58 +01:00
WerWolv
e6d14507e2 fix: Window title not resetting when closing all providers 2023-01-04 14:24:18 +01:00
WerWolv
9a5881fc47 build: Fixed -Wpedantic issues on macOS 2023-01-04 14:24:07 +01:00
WerWolv
f7dd28002e build: Build everything using -Wpedantic 2023-01-04 14:03:09 +01:00
WerWolv
496b0ec41d build: Fixed more build errors 2023-01-04 13:29:39 +01:00
WerWolv
02df578939 build: Fix library linking on non-windows 2023-01-04 13:23:42 +01:00
WerWolv
eb4a1e2692 build: Try to clean up bundled dependencies a bit 2023-01-04 12:34:38 +01:00
WerWolv
e6bec7d2b2 patterns: Updated pattern language 2023-01-04 10:20:50 +01:00
WerWolv
80f3bbb0af feat: Added DLL injection option, fixed memory region addresses 2023-01-04 10:02:17 +01:00
WerWolv
3a117b3bed feat: Display process icons in process memory provider 2023-01-03 16:34:22 +01:00
WerWolv
ff91335011 fix: ImNodes theme colors 2023-01-03 13:14:23 +01:00
WerWolv
01917439dd fix: More invalid iterator accesses 2023-01-03 13:04:36 +01:00
WerWolv
f21c80c48a build: More libfmt fixes 2023-01-02 01:38:07 +01:00
WerWolv
3dc42b711c fix: Plot lines being invisible 2023-01-01 23:53:50 +01:00
WerWolv
4b2863ca14 patterns: Updated pattern language 2023-01-01 22:15:47 +01:00
WerWolv
fe1b4b45b5 patterns: Updated pattern language 2023-01-01 21:48:20 +01:00
WerWolv
a20d6aa2b2 fix: Project file creation issues 2023-01-01 21:46:41 +01:00
WerWolv
78e52a0fe3 patterns: Updated pattern language 2023-01-01 20:25:41 +01:00
WerWolv
b4b507ecc9 lang: Added missing localizations for new provider 2023-01-01 19:14:57 +01:00
WerWolv
d7d19d7594 feat: Further improve process memory provider 2023-01-01 12:26:27 +01:00
WerWolv
90df4413c3 feat: Added basic windows process memory provider 2023-01-01 02:29:38 +01:00
WerWolv
4cd6646cca build: Enable libstdc++ assertions in debug builds 2023-01-01 01:05:01 +01:00
WerWolv
87ed0d31d4 fix: Various invalid iterator and container accesses 2023-01-01 01:01:24 +01:00
WerWolv
921bdd9e3b patterns: Updated pattern language 2022-12-31 10:28:41 +01:00
WerWolv
1f51a603f0 patterns: Updated pattern language 2022-12-30 12:47:23 +01:00
WerWolv
5fbbdb8e3c git: Make main logo respect color theme 2022-12-30 12:07:51 +01:00
WerWolv
745da6ba45 build: Only use --export-all-symbols on Windows 2022-12-30 11:24:53 +01:00
WerWolv
ad71e612a3 build: Clean up some old compiler/linker flag settings 2022-12-30 10:35:11 +01:00
WerWolv
85823e8e5d build: Removed all usages of Python 2022-12-29 23:32:57 +01:00
WerWolv
b4fa8bebe9 build: Move main romfs to main application 2022-12-29 23:32:40 +01:00
WerWolv
7859a9bb1f feat: Added native custom theme support 2022-12-29 19:26:00 +01:00
WerWolv
696d8d1d54 feat: Allow pasting of bytes with prefixes and comma separators
Closes #581
2022-12-29 15:08:44 +01:00
123456abcdef
6e8d3e0d7f fix: Wrong i18n labels (#852) 2022-12-29 15:07:43 +01:00
123456abcdef
6a0422fb27 lang: Update german translation (#851) 2022-12-29 15:07:32 +01:00
WerWolv
26898feb62 ui: Improve colors of digram and layered distribution plot 2022-12-29 15:06:23 +01:00
WerWolv
0311feee9b feat: Further improve information view 2022-12-28 23:06:49 +01:00
WerWolv
cf601586fc fix: Deadlock when loading recent files 2022-12-28 23:06:27 +01:00
WerWolv
f7b988906e fix: Saving projects to unicode paths not working correctly 2022-12-28 10:46:02 +01:00
WerWolv
5777a6d401 patterns: Updated pattern language 2022-12-27 23:26:25 +01:00
WerWolv
4807ca0057 feat: Added Digram and Layered Distribution plots to information view 2022-12-27 22:50:37 +01:00
WerWolv
f1aeec309e fix: New lines not being drawn in pattern console 2022-12-27 22:50:16 +01:00
WerWolv
4b8e275254 fix: Crash when closing providers too quickly 2022-12-27 11:35:20 +01:00
WerWolv
4b6a75fb60 feat: Added type distribution graph to information view 2022-12-25 15:45:49 +01:00
WerWolv
d463491026 ui: Fixed bookmarks displaying too many bytes in some cases 2022-12-25 10:01:39 +01:00
WerWolv
df3d5e38ce ui: Load in all extended-Ascii and control characters from unifont 2022-12-25 10:01:21 +01:00
WerWolv
4e22d636d3 fix: Yet another hex editor scrolling issue 2022-12-24 15:29:42 +01:00
WerWolv
e71841b871 fix: Crash when printing NULL bytes to the pattern console 2022-12-24 15:29:20 +01:00
WerWolv
e272c5d000 build: Updated dependencies 2022-12-24 15:28:51 +01:00
WerWolv
0d7740773e sys: Improve speed and UX of entropy graph 2022-12-23 14:34:06 +01:00
WerWolv
e4fbb1b640 pattern: Added basic line plot and image visualizer 2022-12-23 14:33:27 +01:00
WerWolv
986252d97f pattern: Make sure pattern tree doesn't randomly collapse when evaluating 2022-12-21 11:31:33 +01:00
WerWolv
e0c1fc81e3 build: Download Mesa3D from werwolv.net instead 2022-12-21 07:13:31 +01:00
WerWolv
ee94e9d619 patterns: Updated pattern language 2022-12-21 00:14:42 +01:00
WerWolv
264da1ed78 pattern: Show array entries directly if there are less than 512 2022-12-20 20:56:01 +01:00
WerWolv
ce37c795a7 patterns: Updated pattern language 2022-12-19 15:38:51 +01:00
Nik
ed2297ab7f git: Fixed build badge 2022-12-19 09:05:22 +01:00
WerWolv
ae5d8c9aad build: Updated libromfs 2022-12-19 08:52:12 +01:00
WerWolv
603ff9256c build: Actually use correct fcntl.h 2022-12-19 07:16:38 +01:00
WerWolv
a966cab155 build: Use correct fcntl.h include on Linux 2022-12-19 07:15:18 +01:00
WerWolv
978dd65528 patterns: Make editing patterns feel better 2022-12-18 23:53:53 +01:00
WerWolv
6502920047 patterns: Move pattern editing behind a double click 2022-12-18 23:11:22 +01:00
Thomas
ed97757dde build: Fix AppImage building issues (#847)
From https://github.com/AppImageCrafters/appimage-builder/pull/281
2022-12-18 16:05:14 +01:00
WerWolv
da8ec1565e fix: Floating point finding not working with negative values 2022-12-18 14:17:57 +01:00
WerWolv
ad85a4a0e3 fix: Hopefully fix the hex editor position jumping around after search 2022-12-18 13:27:28 +01:00
WerWolv
f9a7cdf4dd patterns: Improve editing of pattern values 2022-12-17 22:22:20 +01:00
WerWolv
a5296bab95 feat: Added pattern value editing 2022-12-16 11:20:39 +01:00
WerWolv
bda7a2b351 patterns: Fixed bitfield fields not caring about endianess
Fixes #837
2022-12-15 16:16:49 +01:00
WerWolv
f23351f11c sys: Try to not load unifont if graphics drivers can't handle it 2022-12-14 09:25:37 +01:00
WerWolv
e3f2541fde sys: Make sure libromfs is never used in libimhex 2022-12-05 15:29:19 +01:00
WerWolv
94723dbba3 build: Updated libromfs 2022-12-05 10:08:25 +01:00
WerWolv
6e0b92a4de sys: Added logging for which romfs is being used 2022-12-05 09:31:16 +01:00
WerWolv
13a61f5249 build: Updated libromfs 2022-12-04 22:41:30 +01:00
WerWolv
1347f81236 sys: Added postJson Net helper function 2022-12-04 21:50:47 +01:00
xtexChooser
ab93894442 lang: Update Chinese(Simplified) translations (#840) 2022-12-04 12:28:07 +01:00
5idereal
8ed6c2094b lang: Add back missing zh_TW.json (#839) 2022-12-03 10:50:35 +01:00
WerWolv
42d7f1ca67 lang: Allow langtool to update invalid translation fields 2022-12-03 10:49:26 +01:00
Thomas R
cf51e04777 tips: Add tip about unicode symbols (#838) 2022-12-02 16:30:28 +01:00
WerWolv
8398c12f74 patterns: Updated pattern language 2022-12-02 15:25:34 +01:00
WerWolv
2a345e770e git: Added HACKING file with information about how contribute to ImHex 2022-12-02 15:16:32 +01:00
WerWolv
b3fcf71982 lib: Updated libromfs 2022-12-02 12:02:23 +01:00
WerWolv
3b94a42783 lang: Updated localization system to use a more versatile json format 2022-12-02 12:00:04 +01:00
WerWolv
453ddaf0d6 patterns: Updated pattern language 2022-11-29 17:06:34 +01:00
WerWolv
d4ff36fde0 build: Updated dependencies 2022-11-29 11:06:22 +01:00
Nik
6239858d0a build: Removed leftover .idea folder 2022-11-29 11:05:05 +01:00
WerWolv
1dd873462e build: Fixed build failure when VERSION file contains extra white space 2022-11-29 09:44:47 +01:00
WerWolv
825c613d64 patterns: Fixed crash when using a void expression in a placement
Fixes #822
2022-11-25 10:58:17 +01:00
André Blome
4aa314b3ab feat: Added quick "save project" action (#826)
* add quick -save project- action

* translation for -save project as- added

* removed machine translations; header file name extension fixed

* moved openProject() for consistency
2022-11-25 10:47:11 +01:00
iTrooz_
8e696e3fc4 git: Enable LTO on Linux (#819)
* Enable LTO on Fedora .spec

* CI: Enable LTO for Ubuntu and ArchLinux

* CI: remove lld to allow LTO
2022-11-25 10:40:07 +01:00
iTrooz_
217cf799c2 sys: Warn user if a net request fails while a proxy is set (#821)
* tell the user if he have a proxy set

* Improved log message

Co-authored-by: Nik <werwolv98@gmail.com>
2022-11-25 10:39:45 +01:00
iTrooz_
b10a59661e build: Tell users patterns are being downloaded (#820)
* Tell users patterns are being downloaded

* Improved log message

Co-authored-by: Nik <werwolv98@gmail.com>
2022-11-25 10:37:31 +01:00
WerWolv
0f028db856 sys: Don't load any external plugins in debug builds
Closes #833
2022-11-25 10:28:05 +01:00
WerWolv
c194588118 fix: File Provider adding zero bytes at the end of the data when saving
Fixes #835
2022-11-25 10:02:55 +01:00
WerWolv
398dc8101f patterns: Updated pattern language 2022-11-20 00:28:05 +01:00
WerWolv
13cb330711 patterns: Updated pattern language 2022-11-19 13:49:50 +01:00
WerWolv
c0740822a3 patterns: Updated pattern language 2022-11-19 11:59:57 +01:00
WerWolv
340e627af9 patterns: Updated pattern language 2022-11-19 11:55:00 +01:00
WerWolv
3089a710bd patterns: Updated pattern language 2022-11-19 11:32:09 +01:00
WerWolv
7d0474335a fix: Crash when closing section with selected bytes 2022-11-18 16:01:18 +01:00
WerWolv
3d5190f51a fix: Patterns not appearing in list if pattern editor is not open 2022-11-18 14:27:55 +01:00
WerWolv
de2de1e1d7 patterns: Updated pattern language 2022-11-18 14:27:31 +01:00
WerWolv
91a4f52f67 build: Potentially fix LTO 2022-11-14 10:42:09 +01:00
WerWolv
c8af25533d build: Bumped version to 1.25.0 2022-11-14 10:07:21 +01:00
WerWolv
b1f76aeda6 feat: Added new view provider 2022-11-14 10:02:46 +01:00
WerWolv
3fccd03bbb fix: Black screen issues when font atlas got too big 2022-11-14 10:02:34 +01:00
WerWolv
3bcfa7e10b ux: Make the pattern language text editor always insert spaces instead of tabs 2022-11-14 09:44:10 +01:00
WerWolv
cbd7c10f3d build: Updated libromfs 2022-11-13 22:53:41 +01:00
WerWolv
0d09c24840 build: Updated libromfs 2022-11-13 22:41:29 +01:00
WerWolv
d54d371ab7 build: Updated libromfs 2022-11-13 21:34:26 +01:00
WerWolv
c90aa0a742 fix: Crash after evaluating patterns a second time 2022-11-10 11:18:14 +01:00
WerWolv
7f0bdea212 fix: Opening multiple files by dragging them onto the window 2022-11-10 11:17:21 +01:00
WerWolv
b29d184488 patterns: Updated pattern language 2022-11-09 22:26:13 +01:00
WerWolv
168d6b2080 patterns: Updated pattern language 2022-11-09 20:54:01 +01:00
WerWolv
b2c970c3bd git: Removed macOS portable build again 2022-11-09 20:52:23 +01:00
WerWolv
a0445c4f7b lang: Added missing localizations 2022-11-09 19:03:57 +01:00
WerWolv
9074a6fcf1 fix: Edit menu items being always unavailable 2022-11-09 18:49:07 +01:00
WerWolv
4c5d2f6ebb feat: Finish up work on new pl section system 2022-11-08 21:43:22 +01:00
WerWolv
23ce2ec271 ui: Fixed some more macOS scaling issues 2022-11-08 18:09:48 +01:00
WerWolv
5bbc2fd94c feat: Added basic UI for the new pl section system 2022-11-07 00:04:47 +01:00
WerWolv
901b8f0424 sys: Refactored hex editor into its own reusable component 2022-11-06 12:19:12 +01:00
WerWolv
d2705988ac ui: Potentially fix weird scaling on macOS 2022-11-05 21:49:17 +01:00
WerWolv
291da649c1 ui: Limit window title length 2022-11-04 15:19:24 +01:00
WerWolv
48e9d3b4e9 patterns: Updated pattern language 2022-11-04 10:12:26 +01:00
WerWolv
45e2578c5b patterns: Updated pattern language 2022-11-04 09:50:26 +01:00
WerWolv
a6742de405 sys: Literally, fuck Valve 2022-11-02 08:24:00 +01:00
iTrooz_
948b5b2d9c ux: Change "Esc" key behavior on hex editor popups (#810)
* set same behaviour for PopupGoto and PopupFind

* Force close the popup when user is editing an input
2022-11-01 09:33:11 +01:00
iTrooz_
6cb9714f06 git: Automatically label created issues (#811) 2022-11-01 09:31:46 +01:00
Asvel
c35eaa7a4d fix: Pattern auto-loading issue on Windows (#808) 2022-10-30 13:39:40 +01:00
iTrooz_
bececff9e5 feat: Ask the users if they want to check for updates (#803)
* ask the users for updates

* Only treat 1 as enabled

* Fix formatting

* update locales

* comment to document value
2022-10-29 23:43:40 +02:00
iTrooz_
2826e6f325 git: Updated issue templates (#807)
* add "Additional context" option for feature request

* use placeholder instead of value

* Ask for installation type in bug reports
2022-10-29 20:38:22 +02:00
5idereal
6bc1f94b60 lang: Update zh_TW translation (#805) 2022-10-28 14:58:45 +02:00
WerWolv
9fd37221f6 fix: Static tooltips not rendering correctly 2022-10-28 14:33:26 +02:00
WerWolv
db3072630a feat: Allow multiple yara rules to be applied after each otherr 2022-10-28 14:32:56 +02:00
WerWolv
5cf6baca88 fix: Yara matching not being interruptable 2022-10-28 14:32:28 +02:00
WerWolv
582858c0d4 git: Download all artifacts to their own folders 2022-10-28 10:55:06 +02:00
WerWolv
7d56c64a9c git: Download only necessary artifacts in steam deploy job 2022-10-28 10:29:40 +02:00
WerWolv
902b35e189 git: Fix downloading artifacts in steam deploy job 2022-10-28 10:02:38 +02:00
WerWolv
5f6050aaec git: Fixed more build issues 2022-10-28 09:38:03 +02:00
WerWolv
cb94213a04 git: Fix some more steam deploy issues 2022-10-28 09:17:04 +02:00
WerWolv
fa6580f622 git: Move steam deploy to its own workflow 2022-10-28 09:14:01 +02:00
Frieder Bluemle
07effffa5e git: Fix various issues in the INSTALL guide (#800) 2022-10-28 08:17:10 +02:00
WerWolv
e15bcb51aa git: Fix setting of version env var on Windows 2022-10-27 14:12:46 +02:00
WerWolv
a04e2bc8f6 res: Update steam assets 2022-10-27 14:11:31 +02:00
WerWolv
6aad609a48 git: Fix more issues with the Steam Deployment 2022-10-27 14:05:06 +02:00
iTrooz_
24c0cc10a1 sys: Load Tips from a local file instead of querying an API (#797)
* store tips locally

* C++ random implementation

* show one different tip per day

* fix json conversion to string

* put tips.json in builtin romfs
2022-10-27 13:21:54 +02:00
Nik
e567061e3c git: Added automatic pushing of nightlies to Steam (#801)
* build: Upload nightly releases to steam

* git: Fixed build CI syntax

* git: Try fixing steam login

* git: Try steam TOTP login

* git: Fix steam-deploy branch

* git: Don't upload MacOS No-GPU version to Steam

* git: Added commit hash to steam nightlies, only upload on our repo

* git: Use full commit hash in steam nightly description

* git: Fixed workflow

* git: Make sure macOS doesn't upload steam releases when it shouldn't

* git: Fix macos CI again

* git: Use steam-deploy fork to fix Linux deployment
2022-10-27 13:19:06 +02:00
iTrooz_
32ab1c1a06 sys: Load content store content when it's first opened (#795)
* refresh store on open

* show the user if the request failed

* do not refresh if a refresh is in progress

This makes ImHex crash

* InProgress

* fix formatting

* use a localized message

* set localized message in other langs
2022-10-27 13:12:24 +02:00
iTrooz_
e76d5854b8 ux: Add a setting to disable loading of unicode characters (#798)
* Add setting to disable loading of unicode characters

* change message

* set message in other langs

* fix formatting
2022-10-27 13:11:09 +02:00
WerWolv
d3b6c2d0e6 nodes: Added a few new nodes 2022-10-26 09:07:09 +02:00
WerWolv
ef6cac6e92 patterns: Make more pattern editor things per-provider 2022-10-26 08:54:43 +02:00
WerWolv
0c5e72ab6a nodes: Improve precision of values passed between nodes 2022-10-26 08:54:08 +02:00
WerWolv
f67c9735c5 patterns: Fixed memory leak 2022-10-22 23:17:38 +02:00
WerWolv
858e1aed3b nodes: Fixed a few issues with locatizations, errors and overlays 2022-10-22 23:17:18 +02:00
WerWolv
3b7f2fbdaa pattern: Display evaluation time when pattern finished running 2022-10-22 15:47:50 +02:00
WerWolv
2c167d6d27 fix: Crash when scrolling to the end of a file that is multiples of 8 bytes long 2022-10-22 15:46:03 +02:00
WerWolv
f53d7fc9f3 fix: Format string syntax error 2022-10-22 13:46:48 +02:00
WerWolv
04a4957ccf fix: Null and MemFile providers dumping null into recent files 2022-10-22 09:08:18 +02:00
WerWolv
b5f7be2384 fix: Editing hex editor cells not working on some systems 2022-10-22 09:07:47 +02:00
WerWolv
33a0ee37fa build: Update ImHex-Rust-Plugin-Template on release 2022-10-21 14:59:43 +02:00
WerWolv
1eb9858f62 sys: Moved libimhex-rust out of project 2022-10-21 14:55:01 +02:00
WerWolv
b829abf56c fix: Paste all shortcut tooltip being wrong 2022-10-21 13:36:19 +02:00
WerWolv
139a379a09 feat: Added Paste all option to paste and resize file without checks
Closes #791
2022-10-21 12:14:35 +02:00
WerWolv
6a8611d98d ux: Make New File command create a new file in memory
Closes #792
2022-10-21 12:01:28 +02:00
WerWolv
241b93aab5 patterns: Added menu to Edit menu for placing types at current selection 2022-10-21 10:03:37 +02:00
WerWolv
6d08a4386d patterns: Updated pattern language 2022-10-20 22:45:46 +02:00
WerWolv
37b4d5e7b5 patterns: Updated pattern language 2022-10-20 09:48:06 +02:00
iTrooz_
f3b0971d00 sys: Improve various error messages (#789)
* Tell the user the net request which failed

* Show signal name

* Print execution time of startup tasks

* replace NULL with nullptr

* change wording for task logs

* Remove '..' from task name

* remove using namespace chrono
2022-10-20 08:28:29 +02:00
WerWolv
05e8e53451 patterns: Updated pattern language 2022-10-17 13:29:43 +02:00
iTrooz_
08251eeab7 feat: Add Ctrl+Shift+Z Redo shortcut (#787) 2022-10-17 13:28:05 +02:00
WerWolv
8c96ba1c58 patterns: Updated pattern language 2022-10-16 22:04:30 +02:00
WerWolv
e170c45556 patterns: Updated pattern language 2022-10-16 16:24:24 +02:00
iTrooz_
a537fe90a0 build: Added make uninstall (#784) 2022-10-14 15:35:45 +02:00
WerWolv
802ad96c49 patterns: Updated pattern language
Fixes #783
2022-10-13 22:11:01 +02:00
WerWolv
5d979da3e2 fix: Modified bytes on pages after the first one always displaying 0x00
Fixed #782
2022-10-13 21:23:26 +02:00
WerWolv
b843d8e98a build: Added steam resources 2022-10-13 15:15:06 +02:00
WerWolv
af6ad96cb6 fix: Detached tool windows not resizing correctly 2022-10-13 15:14:51 +02:00
WerWolv
f9e960070d nodes: Require shift to be held to enlarge visualizers 2022-10-13 15:14:16 +02:00
WerWolv
1ab949b7ef nodes: Added RGBA8 image visualizer 2022-10-13 15:13:53 +02:00
WerWolv
8b39c8f219 feat: Make all tool windows be detachable 2022-10-13 10:47:38 +02:00
iTrooz_
14b28ba899 ui: Show non existing folders in red in about view (#781)
* show non existing folders in red in about view

* use ImGuiCustomCol_ToolbarRed for theming

* Fix compilation problem for Ubuntu
2022-10-13 08:07:46 +02:00
WerWolv
dd9b6643e6 fix: Crash when loading a provider after evaluating patterns 2022-10-12 14:50:09 +02:00
WerWolv
e3f88395ec fix: Hidden attribute not applying to top-level patterns 2022-10-12 14:49:48 +02:00
WerWolv
72ee1d186e build: Bumped version to 1.24.3 2022-10-12 12:48:50 +02:00
WerWolv
ee53eca19f patterns: Updated pattern language 2022-10-12 12:25:22 +02:00
WerWolv
7331b8d5ae node: Limit width of out variable access node 2022-10-12 12:24:54 +02:00
WerWolv
d17911d753 fix: Invalid axis labels in data information view 2022-10-12 12:24:11 +02:00
WerWolv
b41d01f126 lang: Added localization for new nodes 2022-10-12 12:18:27 +02:00
WerWolv
27fc3fd659 nodes: Added out variable access node 2022-10-12 12:18:18 +02:00
WerWolv
cc9dc90655 nodes: Added Float <-> Buffer casting nodes 2022-10-12 12:09:51 +02:00
WerWolv
015266181e fix: Various issue with the hex editor editing mode 2022-10-12 10:56:03 +02:00
WerWolv
299933c4f7 feat: Allow ASCII cells in Hex editor to be edited 2022-10-11 20:18:45 +02:00
WerWolv
5312d6f9fa fix: Data inspector still displaying entries with no selection 2022-10-11 20:18:16 +02:00
WerWolv
16eb7b3dbd ui: Fixed hex editor highlighting sometimes having gaps 2022-10-11 15:06:33 +02:00
WerWolv
cb9458dab4 patterns: Updated pattern language 2022-10-11 14:15:22 +02:00
WerWolv
e32a85a33f patterns: Updated pattern language 2022-10-11 09:00:07 +02:00
WerWolv
e4680fb0a2 fix: 64-Bit hex data visualizer only displaying 32 bit 2022-10-11 09:00:00 +02:00
WerWolv
1c52e0018a fix: Prevent same pl runtime from running simultaneously when loading provider 2022-10-10 23:16:54 +02:00
WerWolv
ee2838bada build: Bumped version to 1.24.2 2022-10-10 20:52:48 +02:00
iTrooz_
4d17265e90 git: Use action to manage ccache + minor fixes (#775)
* use action for ccache + limit cache size

* remove 'prepare cache' step for Windows

* remove libpython from CI

* fix the restore key for MacOS

* remove Rust from CI

* do not pin appimage-builder version since issue with it has been resolved

* use ccache action for CodeQL

* Rebased onto latest master

Co-authored-by: WerWolv <werwolv98@gmail.com>
2022-10-10 20:37:00 +02:00
WerWolv
6a6b860622 patterns: Updated pattern language 2022-10-10 20:33:43 +02:00
WerWolv
e78c452daf fix: Hex editor selection not showing rendering properly 2022-10-10 20:33:34 +02:00
WerWolv
86e33a1ee9 build: Bumped version to 1.24.1 2022-10-10 19:11:30 +02:00
WerWolv
37850ad85a patterns: Updated pattern language 2022-10-10 18:15:11 +02:00
WerWolv
daca49658e ui: Fix highlighting of separator column in hex editor
Fixes #776
2022-10-10 17:26:05 +02:00
WerWolv
6975d7e2cd patterns: Updated pattern language 2022-10-10 16:09:50 +02:00
WerWolv
5b8bed6083 patterns: Updated pattern language 2022-10-10 14:42:13 +02:00
WerWolv
7474aa3e5d fix: New lines in wide string messing up data inspector drawing 2022-10-10 14:41:24 +02:00
WerWolv
c6d2d51d4c ui: Make sure sealed patterns get highlighted properly when selected 2022-10-10 14:40:49 +02:00
WerWolv
9055105627 fix: Evaluator not exiting evaluating state correctly on error 2022-10-09 17:31:06 +02:00
WerWolv
a44de63e24 fix: Build failing on Linux 2022-10-09 16:34:53 +02:00
WerWolv
8fc7931132 patterns: Updated pattern language 2022-10-09 15:56:41 +02:00
WerWolv
4070833229 ui: Highlight selected patterns in pattern data view 2022-10-09 15:56:26 +02:00
WerWolv
3a9c3f939e sys: Properly center hex view around selection when jumping 2022-10-09 14:47:38 +02:00
WerWolv
aa42fb5076 patterns: Updated pattern language 2022-10-08 16:28:49 +02:00
WerWolv
50158a7977 sys: Fixed hex editor scrolling issues 2022-10-08 16:23:15 +02:00
WerWolv
f2ded359d8 build: Bumped version to 1.24.0 2022-10-08 10:03:47 +02:00
WerWolv
0e358bbefe patterns: Updated pattern language 2022-10-08 10:00:57 +02:00
WerWolv
2cea561468 ui: Make sure modified bytes are correctly highlighted 2022-10-08 10:00:37 +02:00
WerWolv
8024b0a186 sys: Improve drag scrolling behaviour in hex editor view 2022-10-07 22:13:25 +02:00
WerWolv
2b135cf7e0 ui: Limit maximum length of data displayed in pattern tooltip 2022-10-07 16:27:29 +02:00
WerWolv
ce8c64a679 ui: Make sure ASCII cell content in hex editor is always centered 2022-10-07 16:18:09 +02:00
WerWolv
f0da6ec82f fix: Crash on exit when ImHex is launched through the terminal 2022-10-07 15:35:26 +02:00
WerWolv
46e3b9b5d6 build: Fixed macOS build instructions 2022-10-07 13:20:29 +02:00
WerWolv
d5a08ae568 patterns: Updated pattern language 2022-10-07 13:17:47 +02:00
WerWolv
11f63f9b02 ui: Added optional byte cell and char cell padding
Closes #771
2022-10-07 11:28:44 +02:00
WerWolv
5694eaba8c feat: Added palette to bookmark color picker
#771
2022-10-07 10:53:08 +02:00
WerWolv
484481f886 fix: Opening files with unicode names through the command line 2022-10-07 10:14:24 +02:00
WerWolv
210106901e sys: Added setting to disable multi-window support 2022-10-06 21:26:24 +02:00
WerWolv
eb247b8607 patterns: Updated pattern language 2022-10-06 21:09:58 +02:00
WerWolv
fb1453d98a lang: Fixed some language strings 2022-10-06 16:55:42 +02:00
WerWolv
b734fb5511 build: Delete system capstone in macOS CI 2022-10-06 15:22:38 +02:00
WerWolv
2cd6cb8814 patterns: Updated pattern language 2022-10-06 14:11:03 +02:00
WerWolv
2a93eab14c ui: Make sure pattern data view doesn't flicker when executing pattern 2022-10-06 13:24:22 +02:00
WerWolv
f039ea68d0 fix: Potential crashes when pasting with no clipboard content 2022-10-06 09:35:18 +02:00
WerWolv
e0c35e0002 fix: Data processor nodes not remembering their positions correctly 2022-10-06 09:14:46 +02:00
WerWolv
5ace199dc4 fix: Foreground tasks not being cancellable 2022-10-05 21:25:52 +02:00
WerWolv
556895744b build: Disable more bogus stringop warnings 2022-10-05 15:09:41 +02:00
WerWolv
7f2c60b0d7 fix: Race condition with data inspector 2022-10-05 12:02:40 +02:00
WerWolv
7bb9e7ee82 sys: Replaced awful task system with a much more efficient thread pool 2022-10-04 23:37:48 +02:00
WerWolv
26be4c3ac8 patterns: Updated pattern language 2022-10-04 23:37:25 +02:00
WerWolv
b80517ab15 sys: Improved UTF-8 path handling in various places
Fixes #768
2022-10-04 09:10:58 +02:00
WerWolv
b17cd3696c fix: Handling of exceptions that are not being caught 2022-10-03 10:36:19 +02:00
WerWolv
accd554600 sys: Reduce compile time on Windows a bit 2022-10-02 20:35:38 +02:00
WerWolv
8bf586cfa9 patterns: Fixed bitfield order not resetting correctly
Fixes #756
2022-10-02 19:20:35 +02:00
VocalFan
ebea409e6a build: Fix deprecated MAINTAINER flag in DockerFile (#767) 2022-10-02 17:53:37 +02:00
Nik
6fdba3d555 build: Remove terrible clang-format files (#766) 2022-10-02 17:35:02 +02:00
Nik
e865883611 git: Remove msi signing again since Microsoft doesn't care at all (#765) 2022-10-02 17:31:40 +02:00
Nik
9c484e7b57 fix: Various clang / clang-tidy warnings (#764) 2022-10-02 17:30:26 +02:00
WerWolv
b365e16cc9 fix: Multiple issues with the calculator 2022-10-02 14:18:56 +02:00
WerWolv
6a07a2f85d feat: Look for custom inspector entries in imhex/scripts/inspectors 2022-10-02 14:18:40 +02:00
xtexChooser
0fd7461266 lang: Updated Chinese(Simplified) translations (#762) 2022-10-02 11:32:06 +02:00
Marcelo Conceição
62eb0ccd1d fix: Bad optional access when inspectors.hexpat is missing (#761) 2022-10-02 10:28:37 +02:00
WerWolv
3367237da3 feat: Added very primitive support for adding custom data inspector entries 2022-10-01 23:16:55 +02:00
WerWolv
3504987ab3 sys: Fix OpenGL clear color 2022-10-01 21:14:49 +02:00
Aniruddha Deb
554e625bda build: Make local includes take priority over system includes (#759) 2022-10-01 11:02:59 +02:00
WerWolv
84530e0817 patterns: Added demangle function 2022-09-30 12:49:49 +02:00
WerWolv
663fb88367 sys: Various cleanup 2022-09-30 12:49:28 +02:00
WerWolv
4d99c4b59d patterns: Updated pattern language 2022-09-30 12:45:43 +02:00
WerWolv
12ee235380 fix: Hardcoded colors used in ASCII table
Fixes #757
2022-09-29 20:46:50 +02:00
WerWolv
e30ed35d69 build: Make sure windows plugin romfs folder sticks around 2022-09-29 10:57:02 +02:00
WerWolv
e2f8c7d989 build: Enable PIC for romfs libraries 2022-09-29 10:47:34 +02:00
WerWolv
ca6a8a7a46 sys: Move resources into their relevant subprojects 2022-09-29 10:33:39 +02:00
WerWolv
f52dae4297 feat: Added Edit -> Jump to option to jump to selected address 2022-09-28 22:36:43 +02:00
WerWolv
d643f8f8f7 feat: Allow bookmarks to be reordered
Closes #750
2022-09-28 21:40:31 +02:00
WerWolv
08a12dd2b0 fix: Crash when dragging the mouse onto the hex view 2022-09-28 21:39:46 +02:00
WerWolv
b33dd5d4f5 lang: Added localization for float 16 visualizer 2022-09-28 18:33:11 +02:00
WerWolv
e797ac3a57 feat: Added Float16 data visualizer
Closes #749
2022-09-28 18:30:41 +02:00
WerWolv
8bd31f6375 fix: Crash when hex editor visualizer size is not divisible by row count 2022-09-28 18:29:56 +02:00
WerWolv
d3f83e63c9 build: Properly install llvm dependency on macOS 2022-09-28 16:21:17 +02:00
WerWolv
b450f4797e feat: Added wide string to data inspector 2022-09-28 16:10:40 +02:00
WerWolv
0552084673 patterns: Updated pattern language 2022-09-28 15:41:57 +02:00
WerWolv
d021e2b362 fix: Make sure correct close function gets called 2022-09-28 15:02:55 +02:00
WerWolv
c769e9cc32 ui: Highlight modified bytes in red 2022-09-28 15:01:43 +02:00
WerWolv
639390115b sys: Allow file inspector to read bytes over the page boundary
Fixes #751
2022-09-26 11:53:29 +02:00
WerWolv
ceaf80a186 sys: Don't keep files open in File Provider
Closes #752
2022-09-26 11:49:35 +02:00
WerWolv
86274b8b94 patterns: Updated pattern language 2022-09-23 21:33:55 +02:00
WerWolv
669427eb24 patterns: Updated pattern language 2022-09-23 21:20:52 +02:00
WerWolv
5ba22e7554 patterns: Updated pattern language 2022-09-23 20:50:55 +02:00
WerWolv
65ad88eed9 patterns: Updated pattern language 2022-09-22 09:05:32 +02:00
WerWolv
e34703ea5a fix: Saving and loading projects not working correctly 2022-09-22 09:05:09 +02:00
WerWolv
55bd2c6da6 git: Add code signing for Windows installer 2022-09-21 21:24:47 +02:00
WerWolv
96b5221c1d patterns: Updated pattern language 2022-09-21 11:55:47 +02:00
iTrooz_
3a94be9abb ux: Display an error message if file picker can't be opened (#748)
* add error message for the file picker

* set a different message for Windows/MacOS

* fix typos

* Moved file dialog error handling to a callback function

Co-authored-by: Nik <werwolv98@gmail.com>
2022-09-20 15:47:59 +02:00
WerWolv
9656b40d53 fix: Clearing custom font path not updating setting correctly 2022-09-20 15:47:28 +02:00
WerWolv
7e61b513f3 patterns: Fixed highlighting of arrays of arrays 2022-09-20 15:42:07 +02:00
WerWolv
1d4cbbe418 ux: Handle project loading errors better 2022-09-20 15:33:36 +02:00
WerWolv
e0e2996e25 fix: Custom fonts not being loaded 2022-09-20 14:09:41 +02:00
WerWolv
a102f5fcbf sys: Updated a bunch of dependencies 2022-09-19 23:21:59 +02:00
WerWolv
4e5d56e2c0 fix: Files opened by the file provider appearing locked for other applications 2022-09-19 23:07:44 +02:00
WerWolv
a55177edfa fix: Curl SSL context not being thread safe in the slightest 2022-09-19 21:56:43 +02:00
WerWolv
4c01a749de sys: Improved startup time by running startup tasks in parallel 2022-09-19 16:54:19 +02:00
WerWolv
7b61268f22 ux: Reduce file loading time to basically zero 2022-09-19 16:09:22 +02:00
WerWolv
b11dbe4fe1 fix: Build failing on macOS 2022-09-19 15:26:25 +02:00
WerWolv
6dbff81f95 ui: Added chunk type information to pattern data view 2022-09-19 14:21:36 +02:00
WerWolv
9893e7a965 ui: Display array patterns in pattern data view in chunks of 512 entries 2022-09-19 14:16:23 +02:00
WerWolv
814c595c12 ui: Added functionality icons to most text input fields 2022-09-19 11:29:51 +02:00
WerWolv
f8b4d04713 feat: Added numeric value search to find view 2022-09-19 10:34:57 +02:00
WerWolv
3cdc8c5884 fix: OpenGL textures not being cleaned up correctly 2022-09-18 20:38:45 +02:00
suetake
5eabc05396 git: Fix broken link in install guide (#744) 2022-09-18 16:26:44 +02:00
WerWolv
b2932773b9 feat: Added unique selection and scrolling position to each provider 2022-09-18 16:22:08 +02:00
WerWolv
59a04e6dbf fix: Copy-As python array having a semicolon at the end 2022-09-18 15:05:56 +02:00
Nik
ddf1e8a179 git: Embed font into banner logo 2022-09-17 17:23:49 +02:00
WerWolv
17cc87d633 git: Make sure readme logo has the same font everywhere 2022-09-17 16:43:06 +02:00
WerWolv
fd7beb642f build: Bumped version to 1.23.2 2022-09-17 15:49:19 +02:00
WerWolv
b766cf0807 patterns: Updated pattern language 2022-09-17 15:48:12 +02:00
Nik
6c9469961b git: Added flatpak link to install guide 2022-09-17 13:35:54 +02:00
WerWolv
d8844236d0 git: Added install guide file, cleaned up readme 2022-09-17 10:38:02 +02:00
1178 changed files with 341426 additions and 216036 deletions

View File

@@ -1,178 +0,0 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignArrayOfStructures: Left
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: false
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: AfterComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: true
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentExternBlock: Indent
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
PPIndentWidth: 4
ReferenceAlignment: Pointer
ReflowComments: true
ShortNamespaceLines: 5
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 4
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...

69
.clang-tidy Normal file
View File

@@ -0,0 +1,69 @@
# Generated from CLion Inspection settings
---
Checks: '-*,
mpi-*,
bugprone-*,
-bugprone-signal-handler,
-bugprone-narrowing-conversions,
-bugprone-redundant-branch-condition,
-bugprone-exception-escape,
-bugprone-shared-ptr-array-mismatch,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-signed-char-misuse,
-bugprone-unhandled-exception-at-new,
-bugprone-infinite-loop,
-bugprone-easily-swappable-parameters,
cert-err52-cpp,
cert-err60-cpp,
cert-err34-c,
cert-str34-c,
cert-dcl21-cpp,
cert-msc50-cpp,
cert-msc51-cpp,
cert-dcl58-cpp,
cert-flp30-c,
cppcoreguidelines-avoid-const-or-ref-data-members,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-slicing,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-narrowing-conversions,
google-default-arguments,
google-runtime-operator,
google-explicit-constructor,
hicpp-multiway-paths-covered,
hicpp-exception-baseclass,
misc-*,
-misc-definitions-in-headers,
-misc-unused-parameters,
-misc-unused-alias-decls,
-misc-use-anonymous-namespace,
-misc-misleading-identifier,
-misc-confusable-identifiers,
-misc-misleading-bidirectional,
-misc-static-assert,
-misc-no-recursion,
-misc-const-correctness,
modernize-*,
-modernize-use-trailing-return-type,
openmp-use-default-none,
performance-*,
-performance-no-int-to-ptr,
portability-*,
-portability-restrict-system-includes,
readability-*,
-readability-redundant-preprocessor,
-readability-named-parameter,
-readability-function-size,
-readability-use-anyofallof,
-readability-identifier-length,
-readability-magic-numbers,
-readability-braces-around-statements,
-readability-suspicious-call-argument,
-readability-isolate-declaration,
-readability-else-after-return,
-readability-redundant-access-specifiers,
-readability-function-cognitive-complexity,
-readability-identifier-naming,
*-include-cleaner,
-readability-qualified-auto'

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
cmake-build-*/
build*/
local/
**/Dockerfile

16
.gdbinit Normal file
View File

@@ -0,0 +1,16 @@
# Skip all std:: and __gnu_debug:: symbols
skip -rfu ^std::
skip -rfu ^__gnu_debug::
# Skip all ImGui:: symbols
skip -rfu ^ImGui::
# Trigger breakpoint when execution reaches triggerSafeShutdown()
break triggerSafeShutdown
# Print backtrace after execution jumped to an invalid address
define fixbt
set $pc = *(void **)$rsp
set $rsp = $rsp + 8
bt
end

5
.gitattributes vendored
View File

@@ -1,3 +1,4 @@
lib/external/** linguist-vendored
lib/libimhex-rs/imgui-rs/** linguist-vendored
lib/libimhex-rs/imgui-sys/** linguist-vendored
dist/*.sh eol=lf
dist/**/*Dockerfile eol=lf

View File

@@ -1,6 +1,7 @@
name: Bug Report
description: Something doesn't work correctly in ImHex.
title: "[Bug] "
labels: bug
body:
- type: dropdown
id: os
@@ -39,10 +40,17 @@ body:
label: ImHex Build Type
options:
- label: Nightly or built from sources
- type: input
attributes:
label: Installation type
description: |
How did you install ImHex ? MSI/Portable/DMG/AppImage/Fedora package/etc..
validations:
required: true
- type: textarea
attributes:
label: Additional context?
value: |
placeholder: |
- Additional information about your environment.
- If possible and useful, please upload the binary you've been editing when the bug occurred.
validations:

View File

@@ -1,6 +1,7 @@
name: Feature Request
description: Something you'd like to see added to ImHex in the future
title: "[Feature] "
labels: feature request
body:
- type: textarea
attributes:
@@ -20,3 +21,6 @@ body:
label: Request Type
options:
- label: I can provide a PoC for this feature or am willing to work on it myself and submit a PR
- type: textarea
attributes:
label: Additional context?

18
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,18 @@
<!--
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 -->

5
.github/codecov.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
comment: false
ignore:
- "lib/third_party" # Third party libraries should be ignored
- "lib/external" # Our own libraries should be checked in their own repositories
- "tests" # https://about.codecov.io/blog/should-i-include-test-files-in-code-coverage-calculations/

View File

@@ -8,7 +8,7 @@ on:
jobs:
codeql:
name: 🐛 CodeQL
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
@@ -16,7 +16,7 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
@@ -25,21 +25,20 @@ jobs:
with:
languages: 'cpp'
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
path: |
~/.cache/ccache
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
key: ${{ runner.os }}-analysis-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-analysis-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
build/CMakeCache.txt
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
key: ${{ runner.os }}-analysis-build-${{ hashFiles('**/CMakeLists.txt') }}
- name: ⬇️ Install dependencies
run: |
sudo apt update
@@ -47,9 +46,10 @@ jobs:
- name: 🛠️ Build
run: |
set -x
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
CC=gcc-14 CXX=g++-14 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
@@ -57,8 +57,9 @@ jobs:
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
-G Ninja \
..
make -j 4 install
ninja install
- name: 🗯️ Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

File diff suppressed because it is too large Load Diff

View File

@@ -9,19 +9,73 @@ on:
workflow_dispatch:
jobs:
release-common:
runs-on: ubuntu-latest
name: Release Common
release-update-repos:
runs-on: ubuntu-24.04
name: Release Update Repos
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ImHex
- name: 📜 Verify version and set version variable
run: |
set -x
project_version=`cat ImHex/VERSION`
tag_version="${{github.event.release.tag_name}}"
tag_version="${tag_version:1}"
if [ "$project_version" != "$tag_version" ]; then
echo "::warning::$project_version and $tag_version are not the same ! Refusing to populate release"
exit 1
fi
echo "IMHEX_VERSION=$project_version" >> $GITHUB_ENV
- name: 🎫 Create PatternLanguage release
uses: ncipollo/release-action@v1
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
tag: ImHex-v${{ env.IMHEX_VERSION }}
repo: PatternLanguage
token: ${{ secrets.RELEASE_TOKEN }}
- name: 🎫 Create ImHex-Patterns release
uses: ncipollo/release-action@v1
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
tag: ImHex-v${{ env.IMHEX_VERSION }}
repo: ImHex-Patterns
token: ${{ secrets.RELEASE_TOKEN }}
- name: 🎫 Create imhex-download-sdk release
uses: ncipollo/release-action@v1
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
tag: v${{ env.IMHEX_VERSION }}
repo: imhex-download-sdk
token: ${{ secrets.RELEASE_TOKEN }}
release-upload-artifacts:
runs-on: ubuntu-24.04
name: Release Upload Artifacts
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
path: ImHex
submodules: recursive
- name: 📜 Verify version and set version variable
run: |
set -x
project_version=`cat ImHex/VERSION`
tag_version="${{github.event.release.tag_name}}"
tag_version="${tag_version:1}"
@@ -34,18 +88,19 @@ jobs:
- name: 🗜️ Create tarball from sources with dependencies
run: tar --exclude-vcs -czvf Full.Sources.tar.gz ImHex
- name: ⬇️ Download artifacts from latest workflow
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: build.yml
branch: ${{ github.event.release.target_commitish }}
workflow_conclusion: success
skip_unpack: true
- name: 🗜️ Unzip files when needed
run: |
run: |
set -x
for zipfile in ./*.zip
do
if [ `zipinfo -1 "$zipfile" | wc -l` -eq 1 ];
@@ -60,26 +115,28 @@ jobs:
- name: 🟩 Rename artifacts when needed
run: |
mv "Windows Portable.zip" imhex-${{env.IMHEX_VERSION}}-Windows-Portable.zip
mv "Windows Portable NoGPU.zip" imhex-${{env.IMHEX_VERSION}}-Windows-Portable-NoGPU.zip
mv "Windows Portable x86_64.zip" imhex-${{ env.IMHEX_VERSION }}-Windows-Portable-x86_64.zip
mv "Windows Portable NoGPU x86_64.zip" imhex-${{ env.IMHEX_VERSION }}-Windows-Portable-NoGPU-x86_64.zip
mv "ImHex Web.zip" imhex-${{ env.IMHEX_VERSION }}-Web.zip
rm artifact.tar
- name: ⬆️ Upload everything to release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
with:
files: '*'
- name: ✒️ Prepare PKGBUILD
run: |
set -x
cp ImHex/dist/Arch/PKGBUILD .
hash=`md5sum imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst | cut -d ' ' -f 1`
hash=`md5sum imhex-${{ env.IMHEX_VERSION }}-ArchLinux-x86_64.pkg.tar.zst | cut -d ' ' -f 1`
sed -i 's/%version%/${{env.IMHEX_VERSION}}/g' PKGBUILD
sed -i 's/%version%/${{ env.IMHEX_VERSION }}/g' PKGBUILD
sed -i "s/(SKIP)/($hash)/g" PKGBUILD
- name: ⬆️ Publish AUR package
# I couldn't make the condition in the env directly for some reason
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
if: "${{ env.AUR_SSH_PRIVATE_KEY != '' }}"
@@ -91,49 +148,18 @@ jobs:
commit_username: iTrooz
commit_email: itrooz@protonmail.com
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Bump to version ${{env.IMHEX_VERSION}}
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
commit_message: Bump to version ${{ env.IMHEX_VERSION }}
ssh_keyscan_types: rsa,ecdsa,ed25519
- name: 🎫 Create PatternLanguage release
uses: ncipollo/release-action@v1
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
tag: ImHex-v${{env.IMHEX_VERSION}}
repo: PatternLanguage
token: ${{ secrets.RELEASE_TOKEN }}
- name: 🎫 Create ImHex-Patterns release
uses: ncipollo/release-action@v1
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
tag: ImHex-v${{env.IMHEX_VERSION}}
repo: ImHex-Patterns
token: ${{ secrets.RELEASE_TOKEN }}
- name: ✉️ Update C++ Plugin Template
uses: mvasigh/dispatch-action@main
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: "${{ env.RELEASE_TOKEN != '' }}"
with:
token: ${{ secrets.RELEASE_TOKEN }}
repo: ImHex-Cpp-Plugin-Template
owner: WerWolv
event_type: update_submodule
release-windows:
name: Release Windows
needs: release-common
runs-on: windows-2022
release-update-winget:
name: Release update winget package
needs: release-upload-artifacts
runs-on: windows-latest
steps:
- name: ⬇️ Download dependencies
shell: pwsh
run: |
iwr https://github.com/microsoft/winget-create/releases/download/v1.1.2.0/wingetcreate.exe -OutFile wingetcreate.exe
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
- name: ⬆️ Update winget manifest
shell: pwsh
env:
@@ -142,7 +168,7 @@ jobs:
run: |
$tagname = $env:GITHUB_REF.Replace("refs/tags/", "")
$version = $tagname.Replace("v", "")
$url = "https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-win64.msi"
$url = "https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-Windows-x86_64.msi"
.\wingetcreate.exe update WerWolv.ImHex -u $url --version $version
if ($version -notmatch "-") {
.\wingetcreate.exe submit .\manifests\w\WerWolv\ImHex\${version}\ --token $env:WINGET_GITHUB_TOKEN

30
.github/workflows/stale_issues.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * 0"
workflow_dispatch:
jobs:
close-issues:
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
operations-per-run: '200'
ascending: true
days-before-issue-stale: 334
days-before-issue-close: 30
stale-issue-label: "stale"
stale-issue-message: |
This issue is marked stale as it has been open for 11 months without activity.
Please try the latest ImHex version. (Avaiable here: https://imhex.download/ for release and https://imhex.download/#nightly for development version)
If the issue persists on the latest version, please make a comment on this issue again
Without response, this issue will be closed in one month.
close-issue-message: ""
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,15 +2,21 @@ name: "Unit Tests"
on:
push:
branches: [ master ]
branches:
- 'master'
- 'releases/**'
- 'tests/**'
- 'feature/**'
pull_request:
branches: [ master ]
branches:
- 'master'
- 'releases/**'
workflow_dispatch:
jobs:
tests:
name: 🧪 Unit Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
@@ -18,26 +24,17 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
path: |
~/.cache/ccache
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
key: ${{ runner.os }}-tests-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-tests-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:
path: |
build/CMakeCache.txt
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
- name: ⬇️ Install dependencies
run: |
sudo apt update
@@ -45,20 +42,63 @@ jobs:
- name: 🛠️ Build
run: |
set -x
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all" \
-DIMHEX_OFFLINE_BUILD=ON \
CC=gcc-14 CXX=g++-14 cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DIMHEX_ENABLE_UNIT_TESTS=ON \
-DIMHEX_ENABLE_PLUGIN_TESTS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all --coverage" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all --coverage" \
-DIMHEX_OFFLINE_BUILD=ON \
-G Ninja \
..
make -j4 unit_tests install
ninja unit_tests
ninja imhex_all
- name: 🧪 Perform plcli Integration Tests
run: |
cd lib/external/pattern_language
python tests/integration/integration.py ../../../build/imhex --pl
- name: 🧪 Perform Unit Tests
run: |
cd build
ctest --output-on-failure
# Generate report from all gcov .gcda files
#- name: 🧪 Generate coverage report
# run: |
# sudo apt install python3-pip python3-venv
# python3 -m venv venv
# . venv/bin/activate
# pip3 install gcovr
# cd build
# gcovr --gcov-executable /usr/bin/gcov-14 --exclude '.*/yara_rules/' --exclude '.*/third_party/' --exclude '.*/external/' --root .. --xml coverage_report.xml --verbose --gcov-ignore-errors all
#
#- name: Upload coverage reports to Codecov
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# if: ${{ env.CODECOV_TOKEN }}
# uses: codecov/codecov-action@v4
# with:
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}
# file: build/coverage_report.xml
langs:
name: 🧪 Langs
runs-on: ubuntu-22.04
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check langs
run:
python3 tests/check_langs.py

17
.gitignore vendored
View File

@@ -1,16 +1,21 @@
.vscode/
.idea/
.kdev4/
cmake-build-*/
build-linux/
build*/
local/
venv/
.cache/
install/
out/
*.mgc
*.kdev4
imgui.ini
.DS_Store
plugins/.rustc_info.json
CMakeUserPresets.json
Brewfile.lock.json
**/target
plugins/example_rust/Cargo.lock
.vs/
vcpkg.json

53
.gitmodules vendored
View File

@@ -1,31 +1,52 @@
[submodule "lib/external/nativefiledialog"]
path = lib/external/nativefiledialog
[submodule "lib/third_party/nativefiledialog"]
path = lib/third_party/nativefiledialog
url = https://github.com/btzy/nativefiledialog-extended
ignore = dirty
[submodule "lib/external/yara/yara"]
path = lib/external/yara/yara
[submodule "lib/third_party/yara/yara"]
path = lib/third_party/yara/yara
url = https://github.com/VirusTotal/yara
ignore = dirty
[submodule "lib/external/xdgpp"]
path = lib/external/xdgpp
url = https://git.sr.ht/~danyspin97/xdgpp
[submodule "lib/third_party/xdgpp"]
path = lib/third_party/xdgpp
url = https://github.com/WerWolv/xdgpp
ignore = dirty
[submodule "lib/external/fmt"]
path = lib/external/fmt
[submodule "lib/third_party/fmt"]
path = lib/third_party/fmt
url = https://github.com/fmtlib/fmt
ignore = dirty
[submodule "lib/external/curl"]
path = lib/external/curl
url = https://github.com/curl/curl
ignore = dirty
[submodule "lib/external/capstone"]
path = lib/external/capstone
[submodule "lib/third_party/capstone"]
path = lib/third_party/capstone
url = https://github.com/capstone-engine/capstone
ignore = dirty
[submodule "lib/third_party/jthread/jthread"]
path = lib/third_party/jthread/jthread
url = https://github.com/josuttis/jthread
ignore = dirty
[submodule "lib/third_party/edlib"]
path = lib/third_party/edlib
url = https://github.com/blawrence-ont/edlib
ignore = dirty
[submodule "lib/third_party/lunasvg"]
path = lib/third_party/lunasvg
url = https://github.com/sammycage/lunasvg
ignore = dirty
[submodule "lib/external/libromfs"]
path = lib/external/libromfs
url = https://github.com/WerWolv/libromfs
ignore = dirty
[submodule "lib/external/pattern_language"]
path = lib/external/pattern_language
url = https://github.com/WerWolv/PatternLanguage
[submodule "lib/external/libwolv"]
path = lib/external/libwolv
url = https://github.com/WerWolv/libwolv
[submodule "lib/third_party/HashLibPlus"]
path = lib/third_party/HashLibPlus
url = https://github.com/WerWolv/HashLibPlus
[submodule "lib/external/disassembler"]
path = lib/external/disassembler
url = https://github.com/WerWolv/Disassembler
[submodule "lib/third_party/clip"]
path = lib/third_party/clip
url = https://github.com/dacap/clip

8
.idea/.gitignore generated vendored
View File

@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../../:\_Dev\Cpp\HexEditor\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

1
.idea/.name generated
View File

@@ -1 +0,0 @@
imhex

14
.idea/deployment.xml generated
View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="WSL (e494f5fa-cb38-49f1-b2cb-b9524b92ed51)">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>

2
.idea/imhex.iml generated
View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

4
.idea/misc.xml generated
View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/imhex.iml" filepath="$PROJECT_DIR$/.idea/imhex.iml" />
</modules>
</component>
</project>

16
.idea/vcs.xml generated
View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/capstone" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/curl" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/fmt" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/libromfs" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/nativefiledialog" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/pattern_language" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/pattern_language/external/cli11" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/pattern_language/external/fmt" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/xdgpp" vcs="Git" />
<mapping directory="$PROJECT_DIR$/lib/external/yara/yara" vcs="Git" />
</component>
</project>

View File

@@ -1,50 +1,93 @@
cmake_minimum_required(VERSION 3.20)
# Options
option(IMHEX_USE_BUNDLED_CA "Use the CA bundle in romfs instead of the system one" OFF)
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
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_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins (Linux only)" OFF)
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON )
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
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 (Linux only)" OFF)
option(IMHEX_DISABLE_STACKTRACE "Disables support for printing stack traces" OFF)
option(IMHEX_BUNDLE_DOTNET "Bundle .NET runtime" ON )
option(IMHEX_ENABLE_LTO "Enables Link Time Optimizations if possible" OFF)
option(IMHEX_USE_DEFAULT_BUILD_SETTINGS "Use default build settings" OFF)
option(IMHEX_STRICT_WARNINGS "Enable most available warnings and treat them as errors" ON )
option(IMHEX_STATIC_LINK_PLUGINS "Statically link all plugins into the main executable" OFF)
option(IMHEX_GENERATE_PACKAGE "Specify if a native package should be built. (Windows and MacOS only)" OFF)
option(IMHEX_ENABLE_UNITY_BUILD "Enables building ImHex as a unity build." OFF)
option(IMHEX_GENERATE_PDBS "Enable generating PDB files in non-debug builds (Windows only)" OFF)
option(IMHEX_REPLACE_DWARF_WITH_PDB "Remove DWARF information from binaries when generating PDBS (Windows only)" OFF)
option(IMHEX_ENABLE_STD_ASSERTS "Enable debug asserts in the C++ std library. (Breaks Plugin ABI!)" OFF)
option(IMHEX_ENABLE_UNIT_TESTS "Enable building unit tests" OFF)
option(IMHEX_ENABLE_PRECOMPILED_HEADERS "Enable precompiled headers" OFF)
option(IMHEX_COMPRESS_DEBUG_INFO "Compress debug information" ON )
option(IMHEX_ENABLE_CXX_MODULES "Enable C++20 Module compilation. Testing only!" OFF)
set(IMHEX_BASE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
# Optional IDE support
include("${IMHEX_BASE_FOLDER}/cmake/ide_helpers.cmake")
# Basic compiler and cmake configurations
set(CMAKE_CXX_STANDARD 23)
set(IMHEX_BASE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
set(CMAKE_CXX_SCAN_FOR_MODULES ${IMHEX_ENABLE_CXX_MODULES})
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
# Setup project
loadVersion(IMHEX_VERSION)
loadVersion(IMHEX_VERSION IMHEX_VERSION_PLAIN)
setVariableInParent(IMHEX_VERSION ${IMHEX_VERSION})
project(imhex VERSION ${IMHEX_VERSION})
configureCMake()
project(imhex
LANGUAGES C CXX
VERSION ${IMHEX_VERSION_PLAIN}
DESCRIPTION "The ImHex Hex Editor"
HOMEPAGE_URL "https://imhex.werwolv.net"
)
configureProject()
# Add ImHex sources
add_custom_target(imhex_all ALL)
# Make sure project is configured correctly
setDefaultBuiltTypeIfUnset()
detectBadClone()
verifyCompiler()
# List plugin names here. Project name must match folder name
set(PLUGINS
builtin
windows
)
detectBundledPlugins()
# Add various defines
detectOS()
detectArch()
addVersionDefines()
configurePackingResources()
addDefines()
# Configure packaging and install targets
configurePackingResources()
setUninstallTarget()
addBundledLibraries()
# Add ImHex sources
add_subdirectory(lib/libimhex)
add_subdirectory(main)
add_custom_target(imhex_all ALL DEPENDS main)
addPluginDirectories()
add_subdirectory(lib/trace)
# Add unit tests
enable_testing()
add_subdirectory(tests EXCLUDE_FROM_ALL)
if (IMHEX_ENABLE_UNIT_TESTS)
if (NOT TARGET unit_tests)
enable_testing()
add_custom_target(unit_tests)
add_subdirectory(tests EXCLUDE_FROM_ALL)
endif ()
endif ()
# Configure packaging
# Configure more resources that will be added to the install package
generateSDKDirectory()
# Handle package generation
createPackage()
# Accommodate IDEs with FOLDER support
tweakTargetsForIDESupport()

70
CMakePresets.json Normal file
View File

@@ -0,0 +1,70 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"displayName": "Base",
"description": "Base configuration for all builds",
"hidden": true,
"binaryDir": "${sourceDir}/build/${presetName}",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"IMHEX_PATTERNS_PULL_MASTER": "ON",
"CMAKE_INSTALL_PREFIX": "./install",
"USE_SYSTEM_CAPSTONE": "ON",
"IMHEX_USE_DEFAULT_BUILD_SETTINGS": "ON"
}
},
{
"name": "x86_64",
"displayName": "x86_64 Build",
"description": "x86_64 build",
"inherits": [ "base" ]
},
{
"name": "xcode",
"inherits": [ "base" ],
"displayName": "Xcode",
"description": "Xcode with external compiler override",
"generator": "Xcode",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS": "-fexperimental-library -Wno-shorten-64-to-32 -Wno-deprecated-declarations",
"IMHEX_IDE_HELPERS_OVERRIDE_XCODE_COMPILER": "ON"
}
},
{
"name": "vs2022",
"displayName": "Visual Studio 2022",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
],
"buildPresets": [
{
"name": "x86_64",
"description": "x86_64 build",
"configurePreset": "x86_64",
"targets": [ "imhex_all" ]
}
],
"testPresets": [
]
}

128
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
Discord @WerWolv#1337.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

68
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,68 @@
# Contribution guide
## Introduction
This document is a guide for developers who want to contribute to ImHex in any way. It contains information about the codebase, the build process and the general workflow.
## Making Changes
### Adding new features
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:
- https://github.com/WerWolv/ImHex-Cpp-Plugin-Template
- https://github.com/WerWolv/ImHex-Rust-Plugin-Template
### Adding a new language
If you'd like to support a new language in ImHex, the best way is by using the `dist/langtool.py` tool. It will create the necessary file for you and help you fill them out.
First, run the tool with `python3 dist/langtool.py create plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of your language. This will create a new file in the language directory.
Afterwards follow the prompts of the program to populate the entire file. Once you're done, rerun cmake and rebuild ImHex. Your language should now be available in the settings.
### Updating an existing language
If you'd like to add missing keys to an existing language, you can also use the `dist/langtool.py` tool. Run it with `python3 dist/langtool.py translate plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of the language.
This will one by one list all the missing translation keys that are present in the default translation file, and you can fill them in with the correct translation for your language.
## Codebase
ImHex is written in C++ and usually uses the latest compiler and standard library features available in gcc on all supported OSes. At the time of writing this is C++23.
### Structure
- `main`: Contains the main application code
- 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.
- 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.
- `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.
- `tests`: Contains all unit tests for ImHex. These are run automatically by the CI and should be kept up to date, especially when adding new helper functions to libimhex.
### RomFS
ImHex uses a custom library called [libromfs](https://github.com/WerWolv/libromfs). It's a simple static library which uses CMake's code generation feature to embed files into the binary at compile time so they can be accessed at runtime.
All plugins have a `romfs` folder which contains all files that should be embedded into the binary. Resources that need to be embedded into the main application (this is usually not necessary), go into the `resources/romfs` folder.
When adding, changing files or removing files, make sure to re-run CMake to update the generated code. Otherwise, the changes might not be reflected in the binary.
## Development Environment
I personally use CLion for development since it makes configuring and building the project very easy on all platforms.
### Windows
- Install MSYS2 from https://www.msys2.org/ and use the `dist/get_deps_msys2.sh` script to install all dependencies.
### Linux
- Install all dependencies using one of the `dist/get_deps_*.sh` scripts depending on your distribution or install them manually with your package manager.
### macOS
- Install all dependencies using brew and the `dist/Brewfile` script.

106
INSTALL.md Normal file
View File

@@ -0,0 +1,106 @@
# Installing ImHex
## Official Releases
The easiest way to install ImHex is to download the latest release from the [GitHub Releases page](https://github.com/WerWolv/ImHex/releases/latest).
There's also a NoGPU version available for users who don't have a GPU or want to run ImHex in a VM without GPU passthrough.
### Windows
#### Installer
Simply run the installer to install ImHex on your system
#### Portable
Extract the zip file to any location on your system.
### macOS
Simply use the drag-n-drop dmg package to install ImHex on your system. It's possible that you need to allow the app to run in the security settings.
### Linux
#### AppImage
To run the AppImage, make sure it's executable. Then simply run it.
```bash
chmod +x imhex-*.AppImage
./imhex-*.AppImage
```
If you're experiencing glib / libgtk assertion failures, you might need to setup your `XDG_DATA_DIRS` env var correctly. In this case, run the following command before executing the AppImage. (See issue [ImHex/#2038](https://github.com/WerWolv/ImHex/issues/2038))
```bash
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
```
#### Flatpak
To install the Flatpak, make sure you have the Flathub repository added to your system. Then simply run the following command:
```bash
flatpak install flathub net.werwolv.ImHex
```
#### Ubuntu DEB Package
To install the DEB package, simply run the following command:
```bash
sudo apt install ./imhex-*.deb
```
#### Arch Linux
To install the Arch Linux package, simply run the following command:
```bash
sudo pacman -U imhex-*.pkg.tar.zst
```
#### Fedora / RHEL / AlmaLinux RPM Package
To install the RPM package, simply run the following command:
```bash
sudo dnf install ./imhex-*.rpm
```
## Nightly Builds
The GitHub Actions CI builds a new release package on every commit made to repository. These builds are available on the [GitHub Actions page](https://github.com/WerWolv/ImHex/actions?query=workflow%3A%22Build%22).
These builds are not guaranteed to be stable and may contain bugs, however they also contain new features that are not yet available in the official releases.
## Building from source
Build instructions for Windows, Linux and macOS can be found under `/dist/compiling`:
- Windows: [Link](dist/compiling/windows.md)
- macOS: [Link](dist/compiling/macos.md)
- Linux: [Link](dist/compiling/linux.md)
## Package managers
ImHex is also available on various package managers. The officially supported ones are listed here:
### Windows
- **Chocolatey**
- [imhex](https://community.chocolatey.org/packages/imhex) (Thanks to @Jarcho)
- `choco install imhex`
- **Winget**
- [WerWolv.ImHex](https://github.com/microsoft/winget-pkgs/tree/master/manifests/w/WerWolv/ImHex)
- `winget install WerWolv.ImHex`
### Linux
- **Arch Linux AUR**
- [imhex-bin](https://aur.archlinux.org/packages/imhex-bin/) (Thanks to @iTrooz)
- `yay -S imhex-bin`
- [imhex](https://aur.archlinux.org/packages/imhex/) (Thanks to @KokaKiwi)
- `yay -S imhex`
- **Fedora**
- [imhex](https://src.fedoraproject.org/rpms/imhex/) (Thanks to @jonathanspw)
- `dnf install imhex`
- **Flatpak**
- [net.werwolv.Imhex](https://flathub.org/apps/details/net.werwolv.ImHex) (Thanks to @Mailaender)
- `flatpak install flathub net.werwolv.ImHex`
### Available on other package managers
Packages that aren't explicitly mentioned above are not officially supported but they will most likely still work.
Contact the maintainer of the package if you have any issues.
[![Packaging status](https://repology.org/badge/vertical-allrepos/imhex.svg)](https://repology.org/project/imhex/versions)

19
PLUGINS.md Normal file
View File

@@ -0,0 +1,19 @@
# Plugins
ImHex is entirely built around the possibility to easily load plugins (most of it's features are actually implemented as a plugin!).
To install plugins, simply download the relevant `.hexplug` file and drop it in your `plugins` folder. The location of that folder can be found under `Help -> About -> ImHex Directories`.
## Available Plugins
(If you're developing a Plugin on your own, please feel free to add it to this list)
### Official Plugins
- [Extra Hashes Plugin](https://github.com/WerWolv/ImHex-Hashes-Plugin)
- Adds support for a variety of new hashes to the Hashes view including Blake, Adler32, Murmur and Tiger
- [Discord RPC Plugin](https://github.com/WerWolv/ImHex-Plugin-DiscordRPC)
- Adds support for Discord Rich Presence
### Third-Party Plugins
- [Pcap Plugin](https://github.com/Professor-plum/ImHex-Plugin-Pcap)
- Adds support for reading packet capture files

441
README.md
View File

@@ -1,11 +1,30 @@
<a href="https://imhex.werwolv.net"><h1 align="center" ><img height="100px" src="resources/projects/logo_text.svg"></h1></a>
<p align="center">A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.</p>
<a href="https://imhex.werwolv.net">
<h1 align="center">
<picture>
<img height="300px" style="margin: 0; padding: 0" src="./resources/dist/common/logo/ImHexLogoSVGBG.svg">
</picture>
</h1>
</a>
<p align="center">
<a title="'Build' workflow Status" href="https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild"><img alt="'Build' workflow Status" src="https://img.shields.io/github/workflow/status/WerWolv/ImHex/Build?longCache=true&style=for-the-badge&label=Build&logoColor=fff&logo=GitHub%20Actions"></a>
<a title="Discord Server" href="https://discord.gg/X63jZ36xBY"><img alt="Discord Server" src="https://img.shields.io/discord/789833418631675954?label=Discord&logo=Discord&style=for-the-badge"></a>
A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
<br>
<a href="https://itinerarium.github.io/phoneme-synthesis/?w=/'ˈɪmhɛks/"><strong>/ˈɪmhɛks/</strong></a>
</p>
<p align="center">
<a title="'Build' workflow Status" href="https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild"><img alt="'Build' workflow Status" src="https://img.shields.io/github/actions/workflow/status/WerWolv/ImHex/build.yml?longCache=true&style=for-the-badge&label=Build&logoColor=fff&logo=GitHub%20Actions&branch=master"></a>
<a title="Discord Server" href="https://discord.gg/X63jZ36xBY"><img alt="Discord Server" src="https://img.shields.io/discord/789833418631675954?label=Discord&logo=Discord&logoColor=fff&style=for-the-badge"></a>
<a title="Total Downloads" href="https://github.com/WerWolv/ImHex/releases/latest"><img alt="Total Downloads" src="https://img.shields.io/github/downloads/WerWolv/ImHex/total?longCache=true&style=for-the-badge&label=Downloads&logoColor=fff&logo=GitHub"></a>
<a title="Code Quality" href="https://www.codefactor.io/repository/github/werwolv/imhex"><img alt="Code Quality" src="https://img.shields.io/codefactor/grade/github/WerWolv/ImHex?longCache=true&style=for-the-badge&label=Code%20Quality&logoColor=fff&logo=CodeFactor&branch=master"></a>
<a title="Translation" href="https://weblate.werwolv.net/projects/imhex/"><img alt="Translation" src="https://img.shields.io/weblate/progress/imhex?logo=weblate&logoColor=%23FFFFFF&server=https%3A%2F%2Fweblate.werwolv.net&style=for-the-badge"></a>
<a title="Plugins" href="https://github.com/WerWolv/ImHex/blob/master/PLUGINS.md"><img alt="Plugins" src="https://img.shields.io/badge/Plugins-Supported-brightgreen?logo=stackedit&logoColor=%23FFFFFF&style=for-the-badge"></a>
</p>
<p align="center">
<a title="Download the latest version of ImHex" href="https://imhex.download"><img alt="Download the latest version of ImHex!" src="resources/dist/common/get_release_banner.png"></a>
<a title="Download the latest nightly pre-release version of ImHex" href="https://imhex.download/#nightly"><img alt="Download the latest nightly pre-release version of ImHex" src="resources/dist/common/get_nightly_banner.png"></a>
<a title="Use the Web version of ImHex right in your browser!" href="https://web.imhex.werwolv.net"><img alt="Use the Web version of ImHex right in your browser!" src="resources/dist/common/try_online_banner.png"></a>
<a title="Read the documentation of ImHex!" href="https://docs.werwolv.net"><img alt="Read the documentation of ImHex!" src="resources/dist/common/read_docs_banner.png"></a>
</p>
## Supporting
@@ -13,98 +32,273 @@
If you like my work, please consider supporting me on GitHub Sponsors, Patreon or PayPal. Thanks a lot!
<p align="center">
<a href="https://github.com/sponsors/WerWolv"><img src="https://werwolv.net/assets/github_banner.png" alt="GitHub donate button" /> </a>
<a href="https://www.patreon.com/werwolv"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /> </a>
<a href="https://werwolv.net/donate"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /> </a>
<a href="https://github.com/sponsors/WerWolv"><img src="https://werwolv.net/assets/github_banner.png" alt="GitHub donate button" /></a>
<a href="https://www.patreon.com/werwolv"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /></a>
<a href="https://werwolv.net/donate"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /></a>
</p>
## Screenshots
![Hex editor, patterns and data information](https://github.com/user-attachments/assets/902a7c4c-410d-490f-999e-14c856fec027)
![Bookmarks, data information, find view and data processor](https://github.com/user-attachments/assets/58eefa1f-31c9-4bb8-a1c1-8cdd8ddbd29f)
![Hex editor, patterns and data information](https://user-images.githubusercontent.com/10835354/139717326-8044769d-527b-4d88-8adf-2d4ecafdca1f.png)
![Bookmarks, disassembler and data processor](https://user-images.githubusercontent.com/10835354/139717323-1f8c9d52-f7eb-4f43-9f11-097ac728ed6c.png)
<details>
<summary><strong>More Screenshots</strong></summary>
![Data Processor decrypting some data and displaying it as an image](https://github.com/WerWolv/ImHex/assets/10835354/d0623081-3094-4840-a8a8-647b38724db8)
![STL Parser written in the Pattern Language visualizing a 3D model](https://github.com/WerWolv/ImHex/assets/10835354/62cbcd18-1c3f-4dd6-a877-2bf2bf4bb2a5)
![Data Information view displaying various stats about the file](https://github.com/WerWolv/ImHex/assets/10835354/d4706c01-c258-45c9-80b8-fe7a10d5a1de)
</details>
## Features
- Featureful hex view
<details>
<summary><strong>Featureful hex view</strong></summary>
- Byte patching
- Patch management
- Copy bytes as feature
- Infinite Undo/Redo
- "Copy bytes as..."
- Bytes
- Hex string
- C, C++, C#, Rust, Python, Java & JavaScript array
- ASCII-Art hex view
- HTML self-contained div
- String and hex search
- Colorful highlighting
- Simple string and hex search
- Goto from start, end and current cursor position
- Custom C++-like pattern language for parsing highlighting a file's content
- Automatic loading based on MIME type
- arrays, pointers, structs, unions, enums, bitfields, namespaces, little and big endian support, conditionals and much more!
- Colorful highlighting
- Configurable foreground highlighting rules
- Background highlighting using patterns, find results and bookmarks
- Displaying data as a list of many different types
- Hexadecimal integers (8, 16, 32, 64 bit)
- Signed and unsigned decimal integers (8, 16, 32, 64 bit)
- Floats (16, 32, 64 bit)
- RGBA8 Colors
- HexII
- Binary
- Decoding data as ASCII and custom encodings
- Built-in support for UTF-8, UTF-16, ShiftJIS, most Windows encodings and many more
- Paged data view
</details>
<details>
<summary><strong>Custom C++-like pattern language for parsing highlighting a file's content</strong></summary>
- Automatic loading based on MIME types and magic values
- Arrays, pointers, structs, unions, enums, bitfields, namespaces, little and big endian support, conditionals and much more!
- Useful error messages, syntax highlighting and error marking
- Doesn't burn out your retinas when used in late-night sessions
- Dark mode by default, but a light mode is available as well
- Data importing
- Support for visualizing many different types of data
- Images
- Audio
- 3D Models
- Coordinates
- Time stamps
</details>
<details>
<summary><strong>Theming support</strong></summary>
- Doesn't burn out your retinas when used in late-night sessions
- Dark mode by default, but a light mode is available as well
- Customizable colors and styles for all UI elements through shareable theme files
- Support for custom fonts
</details>
<details>
<summary><strong>Importing and Exporting data</strong></summary>
- Base64 files
- IPS and IPS32 patches
- Data exporting
- IPS and IPS32 patches
- Data inspector allowing interpretation of data as many different types (little and big endian)
- Huge file support with fast and efficient loading
- String search
- Copying of strings
- Copying of demangled strings
- File hashing support
- CRC16 and CRC32 with custom initial values and polynomials
- MD4, MD5
- SHA-1, SHA-224, SHA-256, SHA-384, SHA-512
- Disassembler supporting many architectures (frontend for Capstone)
- ARM32 (ARM, Thumb, Cortex-M, AArch32)
- ARM64
- MIPS (MIPS32, MIPS64, MIPS32R6, Micro)
- x86 (16-bit, 32-bit, 64-bit)
- PowerPC (32-bit, 64-bit)
- SPARC
- IBM SystemZ
- xCORE
- M68K
- TMS320C64X
- M680X
- Ethereum
- RISC-V
- WebAssembly
- MOS65XX
- Berkeley Packet Filter
- Bookmarks
- Region highlighting
- Comments
- Data Analyzer
- Markdown reports
</details>
<details>
<summary><strong>Data Inspector</strong></summary>
- Interpreting data as many different types with endianness, decimal, hexadecimal and octal support and bit inversion
- Unsigned and signed integers (8, 16, 24, 32, 48, 64 bit)
- Floats (16, 32, 64 bit)
- Signed and Unsigned LEB128
- ASCII, Wide and UTF-8 characters and strings
- time32_t, time64_t, DOS date and time
- GUIDs
- RGBA8 and RGB65 Colors
- Copying and modifying bytes through the inspector
- Adding new data types through the pattern language
- Support for hiding rows that aren't used
</details>
<details>
<summary><strong>Node-based data pre-processor</strong></summary>
- Modify, decrypt and decode data before it's being displayed in the hex editor
- Modify data without touching the underlying source
- Support for adding custom nodes
</details>
<details>
<summary><strong>Loading data from many different data sources</strong></summary>
- Local Files
- Support for huge files with fast and efficient loading
- Raw Disks
- Loading data from raw disks and partitions
- GDB Server
- Access the RAM of a running process or embedded devices through GDB
- Intel Hex and Motorola SREC data
- Process Memory
- Inspect the entire address space of a running process
</details>
<details>
<summary><strong>Data searching</strong></summary>
- Support for searching the entire file or only a selection
- String extraction
- Option to specify minimum length and character set (lower case, upper case, digits, symbols)
- Option to specify encoding (ASCII, UTF-8, UTF-16 big and little endian)
- Sequence search
- Search for a sequence of bytes or characters
- Option to ignore character case
- Regex search
- Search for strings using regular expressions
- Binary Pattern
- Search for sequences of bytes with optional wildcards
- Numeric Value search
- Search for signed/unsigned integers and floats
- Search for ranges of values
- Option to specify size and endianness
- Option to ignore unaligned values
</details>
<details>
<summary><strong>Data hashing support</strong></summary>
- Many different algorithms available
- CRC8, CRC16 and CRC32 with custom initial values and polynomials
- Many default polynomials available
- MD5
- SHA-1, SHA-224, SHA-256, SHA-384, SHA-512
- Adler32
- AP
- BKDR
- Bernstein, Bernstein1
- DEK, DJB, ELF, FNV1, FNV1a, JS, PJW, RS, SDBM
- OneAtTime, Rotating, ShiftAndXor, SuperFast
- Murmur2_32, MurmurHash3_x86_32, MurmurHash3_x86_128, MurmurHash3_x64_128
- SipHash64, SipHash128
- XXHash32, XXHash64
- Tiger, Tiger2
- Blake2B, Blake2S
- Hashing of specific regions of the loaded data
- Hashing of arbitrary strings
</details>
<details>
<summary><strong>Diffing support</strong></summary>
- Compare data of different data sources
- Difference highlighting
- Table view of differences
</details>
<details>
<summary><strong>Integrated disassembler</strong></summary>
- Support for all architectures supported by Capstone
- ARM32 (ARM, Thumb, Cortex-M, AArch32)
- ARM64
- MIPS (MIPS32, MIPS64, MIPS32R6, Micro)
- x86 (16-bit, 32-bit, 64-bit)
- PowerPC (32-bit, 64-bit)
- SPARC
- IBM SystemZ
- xCORE
- M68K
- TMS320C64X
- M680X
- Ethereum
- RISC-V
- WebAssembly
- MOS65XX
- Berkeley Packet Filter
</details>
<details>
<summary><strong>Bookmarks</strong></summary>
- Support for bookmarks with custom names and colors
- Highlighting of bookmarked region in the hex editor
- Jump to bookmarks
- Open content of bookmark in a new tab
- Add comments to bookmarks
</details>
<details>
<summary><strong>Featureful data analyzer and visualizer</strong></summary>
- File magic-based file parser and MIME type database
- Byte distribution graph
- Byte type distribution graph
- Entropy graph
- Highest and average entropy
- Encrypted / Compressed file detection
- Built-in Content Store
- Download all files found in the database directly from within ImHex
- Yara Rules support
- Quickly scan a file for vulnerabilities with official yara rules
- Helpful tools
- Itanium and MSVC demangler
- Digram and Layered distribution graphs
</details>
<details>
<summary><strong>YARA Rule support</strong></summary>
- Scan a file for vulnerabilities with official yara rules
- Highlight matches in the hex editor
- Jump to matches
- Apply multiple rules at once
</details>
<details>
<summary><strong>Helpful tools</strong></summary>
- Itanium, MSVC, Rust and D-Lang demangler based on LLVM
- ASCII table
- Regex replacer
- Mathematical expression evaluator (Calculator)
- Hexadecimal Color picker
- Graphing calculator
- Hexadecimal Color picker with support for many different formats
- Base converter
- Byte swapper
- UNIX Permissions calculator
- Anonfiles File upload tool
- Wikipedia term definition finder
- File utilities
- File splitter
- File combiner
- File shredder
- IEEE754 Float visualizer
- Division by invariant multiplication calculator
- TCP Client/Server
- Euclidean algorithm calculator
</details>
<details>
<summary><strong>Built-in Content updater</strong></summary>
- Download all files found in the database directly from within ImHex
- Pattern files for decoding various file formats
- Libraries for the pattern language
- Magic files for file type detection
- Custom data processor nodes
- Custom encodings
- Custom themes
- Yara rules
</details>
<details>
<summary><strong>Modern Interface</strong></summary>
- Support for multiple workspaces
- Support for custom layouts
- Detachable windows
</details>
<details>
<summary><strong>Easy to get started</strong></summary>
- Support for many different languages
- Simplified mode for beginners
- Extensive documentation
- Many example files available on [the Database](https://github.com/WerWolv/ImHex-Patterns)
- Achievements guiding you through the features of ImHex
- Interactive tutorials
</details>
## Pattern Language
The custom C-like Pattern Language developed and used by ImHex is easy to read, understand and learn. A guide with all features of the language can be found [on the docs page](http://imhex.werwolv.net/docs).
The Pattern Language is the completely custom programming language developed for ImHex.
It allows you to define structures and data types in a C-like syntax and then use them to parse and highlight a file's content.
- Source Code: [Link](https://github.com/WerWolv/PatternLanguage/)
- Documentation: [Link](https://docs.werwolv.net/pattern-language/)
## Database
@@ -114,85 +308,94 @@ For format patterns, libraries, magic and constant files, check out the [ImHex-P
## Requirements
To use ImHex, the following minimal system requirements need to be met:
To use ImHex, the following minimal system requirements need to be met.
- **OS**: Windows 7 or higher, macOS 10.15 (Catalina) or higher, "Modern" Linux (Ubuntu 22.04, Fedora Stable/Rawhide, and Arch Linux have official packages, other distributions can use the AppImage)
- **CPU**: x86_64 (64 Bit)
- **GPU**: OpenGL 3.0 or higher (preferable a dedicated GPU and not Intel HD Graphics)
- **RAM**: 512MB, more may be required for more complicated analysis
- **Storage**: 100MB
> [!IMPORTANT]
> ImHex requires a GPU with OpenGL 3.0 support in general.
> There are releases available (with the `-NoGPU` suffix) that are software rendered and don't require a GPU, however these can be a lot slower than the GPU accelerated versions.
>
> If possible at all, make ImHex use the dedicated GPU on your system instead of the integrated one.
> ImHex will usually run fine with integrated GPUs as well but certain Intel HD GPU drivers on Windows are known to cause graphical artifacts.
## Plugin development
To develop plugins for ImHex, use one of the following two templates projects 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.
- [C++ Plugin Template](https://github.com/WerWolv/ImHex-Cpp-Plugin-Template)
- [Rust Plugin Template](https://github.com/WerWolv/ImHex-Rust-Plugin-Template)
- **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.
- 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.
- Ubuntu and Debian
- Fedora
- RHEL/AlmaLinux
- Arch Linux
- Basically any other distro will work as well when compiling ImHex from sources.
- **CPU**: Officially supported are x86_64 and ARM64, though any Little Endian 64 bit 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**: ~150MiB, more is required for more complex analysis
- **Storage**: 150MiB
## Installing
The following OSs have packages available in their repositories making it easy to install ImHex.
### Fedora (36+)
```
dnf install imhex
```
### RHEL 9 / AlmaLinux 9 (coming soon)
### Arch Linux (AUR)
```
yay -S imhex-bin
```
## Third Party Repositories
ImHex is available in various thid party repositores.
[![Packaging status](https://repology.org/badge/vertical-allrepos/imhex.svg)](https://repology.org/project/imhex/versions)
## Nightly builds
Nightlies are available via GitHub Actions [here](https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild).
- Windows • __x86_64__
- [Installer](https://nightly.link/WerWolv/ImHex/workflows/build/master/Windows%20Installer.zip)
- [Portable](https://nightly.link/WerWolv/ImHex/workflows/build/master/Windows%20Portable.zip)
- MacOS • __x86_64__
- [DMG](https://nightly.link/WerWolv/ImHex/workflows/build/master/macOS%20DMG.zip)
- Linux • __x86_64__
- [Ubuntu 22.04 DEB](https://nightly.link/WerWolv/ImHex/workflows/build/master/Ubuntu%2022.04%20DEB.zip)
- [AppImage](https://nightly.link/WerWolv/ImHex/workflows/build/master/Linux%20AppImage.zip)
- [Arch Package](https://nightly.link/WerWolv/ImHex/workflows/build/master/ArchLinux%20.pkg.tar.zst.zip)
- [Fedora Rawhide RPM](https://nightly.link/WerWolv/ImHex/workflows/build/master/Fedora%20Rawhide%20RPM.zip)
- [Fedora Stable RPM](https://nightly.link/WerWolv/ImHex/workflows/build/master/Fedora%20Latest%20RPM.zip)
Information on how to install ImHex can be found in the [Install](/INSTALL.md) guide
## 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.
> All dependencies that aren't bundled, can be installed using the dependency installer scripts found in the `/dist` folder.
For more information, check out the [Compiling](/dist/compiling) guide.
## Contributing
See [Contributing](/CONTRIBUTING.md)
## 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.
- [ImHex Plugin Template](https://github.com/WerWolv/ImHex-Plugin-Template)
Many dependencies are bundled into the repository using submodules so make sure to clone it using the `--recurse-submodules` option.
All dependencies that aren't bundled, can be installed using the dependency installer scripts found in the `/dist` folder.
## Credits
### Contributors
- [Mary](https://github.com/Thog) for her immense help porting ImHex to MacOS and help during development
- [iTrooz](https://github.com/iTrooz) for getting ImHex onto the Web as well as hundreds of contributions in every part of the project
- [jumanji144](https://github.com/jumanji144) for huge contributions to the Pattern Language and ImHex's infrastructure
- [Mary](https://github.com/marysaka) for her immense help porting ImHex to MacOS and help during development
- [Roblabla](https://github.com/Roblabla) for adding MSI Installer support to ImHex
- [jam1garner](https://github.com/jam1garner) and [raytwo](https://github.com/raytwo) for their help with adding Rust support to plugins
- [Mailaender](https://github.com/Mailaender) for getting ImHex onto Flathub
- [iTrooz](https://github.com/iTrooz) for many improvements related to release packaging and the GitHub Action runners.
- Everybody else who has reported issues on Discord or GitHub that I had great conversations with :)
### Dependencies
- Thanks a lot to ocornut for their amazing [Dear ImGui](https://github.com/ocornut/imgui) which is used for building the entire interface
- Thanks to ocornut as well for their hex editor view used as base for this project.
- Thanks to BalazsJako for their incredible [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit) used for the pattern language syntax highlighting
- Thanks to nlohmann for their [json](https://github.com/nlohmann/json) library used for project files
- Thanks to aquynh for [capstone](https://github.com/aquynh/capstone) which is the base of the disassembly window
- Thanks to epezent for [ImPlot](https://github.com/epezent/implot) used to plot data in various places
- Thanks to Nelarius for [ImNodes](https://github.com/Nelarius/imnodes) used as base for the data processor
- Thanks to BalazsJako for [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit) used for the pattern language syntax highlighting
- Thanks to nlohmann for their [json](https://github.com/nlohmann/json) library used for configuration files
- Thanks to vitaut for their [libfmt](https://github.com/fmtlib/fmt) library which makes formatting and logging so much better
- Thanks to btzy for [nativefiledialog-extended](https://github.com/btzy/nativefiledialog-extended) and their great support, used for handling file dialogs on all platforms
- Thanks to danyspin97 for [xdgpp](https://sr.ht/~danyspin97/xdgpp) used to handle folder paths on Linux
- Thanks to aquynh for [capstone](https://github.com/aquynh/capstone) which is the base of the disassembly window
- Thanks to rxi for [microtar](https://github.com/rxi/microtar) used for extracting downloaded store assets
- Thanks to btzy for [nativefiledialog-extended](https://github.com/btzy/nativefiledialog-extended)
- Thanks to danyspin97 for [xdgpp](https://sr.ht/~danyspin97/xdgpp)
- Thanks to VirusTotal for [Yara](https://github.com/VirusTotal/yara) used by the Yara plugin
- Thanks to Martinsos for [edlib](https://github.com/Martinsos/edlib) used for sequence searching in the diffing view
- Thanks to ron4fun for [HashLibPlus](https://github.com/ron4fun/HashLibPlus) which implements every hashing algorithm under the sun
- Thanks to mackron for [miniaudio](https://github.com/mackron/miniaudio) used to play audio files
- Thanks to all other groups and organizations whose libraries are used in ImHex
### License
The biggest part of ImHex is under the GPLv2-only license.
Notable exceptions to this are the following parts which are under the LGPLv2.1 license:
- **/lib/libimhex**: The library that allows Plugins to interact with ImHex.
- **/plugins/ui**: The UI plugin library that contains some common UI elements that can be used by other plugins
The reason for this is to allow for proprietary plugins to be developed for ImHex.

10
SECURITY.md Normal file
View File

@@ -0,0 +1,10 @@
# Security Policy
## Supported Versions
Supported is generally only the latest version that can be downloaded from the Release tab. If you have issues, you might get instructed to use the Nightly release version instead.
If you built ImHex yourself and experience issues that are not present in the version built by GitHub, you're on your own.
## Reporting a Vulnerability
Any critical vulnerabilities can be reported through Discord (@werwolv).

View File

@@ -1 +1 @@
1.23.1
1.38.0.WIP

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()

149
cmake/ide_helpers.cmake Normal file
View File

@@ -0,0 +1,149 @@
option(IMHEX_IDE_HELPERS_OVERRIDE_XCODE_COMPILER "Enable choice of compiler for Xcode builds, despite CMake's best efforts" OFF)
option(IMHEX_IDE_HELPERS_INTRUSIVE_IDE_TWEAKS "Enable intrusive CMake tweaks to better support IDEs with folder support" OFF)
# The CMake infrastructure silently ignores the CMAKE_<>_COMPILER settings when
# using the `Xcode` generator.
#
# A particularly nasty (and potentially only) way of getting around this is to
# temporarily lie about the generator being used, while CMake determines and
# locks in the compiler to use.
#
# Needless to say, this is hacky and fragile. Use at your own risk!
if (IMHEX_IDE_HELPERS_OVERRIDE_XCODE_COMPILER AND CMAKE_GENERATOR STREQUAL "Xcode")
set(CMAKE_GENERATOR "Unknown")
enable_language(C CXX)
set(CMAKE_GENERATOR "Xcode")
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_C_COMPILER}")
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_CXX_COMPILER}")
if (CLANG)
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_C_COMPILER}")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_CXX_COMPILER}")
endif()
# By default Xcode passes a `-index-store-path=<...>` parameter to the compiler
# during builds to build code completion indexes. This is not supported by
# anything other than AppleClang
set(CMAKE_XCODE_ATTRIBUTE_COMPILER_INDEX_STORE_ENABLE "NO")
endif()
# Generate a launch/build scheme for all targets
set(CMAKE_XCODE_GENERATE_SCHEME YES)
# Utility function that helps avoid messing with non-standard targets
macro(returnIfTargetIsNonTweakable target)
get_target_property(targetIsAliased ${target} ALIASED_TARGET)
get_target_property(targetIsImported ${target} IMPORTED)
if (targetIsAliased OR targetIsImported)
return()
endif()
get_target_property(targetType ${target} TYPE)
if (targetType MATCHES "INTERFACE_LIBRARY|UNKNOWN_LIBRARY")
return()
endif()
endmacro()
# Targets usually don't specify their private headers, nor group their source files
# which results in very spotty coverage by IDEs with folders support
#
# Unfortunately, CMake does not have a `target_source_group` like construct yet, therefore
# we have to play by the limitations of `source_group`.
#
# A particularly problematic part is that the function must be called within the directoryies
# scope for the grouping to take effect.
#
# See: https://discourse.cmake.org/t/topic/7388
function(tweakTargetForIDESupport target)
returnIfTargetIsNonTweakable(${target})
# Don't assume directory structure of third parties
get_target_property(targetSourceDir ${target} SOURCE_DIR)
if (targetSourceDir MATCHES "third_party")
return()
endif()
# Add headers to target
get_target_property(targetSourceDir ${target} SOURCE_DIR)
if (targetSourceDir)
file(GLOB_RECURSE targetPrivateHeaders CONFIGURE_DEPENDS "${targetSourceDir}/include/*.hpp")
target_sources(${target} PRIVATE "${targetPrivateHeaders}")
endif()
# Organize target sources into directory tree
get_target_property(sources ${target} SOURCES)
foreach(file IN LISTS sources)
get_filename_component(path "${file}" ABSOLUTE)
if (NOT path MATCHES "^${targetSourceDir}")
continue()
endif()
source_group(TREE "${targetSourceDir}" PREFIX "Source Tree" FILES "${file}")
endforeach()
endfunction()
if (IMHEX_IDE_HELPERS_INTRUSIVE_IDE_TWEAKS)
# See tweakTargetForIDESupport for rationale
function(add_library target)
_add_library(${target} ${ARGN})
tweakTargetForIDESupport(${target})
endfunction()
function(add_executable target)
_add_executable(${target} ${ARGN})
tweakTargetForIDESupport(${target})
endfunction()
endif()
# Adjust target's FOLDER property, which is an IDE only preference
function(_tweakTarget target path)
get_target_property(targetType ${target} TYPE)
if (TARGET generator-${target})
set_target_properties(generator-${target} PROPERTIES FOLDER "romfs/${target}")
endif()
if (TARGET romfs_file_packer-${target})
set_target_properties(romfs_file_packer-${target} PROPERTIES FOLDER "romfs/${target}")
endif()
if (TARGET libromfs-${target})
set_target_properties(libromfs-${target} PROPERTIES FOLDER "romfs/${target}")
endif()
if (${targetType} MATCHES "EXECUTABLE|LIBRARY")
set_target_properties(${target} PROPERTIES FOLDER "${path}")
endif()
endfunction()
macro(_tweakTargetsRecursive dir)
get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES)
foreach(subdir IN LISTS subdirectories)
_tweakTargetsRecursive("${subdir}")
endforeach()
if(${dir} STREQUAL ${CMAKE_SOURCE_DIR})
return()
endif()
get_property(targets DIRECTORY "${dir}" PROPERTY BUILDSYSTEM_TARGETS)
file(RELATIVE_PATH rdir ${CMAKE_SOURCE_DIR} "${dir}/..")
foreach(target ${targets})
_tweakTarget(${target} "${rdir}")
endforeach()
endmacro()
# Tweak all targets this CMake build is aware about
function(tweakTargetsForIDESupport)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
_tweakTargetsRecursive("${CMAKE_SOURCE_DIR}")
endfunction()

View File

@@ -0,0 +1,91 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindBacktrace
-------------
Find provider for `backtrace(3) <https://man7.org/linux/man-pages/man3/backtrace.3.html>`__.
Checks if OS supports ``backtrace(3)`` via either ``libc`` or custom library.
This module defines the following variables:
``Backtrace_HEADER``
The header file needed for ``backtrace(3)``. Cached.
Could be forcibly set by user.
``Backtrace_INCLUDE_DIRS``
The include directories needed to use ``backtrace(3)`` header.
``Backtrace_LIBRARIES``
The libraries (linker flags) needed to use ``backtrace(3)``, if any.
``Backtrace_FOUND``
Is set if and only if ``backtrace(3)`` support detected.
The following cache variables are also available to set or use:
``Backtrace_LIBRARY``
The external library providing backtrace, if any.
``Backtrace_INCLUDE_DIR``
The directory holding the ``backtrace(3)`` header.
Typical usage is to generate of header file using :command:`configure_file`
with the contents like the following::
#cmakedefine01 Backtrace_FOUND
#if Backtrace_FOUND
# include <${Backtrace_HEADER}>
#endif
And then reference that generated header file in actual source.
#]=======================================================================]
include(CMakePushCheckState)
include(CheckSymbolExists)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# List of variables to be provided to find_package_handle_standard_args()
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
if(Backtrace_HEADER)
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
else(Backtrace_HEADER)
set(_Backtrace_HEADER_TRY "execinfo.h")
endif(Backtrace_HEADER)
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
if (NOT DEFINED Backtrace_LIBRARY)
# First, check if we already have backtrace(), e.g., in libc
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
cmake_pop_check_state()
endif()
if(_Backtrace_SYM_FOUND)
# Avoid repeating the message() call below each time CMake is run.
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
message(STATUS "backtrace facility detected in default set of libraries")
endif()
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
else()
# Check for external library, for non-glibc systems
if(Backtrace_INCLUDE_DIR)
# OpenBSD has libbacktrace renamed to libexecinfo
find_library(Backtrace_LIBRARY "execinfo")
else() # respect user wishes
set(_Backtrace_HEADER_TRY "backtrace.h")
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
find_library(Backtrace_LIBRARY "backtrace")
endif()
# Prepend list with library path as it's more common practice
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
endif()
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)

View File

@@ -0,0 +1,8 @@
find_path(CAPSTONE_INCLUDE_DIR capstone.h PATH_SUFFIXES capstone)
find_library(CAPSTONE_LIBRARY NAMES capstone)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Capstone DEFAULT_MSG CAPSTONE_LIBRARY CAPSTONE_INCLUDE_DIR)
mark_as_advanced(CAPSTONE_INCLUDE_DIR CAPSTONE_LIBRARY)

View File

@@ -0,0 +1,93 @@
set(CoreClrEmbed_FOUND FALSE)
set(CORECLR_ARCH "linux-x64")
set(CORECLR_SUBARCH "x64")
if (WIN32)
set(CORECLR_ARCH "win-x64")
endif()
if (UNIX)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CORECLR_ARCH "linux-arm64")
set(CORECLR_SUBARCH "arm64")
endif()
endif()
if (APPLE)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(CORECLR_ARCH "osx-arm64")
set(CORECLR_SUBARCH "arm64")
else()
set(CORECLR_ARCH "osx-x64")
endif()
endif()
if (NOT DOTNET_EXECUTABLE)
set(DOTNET_EXECUTABLE dotnet)
endif ()
set(CORECLR_VERSION "8.0")
execute_process(COMMAND ${DOTNET_EXECUTABLE} "--list-runtimes" OUTPUT_VARIABLE CORECLR_LIST_RUNTIMES_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
if (CORECLR_LIST_RUNTIMES_OUTPUT STREQUAL "")
message(STATUS "Unable to find any .NET runtimes")
return()
endif ()
set(_ALL_RUNTIMES ${CORECLR_LIST_RUNTIMES_OUTPUT})
string(REPLACE "\n" ";" _ALL_RUNTIMES_LIST ${_ALL_RUNTIMES})
foreach(X ${_ALL_RUNTIMES_LIST})
string(REGEX MATCH "Microsoft\.NETCore\.App ([0-9]+)\.([0-9]+)\.([a-zA-Z0-9.-]+) [\[](.*)Microsoft\.NETCore\.App[\]]"
CORECLR_VERSION_REGEX_MATCH ${X})
set(_RUNTIME_VERSION ${CMAKE_MATCH_1}.${CMAKE_MATCH_2})
if (CMAKE_MATCH_1 AND CMAKE_MATCH_4)
if (${_RUNTIME_VERSION} STREQUAL ${CORECLR_VERSION})
set(CORECLR_RUNTIME_VERSION ${_RUNTIME_VERSION})
set(CORECLR_RUNTIME_VERSION_FULL ${CORECLR_VERSION}.${CMAKE_MATCH_3})
set(CORECLR_RUNTIME_ROOT_PATH ${CMAKE_MATCH_4})
message(STATUS "Found matching .NET runtime version '${CORECLR_RUNTIME_VERSION_FULL}' path='${CORECLR_RUNTIME_ROOT_PATH}'")
endif()
endif()
endforeach()
if (CORECLR_RUNTIME_ROOT_PATH)
get_filename_component(CORECLR_RUNTIME_ROOT_PATH ${CORECLR_RUNTIME_ROOT_PATH} DIRECTORY)
endif()
set(CoreClrEmbed_ROOT_PATH "${CORECLR_RUNTIME_ROOT_PATH}")
file(GLOB _CORECLR_HOST_ARCH_PATH_LIST "${CORECLR_RUNTIME_ROOT_PATH}/packs/Microsoft.NETCore.App.Host.*-${CORECLR_SUBARCH}")
if (_CORECLR_HOST_ARCH_PATH_LIST)
foreach(_CORECLR_HOST_ARCH_PATH ${_CORECLR_HOST_ARCH_PATH_LIST})
get_filename_component(_CORECLR_HOST_ARCH_FILENAME ${_CORECLR_HOST_ARCH_PATH} NAME)
string(REPLACE "Microsoft.NETCore.App.Host." "" _CORECLR_COMPUTED_ARCH "${_CORECLR_HOST_ARCH_FILENAME}")
if (_CORECLR_COMPUTED_ARCH)
set(CORECLR_ARCH "${_CORECLR_COMPUTED_ARCH}")
break()
endif()
endforeach()
endif()
set(CORECLR_HOST_BASE_PATH "${CORECLR_RUNTIME_ROOT_PATH}/packs/Microsoft.NETCore.App.Host.${CORECLR_ARCH}/${CORECLR_RUNTIME_VERSION_FULL}")
file(GLOB _CORECLR_FOUND_PATH ${CORECLR_HOST_BASE_PATH})
if (_CORECLR_FOUND_PATH)
set(CORECLR_NETHOST_ROOT "${_CORECLR_FOUND_PATH}/runtimes/${CORECLR_ARCH}/native")
endif()
find_library(CoreClrEmbed_LIBRARY nethost PATHS
${CORECLR_NETHOST_ROOT}
)
find_path(CoreClrEmbed_INCLUDE_DIR nethost.h PATHS
${CORECLR_NETHOST_ROOT}
)
find_file(CoreClrEmbed_SHARED_LIBRARY nethost.dll nethost.so libnethost.so nethost.dylib libnethost.dylib PATHS
${CORECLR_NETHOST_ROOT})
if (CoreClrEmbed_INCLUDE_DIR AND CoreClrEmbed_LIBRARY)
set(CoreClrEmbed_FOUND TRUE)
set(CoreClrEmbed_LIBRARIES "${CoreClrEmbed_LIBRARY}" CACHE STRING "CoreClrEmbed libraries" FORCE)
set(CoreClrEmbed_SHARED_LIBRARIES "${CoreClrEmbed_SHARED_LIBRARY}" CACHE STRING "CoreClrEmbed shared libraries" FORCE)
set(CoreClrEmbed_INCLUDE_DIRS "${CoreClrEmbed_INCLUDE_DIR}" CACHE STRING "CoreClrEmbed include directories" FORCE)
set(CoreClrEmbed_VERSION "${CORECLR_RUNTIME_VERSION_FULL}" CACHE STRING "CoreClrEmbed version" FORCE)
endif()

View File

@@ -0,0 +1,139 @@
#.rst:
# Find GLFW
# ---------
#
# Finds the GLFW library using its cmake config if that exists, otherwise
# falls back to finding it manually. This module defines:
#
# GLFW_FOUND - True if GLFW library is found
# GLFW::GLFW - GLFW imported target
#
# Additionally, in case the config was not found, these variables are defined
# for internal usage:
#
# GLFW_LIBRARY - GLFW library
# GLFW_DLL_DEBUG - GLFW debug DLL on Windows, if found
# GLFW_DLL_RELEASE - GLFW release DLL on Windows, if found
# GLFW_INCLUDE_DIR - Root include dir
#
#
# This file is part of Magnum.
#
# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
# 2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz>
# Copyright © 2016 Jonathan Hale <squareys@googlemail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# GLFW installs cmake package config files which handles dependencies in case
# GLFW is built statically. Try to find first, quietly, so it doesn't print
# loud messages when it's not found, since that's okay. If the glfw target
# already exists, it means we're using it through a CMake subproject -- don't
# attempt to find the package in that case.
if(NOT TARGET glfw)
find_package(glfw3 CONFIG QUIET)
endif()
# If either a glfw config file was found or we have a subproject, point
# GLFW::GLFW to that and exit -- nothing else to do here.
if(TARGET glfw)
if(NOT TARGET GLFW::GLFW)
# Aliases of (global) targets are only supported in CMake 3.11, so we
# work around it by this. This is easier than fetching all possible
# properties (which are impossible to track of) and then attempting to
# rebuild them into a new target.
add_library(GLFW::GLFW INTERFACE IMPORTED)
set_target_properties(GLFW::GLFW PROPERTIES INTERFACE_LINK_LIBRARIES glfw)
endif()
# Just to make FPHSA print some meaningful location, nothing else
get_target_property(_GLFW_INTERFACE_INCLUDE_DIRECTORIES glfw INTERFACE_INCLUDE_DIRECTORIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("GLFW" DEFAULT_MSG
_GLFW_INTERFACE_INCLUDE_DIRECTORIES)
if(CORRADE_TARGET_WINDOWS)
# .dll is in LOCATION, .lib is in IMPLIB. Yay, useful!
get_target_property(GLFW_DLL_DEBUG glfw IMPORTED_LOCATION_DEBUG)
get_target_property(GLFW_DLL_RELEASE glfw IMPORTED_LOCATION_RELEASE)
endif()
return()
endif()
if(CORRADE_TARGET_WINDOWS)
if(MSVC)
if(MSVC_VERSION VERSION_LESS 1910)
set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2015)
elseif(MSVC_VERSION VERSION_LESS 1920)
set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2017)
elseif(MSVC_VERSION VERSION_LESS 1930)
set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2019)
elseif(MSVC_VERSION VERSION_LESS 1940)
set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2022)
else()
message(FATAL_ERROR "Unsupported MSVC version")
endif()
elseif(MINGW)
set(_GLFW_LIBRARY_PATH_SUFFIX lib-mingw-w64)
else()
message(FATAL_ERROR "Unsupported compiler")
endif()
endif()
# In case no config file was found, try manually finding the library. Prefer
# the glfw3dll as it's a dynamic library.
find_library(GLFW_LIBRARY
NAMES glfw glfw3dll glfw3
PATH_SUFFIXES ${_GLFW_LIBRARY_PATH_SUFFIX})
if(CORRADE_TARGET_WINDOWS AND GLFW_LIBRARY MATCHES "glfw3dll.(lib|a)$")
# TODO: debug?
find_file(GLFW_DLL_RELEASE
NAMES glfw3.dll
PATH_SUFFIXES ${_GLFW_LIBRARY_PATH_SUFFIX})
endif()
# Include dir
find_path(GLFW_INCLUDE_DIR
NAMES GLFW/glfw3.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("GLFW" DEFAULT_MSG
GLFW_LIBRARY
GLFW_INCLUDE_DIR)
if(NOT TARGET GLFW::GLFW)
add_library(GLFW::GLFW UNKNOWN IMPORTED)
# Work around BUGGY framework support on macOS
# https://cmake.org/Bug/view.php?id=14105
if(CORRADE_TARGET_APPLE AND GLFW_LIBRARY MATCHES "\\.framework$")
set_property(TARGET GLFW::GLFW PROPERTY IMPORTED_LOCATION ${GLFW_LIBRARY}/GLFW)
else()
set_property(TARGET GLFW::GLFW PROPERTY IMPORTED_LOCATION ${GLFW_LIBRARY})
endif()
set_property(TARGET GLFW::GLFW PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${GLFW_INCLUDE_DIR})
endif()
mark_as_advanced(GLFW_LIBRARY GLFW_INCLUDE_DIR)

View File

@@ -0,0 +1,60 @@
find_path(LZ4_INCLUDE_DIR
NAMES lz4.h
HINTS "${LZ4_INCLUDEDIR}" "${LZ4_HINTS}/include"
PATHS
/usr/local/include
/usr/include
)
find_library(LZ4_LIBRARY
NAMES lz4 liblz4
HINTS "${LZ4_LIBDIR}" "${LZ4_HINTS}/lib"
PATHS
/usr/local/lib
/usr/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR )
if( LZ4_FOUND )
include( CheckIncludeFile )
include( CMakePushCheckState )
set( LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR} )
set( LZ4_LIBRARIES ${LZ4_LIBRARY} )
cmake_push_check_state()
set( CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIRS} )
check_include_file( lz4frame.h HAVE_LZ4FRAME_H )
cmake_pop_check_state()
if (WIN32)
set ( LZ4_DLL_DIR "${LZ4_HINTS}/bin"
CACHE PATH "Path to LZ4 DLL"
)
file( GLOB _lz4_dll RELATIVE "${LZ4_DLL_DIR}"
"${LZ4_DLL_DIR}/lz4*.dll"
)
set ( LZ4_DLL ${_lz4_dll}
# We're storing filenames only. Should we use STRING instead?
CACHE FILEPATH "LZ4 DLL file name"
)
file( GLOB _lz4_pdb RELATIVE "${LZ4_DLL_DIR}"
"${LZ4_DLL_DIR}/lz4*.pdb"
)
set ( LZ4_PDB ${_lz4_pdb}
CACHE FILEPATH "LZ4 PDB file name"
)
mark_as_advanced( LZ4_DLL_DIR LZ4_DLL LZ4_PDB )
endif()
else()
set( LZ4_INCLUDE_DIRS )
set( LZ4_LIBRARIES )
endif()
mark_as_advanced( LZ4_LIBRARIES LZ4_INCLUDE_DIRS )
add_library( LZ4::lz4 INTERFACE IMPORTED )
set_property( TARGET LZ4::lz4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIRS} )
set_property( TARGET LZ4::lz4 PROPERTY INTERFACE_LINK_LIBRARIES ${LZ4_LIBRARIES} )

View File

@@ -0,0 +1,18 @@
find_path(LIBMAGIC_INCLUDE_DIR magic.h)
find_library(LIBMAGIC_LIBRARY NAMES magic)
if (LIBMAGIC_INCLUDE_DIR AND LIBMAGIC_LIBRARY)
set(LIBMAGIC_FOUND TRUE)
endif (LIBMAGIC_INCLUDE_DIR AND LIBMAGIC_LIBRARY)
find_package_handle_standard_args("libmagic" DEFAULT_MSG
LIBMAGIC_LIBRARY
LIBMAGIC_INCLUDE_DIR
)
mark_as_advanced(
LIBMAGIC_INCLUDE_DIR
LIBMAGIC_LIBRARY
LIBMAGIC_FOUND
)

View File

@@ -0,0 +1,611 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindPackageHandleStandardArgs
-----------------------------
This module provides functions intended to be used in :ref:`Find Modules`
implementing :command:`find_package(<PackageName>)` calls.
.. command:: find_package_handle_standard_args
This command handles the ``REQUIRED``, ``QUIET`` and version-related
arguments of :command:`find_package`. It also sets the
``<PackageName>_FOUND`` variable. The package is considered found if all
variables listed contain valid results, e.g. valid filepaths.
There are two signatures:
.. code-block:: cmake
find_package_handle_standard_args(<PackageName>
(DEFAULT_MSG|<custom-failure-message>)
<required-var>...
)
find_package_handle_standard_args(<PackageName>
[FOUND_VAR <result-var>]
[REQUIRED_VARS <required-var>...]
[VERSION_VAR <version-var>]
[HANDLE_VERSION_RANGE]
[HANDLE_COMPONENTS]
[CONFIG_MODE]
[NAME_MISMATCHED]
[REASON_FAILURE_MESSAGE <reason-failure-message>]
[FAIL_MESSAGE <custom-failure-message>]
)
The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
the variables ``<required-var>...`` are valid and any optional
constraints are satisfied, and ``FALSE`` otherwise. A success or
failure message may be displayed based on the results and on
whether the ``REQUIRED`` and/or ``QUIET`` option was given to
the :command:`find_package` call.
The options are:
``(DEFAULT_MSG|<custom-failure-message>)``
In the simple signature this specifies the failure message.
Use ``DEFAULT_MSG`` to ask for a default message to be computed
(recommended). Not valid in the full signature.
``FOUND_VAR <result-var>``
.. deprecated:: 3.3
Specifies either ``<PackageName>_FOUND`` or
``<PACKAGENAME>_FOUND`` as the result variable. This exists only
for compatibility with older versions of CMake and is now ignored.
Result variables of both names are always set for compatibility.
``REQUIRED_VARS <required-var>...``
Specify the variables which are required for this package.
These may be named in the generated failure message asking the
user to set the missing variable values. Therefore these should
typically be cache entries such as ``FOO_LIBRARY`` and not output
variables like ``FOO_LIBRARIES``.
.. versionchanged:: 3.18
If ``HANDLE_COMPONENTS`` is specified, this option can be omitted.
``VERSION_VAR <version-var>``
Specify the name of a variable that holds the version of the package
that has been found. This version will be checked against the
(potentially) specified required version given to the
:command:`find_package` call, including its ``EXACT`` option.
The default messages include information about the required
version and the version which has been actually found, both
if the version is ok or not.
``HANDLE_VERSION_RANGE``
.. versionadded:: 3.19
Enable handling of a version range, if one is specified. Without this
option, a developer warning will be displayed if a version range is
specified.
``HANDLE_COMPONENTS``
Enable handling of package components. In this case, the command
will report which components have been found and which are missing,
and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
if any of the required components (i.e. not the ones listed after
the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
missing.
``CONFIG_MODE``
Specify that the calling find module is a wrapper around a
call to ``find_package(<PackageName> NO_MODULE)``. This implies
a ``VERSION_VAR`` value of ``<PackageName>_VERSION``. The command
will automatically check whether the package configuration file
was found.
``REASON_FAILURE_MESSAGE <reason-failure-message>``
.. versionadded:: 3.16
Specify a custom message of the reason for the failure which will be
appended to the default generated message.
``FAIL_MESSAGE <custom-failure-message>``
Specify a custom failure message instead of using the default
generated message. Not recommended.
``NAME_MISMATCHED``
.. versionadded:: 3.17
Indicate that the ``<PackageName>`` does not match
``${CMAKE_FIND_PACKAGE_NAME}``. This is usually a mistake and raises a
warning, but it may be intentional for usage of the command for components
of a larger package.
Example for the simple signature:
.. code-block:: cmake
find_package_handle_standard_args(LibXml2 DEFAULT_MSG
LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
The ``LibXml2`` package is considered to be found if both
``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found
and ``REQUIRED`` was used, it fails with a
:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
used or not. If it is found, success will be reported, including
the content of the first ``<required-var>``. On repeated CMake runs,
the same message will not be printed again.
.. note::
If ``<PackageName>`` does not match ``CMAKE_FIND_PACKAGE_NAME`` for the
calling module, a warning that there is a mismatch is given. The
``FPHSA_NAME_MISMATCHED`` variable may be set to bypass the warning if using
the old signature and the ``NAME_MISMATCHED`` argument using the new
signature. To avoid forcing the caller to require newer versions of CMake for
usage, the variable's value will be used if defined when the
``NAME_MISMATCHED`` argument is not passed for the new signature (but using
both is an error)..
Example for the full signature:
.. code-block:: cmake
find_package_handle_standard_args(LibArchive
REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
VERSION_VAR LibArchive_VERSION)
In this case, the ``LibArchive`` package is considered to be found if
both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
Also the version of ``LibArchive`` will be checked by using the version
contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given,
the default messages will be printed.
Another example for the full signature:
.. code-block:: cmake
find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
find_package_handle_standard_args(Automoc4 CONFIG_MODE)
In this case, a ``FindAutmoc4.cmake`` module wraps a call to
``find_package(Automoc4 NO_MODULE)`` and adds an additional search
directory for ``automoc4``. Then the call to
``find_package_handle_standard_args`` produces a proper success/failure
message.
.. command:: find_package_check_version
.. versionadded:: 3.19
Helper function which can be used to check if a ``<version>`` is valid
against version-related arguments of :command:`find_package`.
.. code-block:: cmake
find_package_check_version(<version> <result-var>
[HANDLE_VERSION_RANGE]
[RESULT_MESSAGE_VARIABLE <message-var>]
)
The ``<result-var>`` will hold a boolean value giving the result of the check.
The options are:
``HANDLE_VERSION_RANGE``
Enable handling of a version range, if one is specified. Without this
option, a developer warning will be displayed if a version range is
specified.
``RESULT_MESSAGE_VARIABLE <message-var>``
Specify a variable to get back a message describing the result of the check.
Example for the usage:
.. code-block:: cmake
find_package_check_version(1.2.3 result HANDLE_VERSION_RANGE
RESULT_MESSAGE_VARIABLE reason)
if (result)
message (STATUS "${reason}")
else()
message (FATAL_ERROR "${reason}")
endif()
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
cmake_policy(PUSH)
# numbers and boolean constants
cmake_policy (SET CMP0012 NEW)
# IN_LIST operator
cmake_policy (SET CMP0057 NEW)
# internal helper macro
macro(_FPHSA_FAILURE_MESSAGE _msg)
set (__msg "${_msg}")
if (FPHSA_REASON_FAILURE_MESSAGE)
string(APPEND __msg "\n Reason given by package: ${FPHSA_REASON_FAILURE_MESSAGE}\n")
endif()
if (${_NAME}_FIND_REQUIRED)
message(FATAL_ERROR "${__msg}")
else ()
if (NOT ${_NAME}_FIND_QUIETLY)
message(STATUS "${__msg}")
endif ()
endif ()
endmacro()
# internal helper macro to generate the failure message when used in CONFIG_MODE:
macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
# <PackageName>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
if(${_NAME}_CONFIG)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing:${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
else()
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
# List them all in the error message:
if(${_NAME}_CONSIDERED_CONFIGS)
set(configsText "")
list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
math(EXPR configsCount "${configsCount} - 1")
foreach(currentConfigIndex RANGE ${configsCount})
list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
string(APPEND configsText "\n ${filename} (version ${version})")
endforeach()
if (${_NAME}_NOT_FOUND_MESSAGE)
if (FPHSA_REASON_FAILURE_MESSAGE)
string(PREPEND FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}\n ")
else()
set(FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}")
endif()
else()
string(APPEND configsText "\n")
endif()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:${configsText}")
else()
# Simple case: No Config-file was found at all:
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
endif()
endif()
endmacro()
function(FIND_PACKAGE_CHECK_VERSION version result)
cmake_parse_arguments (PARSE_ARGV 2 FPCV "HANDLE_VERSION_RANGE;NO_AUTHOR_WARNING_VERSION_RANGE" "RESULT_MESSAGE_VARIABLE" "")
if (FPCV_UNPARSED_ARGUMENTS)
message (FATAL_ERROR "find_package_check_version(): ${FPCV_UNPARSED_ARGUMENTS}: unexpected arguments")
endif()
if ("RESULT_MESSAGE_VARIABLE" IN_LIST FPCV_KEYWORDS_MISSING_VALUES)
message (FATAL_ERROR "find_package_check_version(): RESULT_MESSAGE_VARIABLE expects an argument")
endif()
set (${result} FALSE PARENT_SCOPE)
if (FPCV_RESULT_MESSAGE_VARIABLE)
unset (${FPCV_RESULT_MESSAGE_VARIABLE} PARENT_SCOPE)
endif()
if (_CMAKE_FPHSA_PACKAGE_NAME)
set (package "${_CMAKE_FPHSA_PACKAGE_NAME}")
elseif (CMAKE_FIND_PACKAGE_NAME)
set (package "${CMAKE_FIND_PACKAGE_NAME}")
else()
message (FATAL_ERROR "find_package_check_version(): Cannot be used outside a 'Find Module'")
endif()
if (NOT FPCV_NO_AUTHOR_WARNING_VERSION_RANGE
AND ${package}_FIND_VERSION_RANGE AND NOT FPCV_HANDLE_VERSION_RANGE)
message(AUTHOR_WARNING
"`find_package()` specify a version range but the option "
"HANDLE_VERSION_RANGE` is not passed to `find_package_check_version()`. "
"Only the lower endpoint of the range will be used.")
endif()
set (version_ok FALSE)
unset (version_msg)
if (FPCV_HANDLE_VERSION_RANGE AND ${package}_FIND_VERSION_RANGE)
if ((${package}_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE"
AND version VERSION_GREATER_EQUAL ${package}_FIND_VERSION_MIN)
AND ((${package}_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE"
AND version VERSION_LESS_EQUAL ${package}_FIND_VERSION_MAX)
OR (${package}_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE"
AND version VERSION_LESS ${package}_FIND_VERSION_MAX)))
set (version_ok TRUE)
set(version_msg "(found suitable version \"${version}\", required range is \"${${package}_FIND_VERSION_RANGE}\")")
else()
set(version_msg "Found unsuitable version \"${version}\", required range is \"${${package}_FIND_VERSION_RANGE}\"")
endif()
elseif (DEFINED ${package}_FIND_VERSION)
if(${package}_FIND_VERSION_EXACT) # exact version required
# count the dots in the version string
string(REGEX REPLACE "[^.]" "" version_dots "${version}")
# add one dot because there is one dot more than there are components
string(LENGTH "${version_dots}." version_dots)
if (version_dots GREATER ${package}_FIND_VERSION_COUNT)
# Because of the C++ implementation of find_package() ${package}_FIND_VERSION_COUNT
# is at most 4 here. Therefore a simple lookup table is used.
if (${package}_FIND_VERSION_COUNT EQUAL 1)
set(version_regex "[^.]*")
elseif (${package}_FIND_VERSION_COUNT EQUAL 2)
set(version_regex "[^.]*\\.[^.]*")
elseif (${package}_FIND_VERSION_COUNT EQUAL 3)
set(version_regex "[^.]*\\.[^.]*\\.[^.]*")
else()
set(version_regex "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*")
endif()
string(REGEX REPLACE "^(${version_regex})\\..*" "\\1" version_head "${version}")
if (NOT ${package}_FIND_VERSION VERSION_EQUAL version_head)
set(version_msg "Found unsuitable version \"${version}\", but required is exact version \"${${package}_FIND_VERSION}\"")
else ()
set(version_ok TRUE)
set(version_msg "(found suitable exact version \"${_FOUND_VERSION}\")")
endif ()
else ()
if (NOT ${package}_FIND_VERSION VERSION_EQUAL version)
set(version_msg "Found unsuitable version \"${version}\", but required is exact version \"${${package}_FIND_VERSION}\"")
else ()
set(version_ok TRUE)
set(version_msg "(found suitable exact version \"${version}\")")
endif ()
endif ()
else() # minimum version
if (${package}_FIND_VERSION VERSION_GREATER version)
set(version_msg "Found unsuitable version \"${version}\", but required is at least \"${${package}_FIND_VERSION}\"")
else()
set(version_ok TRUE)
set(version_msg "(found suitable version \"${version}\", minimum required is \"${${package}_FIND_VERSION}\")")
endif()
endif()
else ()
set(version_ok TRUE)
set(version_msg "(found version \"${version}\")")
endif()
set (${result} ${version_ok} PARENT_SCOPE)
if (FPCV_RESULT_MESSAGE_VARIABLE)
set (${FPCV_RESULT_MESSAGE_VARIABLE} "${version_msg}" PARENT_SCOPE)
endif()
endfunction()
function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# Set up the arguments for `cmake_parse_arguments`.
set(options CONFIG_MODE HANDLE_COMPONENTS NAME_MISMATCHED HANDLE_VERSION_RANGE)
set(oneValueArgs FAIL_MESSAGE REASON_FAILURE_MESSAGE VERSION_VAR FOUND_VAR)
set(multiValueArgs REQUIRED_VARS)
# Check whether we are in 'simple' or 'extended' mode:
set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
unset(FPHSA_NAME_MISMATCHED_override)
if (DEFINED FPHSA_NAME_MISMATCHED)
# If the variable NAME_MISMATCHED variable is set, error if it is passed as
# an argument. The former is for old signatures, the latter is for new
# signatures.
list(FIND ARGN "NAME_MISMATCHED" name_mismatched_idx)
if (NOT name_mismatched_idx EQUAL "-1")
message(FATAL_ERROR
"The `NAME_MISMATCHED` argument may only be specified by the argument or "
"the variable, not both.")
endif ()
# But use the variable if it is not an argument to avoid forcing minimum
# CMake version bumps for calling modules.
set(FPHSA_NAME_MISMATCHED_override "${FPHSA_NAME_MISMATCHED}")
endif ()
if(${INDEX} EQUAL -1)
set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
set(FPHSA_REQUIRED_VARS ${ARGN})
set(FPHSA_VERSION_VAR)
else()
cmake_parse_arguments(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
if(FPHSA_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
endif()
if(NOT FPHSA_FAIL_MESSAGE)
set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
endif()
# In config-mode, we rely on the variable <PackageName>_CONFIG, which is set by find_package()
# when it successfully found the config-file, including version checking:
if(FPHSA_CONFIG_MODE)
list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
endif()
if(NOT FPHSA_REQUIRED_VARS AND NOT FPHSA_HANDLE_COMPONENTS)
message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
endif()
endif()
if (DEFINED FPHSA_NAME_MISMATCHED_override)
set(FPHSA_NAME_MISMATCHED "${FPHSA_NAME_MISMATCHED_override}")
endif ()
if (DEFINED CMAKE_FIND_PACKAGE_NAME
AND NOT FPHSA_NAME_MISMATCHED
AND NOT _NAME STREQUAL CMAKE_FIND_PACKAGE_NAME)
message(AUTHOR_WARNING
"The package name passed to `find_package_handle_standard_args` "
"(${_NAME}) does not match the name of the calling package "
"(${CMAKE_FIND_PACKAGE_NAME}). This can lead to problems in calling "
"code that expects `find_package` result variables (e.g., `_FOUND`) "
"to follow a certain pattern.")
endif ()
if (${_NAME}_FIND_VERSION_RANGE AND NOT FPHSA_HANDLE_VERSION_RANGE)
message(AUTHOR_WARNING
"`find_package()` specify a version range but the module ${_NAME} does "
"not support this capability. Only the lower endpoint of the range "
"will be used.")
endif()
# to propagate package name to FIND_PACKAGE_CHECK_VERSION
set(_CMAKE_FPHSA_PACKAGE_NAME "${_NAME}")
# now that we collected all arguments, process them
if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
endif()
if (FPHSA_REQUIRED_VARS)
list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
endif()
string(TOUPPER ${_NAME} _NAME_UPPER)
string(TOLOWER ${_NAME} _NAME_LOWER)
if(FPHSA_FOUND_VAR)
set(_FOUND_VAR_UPPER ${_NAME_UPPER}_FOUND)
set(_FOUND_VAR_MIXED ${_NAME}_FOUND)
if(FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_MIXED OR FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_UPPER)
set(_FOUND_VAR ${FPHSA_FOUND_VAR})
else()
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_FOUND_VAR_MIXED}\" and \"${_FOUND_VAR_UPPER}\" are valid names.")
endif()
else()
set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
endif()
# collect all variables which were not found, so they can be printed, so the
# user knows better what went wrong (#6375)
set(MISSING_VARS "")
set(DETAILS "")
# check if all passed variables are valid
set(FPHSA_FOUND_${_NAME} TRUE)
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
if(NOT ${_CURRENT_VAR})
set(FPHSA_FOUND_${_NAME} FALSE)
string(APPEND MISSING_VARS " ${_CURRENT_VAR}")
else()
string(APPEND DETAILS "[${${_CURRENT_VAR}}]")
endif()
endforeach()
if(FPHSA_FOUND_${_NAME})
set(${_NAME}_FOUND TRUE)
set(${_NAME_UPPER}_FOUND TRUE)
else()
set(${_NAME}_FOUND FALSE)
set(${_NAME_UPPER}_FOUND FALSE)
endif()
# component handling
unset(FOUND_COMPONENTS_MSG)
unset(MISSING_COMPONENTS_MSG)
if(FPHSA_HANDLE_COMPONENTS)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(${_NAME}_${comp}_FOUND)
if(NOT DEFINED FOUND_COMPONENTS_MSG)
set(FOUND_COMPONENTS_MSG "found components:")
endif()
string(APPEND FOUND_COMPONENTS_MSG " ${comp}")
else()
if(NOT DEFINED MISSING_COMPONENTS_MSG)
set(MISSING_COMPONENTS_MSG "missing components:")
endif()
string(APPEND MISSING_COMPONENTS_MSG " ${comp}")
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
string(APPEND MISSING_VARS " ${comp}")
endif()
endif()
endforeach()
set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
string(APPEND DETAILS "[c${COMPONENT_MSG}]")
endif()
# version handling:
set(VERSION_MSG "")
set(VERSION_OK TRUE)
# check that the version variable is not empty to avoid emitting a misleading
# message (i.e. `Found unsuitable version ""`)
if (DEFINED ${_NAME}_FIND_VERSION)
if(DEFINED ${FPHSA_VERSION_VAR})
if(NOT "${${FPHSA_VERSION_VAR}}" STREQUAL "")
set(_FOUND_VERSION ${${FPHSA_VERSION_VAR}})
if (FPHSA_HANDLE_VERSION_RANGE)
set (FPCV_HANDLE_VERSION_RANGE HANDLE_VERSION_RANGE)
else()
set(FPCV_HANDLE_VERSION_RANGE NO_AUTHOR_WARNING_VERSION_RANGE)
endif()
find_package_check_version ("${_FOUND_VERSION}" VERSION_OK RESULT_MESSAGE_VARIABLE VERSION_MSG
${FPCV_HANDLE_VERSION_RANGE})
else()
set(VERSION_OK FALSE)
endif()
endif()
if("${${FPHSA_VERSION_VAR}}" STREQUAL "")
# if the package was not found, but a version was given, add that to the output:
if(${_NAME}_FIND_VERSION_EXACT)
set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
elseif (FPHSA_HANDLE_VERSION_RANGE AND ${_NAME}_FIND_VERSION_RANGE)
set(VERSION_MSG "(Required is version range \"${${_NAME}_FIND_VERSION_RANGE}\")")
else()
set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
endif()
endif()
else ()
# Check with DEFINED as the found version may be 0.
if(DEFINED ${FPHSA_VERSION_VAR})
set(VERSION_MSG "(found version \"${${FPHSA_VERSION_VAR}}\")")
endif()
endif ()
if(VERSION_OK)
string(APPEND DETAILS "[v${${FPHSA_VERSION_VAR}}(${${_NAME}_FIND_VERSION})]")
else()
set(${_NAME}_FOUND FALSE)
endif()
# print the result:
if (${_NAME}_FOUND)
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
else ()
if(FPHSA_CONFIG_MODE)
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
else()
if(NOT VERSION_OK)
set(RESULT_MSG)
if (_FIRST_REQUIRED_VAR)
string (APPEND RESULT_MSG "found ${${_FIRST_REQUIRED_VAR}}")
endif()
if (COMPONENT_MSG)
if (RESULT_MSG)
string (APPEND RESULT_MSG ", ")
endif()
string (APPEND RESULT_MSG "${FOUND_COMPONENTS_MSG}")
endif()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (${RESULT_MSG})")
else()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}")
endif()
endif()
endif ()
set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
endfunction()
cmake_policy(POP)

View File

@@ -0,0 +1,48 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindPackageMessage
------------------
.. code-block:: cmake
find_package_message(<name> "message for user" "find result details")
This function is intended to be used in FindXXX.cmake modules files.
It will print a message once for each unique find result. This is
useful for telling the user where a package was found. The first
argument specifies the name (XXX) of the package. The second argument
specifies the message to display. The third argument lists details
about the find result so that if they change the message will be
displayed again. The macro also obeys the QUIET argument to the
find_package command.
Example:
.. code-block:: cmake
if(X11_FOUND)
find_package_message(X11 "Found X11: ${X11_X11_LIB}"
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
else()
...
endif()
#]=======================================================================]
function(find_package_message pkg msg details)
# Avoid printing a message repeatedly for the same find result.
if(NOT ${pkg}_FIND_QUIETLY)
string(REPLACE "\n" "" details "${details}")
set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed.
message(STATUS "${msg}")
# Save the find details in the cache to avoid printing the same
# message again.
set("${DETAILS_VAR}" "${details}"
CACHE INTERNAL "Details about finding ${pkg}")
endif()
endif()
endfunction()

View File

@@ -0,0 +1,4 @@
find_library(YARA_LIBRARIES NAMES yara)
find_file(yara.h YARA_INCLUDE_DIRS)
mark_as_advanced(YARA_LIBRARIES YARA_INCLUDE_DIRS)

View File

@@ -0,0 +1,45 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# - Try to find Facebook zstd library
# This will define
# ZSTD_FOUND
# ZSTD_INCLUDE_DIR
# ZSTD_LIBRARY
#
find_path(ZSTD_INCLUDE_DIR NAMES zstd.h)
find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd)
find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static)
include(SelectLibraryConfigurations)
SELECT_LIBRARY_CONFIGURATIONS(ZSTD)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
ZSTD DEFAULT_MSG
ZSTD_LIBRARY ZSTD_INCLUDE_DIR
)
if (ZSTD_FOUND)
message(STATUS "Found Zstd: ${ZSTD_LIBRARY}")
endif()
mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
add_library(ZSTD::zstd INTERFACE IMPORTED)
set_property(TARGET ZSTD::zstd PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR})
set_property(TARGET ZSTD::zstd PROPERTY INTERFACE_LINK_LIBRARIES ${ZSTD_LIBRARY})

View File

@@ -40,7 +40,12 @@ IF(MBEDTLS_FOUND)
STRING(REGEX REPLACE "^lib" "" MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY_FILE})
STRING(REGEX REPLACE "^lib" "" MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY_FILE})
STRING(REGEX REPLACE "^lib" "" MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY_FILE})
SET(MBEDTLS_LIBRARIES "-L${MBEDTLS_LIBRARY_DIR} -l${MBEDTLS_LIBRARY_FILE} -l${MBEDX509_LIBRARY_FILE} -l${MBEDCRYPTO_LIBRARY_FILE}")
if (MSVC)
SET(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY_FILE}.lib ${MBEDX509_LIBRARY_FILE}.lib ${MBEDCRYPTO_LIBRARY_FILE}.lib)
else()
SET(MBEDTLS_LIBRARIES "-L${MBEDTLS_LIBRARY_DIR} -l${MBEDTLS_LIBRARY_FILE} -l${MBEDX509_LIBRARY_FILE} -l${MBEDCRYPTO_LIBRARY_FILE}")
endif()
IF(NOT MBEDTLS_FIND_QUIETLY)
MESSAGE(STATUS "Found mbedTLS:")
@@ -55,9 +60,9 @@ IF(MBEDTLS_FOUND)
MESSAGE(STATUS " Crypto: ${MBEDCRYPTO_LIBRARY}")
ENDIF(NOT MBEDTLS_FIND_QUIETLY)
ELSE(MBEDTLS_FOUND)
IF(MBEDTLS_FIND_REQUIRED)
IF(mbedTLS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find mbedTLS")
ENDIF(MBEDTLS_FIND_REQUIRED)
ENDIF(mbedTLS_FIND_REQUIRED)
ENDIF(MBEDTLS_FOUND)
MARK_AS_ADVANCED(
@@ -67,4 +72,4 @@ MARK_AS_ADVANCED(
MBEDTLS_LIBRARY
MBEDX509_LIBRARY
MBEDCRYPTO_LIBRARY
)
)

View File

@@ -0,0 +1,159 @@
macro(add_imhex_plugin)
setSDKPaths()
# Parse arguments
set(options LIBRARY_PLUGIN)
set(oneValueArgs NAME IMHEX_VERSION)
set(multiValueArgs SOURCES INCLUDES LIBRARIES FEATURES)
cmake_parse_arguments(IMHEX_PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (IMHEX_PLUGIN_IMHEX_VERSION)
message(STATUS "Compiling plugin ${IMHEX_PLUGIN_NAME} for ImHex Version ${IMHEX_PLUGIN_IMHEX_VERSION}")
set(IMHEX_VERSION_STRING "${IMHEX_PLUGIN_IMHEX_VERSION}")
endif()
if (IMHEX_STATIC_LINK_PLUGINS)
set(IMHEX_PLUGIN_LIBRARY_TYPE STATIC)
target_link_libraries(libimhex PUBLIC ${IMHEX_PLUGIN_NAME})
configure_file(${CMAKE_SOURCE_DIR}/dist/web/plugin-bundle.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/plugin-bundle.cpp @ONLY)
target_sources(main PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/plugin-bundle.cpp)
set(IMHEX_PLUGIN_SUFFIX ".hexplug")
else()
if (IMHEX_PLUGIN_LIBRARY_PLUGIN)
set(IMHEX_PLUGIN_LIBRARY_TYPE SHARED)
set(IMHEX_PLUGIN_SUFFIX ".hexpluglib")
else()
set(IMHEX_PLUGIN_LIBRARY_TYPE MODULE)
set(IMHEX_PLUGIN_SUFFIX ".hexplug")
endif()
endif()
if (IMHEX_PLUGIN_LIBRARY_PLUGIN)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION "${SDK_PATH}/lib/plugins/${IMHEX_PLUGIN_NAME}")
endif()
# Define new project for plugin
project(${IMHEX_PLUGIN_NAME})
# Create a new shared library for the plugin source code
add_library(${IMHEX_PLUGIN_NAME} ${IMHEX_PLUGIN_LIBRARY_TYPE} ${IMHEX_PLUGIN_SOURCES})
# Add include directories and link libraries
target_include_directories(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_INCLUDES})
target_link_libraries(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_LIBRARIES})
target_link_libraries(${IMHEX_PLUGIN_NAME} PRIVATE libimhex ${FMT_LIBRARIES} imgui_all_includes libwolv)
addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl)
addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl-gen)
precompileHeaders(${IMHEX_PLUGIN_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/include")
# Add IMHEX_PROJECT_NAME and IMHEX_VERSION define
target_compile_definitions(${IMHEX_PLUGIN_NAME} PRIVATE IMHEX_PROJECT_NAME="${IMHEX_PLUGIN_NAME}")
target_compile_definitions(${IMHEX_PLUGIN_NAME} PRIVATE IMHEX_VERSION="${IMHEX_VERSION_STRING}")
target_compile_definitions(${IMHEX_PLUGIN_NAME} PRIVATE IMHEX_PLUGIN_NAME=${IMHEX_PLUGIN_NAME})
# Enable required compiler flags
enableUnityBuild(${IMHEX_PLUGIN_NAME})
setupCompilerFlags(${IMHEX_PLUGIN_NAME})
# Configure build properties
set_target_properties(${IMHEX_PLUGIN_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${IMHEX_MAIN_OUTPUT_DIRECTORY}/plugins"
CXX_STANDARD 23
PREFIX ""
SUFFIX ${IMHEX_PLUGIN_SUFFIX}
)
# Set rpath of plugin libraries to the plugins folder
if (WIN32)
if (IMHEX_PLUGIN_LIBRARY_PLUGIN)
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
endif()
elseif (APPLE)
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES BUILD_RPATH "@executable_path/../Frameworks;@executable_path/plugins")
endif()
# Setup a romfs for the plugin
list(APPEND LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs)
set(LIBROMFS_PROJECT_NAME ${IMHEX_PLUGIN_NAME})
add_subdirectory(${IMHEX_BASE_FOLDER}/lib/external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/libromfs)
target_link_libraries(${IMHEX_PLUGIN_NAME} PRIVATE ${LIBROMFS_LIBRARY})
set(FEATURE_DEFINE_CONTENT)
if (IMHEX_PLUGIN_FEATURES)
list(LENGTH IMHEX_PLUGIN_FEATURES IMHEX_FEATURE_COUNT)
math(EXPR IMHEX_FEATURE_COUNT "${IMHEX_FEATURE_COUNT} - 1" OUTPUT_FORMAT DECIMAL)
foreach(index RANGE 0 ${IMHEX_FEATURE_COUNT} 2)
list(SUBLIST IMHEX_PLUGIN_FEATURES ${index} 2 IMHEX_PLUGIN_FEATURE)
list(GET IMHEX_PLUGIN_FEATURE 0 feature_define)
list(GET IMHEX_PLUGIN_FEATURE 1 feature_description)
string(TOUPPER ${feature_define} feature_define)
add_definitions(-DIMHEX_PLUGIN_${IMHEX_PLUGIN_NAME}_FEATURE_${feature_define}=0)
set(FEATURE_DEFINE_CONTENT "${FEATURE_DEFINE_CONTENT}{ \"${feature_description}\", IMHEX_FEATURE_ENABLED(${feature_define}) },")
endforeach()
endif()
target_compile_options(${IMHEX_PLUGIN_NAME} PRIVATE -DIMHEX_PLUGIN_FEATURES_CONTENT=${FEATURE_DEFINE_CONTENT})
# Add the new plugin to the main dependency list so it gets built by default
if (TARGET imhex_all)
add_dependencies(imhex_all ${IMHEX_PLUGIN_NAME})
endif()
if (IMHEX_EXTERNAL_PLUGIN_BUILD)
install(TARGETS ${IMHEX_PLUGIN_NAME} DESTINATION ".")
endif()
# Fix rpath
if (APPLE)
set_target_properties(
${IMHEX_PLUGIN_NAME}
PROPERTIES
INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/plugins"
)
elseif (UNIX)
set(PLUGIN_RPATH "")
list(APPEND PLUGIN_RPATH "$ORIGIN")
if (IMHEX_PLUGIN_ADD_INSTALL_PREFIX_TO_RPATH)
list(APPEND PLUGIN_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
set_target_properties(
${IMHEX_PLUGIN_NAME}
PROPERTIES
INSTALL_RPATH_USE_ORIGIN ON
INSTALL_RPATH "${PLUGIN_RPATH}"
)
endif()
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt AND IMHEX_ENABLE_UNIT_TESTS AND IMHEX_ENABLE_PLUGIN_TESTS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
target_link_libraries(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_NAME}_tests)
target_compile_definitions(${IMHEX_PLUGIN_NAME}_tests PRIVATE IMHEX_PROJECT_NAME="${IMHEX_PLUGIN_NAME}-tests")
endif()
endmacro()
macro(add_romfs_resource input output)
if (NOT EXISTS ${input})
message(WARNING "Resource file ${input} does not exist")
endif()
configure_file(${input} ${CMAKE_CURRENT_BINARY_DIR}/romfs/${output} COPYONLY)
list(APPEND LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/romfs)
endmacro()
macro (enable_plugin_feature feature)
string(TOUPPER ${feature} feature)
if (NOT (feature IN_LIST IMHEX_PLUGIN_FEATURES))
message(FATAL_ERROR "Feature ${feature} is not enabled for plugin ${IMHEX_PLUGIN_NAME}")
endif()
remove_definitions(-DIMHEX_PLUGIN_${IMHEX_PLUGIN_NAME}_FEATURE_${feature}=0)
add_definitions(-DIMHEX_PLUGIN_${IMHEX_PLUGIN_NAME}_FEATURE_${feature}=1)
endmacro()

View File

@@ -14,39 +14,47 @@ if(CMAKE_GENERATOR)
# Being called as include(PostprocessBundle), so define a helper function.
set(_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}")
function(postprocess_bundle out_target in_target)
add_custom_command(TARGET ${out_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -DBUNDLE_PATH="$<TARGET_FILE_DIR:${in_target}>/../.." -DCODE_SIGN_CERTIFICATE_ID="${CODE_SIGN_CERTIFICATE_ID}"
-P "${_POSTPROCESS_BUNDLE_MODULE_LOCATION}"
)
install(CODE "set(BUNDLE_PATH ${CMAKE_INSTALL_PREFIX}/${BUNDLE_NAME})")
install(CODE "set(CODE_SIGN_CERTIFICATE_ID ${CODE_SIGN_CERTIFICATE_ID})")
install(CODE "set(EXTRA_BUNDLE_LIBRARY_PATHS ${EXTRA_BUNDLE_LIBRARY_PATHS})")
install(SCRIPT ${_POSTPROCESS_BUNDLE_MODULE_LOCATION})
endfunction()
return()
endif()
# IMHEX PATCH BEGIN
# The function defined above doesn't keep in mind that if we are cross-compiling to MacOS, APPLE must be 1,
# so we force it here (where else would this script be run anyway ? This seems to be MacOS-specific code)
SET(APPLE 1)
# IMHEX PATCHE END
get_filename_component(BUNDLE_PATH "${BUNDLE_PATH}" ABSOLUTE)
message(STATUS "Fixing up application bundle: ${BUNDLE_PATH}")
# Make sure to fix up any included ImHex plugin.
file(GLOB_RECURSE extra_libs "${BUNDLE_PATH}/Contents/MacOS/plugins/*.hexplug")
file(GLOB_RECURSE plugins "${BUNDLE_PATH}/Contents/MacOS/plugins/*.hexplug")
message(STATUS "Fixing up application bundle: ${extra_dirs}")
# BundleUtilities doesn't support DYLD_FALLBACK_LIBRARY_PATH behavior, which
# makes it sometimes break on libraries that do weird things with @rpath. Specify
# equivalent search directories until https://gitlab.kitware.com/cmake/cmake/issues/16625
# is fixed and in our minimum CMake version.
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib" ${EXTRA_BUNDLE_LIBRARY_PATHS} "${BUNDLE_PATH}/Contents/MacOS/plugins" "${BUNDLE_PATH}/Contents/Frameworks")
message(STATUS "Fixing up application bundle: ${extra_dirs}")
# BundleUtilities is overly verbose, so disable most of its messages
function(message)
if(NOT ARGV MATCHES "^STATUS;")
_message(${ARGV})
endif()
endfunction()
#function(message)
# if(NOT ARGV MATCHES "^STATUS;")
# _message(${ARGV})
# endif()
#endfunction()
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle("${BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}" IGNORE_ITEM "Python")
fixup_bundle("${BUNDLE_PATH}" "${plugins}" "${extra_dirs}")
if (CODE_SIGN_CERTIFICATE_ID)
# Hack around Apple Silicon signing bugs by copying the real app, signing it and moving it back.
@@ -58,4 +66,13 @@ if (CODE_SIGN_CERTIFICATE_ID)
endif()
# Add a necessary rpath to the imhex binary
get_bundle_main_executable("${BUNDLE_PATH}" IMHEX_EXECUTABLE)
get_bundle_main_executable("${BUNDLE_PATH}" IMHEX_EXECUTABLE)
file(GLOB_RECURSE plugin_libs "${BUNDLE_PATH}/Contents/MacOS/*.hexpluglib")
foreach(plugin_lib ${plugin_libs})
get_filename_component(plugin_lib_name ${plugin_lib} NAME)
set(plugin_lib_dest "${BUNDLE_PATH}/Contents/MacOS/plugins/${plugin_lib_name}")
configure_file(${plugin_lib} "${plugin_lib_dest}" COPYONLY)
message(STATUS "Copying plugin library: ${plugin_lib} to ${plugin_lib_dest}")
endforeach ()

67
cmake/sdk/CMakeLists.txt Normal file
View File

@@ -0,0 +1,67 @@
cmake_minimum_required(VERSION 3.20)
project(ImHexSDK)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "" FORCE)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_helpers.cmake")
set(IMHEX_BASE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
include(ImHexPlugin)
function(add_subdirectory_if_exists folder)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${folder}/CMakeLists.txt")
add_subdirectory("${folder}" EXCLUDE_FROM_ALL)
endif()
endfunction()
set(IMHEX_EXTERNAL_PLUGIN_BUILD ON PARENT_SCOPE)
set(IMHEX_EXTERNAL_PLUGIN_BUILD ON)
add_custom_target(imhex_all)
add_subdirectory(lib/third_party/imgui EXCLUDE_FROM_ALL)
set(FMT_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory_if_exists(lib/third_party/fmt)
set(FMT_LIBRARIES fmt::fmt-header-only PARENT_SCOPE)
set(FMT_LIBRARIES fmt::fmt-header-only)
add_subdirectory_if_exists(lib/third_party/nlohmann_json)
set(NLOHMANN_JSON_LIBRARIES nlohmann_json PARENT_SCOPE)
set(NLOHMANN_JSON_LIBRARIES nlohmann_json)
add_subdirectory_if_exists(lib/third_party/boost)
set(BOOST_LIBRARIES boost::regex PARENT_SCOPE)
set(BOOST_LIBRARIES boost::regex)
add_subdirectory(lib/external/libwolv EXCLUDE_FROM_ALL)
set(LIBPL_ENABLE_CLI OFF CACHE BOOL "" FORCE)
add_subdirectory(lib/external/pattern_language EXCLUDE_FROM_ALL)
add_subdirectory(lib/libimhex)
add_subdirectory(lib/trace)
if (WIN32)
set_target_properties(libimhex PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libimhex.dll"
IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/liblibimhex.dll.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimhex/include")
set_target_properties(tracing PROPERTIES
IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/libtracing.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/trace/include")
elseif (APPLE)
file(GLOB LIBIMHEX_DYLIB "${CMAKE_CURRENT_SOURCE_DIR}/../../Frameworks/libimhex.*.dylib")
set_target_properties(libimhex PROPERTIES
IMPORTED_LOCATION "${LIBIMHEX_DYLIB}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimhex/include")
set_target_properties(tracing PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libtracing.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/trace/include")
else()
set_target_properties(libimhex PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libimhex.so"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimhex/include")
set_target_properties(tracing PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libtracing.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/trace/include")
endif()

View File

@@ -0,0 +1,60 @@
# ImHex Plugin Template
# =====================
# This is the official CMake template for making your own ImHex plugins
# To use this template, copy the file into its own directory and modify it to your needs
# For the most part, this is a regular CMake project with some extra functions provided by the ImHex SDK
#
# [NOTE FOR NON-C++ PLUGINS]
# The template is laid out for a C++ plugin, however you can write your plugin in any language you want
# and just make the plugin statically link against your code. The only thing that's required is a .cpp file with
# the IMHEX_PLUGIN_SETUP() macro used in it. This macro is used to setup the plugin and register it with ImHex
#
# [CMAKE FUNCTIONS]
# add_imhex_plugin(): Registers a new plugin
# NAME: The name of the plugin
# IMHEX_VERSION: The ImHex version this plugin is compatible with. If unset, the plugin will be loaded on all versions (this may not work though)
# SOURCES: Source files of the plugin
# INCLUDES: Include directories of the plugin
# LIBRARIES: Libraries to link against
# FEATURES: Optional features that can be enabled or disabled
# LIBRARY_PLUGIN: If set, turns this plugin into a library plugin. Library plugins can be linked against by other plugins
#
# add_romfs_resource(filePath romfsPath): Adds a file to the romfs of the plugin
# The RomFS is a virtual filesystem whose files can be accessed by the plugin using the functions in the `romfs::` namespace
# This function is used to add a single file to the romfs. You can however also simply create a `romfs` directory in your plugin directory and place your files and folders in there
# filePath: The path to the file on the disk
# romfsPath: The path to the file in the romfs
#
# enable_plugin_feature(feature): Enables a plugin feature
# Features are optional parts of the plugin that may or may not be available depending on build settings
# When a feature is enabled, `IMHEX_FEATURE_ENABLED(feature)` will be defined to true. Otherwise, it will be defined to false
# Use the `IMHEX_PLUGIN_FEATURES` macro in the main plugin file to define names to each feature and have them be listed in the plugin list
# feature: The name of the feature to enable
cmake_minimum_required(VERSION 3.20)
project(ImHexPlugin)
# Include the ImHex SDK
# For this to work, you need to set the IMHEX_SDK_PATH environment variable to the path of the ImHex SDK
#
# On Windows, the SDK is next to the ImHex executable
# On Linux, the SDK is usually in /usr/share/imhex/sdk but this may vary depending on your distribution
# On MacOS, the SDK is located inside of the ImHex.app bundle under ImHex.app/Contents/Resources/sdk
if (NOT EXISTS $ENV{IMHEX_SDK_PATH})
message(FATAL_ERROR "The IMHEX_SDK_PATH environment variable is not set")
endif()
add_subdirectory($ENV{IMHEX_SDK_PATH} ImHexSDK)
# Register the plugin
# This will configure everything you need to make your plugin work
# Modify the arguments to your needs. Right now it defines a plugin called `example_plugin`
# with a single source file called `example_plugin.cpp` in the `source` directory
# By default you have access to the libimhex library to interact with ImHex
# as well as libwolv, libromfs, libfmt and ImGui, but you can link against any libraries you want
add_imhex_plugin(
NAME
example_plugin
SOURCES
source/example_plugin.cpp
)

View File

@@ -0,0 +1,11 @@
#include <hex/plugin.hpp>
// Browse through the headers in lib/libimhex/include/hex/api/ to see what you can do with the API.
// Most important ones are <hex/api/imhex_api.hpp> and <hex/api/content_registry.hpp>
// This is the main entry point of your plugin. The code in the body of this construct will be executed
// when ImHex starts up and loads the plugin.
// The strings in the header are used to display information about the plugin in the UI.
IMHEX_PLUGIN_SETUP("Example Plugin", "Author", "Description") {
// Put your init code here
}

View File

@@ -11,35 +11,25 @@ AppDir:
exec_args: $@
apt:
arch:
- amd64
- "{{ARCHITECTURE_PACKAGE}}"
allow_unauthenticated: true
sources:
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
- sourceline: deb http://.archive.ubuntu.com/ubuntu/ jammy-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security multiverse
- sourceline: 'deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ oracular main restricted universe multiverse'
- sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ oracular main restricted universe multiverse'
include:
- librsvg2-common
- libbz2-1.0:amd64
- libcap2:amd64
- libdbus-1-3:amd64
- libgpg-error0:amd64
- liblzma5:amd64
- libnss-mdns:amd64
- libpcre3:amd64
- libselinux1:amd64
- libtinfo6:amd64
- libbz2-1.0
- libcap2
- libdbus-1-3
- libfontconfig1
- libgpg-error0
- liblzma5
- libnss-mdns
- libpcre3
- libselinux1
- libtinfo6
files:
include:
- /lib/x86_64-linux-gnu/libGLX.so.0
- /lib/x86_64-linux-gnu/libGLdispatch.so.0
- /lib/x86_64-linux-gnu/libLLVM-13.so.1
- /lib/x86_64-linux-gnu/libOpenGL.so.0
- /lib/x86_64-linux-gnu/libX11.so.6
@@ -64,6 +54,7 @@ AppDir:
- /lib/x86_64-linux-gnu/libbsd.so.0
- /lib/x86_64-linux-gnu/libcairo-gobject.so.2
- /lib/x86_64-linux-gnu/libcairo.so.2
- /lib/x86_64-linux-gnu/libcurl-gnutls.so.4
- /lib/x86_64-linux-gnu/libdatrie.so.1
- /lib/x86_64-linux-gnu/libedit.so.2
- /lib/x86_64-linux-gnu/libelf.so.1
@@ -76,7 +67,6 @@ AppDir:
- /lib/x86_64-linux-gnu/libgdk-3.so.0
- /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
- /lib/x86_64-linux-gnu/libgio-2.0.so.0
- /lib/x86_64-linux-gnu/libglapi.so.0
- /lib/x86_64-linux-gnu/libglfw.so.3
- /lib/x86_64-linux-gnu/libglib-2.0.so.0
- /lib/x86_64-linux-gnu/libgmodule-2.0.so.0
@@ -107,7 +97,6 @@ AppDir:
- /lib/x86_64-linux-gnu/libpcre2-8.so.0
- /lib/x86_64-linux-gnu/libpixman-1.so.0
- /lib/x86_64-linux-gnu/libpng16.so.16
- /lib/x86_64-linux-gnu/libpython3.10.so.1.0
- /lib/x86_64-linux-gnu/libsasl2.so.2
- /lib/x86_64-linux-gnu/libsensors.so.5
- /lib/x86_64-linux-gnu/libstdc++.so.6
@@ -135,6 +124,6 @@ AppDir:
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
AppImage:
arch: x86_64
update-information: gh-releases-zsync|WerWolv|ImHex|latest|imhex-*.AppImage.zsync
file_name: imhex-{{VERSION}}.AppImage
arch: "{{ARCHITECTURE_APPIMAGE_BUILDER}}"
update-information: gh-releases-zsync|WerWolv|ImHex|latest|imhex-*-{{ARCHITECTURE_FILE_NAME}}.AppImage.zsync
file_name: imhex-{{VERSION}}-{{ARCHITECTURE_FILE_NAME}}.AppImage

91
dist/AppImage/Dockerfile vendored Normal file
View File

@@ -0,0 +1,91 @@
FROM ubuntu:24.10 as build
# Used to invalidate layer cache but not mount cache
# See https://github.com/moby/moby/issues/41715#issuecomment-733976493
ARG UNIQUEKEY 1
COPY dist/get_deps_debian.sh /tmp
RUN --mount=type=cache,target=/var/apt/cache <<EOF
# Install apt dependencies
set -xe
apt update
# general deps
apt install -y ccache git wget
# appimage tools deps
apt install -y python3-pip python3-venv python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fuse ninja-build
apt install -y squashfs-tools zsync
# imhex deps
/tmp/get_deps_debian.sh
EOF
ENV PATH="/cache/bin/:${PATH}"
# Copy Imhex source
COPY . /imhex
ARG LTO=ON
ARG BUILD_TYPE=RelWithDebInfo
ARG GIT_COMMIT_HASH
ARG GIT_BRANCH
ARG ARCHITECTURE_PACKAGE
ARG ARCHITECTURE_FILE_NAME
ARG ARCHITECTURE_APPIMAGE_BUILDER
WORKDIR /build
# Ubuntu sh doesnt support string substitution
SHELL ["bash", "-c"]
RUN <<EOF
# Prepare ImHex build
set -xe
CC=gcc-14 CXX=g++-14 cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
-DIMHEX_COMMIT_HASH_LONG="${GIT_COMMIT_HASH}" \
-DIMHEX_COMMIT_BRANCH="${GIT_BRANCH}" \
-DIMHEX_ENABLE_LTO=${LTO} \
-DIMHEX_PLUGINS_IN_SHARE=ON \
/imhex
EOF
ENV CCACHE_DIR /cache/ccache
RUN --mount=type=cache,target=/cache <<EOF
# Build Imhex
set -xe
ccache -zs
DESTDIR=AppDir ninja install
ccache -s
EOF
RUN <<EOF
# Download appimage-builder
set -xe
mkdir -p /cache/bin
wget -nc https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /cache/bin/appimagetool || true
chmod +x /cache/bin/appimagetool
python3 -m venv venv
. venv/bin/activate
pip3 install git+https://github.com/AppImageCrafters/appimage-builder@f38699e
# Package ImHex as AppImage
export VERSION=$(cat /imhex/VERSION)
export ARCHITECTURE_PACKAGE=${ARCHITECTURE_PACKAGE}
export ARCHITECTURE_FILE_NAME=${ARCHITECTURE_FILE_NAME}
export ARCHITECTURE_APPIMAGE_BUILDER=${ARCHITECTURE_APPIMAGE_BUILDER}
appimage-builder --recipe /imhex/dist/AppImage/AppImageBuilder.yml
EOF
FROM scratch
# Copy build artifact
COPY --from=build /build/*.AppImage /build/*.AppImage.zsync ./

View File

@@ -1,6 +1,6 @@
FROM archlinux:latest
MAINTAINER WerWolv "hey@werwolv.net"
LABEL maintainer="hey@werwolv.net WerWolv"
# Install dependencies
RUN pacman -Syy --needed --noconfirm
@@ -13,8 +13,9 @@ RUN pacman -S --needed --noconfirm \
glfw-x11 \
file \
mbedtls \
python3 \
fontconfig \
freetype2 \
curl \
dbus \
xdg-desktop-portal
@@ -25,4 +26,4 @@ RUN git clone https://github.com/WerWolv/ImHex --recurse-submodules /root/ImHex
RUN mkdir /root/ImHex/build
WORKDIR /root/ImHex/build
RUN cmake .. && make -j
WORKDIR /root/ImHex
WORKDIR /root/ImHex

13
dist/Arch/PKGBUILD vendored
View File

@@ -1,4 +1,4 @@
# Maintainer: iTrooz_ <itrooz at protonmail dot com>
# Maintainer: iTrooz_ <aur at itrooz dot fr>
# Contributor: Morten Linderud <foxboron@archlinux.org>
pkgname=imhex-bin
@@ -8,22 +8,23 @@ pkgdesc="A Hex Editor for Reverse Engineers, Programmers and people who value th
arch=("x86_64")
url="https://github.com/WerWolv/ImHex"
license=('GPL2')
depends=(glfw mbedtls python freetype2 libglvnd dbus xdg-desktop-portal curl fmt yara nlohmann-json)
makedepends=(git)
depends=(glfw mbedtls fontconfig freetype2 libglvnd dbus gtk3 curl fmt yara zlib bzip2 xz zstd)
makedepends=(git nlohmann-json)
provides=(imhex)
conflicts=(imhex)
source=("$url/releases/download/v$pkgver/imhex-$pkgver-ArchLinux.pkg.tar.zst")
source=("$url/releases/download/v$pkgver/imhex-$pkgver-ArchLinux-x86_64.pkg.tar.zst")
md5sums=(SKIP)
package() {
install -Dm755 "$srcdir/usr/bin/imhex" "$pkgdir/usr/bin/imhex"
install -Dm755 "$srcdir/usr/bin/imhex-updater" "$pkgdir/usr/bin/imhex-updater"
install -Dm644 "$srcdir/usr/lib/libimhex.so.$pkgver" "$pkgdir/usr/lib/libimhex.so.$pkgver"
for plugin in "$srcdir/usr/lib/imhex/plugins/"*.hexplug; do
for plugin in "$srcdir/usr/lib/imhex/plugins/"*.hexplug*; do
install -Dm644 "$plugin" "$pkgdir/usr/lib/imhex/plugins/${plugin##*/}"
done
install -d "$pkgdir/usr/share/imhex"
cp -r "$srcdir/usr/share/imhex/"{constants,encodings,includes,magic,patterns} "$pkgdir/usr/share/imhex"
cp -r "$srcdir/usr/share/"{applications,licenses} "$pkgdir/usr/share"
cp -r "$srcdir/usr/share/"{applications,licenses,pixmaps,mime} "$pkgdir/usr/share"
}

View File

@@ -4,7 +4,7 @@ Section: editors
Priority: optional
Architecture: amd64
License: GNU GPL-2
Depends: libglfw3, libmagic1, libmbedtls14, libpython3.10, libfreetype6, libopengl0, libdbus-1-3, xdg-desktop-portal
Depends: libfontconfig1, libglfw3 | libglfw3-wayland, libmagic1, libmbedtls14, libfreetype6, libopengl0, libdbus-1-3, xdg-desktop-portal
Maintainer: WerWolv <hey@werwolv.net>
Description: ImHex Hex Editor
A Hex Editor for Reverse Engineers, Programmers and

View File

@@ -9,25 +9,26 @@ HOMEPAGE="https://github.com/WerWolv/ImHex"
SRC_URI=""
EGIT_REPO_URI="https://github.com/WerWolv/ImHex.git"
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit git-r3 python-single-r1 cmake
inherit git-r3 cmake
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND=""
RDEPEND="${DEPEND}
${PYTHON_DEPS}
media-libs/glfw
sys-apps/file
dev-libs/mbedtls
dev-cpp/nlohmann_json
dbus
xdg-desktop-portal
net-libs/mbedtls
sys-apps/dbus
sys-apps/xdg-desktop-portal
sys-libs/zlib
app-arch/bzip2
app-arch/lzma
app-arch/zstd
app-arch/lz4
"
BDEPEND="${DEPEND}
dev-cpp/nlohmann_json
"
BDEPEND="${DEPEND}"

49
dist/compiling/docker.md vendored Normal file
View File

@@ -0,0 +1,49 @@
For a TLDR of commands see [How to build](#How-to-build)
# Introduction
The original CI we used (vanilla Github Actions) was great for specifying what steps to execute to build packages. It could even do some custom steps with reusable actions. But it had problem: no local reproducibility. This meant that:
- We couldn't test code properly locally, we were dependent on GitHub to do it
- If something was wrong and we had to debug the build script, it was *long and painful* because we had to wait for Github runners to finish builds, and couldn't quickly iterate
To solve this, we are now trying to move the CI build script to docker containers (so using Dockerfiles)
# How to build
Commands are available in the [CI](../../.github/workflows/build.yml) and you should prefer copying them from there.
But here is a general command that should work for every build we have:
```
docker buildx build . -f <DOCKERFILE_PATH> --progress plain --build-arg 'JOBS=4' --build-arg 'BUILD_TYPE=Debug' --build-context imhex=$(pwd) --output local
```
where `<DOCKERFILE_PATH>` should be replaced by the wanted Dockerfile base d on the build you want to do:
| Wanted build | Dockerfile path | Target |
|--------------|-----------------------------|--------|
| MacOS M1 | dist/macOS/arm64.Dockerfile | - |
| AppImage | dist/appimage/Dockerfile | - |
| Web version | dist/web/Dockerfile | raw |
We'll explain this command in the next section
# Useful knowledge about Docker builds
Docker-based builds work with a Dockerfile. You run the Dockerfile, it builds the package.
We are using a base environment (often given to us by dockerhub) (e.g. ubuntu:22.04) which is really just a root filesystem, and we then run shell commands in that env, just like a shell script
Docker-based builds have two kind of caches used:
- layer cache, which mean that if a layer (instruction) hasn't been changed, and previous layers haven't changed, it will not be run again
- a `COPY` layer will be invalidated if one of the file copied has changed
- mount cache, which are per-instructions mounts that will be cached and restored in the next run. Mounts on different folders will not collide
Docker cache tends to grow very quickly when constantly making changes in the Dockerfile and rebuilding (a.k.a debugging what's going on), you can clear it with something like `docker system prune -a`
In the command saw earlier:
- `.` is the base folder that the Dockerfile will be allowed to see
- `-f <path>` is to specify the Dockerfile path
- `--progress plain` is to allow you to see the output of instructions
- `--build-arg <key>=<value>` is to allow to specify arguments to the build (like -DKEY=VALUE in CMake)
- `--build-context key=<folder>` is to specify folders other than the base folder that the Dockerfile is allowed to see
- `--output <path>` is the path to write the output package to. If not specified, Docker will create an image as the output (probably not what you want)
- `--target <target>` specifies which docker target to build

View File

@@ -9,17 +9,12 @@ On Linux, ImHex is built through regular GCC (or optionally Clang).
cd ImHex
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
CC=gcc-14 CXX=g++-14 \
cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX="/usr" \
..
make -j 4 install
ninja install
```
All paths follow the XDG Base Directories standard, and can thus be modified

View File

@@ -1,32 +0,0 @@
### Compiling ImHex on macOS
On macOS, ImHex is built through regular GCC and AppleClang.
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
2. Install all the dependencies using `brew bundle --no-lock --file dist/Brewfile`
3. Build ImHex itself using the following commands:
```sh
cd ImHex
mkdir -p build
cd build
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
OBJC=$(brew --prefix llvm)/bin/clang \
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
MACOSX_DEPLOYMENT_TARGET="10.15" \
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCREATE_BUNDLE=ON \
-DCREATE_PACKAGE=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
..
make -j4 package
```
If the build fails while trying to find the macOS libraries, make sure you have
XCode installed with `xcode-select --install`. Homebrew will also help get the
most recent SDK installed and configured with `brew doctor`.

22
dist/compiling/macos.md vendored Normal file
View File

@@ -0,0 +1,22 @@
### Compiling ImHex on macOS
On macOS, ImHex is built through regular GCC and LLVM clang.
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
2. Install all the dependencies using `brew bundle --no-lock --file dist/macOS/Brewfile`
3. Build ImHex itself using the following commands:
```sh
cd ImHex
mkdir -p build
cd build
CC=$(brew --prefix llvm)/bin/clang \
CXX=$(brew --prefix llvm)/bin/clang++ \
OBJC=$(brew --prefix llvm)/bin/clang \
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="./install" \
-DIMHEX_GENERATE_PACKAGE=ON \
..
ninja install
```

View File

@@ -7,22 +7,19 @@ On Windows, ImHex is built through [msys2 / mingw](https://www.msys2.org/)'s gcc
3. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
4. Install all the dependencies using `./ImHex/dist/get_deps_msys2.sh`
5. Build ImHex itself using the following commands:
```sh
cd ImHex
mkdir build
cd build
cmake -G "MinGW Makefiles" \
cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
-DCMAKE_INSTALL_PREFIX="./install" \
-DIMHEX_USE_DEFAULT_BUILD_SETTINGS=ON \
..
mingw32-make -j install
ninja install
```
ImHex will look for any extra resources either in various folders directly next to the executable or in `%localappdata%/imhex`
For low RAM-usage system, you can use `mingw32-make -j N install` instead, to reduce RAM usage at compile time. Where `N` is amount of jobs you are willling to run at once. Roughly ~1 GB of RAM usage per job.

54
dist/gen_release_notes.py vendored Normal file
View File

@@ -0,0 +1,54 @@
import subprocess
import sys
def get_commits(branch: str, start_tag: str, end_tag: str) -> list[str]:
try:
commits_raw = subprocess.check_output([ "git", "--no-pager", "log", branch, "--no-color", "--pretty=oneline", "--abbrev-commit", f"{start_tag}..{end_tag}"], stderr=subprocess.DEVNULL).decode("UTF-8").split("\n")
except:
return []
commits = []
for line in commits_raw:
commits.append(line[9:])
return commits
def main(args: list) -> int:
if len(args) != 2:
print(f"Usage: {args[0]} prev_minor")
return 1
last_minor_version = f"v1.{args[1]}"
master_commits = get_commits("master", f"{last_minor_version}.0", "master")
for i in range(1, 100):
branch_commits = get_commits(f"releases/{last_minor_version}.X", f"{last_minor_version}.0", f"{last_minor_version}.{i}")
if len(branch_commits) == 0:
break
master_commits = [commit for commit in master_commits if commit not in branch_commits]
sorted_commits = {}
for commit in master_commits:
if commit == "":
continue
try:
category, commit_name = commit.split(":", 1)
if category not in sorted_commits:
sorted_commits[category] = []
sorted_commits[category].append(commit_name)
except:
print(f"Failed to parse commit: {commit}")
for category in sorted_commits:
print(f"## {category}\n")
for commit in sorted_commits[category]:
print(f"- {commit}")
print(f"\n")
if __name__ == "__main__":
exit(main(sys.argv))

View File

@@ -1,17 +1,23 @@
#!/usr/bin/env sh
pacman -S $@ --needed \
cmake \
gcc \
lld \
glfw \
file \
mbedtls \
python3 \
freetype2 \
dbus \
xdg-desktop-portal \
curl \
fmt \
yara \
nlohmann-json
cmake \
gcc \
lld \
glfw \
fontconfig \
file \
mbedtls \
freetype2 \
dbus \
gtk3 \
curl \
fmt \
yara \
nlohmann-json \
ninja \
zlib \
bzip2 \
xz \
zstd \
lz4

View File

@@ -8,18 +8,24 @@ fi
apt install -y \
build-essential \
gcc-12 \
g++-12 \
gcc-14 \
g++-14 \
lld \
${PKGCONF:-} \
cmake \
make \
ccache \
libglfw3-dev \
libglm-dev \
libmagic-dev \
libmbedtls-dev \
python3-dev \
libfontconfig-dev \
libfreetype-dev \
libdbus-1-dev \
xdg-desktop-portal
libcurl4-gnutls-dev \
libgtk-3-dev \
ninja-build \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libzstd-dev \
liblz4-dev

View File

@@ -4,11 +4,18 @@ dnf install -y \
cmake \
dbus-devel \
file-devel \
fontconfig-devel \
freetype-devel \
libcurl-devel \
gcc-c++ \
git \
mesa-libGL-devel \
glfw-devel \
lld \
mbedtls-devel \
python3-devel
gtk3-devel \
libzstd-devel \
zlib-devel \
bzip2-devel \
xz-devel \
lz4-devel

View File

@@ -1,14 +1,21 @@
#!/usr/bin/env sh
pacman -S --needed --noconfirm \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-lld \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make \
mingw-w64-x86_64-ccache \
mingw-w64-x86_64-glfw \
mingw-w64-x86_64-file \
mingw-w64-x86_64-mbedtls \
mingw-w64-x86_64-python \
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-dlfcn
pacman -S --needed --noconfirm pactoys unzip
pacboy -S --needed --noconfirm \
gcc:p \
lld:p \
cmake:p \
ccache:p \
glfw:p \
file:p \
curl-winssl:p \
mbedtls:p \
freetype:p \
dlfcn:p \
ninja:p \
capstone:p \
zlib:p \
bzip2:p \
xz:p \
zstd:p \
lz4:p

21
dist/get_deps_tumbleweed.sh vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env sh
zypper install \
cmake \
ninja \
gcc14 \
gcc14-c++ \
fontconfig-devel \
freetype2-devel \
libcurl-devel \
dbus-1-devel \
file-devel \
Mesa-libGL-devel \
libglfw-devel \
mbedtls-devel \
gtk3-devel \
libzstd-devel \
zlib-devel \
bzip3-devel \
xz-devel \
lz4-dev

8
dist/imhex.desktop vendored
View File

@@ -1,4 +1,5 @@
[Desktop Entry]
Version=1.0
Name=ImHex
Comment=ImHex Hex Editor
GenericName=Hex Editor
@@ -8,3 +9,10 @@ Type=Application
StartupNotify=true
Categories=Development;IDE;
StartupWMClass=imhex
Keywords=static-analysis;reverse-engineering;disassembler;disassembly;hacking;forensics;hex-editor;cybersecurity;security;binary-analysis;
MimeType=application/vnd.imhex.proj;
Actions=NewFile;
[Desktop Action NewFile]
Exec=imhex --new
Name=Create New File

8
dist/imhex.mime.xml vendored Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.imhex.proj">
<comment>ImHex Project</comment>
<glob pattern="*.hexproj"/>
</mime-type>
</mime-info>

214
dist/langtool.py vendored Executable file
View File

@@ -0,0 +1,214 @@
#!/usr/bin/env python3
from pathlib import Path
import argparse
import json
# This fixes a CJK full-width character input issue
# which makes left halves of deleted characters displayed on screen
# pylint: disable=unused-import
import re
import readline
DEFAULT_LANG = "en_US"
DEFAULT_LANG_PATH = "plugins/*/romfs/lang/"
INVALID_TRANSLATION = ""
def main():
parser = argparse.ArgumentParser(
prog="langtool",
description="ImHex translate tool",
)
parser.add_argument(
"command",
choices=[
"check",
"translate",
"update",
"create",
"retranslate",
"untranslate",
"fmtzh",
],
)
parser.add_argument(
"-c", "--langdir", default=DEFAULT_LANG_PATH, help="Language folder glob"
)
parser.add_argument("-l", "--lang", default="", help="Language to translate")
parser.add_argument(
"-r", "--reflang", default="", help="Language for reference when translating"
)
parser.add_argument(
"-k", "--keys", help="Keys to re-translate (only in re/untranslate mode)"
)
args = parser.parse_args()
command = args.command
lang = args.lang
print(f"Running in {command} mode")
lang_files_glob = f"{lang}.json" if lang != "" else "*.json"
lang_folders = set(Path(".").glob(args.langdir))
if len(lang_folders) == 0:
print(f"Error: {args.langdir} matches nothing")
return 1
for lang_folder in lang_folders:
if not lang_folder.is_dir():
print(f"Error: {lang_folder} is not a folder")
return 1
default_lang_data = {}
default_lang_path = lang_folder / Path(DEFAULT_LANG + ".json")
if not default_lang_path.exists():
print(
f"Error: Default language file {default_lang_path} does not exist in {lang_folder}"
)
return 1
with default_lang_path.open("r", encoding="utf-8") as file:
default_lang_data = json.load(file)
reference_lang_data = None
reference_lang_path = lang_folder / Path(args.reflang + ".json")
if reference_lang_path.exists():
with reference_lang_path.open("r", encoding="utf-8") as file:
reference_lang_data = json.load(file)
if command == "create" and lang != "":
lang_file_path = lang_folder / Path(lang + ".json")
if lang_file_path.exists():
continue
exist_lang_data = None
for lang_folder1 in lang_folders:
lang_file_path1 = lang_folder1 / Path(lang + ".json")
if lang_file_path1.exists():
with lang_file_path1.open("r", encoding="utf-8") as file:
exist_lang_data = json.load(file)
break
print(f"Creating new language file '{lang_file_path}'")
with lang_file_path.open("w", encoding="utf-8") as new_lang_file:
new_lang_data = {
"code": lang,
"language": (
exist_lang_data["language"]
if exist_lang_data
else input("Enter language name: ")
),
"country": (
exist_lang_data["country"]
if exist_lang_data
else input("Enter country name: ")
),
"translations": {},
}
json.dump(new_lang_data, new_lang_file, indent=4, ensure_ascii=False)
lang_files = set(lang_folder.glob(lang_files_glob))
if len(lang_files) == 0:
print(f"Warn: Language file for '{lang}' does not exist in '{lang_folder}'")
for lang_file_path in lang_files:
if (
lang_file_path.stem == f"{DEFAULT_LANG}.json"
or lang_file_path.stem == f"{args.reflang}.json"
):
continue
print(f"\nProcessing '{lang_file_path}'")
if not (command == "update" or command == "create"):
print("\n----------------------------\n")
with lang_file_path.open("r+", encoding="utf-8") as target_lang_file:
lang_data = json.load(target_lang_file)
for key, value in default_lang_data["translations"].items():
has_translation = (
key in lang_data["translations"]
and lang_data["translations"][key] != INVALID_TRANSLATION
)
if (
has_translation
and not (
(command == "retranslate" or command == "untranslate")
and re.compile(args.keys).fullmatch(key)
)
and not command == "fmtzh"
):
continue
if command == "check":
print(
f"Error: Translation {lang_data['code']} is missing translation for key '{key}'"
)
elif (
command == "translate"
or command == "retranslate"
or command == "untranslate"
):
if command == "untranslate" and not has_translation:
continue
reference_tranlsation = (
" '%s'" % reference_lang_data["translations"][key]
if (
reference_lang_data
and key in reference_lang_data["translations"]
)
else ""
)
print(
f"\033[1m'{key}' '{value}'{reference_tranlsation}\033[0m => {lang_data['language']}",
end="",
)
if has_translation:
translation = lang_data["translations"][key]
print(f" <= \033[1m'{translation}'\033[0m")
print() # for a new line
if command == "untranslate":
lang_data["translations"][key] = INVALID_TRANSLATION
continue
try:
new_value = input("=> ")
lang_data["translations"][key] = new_value
except KeyboardInterrupt:
break
elif command == "update" or command == "create":
lang_data["translations"][key] = INVALID_TRANSLATION
elif command == "fmtzh":
if has_translation:
lang_data["translations"][key] = fmtzh(
lang_data["translations"][key]
)
keys_to_remove = []
for key, value in lang_data["translations"].items():
if key not in default_lang_data["translations"]:
keys_to_remove.append(key)
for key in keys_to_remove:
lang_data["translations"].pop(key)
print(
f"Removed unused key '{key}' from translation '{lang_data['code']}'"
)
target_lang_file.seek(0)
target_lang_file.truncate()
json.dump(
lang_data,
target_lang_file,
indent=4,
sort_keys=True,
ensure_ascii=False,
)
def fmtzh(text: str) -> str:
text = re.sub(r"(\.{3}|\.{6})", "……", text)
text = text.replace("!", "")
text = re.sub(r"([^\.\na-zA-Z\d])\.$", "\1", text, flags=re.M)
text = text.replace("?", "")
return text
if __name__ == "__main__":
exit(main())

View File

@@ -2,8 +2,14 @@ brew "mbedtls"
brew "nlohmann-json"
brew "cmake"
brew "ccache"
brew "python3"
brew "freetype2"
brew "libmagic"
brew "pkg-config"
brew "gcc@12"
brew "curl"
brew "llvm"
brew "glfw"
brew "ninja"
brew "zlib"
brew "xz"
brew "bzip2"
brew "zstd"

184
dist/macOS/arm64.Dockerfile vendored Normal file
View File

@@ -0,0 +1,184 @@
# This base image is also known as "crosscompile". See arm64.crosscompile.Dockerfile
FROM ghcr.io/itrooz/macos-crosscompile:clang19-nosdk as build
ENV MACOSX_DEPLOYMENT_TARGET 13.0
# -- DOWNLOADING STUFF
# Update vcpkg
RUN <<EOF
cp /vcpkg/triplets/community/arm-osx-mytriplet.cmake /tmp/arm-osx-mytriplet.cmake
git -C /vcpkg clean -ffdx
git -C /vcpkg checkout origin/master
git -C /vcpkg reset --hard
git -C /vcpkg pull
/vcpkg/bootstrap-vcpkg.sh
cp /tmp/arm-osx-mytriplet.cmake /vcpkg/triplets/community/arm-osx-mytriplet.cmake
EOF
## Install make
RUN --mount=type=cache,target=/var/lib/apt/lists/ apt update && apt install -y make
## fix environment
### add install_name_tool for cmake command that won't have the right env set (see PostprocessBundle.cmake function postprocess_bundle())
RUN cp /osxcross/build/cctools-port/cctools/misc/install_name_tool /usr/bin/install_name_tool
### a cmake thing wants 'otool' and not '' apparently
RUN cp /osxcross/target/bin/aarch64-apple-darwin23-otool /usr/bin/otool
## Clone glfw
RUN <<EOF
set -xe
if [ "$CUSTOM_GLFW" ]; then
git clone https://github.com/glfw/glfw /mnt/glfw
fi
EOF
RUN --mount=type=cache,target=/cache <<EOF
## Download SDK is missing (it may have been removed from the image)
set -xe
if [ ! -d /osxcross/target/SDK/MacOSX14.0.sdk ]; then
wget https://github.com/joseluisq/macosx-sdks/releases/download/14.0/MacOSX14.0.sdk.tar.xz -O /cache/MacOSX14.0.sdk.tar.xz -nc || true
mkdir -p /osxcross/target/SDK
tar -C /osxcross/target/SDK -xf /cache/MacOSX14.0.sdk.tar.xz
fi
EOF
## Download libmagic
### Clone libmagic
RUN git clone --depth 1 --branch FILE5_46 https://github.com/file/file /mnt/file
### Download libmagic dependencies
RUN --mount=type=cache,target=/var/lib/apt/lists/ apt update && apt install -y libtool autoconf
# -- DOWNLOADING + BUILDING STUFF
ENV VCPKG_DEFAULT_BINARY_CACHE /cache/vcpkg
RUN --mount=type=cache,target=/cache <<EOF
## Install dependencies with vcpkg
set -xe
mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
vcpkg install --triplet=arm-osx-mytriplet curl
vcpkg install --triplet=arm-osx-mytriplet mbedtls
vcpkg install --triplet=arm-osx-mytriplet freetype
vcpkg install --triplet=arm-osx-mytriplet josuttis-jthread
vcpkg install --triplet=arm-osx-mytriplet zlib
vcpkg install --triplet=arm-osx-mytriplet bzip2
vcpkg install --triplet=arm-osx-mytriplet liblzma
vcpkg install --triplet=arm-osx-mytriplet zstd
EOF
## Install glfw3 dep
ARG CUSTOM_GLFW
RUN --mount=type=cache,target=/cache <<EOF
set -xe
if [ "$CUSTOM_GLFW" ]; then
echo "Flag confirmation: using custom GLFW for software rendering"
else
echo "Flag confirmation: using system GLFW"
vcpkg install --triplet=arm-osx-mytriplet glfw3
fi
EOF
# -- BUILDING STUFF
ARG JOBS 1
ARG BUILD_TYPE Debug
## Build libmagic
RUN --mount=type=cache,target=/cache <<EOF
ccache -zs
set -xe
cd /mnt/file
autoreconf -is
# when cross-compiling, libmagic needs to have an the same version installed in the system.
# So we install it normally first
./configure --prefix /usr
make -j $JOBS install
# Now, we cross-compile it and install it in the libraries folder
CC=/osxcross/target/bin/aarch64-apple-darwin23-clang CXX=/osxcross/target/bin/aarch64-apple-darwin23-clang++ ./configure --prefix /vcpkg/installed/arm-osx-mytriplet --host $OSXCROSS_HOST
make -j $JOBS
make install
ccache -s
EOF
## Patch glfw
COPY --from=imhex /dist/macOS/0001-glfw-SW.patch /tmp
RUN <<EOF
set -xe
if [ "$CUSTOM_GLFW" ]; then
cd /mnt/glfw
git apply /tmp/0001-glfw-SW.patch
fi
EOF
RUN mkdir -p /vcpkg/installed/arm-osx-mytriplet/lib/pkgconfig
RUN mkdir -p /osxcross/target/macports/pkgs/vcpkg/installed/arm-osx-mytriplet/lib/pkgconfig
## Build glfw
RUN --mount=type=cache,target=/cache <<EOF
set -xe
if [ "$CUSTOM_GLFW" ]; then
ccache -zs
cd /mnt/glfw
mkdir build
cd build
CC=o64-clang CXX=o64-clang++ cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=/vcpkg/installed/arm-osx-mytriplet \
-DVCPKG_TARGET_TRIPLET=arm-osx-mytriplet -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/osxcross/target/toolchain.cmake -DCMAKE_OSX_SYSROOT=/osxcross/target/SDK/MacOSX14.0.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 \
..
ninja -j $JOBS install
ccache -s
fi
EOF
# Build ImHex
## Copy ImHex
COPY --from=imhex / /mnt/ImHex
## Patch ImHex with hacks
# COPY toolchain.cmake.2 /osxcross/target/toolchain.cmake
# Configure ImHex build
RUN --mount=type=cache,target=/cache --mount=type=cache,target=/mnt/ImHex/build/_deps \
cd /mnt/ImHex && \
# compilers
CC=o64-clang CXX=o64-clang++ OBJC=/osxcross/target/bin/aarch64-apple-darwin23-clang OBJCXX=/osxcross/target/bin/aarch64-apple-darwin23-clang++ \
cmake -G "Ninja" \
`# ccache flags` \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJC_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
`# MacOS cross-compiling flags` \
-DVCPKG_TARGET_TRIPLET=arm-osx-mytriplet -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/osxcross/target/toolchain.cmake -DCMAKE_OSX_SYSROOT=/osxcross/target/SDK/MacOSX14.0.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 \
`# Override compilers for code generators` \
-DNATIVE_CMAKE_C_COMPILER=/usr/bin/clang -DNATIVE_CMAKE_CXX_COMPILER=/usr/bin/clang++ \
`# Normal ImHex flags` \
-DIMHEX_GENERATE_PACKAGE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
`# other flags` \
-DIMHEX_STRICT_WARNINGS=OFF \
-DCMAKE_INSTALL_PREFIX=/mnt/ImHex/build/install \
-B build
## Build ImHex
RUN --mount=type=cache,target=/cache --mount=type=cache,target=/mnt/ImHex/build/_deps <<EOF
ccache -zs
set -xe
cd /mnt/ImHex
cmake --build build --parallel $JOBS --target install
ccache -s
EOF
FROM scratch
COPY --from=build /mnt/ImHex/build/install/imhex.app imhex.app

View File

@@ -0,0 +1,83 @@
# This image is provided for reference, but a (probably more up to date) image should be available at https://github.com/iTrooz/macos-crosscompile
FROM ubuntu:22.04
ENV PATH $PATH:/osxcross/target/bin
ENV LD_LIBRARY_PATH /osxcross/target/lib
ENV OSXCROSS_SDK /osxcross/target/SDK/MacOSX14.0.sdk
ENV OSXCROSS_TARGET darwin23
ENV OSXCROSS_TARGET_DIR /osxcross/target
ENV OSXCROSS_HOST aarch64-apple-darwin23
# -- DOWNLOADING STUFF
# Install common stuff
RUN --mount=type=cache,target=/var/lib/apt/lists/ export DEBIAN_FRONTEND=noninteractive &&\
export TZ=Etc/UTC &&\
dpkg --add-architecture i386 &&\
apt update &&\
apt -y install lsb-release build-essential python3 python3-pip git wget zip unzip pkg-config curl ninja-build software-properties-common gnupg libssl-dev ccache
# Install clang 17
RUN --mount=type=cache,target=/var/lib/apt/lists/ wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 17 &&\
ln -s /usr/bin/clang-17 /usr/bin/clang &&\
ln -s /usr/bin/clang++-17 /usr/bin/clang++
# Install vcpkg
RUN cd / &&\
git clone --depth 1 https://github.com/Microsoft/vcpkg.git vcpkg &&\
cd /vcpkg &&\
./bootstrap-vcpkg.sh -disableMetrics &&\
ln -s /vcpkg/vcpkg /usr/bin/ &&\
vcpkg install vcpkg-cmake &&\
ln -s /vcpkg/downloads/tools/cmake-*/cmake-*/bin/cmake /usr/bin/
RUN --mount=type=cache,target=/cache <<EOF
## Clone osxcross
set -xe
git clone https://github.com/tpoechtrager/osxcross /cache/osxcross || true
cd /cache/osxcross
git pull
cp -r /cache/osxcross /osxcross
EOF
RUN --mount=type=cache,target=/cache <<EOF
## Download SDK
set -xe
wget https://github.com/joseluisq/macosx-sdks/releases/download/14.0/MacOSX14.0.sdk.tar.xz -O /cache/MacOSX14.0.sdk.tar.xz -nc || true
cp /cache/MacOSX14.0.sdk.tar.xz /osxcross/tarballs
EOF
# Init stuff
## setup ccache dir
ENV CCACHE_DIR /cache/ccache
# Install triplet file
COPY arm-osx-mytriplet.cmake /vcpkg/triplets/community
# -- BUILDING STUFF
ARG JOBS 1
# Install osxcross
## Build cross-compiler clang-17
RUN --mount=type=cache,target=/cache <<EOF
set -xe
ccache -zs
cd /osxcross
UNATTENDED=1 CC=/usr/lib/ccache/clang-17 CXX=/usr/lib/ccache/clang++-17 ./build.sh
ccache -s
EOF
ARG DELETE_SDK=1
RUN <<EOF
# Conditionally delete the SDK from the image
set -xe
if [ "$DELETE_SDK" ]; then
rm -r /osxcross/target/SDK
echo "Deleted the SDK from the image"
else
echo "NOT deleting the SDK from the image"
fi
EOF

8
dist/msys2/PKGBUILD vendored
View File

@@ -7,7 +7,6 @@ pkgdesc="${_realname}: a Hex Editor for Reverse Engineers, Programmers and peopl
arch=('any')
url="https://github.com/WerWolv/ImHex"
license=('GPLv2')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-lld"
"${MINGW_PACKAGE_PREFIX}-cmake"
@@ -17,8 +16,11 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-file"
"${MINGW_PACKAGE_PREFIX}-mbedtls"
"${MINGW_PACKAGE_PREFIX}-polly"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-freetype")
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-bzip2"
"${MINGW_PACKAGE_PREFIX}-xz"
"${MINGW_PACKAGE_PREFIX}-zstd")
source=()
sha256sums=()

View File

@@ -12,49 +12,10 @@ finish-args:
- --device=all
modules:
- name: libiconv
sources:
- type: archive
url: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
sha256: e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
- name: glfw
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_SHARED_LIBS:BOOL=ON
sources:
- type: archive
url: https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip
sha256: 08a33a512f29d7dbf78eab39bd7858576adcc95228c9efe8e4bc5f0f3261efc7
cleanup:
- /include
- /lib/pkgconfig
- name: mbedtls
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_C_FLAGS=-fPIC
sources:
- type: archive
url: https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.27.0.tar.gz
sha256: 2a07856e541f0e5f6eaee4f78018c52f25bd244ed76f9020dea54a8b02cac6ea
- name: nlohmann-json
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_TESTING=OFF
sources:
- type: archive
url: https://github.com/nlohmann/json/archive/v3.9.1.tar.gz
sha256: 4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b
- name: imhex
buildsystem: cmake
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
sources:
- type: git

116
dist/rpm/imhex.spec vendored
View File

@@ -1,32 +1,56 @@
# ftbfs without this
%global _lto_cflags %{nil}
%define source_date_epoch_from_changelog 0
Name: imhex
Version: %{_version}
Version: VERSION
Release: 0%{?dist}
Summary: A hex editor for reverse engineers and programmers
License: GPL-2.0-only
License: GPL-2.0-only AND Zlib AND MIT AND Apache-2.0
# imhex is gplv2. capstone is custom. nativefiledialog is Zlib.
# see license dir for full breakdown
URL: https://imhex.werwolv.net/
# We need the archive with deps bundled
Source0: https://github.com/WerWolv/%{name}/releases/download/v%{version}/Full.Sources.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: dbus-devel
BuildRequires: file-devel
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: fmt-devel
BuildRequires: gcc-c++
BuildRequires: mesa-libGL-devel
BuildRequires: libappstream-glib
BuildRequires: libglvnd-devel
BuildRequires: glfw-devel
BuildRequires: json-devel
BuildRequires: libcurl-devel
BuildRequires: llvm-devel
BuildRequires: mbedtls-devel
BuildRequires: python3-devel
%if 0%{?fedora} >= 37
BuildRequires: yara-devel
BuildRequires: nativefiledialog-extended-devel
BuildRequires: dotnet-sdk-8.0
BuildRequires: libzstd-devel
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: xz-devel
%if 0%{?rhel}
BuildRequires: gcc-toolset-14
%endif
Provides: bundled(gnulib)
Provides: bundled(capstone) = 5.0-rc2
Provides: bundled(imgui)
Provides: bundled(libromfs)
Provides: bundled(microtar)
Provides: bundled(xdgpp)
# ftbfs on these arches. armv7hl might compile when capstone 5.x
# is released upstream and we can build against it
# [7:02 PM] WerWolv: We're not supporting 32 bit anyways soooo
# [11:38 AM] WerWolv: Officially supported are x86_64 and aarch64
ExclusiveArch: x86_64 %{arm64} ppc64le
%description
ImHex is a Hex Editor, a tool to display, decode and analyze binary data to
@@ -41,26 +65,26 @@ same time ImHex is completely free and open source under the GPLv2 language.
%prep
# don't use the setup macro since we're pulling from git
cp -r %{_src_path}/* %{_builddir}/
%autosetup -n ImHex
# remove bundled libs we aren't using
rm -rf lib/third_party/{fmt,nlohmann_json,yara}
%build
%cmake \
-DCMAKE_BUILD_TYPE=%{_build_type} \
-D USE_SYSTEM_NLOHMANN_JSON=ON \
-D USE_SYSTEM_FMT=ON \
-D USE_SYSTEM_CURL=ON \
-D USE_SYSTEM_LLVM=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D IMHEX_PATTERNS_PULL_MASTER=ON \
%if 0%{?fedora} >= 37
-D USE_SYSTEM_YARA=ON \
# if fedora <= 36 get updated to yara 4.2.x then they should \
# be able to build against system libs \
# https://bugzilla.redhat.com/show_bug.cgi?id=2112508 \
%if 0%{?rhel}
. /opt/rh/gcc-toolset-14/enable
%set_build_flags
CXXFLAGS+=" -std=gnu++23"
%endif
%cmake \
-D CMAKE_BUILD_TYPE=Release \
-D IMHEX_STRIP_RELEASE=OFF \
-D IMHEX_OFFLINE_BUILD=ON \
-D USE_SYSTEM_NLOHMANN_JSON=ON \
-D USE_SYSTEM_FMT=ON \
-D USE_SYSTEM_YARA=ON \
-D USE_SYSTEM_NFD=ON \
-D IMHEX_USE_GTK_FILE_PICKER=ON \
-D IMHEX_BUNDLE_DOTNET=OFF \
# when capstone >= 5.x is released we should be able to build against \
# system libs of it \
# -D USE_SYSTEM_CAPSTONE=ON
@@ -68,23 +92,41 @@ cp -r %{_src_path}/* %{_builddir}/
%cmake_build
%check
%if 0%{?rhel}
. /opt/rh/gcc-toolset-14/enable
%set_build_flags
CXXFLAGS+=" -std=gnu++23"
%endif
%install
%cmake_install
desktop-file-validate %{buildroot}%{_datadir}/applications/imhex.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
# this is a symlink for the old appdata name that we don't need
rm -f %{buildroot}%{_metainfodir}/net.werwolv.%{name}.appdata.xml
# AppData
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/net.werwolv.%{name}.metainfo.xml
# install licenses
cp -a lib/third_party/nativefiledialog/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/nativefiledialog-LICENSE
cp -a lib/third_party/capstone/LICENSE.TXT %{buildroot}%{_datadir}/licenses/%{name}/capstone-LICENSE
cp -a lib/third_party/capstone/suite/regress/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/capstone-regress-LICENSE
cp -a lib/third_party/microtar/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/microtar-LICENSE
cp -a lib/third_party/xdgpp/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/xdgpp-LICENSE
%files
%dir %{_datadir}/licenses/imhex
%license %{_datadir}/licenses/imhex/LICENSE
%license %{_datadir}/licenses/%{name}/
%doc README.md
%{_bindir}/imhex
%dir %{_datadir}/imhex
%{_datadir}/imhex/*
%{_datadir}/pixmaps/imhex.png
%{_datadir}/applications/imhex.desktop
%{_prefix}/lib64/libimhex.so.%{_version}
%{_prefix}/lib64/imhex/plugins/*
%{_metainfodir}/net.werwolv.imhex.metainfo.xml
%{_metainfodir}/net.werwolv.imhex.appdata.xml
%changelog
%{_bindir}/imhex-updater
%{_datadir}/pixmaps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%{_libdir}/libimhex.so*
%{_libdir}/%{name}/
/usr/lib/debug/%{_libdir}/*.debug
%{_metainfodir}/net.werwolv.%{name}.metainfo.xml

16
dist/vcpkg.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "vcpkg",
"version": "1.0.0",
"builtin-baseline": "7e21420f775f72ae938bdeb5e6068f722088f06a",
"dependencies": [
"libmagic",
"freetype",
"mbedtls",
"zlib",
"bzip2",
"liblzma",
"zstd",
"glfw3",
"curl"
]
}

107
dist/web/Dockerfile vendored Normal file
View File

@@ -0,0 +1,107 @@
FROM emscripten/emsdk:4.0.8 AS build
# Used to invalidate layer cache but not mount cache
# See https://github.com/moby/moby/issues/41715#issuecomment-733976493
ARG UNIQUEKEY 1
RUN apt update
RUN apt install -y git ccache autoconf automake libtool cmake pkg-config ninja-build
RUN <<EOF
# Install vcpkg
# Note: we are a patch on the libmagic port
set -xe
git clone https://github.com/microsoft/vcpkg /vcpkg
git -C /vcpkg pull
/vcpkg/bootstrap-vcpkg.sh
sed -i 's/vcpkg_install_make(${EXTRA_ARGS})/vcpkg_install_make(${EXTRA_ARGS} SUBPATH src)/g' /vcpkg/ports/libmagic/portfile.cmake
EOF
# Patch vcpkg build instructions to add -pthread
RUN <<EOF
set -xe
echo '
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
' >> /emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
EOF
ENV VCPKG_DEFAULT_BINARY_CACHE=/cache/vcpkg
RUN --mount=type=cache,target=/cache <<EOF
# Install dependencies with vcpkg
set -xe
mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
/vcpkg/vcpkg install --triplet=wasm32-emscripten libmagic
/vcpkg/vcpkg install --triplet=wasm32-emscripten freetype
/vcpkg/vcpkg install --triplet=wasm32-emscripten mbedtls
/vcpkg/vcpkg install --triplet=wasm32-emscripten zlib
/vcpkg/vcpkg install --triplet=wasm32-emscripten bzip2
/vcpkg/vcpkg install --triplet=wasm32-emscripten liblzma
/vcpkg/vcpkg install --triplet=wasm32-emscripten zstd
EOF
# Build ImHex
ARG JOBS=4
ENV CCACHE_DIR=/cache/ccache
RUN mkdir /build
WORKDIR /build
RUN --mount=type=cache,target=/cache \
--mount=type=bind,source=.,target=/imhex <<EOF
set -xe
ccache -zs
cmake /imhex \
-G "Ninja" \
-DIMHEX_OFFLINE_BUILD=ON \
-DIMHEX_STATIC_LINK_PLUGINS=ON \
-DIMHEX_EXCLUDE_PLUGINS="script_loader" \
-DIMHEX_COMPRESS_DEBUG_INFO=OFF \
-DNATIVE_CMAKE_C_COMPILER=gcc \
-DNATIVE_CMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
-DLIBROMFS_COMPRESS_RESOURCES=OFF \
-DCMAKE_BUILD_TYPE=Release
ninja -j $JOBS
cp /imhex/dist/web/source/* /build
ccache -s
EOF
# Create a file dedicated to store wasm size, because I know no way to get the wasm content length if the web server uses compression
# 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
FROM scratch AS raw
COPY --from=build [ \
# ImHex \
"/build/imhex.wasm", \
"/build/imhex.wasm.size", \
"/build/imhex.js", \
\
# Static files \
"/build/index.html", \
"/build/style.css", \
"/build/wasm-config.js", \
"/build/enable-threads.js", \
"/build/favicon.ico", \
"/build/icon.svg", \
"/build/manifest.json", \
"/build/robots.txt", \
"/build/sitemap.xml", \
\
# Destination \
"./" \
]
FROM nginx
COPY --from=raw . /usr/share/nginx/html

10
dist/web/compose.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
# docker compose -f dist/web/compose.yml up --build
version: '3'
services:
imhex_web:
image: imhex_web:latest
build:
context: ../../ # ImHex folder
dockerfile: ./dist/web/Dockerfile
ports:
- 8080:80

13
dist/web/plugin-bundle.cpp.in vendored Normal file
View File

@@ -0,0 +1,13 @@
#include <hex/helpers/logger.hpp>
extern "C" void forceLinkPlugin_@IMHEX_PLUGIN_NAME@();
namespace {
struct StaticLoad {
StaticLoad() {
forceLinkPlugin_@IMHEX_PLUGIN_NAME@();
}
};
}
static StaticLoad staticLoad;

15
dist/web/serve.py vendored Normal file
View File

@@ -0,0 +1,15 @@
import http.server
import os
class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header("Cross-Origin-Embedder-Policy", "require-corp")
self.send_header("Cross-Origin-Opener-Policy", "same-origin")
http.server.SimpleHTTPRequestHandler.end_headers(self)
if __name__ == '__main__':
os.chdir(".")
httpd = http.server.HTTPServer(("localhost", 9090), MyHttpRequestHandler)
print(f"Serving {os.getcwd()} on http://{httpd.server_address[0]}:{httpd.server_address[1]}")
httpd.serve_forever()

79
dist/web/source/enable-threads.js vendored Normal file
View File

@@ -0,0 +1,79 @@
// NOTE: This file creates a service worker that cross-origin-isolates the page (read more here: https://web.dev/coop-coep/) which allows us to use wasm threads.
// Normally you would set the COOP and COEP headers on the server to do this, but Github Pages doesn't allow this, so this is a hack to do that.
/* Edited version of: coi-serviceworker v0.1.6 - Guido Zuidhof, licensed under MIT */
// From here: https://github.com/gzuidhof/coi-serviceworker
if(typeof window === 'undefined') {
self.addEventListener("install", () => self.skipWaiting());
self.addEventListener("activate", e => e.waitUntil(self.clients.claim()));
async function handleFetch(request) {
if(request.cache === "only-if-cached" && request.mode !== "same-origin") {
return;
}
if(request.mode === "no-cors") { // We need to set `credentials` to "omit" for no-cors requests, per this comment: https://bugs.chromium.org/p/chromium/issues/detail?id=1309901#c7
request = new Request(request.url, {
cache: request.cache,
credentials: "omit",
headers: request.headers,
integrity: request.integrity,
destination: request.destination,
keepalive: request.keepalive,
method: request.method,
mode: request.mode,
redirect: request.redirect,
referrer: request.referrer,
referrerPolicy: request.referrerPolicy,
signal: request.signal,
});
}
let r = await fetch(request).catch(e => console.error(e));
if(r.status === 0) {
return r;
}
const headers = new Headers(r.headers);
headers.set("Cross-Origin-Embedder-Policy", "require-corp"); // or: require-corp
headers.set("Cross-Origin-Opener-Policy", "same-origin");
return new Response(r.body, { status: r.status, statusText: r.statusText, headers });
}
self.addEventListener("fetch", function(e) {
e.respondWith(handleFetch(e.request)); // respondWith must be executed synchonously (but can be passed a Promise)
});
} else {
(async function() {
if(window.crossOriginIsolated !== false) return;
if (!('serviceWorker' in navigator)) {
alert("Your browser doesn't support service workers.\nIf you're using Firefox, you need to not be in a private window.")
}
let registration = await navigator.serviceWorker.register(window.document.currentScript.src).catch(e => console.error("COOP/COEP Service Worker failed to register:", e));
if(registration) {
console.log("COOP/COEP Service Worker registered", registration.scope);
registration.addEventListener("updatefound", () => {
console.log("Reloading page to make use of updated COOP/COEP Service Worker.");
window.location.reload();
});
// If the registration is active, but it's not controlling the page
if(registration.active && !navigator.serviceWorker.controller) {
console.log("Reloading page to make use of COOP/COEP Service Worker.");
window.location.reload();
}
}
})();
}
// Code to deregister:
// let registrations = await navigator.serviceWorker.getRegistrations();
// for(let registration of registrations) {
// await registration.unregister();
// }

BIN
dist/web/source/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

11
dist/web/source/icon.svg vendored Normal file
View File

@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
<rect style="opacity:0.2" width="55" height="10" x="5" y="-60" rx="1.41" transform="rotate(90)"/>
<rect style="fill:#2b50a1" width="55" height="10" x="4" y="-60" rx="1.41" transform="rotate(90)"/>
<rect style="fill:#2b50a1" width="55" height="10" x="4" y="-14" rx="1.41" transform="rotate(90)"/>
<rect style="fill:#2b50a1" width="55" height="10" x="4" y="-33" rx="1.41" transform="rotate(90)"/>
<path style="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"/>
<rect style="fill:#3a6be0" width="29" height="10" x="4" y="4" rx="1.381"/>
<rect style="fill:#3a6be0" width="21" height="10" x="39" y="4" rx="1.4"/>
<rect style="fill:#3a6be0" width="29" height="10" x="4" y="49" rx="1.381"/>
<path style="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"/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

104
dist/web/source/index.html vendored Normal file
View File

@@ -0,0 +1,104 @@
<!doctype html>
<html lang="en-us">
<head>
<title>ImHex Web - Free Online Hex Editor for Reverse Engineers</title>
<link rel="manifest" href="manifest.json">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Primary Meta Tags -->
<meta name="title" content="ImHex">
<meta name="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.">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="apple-touch-icon" href="icon.svg">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://imhex.werwolv.net/">
<meta property="og:title" content="ImHex Web - Online Hex Editor">
<meta property="og:image" content="https://imhex.werwolv.net/assets/splash_wasm.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://imhex.werwolv.net/">
<meta property="twitter:title" content="ImHex Web - Online Hex Editor">
<meta property="twitter:description"
content="A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.">
<meta property="twitter:image" content="https://imhex.werwolv.net/assets/splash_wasm.png">
<link rel="stylesheet" type="text/css" href="style.css">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"alumni": "WerWolv",
"email": "hey@werwolv.net",
"founder": "WerWolv",
"slogan": "A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.",
"url": "https://imhex.werwolv.net",
"logo": "https://imhex.werwolv.net/assets/logos/logo.svg"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "ImHex Web",
"operatingSystem": "Windows, MacOS, Linux",
"applicationCategory": "DeveloperApplication",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<script src="enable-threads.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="loading" class="centered">
<img src="https://raw.githubusercontent.com/WerWolv/ImHex/master/plugins/builtin/romfs/assets/dark/banner.svg" id="logo" alt="ImHex Logo">
<h1>A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.</h1>
<h2>Available both natively and on the web</h2>
<h5>ImHex runs directly in your web browser with the help of Emscripten and WebAssembly.</h5>
<div style="height: 50%">
<div style="height: 30%"> </div>
<h2 id="not_working">
Not loading in your Browser? <a href="https://imhex.werwolv.net">Try the native version</a>
</h2>
<div class="progress-bar-container">
<div class="progress progress-moved">
<div class="progress-bar" id="progress-bar-content">
</div>
</div>
</div>
</div>
<div class="loading_ripple">
<div class="lds-ripple"><div></div><div></div></div>
</div>
<div style="height: 10%">
</div>
<div class="footer">
<a href="https://imhex.werwolv.net">Homepage</a>
<p>Made with ♥️ by the ImHex Team</p>
<a href="https://github.com/WerWolv/ImHex">GitHub</a>
</div>
</div>
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<script src="wasm-config.js"></script>
<script async src="imhex.js"></script>
</body>
</html>

20
dist/web/source/manifest.json vendored Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "ImHex",
"description": "🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.",
"background_color": "#0F0F0F",
"theme_color": "#0F0F0F",
"categories": [
"education",
"productivity",
"utilities"
],
"icons": [
{
"src": "icon.svg",
"type": "image/svg",
"sizes": "640x640"
}
],
"start_url": ".",
"display": "standalone"
}

4
dist/web/source/robots.txt vendored Normal file
View File

@@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://imhex.werwolv.net/sitemap.xml

67
dist/web/source/sitemap.xml vendored Normal file
View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://web.imhex.werwolv.net/</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<title>English</title>
<loc>https://web.imhex.werwolv.net?lang=en-US</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<title>Deutsch</title>
<loc>https://web.imhex.werwolv.net?lang=de-DE</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<title>Português</title>
<loc>https://web.imhex.werwolv.net?lang=pt-BR</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>中国</title>
<loc>https://web.imhex.werwolv.net?lang=zh-CN</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>國語</title>
<loc>https://web.imhex.werwolv.net?lang=zh-TW</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>日本語</title>
<loc>https://web.imhex.werwolv.net?lang=ja-JP</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>한국어</title>
<loc>https://web.imhex.werwolv.net?lang=ko-KR</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>Español</title>
<loc>https://web.imhex.werwolv.net?lang=es-ES</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>Italiano</title>
<loc>https://web.imhex.werwolv.net?lang=it-IT</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
<url>
<title>Русский</title>
<loc>https://web.imhex.werwolv.net?lang=ru-RU</loc>
<lastmod>2024-01-02T11:44:00+00:00</lastmod>
</url>
</urlset>

188
dist/web/source/style.css vendored Normal file
View File

@@ -0,0 +1,188 @@
html, body {
height: 100%;
margin: 0;
user-select: none;
}
body {
display: flex;
align-items: center;
background-color: #121212;
overflow: hidden;
}
.emscripten {
padding-right: 0;
margin-left: auto;
margin-right: auto;
display: none;
border: 0 none;
image-rendering: smooth;
}
h1, h2, h5 {
color: #F0F0F0;
font-size: 20px;
font-family: monospace;
width: 100%;
text-align: center;
margin-top: 60px;
margin-bottom: 10px;
}
h2 {
margin-top: 15px;
font-size: 17px;
}
h5 {
margin-top: 0;
font-size: 17px;
}
#not_working {
opacity: 0;
}
#not_working.visible {
opacity: 1;
transition: opacity 2s ease;
}
a {
color: #7893ff;
text-decoration: none;
}
a:hover {
text-shadow: #3a4677 0 0 10px;
}
.footer {
width: 100%;
height: 20px;
position: absolute;
bottom: 0;
text-align: center;
color: #F0F0F0;
background-color: #0A0A0A;
padding: 10px;
font-family: monospace;
font-size: 15px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
gap: 10%;
}
.centered {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.lds-ripple {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ripple div {
position: absolute;
border: 4px solid #fff;
opacity: 1;
border-radius: 50%;
animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
animation-delay: -0.5s;
}
@keyframes lds-ripple {
0% {
top: 36px;
left: 36px;
width: 0;
height: 0;
opacity: 0;
}
4.9% {
top: 36px;
left: 36px;
width: 0;
height: 0;
opacity: 0;
}
5% {
top: 36px;
left: 36px;
width: 0;
height: 0;
opacity: 1;
}
100% {
top: 0;
left: 0;
width: 72px;
height: 72px;
opacity: 0;
}
}
:root {
--progress: 0%;
}
.progress-bar-container {
margin: 100px auto;
width: 600px;
text-align: center;
}
.progress {
padding: 6px;
border-radius: 30px;
background: rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25),
0 1px rgba(255, 255, 255, 0.08);
}
.progress-bar {
color: rgba(240, 240, 240, 0.9);
height: 18px;
border-radius: 30px;
font-size: 13px;
font-family: monospace;
font-weight: bold;
text-wrap: avoid;
white-space: nowrap;
overflow: hidden;
background-image: linear-gradient(
to bottom,
rgba(255, 255, 255, 0.2),
rgba(255, 255, 255, 0.0)
);
}
.progress-moved .progress-bar {
width: var(--progress);
background-color: #3864cb;
}
#logo {
height: 25%;
margin-top: 50px;
}
.canvas-fixed {
position: absolute;
top: 0;
left: 0;
}

271
dist/web/source/wasm-config.js vendored Normal file
View File

@@ -0,0 +1,271 @@
let wasmSize = null;
// See comment in dist/web/Dockerfile about imhex.wasm.size
fetch("imhex.wasm.size").then(async (resp) => {
wasmSize = parseInt((await resp.text()).trim());
console.log(`Real WASM binary size is ${wasmSize} bytes`);
});
// Monkeypatch WebAssembly to have a progress bar
// inspired from: https://github.com/WordPress/wordpress-playground/pull/46 (but had to be modified)
function monkeyPatch(progressFun) {
const _instantiateStreaming = WebAssembly.instantiateStreaming;
WebAssembly.instantiateStreaming = async (responsePromise, ...args) => {
// Do not collect wasm content length here see above
let response = await responsePromise
const file = response.url.substring(
new URL(response.url).origin.length + 1
);
const reportingResponse = new Response(
new ReadableStream(
{
async start(controller) {
const reader = response.clone().body.getReader();
let loaded = 0;
for (; ;) {
const { done, value } = await reader.read();
if (done) {
if(wasmSize) progressFun(file, wasmSize);
break;
}
loaded += value.byteLength;
progressFun(file, loaded);
controller.enqueue(value);
}
controller.close();
}
},
{
status: response.status,
statusText: response.statusText
}
)
);
for (const pair of response.headers.entries()) {
reportingResponse.headers.set(pair[0], pair[1]);
}
return _instantiateStreaming(reportingResponse, ...args);
}
}
monkeyPatch((file, done) => {
if (!wasmSize) return;
if (done > wasmSize) {
console.warn(`Downloaded binary size ${done} is larger than expected WASM size ${wasmSize}`);
return;
}
const percent = ((done / wasmSize) * 100).toFixed(0);
const mibNow = (done / 1024**2).toFixed(1);
const mibTotal = (wasmSize / 1024**2).toFixed(1);
let root = document.querySelector(':root');
root.style.setProperty("--progress", `${percent}%`)
document.getElementById("progress-bar-content").innerHTML = `${percent}% &nbsp;[${mibNow} MiB / ${mibTotal} MiB]`;
});
function glfwSetCursorCustom(wnd, shape) {
let body = document.getElementsByTagName("body")[0]
switch (shape) {
case 0x00036001: // GLFW_ARROW_CURSOR
body.style.cursor = "default";
break;
case 0x00036002: // GLFW_IBEAM_CURSOR
body.style.cursor = "text";
break;
case 0x00036003: // GLFW_CROSSHAIR_CURSOR
body.style.cursor = "crosshair";
break;
case 0x00036004: // GLFW_HAND_CURSOR
body.style.cursor = "pointer";
break;
case 0x00036005: // GLFW_HRESIZE_CURSOR
body.style.cursor = "ew-resize";
break;
case 0x00036006: // GLFW_VRESIZE_CURSOR
body.style.cursor = "ns-resize";
break;
default:
body.style.cursor = "default";
break;
}
}
function glfwCreateStandardCursorCustom(shape) {
return shape
}
var notWorkingTimer = setTimeout(() => {
document.getElementById("not_working").classList.add("visible")
}, 5000);
var Module = {
preRun: [],
postRun: function() {
// Patch the emscripten GLFW module to send mouse and touch events in the right order
// For ImGui interactions to correctly work with touch input, MousePos events need
// to be processed first and then MouseButton events in the next frame. By default,
// GLFW does the exact opposite, which causes buttons to require two taps to register
// and windows get "stuck" to the cursor when dragged or resized
GLFW.onMousemove = event => {
if (event.type === "touchmove") {
event.preventDefault();
let primaryChanged = false;
for (let i of event.changedTouches) {
if (GLFW.primaryTouchId === i.identifier) {
Browser.setMouseCoords(i.pageX, i.pageY);
primaryChanged = true;
break;
}
}
if (!primaryChanged) {
return;
}
} else {
Browser.calculateMouseEvent(event);
}
};
GLFW.onMouseButtonChanged = (event, status) => {
if (!GLFW.active) return;
if (event.target != Module["canvas"]) return;
const isTouchType = event.type === "touchstart" || event.type === "touchend" || event.type === "touchcancel";
let eventButton = 0;
if (isTouchType) {
event.preventDefault();
let primaryChanged = false;
if (GLFW.primaryTouchId === null && event.type === "touchstart" && event.targetTouches.length > 0) {
const chosenTouch = event.targetTouches[0];
GLFW.primaryTouchId = chosenTouch.identifier;
Browser.setMouseCoords(chosenTouch.pageX, chosenTouch.pageY);
primaryChanged = true;
} else if (event.type === "touchend" || event.type === "touchcancel") {
for (let i of event.changedTouches) {
if (GLFW.primaryTouchId === i.identifier) {
GLFW.primaryTouchId = null;
primaryChanged = true;
break;
}
}
}
if (!primaryChanged) {
return;
}
} else {
Browser.calculateMouseEvent(event);
eventButton = GLFW.DOMToGLFWMouseButton(event);
}
if (status == 1) {
GLFW.active.buttons |= (1 << eventButton);
try {
event.target.setCapture();
} catch (e) {}
} else {
GLFW.active.buttons &= ~(1 << eventButton);
}
if (GLFW.active.cursorPosFunc) {
getWasmTableEntry(GLFW.active.cursorPosFunc)(GLFW.active.id, Browser.mouseX, Browser.mouseY);
}
if (GLFW.active.mouseButtonFunc) {
getWasmTableEntry(GLFW.active.mouseButtonFunc)(GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active));
}
};
},
onRuntimeInitialized: function() {
// Triggered when the wasm module is loaded and ready to use.
document.getElementById("loading").style.display = "none"
document.getElementById("canvas").style.display = "initial"
clearTimeout(notWorkingTimer);
},
print: (function() { })(),
printErr: function(text) { },
canvas: (function() {
const canvas = document.getElementById('canvas');
canvas.addEventListener("webglcontextlost", function(e) {
alert('WebGL context lost, please reload the page');
e.preventDefault();
}, false);
// Turn long touches into right-clicks
let timer = null;
canvas.addEventListener('touchstart', event => {
timer = setTimeout(() => {
let eventArgs = {
bubbles: true,
cancelable: true,
view: window,
screenX: event.touches[0].screenX,
screenY: event.touches[0].screenY,
clientX: event.touches[0].clientX,
clientY: event.touches[0].clientY,
button: 2,
buttons: 2,
relatedTarget: event.target,
region: event.region
}
canvas.dispatchEvent(new MouseEvent('mousedown', eventArgs));
canvas.dispatchEvent(new MouseEvent('mouseup', eventArgs));
}, 400);
});
canvas.addEventListener('touchend', event => {
if (timer) {
clearTimeout(timer);
timer = null;
}
});
if (typeof WebGL2RenderingContext !== 'undefined') {
let gl = canvas.getContext('webgl2', { stencil: true });
if (!gl) {
console.error('WebGL 2 not available, falling back to WebGL');
gl = canvas.getContext('webgl', { stencil: true });
}
if (!gl) {
alert('WebGL not available with stencil buffer');
}
return canvas;
} else {
alert('WebGL 2 not supported by this browser');
}
})(),
setStatus: function(text) { },
totalDependencies: 0,
monitorRunDependencies: function(left) {
},
instantiateWasm: async function(imports, successCallback) {
imports.env.glfwSetCursor = glfwSetCursorCustom
imports.env.glfwCreateStandardCursor = glfwCreateStandardCursorCustom
let result = await instantiateAsync(null, findWasmBinary(), imports);
successCallback(result.instance, result.module)
},
arguments: []
};
// Handle passing arguments to the wasm module
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if (urlParams.has("lang")) {
Module["arguments"].push("--language");
Module["arguments"].push(urlParams.get("lang"));
}
window.addEventListener('resize', js_resizeCanvas, false);
function js_resizeCanvas() {
let canvas = document.getElementById('canvas');
canvas.top = document.documentElement.clientTop;
canvas.left = document.documentElement.clientLeft;
canvas.width = Math.min(document.documentElement.clientWidth, window.innerWidth || 0);
canvas.height = Math.min(document.documentElement.clientHeight, window.innerHeight || 0);
}
// Prevent some default browser shortcuts from preventing ImHex ones to work
document.addEventListener('keydown', e => {
if (e.ctrlKey) {
if (e.which == 83) e.preventDefault();
}
})

Submodule lib/external/capstone deleted from d5141c0478

1
lib/external/curl vendored

Submodule lib/external/curl deleted from 45ac4d0194

1
lib/external/disassembler vendored Submodule

1
lib/external/fmt vendored

Submodule lib/external/fmt deleted from c4ee726532

View File

@@ -1,50 +0,0 @@
cmake_minimum_required(VERSION 3.16)
project(imgui)
set(CMAKE_CXX_STANDARD 17)
find_package(PkgConfig REQUIRED)
find_package(Freetype REQUIRED)
find_package(OpenGL REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
if (UNIX)
find_package(OpenGL REQUIRED)
endif ()
add_library(imgui OBJECT
source/imgui.cpp
source/imgui_demo.cpp
source/imgui_draw.cpp
source/imgui_freetype.cpp
source/imgui_impl_glfw.cpp
source/imgui_impl_opengl3.cpp
source/imgui_tables.cpp
source/imgui_widgets.cpp
source/cimgui.cpp
source/TextEditor.cpp
source/imnodes.cpp
source/implot.cpp
source/implot_items.cpp
source/implot_demo.cpp
source/fonts/fontawesome_font.c
source/fonts/codicons_font.c
source/fonts/unifont_font.c
)
add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD)
target_include_directories(imgui PUBLIC include ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS})
target_link_directories(imgui PUBLIC ${GLFW_LIBRARY_DIRS})
if (WIN32)
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw3 opengl32.lib)
elseif (UNIX)
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw OpenGL::GL)
endif()

View File

@@ -1,395 +0,0 @@
#pragma once
#include <string>
#include <vector>
#include <array>
#include <memory>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <regex>
#include "imgui.h"
class TextEditor
{
public:
enum class PaletteIndex
{
Default,
Keyword,
Number,
String,
CharLiteral,
Punctuation,
Preprocessor,
Identifier,
KnownIdentifier,
PreprocIdentifier,
Comment,
MultiLineComment,
Background,
Cursor,
Selection,
ErrorMarker,
Breakpoint,
LineNumber,
CurrentLineFill,
CurrentLineFillInactive,
CurrentLineEdge,
Max
};
enum class SelectionMode
{
Normal,
Word,
Line
};
struct Breakpoint
{
int mLine;
bool mEnabled;
std::string mCondition;
Breakpoint()
: mLine(-1)
, mEnabled(false)
{}
};
// Represents a character coordinate from the user's point of view,
// i. e. consider an uniform grid (assuming fixed-width font) on the
// screen as it is rendered, and each cell has its own coordinate, starting from 0.
// Tabs are counted as [1..mTabSize] count empty spaces, depending on
// how many space is necessary to reach the next tab stop.
// For example, coordinate (1, 5) represents the character 'B' in a line "\tABC", when mTabSize = 4,
// because it is rendered as " ABC" on the screen.
struct Coordinates
{
int mLine, mColumn;
Coordinates() : mLine(0), mColumn(0) {}
Coordinates(int aLine, int aColumn) : mLine(aLine), mColumn(aColumn)
{
assert(aLine >= 0);
assert(aColumn >= 0);
}
static Coordinates Invalid() { static Coordinates invalid(-1, -1); return invalid; }
bool operator ==(const Coordinates& o) const
{
return
mLine == o.mLine &&
mColumn == o.mColumn;
}
bool operator !=(const Coordinates& o) const
{
return
mLine != o.mLine ||
mColumn != o.mColumn;
}
bool operator <(const Coordinates& o) const
{
if (mLine != o.mLine)
return mLine < o.mLine;
return mColumn < o.mColumn;
}
bool operator >(const Coordinates& o) const
{
if (mLine != o.mLine)
return mLine > o.mLine;
return mColumn > o.mColumn;
}
bool operator <=(const Coordinates& o) const
{
if (mLine != o.mLine)
return mLine < o.mLine;
return mColumn <= o.mColumn;
}
bool operator >=(const Coordinates& o) const
{
if (mLine != o.mLine)
return mLine > o.mLine;
return mColumn >= o.mColumn;
}
};
struct Identifier
{
Coordinates mLocation;
std::string mDeclaration;
};
typedef std::string String;
typedef std::unordered_map<std::string, Identifier> Identifiers;
typedef std::unordered_set<std::string> Keywords;
typedef std::map<int, std::string> ErrorMarkers;
typedef std::unordered_set<int> Breakpoints;
typedef std::array<ImU32, (unsigned)PaletteIndex::Max> Palette;
typedef uint8_t Char;
struct Glyph
{
Char mChar;
PaletteIndex mColorIndex = PaletteIndex::Default;
bool mComment : 1;
bool mMultiLineComment : 1;
bool mPreprocessor : 1;
Glyph(Char aChar, PaletteIndex aColorIndex) : mChar(aChar), mColorIndex(aColorIndex),
mComment(false), mMultiLineComment(false), mPreprocessor(false) {}
};
typedef std::vector<Glyph> Line;
typedef std::vector<Line> Lines;
struct LanguageDefinition
{
typedef std::pair<std::string, PaletteIndex> TokenRegexString;
typedef std::vector<TokenRegexString> TokenRegexStrings;
typedef bool(*TokenizeCallback)(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end, PaletteIndex & paletteIndex);
std::string mName;
Keywords mKeywords;
Identifiers mIdentifiers;
Identifiers mPreprocIdentifiers;
std::string mCommentStart, mCommentEnd, mSingleLineComment;
char mPreprocChar;
bool mAutoIndentation;
TokenizeCallback mTokenize;
TokenRegexStrings mTokenRegexStrings;
bool mCaseSensitive;
LanguageDefinition()
: mPreprocChar('#'), mAutoIndentation(true), mTokenize(nullptr), mCaseSensitive(true)
{
}
static const LanguageDefinition& CPlusPlus();
static const LanguageDefinition& HLSL();
static const LanguageDefinition& GLSL();
static const LanguageDefinition& C();
static const LanguageDefinition& SQL();
static const LanguageDefinition& AngelScript();
static const LanguageDefinition& Lua();
};
TextEditor();
~TextEditor();
void SetLanguageDefinition(const LanguageDefinition& aLanguageDef);
const LanguageDefinition& GetLanguageDefinition() const { return mLanguageDefinition; }
const Palette& GetPalette() const { return mPaletteBase; }
void SetPalette(const Palette& aValue);
void SetErrorMarkers(const ErrorMarkers& aMarkers) { mErrorMarkers = aMarkers; }
void SetBreakpoints(const Breakpoints& aMarkers) { mBreakpoints = aMarkers; }
void Render(const char* aTitle, const ImVec2& aSize = ImVec2(), bool aBorder = false);
void SetText(const std::string& aText);
std::string GetText() const;
void SetTextLines(const std::vector<std::string>& aLines);
std::vector<std::string> GetTextLines() const;
std::string GetSelectedText() const;
std::string GetCurrentLineText()const;
int GetTotalLines() const { return (int)mLines.size(); }
bool IsOverwrite() const { return mOverwrite; }
void SetReadOnly(bool aValue);
bool IsReadOnly() const { return mReadOnly; }
bool IsTextChanged() const { return mTextChanged; }
bool IsCursorPositionChanged() const { return mCursorPositionChanged; }
bool IsColorizerEnabled() const { return mColorizerEnabled; }
void SetColorizerEnable(bool aValue);
Coordinates GetCursorPosition() const { return GetActualCursorCoordinates(); }
void SetCursorPosition(const Coordinates& aPosition);
inline void SetHandleMouseInputs (bool aValue){ mHandleMouseInputs = aValue;}
inline bool IsHandleMouseInputsEnabled() const { return mHandleKeyboardInputs; }
inline void SetHandleKeyboardInputs (bool aValue){ mHandleKeyboardInputs = aValue;}
inline bool IsHandleKeyboardInputsEnabled() const { return mHandleKeyboardInputs; }
inline void SetImGuiChildIgnored (bool aValue){ mIgnoreImGuiChild = aValue;}
inline bool IsImGuiChildIgnored() const { return mIgnoreImGuiChild; }
inline void SetShowWhitespaces(bool aValue) { mShowWhitespaces = aValue; }
inline bool IsShowingWhitespaces() const { return mShowWhitespaces; }
void SetTabSize(int aValue);
inline int GetTabSize() const { return mTabSize; }
void InsertText(const std::string& aValue);
void InsertText(const char* aValue);
void MoveUp(int aAmount = 1, bool aSelect = false);
void MoveDown(int aAmount = 1, bool aSelect = false);
void MoveLeft(int aAmount = 1, bool aSelect = false, bool aWordMode = false);
void MoveRight(int aAmount = 1, bool aSelect = false, bool aWordMode = false);
void MoveTop(bool aSelect = false);
void MoveBottom(bool aSelect = false);
void MoveHome(bool aSelect = false);
void MoveEnd(bool aSelect = false);
void SetSelectionStart(const Coordinates& aPosition);
void SetSelectionEnd(const Coordinates& aPosition);
void SetSelection(const Coordinates& aStart, const Coordinates& aEnd, SelectionMode aMode = SelectionMode::Normal);
void SelectWordUnderCursor();
void SelectAll();
bool HasSelection() const;
void Copy();
void Cut();
void Paste();
void Delete();
bool CanUndo() const;
bool CanRedo() const;
void Undo(int aSteps = 1);
void Redo(int aSteps = 1);
static const Palette& GetDarkPalette();
static const Palette& GetLightPalette();
static const Palette& GetRetroBluePalette();
private:
typedef std::vector<std::pair<std::regex, PaletteIndex>> RegexList;
struct EditorState
{
Coordinates mSelectionStart;
Coordinates mSelectionEnd;
Coordinates mCursorPosition;
};
class UndoRecord
{
public:
UndoRecord() {}
~UndoRecord() {}
UndoRecord(
const std::string& aAdded,
const TextEditor::Coordinates aAddedStart,
const TextEditor::Coordinates aAddedEnd,
const std::string& aRemoved,
const TextEditor::Coordinates aRemovedStart,
const TextEditor::Coordinates aRemovedEnd,
TextEditor::EditorState& aBefore,
TextEditor::EditorState& aAfter);
void Undo(TextEditor* aEditor);
void Redo(TextEditor* aEditor);
std::string mAdded;
Coordinates mAddedStart;
Coordinates mAddedEnd;
std::string mRemoved;
Coordinates mRemovedStart;
Coordinates mRemovedEnd;
EditorState mBefore;
EditorState mAfter;
};
typedef std::vector<UndoRecord> UndoBuffer;
void ProcessInputs();
void Colorize(int aFromLine = 0, int aCount = -1);
void ColorizeRange(int aFromLine = 0, int aToLine = 0);
void ColorizeInternal();
float TextDistanceToLineStart(const Coordinates& aFrom) const;
void EnsureCursorVisible();
int GetPageSize() const;
std::string GetText(const Coordinates& aStart, const Coordinates& aEnd) const;
Coordinates GetActualCursorCoordinates() const;
Coordinates SanitizeCoordinates(const Coordinates& aValue) const;
void Advance(Coordinates& aCoordinates) const;
void DeleteRange(const Coordinates& aStart, const Coordinates& aEnd);
int InsertTextAt(Coordinates& aWhere, const char* aValue);
void AddUndo(UndoRecord& aValue);
Coordinates ScreenPosToCoordinates(const ImVec2& aPosition) const;
Coordinates FindWordStart(const Coordinates& aFrom) const;
Coordinates FindWordEnd(const Coordinates& aFrom) const;
Coordinates FindNextWord(const Coordinates& aFrom) const;
int GetCharacterIndex(const Coordinates& aCoordinates) const;
int GetCharacterColumn(int aLine, int aIndex) const;
int GetLineCharacterCount(int aLine) const;
int GetLineMaxColumn(int aLine) const;
bool IsOnWordBoundary(const Coordinates& aAt) const;
void RemoveLine(int aStart, int aEnd);
void RemoveLine(int aIndex);
Line& InsertLine(int aIndex);
void EnterCharacter(ImWchar aChar, bool aShift);
void Backspace();
void DeleteSelection();
std::string GetWordUnderCursor() const;
std::string GetWordAt(const Coordinates& aCoords) const;
ImU32 GetGlyphColor(const Glyph& aGlyph) const;
void HandleKeyboardInputs();
void HandleMouseInputs();
void Render();
float mLineSpacing;
Lines mLines;
EditorState mState;
UndoBuffer mUndoBuffer;
int mUndoIndex;
int mTabSize;
bool mOverwrite;
bool mReadOnly;
bool mWithinRender;
bool mScrollToCursor;
bool mScrollToTop;
bool mTextChanged;
bool mColorizerEnabled;
float mTextStart; // position (in pixels) where a code line starts relative to the left of the TextEditor.
int mLeftMargin;
bool mCursorPositionChanged;
int mColorRangeMin, mColorRangeMax;
SelectionMode mSelectionMode;
bool mHandleKeyboardInputs;
bool mHandleMouseInputs;
bool mIgnoreImGuiChild;
bool mShowWhitespaces;
Palette mPaletteBase;
Palette mPalette;
LanguageDefinition mLanguageDefinition;
RegexList mRegexList;
bool mCheckComments;
Breakpoints mBreakpoints;
ErrorMarkers mErrorMarkers;
ImVec2 mCharAdvance;
Coordinates mInteractiveStart, mInteractiveEnd;
std::string mLineBuffer;
uint64_t mStartTime;
float mLastClick;
};
bool TokenizeCStyleString(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
bool TokenizeCStyleCharacterLiteral(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
bool TokenizeCStyleIdentifier(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
bool TokenizeCStyleNumber(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
bool TokenizeCStylePunctuation(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
#pragma once
#define FONT_ICON_FILE_NAME_UNIFONT "unifont.ttf"
extern const unsigned int unifont_compressed_size;
extern const unsigned int unifont_compressed_data[52184/4];

Some files were not shown because too many files have changed in this diff Show More