2

I would like to pass the maven version number of the project to the native installer process. I know I can use the 0.0.1 tag during the build, however this seems to only work when I don't have a customized *.iss file in my project.

I need to change the defaults to place the application in the program files, and change the silent run options. Currently I have that in a custom *.iss file which my build finds and uses. I can't seem to get the number passed through.

So I am wondering how to modify the template.iss so that I can create my defaults and then let it dynamically generate from there.

We can't provide the version number when using a customized ISS file, therefore I would like to change the template.iss file that is used during the packaging - but I am unsure how to change it.

Thanks.

purring pigeon
  • 4,141
  • 5
  • 35
  • 68
  • possible duplicate of [How to pass parameters from Java FX Ant task to Inno Setup?](http://stackoverflow.com/questions/30374416/how-to-pass-parameters-from-java-fx-ant-task-to-inno-setup) – Martin Prikryl Aug 07 '15 at 05:35
  • Thanks for you post, however this is not a duplicate of that post. I am trying to use a customized ISS file for inno. My version number is passed at generation time - however when I use a preconfigured file in my project, I can't pass the version number there. I want to know how to override the template.iss file which is used in the processing. Thanks – purring pigeon Aug 07 '15 at 13:34
  • So you can generate the template from the numbers, right? – Martin Prikryl Aug 07 '15 at 13:37
  • Yes - when I run the INNO process (using the zenjava plugin) if I don't provide a customized application.iss, it will generate one during the run using the nativeReleaseVersion property. However I lose the other information like {pf}/foldername for the install directory (template.iss uses the user AppLocal. So if I could change them template.iss, then I could set up my defaults, and then allow the dynamic stuff to come through. – purring pigeon Aug 07 '15 at 14:00
  • I do not know what zenjava is. But in JavaFX, the only solution is to edit the `template.iss`. So either modify it as part of the build. Or modify it upfront to use environment variables for the version and set the variables during the build. – Martin Prikryl Aug 07 '15 at 14:14
  • That is my question - I can't seem to find how/where to modify that template. Thanks – purring pigeon Aug 07 '15 at 18:02
  • @ Martin Prikryl - do you have a sample of how to modify the template.iss? – purring pigeon Aug 14 '15 at 16:47
  • No I do not have any sample. – Martin Prikryl Aug 14 '15 at 17:46
  • 1
    @MartinPrikryl the javafx-maven-plugin was created by Daniel Zwolenski who had a website called "ZenJava". That [javafx-maven-plugin](https://github.com/javafx-maven-plugin) is now maintained by me, used by some people who want to create native bundles via maven. – FibreFoX Dec 17 '15 at 14:24

1 Answers1

1

If you use jdk8, you can edit the template.iss in the following ways. (other jdk versions can use similar solutions)

The template.iss file location is com\oracle\tools\packager\windows\template.iss in jar %JAVA_HOME%\lib\ant-javafx.jar. You can edit this jar file use WinRAR(or other compression tools), update it's contents.

This solution seems ugly, not portable, but it works.

I know this is an old question, and I hope can help others.

dairugang
  • 11
  • 2