如何向 install4j 提供密钥文件密码

How to feed install4j the key file password

我已经自己签署了一个证书,我正在尝试使用 Install4j 签署 exe。我在上面设置了密码 12345678。似乎找到了密钥文件,是的,它是加密的 (pw:12345678)。输出是:

Loading config file C:\Users\alexa\IdeaProjects\downlords-faf-client\downlords-faf-client.install4j------------------------------------------------------------------------------
The private key is encrypted. To avoid manual intervention, set the
"--win-keystore-password" command line option or the 
"winKeystorePassword" gradle property or ant task attribute. 
------------------------------------------------------------------------------
Enter the password for the Windows key store:


Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 2 executed, 8 up-to-date
install4j: compilation failed. Reason: null

我都尝试过在 gradle.properties 和命令行中设置密码。

设置gradle 属性不会传值给install4j编译器,你必须在gradle task上配置属性。

错误信息具有误导性,应该是

"winKeystorePassword" gradle task property

而不是

"winKeystorePassword" gradle property

这将在 8.0.9 中修复。