From 7f54c59a66ddec3fa1bb6b730f580b6189adcdc8 Mon Sep 17 00:00:00 2001 From: glx Date: Fri, 4 Mar 2011 22:34:10 +0000 Subject: (svn r22188) -Add: Generate the settings as part of the MSVC build process, and enable it in Makefile too --- projects/generate | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'projects/generate') diff --git a/projects/generate b/projects/generate index 17e983c94..2ee7d6b1a 100755 --- a/projects/generate +++ b/projects/generate @@ -77,7 +77,7 @@ safety_check() { done } -grep '\.h' "$ROOT_DIR/source.list" | grep -v '../objs/langs/table/strings.h' | sed 's/ //' | sort > tmp.headers.source.list +grep '\.h' "$ROOT_DIR/source.list" | grep -v '../objs/langs/table/strings.h\|../objs/settings/table/settings.h' | sed 's/ //' | sort > tmp.headers.source.list find "$ROOT_DIR/src" \( -iname "*.h" -or -iname "*.hpp" \) -and -not -ipath "*/.svn/*" | sed "s~$ROOT_DIR/src/~~" | sort > tmp.headers.src if [ -n "`diff tmp.headers.source.list tmp.headers.src`" ]; then echo "The following headers are missing in source.list and not in /src/ or vice versa." @@ -204,6 +204,28 @@ load_lang_data() { eval "$2=\"\$RES\"" } +load_settings_data() { + RES="" + RES2=" +#3\$(IntDir)\\settings_gen.exe -o \$(OutDir)\\table\\settings.h -b ..\\src\\table\\settings.h.preamble -a ..\\src\\table\\settings.h.postamble" + for i in `ls $1` + do + i=`basename $i` + RES="$RES +#1 +#1 +#2 +#4 +#4 INI +#4 " + RES2="$RES2 ..\\src\\table\\"$i + done + + eval "$2=\"\$RES\$RES2\"" +} + generate() { echo "Generating $2..." if [ $# -eq 3 ]; then @@ -266,6 +288,12 @@ load_lang_data "$ROOT_DIR/src/lang/*.txt" lang langvcxproj=`echo "$lang" | grep "^#2" | sed "s~#2~~g"` lang=`echo "$lang" | grep "^#1" | sed "s~#1~~g"` +load_settings_data "$ROOT_DIR/src/table/*.ini" settings +settingsfiles=`echo "$settings" | grep "^#4" | sed "s~#4~~g"` +settingscommand=`echo "$settings" | grep "^#3" | sed "s~#3~~g"` +settingsvcxproj=`echo "$settings" | grep "^#2" | sed "s~#2~~g"` +settings=`echo "$settings" | grep "^#1" | sed "s~#1~~g"` + generate "$openttd" "openttd_vs80.vcproj" generate "$openttd" "openttd_vs90.vcproj" generate "$openttdvcxproj" "openttd_vs100.vcxproj" @@ -273,3 +301,7 @@ generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters" generate "$lang" "langs_vs80.vcproj" generate "$lang" "langs_vs90.vcproj" generate "$langvcxproj" "langs_vs100.vcxproj" +generate "$settings" "settings_vs80.vcproj" "$settingscommand" +generate "$settings" "settings_vs90.vcproj" "$settingscommand" +generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand" +generate "$settingsfiles" "settings_vs100.vcxproj.filters" -- cgit v1.2.3-70-g09d2