I am new to JavaFX and only have some basic knowledge about Ant. At the moment I am learning how to use the FX Ant tasks to deploy an application. Edit: By using <fx:deploy nativeBundles="exe" ../>
Ant automaticly uses Inno Setup to create a setup file with the .exe
extension.
Since our company has some affiliated companies, most of our applications need to be deployed once for each of them. This is because some Windows Registry entries are created and they should look like this (not my idea, the management wants it to be like this!):
"HKCU\\Software\\ \\AppName\\Settings" \\AppName\\Settings”
Now I would like to know, if it's possible to pass a parameter from my build.xml
to the .iss
to insert the bold part dynamically.
I found this question , where passing /DMyParameterName=MyValue
to the Inno Setup compiler (ISC) is suggested, but I don't know how to do this from the build.xml
since I can't find any direct call to the ISC.
I hope you can understand my problem (English isn't my native language). If you need more information to be able to help me please feel free to ask, I will try to add them as fast as possible.
The Java FX does not allow you to pass any additional arguments to ISCC.exe
.
At least according to OpenJFX source code:
//run candle
ProcessBuilder pb = new ProcessBuilder(
TOOL_INNO_SETUP_COMPILER_EXECUTABLE.fetchFrom(params),
"/o"+outdir.getAbsolutePath(),
getConfig_ExeProjectFile(params).getAbsolutePath());
pb = pb.directory(EXE_IMAGE_DIR.fetchFrom(params));
IOUtils.exec(pb, VERBOSE.fetchFrom(params));
You might do with setting an environment variable instead of parameter and consume it using this syntax:
{%VARNAME}
See Inno Setup Constants documentation.
For those looking for a pure Ant solution (no Java FX):
The Inno Setup compiler ( ISCC.exe
) is a normal console executable.
You run the compiler using a basic Exec Ant task :
<project>
<exec executable="ISCC.exe">
<arg value="Example1.iss"/>
<arg value="/DMyParameterName=MyValue"/>
</exec>
</project>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.