diff options
author | jimstitt <none@none> | 2014-01-18 08:05:54 +0400 |
---|---|---|
committer | jimstitt <none@none> | 2014-01-18 08:05:54 +0400 |
commit | 8614fe302c57a2df13660da07e10c5dcb3e5c9d6 (patch) | |
tree | 2e8bb96df0d4c2c6600915149c87d40d1a84f24e | |
parent | a18194bfdaed09e32074c012df59903582fd006a (diff) |
Add support for xaml extension.
-rw-r--r-- | src/actions/vstudio/vs2005_csproj.lua | 16 | ||||
-rw-r--r-- | src/tools/dotnet.lua | 7 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/actions/vstudio/vs2005_csproj.lua b/src/actions/vstudio/vs2005_csproj.lua index c4fc815..36a9ea8 100644 --- a/src/actions/vstudio/vs2005_csproj.lua +++ b/src/actions/vstudio/vs2005_csproj.lua @@ -33,6 +33,13 @@ if premake.findfile(prj, testname) then
return "AutoGen", testname
end
+ elseif fname:endswith(".xaml.cs") then
+ -- is there a matching *.cs file?
+ local basename = fname:sub(1, -9)
+ local testname = basename .. ".xaml"
+ if premake.findfile(prj, testname) then
+ return "SubTypeCode", testname
+ end
else
-- is there a *.Designer.cs file?
local basename = fname:sub(1, -4)
@@ -61,6 +68,10 @@ end
end
end
+
+ if fname:endswith(".xaml") then
+ return "XamlDesigner"
+ end
if action == "Content" then
return "CopyNewest"
@@ -107,6 +118,11 @@ _p(' <SubType>Designer</SubType>')
elseif elements == "SubTypeForm" then
_p(' <SubType>Form</SubType>')
+ elseif elements == "SubTypeCode" then
+ _p(' <SubType>Code</SubType>')
+ elseif elements == "XamlDesigner" then
+ _p(' <SubType>Designer</SubType>')
+ _p(' <Generator>MSBuild:Compile</Generator>')
elseif elements == "PreserveNewest" then
_p(' <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>')
end
diff --git a/src/tools/dotnet.lua b/src/tools/dotnet.lua index 69feffa..c52d326 100644 --- a/src/tools/dotnet.lua +++ b/src/tools/dotnet.lua @@ -3,7 +3,6 @@ -- Interface for the C# compilers, all of which are flag compatible. -- Copyright (c) 2002-2009 Jason Perkins and the Premake project -- - premake.dotnet = { } premake.dotnet.namestyle = "windows" @@ -36,6 +35,12 @@ return "EmbeddedResource" elseif fcfg.buildaction == "Copy" or ext == ".asax" or ext == ".aspx" then return "Content" + elseif fcfg.buildaction == "Page" or ext == ".xaml" then + if ( path.getname( fcfg.name ) == "App.xaml" ) then + return "ApplicationDefinition" + else + return "Page" + end else return "None" end |