ImHex-Patterns icon indicating copy to clipboard operation
ImHex-Patterns copied to clipboard

Improve Documentation on importing other hexpat files into hexpat file

Open KevinCCucumber opened this issue 1 year ago • 3 comments

I am analyzing a file containing compressed chunks. I imported the zstd.hexpat file and managed to highlight some code blocks on executing it. However, now I want to integrate this function into my main hexpat file that I use to analyze the whole file, but I cannot manage to import or use the type zstd_frame_t, but I can import the function from hex::dec::zstd_decompress(pattern, section) when copying all the definitions into my hexpat file.

I would like the documentation to be augmented on how the hexpat files work with each other. I love what you do. Keep up the great work!

KevinCCucumber avatar Jul 10 '24 18:07 KevinCCucumber

Hey, as of right now patterns cannot really import other patterns. This is an active point of development though, ultimately the goal is that you can just import other patterns using the import statement and place them somewhere but that sadly isn't possible yet as of right now.

WerWolv avatar Jul 10 '24 18:07 WerWolv

As mentioned in https://github.com/WerWolv/Documentation/pull/18, user patterns can import other custom pattern headers just fine. But that usually involves adding a new directory to the pattern search paths in the Extras > Settings > Folders menu.

@WerWolv I believe that the only quality of life thing missing from the described workflow is a feature of C++ #include directive where using double quotes will also add the current directory to the search paths. IMHO, that would result in seamless importing/including other files that are part of a multi-file pattern project.

C3pa avatar Aug 20 '24 12:08 C3pa

@KevinCCucumber, a new page called Importing Modules was recently added to the documentation. Can you see if it provides the info you were interested in?

C3pa avatar Aug 23 '24 15:08 C3pa

This the information that I am interested in. Thank you very much!

KevinCCucumber avatar Aug 26 '25 20:08 KevinCCucumber