diff options
Diffstat (limited to 'scripts/newbitmaps/images/make_default_yaml')
-rwxr-xr-x | scripts/newbitmaps/images/make_default_yaml | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/scripts/newbitmaps/images/make_default_yaml b/scripts/newbitmaps/images/make_default_yaml index 8f4f0128..ce9212f8 100755 --- a/scripts/newbitmaps/images/make_default_yaml +++ b/scripts/newbitmaps/images/make_default_yaml @@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # -# Generate a new DEFAULT.yaml file using hwid_unknown.png as a placeholder. +# Generate a new DEFAULT.yaml file using hwid_unknown.bmp as a placeholder. # yaml_file="DEFAULT.yaml" @@ -25,9 +25,9 @@ cur_x=0 cur_y=0 -# Return width of the specified .png file +# Return width of the specified .bmp file get_x() { - file $1 | awk '{print $4}' | sed -e 's/[^0-9]//g' + file $1 | awk '{print $7}' | sed -e 's/[^0-9]//g' } get_xx() { @@ -35,12 +35,12 @@ get_xx() { get_x $ffile } -# Return height of the specified .png file +# Return height of the specified .bmp file get_y() { - file $1 | awk '{print $6}' | sed -e 's/[^0-9]//g' + file $1 | awk '{print $9}' | sed -e 's/[^0-9]//g' } -# Return height of the specified .png file +# Return height of the specified .bmp file get_yy() { local ffile=$(eval "echo \$$1") get_y $ffile @@ -80,13 +80,13 @@ guess_locale() { } -# Reset the current baseline and width to the size of the specified .png file +# Reset the current baseline and width to the size of the specified .bmp file reset_base() { cur_x=$(get_x "$1") cur_y=$(expr $(get_y $1) - $yborder) } -# Emit a screen line entry centering the given .png files at the current +# Emit a screen line entry centering the given .bmp files at the current # baseline. We assume that all args are the same height. center_up() { local totalx @@ -112,8 +112,8 @@ center_up() { -# Generate a new yaml file for each specified hwid_*.png file. -for hwid_bmp in hwid_unknown.png; do +# Generate a new yaml file for each specified hwid_*.bmp file. +for hwid_bmp in hwid_unknown.bmp; do echo "$yaml_file" # List the images. The major difference is the HWID. @@ -128,38 +128,38 @@ images: # hwid: $hwid_bmp # This URL never changes - url: URL.png + url: Url.bmp # The background images are from the UI people - devmode_bg: Devmode.png - remove_bg: Remove.png - yuck_bg: Yuck.png - insert_bg: Insert.png + devmode_bg: Devmode.bmp + remove_bg: Remove.bmp + yuck_bg: Yuck.bmp + insert_bg: Insert.bmp # The following strings must be approved by the localization people EOF1 # some global variables matching the yaml definitions hwid=$hwid_bmp - url="URL.png" + url="Url.bmp" # Enumerate the bitmaps for each locale-specific string. for lc in $locales; do cat >>"$yaml_file" <<EOF2 - ${lc}_model_text: ${localedir}/$lc/model.png - ${lc}_devmode_text: ${localedir}/$lc/devmode.png - ${lc}_remove_text: ${localedir}/$lc/remove.png - ${lc}_yuck_text: ${localedir}/$lc/yuck.png - ${lc}_insert_text: ${localedir}/$lc/insert.png + ${lc}_model_text: ${localedir}/$lc/model.bmp + ${lc}_devmode_text: ${localedir}/$lc/devmode.bmp + ${lc}_remove_text: ${localedir}/$lc/remove.bmp + ${lc}_yuck_text: ${localedir}/$lc/yuck.bmp + ${lc}_insert_text: ${localedir}/$lc/insert.bmp EOF2 # Also define global variables matching those in the yaml file. - eval "${lc}_model_text=${localedir}/$lc/model.png" - eval "${lc}_devmode_text=${localedir}/$lc/devmode.png" - eval "${lc}_remove_text=${localedir}/$lc/remove.png" - eval "${lc}_yuck_text=${localedir}/$lc/yuck.png" - eval "${lc}_insert_text=${localedir}/$lc/insert.png" + eval "${lc}_model_text=${localedir}/$lc/model.bmp" + eval "${lc}_devmode_text=${localedir}/$lc/devmode.bmp" + eval "${lc}_remove_text=${localedir}/$lc/remove.bmp" + eval "${lc}_yuck_text=${localedir}/$lc/yuck.bmp" + eval "${lc}_insert_text=${localedir}/$lc/insert.bmp" done # List the screens. We need to composite four screens for each locale. @@ -169,13 +169,13 @@ EOF2 echo -n " $lc" echo " ${lc}_devel:" >> "$yaml_file" echo " - [ 0, 0, devmode_bg]" >> "$yaml_file" - reset_base Devmode.png + reset_base Devmode.bmp center_up "${lc}_devmode_text" echo "" >> "$yaml_file" echo " ${lc}_remove:" >> "$yaml_file" echo " - [ 0, 0, remove_bg]" >> "$yaml_file" - reset_base Remove.png + reset_base Remove.bmp center_up "${lc}_model_text" 'hwid' center_up "url" center_up "${lc}_remove_text" @@ -183,7 +183,7 @@ EOF2 echo " ${lc}_yuck:" >> "$yaml_file" echo " - [ 0, 0, yuck_bg]" >> "$yaml_file" - reset_base Yuck.png + reset_base Yuck.bmp center_up "${lc}_model_text" 'hwid' center_up "url" center_up "${lc}_yuck_text" @@ -191,7 +191,7 @@ EOF2 echo " ${lc}_insert:" >> "$yaml_file" echo " - [ 0, 0, insert_bg]" >> "$yaml_file" - reset_base Insert.png + reset_base Insert.bmp center_up "${lc}_model_text" 'hwid' center_up "url" center_up "${lc}_insert_text" |