最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - How to sign a launcher created by jpackage on Windows? - Stack Overflow

programmeradmin2浏览0评论

The entry point of the application bundled by jpackage is "My App.exe", given that the app is called "My App".

I can sign the installer after jpackage is done. I can sign other resource before I launch jpackage.

But how do I sign this launcher file that is by jpackage? Is there a hook after jpackage have already prepared the files, but haven't yet called Wix?

The entry point of the application bundled by jpackage is "My App.exe", given that the app is called "My App".

I can sign the installer after jpackage is done. I can sign other resource before I launch jpackage.

But how do I sign this launcher file that is by jpackage? Is there a hook after jpackage have already prepared the files, but haven't yet called Wix?

Share Improve this question edited Mar 31 at 15:17 Vladyslav Lubenskyi asked Mar 31 at 15:12 Vladyslav LubenskyiVladyslav Lubenskyi 6861 gold badge9 silver badges18 bronze badges 1
  • 1 jpackage can be run in two stages, target --type app-image, modify the contents, then apply the --type exe/msi/dmg step – DuncG Commented Mar 31 at 15:18
Add a comment  | 

1 Answer 1

Reset to default 2

jpackage can be run in two stages to allow you to apply changes to the app image structure before generating the installer.

First stage use target jpackage --type app-image with --dest and --name parameters to generate the application image as yourstage1.dir\Your App Name:

jpackage --type app-image --dest yourstage1.dir --name "Your App Name" ... etc

Modify the contents of the output folder as needed, such as signing executables. I have a Windows screensaver, so my build renames one .EXE with .SCR extension in this step.

Finally apply jpackage again with the target type appropriate for your environment using --type exe/msi/dmg with --app-image to read the app image folder created in the first stage. Example:

jpackage --type msi --app-image "yourstage1.dir/Your App Name" ... etc

You can add --dest dir to change where the MSI file is created.

发布评论

评论列表(0)

  1. 暂无评论