<commit_before><?xml version="1.0" encoding="utf-8"?>
<project default="all">
    <property name="bin" location="bin"/>
    <property name="lib" location="../lib"/>
    <property name="tmp" location="tmp"/>
    <property name="resources" value="release-resources"/>
    <property name="jarfile" value="${bin}/JHelioviewer.jar"/>

   <taskdef resource="net/sf/antcontrib/antcontrib.properties">
        <classpath>
            <pathelement location="${resources}/shared/ant-contrib-1.0b3.jar"/>
        </classpath>
    </taskdef>

    <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask">
        <classpath path="${resources}/mac/lib/appbundler-1.0.jar"/>
    </taskdef>

    <taskdef name="nsis" classname="com.danielreese.nsisant.Task">
        <classpath location="${resources}/windows/nsisant-1.3.jar"/>
    </taskdef>

    <loadfile property="version" srcFile="../VERSION"/>
    <exec executable="git" outputproperty="revision">
        <arg line="rev-list --count HEAD"/>
    </exec>
    <property name="pkg.name" value="jhv-${version}.${revision}"/>

    <target name="clean">
        <delete dir="${bin}"/>
        <delete dir="${tmp}"/>
    </target>

    <target name="init">
        <mkdir dir="${bin}"/>
        <mkdir dir="${tmp}"/>
        <copy todir="${bin}">
            <file file="../README.md"/>
            <file file="../LICENSE"/>
        </copy>
        <echo message="${version}.${revision}" file="${bin}/VERSION"/>
    </target>

    <target name="jar-bundle">
        <jar destfile="${jarfile}">
            <manifest>
                <attribute name="Main-Class" value="org.helioviewer.jhv.JHelioviewer"/>
                <attribute name="Class-Path" value="."/>
                <attribute name="version" value="${version}"/>
                <attribute name="revision" value="${revision}"/>
            </manifest>
            <zipgroupfileset dir="${lib}"/>
            <zipfileset src="../JHelioviewer.jar"/>
        </jar>
    </target>

   <target name="release-windows" depends="init,jar-bundle">
        <exec executable="makensis">
            <arg value="-DJHV_VERSION=${version}"/>
            <arg value="-DJHV_REVISION=${revision}"/>
            <arg value="-DRESOURCE_PATH=${basedir}/${resources}/windows"/>
            <arg value="-DBUILD_PATH=${bin}"/>
            <arg value="-DFILE_NAME=${pkg.name}"/>
            <arg value="-DREADME_FILE=${bin}/README.md"/>
            <arg value="-DCOPYING_FILE=${bin}/LICENSE"/>
            <arg value="-DVERSION_FILE=${bin}/VERSION"/>
            <arg value="${basedir}/${resources}/windows/windows-setup.nsi"/>
        </exec>
    </target>

    <target name="release-mac" depends="init,jar-bundle">
        <if>
            <contains string="${os.name}" substring="mac" casesensitive="false"/>
            <then>
                <exec executable="chmod" dir="${resources}/mac">
                    <arg value="u+x"/>
                    <arg value="bundle.sh"/><commit_msg>Actually use nsis task<commit_after><?xml version="1.0" encoding="utf-8"?>
<project default="all">
    <property name="bin" location="bin"/>
    <property name="lib" location="../lib"/>
    <property name="tmp" location="tmp"/>
    <property name="resources" value="release-resources"/>
    <property name="jarfile" value="${bin}/JHelioviewer.jar"/>

   <taskdef resource="net/sf/antcontrib/antcontrib.properties">
        <classpath>
            <pathelement location="${resources}/shared/ant-contrib-1.0b3.jar"/>
        </classpath>
    </taskdef>

    <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask">
        <classpath path="${resources}/mac/lib/appbundler-1.0.jar"/>
    </taskdef>

    <taskdef name="nsis" classname="com.danielreese.nsisant.Task">
        <classpath location="${resources}/windows/nsisant-1.3.jar"/>
    </taskdef>

    <loadfile property="version" srcFile="../VERSION"/>
    <exec executable="git" outputproperty="revision">
        <arg line="rev-list --count HEAD"/>
    </exec>
    <property name="pkg.name" value="jhv-${version}.${revision}"/>

    <target name="clean">
        <delete dir="${bin}"/>
        <delete dir="${tmp}"/>
    </target>

    <target name="init">
        <mkdir dir="${bin}"/>
        <mkdir dir="${tmp}"/>
        <copy todir="${bin}">
            <file file="../README.md"/>
            <file file="../LICENSE"/>
        </copy>
        <echo message="${version}.${revision}" file="${bin}/VERSION"/>
    </target>

    <target name="jar-bundle">
        <jar destfile="${jarfile}">
            <manifest>
                <attribute name="Main-Class" value="org.helioviewer.jhv.JHelioviewer"/>
                <attribute name="Class-Path" value="."/>
                <attribute name="version" value="${version}"/>
                <attribute name="revision" value="${revision}"/>
            </manifest>
            <zipgroupfileset dir="${lib}"/>
            <zipfileset src="../JHelioviewer.jar"/>
        </jar>
    </target>

    <target name="release-windows" depends="init,jar-bundle">
        <nsis script="${basedir}/${resources}/windows/windows-setup.nsi" noconfig="yes">
            <define name="JHV_VERSION" value="${version}"/>
            <define name="JHV_REVISION" value="${revision}"/>
            <define name="RESOURCE_PATH" value="${basedir}/${resources}/windows"/>
            <define name="BUILD_PATH" value="${bin}"/>
            <define name="FILE_NAME" value="${pkg.name}"/>
            <define name="README_FILE" value="${bin}/README.md"/>
            <define name="COPYING_FILE" value="${bin}/LICENSE"/>
            <define name="VERSION_FILE" value="${bin}/VERSION"/>
        </nsis>
    </target>

    <target name="release-mac" depends="init,jar-bundle">
        <if>
            <contains string="${os.name}" substring="mac" casesensitive="false"/>
            <then>
                <exec executable="chmod" dir="${resources}/mac">
                    <arg value="u+x"/>
                    <arg value="bundle.sh"/>
{'fraction_non_alphanumeric': 0.2007985360173016, 'fraction_numerical': 0.0033272334054233904, 'mean_word_length': 2.5302407516147976, 'pattern_counts': {'":': 0, '<': 138, '<?xml version=': 2, '>': 138, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5767358', 'n_tokens_mistral': 1807, 'n_tokens_neox': 1749, 'n_words': 293}