Homebrew [Release] Custom Theme Auto Preview Generator

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
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

  • CTAPG_v0.2.zip
    362.2 KB · Views: 765
  • CTAPG_v3.1.zip
    2 MB · Views: 787
Last edited by d0k3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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.
 

Xsiide

Active Member
Newcomer
Joined
Nov 14, 2014
Messages
27
Trophies
0
Location
Stgo
XP
270
Country
Cote d'Ivoire
It works like a charm, I had several themes without preview, and the EFE preview method is so tedious on pc.
 
  • Like
Reactions: d0k3

Septimo

Well-Known Member
Member
Joined
Apr 23, 2013
Messages
121
Trophies
0
XP
292
Country
United States
(Sorry, wrong thread! An irrelevant post used to rest here. I did just use this handy generator, though. Thanks!)
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
@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

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@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

Shaker78

Well-Known Member
Member
Joined
Jan 17, 2007
Messages
121
Trophies
1
XP
551
Country
Gambia, The
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,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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.
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
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

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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".
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
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.
 

Asia81

Yuri Lover ~
Member
Joined
Nov 15, 2014
Messages
6,656
Trophies
3
Age
29
XP
3,496
Country
France
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-