We're trying to build an RCP application with ant4eclipse. Our build server runs a Red Hat Linux. The building itself appears to be working, but the result is an application/x-executable for linux. Curiously I couldn't get it to run on my Ubuntu 18.04 laptop either, but I thought that might be an incompatability with the distro. Either way, the build seems to build the product for the platform the build script is run on, but we want a .exe file for windows. Within the script we have the following properties:
<ant4eclipse:platformConfiguration id="win32.win32.x86"
windowingSystem="win32"
operatingSystem="win32"
architecture="x86" />
When building the product we use the following parameters:
<buildProduct
workspaceDirectory="${workspaceDirectory}"
productfile="${productFile}"
targetPlatformId="target.platform"
destination="${targetDirectory}"
clearDestination="true"
os="win32"
debug="true"/>
Is anything missing to tell ant4eclipse to build for windows, or could some parameter be wrong in any way here?
Thanks in advance.
The solution was actually quite easy. Weirdly enough te buildProduct makro didn't seem to recognize the setting where I set the platformConfigurationId. I checked the ant4eclipse macro file and saw, that the buildProduct macro also accepts a "platformConfigurationId" argument, which defaulted to an empty string - so the platform the product is being built on. By passing
to buildProduct I managed to get a product suited for Windows.