You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.0 KiB

  1. #!/bin/bash
  2. #
  3. # make icons using Inkscape
  4. # create output directories
  5. rm -r ../resources/linux/mime/icons/hicolor/*
  6. mkdir -p ../resources/linux/mime/icons/hicolor/scalable
  7. cd ../resources/linux/mime/icons/hicolor
  8. echo -e '\E[0;34m'"Directory \"scalable\" for .svg icons was created."
  9. # copy sources to the scalable dir
  10. cd ../../../../../bitmaps_png/sources
  11. cp icon_kicad.svg ../../resources/linux/mime/icons/hicolor/scalable/kicad.svg
  12. cp icon_pcbnew.svg ../../resources/linux/mime/icons/hicolor/scalable/pcbnew.svg
  13. cp icon_eeschema.svg ../../resources/linux/mime/icons/hicolor/scalable/eeschema.svg
  14. echo -e '\E[0;34m'"Sources of icons was copied."
  15. # convert .svg files into .png files
  16. cd ../../resources/linux/mime/icons/hicolor/scalable
  17. SIZES="16x16
  18. 22x22
  19. 24x24
  20. 32x32
  21. 48x48"
  22. for size in $SIZES
  23. do
  24. sz=${size%x*}
  25. echo -e '\E[0;32m'"\nMaking the mimetypes icons with size $size."
  26. mkdir ../$size
  27. echo -e '\E[0;34m'"Directory $size was created."
  28. mkdir ../$size/mimetypes
  29. echo -e '\E[0;34m'"Subdirectory \"mimetypes\" was created."
  30. tput sgr0
  31. inkscape -f kicad.svg -e ../$size/mimetypes/application-x-kicad-project.png -w $sz -h $sz --export-area-snap
  32. inkscape -f eeschema.svg -e ../$size/mimetypes/application-x-kicad-eeschema.png -w $sz -h $sz --export-area-snap
  33. inkscape -f pcbnew.svg -e ../$size/mimetypes/application-x-kicad-pcbnew.png -w $sz -h $sz --export-area-snap
  34. echo -e '\E[0;34m'"Icons with size $size was created."
  35. if [ $sz -eq 48 ]
  36. then
  37. echo -e '\E[0;32m'"\nMaking the applications icons with size $size."
  38. mkdir ../$size/apps
  39. echo -e '\E[0;34m'"Subdirectory \"apps\" was created."
  40. tput sgr0
  41. inkscape -f kicad.svg -e ../$size/apps/kicad.png -w $sz -h $sz --export-area-snap
  42. inkscape -f eeschema.svg -e ../$size/apps/eeschema.png -w $sz -h $sz --export-area-snap
  43. inkscape -f pcbnew.svg -e ../$size/apps/pcbnew.png -w $sz -h $sz --export-area-snap
  44. echo -e '\E[0;34m'"Icons with size $size was created."
  45. tput sgr0
  46. fi
  47. done