简体   繁体   English

Install4j:Unix 启动程序脚本片段使用安装程序变量

[英]Install4j: Unix launcher script fragment use installer variable

In the installer I've a directory selection screen to let the user select and specific directory where program is installed.在安装程序中,我有一个目录选择屏幕,让用户选择安装程序的特定目录。

Then I want to use this variable in script fragment for unix launchers:然后我想在 unix 启动器的脚本片段中使用这个变量:

在此处输入图片说明

However then in the launcher generated the variable is not correctly changed and it's used the variable description and not it's value, if I edit the launcher with vi I see:但是,在生成的启动器中,变量没有正确更改,它使用了变量描述而不是它的值,如果我用vi编辑启动器,我会看到:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${installer:firefoxDirectory}

And this is not working.这是行不通的。

However for this question it seems that if this same approach is used in the launcher for the arguments of the "Java invocation" then it works.然而,对于这个问题,如果在启动器中使用相同的方法作为“Java 调用”的参数,那么它似乎有效。

What I'm doing wrong?我做错了什么? It's possible to achieve it?有可能实现吗?

Installer variables are not available the generated shell script.安装程序变量在生成的 shell 脚本中不可用。

However for this question it seems that if this same approach is used in the launcher for the arguments of the "Java invocation" then it works.然而,对于这个问题,如果在启动器中使用相同的方法作为“Java 调用”的参数,那么它似乎有效。

In that case the installer variable is replaced in the Java launcher.在这种情况下,安装程序变量在 Java 启动程序中被替换。

In your case, you can run a "Replace installer variables in text files" action on the launcher script after the installation.在您的情况下,您可以在安装后对启动程序脚本运行“替换文本文件中的安装程序变量”操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM