在win10下用qtIfw制作软件安装包

qq_34633404 2018-01-14 11:54:32
现在想在选择安装路径下面(红色区域)增加图片的保存路径和文档的保存路径,求大神怎么添加?




config.xml文件配置信息:

<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>AutoStereoStorageClient</Name>
<Version>1.0.0</Version>
<Title>AutoStereoStorageClient</Title>
<Publisher>wen</Publisher>
<StartMenuDir>AutoStereoStorageClient</StartMenuDir>
<TargetDir>e:/mm</TargetDir>
<CreateLocalRepository>true</CreateLocalRepository>
</Installer>


package.xml文件配置信息:

<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>AutoStereoStorageClient</DisplayName>
<Description>Show checkbox asking whether to open Readme at the end</Description>
<Version>1.0.0-1</Version>
<ReleaseDate>2013-01-01</ReleaseDate>
<Default>true</Default>
<Script>installscript.qs</Script>
<UserInterfaces>
<UserInterface>readmecheckboxform.ui</UserInterface>
</UserInterfaces>
</Package>

installscript.qs文件配置信息:

function Component()
{
installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
}

Component.prototype.createOperations = function()
{
component.createOperations();
}

Component.prototype.installationFinishedPageIsShown = function()
{
try {
if (installer.isInstaller() && installer.status == QInstaller.Success) {
installer.addWizardPageItem( component, "ReadMeCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
console.log(e);
}
}

Component.prototype.installationFinished = function()
{
try {
if (installer.isInstaller() && installer.status == QInstaller.Success) {
var isReadMeCheckBoxChecked = component.userInterface( "ReadMeCheckBoxForm" ).readMeCheckBox.checked;
if (isReadMeCheckBoxChecked) {
QDesktopServices.openUrl("file:///" + installer.value("TargetDir") + "/README.txt");
}
}
} catch(e) {
console.log(e);
}
}
...全文
941 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

16,175

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧