]> git.rm.cloudns.org Git - xonotic/mediasource.git/commitdiff
Update luminos `create` scripts for current tools bones_was_here/menu_scriptupdate 36/head
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 4 Feb 2025 13:33:43 +0000 (23:33 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Tue, 4 Feb 2025 13:33:43 +0000 (23:33 +1000)
Tested with inkscape 1.2.2 gimp 2.10.34 blender 3.4.1 imagemagick 7.1.1

No bashisms so no need to depend on bash specifically.

13 files changed:
gfx/luminos/hud_icons/flags/create
gfx/luminos/hud_icons/healtharmor/create
gfx/luminos/hud_icons/inventory/create
gfx/luminos/hud_icons/keys/create
gfx/luminos/hud_icons/mods/create
gfx/luminos/hud_icons/notify/create
gfx/luminos/hud_icons/race/create
gfx/luminos/hud_icons/voteprogress/create
gfx/luminos/hud_icons/weapos/create
gfx/luminos/hud_svg/create
gfx/luminos/menu_svg/create
gfx/luminos/readme.txt
gfx/luminos/scoreboard_svg/create

index 0ec61ded1b591e428d22e7300a7a0b9bed4e5e84..cd499671d0ec1a3f1a0e36f04211ddb661104db0 100755 (executable)
@@ -1,25 +1,34 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
    mkdir "$dir"
 fi
 
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+       RENAME=rename.ul # debian, ubuntu
+else
+       RENAME=rename # arch, gentoo, fedora
+fi
+
 #Method to render single Blender scene
 render_blendscene()
 {
-    blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
-    rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+       blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+       $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
 }
 
 #Method to create all icons of the specified color
 create_colorversion()
 {
        #Export flagcontent from svg
-    inkscape -f "flagcontent_${colorversion}.svg" -e "flagcontent.png"
+       inkscape "flagcontent_${colorversion}.svg" -o "flagcontent.png"
 
        #Render the Blender scenes
        blendfile="flags"
@@ -46,7 +55,7 @@ create_colorversion()
        convert "notify_color_taken.tga" -filter Cubic -resize 192x96 "notify_temp.tga"
 
        #Add white border to all .tga images of this color
-       gimp -d -f -i \
+       gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
        -b '(addborder "flag_color*.tga" 255 255 255 24 3 9 1 3)' \
        -b '(addborder "notify_color*.tga" 255 255 255 16 2 6 1 3)' \
        -b '(gimp-quit 0)'
@@ -61,20 +70,20 @@ create_colorversion()
        composite -gravity Center "notify_shield.png" "notify_color_shielded.tga" "notify_color_shielded.tga"
 
        #Rename to color version
-       rename "color" "$colorversion" *".tga"
+       $RENAME "color" "$colorversion" *".tga"
        cd ..
 }
 
 #Export all neutral png images from svg files
-inkscape -f "flagcontent_carrying.svg" -e "flagcontent_carrying.png"
-inkscape -f "flag_shield.svg" -e "${dir}/flag_shield.png"
-inkscape -f "notify_shield.svg" -e "${dir}/notify_shield.png"
+inkscape "flagcontent_carrying.svg" -o "flagcontent_carrying.png"
+inkscape "flag_shield.svg" -o "${dir}/flag_shield.png"
+inkscape "notify_shield.svg" -o "${dir}/notify_shield.png"
 
 #Create base images (colorize nyx.png)
 convert "nyx.png" -fill "#004fff" -tint 75 "${dir}/base_blue.png"
 convert "nyx.png" -fill "#ff0000" -tint 75 "${dir}/base_red.png"
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "base*.png" 255 255 255 0 1 3 1 2)' \
 -b '(gimp-quit 0)'
 cd ..
@@ -94,6 +103,6 @@ rm *".png"
 rm *"temp.tga"
 
 #RLE compress tga images
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index 97a47e8a85238f6a10fc76d6056d236a48b25732..ac3150317c439e9ceffa2fa1f2627d38ae3ed4bc 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory, if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,7 +13,7 @@ fi
 #Copy images to subdirectory, add white border
 cp *".tga" "$dir"
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "*.tga" 255 255 255 24 3 9 1 3)' \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index 67e1c4aa0ee4fbf92c7a511df0d64549218fdb55..a590df88d0f894ca1f2a093b1b67aafb220c4608 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory, if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,7 +13,7 @@ fi
 #Copy images to subdirectory, add white border
 cp *".tga" "$dir"
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "*.tga" 255 255 255 16 2 6 1 3)' \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index fae73fc5e6bca468143eb61fa8e25fb88dbd922f..e3896b7a4ed455a0f3234890a7d3b3fa9e065694 100755 (executable)
@@ -1,24 +1,33 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
    mkdir "$dir"
 fi
 
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+       RENAME=rename.ul # debian, ubuntu
+else
+       RENAME=rename # arch, gentoo, fedora
+fi
+
 #Export png from all svg files
 for f in *".svg"
 do
-    inkscape -f "$f" -e "`basename $f .svg`.png"
+       inkscape "$f" -o "`basename $f .svg`.png"
 done
 
 #Method to render single Blender scene
 render_blendscene()
 {
-    blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
-    rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+       blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+       $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
 }
 
 #Render the Blender scenes
@@ -56,6 +65,6 @@ done
 
 #RLE compress tga files
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index 97a47e8a85238f6a10fc76d6056d236a48b25732..ac3150317c439e9ceffa2fa1f2627d38ae3ed4bc 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory, if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,7 +13,7 @@ fi
 #Copy images to subdirectory, add white border
 cp *".tga" "$dir"
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "*.tga" 255 255 255 24 3 9 1 3)' \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index 53d1da7c82eb1e041611264e2f7e8df945fb8672..a0310f4fd5348ef2edfdfd8abf632e71d49e232b 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Uses this font:
 font="DejaVu-Sans-Bold"
 
@@ -11,11 +13,18 @@ then
    mkdir "$dir"
 fi
 
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+       RENAME=rename.ul # debian, ubuntu
+else
+       RENAME=rename # arch, gentoo, fedora
+fi
+
 #Method to render single Blender scene
 render_blendscene()
 {
-    blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
-    rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+       blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+       $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
 }
 
 #Render the Blender scenes
@@ -28,7 +37,7 @@ blendscene="notify_water"
 render_blendscene
 
 #Export png from svg, render notify_telefrag
-inkscape -f "crosshair.svg" -e "crosshair.png"
+inkscape "crosshair.svg" -o "crosshair.png"
 blendscene="notify_telefrag"
 render_blendscene
 rm "crosshair.png"
@@ -43,7 +52,7 @@ cp "notify"*".tga" "$dir"
 
 #Add white border to all tga images
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "*.tga" 255 255 255 16 2 6 1 2)' \
 -b '(gimp-quit 0)'
 
@@ -78,6 +87,6 @@ render_blendscene
 
 #RLE compress tga files
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
index 5b33183d3c334e2b0bbda3b05d2d2ae79111dc00..f6e7e305cbfaaeea1c6b55c91690f373e6072d1f 100755 (executable)
@@ -1,18 +1,27 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
    mkdir "$dir"
 fi
 
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+       RENAME=rename.ul # debian, ubuntu
+else
+       RENAME=rename # arch, gentoo, fedora
+fi
+
 #Method to render single Blender scene
 render_blendscene()
 {
-    blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
-    rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+       blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+       $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
 }
 
 #Render the Blender blendscenes
@@ -28,7 +37,7 @@ render_blendscene
 
 #Add white border and RLE compress tga files
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(addborder "*.tga" 255 255 255 24 3 9 0 2)' \
 -b '(all2tga "*.tga" 1)' \
 -b '(gimp-quit 0)'
@@ -36,4 +45,4 @@ gimp -d -f -i \
 #For compatibility with current HUD:
 #Copy and rename newrank icons
 cp "race_newrank.tga" "race_newrankyellow.tga"
-rename "newrank" "newrankgreen" "race_newrank.tga"
+$RENAME "newrank" "newrankgreen" "race_newrank.tga"
index 710d4c3cfb5ba0bb6ca742dda57ab86d89e29a67..4b04df37987025898cbb746660a994cee5abab47 100755 (executable)
@@ -1,18 +1,27 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
    mkdir "$dir"
 fi
 
+#Guess how `rename` program from `util-linux` package is named :face_palm:
+if which rename.ul; then
+       RENAME=rename.ul # debian, ubuntu
+else
+       RENAME=rename # arch, gentoo, fedora
+fi
+
 #Method to render single Blender scene
 render_blendscene()
 {
-    blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
-    rename "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
+       blender -b "${PWD}/${blendfile}.blend" -S "$blendscene" -o "//${dir}/${blendscene}#" -f 1
+       $RENAME "${blendscene}1" "$blendscene" "${dir}/${blendscene}1."*
 }
 
 #Render the Blender scenes
@@ -26,7 +35,7 @@ render_blendscene
 
 #Edit voteprogress_back and RLE compress tga files
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(dbca "voteprogress_back.tga" 1 127 0 0.0)' \
 -b '(dbca "voteprogress_back.tga" 0 127 0 0.0)' \
 -b '(addborder "voteprogress_back.tga" 255 255 255 16 2 6 0 2)' \
index 4144aa4e44c92625bf3b9bfcf914d8eb7391e73a..6906fddcc4a213130cd25ac6ab4d775f381167af 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory, if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,7 +13,7 @@ fi
 #Copy images to subdirectory, add white border
 cp *".tga" "$dir"
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(dbca "*.tga" 0 15 7 0.0)' \
 -b '(addborder "*.tga" 255 255 255 16 2 6 1 3)' \
 -b '(all2tga "*.tga" 1)' \
index 451f4db5857bc5a8375fce78fbca168e2b22f015..5b62b94e0d45bce2d93fb5cd3dee961971655059 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,10 +13,12 @@ fi
 #Export png from svg files (to subdirectory)
 for f in *".svg"
 do
-    inkscape -f "$f" -e "${dir}/`basename $f .svg`.png"
+       inkscape "$f" -o "${dir}/`basename $f .svg`.png"
 done
 
 #Convert from png to tga (RLE compressed), remove png
 cd "$dir"
-gimp -d -f -i -b '(all2tga "*.png" 1)' -b '(gimp-quit 0)'
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
+       -b '(all2tga "*.png" 1)' \
+       -b '(gimp-quit 0)'
 rm *".png"
index 233e32cc255a8483c851a1342a60656ced000d4b..58cc4518e91cf200cc4c8971a1c424d119fcd572 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,13 +13,13 @@ fi
 #Export png from svg files (to subdirectory)
 for f in *".svg"
 do
-    inkscape -f "$f" -d 90 -e "${dir}/`basename $f .svg`.png"
+       inkscape "$f" -d 90 -o "${dir}/`basename $f .svg`.png"
 done
 
 #Create bigbuttons
 for f in "bigbutton"*".svg"
 do
-    inkscape -f "$f" -d 180 -e "${dir}/`basename $f .svg`.png"
+       inkscape "$f" -d 180 -o "${dir}/`basename $f .svg`.png"
 done
 
 #Copy identical images
@@ -45,7 +47,7 @@ cp crosshairbutton_c.png colorbutton_c.png
 cp crosshairbutton_f.png colorbutton_f.png
 
 #Edit and convert files
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(dbca "*gray*" 1 0 0 0.0)' \
 -b '(dbca "*_d*" 0 0 0 50.0)' \
 -b '(all2tga "*.png" 1)' \
index 52790d0fbc6a967610f8ae62371f59207e0e1e0a..fc942906da47cea9eef6d9bcd1e1018a707d4f19 100755 (executable)
@@ -16,7 +16,7 @@ The ./create shell scripts batch-export, render and
 convert the final images from various sourcefiles.
 
 They use Inkscape, Gimp, Blender and ImageMagick, and require the provided
-Gimp scripts (gimp_files/*.scm) to be present in ~/.gimp*/scripts/.
+Gimp scripts (gimp_files/*.scm) to be present in ~/.config/GIMP/*.*/scripts/
 
 ==========================
 Foreign Sourcefiles
index f4810b7e1a7b3f95cd744f0234bd6eace135ee89..25a8314e3b50d86a8633ff1dfeb796d633e51838 100755 (executable)
@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 #Save created files in this subdirectory:
 dir="created"
 
+set -ex
+
 #Create subdirectory if not already existing
 if [ ! -d "$dir" ]
 then
@@ -11,12 +13,12 @@ fi
 #Export png from svg files (to subdirectory)
 for f in *".svg"
 do
-    inkscape -f "$f" -d 90 -e "${dir}/`basename $f .svg`.png"
+       inkscape "$f" -d 90 -o "${dir}/`basename $f .svg`.png"
 done
 
 #Cconvert files
 cd "$dir"
-gimp -d -f -i \
+gimp -d -f -i --batch-interpreter plug-in-script-fu-eval \
 -b '(all2tga "*.png" 1)' \
 -b '(gimp-quit 0)'