Midl CustomBuild _SelectedFiles;$(LolFxCompileDependsOn) @echo off set D=$(IntDir)%(Filename)%(Extension).cpp set "name=lolfx_resource_%(RelativeDir)%(Filename)" set "name=%name:\=_%" set "name=%name:-=_%" set "name=%name:.=_%" echo /* This file was autogenerated. DO NOT MODIFY IT. */ > "%D%" echo extern "C" { char const *%name% = >> "%D%" setlocal disabledelayedexpansion for /F "tokens=1,* delims=`" %%L in ('type "%(Fullpath)"') do ( set "line=%%L" setlocal enabledelayedexpansion echo "!line:"=\"!\n" >> "%D%" endlocal ) endlocal echo ;} >> "%D%" $(IntDir)%(FileName)%(Extension).cpp %(FileName)%(Extension)