2013-01-12 02:12:49 -05:00
|
|
|
@echo off
|
|
|
|
set rt=
|
|
|
|
set rtver=
|
|
|
|
set osver=
|
2015-07-14 04:13:18 -04:00
|
|
|
for /f "usebackq" %%I in (`
|
|
|
|
dumpbin -dependents %1 ^|
|
|
|
|
findstr -r -i -c:"\<vcruntime.*\.dll$" -c:"\<msvcr.*\.dll$"
|
|
|
|
`) do (
|
|
|
|
set rt=%%~nI
|
|
|
|
)
|
2015-04-23 15:51:18 -04:00
|
|
|
|
2015-07-14 04:13:18 -04:00
|
|
|
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @(
|
|
|
|
::- downcase
|
|
|
|
call set rt=%%rt:%%i=%%i%%
|
|
|
|
)
|
2015-04-23 15:51:18 -04:00
|
|
|
|
2013-01-12 02:12:49 -05:00
|
|
|
if "%rt%" == "msvcrt" (
|
|
|
|
call set rtver=60
|
2015-07-14 04:13:18 -04:00
|
|
|
) else if "%rt:~0,5%" == "msvcr" (
|
2013-01-12 02:12:49 -05:00
|
|
|
call set rtver=%%rt:msvcr=%%
|
|
|
|
call set osver=_%%rtver%%
|
2015-07-14 04:13:18 -04:00
|
|
|
) else if "%rt:~0,9%" == "vcruntime" (
|
|
|
|
call set rtver=%%rt:vcruntime=%%
|
|
|
|
call set osver=_%%rtver%%
|
|
|
|
) else (
|
|
|
|
(echo %0: %1 is not linked to msvcrt nor vcruntime) 1>&2
|
|
|
|
exit 1
|
|
|
|
)
|
|
|
|
for %%I in (
|
|
|
|
"PLATFORM = $(TARGET_OS)%osver%"
|
|
|
|
"RT = %rt%"
|
|
|
|
"RT_VER = %rtver%"
|
|
|
|
) do @(
|
|
|
|
echo %%~I
|
2013-01-12 02:12:49 -05:00
|
|
|
)
|