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

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