<URL: http://bugs.freeciv.org/Ticket/Display.html?id=36586 >


 it is very hard to patch sources adding new nations or modifying
 the existing ones. The reason is that PNG files are not generated
 during the build and do not depend on SVG files. However,
 it is very hard to make them even manually as script convert_png
 search for a mask.png in a current working directory. I've made
 modification, so that it search for make.png in the same directory,
 where files are located, on which it is run.
 I.e., now it is possible to use script as:

 ./data/flags/convert_png ./data/flags/kazakhstan.svg

Thanks, Daniil.

diff -Nur freeciv-2.1.0-beta3.old/data/flags/convert_png freeciv-2.1.0-beta3/data/flags/convert_png
--- freeciv-2.1.0-beta3.old/data/flags/convert_png	2007-02-17 06:26:42.000000000 +0200
+++ freeciv-2.1.0-beta3/data/flags/convert_png	2007-02-22 03:40:50.000000000 +0200
@@ -21,6 +21,8 @@
 for file0 in $files; do
   filebase=`echo $file0 | sed s/.svg$//i`
+  dirbase=`dirname $file0`
@@ -54,8 +56,8 @@
   $RENDERER -f $file0 -w $WIDTH -h $HEIGHT -e $file1 > /dev/null
-  composite -gravity center -compose src-over $file1 mask.png $file2
-  composite -gravity center -compose src-over mask.png $file2 $file3
+  composite -gravity center -compose src-over $file1 $dirbase/mask.png $file2
+  composite -gravity center -compose src-over $dirbase/mask.png $file2 $file3
   convert -transparent magenta $file3 $file4
   rm -f $file1 $file2 $file3 "$filebase-4-fs8.png"
Freeciv-dev mailing list

Reply via email to