1

我正在尝试使用 Apache ANT 构建一个项目(在 Windows Xp SP3 上安装的所有软件包,如 SWT、Eclipse Indigo)。所有文件都在相应目录下

F:\Work_Arun\Indic\trunk\indic-keyboards\build-win32-x86.xml:47:执行失败:java.io.IOException:无法运行程序“Cl”(在目录“F:\Work_Arun\Indic\trunk \indic-keyboards\src\org\iisc\mile\indickeyboards\windows"): CreateProcess error=2, 系统找不到指定的Build.XML文件

<?xml version="1.0"?>
<project name="indic-keyboards-win32-x86" default="build">
    <description>indic-keyboards - A Multilingual Indic Keyboard Interface for Indic Scripts</description>

    <property name="debug" value="false" />
    <property name="verbose" value="false" />
    <property name="main.class" value="org.iisc.mile.indickeyboards.IndicKeyboards" />
    <property name="swt" value="swt.jar" />

    <fileset id="ImagesIcons" dir="./resources">
        <patternset includes="*.ico,*.png,*.gif,*.jpg,*.jpeg" />
    </fileset>

    <fileset id="otherfiles" dir=".">
        <patternset includes="*.txt,*.conf" />
    </fileset>

    <fileset id="swtorg" dir="./swt">
        <patternset includes="**/org/**" />
    </fileset>

    <fileset id="swtdll" dir="./swt">
        <patternset>
            <include name="swt*.dll" />
            <include name="version.txt" />
        </patternset>
    </fileset>

    <fileset id="ourdll" dir=".">
        <patternset includes="*.dll" />
    </fileset>

    <target name="init" description="Initialization by creating the directory structure">
        <mkdir dir="bin" />
    </target>

    <target name="header" depends="compile" description="Generates the platform specific header files for building libraries">
        <javah destdir="./src/org/iisc/mile/indickeyboards/windows" classpath="./bin">
            <class name="org.iisc.mile.indickeyboards.windows.PollThread" />
            <class name="org.iisc.mile.indickeyboards.windows.OutputCharToActiveWindow" />
        </javah>
    </target>

    <target name="build" depends="header" description="Creates the windows libraries (.dll files)">
        <property environment="env" />
        <echo>Using JDK present at ${env.JAVA_HOME} ; Architecture : ${env.PROCESSOR_ARCHITECTURE}</echo>
        <exec dir="./src/org/iisc/mile/indickeyboards/windows" executable="Cl">
            <arg line="-I'${env.JAVA_HOME}'\include -I'${env.JAVA_HOME}'\include\win32 -LD /Feindic-keyboards-sysHook.dll syshook.cpp /link user32.lib" />
        </exec>
        <exec dir="./src/org/iisc/mile/indickeyboards/windows" executable="cl">
            <arg line="-I'${env.JAVA_HOME}'\include -I'${env.JAVA_HOME}'\include\win32 -LD /Feindic-keyboards-opChars.dll opChars.cpp /link user32.lib" />
        </exec>
        <move todir=".">
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows">
                <include name="*.dll" />
            </fileset>
        </move>
        <delete>
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows" includes="*.h" />
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows" includes="*.obj" />
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows" includes="*.exp" />
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows" includes="*.lib" />
            <fileset dir="./src/org/iisc/mile/indickeyboards/windows">
                <include name="lib*" />
            </fileset>
        </delete>
    </target>

    <target name="compile" depends="init" description="Compiles the java source code.">
        <echo>Compiling ${ant.project.name}</echo>
        <javac srcdir="src" destdir="bin" classpath="${swt}" debug="${debug}" verbose="${verbose}" />
    </target>

    <target name="run" depends="build" description="Executes the project">
        <echo>Using Java ${ant.java.version} present at ${java.home}</echo>
        <java classpath="${swt}:./bin" classname="org.iisc.mile.indickeyboards.IndicKeyboards" fork="true" />
    </target>

    <target name="jar" depends="build" description="Packages into an executable JAR">
        <mkdir dir="dist" />
        <mkdir dir="swt" />
        <unjar src="${swt}" dest="./swt" />

        <manifest file="MANIFEST.MF">
            <attribute name="Class-Path" value="." />
            <attribute name="Main-Class" value="${main.class}" />
        </manifest>
        <jar destfile="./dist/${ant.project.name}.jar" basedir="bin" duplicate="preserve" manifest="./MANIFEST.MF">
            <fileset refid="swtdll" />
            <fileset refid="swtorg" />
        </jar>
        <delete dir="META-INF" />
        <delete file="./MANIFEST.MF" />
        <delete dir="swt" />
        <copy todir="./dist">
            <fileset refid="ourdll" />
        </copy>

        <mkdir dir="./dist/kblayouts" />
        <copy todir="./dist/kblayouts">
            <fileset dir="./kblayouts" />
        </copy>

        <mkdir dir="./dist/resources" />
        <copy todir="./dist/resources">
            <fileset dir="./resources" />
        </copy>

        <mkdir dir="./dist/docs" />
        <copy todir="./dist/docs">
            <fileset dir="./docs" />
        </copy>

        <copy todir="./dist">
            <fileset refid="otherfiles" />
        </copy>
        <delete dir="./bin" />
    </target>

    <target name="javadoc" depends="init" description="Generates javadoc of the source">
        <mkdir dir="./javadoc" />
        <javadoc destdir="./javadoc" sourcepath="./src" packagenames="org.*" Private="true" />
        <delete dir="./bin" />
    </target>

    <target name="clean" description="Clean up after compile/build.">
        <delete dir="./bin" />
        <delete dir="./javadoc" />
        <delete dir="./dist" />
        <delete>
            <fileset dir="./" includes="*.dll" />
        </delete>
    </target>

</project>

错误的原因是什么?

4

0 回答 0