configurationengine/build.xml
author terytkon
Thu, 11 Mar 2010 18:20:56 +0200
changeset 1 b538b70cbe51
parent 0 2e8eeb919028
child 3 e7e0ae78773e
permissions -rw-r--r--
Move rest of the swconfigmdw package components to oss repository. -Changed sfl licences to epl.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     1
<!--****************************************************************************
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     2
 * Configuration Engine (ConE) main build file
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     3
 * This ant build.xml will build, install and test ConE and its plugins
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     4
 ****************************************************************************-->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     5
<project name="ConE"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     6
         default="install">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     7
  <property file="common.properties" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     8
  <property file="linux.properties" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
     9
  <property file="windows.properties" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    10
  <property environment="env" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    11
  <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    12
    Build properties, intended to be overridden from the command line
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    13
    where necessary.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    14
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    15
    E.g. ant install -Dbuild.build_path=C:/my/install/path -Dbuild.plugin_package=symbian
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    16
    -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    17
  <property name="build.plugin_package"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    18
            value="common" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    19
  <property name="build.base_path"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    20
            value="build" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    21
  <property name="build.cone_install_path"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    22
            value="${build.base_path}/cone" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    23
  <property name="build.bat_export_path"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    24
            value="${build.base_path}/bat" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    25
  <property name="build.cone_pack_path"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    26
            value="${build.base_path}/dist" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    27
  <property name="build.bat_pack_path"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    28
            value="${build.base_path}/dist" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    29
  <property name="build.cone_install_path_abs"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    30
            location="${build.cone_install_path}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    31
  <property name="build.bat_export_path_abs"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    32
            location="${build.bat_export_path}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    33
  <property name="build.cone_pack_path_abs"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    34
            location="${build.cone_pack_path}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    35
  <property name="build.bat_pack_path_abs"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    36
            location="${build.bat_pack_path}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    37
  <property name="os.linux"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    38
            value="Linux" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    39
  <property name="os.windows"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    40
            value="Windows 2003, Windows XP, Windows vista" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    41
  <condition property="os_is_linux">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    42
    <os name="${os.linux}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    43
  </condition>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    44
  <target name="info">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    45
    <echoproperties />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    46
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    47
  <!-- Aliases -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    48
  <target name="install"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    49
          depends="install-cone" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    50
  <target name="develop"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    51
          depends="develop-cone" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    52
  <target name="test"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    53
          depends="run-bat" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    54
  <target name="doc"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    55
          depends="doc-all" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    56
  <target name="clean">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    57
    <delete dir="${build.cone_install_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    58
    <delete dir="${build.bat_export_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    59
    <delete dir="${build.cone_pack_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    60
    <delete dir="${build.bat_pack_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    61
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    62
  <target name="svnversion">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    63
    <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    64
        Call the revision update script without the revision argument
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    65
        so that the revision is reverted back to "" (this should make
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    66
        it so that the working copy has no modifications and the
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    67
        revision will be e.g. "1234" instead of "1234M".
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    68
        -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    69
    <echo>Revert SVN revision in source/cone/__init__.py</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    70
    <exec executable="python">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    71
      <arg value="update_svn_revision.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    72
      <arg value="source/cone/__init__.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    73
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    74
    <echo>Determine current working copy revision</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    75
    <exec executable="svnversion"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    76
          failifexecutionfails="false">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    77
      <redirector outputproperty="svn.version" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    78
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    79
    <echo>SVN revision: ${svn.version}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    80
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    81
  <target name="svninitupdate"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    82
          depends="svnversion">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    83
    <echo>Update SVN revision in __init__.py</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    84
    <exec executable="python">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    85
      <arg value="update_svn_revision.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    86
      <arg value="source/cone/__init__.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    87
      <arg value="${svn.version}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    88
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    89
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    90
  <target name="install-cone"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    91
          depends="svninitupdate">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    92
    <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    93
        <echo>$${build.cone_install_path}:     ${build.cone_install_path}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    94
        <echo>$${build.cone_install_path_abs}: ${build.cone_install_path_abs}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    95
        -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    96
    <!-- Run the install script in build-scripts/ -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    97
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    98
          dir="${common.build_scripts_dir}"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
    99
          failonerror="true">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   100
      <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   101
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   102
    <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   103
    <echo>Revert SVN revision in source/cone/__init__.py</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   104
    <exec executable="python">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   105
      <arg value="update_svn_revision.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   106
      <arg value="source/cone/__init__.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   107
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   108
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   109
  <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   110
    Target for installing ConE so that it supports two Python versions.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   111
    
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   112
    Depends on two properties: build.dualversioninstall.path1 and
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   113
    build.dualversioninstall.path2 that must be set to the values of the PATH
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   114
    environment that contains the locations of the two Python installations.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   115
    -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   116
  <target name="install-cone-dualversion"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   117
          depends="svninitupdate">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   118
    <!-- Run the install script using the first Python version-->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   119
    <echo>Installing with first Python version (PATH=${build.dualversioninstall.path1})</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   120
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   121
          dir="${common.build_scripts_dir}"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   122
          failonerror="true">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   123
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   124
           value="${build.dualversioninstall.path1}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   125
      <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   126
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   127
    <!-- Run the install script using the second Python version-->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   128
    <echo>Installing with second Python version (PATH=${build.dualversioninstall.path2})</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   129
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   130
          dir="${common.build_scripts_dir}"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   131
          failonerror="true">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   132
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   133
           value="${build.dualversioninstall.path2}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   134
      <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   135
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   136
    <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   137
    <echo>Revert SVN revision in source/cone/__init__.py</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   138
    <exec executable="python">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   139
      <arg value="update_svn_revision.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   140
      <arg value="source/cone/__init__.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   141
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   142
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   143
  <target name="develop-cone">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   144
    <!-- Run the install script in build-scripts/ -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   145
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   146
          dir="${common.build_scripts_dir}"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   147
          failonerror="true">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   148
      <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --install-type develop' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   149
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   150
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   151
  <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   152
    Internal pack target for packing the ConE installation.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   153
    The actual dependencies to cone-install and cone-install-dualversion are
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   154
    specified in the actual targets below.
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   155
    -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   156
  <target name="_pack">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   157
    <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   158
        <echo>$${build.cone_pack_path}:     ${build.cone_pack_path}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   159
        <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   160
        -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   161
    <echo message="Creating zip file" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   162
    <mkdir dir="${build.cone_pack_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   163
    <tstamp>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   164
      <format property="lastbuild"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   165
              pattern="yyyyMMddHHmmss" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   166
    </tstamp>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   167
    <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   168
      <fileset dir="${build.cone_install_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   169
    </zip>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   170
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   171
  <!-- Actual pack targets -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   172
  <target name="pack"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   173
          depends="install-cone">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   174
    <antcall target="_pack" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   175
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   176
  <target name="pack-dualversion"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   177
          depends="install-cone-dualversion">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   178
    <antcall target="_pack" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   179
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   180
  <target name="export-bat">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   181
    <!--
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   182
        <echo>$${build.bat_export_path}:     ${build.bat_export_path}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   183
        <echo>$${build.bat_export_path_abs}: ${build.bat_export_path_abs}</echo>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   184
        -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   185
    <!-- Run the export script in build-scripts/ -->
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   186
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   187
          dir="${common.build_scripts_dir}"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   188
          failonerror="true">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   189
      <arg value="export_bat.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   190
      <arg value='--target-dir="${build.bat_export_path_abs}"' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   191
      <arg value='--plugin-package="${build.plugin_package}"' />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   192
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   193
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   194
  <target name="pack-bat"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   195
          depends="export-bat">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   196
    <echo message="Creating zip file" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   197
    <mkdir dir="${build.bat_pack_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   198
    <zip destfile="${build.bat_pack_path_abs}/ConE-BAT-${build.plugin_package}.zip">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   199
      <fileset dir="${build.bat_export_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   200
    </zip>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   201
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   202
  <target name="run-bat"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   203
          depends="install-cone,export-bat">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   204
    <echo message="Moving ConE installation under BAT..." />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   205
    <move todir="${build.bat_export_path_abs}/cone">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   206
      <fileset dir="${build.cone_install_path_abs}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   207
    </move>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   208
    <echo message="Running tests..." />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   209
    <exec executable="python"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   210
          dir="${build.bat_export_path_abs}">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   211
      <arg value="runtests.py" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   212
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   213
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   214
  <target name="run-all-tests">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   215
    <echo message="Run all tests" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   216
    <echo message="OS: ${os.name}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   217
    <echo message="Python version: ${pythonversion}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   218
    <subant buildpath="."
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   219
            target="run-all-tests-linux" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   220
    <subant buildpath="."
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   221
            target="run-all-tests-windows" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   222
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   223
  <target name="run-all-tests-linux"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   224
          if="os_is_linux">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   225
    <echo message="Change Python version" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   226
    <echo message="ln -s -f /usr/bin/${pythonversion} ${os.linux.userbin}/python" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   227
    <exec executable="ln">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   228
      <arg value="-s" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   229
      <arg value="-f" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   230
      <arg value="/usr/bin/${pythonversion}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   231
      <arg value="${os.linux.userbin}/python" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   232
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   233
    <echo message="Python version:" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   234
    <exec executable="sh"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   235
          dir="./source">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   236
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   237
           path="${os.linux.userbin}:${env.PATH}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   238
      <arg value="-c" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   239
      <arg value="python --version" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   240
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   241
    <echo message="Run tests" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   242
    <exec executable="sh"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   243
          dir="./source">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   244
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   245
           path="${os.linux.userbin}:${env.PATH}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   246
      <arg value="-c" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   247
      <arg value="python runtests.py --with-nose" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   248
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   249
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   250
  <target name="run-all-tests-windows"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   251
          unless="os_is_linux">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   252
    <echo message="Change Python version" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   253
    <echo message="Python version:" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   254
    <exec executable="cmd">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   255
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   256
           path="${os.windows.pythonlocationbase}${pythonversion};${os.windows.pythonlocationbase}${pythonversion}/Scripts;${env.PATH}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   257
      <arg value="/c" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   258
      <arg value="python --version" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   259
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   260
    <echo message="Run tests" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   261
    <exec executable="cmd"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   262
          dir="./source">
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   263
      <env key="PATH"
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   264
           path="${os.windows.pythonlocationbase}${pythonversion};${os.windows.pythonlocationbase}${pythonversion}/Scripts;${env.PATH}" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   265
      <arg value="/c" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   266
      <arg value="python runtests.py --with-nose" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   267
    </exec>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   268
  </target>
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   269
  <import file="generatedoc-build.xml" />
2e8eeb919028 Adding EPL version of configurationengine.
terytkon
parents:
diff changeset
   270
</project>