Homebrew [Release] Custom Theme Auto Preview Generator

  • Thread starter Thread starter d0k3
  • Start date Start date
  • Views Views 12,437
  • Replies Replies 24
  • Likes Likes 12

d0k3

3DS Homebrew Legend
Member
Joined
Dec 3, 2004
Messages
2,786
Reaction score
3,086
Trophies
2
XP
3,926
Country
Germany
Mainly out of my own need, I put together a little something to automagically generate previews for custom themes (in extdata format). This will use the backgrounds included in the body_LZ.bin file to generate CHMM compatible preview.png files. Alongside the preview.png, it will also generate a visual 'catalog' of your themes (= a folder with correctly named previews of all your themes) for easier selection from PC.

The attached file contains a small programm that I wrote myself (3DSthmXtb, source code included), DSdecmp (by barubary), Basic Image Converter (by MaQleod) and batch files to make usage as easy as possible. UPDATE: Starting with v0.3, this now also generates the info.smdh file used by CHMM v2.x. The package now also includes NConvert (by XnSoftware team, replaces MaQleods convert) and smdhtool (by 3dstools).

This will work on Windows 7/8/8.1 only! Also, it will not process 'solid color themes', however noone makes these, anyways.


How to use
  • Extract all the files from the attached archive into your theme base folder. Your 'theme base folder' is the folder that contains, inside subfolders, your custom themes. Or, in other words, don't extract it to the folder containing body_LZ.bin, extract it to the folder above that. I guess if you managed to get CHMM running, you understand what is meant.
  • To process a single custom theme: Drag and drop the themes folder onto 'process.bat'.
  • To process all the themes in the theme base folder: Just run 'process_all_folders.bat'.
That's it! Pretty simple, isn't it? Still, be aware that this will overwrite files without confirmation. Don't keep anything important inside your themes folders. And, don't come whining to me if this overwrites your other previews - you have been warned.

Github repo for this: https://github.com/d0k3/CTAPG
 

Attachments

Last edited by d0k3,
I believe CHMM does dsplay bmp file, you just need to rename them to .png
I doubt that CHMM will be able to display this BMP format (BMP v5 RGB565, as RGB565 won't work in common BMP v3). If it does, I'll change the scripts to not use PNG, so let me know if you try.
 
I believe CHMM does dsplay bmp file, you just need to rename them to .png
Okay, I tested it - doesn't work. You don't neccesarily have to install ImageMagick, though, you can convert files using another software of your choice, too. In that case just use the no_im_ .BAT files instead of the default ones.
 
My bad then, I thought I read that somewhere.

In fact, doing what you wrote (renaming the .BMP to preview.png and letting CHMM access that folder) will even crash Homebrew Launcher ;).

Anyways, I don't like the ImageMagick requirement either, so here's an update for you (see the first post). The ImageMagick requirement was removed. Image conversion functionality is now handled by Basic Image Converter from MaQleod.
 
It works like a charm, I had several themes without preview, and the EFE preview method is so tedious on pc.
 
  • Like
Reactions: d0k3
(Sorry, wrong thread! An irrelevant post used to rest here. I did just use this handy generator, though. Thanks!)
 
I updated the Custom Theme Auto Preview Generator to also generate the info.smdh file used in CHMM v2.x. It's not perfect, but it is better than nothing. Check post #1 for the download!
 
  • Like
Reactions: dude1709
@d0k3 Don't know if anyone else is getting this or not but with v0.3 I'm getting an error with smdhtool that is included...

smdhtool.exe - Entry Point Not Found
The procedure entry point __gxx_personality_sj0 could not be located in the dynamic link library.

Now if i change smdhtool.exe from the included one ( 91 KB ) and replace it with one i just built from source ( 423 KB ) i don't have any issues at all.

Thought I'd point that out. :)
 
  • Like
Reactions: Shaker78
@d0k3 Don't know if anyone else is getting this or not but with v0.3 I'm getting an error with smdhtool that is included...

smdhtool.exe - Entry Point Not Found
The procedure entry point __gxx_personality_sj0 could not be located in the dynamic link library.

Now if i change smdhtool.exe from the included one ( 91 KB ) and replace it with one i just built from source ( 423 KB ) i don't have any issues at all.

Thought I'd point that out. :)
Good point! Can you give me that smdhtool? :)
 
  • Like
Reactions: klear
With the smdhtool.exe posted by Shadowtrance and the following two *.dll files
(libgcc_s_dw2-1 and libstdc++-6) it works now perfect for me.
 
Last edited by Shaker78,
With the smdhtool.exe posted by Shadowtrance and the following two *.dll files
(libgcc_s_dw2-1 and libstdc++-6) it works now perfect for me.
Dammit, there should be no additional library requirements... @Shadowtrance , could you compile again, but add this to the CFLAGS / CXXFLAGS?
Code:
-static-libgcc -static-libstdc++ -static
I'd do it myself, but I have trouble compiling that right now and you already seem to have a compilable Makefile.
 
Dammit, there should be no additional library requirements... @Shadowtrance , could you compile again, but add this to the CFLAGS / CXXFLAGS?
Code:
-static-libgcc -static-libstdc++ -static
I'd do it myself, but I have trouble compiling that right now and you already seem to have a compilable Makefile.
Yep done. :)
smdhtool https://mega.nz/#!SJgxACyK!QAxT6LgARcKJRqik2TDXAAl0r8mXuH6Hs0rk8PFLgNo
3dstools-master source https://mega.nz/#!OYIGHLLY!cyUUUGPUxytj3sUOvJgVEj04WPZDokM5XnJhitATfMY
 
  • Like
Reactions: d0k3 and klear
I included the fixed smdhtool by @Shadowtrance into the main release. Generating info.smdh should now work properly for everyone! As for the version number... The Preview Extractor (which is a small program I coded myself) hasn't changed since v0.2, so its version number is still at 0.2. The whole package - the Preview Generator -, however is at v0.3 now. I added a new line to the batch files to make that clear.

BTW, if you don't like the metainfo in the info.smdh files, you can edit it via editing "process.bat".
 
I've just attached another version of CTAPG that I made for the member of another forum (guess many of you will know him). The contents are the same as for the regular v0.3 release, but it also contains two additional tools for use with first extracted content of the theme pack CIA. These two will allow you to properly convert icons and extract theme names, but manual work is involved.
 
This now also has an official Github repo. I hope the lack of discussion here means that everything works mighty fine for all the users :D.
 
Could you also do something like read the info.smdh and extract icon.png and name.txt for use with Howling Theme Tool ?
 

Site & Scene News

Popular threads in this forum