2 using System
.ComponentModel
;
7 using MonoDevelop
.Core
.Gui
.Components
;
8 using MonoDevelop
.Projects
;
10 namespace PythonBinding
13 /// This class handles project specific compiler parameters
15 public class PythonCompilerParameters
: ProjectConfiguration
17 CompilerOptions compilerOptions
= new CompilerOptions ();
19 public CompilerOptions CurrentCompilerOptions
{
21 return compilerOptions
;
25 public string OutputPath
{
27 return OutputDirectory
;
30 OutputDirectory
= value;
34 public string AssemblyName
{
36 return OutputAssembly
;
39 OutputAssembly
= value;
43 [DefaultValue(CompilationTarget
.Exe
)]
44 public CompilationTarget CompilationTarget
{
46 return compilerOptions
.compilationTarget
;
49 compilerOptions
.compilationTarget
= value;
54 public bool IncludeDebugInformation
{
56 return compilerOptions
.includeDebugInformation
;
59 compilerOptions
.includeDebugInformation
= value;
63 public PythonCompilerParameters ()
67 public PythonCompilerParameters (string name
)
72 [XmlNodeName("CompilerOptions")]
73 public class CompilerOptions
75 [XmlAttribute("compilationTarget")]
76 public CompilationTarget compilationTarget
= CompilationTarget
.Exe
;
78 [XmlAttribute("includeDebugInformation")]
79 internal bool includeDebugInformation
= false;
81 public string GenerateOptions ()
83 StringBuilder options
= new StringBuilder ();
84 switch (compilationTarget
) {
85 case PythonBinding
.CompilationTarget
.Dll
:
86 options
.Append ("/dll ");
88 case PythonBinding
.CompilationTarget
.Exe
:
89 options
.Append ("/exe ");
92 throw new System
.NotSupportedException ("Unsupported compilation target : " + compilationTarget
);
95 if (includeDebugInformation
) {
96 options
.Append ("/DEBUG ");
99 return options
.ToString ();