diff --git a/src/actions/clean/_clean.lua b/src/actions/clean/_clean.lua index fc53d095..0e0ead03 100644 --- a/src/actions/clean/_clean.lua +++ b/src/actions/clean/_clean.lua @@ -59,26 +59,6 @@ onproject = function(prj) for action in premake.action.each() do - -- io.write(action.trigger ..'\n') - if action.trigger =="vs2010" then - if action.oncleanproject then - io.write('vs2010 has an on clean and we are going to call it\n') - else - io.write('vs2010 does not have an on clean\n') - end - if action.oncleansolution then - io.write('vs2010 has an oncleansolution and we are going to call it\n') - else - io.write('vs2010 does not have an oncleansolution\n') - end - if action.oncleantarget then - io.write('vs2010 has an oncleantarget and we are going to call it\n') - else - io.write('vs2010 does not have an oncleantarget\n') - end - - - end if action.oncleanproject then action.oncleanproject(prj) end diff --git a/src/actions/vstudio/_vstudio.lua b/src/actions/vstudio/_vstudio.lua index a785f8b6..32153111 100644 --- a/src/actions/vstudio/_vstudio.lua +++ b/src/actions/vstudio/_vstudio.lua @@ -284,7 +284,53 @@ end end + + + function premake.vs2010_cleansolution(sln) + premake.clean.file(sln, "%%.sln") + premake.clean.file(sln, "%%.suo") + --premake.clean.file(sln, "%%.sdf") + end + function premake.vs2010_cleanproject(prj) + --io.write('vs2010 clean action') + local fname = premake.project.getfilename(prj, "%%") + local vcxname = fname .. ".vcxproj" + --io.write(vcxname) + os.remove(fname .. '.vcxproj') + os.remove(fname .. '.vcxproj.user') + os.remove(fname .. '.vcxproj.filters') + os.remove(fname .. '.sdf') + + --local userfiles = os.matchfiles(fname .. ".vcxproj.user") + --for _, fname in ipairs(userfiles) do + -- os.remove(fname) + --end + + --local filter_files = os.matchfiles(fname .. ".vcxproj.filter") + --for _, fname in ipairs(filter_files) do + -- os.remove(fname) + --end + + --local proj_files = os.matchfiles(fname .. ".vcxproj") + --for _, fname in ipairs(proj_files) do + -- os.remove(fname) + --end + + --local sdf_files = os.matchfiles(fname .. ".sdf") + --for _, fname in ipairs(sdf_files) do + -- os.remove(fname) + --end + + end + + function premake.vs2010_cleantarget(name) + os.remove(name .. ".pdb") + os.remove(name .. ".idb") + os.remove(name .. ".ilk") + --os.remove(name .. ".vshost.exe") + --os.remove(name .. ".exe.manifest") + end -- diff --git a/src/actions/vstudio/vs2010_vcxproxj.lua b/src/actions/vstudio/vs2010_vcxproxj.lua index b53e48f2..e2b25bcf 100644 --- a/src/actions/vstudio/vs2010_vcxproxj.lua +++ b/src/actions/vstudio/vs2010_vcxproxj.lua @@ -675,49 +675,5 @@ local vs10_helpers = premake.vstudio.vs10_helpers vcxproj_filter_files(prj) end - function premake.vs2010_cleansolution(sln) - premake.clean.file(sln, "%%.sln") - premake.clean.file(sln, "%%.suo") - --premake.clean.file(sln, "%%.sdf") - end - - function premake.vs2010_cleanproject(prj) - io.write('vs2010 clean action') - local fname = premake.project.getfilename(prj, "%%") - local vcxname = fname .. ".vcxproj" - io.write(vcxname) - os.remove(fname .. '.vcxproj') - os.remove(fname .. '.vcxproj.user') - os.remove(fname .. '.vcxproj.filters') - os.remove(fname .. '.sdf') - -- - local userfiles = os.matchfiles(fname .. ".vcxproj.user") - for _, fname in ipairs(userfiles) do - os.remove(fname) - end - - local filter_files = os.matchfiles(fname .. ".vcxproj.filter") - for _, fname in ipairs(filter_files) do - os.remove(fname) - end - - local proj_files = os.matchfiles(fname .. ".vcxproj") - for _, fname in ipairs(proj_files) do - os.remove(fname) - end - - local sdf_files = os.matchfiles(fname .. ".sdf") - for _, fname in ipairs(sdf_files) do - os.remove(fname) - end - -- - end - - function premake.vs2010_cleantarget(name) - os.remove(name .. ".pdb") - os.remove(name .. ".idb") - os.remove(name .. ".ilk") - --os.remove(name .. ".vshost.exe") - --os.remove(name .. ".exe.manifest") - end + \ No newline at end of file