| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 ## | 2 ## |
| 3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 4 ## | 4 ## |
| 5 ## Use of this source code is governed by a BSD-style license | 5 ## Use of this source code is governed by a BSD-style license |
| 6 ## that can be found in the LICENSE file in the root of the source | 6 ## that can be found in the LICENSE file in the root of the source |
| 7 ## tree. An additional intellectual property rights grant can be found | 7 ## tree. An additional intellectual property rights grant can be found |
| 8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
| 9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
| 10 ## | 10 ## |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 Filter=$pats \ | 60 Filter=$pats \ |
| 61 UniqueIdentifier=`generate_uuid` \ | 61 UniqueIdentifier=`generate_uuid` \ |
| 62 | 62 |
| 63 file_list_sz=${#file_list[@]} | 63 file_list_sz=${#file_list[@]} |
| 64 for i in ${!file_list[@]}; do | 64 for i in ${!file_list[@]}; do |
| 65 f=${file_list[i]} | 65 f=${file_list[i]} |
| 66 for pat in ${pats//;/$IFS}; do | 66 for pat in ${pats//;/$IFS}; do |
| 67 if [ "${f##*.}" == "$pat" ]; then | 67 if [ "${f##*.}" == "$pat" ]; then |
| 68 unset file_list[i] | 68 unset file_list[i] |
| 69 | 69 |
| 70 objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,[:/],_,g'
) | 70 objf=$(echo ${f%.*}.obj \ |
| 71 | sed -e "s,$src_path_bare,," \ |
| 72 -e 's/^[\./]\+//g' -e 's,[:/ ],_,g') |
| 71 open_tag File RelativePath="$f" | 73 open_tag File RelativePath="$f" |
| 72 | 74 |
| 73 if [ "$pat" == "asm" ] && $asm_use_custom_step; then | 75 if [ "$pat" == "asm" ] && $asm_use_custom_step; then |
| 74 for plat in "${platforms[@]}"; do | 76 for plat in "${platforms[@]}"; do |
| 75 for cfg in Debug Release; do | 77 for cfg in Debug Release; do |
| 76 open_tag FileConfiguration \ | 78 open_tag FileConfiguration \ |
| 77 Name="${cfg}|${plat}" \ | 79 Name="${cfg}|${plat}" \ |
| 78 | 80 |
| 79 tag Tool \ | 81 tag Tool \ |
| 80 Name="VCCustomBuildTool" \ | 82 Name="VCCustomBuildTool" \ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 --proj-guid=*) guid="${optval}" | 130 --proj-guid=*) guid="${optval}" |
| 129 ;; | 131 ;; |
| 130 --module-def=*) link_opts="${link_opts} ModuleDefinitionFile=${optval}" | 132 --module-def=*) link_opts="${link_opts} ModuleDefinitionFile=${optval}" |
| 131 ;; | 133 ;; |
| 132 --exe) proj_kind="exe" | 134 --exe) proj_kind="exe" |
| 133 ;; | 135 ;; |
| 134 --dll) proj_kind="dll" | 136 --dll) proj_kind="dll" |
| 135 ;; | 137 ;; |
| 136 --lib) proj_kind="lib" | 138 --lib) proj_kind="lib" |
| 137 ;; | 139 ;; |
| 138 --src-path-bare=*) src_path_bare=$(fix_path "$optval") | 140 --src-path-bare=*) |
| 141 src_path_bare=$(fix_path "$optval") |
| 142 src_path_bare=${src_path_bare%/} |
| 139 ;; | 143 ;; |
| 140 --static-crt) use_static_runtime=true | 144 --static-crt) use_static_runtime=true |
| 141 ;; | 145 ;; |
| 142 --ver=*) | 146 --ver=*) |
| 143 vs_ver="$optval" | 147 vs_ver="$optval" |
| 144 case "$optval" in | 148 case "$optval" in |
| 145 [789]) | 149 [789]) |
| 146 ;; | 150 ;; |
| 147 *) die Unrecognized Visual Studio Version in $opt | 151 *) die Unrecognized Visual Studio Version in $opt |
| 148 ;; | 152 ;; |
| 149 esac | 153 esac |
| 150 ;; | 154 ;; |
| 151 -I*) | 155 -I*) |
| 152 opt="${opt%/}" | |
| 153 opt=${opt##-I} | 156 opt=${opt##-I} |
| 154 opt=$(fix_path "$opt") | 157 opt=$(fix_path "$opt") |
| 158 opt="${opt%/}" |
| 155 incs="${incs}${incs:+;}"${opt}"" | 159 incs="${incs}${incs:+;}"${opt}"" |
| 156 yasmincs="${yasmincs} -I${opt}" | 160 yasmincs="${yasmincs} -I"${opt}"" |
| 157 ;; | 161 ;; |
| 158 -D*) defines="${defines}${defines:+;}${opt##-D}" | 162 -D*) defines="${defines}${defines:+;}${opt##-D}" |
| 159 ;; | 163 ;; |
| 160 -L*) # fudge . to $(OutDir) | 164 -L*) # fudge . to $(OutDir) |
| 161 if [ "${opt##-L}" == "." ]; then | 165 if [ "${opt##-L}" == "." ]; then |
| 162 libdirs="${libdirs}${libdirs:+;}"\$(OutDir)"" | 166 libdirs="${libdirs}${libdirs:+;}"\$(OutDir)"" |
| 163 else | 167 else |
| 164 # Also try directories for this platform/configuration | 168 # Also try directories for this platform/configuration |
| 165 opt=${opt##-L} | 169 opt=${opt##-L} |
| 166 opt=$(fix_path "$opt") | 170 opt=$(fix_path "$opt") |
| 167 libdirs="${libdirs}${libdirs:+;}"${opt}"" | 171 libdirs="${libdirs}${libdirs:+;}"${opt}"" |
| 168 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)/\
$(ConfigurationName)"" | 172 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)/\
$(ConfigurationName)"" |
| 169 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)&q
uot;" | 173 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)&q
uot;" |
| 170 fi | 174 fi |
| 171 ;; | 175 ;; |
| 172 -l*) libs="${libs}${libs:+ }${opt##-l}.lib" | 176 -l*) libs="${libs}${libs:+ }${opt##-l}.lib" |
| 173 ;; | 177 ;; |
| 174 -*) die_unknown $opt | 178 -*) die_unknown $opt |
| 175 ;; | 179 ;; |
| 176 *) | 180 *) |
| 177 file_list[${#file_list[@]}]="$(fix_path $opt)" | 181 # The paths in file_list are fixed outside of the loop. |
| 182 file_list[${#file_list[@]}]="$opt" |
| 178 case "$opt" in | 183 case "$opt" in |
| 179 *.asm) uses_asm=true | 184 *.asm) uses_asm=true |
| 180 ;; | 185 ;; |
| 181 esac | 186 esac |
| 182 ;; | 187 ;; |
| 183 esac | 188 esac |
| 184 done | 189 done |
| 190 |
| 191 # Make one call to fix_path for file_list to improve performance. |
| 192 fix_file_list |
| 193 |
| 185 outfile=${outfile:-/dev/stdout} | 194 outfile=${outfile:-/dev/stdout} |
| 186 guid=${guid:-`generate_uuid`} | 195 guid=${guid:-`generate_uuid`} |
| 187 asm_use_custom_step=false | 196 asm_use_custom_step=false |
| 188 uses_asm=${uses_asm:-false} | 197 uses_asm=${uses_asm:-false} |
| 189 case "${vs_ver:-8}" in | 198 case "${vs_ver:-8}" in |
| 190 7) vs_ver_id="7.10" | 199 7) vs_ver_id="7.10" |
| 191 asm_use_custom_step=$uses_asm | 200 asm_use_custom_step=$uses_asm |
| 192 warn_64bit='Detect64BitPortabilityProblems=true' | 201 warn_64bit='Detect64BitPortabilityProblems=true' |
| 193 ;; | 202 ;; |
| 194 8) vs_ver_id="8.00" | 203 8) vs_ver_id="8.00" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 AdditionalIncludeDirectories="$incs" \ | 302 AdditionalIncludeDirectories="$incs" \ |
| 294 PreprocessorDefinitions="WIN32;DEBUG;_CONSOLE;_CRT_S
ECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" \ | 303 PreprocessorDefinitions="WIN32;DEBUG;_CONSOLE;_CRT_S
ECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" \ |
| 295 RuntimeLibrary="$debug_runtime" \ | 304 RuntimeLibrary="$debug_runtime" \ |
| 296 WarningLevel="3" \ | 305 WarningLevel="3" \ |
| 297 DebugInformationFormat="1" \ | 306 DebugInformationFormat="1" \ |
| 298 $warn_64bit \ | 307 $warn_64bit \ |
| 299 ;; | 308 ;; |
| 300 vpx) | 309 vpx) |
| 301 tag Tool \ | 310 tag Tool \ |
| 302 Name="VCPreBuildEventTool" \ | 311 Name="VCPreBuildEventTool" \ |
| 303 CommandLine="call obj_int_extract.bat $src_path_bare
$plat_no_ws\\\$(ConfigurationName)" \ | 312 CommandLine="call obj_int_extract.bat "$src_pat
h_bare" $plat_no_ws\\\$(ConfigurationName)" \ |
| 304 | 313 |
| 305 tag Tool \ | 314 tag Tool \ |
| 306 Name="VCCLCompilerTool" \ | 315 Name="VCCLCompilerTool" \ |
| 307 Optimization="0" \ | 316 Optimization="0" \ |
| 308 AdditionalIncludeDirectories="$incs" \ | 317 AdditionalIncludeDirectories="$incs" \ |
| 309 PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO
_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \ | 318 PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO
_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \ |
| 310 RuntimeLibrary="$debug_runtime" \ | 319 RuntimeLibrary="$debug_runtime" \ |
| 311 UsePrecompiledHeader="0" \ | 320 UsePrecompiledHeader="0" \ |
| 312 WarningLevel="3" \ | 321 WarningLevel="3" \ |
| 313 DebugInformationFormat="2" \ | 322 DebugInformationFormat="2" \ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_
SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" \ | 409 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_
SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" \ |
| 401 RuntimeLibrary="$release_runtime" \ | 410 RuntimeLibrary="$release_runtime" \ |
| 402 UsePrecompiledHeader="0" \ | 411 UsePrecompiledHeader="0" \ |
| 403 WarningLevel="3" \ | 412 WarningLevel="3" \ |
| 404 DebugInformationFormat="0" \ | 413 DebugInformationFormat="0" \ |
| 405 $warn_64bit \ | 414 $warn_64bit \ |
| 406 ;; | 415 ;; |
| 407 vpx) | 416 vpx) |
| 408 tag Tool \ | 417 tag Tool \ |
| 409 Name="VCPreBuildEventTool" \ | 418 Name="VCPreBuildEventTool" \ |
| 410 CommandLine="call obj_int_extract.bat $src_path_bare
$plat_no_ws\\\$(ConfigurationName)" \ | 419 CommandLine="call obj_int_extract.bat "$src_pat
h_bare" $plat_no_ws\\\$(ConfigurationName)" \ |
| 411 | 420 |
| 412 tag Tool \ | 421 tag Tool \ |
| 413 Name="VCCLCompilerTool" \ | 422 Name="VCCLCompilerTool" \ |
| 414 Optimization="2" \ | 423 Optimization="2" \ |
| 415 FavorSizeorSpeed="1" \ | 424 FavorSizeorSpeed="1" \ |
| 416 AdditionalIncludeDirectories="$incs" \ | 425 AdditionalIncludeDirectories="$incs" \ |
| 417 PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO
_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \ | 426 PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO
_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \ |
| 418 RuntimeLibrary="$release_runtime" \ | 427 RuntimeLibrary="$release_runtime" \ |
| 419 UsePrecompiledHeader="0" \ | 428 UsePrecompiledHeader="0" \ |
| 420 WarningLevel="3" \ | 429 WarningLevel="3" \ |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 sed -e '/"/s;\([^ "]\)/;\1\\;g' > ${outfile} | 519 sed -e '/"/s;\([^ "]\)/;\1\\;g' > ${outfile} |
| 511 | 520 |
| 512 exit | 521 exit |
| 513 <!-- | 522 <!-- |
| 514 TODO: Add any files not captured by filters. | 523 TODO: Add any files not captured by filters. |
| 515 <File | 524 <File |
| 516 RelativePath=".\ReadMe.txt" | 525 RelativePath=".\ReadMe.txt" |
| 517 > | 526 > |
| 518 </File> | 527 </File> |
| 519 --> | 528 --> |
| OLD | NEW |