安装程序帮助程序脚本的编译器变量的可用性
Availability of compiler variables for installer helper script
我们在 6.0.4 版本中使用 install4j。当我们将编译器变量放入安装应用程序的帮助脚本时,如
options.add(new String[] {"-VmyOption=[Value]", "Set the custome option (default=" + context.getCompilerVariable("myoption") + ")");
我们得到上下文变量的 NullPointerException。这是一个错误还是在调用帮助脚本时上下文不可用?
or is the context not available at the time the helper script will be called
确实是这样。脚本是在环境初始化之前调用的,所以context参数为null。
我们在 6.0.4 版本中使用 install4j。当我们将编译器变量放入安装应用程序的帮助脚本时,如
options.add(new String[] {"-VmyOption=[Value]", "Set the custome option (default=" + context.getCompilerVariable("myoption") + ")");
我们得到上下文变量的 NullPointerException。这是一个错误还是在调用帮助脚本时上下文不可用?
or is the context not available at the time the helper script will be called
确实是这样。脚本是在环境初始化之前调用的,所以context参数为null。