~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric-updates

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Projects/MonoDevelop.Projects/AbstractProjectConfiguration.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-18 08:40:51 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090218084051-gh8m6ukvokbwj7cf
Tags: 1.9.2+dfsg-1ubuntu1
* Merge from Debian Experimental (LP: #330519), remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24
    - Add libmono-cairo1.0-cil to build-deps to fool pkg-config check

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//  AbstractProjectConfiguration.cs
 
1
//  ProjectConfiguration.cs
2
2
//
3
3
//  This file was derived from a file from #Develop. 
4
4
//
21
21
using System;
22
22
using System.IO;
23
23
using System.Collections;
 
24
using System.Collections.Generic;
24
25
using System.Diagnostics;
25
26
using System.ComponentModel;
26
27
using System.Xml;
27
28
 
28
29
using MonoDevelop.Projects;
29
 
using MonoDevelop.Projects.Serialization;
 
30
using MonoDevelop.Core.Serialization;
30
31
 
31
32
namespace MonoDevelop.Projects
32
33
{
34
35
        /// External language bindings may choose to extend this class.
35
36
        /// It makes things a bit easier.
36
37
        /// </summary>
37
 
        public abstract class AbstractProjectConfiguration : AbstractConfiguration
 
38
        public abstract class ProjectConfiguration : SolutionItemConfiguration
38
39
        {
39
 
                [ProjectPathItemProperty ("Output/directory")]
 
40
                [ProjectPathItemProperty ("OutputPath")]
40
41
                string directory = "." + Path.DirectorySeparatorChar.ToString();
41
42
                
42
 
                [ProjectPathItemProperty ("Build/executeBeforeBuild", DefaultValue = "")]
 
43
                [ProjectPathItemProperty ("ExecuteBeforeBuild", DefaultValue = "")]
43
44
                string executeBeforeBuild = String.Empty;
44
45
                
45
 
                [ProjectPathItemProperty ("Build/executeAfterBuild", DefaultValue = "")]
 
46
                [ProjectPathItemProperty ("ExecuteAfterBuild", DefaultValue = "")]
46
47
                string executeAfterBuild = String.Empty;
47
48
                
48
 
                [ItemProperty ("Build/debugmode")]
49
 
                bool debugmode = true;
 
49
                [ItemProperty ("DebugSymbols", DefaultValue=false)]
 
50
                bool debugmode;
50
51
                
51
 
                [ItemProperty ("Output/signAssembly", DefaultValue = false)]
 
52
                [ItemProperty ("SignAssembly", DefaultValue = false)]
52
53
                bool signAssembly = false;
53
54
                
54
 
                [ProjectPathItemProperty ("Output/assemblyKeyFile")]
 
55
                [ProjectPathItemProperty ("AssemblyKeyFile")]
55
56
                string assemblyKeyFile = String.Empty;
56
57
                
57
 
                [ProjectPathItemProperty ("Execution/executeScript", DefaultValue = "")]
 
58
                [ProjectPathItemProperty ("ExecuteScript", DefaultValue = "")]
58
59
                string executeScript = String.Empty;
59
60
                
60
 
                [ItemProperty ("Execution/runwithwarnings")]
61
 
                protected bool runWithWarnings = true;
62
 
                
63
 
                [ItemProperty ("Execution/commandlineparameters", DefaultValue = "")]
64
 
                public string commandLineParameters = String.Empty;
65
 
                
66
 
                [ItemProperty ("Execution/externalconsole", DefaultValue=false)]
67
 
                public bool externalConsole = false;
68
 
 
69
 
                [ItemProperty ("Execution/consolepause")]
70
 
                public bool pauseconsoleoutput = true;
71
 
 
72
 
                public AbstractProjectConfiguration()
 
61
                [ItemProperty ("RunWithWarnings", DefaultValue=true)]
 
62
                bool runWithWarnings = true;
 
63
                
 
64
                [ItemProperty ("Commandlineparameters", DefaultValue = "")]
 
65
                string commandLineParameters = String.Empty;
 
66
                
 
67
                [ItemProperty ("Externalconsole", DefaultValue=false)]
 
68
                bool externalConsole = false;
 
69
 
 
70
                [ItemProperty ("ConsolePause", DefaultValue=true)]
 
71
                bool pauseconsoleoutput = true;
 
72
 
 
73
                [ItemProperty ("EnvironmentVariables")]
 
74
                [ItemProperty ("Variable", Scope="item")]
 
75
                [ItemProperty ("name", Scope="key")]
 
76
                [ItemProperty ("value", Scope="value")]
 
77
                Dictionary<string,string> envVars;
 
78
 
 
79
                public ProjectConfiguration ()
 
80
                {
 
81
                }
 
82
                
 
83
                public ProjectConfiguration (string name): base (name)
73
84
                {
74
85
                }
75
86
                
112
123
                        get { return signAssembly; }
113
124
                        set { signAssembly = value; }
114
125
                }
 
126
                
115
127
                public string AssemblyKeyFile {
116
128
                        get { return assemblyKeyFile; }
117
129
                        set { assemblyKeyFile = value; }
118
130
                }
119
131
                
120
 
                
121
 
                public override void CopyFrom (IConfiguration configuration)
 
132
                public Dictionary<string,string> EnvironmentVariables {
 
133
                        get {
 
134
                                if (envVars == null)
 
135
                                        envVars = new Dictionary<string,string> ();
 
136
                                return envVars; 
 
137
                        }
 
138
                }
 
139
                
 
140
                
 
141
                public override void CopyFrom (ItemConfiguration configuration)
122
142
                {
123
143
                        base.CopyFrom (configuration);
124
 
                        AbstractProjectConfiguration conf = (AbstractProjectConfiguration) configuration;
 
144
                        ProjectConfiguration conf = (ProjectConfiguration) configuration;
125
145
                        
126
146
                        directory = conf.directory;
127
147
                        executeScript = conf.executeScript;
134
154
                        pauseconsoleoutput = conf.pauseconsoleoutput;
135
155
                        signAssembly = conf.signAssembly;
136
156
                        assemblyKeyFile = conf.assemblyKeyFile;
 
157
                        if (conf.envVars != null)
 
158
                                envVars = new Dictionary<string,string> (conf.envVars);
 
159
                        else
 
160
                                envVars = null;
137
161
                }
138
162
        }
139
163
}