launcher.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <project name="PDE-Build" default="launch" basedir=".">
  3. <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="lib/ant-contrib-1.0b3.jar" />
  4. <property environment="env" />
  5. <property file="run.properties" />
  6. <property name="buildFile" value="run.xml" />
  7. <target name="prepareLauncherAndProvisionerDirectory">
  8. <if>
  9. <not>
  10. <or>
  11. <available file="${launcher}" />
  12. <available file="${provisioner}" />
  13. </or>
  14. </not>
  15. <then>
  16. <mkdir dir="${launcher}" />
  17. <trycatch>
  18. <try>
  19. <antcall target="prepareLauncherAndProvisioner" />
  20. </try>
  21. <catch>
  22. <echo message="Preparing launcher failed. Cleaning up..." />
  23. <delete dir="${launcher}" />
  24. <echo message="Done." />
  25. </catch>
  26. </trycatch>
  27. </then>
  28. </if>
  29. </target>
  30. <target name="prepareLauncherAndProvisioner">
  31. <echo message="Preparing launcher and provisioner ..." />
  32. <property name="download.eclipse.src" value="${downloadMirror}/eclipse/downloads/drops/${launcherBuildType}-${launcherBuildMilestone}-${launcherBuildID}" />
  33. <property name="eclipse.sdk.filename" value="eclipse-SDK-${launcherBuildMilestone}-${launcheros}-${launcherws}-${launcherarch}.${launcherArchiveFormat}" />
  34. <!-- download launcher if not already contained in downloads directory -->
  35. <if>
  36. <not>
  37. <available file="${downloadDirectory}/${eclipse.sdk.filename}" property="downloadLauncherNeccessary" />
  38. </not>
  39. <then>
  40. <get src="${download.eclipse.src}/${eclipse.sdk.filename}" dest="${downloadDirectory}/${eclipse.sdk.filename}" />
  41. </then>
  42. </if>
  43. <!-- use unzip executable of choice -->
  44. <if>
  45. <equals arg1="${launcherArchiveFormat}" arg2="zip" />
  46. <then>
  47. <unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" />
  48. <unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" />
  49. </then>
  50. <else>
  51. <untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" compression="gzip" />
  52. <untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" compression="gzip" />
  53. </else>
  54. </if>
  55. <!-- if we are on macosx or linux, ensure builder is executable -->
  56. <if>
  57. <or>
  58. <equals arg1="${launcheros}" arg2="macosx" />
  59. <equals arg1="${launcheros}" arg2="linux" />
  60. </or>
  61. <then>
  62. <chmod file="${launcherLocation}/eclipse" perm="ugo+rx" />
  63. <chmod file="${provisionerLocation}/eclipse" perm="ugo+rx" />
  64. </then>
  65. </if>
  66. <echo message="Preparing launcher and provisioner done." />
  67. </target>
  68. <target name="launch">
  69. <if>
  70. <not>
  71. <available file="${downloadDirectory}" property="downloadDirectoryExists" />
  72. </not>
  73. <then>
  74. <mkdir dir="${downloadDirectory}" />
  75. </then>
  76. </if>
  77. <echo message="Preparing Launcher and Provisioner" />
  78. <antcall target="prepareLauncherAndProvisionerDirectory" />
  79. <echo message="Starting build with launcher: ${launcherLocation}" />
  80. <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
  81. <arg value="-application" />
  82. <arg value="org.eclipse.ant.core.antRunner" />
  83. <arg value="-clean" />
  84. <arg value="-nosplash" />
  85. <arg value="-consoleLog" />
  86. <arg value="-nl" />
  87. <arg value="en_US" />
  88. <arg value="-data" />
  89. <arg value="${launcherWorkspace}" />
  90. <arg value="-buildfile" />
  91. <arg value="${buildFile}" />
  92. <classpath>
  93. <fileset dir="${launcherLocation}/plugins">
  94. <include name="org.eclipse.equinox.launcher_*.jar" />
  95. </fileset>
  96. </classpath>
  97. </java>
  98. </target>
  99. </project>