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

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