You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-properties.xml 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="DMDirc-properties" default="default" basedir=".">
  3. <description>Automatically initialises build properties</description>
  4. <condition property="private.properties.exists">
  5. <available file="nbproject/private/private.properties"/>
  6. </condition>
  7. <target name="-init-properties">
  8. <path id="libclasspath">
  9. <fileset dir="lib" includes="*.jar"/>
  10. </path>
  11. <taskdef resource="net/sf/fikin/ant/ant.properties" classpathref="libclasspath"/>
  12. <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="libclasspath"/>
  13. </target>
  14. <target name="-create-private-properties" unless="private.properties.exists">
  15. <mkdir dir="nbproject/private"/>
  16. <echo file="nbproject/private/private.properties"/>
  17. </target>
  18. <target name="-check-private-classpath">
  19. <loadfile property="private.properties.old" srcFile="nbproject/private/private.properties"/>
  20. <condition property="private.properties.needsinsert">
  21. <not>
  22. <matches string="${private.properties.old}" pattern="^private.classpath=(.*)$" multiline="true" casesensitive="true"/>
  23. </not>
  24. </condition>
  25. </target>
  26. <target name="-create-private-classpath" if="private.properties.needsinsert">
  27. <echo append="true" file="nbproject/private/private.properties">${line.separator}private.classpath=${line.separator}</echo>
  28. </target>
  29. <target name="-init-private-properties" depends="-init-properties,-create-private-properties,-check-private-classpath,-create-private-classpath">
  30. <path id="all.libs">
  31. <fileset dir="modules" includes="*/lib/*.jar"/>
  32. <fileset dir="lib" includes="*.jar"/>
  33. </path>
  34. <propertyregex property="private.classpath.value" input="${toString:all.libs}" regexp="\\" replace="/" global="true" defaultValue="${toString:all.libs}"/>
  35. <replaceregexp file="nbproject/private/private.properties" match="^private.classpath=(.*)$" flags="im" replace="private.classpath=${private.classpath.value}"/>
  36. </target>
  37. </project>