jpackage windows --version-swap --icon-swap weirdness

Jon Harper jon.harper87 at gmail.com
Thu Feb 7 19:25:29 UTC 2019


Hi list,
I'm using jpackage EA from https://jdk.java.net/jpackage/ to create a
windows executable on windows 2012 R2 (jpackager create-image ...)
The resulting exe file doesn't have the correct vendor and version
information (it has openjdk 13 instead of my vendor name and version).
It has the correct logo.

Can anyone help with this, or is anyone interested ? Has anyone made
the icon and vendor work with exes ?

I did some troubleshooting, including writing my own program that
updates the version using  BeginUpdateResource, UpdateResource and
EndUpdateResource, I see very differing behaviors depending on what
exe I change.

With an exe that I compiled myself using mingw32 (gcc 5.1), calling
jpackager --icon-swap and jpackager --version-swap on it works.

Using a copy of git.exe from git for windows portable, everytime I
call jpackage --version-swap (or my own program) on this exe AFTER
having done a jpackage --icon-swap on it, I get a crash and the exe is
not updated (updating the version with my simple program has the same
behavior). Calling jpackage --version-swap first and then jpackage
--icon-swap results in an exe that has the correct icon and correct
versioninfo (although this exe is now "poisonned", you can't change
its version again..)

Running jpackage --version-info again on the binary generated by
jpackage doesn't do anything but doesn't crash.

The behavior is the same whether I use my own icon (a 48x48 icon
created with the gimp) or if replace my icon file with
javalogo_white_48.ico

I can run more tests if necessary.
Any help is appreciated,

Cheers,
Jon


More information about the core-libs-dev mailing list