Launch4j stopped working today, giving me the following error message:
launch4j: Compiling resources
launch4j: /home/xxxx/bin/launch4j/bin/windres: preprocessing failed.
launch4j: Generated resource file...
launch4j: LANGUAGE 0, 1
2 RCDATA BEGIN "1.6.0\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
1 ICON DISCARDABLE "/home/xxxx/xxxx.ico"
21 RCDATA BEGIN "http://java.com/download\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "Beim Start des Programms ist ein Fehler aufgetreten.\0" END
102 RCDATA BEGIN "Das Programm wurde gemeinsam mit einer Java-Laufzeitumgebung ausgeliefert. Diese ist aber defekt oder fehlt ganz.\0" END
103 RCDATA BEGIN "Dieses Programm kann nur gestartet werden, wenn eine Java-Laufzeitumgebung installiert ist.\0" END
104 RCDATA BEGIN "In der Registry wird auf eine Java-Laufzeitumgebung verwiesen, die defekt ist oder gar nicht existiert.\0" END
17 RCDATA BEGIN "true\0" END
launch4j: net.sf.launch4j.ExecException: Exec failed (1): /home/xxxx/bin/launch4j/bin/windres --preprocessor=cat -J rc -O coff -F pe-i386 /tmp/launch4j4252501814162148942rc /tmp/launch4j2495107979749405766o
The build system is Kubuntu 14.04 64bit. I already tried to replace windres with a self-compiled version from the binutils package; with this executable, I get the message "Can't detect target endianness and architecture."
Obviously something must have changed. Did you change the configuration file? Any system updates? You can try creating a resoure file with the content above (LANGUAGE....) and try running windres with the parameters as above and see if any particular error is reported.
Nothing has changed in my configuration, in my Eclipse setup or whatever. Just the usual os updates.
I have solved the problem now throug a hint I got in another posting. I installed the binutils-mingw-w64 package and linked /usr/bin/x86_64-w64-mingw32-ld and /usr/bin/x86_64-w64-mingw32-windres to ld and windres in the launch4j/bin directory.
Maybe launch4j should bring a configuration script that links these files rather than having binary files that might or might not work.
Last edit: Uwe Mock 2015-08-02
Thanks for the info.