瀏覽代碼

build.xml will now automatically try and run build-plugins on -post-compile

  => build-plugins will try to run build-plugins_bash and build-plugins_ant-contrib
     => build-plugins_ant-contrib will only run if ant-contrib was found where libs.antcontrib points
     => build-plugins_bash will only run if ant-contrib was not found where libs.antcontrib points, and /bin/bash exists


git-svn-id: http://svn.dmdirc.com/trunk@2664 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack 16 年之前
父節點
當前提交
da81d8d474
共有 2 個檔案被更改,包括 15 行新增8 行删除
  1. 12
    1
      BuildPlugins.xml
  2. 3
    7
      build.xml

+ 12
- 1
BuildPlugins.xml 查看文件

@@ -6,6 +6,7 @@
6 6
 	<property file="nbproject/project.properties"/>
7 7
 	<property file="nbproject/private/private.properties"/>
8 8
 	<property file="${user.properties.file}"/>
9
+	<available file="${libs.antcontrib}" property="has.ant-contrib"/>
9 10
 	
10 11
 	<taskdef resource="net/sf/antcontrib/antcontrib.properties">
11 12
 		<classpath>
@@ -24,7 +25,17 @@
24 25
 		</jar>
25 26
 	</target>
26 27
 		
27
-	<target name="build-plugins">
28
+	<target name="build-plugins" depends="build-plugins_bash, build-plugins_ant-contrib"/>
29
+	
30
+	<available file="/bin/bash" property="has.bash"/>	
31
+	<target name="build-plugins_bash" unless="has.ant-contrib" if="has.bash">
32
+		<exec executable="/bin/bash">
33
+			<arg value="createAllPluginJar.sh"/>
34
+			<arg value="${src.dir}/com/dmdirc/addons/"/>
35
+		</exec>
36
+	</target>
37
+	
38
+	<target name="build-plugins_ant-contrib" if="has.ant-contrib">
28 39
 		<mkdir dir="plugins/"/>
29 40
 		<foreach target="makepluginjar" param="target.file">
30 41
 			<path>

+ 3
- 7
build.xml 查看文件

@@ -4,7 +4,8 @@
4 4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
5 5
 <project name="DMDirc" default="default" basedir=".">
6 6
     <description>Builds, tests, and runs the project DMDirc.</description>
7
-    <import file="nbproject/build-impl.xml"/>
7
+		<import file="nbproject/build-impl.xml"/>
8
+		<import file="BuildPlugins.xml"/>
8 9
     <!--
9 10
 
10 11
     There exist several targets which are by default empty and which can be 
@@ -68,10 +69,5 @@
68 69
             <fileset dir="${build.classes.dir}"/>
69 70
         </jar>
70 71
     -->
71
-    <target name="-post-compile">
72
-        <exec executable="/bin/bash">
73
-            <arg value="createAllPluginJar.sh"/>
74
-            <arg value="${src.dir}/com/dmdirc/addons/"/>
75
-        </exec>
76
-    </target>
72
+    <target name="-post-compile" depends="build-plugins"/>
77 73
 </project>

Loading…
取消
儲存