We need meta-information in the generated executable so that right-clicking and selecting "details" will display the description, copyright and version.
We have added description and vendor in the releaseConfiguration block but the executable still has no meta information.
Until the GluonFX plugin has support for this, there is a relatively easy way to add meta-data to your executable.
You need a
version.rcfile like the one OpenJFX uses for the different JavaFX libraries: version.rc.Then, basically you need to compile it with the proper values, and finally link it with the rest of the obj files that produce the executable.
These are the required steps:
Build GluonFX project
Assuming that you have a project like
HelloGluon, you need to run once:and that will produce an executable without meta-data under
target/gluonfx/x86_64-windows/HelloGluon.exe.Resource file
The fact that there is a default icon added via
target/gluonfx/x86_64-windows/gvm/tmp/icon/IconGroup.objmeans that there is already a resource file added to the executable. Since there can be only one, we need to bypass that with some manual work.If you check the log:
So let's do that: create the folder
C:\%path.to.project%\src\windows, and copy the iconicon.ico, and also theversion.rcfile.Edit
C:\%path.to.project%\src\windows\version.rcand add right after#define STR(x) #xthe following:Compile
Following the flags used for compilation in the OpenJFX win.gradle build file, and from the x64 command prompt, you can run:
This should create
version.obj:Link
Now check the log
target/gluonfx/log/process-link-****.logand copy the link command, replacing theIconGroup.objnow with your `version.obj:This will link again your executable with your metadata, and you will see that in details from Windows Explorer:
Note that if you run
mvn gluonfx:buildagain, you will lose thet metadata, and you will need to run the manual link command all over again.