summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/actions/vstudio/_vstudio.lua
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/actions/vstudio/_vstudio.lua')
-rw-r--r--3rdparty/genie/src/actions/vstudio/_vstudio.lua50
1 files changed, 47 insertions, 3 deletions
diff --git a/3rdparty/genie/src/actions/vstudio/_vstudio.lua b/3rdparty/genie/src/actions/vstudio/_vstudio.lua
index eac296897ba..e8d1e175e54 100644
--- a/3rdparty/genie/src/actions/vstudio/_vstudio.lua
+++ b/3rdparty/genie/src/actions/vstudio/_vstudio.lua
@@ -38,7 +38,7 @@
PS3 = "PS3",
Xbox360 = "Xbox 360",
ARM = "ARM",
- Orbis = "Orbis",
+ Orbis = "ORBIS",
Durango = "Durango",
}
@@ -143,7 +143,53 @@
return cfgs
end
+--
+-- Process imported projects and set properties that are needed
+-- for generating the solution.
+--
+
+ function premake.vstudio.bakeimports(sln)
+ for _,iprj in ipairs(sln.importedprojects) do
+ if string.find(iprj.location, ".csproj") ~= nil then
+ iprj.language = "C#"
+ else
+ iprj.language = "C++"
+ end
+
+
+ local f, err = io.open(iprj.location, "r")
+ if (not f) then
+ error(err, 1)
+ end
+ local projcontents = f:read("*all")
+ f:close()
+
+ local found, _, uuid = string.find(projcontents, "<ProjectGuid>{([%w%-]+)}</ProjectGuid>")
+ if not found then
+ error("Could not find ProjectGuid element in project " .. iprj.location, 1)
+ end
+ iprj.uuid = uuid
+
+ if iprj.language == "C++" and string.find(projcontents, "<CLRSupport>true</CLRSupport>") then
+ iprj.flags.Managed = true
+ end
+
+ iprj.relpath = path.getrelative(sln.location, iprj.location)
+ end
+ end
+--
+-- Look up a imported project by project path
+--
+ function premake.vstudio.getimportprj(prjpath, sln)
+ for _,iprj in ipairs(sln.importedprojects) do
+ if prjpath == iprj.relpath then
+ return iprj
+ end
+ end
+
+ error("Could not find reference import project " .. prjpath, 1)
+ end
--
-- Clean Visual Studio files
@@ -184,7 +230,6 @@
end
-
--
-- Assemble the project file name.
--
@@ -219,7 +264,6 @@
end
end
-
--
-- Register Visual Studio 2008
--