找回密码
 立即注册
收起左侧

qtIfw制作安装包问题

0
回复
7366
查看
[复制链接]
累计签到:3 天
连续签到:1 天
来源: 2018-1-14 12:11:26 显示全部楼层 |阅读模式
2Qter豆
现在想在选择安装路径下面(红色区域)增加图片的保存路径和文档的保存路径,求大神怎么添加?





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);
    }
}

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了