runcommand launching images for ANY theme
-
@Concat said in runcommand launching images for ANY theme:
You'll see I modified it to include a .PNG image instead of system.svg.
Did you get some error when ran the script? I think it can deal with .png logos...
-
@Concat I've tested here and I'm pretty sure my script can deal with .png logo files. But due to the black letters your PC logo doesn't look fine with carbon background :-(
-
Hmm sorry man, I checked again and maybe I was looking at your old script...? I could sworn I saw a line that was grabbing system.svg....
Anyway, great work! And yeah, I know about the black on black issue. It needs an outline I suppose
-
Man, I tested it on my end before posting that and it worked as expect (generated an image with the "genesis" logo). Can you show me your es_systems.cfg so I can see what's going wrong?
Okay, this time I deleted the version of the script I had, updated with newest version and ran
./generate-launching-images.sh carbon
locally on the Pi and it worked like expected. Now I have correct TG16 and Genesis.Before I was doing it from an SSH session and I did it on metapixel and for fun "workbench" (which looked weird) but those didn't work before. I also tested with "workbench" again and it worked this time. Maybe I didn't update it correctly last time. I don't know.
-
@meleu
Ginally got around to running the script. First it failed without an error message, and I guessed it was because I never did move es_systems.cfg to .emulationstation. It was still in the etc path.So moved it and it worked!
All the images were 4:3 though... for carbon. And they looked like they might have been low res. What is the expected behaviour?
I see some convert function in an if statement with a reso of 800x600... is that what defines the image size? The else statement just says x600.... hmm...
-
@Concat I'm cleaning up the code and adding some new features. Maybe I'll release something next week. I'm on a trip now.
-
Hello friends.
I'm very very busy currently but have found some time to work on this code.
I made available many options from the command line, no need to edit the script anymore (oh, and speaking about the code, it is much more clear and organized now. Hey bash hackers, feel free to edit and improve the script).
There is space to new features (such as a semi-transparent belt behind the logo), but I don't have time to look at it currently.
Have a look at the help message to have an idea of the features:
USAGE: generate-launching-images.sh -t theme-name [options] Use '--help' to see all the options -h, --help Print the help message and exit. -t, --theme THEME Create launching images based on THEME. This is the only mandatory option in order to generate the images (see --list-themes). --list-themes List the available themes and exit. --extension EXT Set the extension of the created image file (valid options: png|jpg). --no-ask Do not show the created images and ask for confirmation (blindly accept the created images). --loading-text "TEXT" Set the "LOADING" text (default: "NOW LOADING"). --press-button-text "TEXT" Set the "PRESS A BUTTON" text (default: "PRESS A BUTTON TO CONFIGURE LAUNCH OPTIONS"). --loading-text-color COLOR Set the color for the "LOADING" text (default: white). --press-button-text-color COLOR Set the color for the "PRESS A BUTTON" text. (default: gray50). --no-logo Do not put the system logo on the created image. --destination-dir DIR Put the created images in DIR directory tree (default: /opt/retropie/configs/). --system SYSTEM Create image only for SYSTEM (the default is create for all systems found in es_systems.cfg). --show-timeout TIME Show the created image for TIME seconds before ask if the user accept it (see --no-ask). --solid-bg-color [COLOR] Use a solid color as background. If COLOR is omitted, use the color specified by the theme.
Some tips about specific themes:
material
Use
--solid-bg-color
and omit the COLOR.
Use--press-button-text white
.tronkyfran
Use
--extension jpg
(smaller file size but the image is still beautiful).
Use--no-logo
(most of the background images already have the system logo somewhere in the picture).io
Currently the script is unable to create launching images for the io theme (due to xml peculiarities), but if you run the script with the material theme and
--solid-bg-color black
option, it'll generate some neat images that match fine with the io theme! ;-)luminous
Use
--loading-text-color black
.general tips
If you don't like the generated image for a specific system, you can run the script experimenting other options and using the
--system SYSTEM
option. It creates an image only for the system specified.If don't want "LOADING" or "PRESS A BUTTON" text, use the options omitting the text. Like this:
./generate-launching-images.sh -t tronkyfran --no-logo --loading-text --press-button-text
As a limitation, the "LOADING" and "PRESS A BUTTON" text can't start with
-
.That's it. I hope you enjoy. Let me know if you find some problem.
Cheers!
-
@daeks Would you know how to put a semi-transparent belt behind the logo?
Look at this image and you'll see how a semi-transparent white belt behind the logo can be useful.
I know the Image Magick docs are very rich, but if you already know the trick it would be greatly appreciated. :-)
BTW, I think it's something with the
-draw 'rectangle ...'
option. -
F#CK YEAH! I've implemented the "semi-transparent white belt behind the logo" option!
--logo-belt Put a semi-transparent white belt behind the logo.
Example:
Command:./generate-launching-images.sh -t clean-look --extension jpg --logo-belt --system pcengine
Generated image:
Update your script:
wget https://raw.githubusercontent.com/meleu/share/master/generate-launching-images.sh
-
@meleu
Awesome! Works great but I should note something..../generate-launching-images.sh -t clean-look --extension jpg --logo-belt --system pcengine
The "clean-look" doesn't have art for "pcengine" so if you type the above in exactly, you get an error.
-
@backstander said in runcommand launching images for ANY theme:
The "clean-look" doesn't have art for "pcengine"
It's not true on my RetroPie:
prompt$ ls -l /etc/emulationstation/themes/clean-look/pcengine/ total 8 drwxr-xr-x 2 root root 4096 Jan 10 14:54 art/ -rw-r--r-- 1 root root 3300 Jan 10 14:54 theme.xml
Maybe there's something with you customized
~/.emulationstation/es_systems.cfg
file...EDIT: I think I need to improve the errors feedback to the user...
-
@backstander could you run it again redirecting the stderr to a file and then post the content of the file here?
Step 1
Run the following command:./generate-launching-images.sh -t clean-look --extension jpg --logo-belt --system pcengine 2> error_msgs.txt
Step 2
Paste here the content oferror_msgs.txt
file. -
@meleu
error_msgs.txt
WARNING: failed to prepare the background image for "pcengine" system! WARNING: The launching image for "pcengine" was NOT created.
It does have art but on ES, I get the white screen for "pcengine"...oh wait! I'm asking it for the "tg16" art!
ls -l /etc/emulationstation/themes/clean-look/tg16 ls: cannot access /etc/emulationstation/themes/clean-look/tg16: No such file or directory
Sorry, forgot that detail ;-)
-
@backstander the tg16 logo seems to be the default on clean-look (rather than pcengine).
Could you please execute this:
bash -x ./generate-launching-images.sh -t clean-look --extension jpg --logo-belt --system pcengine 2> error_msgs.txt
And then paste the error_msgs.txt in ghostbin.com? (it'll be a big file this time)
-
@backstander Oh! Now I've got what's the problem in your system. Your
es_systems.cfg
has this config:<platform>pcengine</platform> <theme>tg16</theme>
And the clean-look has no
tg16/theme.xml
.Here is the workaround for it:
cd /etc/emulationstation/themes/clean-look/ sudo ln -s pcengine tg16
In other words, create a symbolic link to pcengine theme directory named
tg16
. It worked fine here. ;-) -
Thanks @meleu
I just tested this with the link and it works great! -
Update:
- added
--list-systems
option toList the installed systems on your RetroPie (get this info from es_systems.cfg)
. - added more info about the errors found while trying to create the images. Example:
Any feedback is welcome. :-)
- added
-
UPDATE
Added the--all-systems
option toCreate image for all systems of the chosen theme
. I think it can be useful for theme makers who want to release a launching images pack for his/her theme. -
How do you install scripts?
-
@FlyingTomahawk
It's on the first postwget https://raw.githubusercontent.com/meleu/share/master/generate-launching-images.sh chmod +x generate-launching-images.sh
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.