| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <!-- You may freely edit this file. See commented blocks below for --> |
|---|
| 3 | <!-- some examples of how to customize the build. --> |
|---|
| 4 | <!-- (If you delete it and reopen the project it will be recreated.) --> |
|---|
| 5 | <!-- By default, only the Clean and Build commands use this build script. --> |
|---|
| 6 | <!-- Commands such as Run, Debug, and Test only use this build script if --> |
|---|
| 7 | <!-- the Compile on Save feature is turned off for the project. --> |
|---|
| 8 | <!-- You can turn off the Compile on Save (or Deploy on Save) setting --> |
|---|
| 9 | <!-- in the project's Project Properties dialog box.--> |
|---|
| 10 | <project name="ScriptBuilder_Repo" default="default" basedir="."> |
|---|
| 11 | <description>Builds, tests, and runs the project ScriptBuilder_Repo.</description> |
|---|
| 12 | <import file="nbproject/build-impl.xml"/> |
|---|
| 13 | |
|---|
| 14 | <!-- STORE SUBVERSION BUILD STRING --> |
|---|
| 15 | <target name="-post-init" description="Sets the buildversion for the current build"> |
|---|
| 16 | <exec outputproperty="svna.version" executable="svnversion"> |
|---|
| 17 | <arg value="-c" /> |
|---|
| 18 | |
|---|
| 19 | <redirector> |
|---|
| 20 | <outputfilterchain> |
|---|
| 21 | <tokenfilter> |
|---|
| 22 | <replaceregex pattern="^[0-9]*:?" replace="" flags="g"/> |
|---|
| 23 | <replaceregex pattern="M" replace="" flags="g"/> |
|---|
| 24 | </tokenfilter> |
|---|
| 25 | </outputfilterchain> |
|---|
| 26 | </redirector> |
|---|
| 27 | </exec> |
|---|
| 28 | <propertyfile file="${src.dir}/scriptbuilder/gui/application.properties"> |
|---|
| 29 | <entry key="Application.revision" value="${svna.version}" type="int" operation="="/> |
|---|
| 30 | </propertyfile> |
|---|
| 31 | <echo>Setting SVN version: ${svna.version}</echo> |
|---|
| 32 | </target> |
|---|
| 33 | <target name="-post-jar" description="Sets the buildversion for the current build"> |
|---|
| 34 | <propertyfile file="${src.dir}/scriptbuilder/gui/application.properties"> |
|---|
| 35 | <entry key="Application.buildnumber" value="1" type="int" operation="+"/> |
|---|
| 36 | </propertyfile> |
|---|
| 37 | </target> |
|---|
| 38 | <target name="package-jars" depends="jar"> |
|---|
| 39 | |
|---|
| 40 | <!-- Change the value of this property to be the name of your JAR, |
|---|
| 41 | minus the .jar extension. It should not have spaces. |
|---|
| 42 | <property name="deploy.jar.name" value="MyJarName"/> |
|---|
| 43 | --> |
|---|
| 44 | <property name="deploy.jar.name" value="ScriptBuilder"/> |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | <!-- don't edit below this line --> |
|---|
| 48 | |
|---|
| 49 | <property name="deploy.dir" value="deploy"/> |
|---|
| 50 | <property name="deploy.jar" value="${deploy.dir}/${deploy.jar.name}.jar"/> |
|---|
| 51 | |
|---|
| 52 | <echo message="Packaging ${application.title} into a single JAR at ${deploy.jar}"/> |
|---|
| 53 | |
|---|
| 54 | <delete dir="${deploy.dir}"/> |
|---|
| 55 | <mkdir dir="${deploy.dir}"/> |
|---|
| 56 | |
|---|
| 57 | <jar destfile="${deploy.dir}/temp_final.jar" filesetmanifest="skip"> |
|---|
| 58 | <zipgroupfileset dir="dist" includes="*.jar"/> |
|---|
| 59 | <zipgroupfileset dir="dist/lib" includes="*.jar"/> |
|---|
| 60 | |
|---|
| 61 | <manifest> |
|---|
| 62 | <attribute name="Main-Class" value="${main.class}"/> |
|---|
| 63 | </manifest> |
|---|
| 64 | </jar> |
|---|
| 65 | |
|---|
| 66 | <zip destfile="${deploy.jar}"> |
|---|
| 67 | <zipfileset src="${deploy.dir}/temp_final.jar" |
|---|
| 68 | excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/> |
|---|
| 69 | </zip> |
|---|
| 70 | |
|---|
| 71 | <delete file="${deploy.dir}/temp_final.jar"/> |
|---|
| 72 | |
|---|
| 73 | </target> |
|---|
| 74 | <!-- =================================================================== --> |
|---|
| 75 | <!-- Make zip file for distribution that contains Jar and Incidents --> |
|---|
| 76 | <!-- =================================================================== --> |
|---|
| 77 | <target name="zip" depends="package-jars" description="Make zip file"> |
|---|
| 78 | <property name="deploy.dir" value="deploy"/> |
|---|
| 79 | <zip destfile="${deploy.dir}/ScriptBuilder.zip"> |
|---|
| 80 | <zipfileset |
|---|
| 81 | dir="${deploy.dir}" |
|---|
| 82 | includes="**.jar" |
|---|
| 83 | filemode="755" |
|---|
| 84 | /> |
|---|
| 85 | </zip> |
|---|
| 86 | <zip destfile="${deploy.dir}/ScriptBuilder.zip" |
|---|
| 87 | basedir="." |
|---|
| 88 | includes="Incidents/**" |
|---|
| 89 | update="true" |
|---|
| 90 | /> |
|---|
| 91 | <zip destfile="${deploy.dir}/ScriptBuilder.zip" |
|---|
| 92 | basedir="src/scriptbuilder/gui/" |
|---|
| 93 | includes="application.properties" |
|---|
| 94 | update="true" |
|---|
| 95 | /> |
|---|
| 96 | </target> |
|---|
| 97 | </project> |
|---|