Open GaticusHax opened 4 years ago
I've already been working on this. You can see in this image how I have custom icons for the EXML and MBIN file types, as well as a custom Convert to MBIN
context menu item, separate from the default Open behaviour. The MBIN file type has a corresponding Convert to EXML
menu item, not shown.
The default program on my system for the EXML file type is actually notepad++.exe
and for MBIN it is HxD.exe
, so double-clicking a file will open it for editing.
One issue that I haven't resolved yet is how to handle multiple file selections. Windows expects the context menu commands to operate on a single file, so a new process is created for each file and that circumvents some of the safety of multi-file processing in MBINCompiler. This can result in some conflicts in processing files that should normally be handled gracefully with MBINCompiler.
Also, when the file-selection is mixed, windows explorer shows the context menu for the type of the file that is specifically r-clicked. This is not exactly a problem because the underlying commands for both the Convert to MBIN
and the Convert to EXML
menu options are identical (MBINCompiler.exe %1
) but it is confusing.
I'm not sure that these problems can be easily solved. Though, the convenience of the context menu options even just for single-file operations is probably enough to ignore the multi-file selection issues and call it known issues.
It would be nice to have some specific icons in windows explorer for MBIN and EXML file types.
Currently, these file types will use the icons provided by the default program but it is desirable to use an editor as the default program so that double-clicking a file will open it for editing, not to be de/compiled with MBINCompiler.
Icons can be built into the libMBIN.dll (so they can be utilized from 3rd party apps that may not need the MBINCompiler.exe)
To avoid conflicts with the users choice of default program to associate with the file types, the icons and some specific context menu items for
Convert to EXML
andConvert to MBIN
can be configured via HKCR\SystemFileAssociations.exml and .mbin in the windows registry.