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.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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">
  57. <redirector outputproperty="version.git"></redirector>
  58. <arg value="describe"/>
  59. <arg value="--tags"/>
  60. </exec>
  61. <mkdir dir="modules\installer\windows\files\" />
  62. <delete>
  63. <fileset dir="modules\installer\windows\files\" includes="*.*"/>
  64. </delete>
  65. <copy file="src/com/dmdirc/res/icon.ico"
  66. tofile="modules\installer\windows\files\icon.ico"
  67. overwrite="true" />
  68. <copy file="dist/DMDirc.jar"
  69. tofile="modules\installer\windows\files\DMDirc.jar"
  70. overwrite="true" />
  71. <nsis script="modules\installer\windows\updater.nsi" verbosity="2">
  72. <define name="VERSION" value="${version.git}"/>
  73. </nsis>
  74. <nsis script="modules\installer\windows\launcher.nsi" verbosity="2">
  75. <define name="VERSION" value="${version.git}"/>
  76. </nsis>
  77. <nsis script="modules\installer\windows\installer.nsi" verbosity="2">
  78. <define name="VERSION" value="${version.git}"/>
  79. </nsis>
  80. <delete dir="modules\installer\windows\files" />
  81. </target>
  82. </project>