Customizing Installers
自定义安装程序
You can use scripting to customize installers by:
可以使用脚本通过以下方式自定义安装程序:
- Adding Qt Installer Framework operations that are prepared by the scripts and performed by the installer.
- 添加由脚本准备并由安装程序执行的Qt安装程序框架操作。
- Adding new pages that you specify in the package.xml file and place in the
packagesdirectory. - 添加在package.xml文件中指定的新页面,并将其放置在packages目录中。
- Modifying existing pages by inserting custom user interface elements into them as single widgets.
- 通过将自定义用户界面元素作为单个widget插入现有页面来修改它们。
- Adding language variants.
- 添加语言变量。
You can use both component scripts and a control script to customize installers. A component script is associated with a particular component by specifying it in the Script element of the package.xml file of the component. The script is loaded when the component's metadata is fetched. For more information about component scripts, see Component Scripting.
可以使用组件脚本和控制脚本来自定义安装程序。通过在组件的package.xml文件的Script元素中指定它,组件脚本与特定组件相关联。在获取组件的元数据时加载脚本。有关组件脚本的更多信息,请参阅组件脚本。
A control script is associated with the whole installer by specifying it in the ControlScript element of the config.xml file of the installer. Control scripts can be part of the installer resources or be passed on the command line. They can be used to modify the installer pages that are presented to users before components are loaded. Also, you can use them to modify pages in the uninstaller. For more information, see Controller Scripting.
通过在安装程序的config.xml文件的ControlScript元素中指定控制脚本,控制脚本与整个安装程序相关联。控制脚本可以是安装程序资源的一部分,也可以在命令行上传递。它们可用于在加载组件之前修改呈现给用户的安装程序页面。此外,还可以使用它们来修改卸载程序中的页面。有关更多信息,请参阅控制器脚本。
For more information about the global JavaScript objects that can be used in component and control scripts, see Scripting API.
有关可在组件和控制脚本中使用的全局JavaScript对象的更多信息,请参阅编写API脚本。
Adding Operations
添加操作
You can use component scripts to perform Qt Installer Framework operations during the installation process. Typically, operations manipulate files by moving, copying, or patching them. Use the


371

被折叠的 条评论
为什么被折叠?



