diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 2b442485..65aaba46 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -496,7 +496,7 @@ vc2010.element(3, "Outputs", condition, '%s', table.concat(outputs, " ")) if filecfg.buildmessage then - _p(3,'%s', condition, premake.esc(filecfg.buildmessage)) + vc2010.element(3, "Message", condition, '%s', premake.esc(filecfg.buildmessage)) end end end diff --git a/src/base/detoken.lua b/src/base/detoken.lua index bd0749aa..a3aab4bb 100644 --- a/src/base/detoken.lua +++ b/src/base/detoken.lua @@ -34,6 +34,12 @@ setmetatable(environ, {__index = _G}) function expandtoken(token, environ) + -- check if we should leave the path alone + local leavealone = token:startswith("ro-") + if leavealone then + token = token:sub(4) + end + -- convert the token into a function to execute local func, err = loadstring("return " .. token) if not func then @@ -71,7 +77,7 @@ -- will contain it. Otherwise I ended up with an absolute path in -- the generated project, and it can no longer be moved around. - if isAbs and not ispath and basedir then + if isAbs and not ispath and basedir and not leavealone then result = path.getrelative(basedir, result) end