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-installer.xml 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="DMDirc-installer" default="default" basedir=".">
  3. <description>Tasks to build the DMDirc installer.</description>
  4. <target name="-init-installer" depends="init">
  5. <taskdef name="nsis" classname="com.danielreese.nsisant.Task">
  6. <classpath>
  7. <fileset dir="lib/build" includes="*nsis*.jar"/>
  8. </classpath>
  9. </taskdef>
  10. <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask">
  11. <classpath>
  12. <fileset dir="lib/build" includes="*jgit*.jar"/>
  13. </classpath>
  14. </taskdef>
  15. </target>
  16. <target name="installer" depends="-init-installer"
  17. description="Build the installer.">
  18. <exec executable="bash" dir="modules/installer" resultproperty="installer.result">
  19. <arg value="makeAll.sh"/>
  20. </exec>
  21. <condition property="installer.success">
  22. <equals arg1="${installer.result}" arg2="0" />
  23. </condition>
  24. <echo message="Installer build finished."/>
  25. <echo message="Completed build files can be found in:"/>
  26. <echo message=" ./modules/installer/output"/>
  27. <echo message=""/>
  28. </target>
  29. <target name="installer-stable" depends="-init-installer"
  30. description="Build the installer for a stable release.">
  31. <exec executable="bash" dir="modules/installer" resultproperty="installer.result">
  32. <arg value="makeAll.sh"/>
  33. <arg value="-c"/>
  34. <arg value="STABLE"/>
  35. <arg value="--upload"/>
  36. </exec>
  37. <condition property="installer.success">
  38. <equals arg1="${installer.result}" arg2="0" />
  39. </condition>
  40. <echo message="Installer build finished."/>
  41. <echo message="Completed build files can be found in:"/>
  42. <echo message=" ${installer.output.dir}"/>
  43. <echo message=""/>
  44. </target>
  45. <target name="installer-unstable" depends="-init-installer"
  46. description="Build the installer for an unstable release.">
  47. <exec executable="bash" dir="modules/installer" resultproperty="installer.result">
  48. <arg value="makeAll.sh"/>
  49. <arg value="-c"/>
  50. <arg value="UNSTABLE"/>
  51. </exec>
  52. <condition property="installer.success">
  53. <equals arg1="${installer.result}" arg2="0" />
  54. </condition>
  55. <echo message="Installer build finished."/>
  56. <echo message="Completed build files can be found in:"/>
  57. <echo message=" ./modules/installer/output"/>
  58. <echo message=""/>
  59. </target>
  60. <target name="installer-nsis" description="Builds the Windows installer"
  61. depends="-init-installer,jar">
  62. <git-describe dir="modules/installer/.git" property="version.git.nsis" subdir="windows" />
  63. <mkdir dir="modules\installer\windows\files\" />
  64. <mkdir dir="modules\installer\output\" />
  65. <delete>
  66. <fileset dir="modules\installer\windows\files\" includes="*.*"/>
  67. </delete>
  68. <copy file="src/com/dmdirc/res/icon.ico"
  69. tofile="modules\installer\windows\files\icon.ico"
  70. overwrite="true" />
  71. <copy file="dist/DMDirc.jar"
  72. tofile="modules\installer\windows\files\DMDirc.jar"
  73. overwrite="true" />
  74. <nsis script="modules\installer\windows\updater.nsi" verbosity="1">
  75. <define name="VERSION" value="${version.git.nsis}"/>
  76. </nsis>
  77. <nsis script="modules\installer\windows\launcher.nsi" verbosity="1">
  78. <define name="VERSION" value="${version.git.nsis}"/>
  79. </nsis>
  80. <nsis script="modules\installer\windows\installer.nsi" verbosity="1">
  81. <define name="VERSION" value="${version.git.nsis}"/>
  82. </nsis>
  83. <delete dir="modules\installer\windows\files" />
  84. </target>
  85. </project>