diff options
author | rubidium <rubidium@openttd.org> | 2007-02-21 17:59:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-21 17:59:34 +0000 |
commit | 45b662c679e0f443883e2408b9db4614e95fc3e4 (patch) | |
tree | ab1bb7c1c7ecfeeb3a40dd287883ea4f5cb70489 /projects/generate | |
parent | 9907e496b1ec010570afc54fdd596406cac043bb (diff) | |
download | openttd-45b662c679e0f443883e2408b9db4614e95fc3e4.tar.xz |
(svn r8832) -Change: rewrite the solution file generator a little so it makes project files that look more like the ones generated by respectively MSVC2003 and MSVC2005.
For some reason the internal formatting of the XML between MSVC2003 and MSVC2005 differs, so adding a file in MSVC2005 would result in basically adding the entire openttd_vs80.vcproj to the diff.
Diffstat (limited to 'projects/generate')
-rwxr-xr-x | projects/generate | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/projects/generate b/projects/generate index 477dcf597..841495885 100755 --- a/projects/generate +++ b/projects/generate @@ -111,8 +111,7 @@ load_lang_data() { i=`basename $i | sed s/.txt$//g` RES="$RES <File - RelativePath=\"..\\src\\lang\\"$i".txt\" - > + RelativePath=\"..\\src\\lang\\"$i".txt\"> <FileConfiguration Name=\"Debug|Win32\"> <Tool @@ -120,8 +119,7 @@ load_lang_data() { Description=\"Generating "$i" language file\" CommandLine=\"..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang "\$(InputPath)"
\" AdditionalDependencies=\"\" - Outputs=\"..\\bin\\lang\\"$i".lng\" - /> + Outputs=\"..\\bin\\lang\\"$i".lng\"/> </FileConfiguration> </File>" done @@ -141,7 +139,15 @@ generate() { ' > \"$ROOT_DIR/projects/$2\"`" # The files-list - echo "$1" >> "$ROOT_DIR/projects/$2" + if [ "$3" = "msvc2003" ]; then + echo "$1" | sed 's@\
\
@\n@' >> "$ROOT_DIR/projects/$2" + else + echo "$1" | sed ' + s@Filter="">@>@; + s@^\([ ]*\)\([^ <].*[^/]\)>$@\1\2\n\1>@g; + s@^ \([ ]*\)\([^ <].*\)/>$@ \1\2\n\1/>@g; + ' >> "$ROOT_DIR/projects/$2" + fi # Everything below the !!FILES!! marker RES="`cat \"$ROOT_DIR/projects/$2\".in | tr '\r' '\n' | awk ' @@ -158,7 +164,7 @@ generate() { load_main_data "$ROOT_DIR/source.list" openttd load_lang_data "$ROOT_DIR/src/lang/*.txt" lang -generate "$openttd" "openttd.vcproj" -generate "$openttd" "openttd_vs80.vcproj" -generate "$lang" "langs_vs80.vcproj" -generate "$lang" "langs.vcproj" +generate "$openttd" "openttd.vcproj" "msvc2003" +generate "$openttd" "openttd_vs80.vcproj" "msvc2005" +generate "$lang" "langs.vcproj" "msvc2003" +generate "$lang" "langs_vs80.vcproj" "msvc2005" |