B4J Question B4J Packager - change install folder?

Bruce Axtens

Active Member
Licensed User
Longtime User
What do I need to change in B4J Packager so that, when the installer runs, it prompts for a destination folder into which to install. Currently it defaults to "C:\Program Files" and I want to be able to tell it to install to my Azure E: drive.

Bruce/bugmagnet
 

Bruce Axtens

Active Member
Licensed User
Longtime User
I discovered that, having specified "-native exe" to javapackager that the resulting exe has command line parameters, one of which is
/DIR=x:\dirname
which overrides the default directory name.

I haven't tested this but I'm hoping it does what I want
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try this:
Unzip ant-javafx.jar and find the inno setup template file named template.iss. You need to extract it.
Full path: C:\Program Files\Java\jdk1.8.0_151\lib\ant-javafx.jar\com\oracle\tools\packager\windows\

SS-2018-04-30_19.09.57.png


Delete this this line from the template file:
DisableDirPage=DISABLE_DIR_PAGE

Put the file back into the jar.

I haven't tried it myself.
 
Upvote 0

Bruce Axtens

Active Member
Licensed User
Longtime User
Changing
DisableDirPage=DISABLE_DIR_PAGE
to
DisableDirPage=No
worked for me. I did that after reading the documentation for Inno Setup.

That does work. Perhaps removing the directive completely would have too.

Whichever archiver you use, make sure that you are working on the jar file as Administrator.

7ZipFM very helpfully told me that it couldn't update the file until I elevated my permission.

WinRAR was less helpful, allowing me to think that I had updated the file properly only to find that it had stuffed the updated .iss script into the root directory of the jar file.
 
Last edited:
Upvote 0
Top