| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 This build script will build the Dart RCP and Dart update site. | 2 This build script will build the Dart RCP and Dart update site. |
| 3 | 3 |
| 4 This script will setup the PDE build structure and then call into the PDE | 4 This script will setup the PDE build structure and then call into the PDE |
| 5 build system. The PDE build system has to run under Eclipse. | 5 build system. The PDE build system has to run under Eclipse. |
| 6 --> | 6 --> |
| 7 <project name="build_dart" default="build_rcp"> | 7 <project name="build_dart" default="build_rcp"> |
| 8 | 8 |
| 9 <import file="build-common.xml" /> | 9 <import file="build-common.xml" /> |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 <echoProperty propertyName="user.name" /> | 68 <echoProperty propertyName="user.name" /> |
| 69 <echoProperty propertyName="dataLocation" /> | 69 <echoProperty propertyName="dataLocation" /> |
| 70 <condition property="data.location" value="${dataLocation}"> | 70 <condition property="data.location" value="${dataLocation}"> |
| 71 <isset property="dataLocation" /> | 71 <isset property="dataLocation" /> |
| 72 </condition> | 72 </condition> |
| 73 <property name="data.location" location="./build-settings" /> | 73 <property name="data.location" location="./build-settings" /> |
| 74 <echoProperty propertyName="data.location" /> | 74 <echoProperty propertyName="data.location" /> |
| 75 <!-- | 75 <!-- |
| 76 validate that the data location is a directory | 76 validate that the data location is a directory |
| 77 --> | 77 --> |
| 78 <fail>Error: | 78 <fail>* |
| 79 ********************************** |
| 80 Error: |
| 79 data.location must be set to a valid directory containing the config
uration properties file. | 81 data.location must be set to a valid directory containing the config
uration properties file. |
| 80 the current value is ${data.location}. | 82 the current value is ${data.location}. |
| 83 ********************************** |
| 81 <condition> | 84 <condition> |
| 82 <not> | 85 <not> |
| 83 <available file="${data.location}" type="dir" /> | 86 <available file="${data.location}" type="dir" /> |
| 84 </not> | 87 </not> |
| 85 </condition> | 88 </condition> |
| 86 </fail> | 89 </fail> |
| 87 <property name="user.property.file" location="${data.location}/${user.na
me}.properties" /> | 90 <property name="user.property.file" location="${data.location}/${user.na
me}.properties" /> |
| 88 <property name="default-user.property.file" location="${data.location}/d
efault-user.properties" /> | 91 <property name="default-user.property.file" location="${data.location}/d
efault-user.properties" /> |
| 89 <property name="eclipse.property.file" location="${data.location}/eclips
e-platform.properties" /> | 92 <property name="eclipse.property.file" location="${data.location}/eclips
e-platform.properties" /> |
| 90 <echo message="reading ${eclipse.property.file}" /> | 93 <echo message="reading ${eclipse.property.file}" /> |
| 91 <property file="${eclipse.property.file}" /> | 94 <property file="${eclipse.property.file}" /> |
| 92 | 95 |
| 93 <!-- | 96 <!-- |
| 94 validate that the default-user.property file exists | 97 validate that the ${user.name}.property file exists |
| 95 --> | 98 --> |
| 96 <fail>Error: | 99 <fail>* |
| 100 ********************************** |
| 101 Error: |
| 97 ${user.property.file} must exist. | 102 ${user.property.file} must exist. |
| 103 In the directory ${data.location} |
| 104 copy the "user.properties" file to "${user.name}.properties" |
| 105 and adjust the content for your build situation |
| 106 ********************************** |
| 98 <condition> | 107 <condition> |
| 99 <not> | 108 <not> |
| 100 <available file="${user.property.file}" type="file" /> | 109 <available file="${user.property.file}" type="file" /> |
| 101 </not> | 110 </not> |
| 102 </condition> | 111 </condition> |
| 103 </fail> | 112 </fail> |
| 104 <echo message="reading ${user.property.file}" /> | 113 <echo message="reading ${user.property.file}" /> |
| 105 <property file="${user.property.file}" /> | 114 <property file="${user.property.file}" /> |
| 106 | 115 |
| 107 <!-- | 116 <!-- |
| 108 validate that the default-user.property file exists | 117 validate that the default-user.property file exists |
| 109 --> | 118 --> |
| 110 <fail>Error: | 119 <fail>Error: |
| 111 ${default-user.property.file} must exist. | 120 ${default-user.property.file} must exist. |
| 112 <condition> | 121 <condition> |
| 113 <not> | 122 <not> |
| 114 <available file="${default-user.property.file}" type="file"
/> | 123 <available file="${default-user.property.file}" type="file"
/> |
| 115 </not> | 124 </not> |
| 116 </condition> | 125 </condition> |
| 117 </fail> | 126 </fail> |
| 118 | 127 |
| 119 <!-- | 128 <!-- |
| 120 validate the the build.source is a directory | 129 validate the the build.source is correctly set |
| 130 by verifying that ${build.source}/docs/README.txt exists |
| 121 --> | 131 --> |
| 122 <fail>Error: | 132 <fail>* |
| 123 build.source must be set to the root of the dart Eclipse tree it mus
t be a directory | 133 ********************************** |
| 124 containing the source for the Dart Eclipse product. | 134 Error: |
| 125 The current value is ${build.source}. | 135 build.source must point to [svnroot]/dart/editor (root of the Dart E
ditor source tree) |
| 126 <condition> | 136 as obtained from http://code.google.com/p/dart/wiki/GettingTheSource
?tm=4 |
| 127 <not> | 137 Current value: ${build.source}. |
| 128 <available file="${build.source}" type="dir" /> | 138 ********************************** |
| 129 </not> | |
| 130 </condition> | |
| 131 </fail> | |
| 132 <!-- | |
| 133 validate that ${build.source}/docs/README.txt exists | |
| 134 --> | |
| 135 <fail>Error: | |
| 136 It appears that build.source is not pointing to the "editor" directo
ry in the Dart source tree. | |
| 137 The build is trying to verify that file ${build.source}/docs/README.
txt is a file. | |
| 138 The current value of "build.source" is ${build.source}. | |
| 139 <condition> | 139 <condition> |
| 140 <not> | 140 <not> |
| 141 <available file="${build.source}/docs/README.txt" type="file
" /> | 141 <available file="${build.source}/docs/README.txt" type="file
" /> |
| 142 </not> | 142 </not> |
| 143 </condition> | 143 </condition> |
| 144 </fail> | 144 </fail> |
| 145 | 145 |
| 146 <property environment="env" /> | 146 <property environment="env" /> |
| 147 <condition property="build.revision" value="${env.BUILDBOT_GOT_REVISION}
"> | 147 <condition property="build.revision" value="${env.BUILDBOT_GOT_REVISION}
"> |
| 148 <isset property="env.BUILDBOT_GOT_REVISION" /> | 148 <isset property="env.BUILDBOT_GOT_REVISION" /> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 178 --> | 178 --> |
| 179 <mkdir dir="${build.downloads}" /> | 179 <mkdir dir="${build.downloads}" /> |
| 180 | 180 |
| 181 <mkdir dir="${build.runtime}" /> | 181 <mkdir dir="${build.runtime}" /> |
| 182 <mkdir dir="${build.target}" /> | 182 <mkdir dir="${build.target}" /> |
| 183 <mkdir dir="${build.stage.plugins}" /> | 183 <mkdir dir="${build.stage.plugins}" /> |
| 184 <mkdir dir="${build.stage.features}" /> | 184 <mkdir dir="${build.stage.features}" /> |
| 185 <mkdir dir="${build.out}" /> | 185 <mkdir dir="${build.out}" /> |
| 186 | 186 |
| 187 </target> | 187 </target> |
| 188 |
| 189 <!-- - - - - - - - - - - - - - - - - - |
| 190 target: buildLibraries |
| 191 - - - - - - - - - - - - - - - - - --> |
| 192 <target name="buildLibraries" depends="init"> |
| 193 <property name="libraries.out.name" value="libraries"/> |
| 194 <property name="libraries.out.dir" location="${build.stage.include.dir}/
${libraries.out.name}" /> |
| 195 <delete dir="${libraries.out.dir}"/> |
| 196 |
| 197 <!-- dart:core and dart:core_impl |
| 198 copy "core" source directorys into a single temp directory before bu
ilding libraries |
| 199 --> |
| 200 <mkdir dir="${build.tmp}/lib/core-dartc"/> |
| 201 <copy todir="${build.tmp}/lib/core-dartc"> |
| 202 <fileset dir="${build.source.root}/corelib"/> |
| 203 <fileset dir="${build.source.root}/compiler/lib"/> |
| 204 </copy> |
| 205 <copyDartLib name="core" dir="${build.tmp}/lib/core-dartc" libfile="core
lib.dart"/> |
| 206 <copyDartLib name="core_impl" dir="${build.tmp}/lib/core-dartc" libfile=
"corelib_impl.dart" |
| 207 todir="${libraries.out.dir}/core"/> |
| 208 |
| 209 <!-- dart:dom --> |
| 210 <copyDartLib name="dom" dir="${build.source.root}/client/dom"/> |
| 211 |
| 212 <!-- dart:html --> |
| 213 <copyDartLib name="html" dir="${build.source.root}/client/html"/> |
| 214 |
| 215 <!-- dart:json --> |
| 216 <copyDartLib name="json" dir="${build.source.root}/client/json"/> |
| 217 |
| 218 </target> |
| 219 |
| 220 <!-- - - - - - - - - - - - - - - - - - |
| 221 target: setupDevWorkspace |
| 222 - - - - - - - - - - - - - - - - - --> |
| 223 <target name="setupDevWorkspace" depends="buildLibraries"> |
| 224 <!-- This build script must be executed in Eclipse |
| 225 so that the ${eclipse.home} Ant property is defined --> |
| 226 <fail unless="eclipse.home">* |
| 227 ********************************** |
| 228 Execute this Ant script inside Eclipse |
| 229 and select the 'Run in the same JRE as the workspace' option |
| 230 on the 'JRE' tab of the launch dialog |
| 231 -- OR -- |
| 232 Define the "eclipse.home" property to point to your Eclipse installa
tion |
| 233 ********************************** |
| 234 </fail> |
| 235 <property name="libraries.dev.dir" location="${eclipse.home}/${libraries
.out.name}"/> |
| 236 <echo message="Copying ${libraries.out.dir}"/> |
| 237 <echo message="to ${libraries.dev.dir}"/> |
| 238 <delete dir="${libraries.dev.dir}"/> |
| 239 <mkdir dir="${libraries.dev.dir}"/> |
| 240 <copy todir="${libraries.dev.dir}"> |
| 241 <fileset dir="${libraries.out.dir}"/> |
| 242 </copy> |
| 243 </target> |
| 188 | 244 |
| 189 <!-- - - - - - - - - - - - - - - - - - | 245 <!-- - - - - - - - - - - - - - - - - - |
| 190 target: setupRuntimeEclipse | 246 target: setupRuntimeEclipse |
| 191 - - - - - - - - - - - - - - - - - --> | 247 - - - - - - - - - - - - - - - - - --> |
| 192 <target name="setupRuntimeEclipse"> | 248 <target name="setupRuntimeEclipse"> |
| 193 <setupEclipse location="${build.runtime}" eclipse="${build.runtime.eclip
se.version}" | 249 <setupEclipse location="${build.runtime}" eclipse="${build.runtime.eclip
se.version}" |
| 194 arch="${build.eclipse.arch}" /> | 250 arch="${build.eclipse.arch}" /> |
| 195 <fileset dir="${build.runtime}/eclipse/plugins" id="launcherFs" > | 251 <fileset dir="${build.runtime}/eclipse/plugins" id="launcherFs" > |
| 196 <include name="*launcher_*.jar" /> | 252 <include name="*launcher_*.jar" /> |
| 197 </fileset> | 253 </fileset> |
| 198 <pathconvert property="eclipse.runtime.launcher.jar" refid="launcherFs"
/> | 254 <pathconvert property="eclipse.runtime.launcher.jar" refid="launcherFs"
/> |
| 199 </target> | 255 </target> |
| 200 | 256 |
| 201 <!-- | 257 <!-- |
| 202 copy the code from the svn structure to the PDE structure and get rid of the
linked resources | 258 copy the code from the svn structure to the PDE structure and get rid of the
linked resources |
| 203 --> | 259 --> |
| 204 <target name="setupBuild" depends="init, setupRuntimeEclipse" > | 260 <target name="setupBuild" depends="init, buildLibraries, setupRuntimeEclipse
" > |
| 205 <setupTargetEclipse location="${build.target}" eclipse="${build.target.e
clipse.version}" | 261 <setupTargetEclipse location="${build.target}" eclipse="${build.target.e
clipse.version}" |
| 206 arch="${build.eclipse.arch}" /> | 262 arch="${build.eclipse.arch}" /> |
| 207 <!-- installDirIntoTargetEclipse updatesite="${build.source.root}/third_
party/chromesdk/0.3.0" | 263 <!-- installDirIntoTargetEclipse updatesite="${build.source.root}/third_
party/chromesdk/0.3.0" |
| 208 ius="org.chromium.sdk.feature.group" | 264 ius="org.chromium.sdk.feature.group" |
| 209 uniqueId="chrome"/ --> | 265 uniqueId="chrome"/ --> |
| 210 <!-- installDirIntoTargetEclipse updatesite="${build.source.root}/third_
party/usageprofiler" | 266 <!-- installDirIntoTargetEclipse updatesite="${build.source.root}/third_
party/usageprofiler" |
| 211 ius="com.google.gdt.eclipse.usageprofiler.f
eature.feature.group" | 267 ius="com.google.gdt.eclipse.usageprofiler.f
eature.feature.group" |
| 212 uniqueId="profiler"/--> | 268 uniqueId="profiler"/--> |
| 213 | 269 |
| 214 <ant antfile="build.xml" dir="${build.source.root}/third_party/closure_c
ompiler_src" | 270 <ant antfile="build.xml" dir="${build.source.root}/third_party/closure_c
ompiler_src" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 237 <replacefilter token="@REVISION@" value="${build.revision}" /> | 293 <replacefilter token="@REVISION@" value="${build.revision}" /> |
| 238 </replace> | 294 </replace> |
| 239 | 295 |
| 240 <replace dir="${build.stage.plugins}/com.google.dart.tools.ui" > | 296 <replace dir="${build.stage.plugins}/com.google.dart.tools.ui" > |
| 241 <include name="**/DartToolsPlugin.java" /> | 297 <include name="**/DartToolsPlugin.java" /> |
| 242 <replacefilter token="@REVISION@" value="${build.revision}" /> | 298 <replacefilter token="@REVISION@" value="${build.revision}" /> |
| 243 </replace> | 299 </replace> |
| 244 | 300 |
| 245 <!-- create the samples directory --> | 301 <!-- create the samples directory --> |
| 246 <property name="samples.out.dir" | 302 <property name="samples.out.dir" |
| 247 value="${build.stage.features}/com.google.dart.tools.deploy.fe
ature/include/samples" /> | 303 value="${build.stage.include.dir}/samples" /> |
| 248 | 304 |
| 249 <!-- Clock --> | 305 <!-- Clock --> |
| 250 <copy todir="${samples.out.dir}/clock"> | 306 <copy todir="${samples.out.dir}/clock"> |
| 251 <fileset dir="${build.source.root}/samples/clock"> | 307 <fileset dir="${build.source.root}/samples/clock"> |
| 252 </fileset> | 308 </fileset> |
| 253 </copy> | 309 </copy> |
| 254 | 310 |
| 255 <!-- Hi --> | 311 <!-- Hi --> |
| 256 <!-- copy todir="${samples.out.dir}/hi"> | 312 <!-- copy todir="${samples.out.dir}/hi"> |
| 257 <fileset dir="${build.source.root}/client/samples/hi"> | 313 <fileset dir="${build.source.root}/client/samples/hi"> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 <mkdir dir="${dart.compiler.js.dir}/src-compiler" /> | 368 <mkdir dir="${dart.compiler.js.dir}/src-compiler" /> |
| 313 <copy todir="${dart.compiler.js.dir}/src-compiler"> | 369 <copy todir="${dart.compiler.js.dir}/src-compiler"> |
| 314 <fileset dir="${build.source.root}/compiler/java" /> | 370 <fileset dir="${build.source.root}/compiler/java" /> |
| 315 </copy> | 371 </copy> |
| 316 | 372 |
| 317 <mkdir dir="${dart.compiler.js.dir}/third_party" /> | 373 <mkdir dir="${dart.compiler.js.dir}/third_party" /> |
| 318 <copy todir="${dart.compiler.js.dir}/third_party"> | 374 <copy todir="${dart.compiler.js.dir}/third_party"> |
| 319 <fileset dir="${build.source.root}/third_party" /> | 375 <fileset dir="${build.source.root}/third_party" /> |
| 320 </copy> | 376 </copy> |
| 321 | 377 |
| 322 <property name="dart.library.core.dir" | |
| 323 value="${build.stage.plugins}/com.google.dart.library.core" /> | |
| 324 | |
| 325 <mkdir dir="${dart.library.core.dir}/src-corelib" /> | |
| 326 <copy todir="${dart.library.core.dir}/src-corelib"> | |
| 327 <fileset dir="${build.source.root}/corelib" /> | |
| 328 </copy> | |
| 329 | |
| 330 <mkdir dir="${dart.library.core.dir}/src-corelib-dartc" /> | |
| 331 <copy todir="${dart.library.core.dir}/src-corelib-dartc"> | |
| 332 <fileset dir="${build.source.root}/compiler/lib" /> | |
| 333 </copy> | |
| 334 | |
| 335 <property name="dart.library.dom.dir" | |
| 336 value="${build.stage.plugins}/com.google.dart.library.dom" /> | |
| 337 | |
| 338 <mkdir dir="${dart.library.dom.dir}/src-dom" /> | |
| 339 <copy todir="${dart.library.dom.dir}/src-dom"> | |
| 340 <fileset dir="${build.source.root}/client/dom" /> | |
| 341 </copy> | |
| 342 | |
| 343 <property name="dart.library.html.dir" | |
| 344 value="${build.stage.plugins}/com.google.dart.library.html" /> | |
| 345 | |
| 346 <mkdir dir="${dart.library.html.dir}/src-html" /> | |
| 347 <copy todir="${dart.library.html.dir}/src-html"> | |
| 348 <fileset dir="${build.source.root}/client/html" /> | |
| 349 </copy> | |
| 350 | |
| 351 <property name="dart.library.json.dir" | |
| 352 value="${build.stage.plugins}/com.google.dart.library.json" /> | |
| 353 | |
| 354 <mkdir dir="${dart.library.json.dir}/src-json" /> | |
| 355 <copy todir="${dart.library.json.dir}/src-json"> | |
| 356 <fileset dir="${build.source.root}/client/json" /> | |
| 357 </copy> | |
| 358 | |
| 359 <!-- copy over the dart libraries used by the samples --> | 378 <!-- copy over the dart libraries used by the samples --> |
| 360 | 379 |
| 361 <property name="libraries.out.dir" | 380 <property name="samples.libraries.out.dir" |
| 362 value="${build.stage.features}/com.google.dart.tools.deploy.fe
ature/include/samples/libraries" /> | 381 value="${build.stage.include.dir}/samples/libraries" /> |
| 363 | 382 |
| 364 <copy todir="${libraries.out.dir}/base"> | 383 <copy todir="${samples.libraries.out.dir}/base"> |
| 365 <fileset dir="${build.source.root}/client/base"/> | 384 <fileset dir="${build.source.root}/client/base"/> |
| 366 </copy> | 385 </copy> |
| 367 <copy todir="${libraries.out.dir}/layout"> | 386 <copy todir="${samples.libraries.out.dir}/layout"> |
| 368 <fileset dir="${build.source.root}/client/layout"/> | 387 <fileset dir="${build.source.root}/client/layout"/> |
| 369 </copy> | 388 </copy> |
| 370 <copy todir="${libraries.out.dir}/observable"> | 389 <copy todir="${samples.libraries.out.dir}/observable"> |
| 371 <fileset dir="${build.source.root}/client/observable"/> | 390 <fileset dir="${build.source.root}/client/observable"/> |
| 372 </copy> | 391 </copy> |
| 373 <copy todir="${libraries.out.dir}/touch"> | 392 <copy todir="${samples.libraries.out.dir}/touch"> |
| 374 <fileset dir="${build.source.root}/client/touch"/> | 393 <fileset dir="${build.source.root}/client/touch"/> |
| 375 </copy> | 394 </copy> |
| 376 <copy todir="${libraries.out.dir}/util"> | 395 <copy todir="${samples.libraries.out.dir}/util"> |
| 377 <fileset dir="${build.source.root}/client/util"/> | 396 <fileset dir="${build.source.root}/client/util"/> |
| 378 </copy> | 397 </copy> |
| 379 <copy todir="${libraries.out.dir}/view"> | 398 <copy todir="${samples.libraries.out.dir}/view"> |
| 380 <fileset dir="${build.source.root}/client/view"/> | 399 <fileset dir="${build.source.root}/client/view"/> |
| 381 </copy> | 400 </copy> |
| 382 | 401 |
| 383 <!-- patch up the html library references --> | 402 <!-- patch up the html library references --> |
| 384 <property name="include.dir" | |
| 385 value="${build.stage.features}/com.google.dart.tools.deploy.fe
ature/include" /> | |
| 386 | 403 |
| 387 <replace dir="${include.dir}" | 404 <replace dir="${build.stage.include.dir}" |
| 388 token='../../../html/html.dart' | 405 token='../../../html/html.dart' |
| 389 value='dart:html'> | 406 value='dart:html'> |
| 390 <include name="**/*.dart"/> | 407 <include name="**/*.dart"/> |
| 391 </replace> | 408 </replace> |
| 392 <replace dir="${include.dir}" | 409 <replace dir="${build.stage.include.dir}" |
| 393 token='../../html/html.dart' | 410 token='../../html/html.dart' |
| 394 value='dart:html'> | 411 value='dart:html'> |
| 395 <include name="**/*.dart"/> | 412 <include name="**/*.dart"/> |
| 396 </replace> | 413 </replace> |
| 397 <replace dir="${include.dir}" | 414 <replace dir="${build.stage.include.dir}" |
| 398 token='../html/html.dart' | 415 token='../html/html.dart' |
| 399 value='dart:html'> | 416 value='dart:html'> |
| 400 <include name="**/*.dart"/> | 417 <include name="**/*.dart"/> |
| 401 </replace> | 418 </replace> |
| 402 | 419 |
| 403 <!-- replace the path based imports with the symbolic ones --> | 420 <!-- replace the path based imports with the symbolic ones --> |
| 404 | 421 |
| 405 <replace dir="${samples.out.dir}" | 422 <replace dir="${samples.out.dir}" |
| 406 token="#import('../../" | 423 token="#import('../../" |
| 407 value="#import('../libraries/"> | 424 value="#import('../libraries/"> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 </copy> | 461 </copy> |
| 445 </target> | 462 </target> |
| 446 | 463 |
| 447 <!-- - - - - - - - - - - - - - - - - - | 464 <!-- - - - - - - - - - - - - - - - - - |
| 448 target: doDeploy_rcp | 465 target: doDeploy_rcp |
| 449 - - - - - - - - - - - - - - - - - --> | 466 - - - - - - - - - - - - - - - - - --> |
| 450 <target name="doDeploy_rcp" depends="init, setupBuild, doBuild_rcp, package_
rcp"> | 467 <target name="doDeploy_rcp" depends="init, setupBuild, doBuild_rcp, package_
rcp"> |
| 451 </target> | 468 </target> |
| 452 | 469 |
| 453 </project> | 470 </project> |
| OLD | NEW |