ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Feature] Open project file with "open project" if it is a CLI argument to the imhex executable.

Open Poikilos opened this issue 2 years ago • 7 comments
trafficstars

What feature would you like to see?

I would like to be able to associate hexproj files with ImHex in the operating system.

How will this feature be useful to you and others?

File association is a common OS operation most users expect to be able to do.

The file could be detected by the file extension. If that isn't enough, you could check for the tar header and look inside of it.

Why make automatic detection: You could just assume it is a project file, but that is not advisable since people may use the "open with" feature to open some random non-project file with ImHex.

When I first did "open with" ImHex on a hexproj file, I was very confused until I realized I was examining the binary of the project file and not utilizing the project file to examine the provider.

Request Type

  • [X] I can provide a PoC for this feature or am willing to work on it myself and submit a PR

Additional context?

No response

Poikilos avatar Jun 29 '23 13:06 Poikilos

Hey, I agree with the feature, and I'd like you to submit a PR if you can

@WerWolv Do you agree ?

iTrooz avatar Jun 30 '23 12:06 iTrooz

Oh yeah this would only require a very small change. Basically when you choose Open as -> ImHex, all the OS does is start the ImHex executable with the path to the file as the first parameter. Instead of just opening that file directly, instead the same file-type resolution that's being used when drag-n-dropping a file onto Imhex should be used to determine what to do with it.

WerWolv avatar Jun 30 '23 12:06 WerWolv

(You might want to wait for #1172 to be merged before starting)

iTrooz avatar Jul 01 '23 17:07 iTrooz

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.

github-actions[bot] avatar Aug 03 '24 16:08 github-actions[bot]

#1172 was merged. Can the feature be considered now?

Poikilos avatar Aug 05 '24 14:08 Poikilos

I believe this already works now. Please try with the latest version of ImHex. If not, I can absolutely add it now

WerWolv avatar Aug 05 '24 14:08 WerWolv