X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=gfx%2Fmenu%2Fluminos_versionbuilder%2Fversionbuilder;fp=gfx%2Fmenu%2Fluminos_versionbuilder%2Fversionbuilder;h=c7e6c467bb9f3f8a1ed3e1dbc9ec2a59d218dec8;hb=e6c8a9870089dc5d2100070046b19763b4122376;hp=0000000000000000000000000000000000000000;hpb=7289eb3abcc40761a2d129dedb25384d25a96a5f;p=xonotic%2Fmediasource.git diff --git a/gfx/menu/luminos_versionbuilder/versionbuilder b/gfx/menu/luminos_versionbuilder/versionbuilder new file mode 100755 index 0000000..c7e6c46 --- /dev/null +++ b/gfx/menu/luminos_versionbuilder/versionbuilder @@ -0,0 +1,29 @@ +#!/bin/bash +#Uses Inkscape, Gimp and sed. +#Requires the provided Gimp script (all2tga.scm) to be present in ~/.gimp*/scripts/. + +#Creates the background_(ingame_)l2.tga images, with a given version string argument. + +#The appearance of the string is defined by the master element in background_l2.svg: +#BlurAll > Version > VersionMaster +#The visible parts (Fill, Border, Glow) are duplicates of the master element. +#If the font or its size is changed, the gradients of the duplicates may need adjustment. + +#Check for valid argument +if [ -z "$1" ] +then + echo "Usage:" + echo "$0 [Version String]" + echo "" + exit 3 +fi + +#Create tmp.svg with version string according to argument +sed -e "s/VERSIONPLACEHOLDER/$1/" background_l2.svg > tmp.svg + +#Create tga files +inkscape -f "tmp.svg" -d 90 -e "background_l2.png" +gimp -d -f -i -b '(all2tga "background_l2.png" 1)' -b '(gimp-quit 0)' +cp background_l2.tga background_ingame_l2.tga +rm tmp.svg +rm background_l2.png