projects/generate
branchcpp_gui
changeset 6268 4b5241e5dd10
parent 6255 7215bc7cb877
child 6285 187e3ef04cc9
equal deleted inserted replaced
6267:7c8ec33959b1 6268:4b5241e5dd10
   109 	for i in `ls $1`
   109 	for i in `ls $1`
   110 	do
   110 	do
   111 		i=`basename $i | sed s/.txt$//g`
   111 		i=`basename $i | sed s/.txt$//g`
   112 		RES="$RES
   112 		RES="$RES
   113 		<File
   113 		<File
   114 			RelativePath=\"..\\src\\lang\\"$i".txt\"
   114 			RelativePath=\"..\\src\\lang\\"$i".txt\">
   115 			>
       
   116 			<FileConfiguration
   115 			<FileConfiguration
   117 				Name=\"Debug|Win32\">
   116 				Name=\"Debug|Win32\">
   118 				<Tool
   117 				<Tool
   119 					Name=\"VCCustomBuildTool\"
   118 					Name=\"VCCustomBuildTool\"
   120 					Description=\"Generating "$i" language file\"
   119 					Description=\"Generating "$i" language file\"
   121 					CommandLine=\"..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang &quot;\$(InputPath)&quot;&#x0D;&#x0A;\"
   120 					CommandLine=\"..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang &quot;\$(InputPath)&quot;&#x0D;&#x0A;\"
   122 					AdditionalDependencies=\"\"
   121 					AdditionalDependencies=\"\"
   123 					Outputs=\"..\\bin\\lang\\"$i".lng\"
   122 					Outputs=\"..\\bin\\lang\\"$i".lng\"/>
   124 				/>
       
   125 			</FileConfiguration>
   123 			</FileConfiguration>
   126 		</File>"
   124 		</File>"
   127 	done
   125 	done
   128 
   126 
   129 	eval "$2=\"\$RES\""
   127 	eval "$2=\"\$RES\""
   139 			if (stop == 0) { print $0 }
   137 			if (stop == 0) { print $0 }
   140 		}
   138 		}
   141 	' > \"$ROOT_DIR/projects/$2\"`"
   139 	' > \"$ROOT_DIR/projects/$2\"`"
   142 
   140 
   143 	# The files-list
   141 	# The files-list
   144 	echo "$1" >> "$ROOT_DIR/projects/$2"
   142 	if [ "$3" = "msvc2003" ]; then
       
   143 		echo "$1" | sed 's@\&#x0D;\&#x0A;@\n@' >> "$ROOT_DIR/projects/$2"
       
   144 	else
       
   145 		echo "$1" | sed '
       
   146 			s@Filter="">@>@;
       
   147 			s@^\([	]*\)\([^	<].*[^/]\)>$@\1\2\n\1>@g;
       
   148 			s@^	\([	]*\)\([^	<].*\)/>$@	\1\2\n\1/>@g;
       
   149 		' >> "$ROOT_DIR/projects/$2"
       
   150 	fi
   145 
   151 
   146 	# Everything below the !!FILES!! marker
   152 	# Everything below the !!FILES!! marker
   147 	RES="`cat \"$ROOT_DIR/projects/$2\".in | tr '\r' '\n' | awk '
   153 	RES="`cat \"$ROOT_DIR/projects/$2\".in | tr '\r' '\n' | awk '
   148 		BEGIN { stop = 1; }
   154 		BEGIN { stop = 1; }
   149 		/^$/ { next }
   155 		/^$/ { next }
   156 }
   162 }
   157 
   163 
   158 load_main_data "$ROOT_DIR/source.list" openttd
   164 load_main_data "$ROOT_DIR/source.list" openttd
   159 load_lang_data "$ROOT_DIR/src/lang/*.txt" lang
   165 load_lang_data "$ROOT_DIR/src/lang/*.txt" lang
   160 
   166 
   161 generate "$openttd" "openttd.vcproj"
   167 generate "$openttd" "openttd.vcproj"      "msvc2003"
   162 generate "$openttd" "openttd_vs80.vcproj"
   168 generate "$openttd" "openttd_vs80.vcproj" "msvc2005"
   163 generate "$lang" "langs_vs80.vcproj"
   169 generate "$lang" "langs.vcproj"           "msvc2003"
   164 generate "$lang" "langs.vcproj"
   170 generate "$lang" "langs_vs80.vcproj"      "msvc2005"