我使用 Qt 安装程序框架。
如何确保在卸载时仅删除某些文件或文件夹,而不是像当前那样删除安装文件夹中的所有文件?
先感谢您
您可以覆盖默认行为component.createOperations
对于卸载程序,然后使用手动指定每个卸载路径component.registerPathForUninstallation https://doc.qt.io/qtinstallerframework/scripting-component.html#registerPathForUninstallation-method.
这可能看起来像这样:
function Component() {
pathsToUninstall = [];
pathsToUninstall.forEach(function(path) {
component.registerPathForUninstallation(path);
});
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)