Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="DMDirc-plugins" default="default" basedir=".">
  3. <!-- Netbeans property files -->
  4. <property file="nbproject/project.properties"/>
  5. <property file="nbproject/private/private.properties"/>
  6. <property file="${user.properties.file}"/>
  7. <import file="modules/plugins/build-pluginutils.xml"/>
  8. <target name="-init-plugins">
  9. <path id="libclasspath">
  10. <fileset dir="lib" includes="*.jar"/>
  11. </path>
  12. <taskdef resource="net/sf/fikin/ant/ant.properties" classpathref="libclasspath"/>
  13. <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="libclasspath"/>
  14. </target>
  15. <target name="build-plugins" description="Build all plugins">
  16. <subant buildpath="modules/plugins" target="jar">
  17. <property name="plugins.dmdirc.build.dir" value="../../${build.classes.dir}"/>
  18. </subant>
  19. </target>
  20. <target name="clean-plugins" description="Clean all plugins">
  21. <subant buildpath="modules/plugins" target="clean"/>
  22. </target>
  23. <target name="-update-bundled-plugins" depends="-init-plugins">
  24. <bundleplugins jar="${dist.jar}">
  25. <fileset dir="modules/plugins/dist/">
  26. <include name="tabcompletion_*.jar"/>
  27. <include name="parser_irc.jar"/>
  28. <include name="ui_swing.jar"/>
  29. </fileset>
  30. </bundleplugins>
  31. </target>
  32. <target name="-check-addons-key" unless="dmdirc.addons.apikey">
  33. <fail>You must specify an API key in the the dmdirc.addons.apikey property</fail>
  34. </target>
  35. <target name="-check-addon-id" unless="addon.id">
  36. <fail>The ID of the addon to be published must be specified in the addon.id property</fail>
  37. </target>
  38. <target name="-check-addon-channel" unless="addon.channel">
  39. <fail>
  40. The channel of the addon to be published must be specified in the addon.channel property.
  41. Use 1 for Stable, 2 for Unstable, or 3 for Nightly.
  42. </fail>
  43. </target>
  44. <target name="-check-addon-file" unless="addon.file">
  45. <fail>The file of the addon to be published must be specified in the addon.file property</fail>
  46. </target>
  47. <target name="publish-all-plugins" description="Publishes all plugins to the addons site"
  48. depends="-init-plugins,-check-addons-key,-check-addon-channel">
  49. <foreach target="publish-plugin" param="addon.file" inheritall="true" parallel="true">
  50. <path>
  51. <fileset dir="plugins">
  52. <include name="*.jar"/>
  53. </fileset>
  54. </path>
  55. </foreach>
  56. </target>
  57. <target name="publish-plugin" description="Publish a plugin to the addons site"
  58. depends="-init-plugins,-check-addons-key,-check-addon-channel,-check-addon-file">
  59. <tempfile property="temp.dir" prefix="plugintmp"/>
  60. <mkdir dir="${temp.dir}"/>
  61. <unzip src="${addon.file}" dest="${temp.dir}">
  62. <patternset>
  63. <include name="META-INF/plugin.config"/>
  64. </patternset>
  65. </unzip>
  66. <loadfile srcfile="${temp.dir}/META-INF/plugin.config" property="addon.id">
  67. <filterchain>
  68. <!-- This is a bit fickle, and needs to understand config files better. -->
  69. <linecontains>
  70. <contains value=" id="/>
  71. </linecontains>
  72. <deletecharacters chars="\t id="/>
  73. <striplinebreaks/>
  74. </filterchain>
  75. </loadfile>
  76. <delete dir="${temp.dir}"/>
  77. <antcall target="publish-addon"/>
  78. </target>
  79. <target name="publish-addon" description="Publish an addon to the addons site"
  80. depends="-init-plugins,-check-addons-key,-check-addon-id,-check-addon-channel,-check-addon-file">
  81. <httpmpost url="http://addons.dmdirc.com/editaddon/${addon.id}" logLevel="none">
  82. <postString name="apikey" value="${dmdirc.addons.apikey}"/>
  83. <postString name="channel" value="${addon.channel}"/>
  84. <postFile name="download" file="${addon.file}"/>
  85. </httpmpost>
  86. </target>
  87. </project>