vs2010提取资源

setlocal enabledelayedexpansion


rem cd C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin


set ResGen="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ResGen.exe"


rem %ResGen% "D:\EXinCode\HISCode\EMR_DC\DCSoft.DemoCenter\ResSource\DCSoft.DemoCenter.DemoCenterMain.resources" "D:\EXinCode\HISCode\EMR_DC\DCSoft.DemoCenter\Resources\DCSoft.DemoCenter.DemoCenterMain.resources.resx"


set file=%~dp0
set fileRource=%~dp0ResSource\
set fileTarget=%~dp0Resources\

rem .resources

rem echo Test >>%fileRource%\tmp.txt

rem for /f "tokens=*" %%i in (%file%) do (


for /f "delims=\" %%i in ('dir /b /a-d /o-d "!fileRource!\*.resources"') do (


rem .resources
set _len=10
set _str=%%i
set _strTarget=!_str:~0,-10!.resx

rem echo Test >>%fileRource%\tmp.txt

echo %ResGen% >>%fileRource%\tmp.txt
echo !_str! >>%fileRource%\tmp.txt
echo !_strTarget! >>%fileRource%\tmp.txt
rem echo %ResGen% !_str! !_strTarget! >>%fileRource%\tmp.txt
echo %ResGen% "%fileRource%\!_str!" "%fileTarget%\!_strTarget!" >>%fileRource%\tmp.txt

rem if defined _str set _str=!_str:%strS%=%strR%!

rem if defined _str if not "!_str: =!"=="" echo !_str!>>%temp%/_tmp.txt


%ResGen% "%fileRource%\!_str!" "%fileTarget%\!_strTarget!"

)


pause

猜你喜欢

转载自www.cnblogs.com/stableboy/p/10464360.html
今日推荐