[SEEMS ANSWERED] Extracting GUI files from VST and vice-versa?

Discussion in 'Software' started by DrumcodeX, Feb 14, 2023.

  1. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    This is related to recent releases on AZ and some comments on them.
    It's about GUI editing in general, but specifically on how to extract multiple .png files from a .dll and bringing them back into the .dll again. The first part, the extracting, has been answered in the comments on AZ. But not the second part, how to bring the files back again. And the crucial part is to do it in bunches. It's easy to replace a few PNGs one by one. But it would be awful to replace hundreds of PNGs one by one.
    I'm sure it's relatively easy to achieve this, but I did quite some web searching and couldn't find a solution to this specific task. I'm also not a coder or graphics guru, so my background knowledge about all this is pretty basic.

    To make more obvious what I mean I'm using FM8 by NI as an example.
    When opening the .dll with i.e. ResourceHacker there's a subdirectory "PICTURE" containing 305 resources. I've learned on AZ that saving the group to an RC file will not only spit out the .rc file, but also 305 .bin files. Those .bin files will turn out to be regular .png files simply by renaming the extension (bulk rename tool advisable).


    [​IMG]

    Now let's say I modified all those files, what I actually did by batch processing.
    How do I bring them back into Resource Hacker? Again, all of them, not one by one.
    I tried several things but it doesn't make sense to explain what it was, because all of it was more or less fishing in the dark.

    Any advise would be appreciated,
    thx
     
    • Interesting Interesting x 2
    • Creative Creative x 1
    • List
  2.  
  3. BlackWinny

    BlackWinny Platinum Record

    Joined:
    Aug 21, 2022
    Messages:
    284
    Likes Received:
    226
    Location:
    Very close to Paris, France
    It is done by a script. You have an example in the middle of this help page:
    http://www.angusj.com/resourcehacker/
    (check the section "Command Line Syntax" in the middle of the page and there is an example using several .bmp files somewhere below, example which is named "rh_script_myprog_upd_images.txt").

    You can use the script file by the menu "File > Add using script template", or using ResourceHacker by a command line.

    Of course, mind to always make a backup of the exe (or dll) file previously.

    What I recommend:
    1. First, do a backup of the file you want to modify.
    2. Then save all the PICTURE group to an RC file.
    3. Then delete all in the PICTURE group (Ctrl+D).
    4. Then proceed by a first test of "Add using script template" (Ctrl+T) using only two or three picture files, not more. Once you're sure that your script is correct you can now finish the work with all the other picture files, say, by lots of 25 or 50. It's secure to work with 100 files at once only when you definitely master the process.

    Cheers.
     
    Last edited: Feb 14, 2023
    • Like Like x 2
    • Useful Useful x 2
    • Agree Agree x 1
    • List
  4. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    There's another one even better ... "PE Explorer" I think. But it's paid and I'm not sure about the scripting, which is really important like @BlackWinny said the moment you do something a bit complex.
     
  5. BEAT16

    BEAT16 Audiosexual

    Joined:
    May 24, 2012
    Messages:
    9,081
    Likes Received:
    7,006
    And another thing :

    1.) Skinman 1.0 - FREESkinMan is a vector based drawing tool especially for GUI skins

    Source: http://flavoursoflime.blogspot.com

    2.) Resources: Here are a few more pointers to help you getting started with skin design:
    • The GIMP, a free image manipulation program.
    • Pov Ray, a free 3D Ray tracer.
    • IrfanView, a free software for simple image operations.
    • Notepad 2, a free Notepad-like text editor with XML syntax highlighting.
    • XML Viewer, a free software which makes XML editing more than easy for non-programmers.
    • SkinMan and KnobMan, utilities to create skins graphics.
    Source: www.bluecataudio.com/Skins/Create/
     
    Last edited: Feb 14, 2023
    • Like Like x 1
    • Useful Useful x 1
    • List
  6. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    Thanks a lot for the detailed advise already! :bow:
    I don't have time until tomorrow to test it but this sounds good to me. Was hoping to get away without things like scripting, but this doesn't sound too difficult. At least it's not required to use the command line (thank god lol) :)

    merci beaucoup & cheers
     
  7. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    Yes I stumbled upon this one yesterday I guess. But I didn't have a closer look at all paid options, although there would be some nice tools for stuff like that.
    This is a very nice free resource editor I could find > http://melander.dk/reseditor/
    It has pretty good built-in image manipulation for example.
     
  8. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    Thanks for the suggestions :bow:
    Gimp is the image software of my choice since quite a few years.
    I'm also using Inkscape regularely, i.e. for recoloring modules of VCV Rack, especially the fundamental VCV modules. Those are simply too white for me :)
    Knobman could be interesting for me. I was fiddling around with u-he skins lately and was actually looking for knobs or an easy way to create some. Knobman could be perfect for that, I'll have to take a close look.
     
  9. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    Jesus, this is way worse than I was hoping lol :deep_facepalm:
    I'm not even getting close to a point the script would run :rofl:

    My lack of knowledge about coding becomes very obvious here. Several things are confusing to me right from the start.
    - there's no option in "Add Script Template" for "PICTURE". I'm suggesting I could use "BITMAP" and just use "PICTURE" and .png instead of "BITMAP" and .bmp in the script. The point is that I'm guessing the structure has to remain the same like in the original .dll (?)
    - since the template that @BlackWinny pointed to uses the command "-addoverwrite" I suspect it won't be necessary to delete the PICTURE group, as it sounds to me this command will replace existing files (?)
    - I'm not sure about setting the source file path. What I think is that when I'm not setting a path but only the filename, the script will look for the files in the same folder where FM8.dll is in (?)

    However, all mentioned above I could probably workout if I was able to do some test runs. But I'm not even getting to that point lol. And for reasons I got zero explanation for.
    Examples:

    [​IMG]
    All original templates on the Resource Hacker website are using "=". How can that be an error?

    [​IMG]
    When I'm removing the "=" I'm getting .dll is invalid. And it doesn't matter what combination I'm trying, Exe FM8v1.exe, Dll FM8v1.dll or whatever.

    There would be more like that, but that's already enough to be in a dead end street.
    Web searching doesn't really help either, because most times it's drifting to areas like more serious programming or hacking.
    So I'm really stuck at the moment.

    _
     
  10. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    UPDATE, just for the sake of it.

    Using the command line leads to similar issues.
    I'm also in doubt if this method, using a script (or cmd) even makes sense. This requires to write one script line (or one cmd prompt) for each of the 305 files. And that sounds almost as troublesome as replacing the files one by one.
    It would be far more efficient to utilize a similar method like with the extracting.
    But as far I can tell it would probably be necessary to compile the files first. And this is "programming territory", which is unknown territory for me.
    Nevertheless, I'm looking for ways how to do that.
    Otherwise I have to give it up.
    _
     
  11. DrumcodeX

    DrumcodeX Platinum Record

    Joined:
    Jul 28, 2014
    Messages:
    295
    Likes Received:
    262
    Location:
    Reality (virtual)
    UPDATE

    Thanks to an additional comment on the sister site >>:wink: r4e :wink:<< I could find a pretty much perfect tool for the entire thing! Restorator 2018

    Similar tool to ResourceHacker and others, but with an additional feature that allows you to import and replace multiple .png files at once. Seems to be perfect for the purpose. Only had time for quick testing and in the case of FM8 some tweaking would be required, but it's looking great so far.
    Seems the question has been pretty much answered, even with more or less an happy accident.

    Thank you very much r4e :bow::bow::bow::bow:
     
  12. r4e

    r4e Audiosexual

    Joined:
    Sep 6, 2014
    Messages:
    862
    Likes Received:
    1,228
    Sry for the late reply: You're very welcome!
     
Loading...