Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjimstitt <unknown>2014-01-18 08:05:54 +0400
committerjimstitt <unknown>2014-01-18 08:05:54 +0400
commitadce554d533f14749053e52cd347c3556102393c (patch)
tree2e8bb96df0d4c2c6600915149c87d40d1a84f24e /src
parent8c5185536ce20eb7b4da75b296623969e75f8f08 (diff)
Add support for xaml extension.
Diffstat (limited to 'src')
-rw-r--r--src/actions/vstudio/vs2005_csproj.lua16
-rw-r--r--src/tools/dotnet.lua7
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