This repository has been archived by the owner on Jun 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
_preload.lua
71 lines (57 loc) · 1.72 KB
/
_preload.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--
-- Name: monodevelop/_preload.lua
-- Purpose: Define the MonoDevelop action.
-- Author: Manu Evans
-- Created: 2013/10/28
-- Copyright: (c) 2013-2015 Manu Evans and the Premake project
--
-- TODO:
-- MonoDevelop/Xamarin Studio has 'workspaces', which act like collections of
-- Premake workspaces. If Premake supports multiple workspaces, we should
-- write out a workspace file...
local p = premake
newaction
{
-- Metadata for the command line and help system
trigger = "monodevelop", -- TODO: I'd kinda like an alias 'xamarinstudio' aswell...
shortname = "MonoDevelop",
description = "Generate MonoDevelop/Xamarin Studio project files",
-- The capabilities of this action
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib" },
valid_languages = { "C", "C++", "C#" },
valid_tools = {
cc = { "gcc" },
dotnet = { "mono", "msnet" },
},
-- Workspace and project generation logic
onWorkspace = function(wks)
p.vstudio.vs2005.generateWorkspace(wks)
end,
onProject = function(prj)
p.modules.monodevelop.generateProject(prj)
end,
onCleanWorkspace = function(wks)
p.vstudio.cleanWorkspace(wks)
end,
onCleanProject = function(prj)
p.vstudio.cleanProject(prj)
end,
onCleanTarget = function(prj)
p.vstudio.cleanTarget(prj)
end,
-- This stuff is specific to the Visual Studio exporters
vstudio = {
csprojSchemaVersion = "2.0",
productVersion = "10.0.0",
solutionVersion = "12",
versionName = "2012",
targetFramework = "4.5",
toolsVersion = "4.0",
},
}
--
-- Decide when the full module should be loaded.
--
return function(cfg)
return (_ACTION == "monodevelop")
end