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 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. <taskdef name="nsis" classname="com.danielreese.nsisant.Task">
  5. <classpath location="lib/nsisant-1.3.jar" />
  6. </taskdef>
  7. <target name="installer"
  8. description="Build the installer.">
  9. <exec executable="bash" dir="installer" resultproperty="installer.result">
  10. <arg value="release.sh"/>
  11. <arg value="this"/>
  12. </exec>
  13. <condition property="installer.success">
  14. <equals arg1="${installer.result}" arg2="0" />
  15. </condition>
  16. <echo message="Installer build finished."/>
  17. <echo message="Completed build files can be found in:"/>
  18. <echo message=" ${installer.output.dir}"/>
  19. <echo message=""/>
  20. </target>
  21. <target name="installer-stable"
  22. description="Build the installer for a stable release.">
  23. <exec executable="bash" dir="installer" resultproperty="installer.result">
  24. <arg value="release.sh"/>
  25. <arg value="-t"/>
  26. <arg value="-c"/>
  27. <arg value="STABLE"/>
  28. <arg value="--upload"/>
  29. </exec>
  30. <condition property="installer.success">
  31. <equals arg1="${installer.result}" arg2="0" />
  32. </condition>
  33. <echo message="Installer build finished."/>
  34. <echo message="Completed build files can be found in:"/>
  35. <echo message=" ${installer.output.dir}"/>
  36. <echo message=""/>
  37. </target>
  38. <target name="installer-unstable"
  39. description="Build the installer for an unstable release.">
  40. <exec executable="bash" dir="installer" resultproperty="installer.result">
  41. <arg value="release.sh"/>
  42. <arg value="-t"/>
  43. <arg value="-c"/>
  44. <arg value="UNSTABLE"/>
  45. </exec>
  46. <condition property="installer.success">
  47. <equals arg1="${installer.result}" arg2="0" />
  48. </condition>
  49. <echo message="Installer build finished."/>
  50. <echo message="Completed build files can be found in:"/>
  51. <echo message=" ${installer.output.dir}"/>
  52. <echo message=""/>
  53. </target>
  54. <target name="installer-nsis" description="Builds the Windows installer"
  55. depends="jar">
  56. <exec executable="git" outputproperty="nsis.lastcommit">
  57. <arg value="--git-dir=modules/installer/.git"/>
  58. <arg value="rev-list"/>
  59. <arg value="--max-count=1"/>
  60. <arg value="HEAD"/>
  61. <arg value="--"/>
  62. <arg value="windows"/>
  63. </exec>
  64. <exec executable="git" outputproperty="version.git.nsis">
  65. <arg value="--git-dir=modules/installer/.git"/>
  66. <arg value="describe"/>
  67. <arg value="--tags"/>
  68. <arg value="--always"/>
  69. <arg value="${nsis.lastcommit}"/>
  70. </exec>
  71. <mkdir dir="modules\installer\windows\files\" />
  72. <mkdir dir="modules\installer\output\" />
  73. <delete>
  74. <fileset dir="modules\installer\windows\files\" includes="*.*"/>
  75. </delete>
  76. <copy file="src/com/dmdirc/res/icon.ico"
  77. tofile="modules\installer\windows\files\icon.ico"
  78. overwrite="true" />
  79. <copy file="dist/DMDirc.jar"
  80. tofile="modules\installer\windows\files\DMDirc.jar"
  81. overwrite="true" />
  82. <copy file="src/com/dmdirc/licences/DMDirc - MIT"
  83. tofile="modules\installer\windows\licence.txt"
  84. overwrite="true" />
  85. <nsis script="modules\installer\windows\updater.nsi" verbosity="1">
  86. <define name="VERSION" value="${version.git.nsis}"/>
  87. </nsis>
  88. <nsis script="modules\installer\windows\launcher.nsi" verbosity="1">
  89. <define name="VERSION" value="${version.git.nsis}"/>
  90. </nsis>
  91. <nsis script="modules\installer\windows\installer.nsi" verbosity="1">
  92. <define name="VERSION" value="${version.git.nsis}"/>
  93. </nsis>
  94. <delete dir="modules\installer\windows\files" />
  95. <delete file="modules\installer\windows\licence.txt" />
  96. </target>
  97. </project>