Fix .user file indentation and final line ending

This commit is contained in:
Jason Perkins 2015-03-11 17:36:25 -04:00
parent c8cc548bb0
commit df4b2860ca
4 changed files with 12 additions and 4 deletions

View File

@ -31,15 +31,22 @@
if premake.project.isdotnet(prj) then
premake.generate(prj, ".csproj", vstudio.cs2005.generate)
premake.generate(prj, ".csproj.user", vstudio.cs2005.generateUser)
-- Skip generation of empty user files
local user = p.capture(function() vstudio.cs2005.generateUser(prj) end)
if #user > 0 then
p.generate(prj, ".csproj.user", function() p.outln(user) end)
end
elseif premake.project.iscpp(prj) then
premake.generate(prj, ".vcproj", vstudio.vc200x.generate)
-- Skip generation of empty user files
local user = p.capture(function() vstudio.vc200x.generateUser(prj) end)
if #user > 0 then
p.generate(prj, ".vcproj.user", function() p.out(user) end)
p.generate(prj, ".vcproj.user", function() p.outln(user) end)
end
end
end

View File

@ -47,7 +47,7 @@
-- Skip generation of empty user files
local user = p.capture(function() vstudio.vc2010.generateUser(prj) end)
if #user > 0 then
p.generate(prj, ".vcxproj.user", function() p.out(user) end)
p.generate(prj, ".vcxproj.user", function() p.outln(user) end)
end
-- Only generate a filters file if the source tree actually has subfolders

View File

@ -42,7 +42,7 @@
end
p.pop('</PropertyGroup>')
end
p.out('</Project>')
p.pop('</Project>')
end
end

View File

@ -164,6 +164,7 @@
_indentLevel = 0
callback(obj)
f:close()
_indentLevel = 0
end