~mandel/ubuntuone-windows-installer/fix_null_pointer_start

« back to all changes in this revision

Viewing changes to tools/Nant/doc/help/tasks/setenv.html

  • Committer: Manuel de la Pena
  • Date: 2010-07-08 13:22:59 UTC
  • Revision ID: mandel@themacaque.com-20100708132259-y1jgyuyqfe9stt8u
Updated build script to run tests and added all the required tools so far.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
2
<html xmlns="http://www.w3.org/1999/xhtml">
 
3
  <!-- Documenting T:NAnt.Core.Tasks.SetEnvTask-->
 
4
  <head>
 
5
    <meta http-equiv="Content-Language" content="en-ca" />
 
6
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
7
    <link rel="stylesheet" type="text/css" href="../style.css" />
 
8
    <title>&lt;setenv&gt; Task</title>
 
9
  </head>
 
10
  <body>
 
11
    <table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
 
12
      <tr>
 
13
        <td class="NavBar-Cell">
 
14
          <a href="http://nant.sourceforge.net">
 
15
            <b>NAnt</b>
 
16
          </a>
 
17
          <img alt="-&gt;" src="../images/arrow.gif" />
 
18
          <a href="../index.html">Help</a>
 
19
          <img alt="-&gt;" src="../images/arrow.gif" />
 
20
          <a href="../tasks/index.html">Task Reference</a>
 
21
          <img alt="-&gt;" src="../images/arrow.gif" /> &lt;setenv&gt;</td>
 
22
        <td class="NavBar-Cell" align="right">
 
23
                        v0.90</td>
 
24
      </tr>
 
25
    </table>
 
26
    <h1>&lt;setenv&gt;</h1>
 
27
    <p> Sets an environment variable or a whole collection of them. Use an empty <code>value</code> attribute to clear a variable. </p>
 
28
    <p class="i2">
 
29
      <b>Note:</b>  Variables will be set for the current NAnt process and all child processes that NAnt spawns (compilers, shell tools, etc). If the intention is to only set a variable for a single child process, then using the <a href="../tasks/exec.html">&lt;exec&gt;</a> task and its nested <code>environment</code> element might be a better option. </p>
 
30
    <p class="i2">
 
31
      <b>Note:</b>  Expansion of inline environment variables is performed using the syntax of the current platform. So on Windows platforms using the string %PATH% in the <code>value</code> attribute will result in the value of the PATH variable being expanded in place before the variable is set. </p>
 
32
    <h3>Parameters</h3>
 
33
    <div class="table">
 
34
      <table>
 
35
        <tr>
 
36
          <th>Attribute</th>
 
37
          <th style="text-align: center;">Type</th>
 
38
          <th>Description</th>
 
39
          <th style="text-align: center;">Required</th>
 
40
        </tr>
 
41
        <tr>
 
42
          <td valign="top">dir</td>
 
43
          <td style="text-align: center;">directory</td>
 
44
          <td> The value for a directory-based environment variable. NAnt will convert it to an absolute path. </td>
 
45
          <td style="text-align: center;">False</td>
 
46
        </tr>
 
47
        <tr>
 
48
          <td valign="top">file</td>
 
49
          <td style="text-align: center;">file</td>
 
50
          <td> The value for a file-based environment variable. NAnt will convert it to an absolute filename. </td>
 
51
          <td style="text-align: center;">False</td>
 
52
        </tr>
 
53
        <tr>
 
54
          <td valign="top">name</td>
 
55
          <td style="text-align: center;">string</td>
 
56
          <td> The name of a single Environment variable to set </td>
 
57
          <td style="text-align: center;">False</td>
 
58
        </tr>
 
59
        <tr>
 
60
          <td valign="top">path</td>
 
61
          <td style="text-align: center;">&lt;path&gt;</td>
 
62
          <td> The value for a PATH like environment variable. You can use <code>:</code> or <code>;</code> as path separators and NAnt will convert it to the platform's local conventions. </td>
 
63
          <td style="text-align: center;">False</td>
 
64
        </tr>
 
65
        <tr>
 
66
          <td valign="top">value</td>
 
67
          <td style="text-align: center;">string</td>
 
68
          <td> The literal value for the environment variable. </td>
 
69
          <td style="text-align: center;">False</td>
 
70
        </tr>
 
71
        <tr>
 
72
          <td valign="top">failonerror</td>
 
73
          <td style="text-align: center;">bool</td>
 
74
          <td> Determines if task failure stops the build, or is just reported. The default is <b>true</b>. </td>
 
75
          <td style="text-align: center;">False</td>
 
76
        </tr>
 
77
        <tr>
 
78
          <td valign="top">if</td>
 
79
          <td style="text-align: center;">bool</td>
 
80
          <td> If <b>true</b> then the task will be executed; otherwise, skipped. The default is <b>true</b>. </td>
 
81
          <td style="text-align: center;">False</td>
 
82
        </tr>
 
83
        <tr>
 
84
          <td valign="top">unless</td>
 
85
          <td style="text-align: center;">bool</td>
 
86
          <td> Opposite of <code>if</code>. If <b>false</b> then the task will be executed; otherwise, skipped. The default is <b>false</b>. </td>
 
87
          <td style="text-align: center;">False</td>
 
88
        </tr>
 
89
        <tr>
 
90
          <td valign="top">verbose</td>
 
91
          <td style="text-align: center;">bool</td>
 
92
          <td> Determines whether the task should report detailed build log messages. The default is <b>false</b>. </td>
 
93
          <td style="text-align: center;">False</td>
 
94
        </tr>
 
95
      </table>
 
96
    </div>
 
97
    <h3>Nested Elements:</h3>
 
98
    <!--Array-->
 
99
    <!--NestedElementArray=T:NAnt.Core.Types.EnvironmentVariable-->
 
100
    <h4>
 
101
      <a id="variable">
 
102
      </a>
 
103
                    &lt;variable&gt;
 
104
                </h4>
 
105
    <div class="nested-element">
 
106
      <p> Represents an environment variable. </p>
 
107
      <h3>Parameters</h3>
 
108
      <div class="table">
 
109
        <table>
 
110
          <tr>
 
111
            <th>Attribute</th>
 
112
            <th style="text-align: center;">Type</th>
 
113
            <th>Description</th>
 
114
            <th style="text-align: center;">Required</th>
 
115
          </tr>
 
116
          <tr>
 
117
            <td valign="top" class="required">name</td>
 
118
            <td style="text-align: center;">string</td>
 
119
            <td> The name of the environment variable. </td>
 
120
            <td style="text-align: center;">True</td>
 
121
          </tr>
 
122
          <tr>
 
123
            <td valign="top">dir</td>
 
124
            <td style="text-align: center;">directory</td>
 
125
            <td> The value for a directory-based environment variable. NAnt will convert it to an absolute path. </td>
 
126
            <td style="text-align: center;">False</td>
 
127
          </tr>
 
128
          <tr>
 
129
            <td valign="top">file</td>
 
130
            <td style="text-align: center;">file</td>
 
131
            <td> The value for a file-based environment variable. NAnt will convert it to an absolute filename. </td>
 
132
            <td style="text-align: center;">False</td>
 
133
          </tr>
 
134
          <tr>
 
135
            <td valign="top">if</td>
 
136
            <td style="text-align: center;">bool</td>
 
137
            <td> Indicates if the environment variable should be passed to the external program. If <b>true</b> then the environment variable will be passed; otherwise, skipped. The default is <b>true</b>. </td>
 
138
            <td style="text-align: center;">False</td>
 
139
          </tr>
 
140
          <tr>
 
141
            <td valign="top">path</td>
 
142
            <td style="text-align: center;">&lt;path&gt;</td>
 
143
            <td> The value for a PATH like environment variable. You can use <code>:</code> or <code>;</code> as path separators and NAnt will convert it to the platform's local conventions. </td>
 
144
            <td style="text-align: center;">False</td>
 
145
          </tr>
 
146
          <tr>
 
147
            <td valign="top">unless</td>
 
148
            <td style="text-align: center;">bool</td>
 
149
            <td> Indicates if the environment variable should not be passed to the external program. If <b>false</b> then the environment variable will be passed; otherwise, skipped. The default is <b>false</b>. </td>
 
150
            <td style="text-align: center;">False</td>
 
151
          </tr>
 
152
          <tr>
 
153
            <td valign="top">value</td>
 
154
            <td style="text-align: center;">string</td>
 
155
            <td> The literal value for the environment variable. </td>
 
156
            <td style="text-align: center;">False</td>
 
157
          </tr>
 
158
        </table>
 
159
      </div>
 
160
      <h3>Nested Elements:</h3>
 
161
      <!--Element-->
 
162
      <h4>
 
163
        <a id="path">
 
164
        </a>
 
165
                    &lt;<a href="../types/path.html">path</a>&gt;
 
166
                </h4>
 
167
      <div class="nested-element"> Sets a single environment variable and treats it like a PATH - ensures the right separator for the local platform is used. <p /></div>
 
168
      <h4>
 
169
        <a id="path">
 
170
        </a>
 
171
                    &lt;/<a href="../types/path.html">path</a>&gt;
 
172
                </h4>
 
173
    </div>
 
174
    <h4>
 
175
      <a id="variable">
 
176
      </a>
 
177
                    &lt;/variable&gt;
 
178
                </h4>
 
179
    <h3>Examples</h3>
 
180
    <ul class="examples">
 
181
      <li>
 
182
        <p>Set the MONO_PATH environment variable on a *nix platform.</p>
 
183
        <pre class="code">
 
184
  &lt;setenv name=="MONO_PATH" value="/home/jimbob/dev/foo:%MONO_PATH%"/&gt;
 
185
  </pre>
 
186
      </li>
 
187
      <li>
 
188
        <p>Set a collection of environment variables. Note the nested variable used to set var3.</p>
 
189
        <pre class="code">
 
190
  &lt;setenv&gt;
 
191
          &lt;variable name="var1" value="value2" /&gt;
 
192
          &lt;variable name="var2" value="value2" /&gt;
 
193
          &lt;variable name="var3" value="value3:%var2%" /&gt;
 
194
  &lt;/setenv&gt;
 
195
  </pre>
 
196
      </li>
 
197
      <li>
 
198
        <p>Set environment variables using nested path elements.</p>
 
199
        <pre class="code">
 
200
  &lt;path id="build.path"&gt;
 
201
         &lt;pathelement dir="c:/windows" /&gt;
 
202
         &lt;pathelement dir="c:/cygwin/usr/local/bin" /&gt;
 
203
     &lt;/path&gt;
 
204
  &lt;setenv&gt;         
 
205
          &lt;variable name="build_path" &gt;
 
206
                 &lt;path refid="build.path" /&gt;
 
207
          &lt;/variable&gt;
 
208
          &lt;variable name="path2"&gt;
 
209
             &lt;path&gt;
 
210
                 &lt;pathelement dir="c:/windows" /&gt;
 
211
                 &lt;pathelement dir="c:/cygwin/usr/local/bin" /&gt;
 
212
             &lt;/path&gt;
 
213
          &lt;/variable&gt;
 
214
  &lt;/setenv&gt;    
 
215
  </pre>
 
216
      </li>
 
217
    </ul>
 
218
    <h3>Requirements</h3>
 
219
    <div style="margin-left: 20px;">
 
220
      <b>Assembly:</b> NAnt.Core (0.90.3780.0)
 
221
            </div>
 
222
  </body>
 
223
</html>
 
 
b'\\ No newline at end of file'