#112 ant task does not change directory

3.1.x
closed-fixed
nobody
None
5
2013-08-20
2012-12-22
Oliver Kopp
No

The ant task does not change directory to the location of the JAR file. Specifying the "jar" property does not help.

I think, a directory change is needed as ld.exe gets passed the files using a relative path.

[launch4j] Compiling resources
[launch4j] Linking
[launch4j] C:\Projects\JabRef\launch4j\bin\ld.exe: cannot find .\w32api\crt2.o: No such file or directory
[...]
[launch4j] C:\Projects\JabRef\launch4j\bin\ld.exe: cannot find .\w32api\libshell32.a: No such file or directory

BUILD FAILED
C:\git-repos\jabref\jabref\build.xml:519: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Projects\JabRef\launch4j\bin\ld.exe -mi386pe --oformat pei-i386 --dynamicbase --nxcompat --no-seh --subsystem windows -s .\w32api\crt2.o .\head\guihead.o .\head\head.o C:\Users\Oliver\AppData\Local\Temp\launch4j46828792170857382o .\w32api\libmingw32.a .\w32api\libgcc.a .\w32api\libmsvcrt.a .\w32api\libkernel32.a .\w32api\libuser32.a .\w32api\libadvapi32.a .\w32api\libshell32.a -o C:\git-repos\jabref\jabref\build\lib\JabRef.exe

Discussion

  • ToFi
    ToFi
    2012-12-27

    It seems as I'm having a similar issue, but in my case 'windres' is causing the problem...

    I'm using launch4j-3.1.0-beta1-macosx-x86-10.8.

    This is my taskdef in ant:
    ---------------------------------------------------------

    <taskdef name="launch4j"
    classname="net.sf.launch4j.ant.Launch4jTask"
    classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"
    />
    <launch4j
    configFile="${launch4j.config.dir}/paginaEPUBChecker_Mac.xml"
    fileVersion="${program.version.number}"
    txtFileVersion="${program.version.txtNumber}"
    productVersion="${program.version.number}"
    txtProductVersion="${program.version.txtNumber}"
    />

    ---------------------------------------------------------

    And this is the output:
    ---------------------------------------------------------

    [launch4j] Compiling resources
    [launch4j] Generated resource file...
    [launch4j] LANGUAGE 0, 1
    [launch4j] 1 VERSIONINFO
    [launch4j] FILEVERSION 1, 1, 0, 187
    [launch4j] PRODUCTVERSION 1, 1, 0, 187
    [launch4j] FILEFLAGSMASK 0
    [launch4j] FILEOS 0x40000
    [launch4j] FILETYPE 1
    [launch4j] {
    [launch4j] BLOCK "StringFileInfo"
    [launch4j] {
    [launch4j] BLOCK "040904E4"
    [launch4j] {
    [launch4j] VALUE "CompanyName", "pagina GmbH"
    [launch4j] VALUE "FileDescription", "pagina EPUB-Checker"
    [launch4j] VALUE "FileVersion", "1.1.0"
    [launch4j] VALUE "InternalName", "EPUB-Checker"
    [launch4j] VALUE "LegalCopyright", "pagina GmbH, Tuebingen"
    [launch4j] VALUE "OriginalFilename", "EPUB-Checker.exe"
    [launch4j] VALUE "ProductName", "pagina EPUB-Checker"
    [launch4j] VALUE "ProductVersion", "1.1.0"
    [launch4j] }
    [launch4j] }
    [launch4j] BLOCK "VarFileInfo"
    [launch4j] {
    [launch4j] VALUE "Translation", 0x0409, 0x04E4
    [launch4j] }
    [launch4j] }2 RCDATA BEGIN "1.6.0\0" END
    [launch4j] 18 RCDATA BEGIN "1\0" END
    [launch4j] 1 ICON DISCARDABLE "/Users/tobiasfischer/Entwicklung/eclipse-workspace/_ANT-buildDir/resources/paginaEPUBChecker_512.ico"
    [launch4j] 21 RCDATA BEGIN "http://java.com/download\0" END
    [launch4j] 20 RCDATA BEGIN "32\0" END
    [launch4j] 11 RCDATA BEGIN "true\0" END
    [launch4j] 101 RCDATA BEGIN "An error occurred while starting the application.\0" END
    [launch4j] 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
    [launch4j] 103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
    [launch4j] 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
    [launch4j] 105 RCDATA BEGIN "An application instance is already running.\0" END
    [launch4j] 23 RCDATA BEGIN "paginaEPUBChecker\0" END
    [launch4j] 24 RCDATA BEGIN "EPUB-Checker\0" END
    [launch4j] 17 RCDATA BEGIN "true\0" END

    BUILD FAILED
    /Users/tobiasfischer/Entwicklung/eclipse-workspace/EPUB-Checker2/build-Applications_MacToFi.xml:107: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "./bin/windres": error=2, No such file or directory

     
  • I also have the same problem, under Ubuntu12.10 x86

     
  • Grzegorz Kowal
    Grzegorz Kowal
    2013-08-20

    • status: open --> closed-fixed