|
@@ -22,19 +22,12 @@ fi
|
|
|
|
|
|
# openttd_vs80.sln is for MSVC 2005
|
|
|
# openttd_vs80.vcproj is for MSVC 2005
|
|
|
# langs_vs80.vcproj is for MSVC 2005
|
|
|
# strgen_vs80.vcproj is for MSVC 2005
|
|
|
|
|
|
# openttd.sln is for MSVC 2003
|
|
|
# openttd.vcproj is for MSVC 2003
|
|
|
# langs.vcproj is for MSVC 2003
|
|
|
# strgen.vcproj is for MSVC 2003
|
|
|
|
|
|
# openttd.tgt is for WatCom
|
|
|
|
|
|
|
|
|
|
|
|
# First, collect the list of Windows files
|
|
|
sdl_config="1"
|
|
|
png_config="1"
|
|
|
os="MSVC"
|
|
@@ -107,24 +100,25 @@ load_main_data() {
|
|
|
} else {
|
|
|
first_time = 1;
|
|
|
}
|
|
|
|
|
|
print " <Filter";
|
|
|
print " Name=\\""$0"\\"";
|
|
|
print " Filter=\\"\\">";
|
|
|
print " >";
|
|
|
}
|
|
|
|
|
|
next;
|
|
|
}
|
|
|
/^$/ { next }
|
|
|
{
|
|
|
if (deep == skip) {
|
|
|
gsub(" ", "", $0);
|
|
|
gsub("/", "\\\\", $0);
|
|
|
print " <File";
|
|
|
print " RelativePath=\\".\\\\'$file_prefix'"$0"\\">";
|
|
|
print " RelativePath=\\".\\\\'$file_prefix'"$0"\\"";
|
|
|
print " >";
|
|
|
print " </File>";
|
|
|
}
|
|
|
}
|
|
|
END { print " </Filter>"; }
|
|
|
'`"
|
|
|
|
|
@@ -135,21 +129,24 @@ load_lang_data() {
|
|
|
RES=""
|
|
|
for i in `ls $1`
|
|
|
do
|
|
|
i=`basename $i | sed s/.txt$//g`
|
|
|
RES="$RES
|
|
|
<File
|
|
|
RelativePath=\"..\\src\\lang\\"$i".txt\">
|
|
|
RelativePath=\"..\\src\\lang\\"$i".txt\"
|
|
|
>
|
|
|
<FileConfiguration
|
|
|
Name=\"Debug|Win32\">
|
|
|
Name=\"Debug|Win32\"
|
|
|
>
|
|
|
<Tool
|
|
|
Name=\"VCCustomBuildTool\"
|
|
|
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
|
|
|
|
|
|
eval "$2=\"\$RES\""
|
|
|
}
|
|
@@ -162,28 +159,13 @@ generate() {
|
|
|
/!!FILES!!/ { stop = 1; }
|
|
|
{
|
|
|
if (stop == 0) { print $0 }
|
|
|
}
|
|
|
' > "$ROOT_DIR/projects/$2"
|
|
|
|
|
|
# The files-list
|
|
|
echo "$1" | awk -v type="$3" '
|
|
|
/
/ {
|
|
|
if (type == "msvc2003") gsub("
", "\n", $0);
|
|
|
}
|
|
|
/Filter="">/ {
|
|
|
if (type == "msvc2005") gsub("Filter=\"\">", ">", $0);
|
|
|
}
|
|
|
/"\/>/ {
|
|
|
if (type == "msvc2005") gsub("/>", "\n" substr($0, 1, index($0, $1) - 2) "/>", $0);
|
|
|
}
|
|
|
/">/ {
|
|
|
if (type == "msvc2005") gsub(">", "\n" substr($0, 1, index($0, $1) - 1) ">", $0);
|
|
|
}
|
|
|
{ print $0 }
|
|
|
' >> "$ROOT_DIR/projects/$2"
|
|
|
echo "$1" >> "$ROOT_DIR/projects/$2"
|
|
|
|
|
|
# Everything below the !!FILES!! marker
|
|
|
cat "$ROOT_DIR/projects/$2".in | tr '\r' '\n' | awk '
|
|
|
BEGIN { stop = 1; }
|
|
|
/^$/ { next }
|
|
|
/!!FILES!!/ { stop = 2; }
|
|
@@ -196,12 +178,10 @@ generate() {
|
|
|
|
|
|
safety_check "$ROOT_DIR/source.list"
|
|
|
|
|
|
load_main_data "$ROOT_DIR/source.list" openttd
|
|
|
load_lang_data "$ROOT_DIR/src/lang/*.txt" lang
|
|
|
|
|
|
generate "$openttd" "openttd.vcproj" "msvc2003"
|
|
|
generate "$openttd" "openttd_vs80.vcproj" "msvc2005"
|
|
|
generate "$openttd" "openttd_vs90.vcproj" "msvc2005"
|
|
|
generate "$lang" "langs.vcproj" "msvc2003"
|
|
|
generate "$lang" "langs_vs80.vcproj" "msvc2005"
|
|
|
generate "$lang" "langs_vs90.vcproj" "msvc2005"
|
|
|
generate "$openttd" "openttd_vs80.vcproj"
|
|
|
generate "$openttd" "openttd_vs90.vcproj"
|
|
|
generate "$lang" "langs_vs80.vcproj"
|
|
|
generate "$lang" "langs_vs90.vcproj"
|