w1146869587
2022-03-08 bf5b7f3aa93c5f6632058ad010f1cb5ae4ead8bc
setup init
16个文件已添加
890 ■■■■■ 已修改文件
mbsetup/README 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/config/config.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/config/controller.qs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/config/mbc.ico 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/config/mbc.png 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/mbsetup.pro 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/installationwidget.ui 255 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/installscript.js 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/licensewidget.ui 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/package.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/readytoinstallwidget.ui 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/targetwidget.ui 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/resources/icon.png 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/resources/license.txt 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/resources/res.qrc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
setup.pro 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/README
New file
@@ -0,0 +1,4 @@
Generate installer with
binarycreator --offline-only -c config/config.xml -p packages installer
mbsetup/config/config.xml
New file
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
    <Title>mbc</Title>
    <Name>mbc</Name>
    <Version>1.0.0</Version>
    <InstallerApplicationIcon>mbc</InstallerApplicationIcon>
    <InstallerWindowIcon>mbc.png</InstallerWindowIcon>
    <Publisher>mbc</Publisher>
    <ProductUrl>http://www.activesoft.com.cn/</ProductUrl>
    <WizardDefaultWidth>800</WizardDefaultWidth>
    <WizardDefaultHeight>500</WizardDefaultHeight>
    <MaintenanceToolName>uninstall</MaintenanceToolName>
    <WizardStyle>Classic</WizardStyle>
    <WizardShowPageList>false</WizardShowPageList>
    <!-- Directory name is used in component.xml -->
    <StartMenuDir>mbc</StartMenuDir>
    <TargetDir>@HomeDir@/mbc</TargetDir>
    <ControlScript>controller.qs</ControlScript>
</Installer>
mbsetup/config/controller.qs
New file
@@ -0,0 +1,34 @@
function Controller()
{
     installer.uninstallationFinished.connect(this, this.uninstallationFinished);
     installer.uninstallationStarted.connect(this, this.uninstallationStarted);
}
Controller.prototype.uninstallationStarted = function()
{
    try {
       var tmpSys = installer.value("os")
       if (tmpSys === "win") {
           installer.execute("@TargetDir@/mbwatch.exe","-t");
           installer.execute("@TargetDir@/mbwatch.exe","-u");
       }else{
           installer.execute("@TargetDir@/mbwatch","-t");
           installer.execute("@TargetDir@/mbwatch","-u");
       }
    } catch(e) {
       console.log(e);
    }
}
Controller.prototype.uninstallationFinished = function()
{
    console.log("uninstallationFinished")
}
mbsetup/config/mbc.ico
mbsetup/config/mbc.png
mbsetup/mbsetup.pro
New file
@@ -0,0 +1,19 @@
TEMPLATE = aux
INSTALLER = installer
INPUT = $$PWD/config/config.xml $$PWD/packages
mbsetup.input = INPUT
mbsetup.output = $$INSTALLER
#mbsetup.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT} -v
mbsetup.commands = ../../bin/binarycreator --offline-only -c $$PWD/config/config.xml -r $$PWD/resources/res.qrc -p $$PWD/packages ${QMAKE_FILE_OUT} -v
mbsetup.CONFIG += target_predeps no_link combine
QMAKE_EXTRA_COMPILERS += mbsetup
OTHER_FILES = README
RESOURCES += \
    resources/res.qrc
mbsetup/packages/cm.xinhan.mbc/meta/installationwidget.ui
New file
@@ -0,0 +1,255 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>InstallationWidget</class>
 <widget class="QWidget" name="InstallationWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>491</width>
    <height>190</height>
   </rect>
  </property>
  <property name="sizePolicy">
   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
    <horstretch>0</horstretch>
    <verstretch>0</verstretch>
   </sizepolicy>
  </property>
  <property name="minimumSize">
   <size>
    <width>491</width>
    <height>190</height>
   </size>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QGridLayout" name="gridLayout">
   <property name="horizontalSpacing">
    <number>0</number>
   </property>
   <property name="verticalSpacing">
    <number>6</number>
   </property>
   <item row="3" column="1">
    <spacer name="verticalSpacer_2">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <property name="sizeType">
      <enum>QSizePolicy::Fixed</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>20</height>
      </size>
     </property>
    </spacer>
   </item>
   <item row="4" column="0" rowspan="2">
    <widget class="QLabel" name="label_6">
     <property name="sizePolicy">
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string/>
     </property>
     <property name="pixmap">
      <pixmap resource="../../../resources/res.qrc">:/icon.png</pixmap>
     </property>
    </widget>
   </item>
   <item row="4" column="1" colspan="3">
    <widget class="QRadioButton" name="completeInstall">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>Complete</string>
     </property>
    </widget>
   </item>
   <item row="0" column="1" colspan="3">
    <widget class="QRadioButton" name="defaultInstall">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>Typical</string>
     </property>
     <property name="checked">
      <bool>true</bool>
     </property>
    </widget>
   </item>
   <item row="7" column="0" rowspan="2">
    <widget class="QLabel" name="label_4">
     <property name="sizePolicy">
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string/>
     </property>
     <property name="pixmap">
      <pixmap resource="../../../resources/res.qrc">:/icon.png</pixmap>
     </property>
    </widget>
   </item>
   <item row="0" column="0" rowspan="3">
    <widget class="QLabel" name="label_5">
     <property name="sizePolicy">
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string/>
     </property>
     <property name="pixmap">
      <pixmap resource="../../../resources/res.qrc">:/icon.png</pixmap>
     </property>
    </widget>
   </item>
   <item row="5" column="1" colspan="2">
    <spacer name="horizontalSpacer_2">
     <property name="orientation">
      <enum>Qt::Horizontal</enum>
     </property>
     <property name="sizeType">
      <enum>QSizePolicy::Fixed</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>1</height>
      </size>
     </property>
    </spacer>
   </item>
   <item row="7" column="1" colspan="3">
    <widget class="QRadioButton" name="customInstall">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>Custom</string>
     </property>
    </widget>
   </item>
   <item row="1" column="1" rowspan="2">
    <spacer name="horizontalSpacer">
     <property name="orientation">
      <enum>Qt::Horizontal</enum>
     </property>
     <property name="sizeType">
      <enum>QSizePolicy::Fixed</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>1</height>
      </size>
     </property>
    </spacer>
   </item>
   <item row="1" column="2" rowspan="2" colspan="2">
    <widget class="QLabel" name="label">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>Common program features will be installed. Recommended for general use.</string>
     </property>
    </widget>
   </item>
   <item row="8" column="2" colspan="2">
    <widget class="QLabel" name="label_3">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>Choose which program features you want to install. Recommended for advanced users.</string>
     </property>
    </widget>
   </item>
   <item row="5" column="3">
    <widget class="QLabel" name="label_2">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>All program features will be installed. (Requires the most disk space)</string>
     </property>
    </widget>
   </item>
   <item row="6" column="1">
    <spacer name="verticalSpacer_3">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <property name="sizeType">
      <enum>QSizePolicy::Fixed</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>20</height>
      </size>
     </property>
    </spacer>
   </item>
   <item row="8" column="1">
    <spacer name="horizontalSpacer_3">
     <property name="orientation">
      <enum>Qt::Horizontal</enum>
     </property>
     <property name="sizeType">
      <enum>QSizePolicy::Fixed</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>1</height>
      </size>
     </property>
    </spacer>
   </item>
  </layout>
 </widget>
 <tabstops>
  <tabstop>defaultInstall</tabstop>
  <tabstop>completeInstall</tabstop>
  <tabstop>customInstall</tabstop>
 </tabstops>
 <resources>
  <include location="../../../resources/additional.qrc"/>
 </resources>
 <connections/>
</ui>
mbsetup/packages/cm.xinhan.mbc/meta/installscript.js
New file
@@ -0,0 +1,254 @@
/**************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
**************************************************************************/
var ComponentSelectionPage = null;
var Dir = new function () {
    this.toNativeSparator = function (path) {
        if (systemInfo.productType === "windows")
            return path.replace(/\//g, '\\');
        return path;
    }
};
function Component() {
    //var tmp = installer.value("os")
    if (installer.isInstaller()) {
        component.loaded.connect(this, Component.prototype.installerLoaded);
        ComponentSelectionPage = gui.pageById(QInstaller.ComponentSelection);
        installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
        installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
        installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
        if (systemInfo.productType === "windows")
            installer.setDefaultPageVisible(QInstaller.StartMenuSelection, false);
        installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
        gui.pageById(QInstaller.PerformInstallation).entered.connect(this, this.performInstallationPageEntered);
    }
}
Component.prototype.isDefault = function()
{
    return true;
}
Component.prototype.createOperations = function()
{
    try {
        //call the base create operations function
       component.createOperations();
       if (systemInfo.productType === "windows") {
            //开始菜单快捷方式
            component.addOperation("CreateShortcut",
            "@TargetDir@/mbc.exe",
            "@StartMenuDir@/mbc.lnk",
            "workingDirectory=@TargetDir@");
            //桌面快捷方式
            component.addOperation("CreateShortcut",
            "@TargetDir@/mbc.exe",
            "@DesktopDir@/mbc.lnk",
            "workingDirectory=@TargetDir@");
            component.addOperation("Execute", "@TargetDir@/mbwatch.exe", "-i", "");
            component.addOperation("Execute", "@TargetDir@/mbwatch.exe", "start", "");
       }else{
            //
            component.addOperation("Execute", "@TargetDir@/mbwatch", "-i", "");
            component.addOperation("Execute", "@TargetDir@/mbwatch", "start", "");
       }
    } catch(e) {
       console.log(e);
    }
}
Component.prototype.installerLoaded = function () {
    if (installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory)) {
        var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
        if (widget != null) {
            widget.targetChooser.clicked.connect(this, Component.prototype.chooseTarget);
            widget.targetDirectory.textChanged.connect(this, Component.prototype.targetChanged);
            widget.windowTitle = "安装目录";
            widget.targetDirectory.text = Dir.toNativeSparator(installer.value("TargetDir"));
        }
    }
    // var widget = gui.pageWidgetByObjectName("DynamicInstallationWidget");
    // if (widget != null) {
    //     widget.customInstall.toggled.connect(this, Component.prototype.customInstallToggled);
    //     widget.defaultInstall.toggled.connect(this, Component.prototype.defaultInstallToggled);
    //     widget.completeInstall.toggled.connect(this, Component.prototype.completeInstallToggled);
    //     widget.defaultInstall.checked = true;
    //     widget.windowTitle = "Select Installation Type";
    // }
    if (installer.addWizardPage(component, "LicenseWidget", QInstaller.LicenseCheck)) {
        var widget = gui.pageWidgetByObjectName("DynamicLicenseWidget");
        if (widget != null) {
            widget.acceptLicense.toggled.connect(this, Component.prototype.checkAccepted);
            widget.complete = false;
            widget.declineLicense.checked = true;
            widget.windowTitle = "协议";
        }
    }
    if (installer.addWizardPage(component, "ReadyToInstallWidget", QInstaller.ReadyForInstallation)) {
        var widget = gui.pageWidgetByObjectName("DynamicReadyToInstallWidget");
        if (widget != null) {
            widget.showDetails.checked = false;
            widget.windowTitle = "准备安装";
        }
        var page = gui.pageByObjectName("DynamicReadyToInstallWidget");
        if (page != null) {
            page.entered.connect(this, Component.prototype.readyToInstallWidgetEntered);
        }
        //gui.pageById(QInstaller.ReadyForInstallation).entered.connect(this, this.performInstallationPageEntered);
    }
    // if (installer.addWizardPage(component, "InstallationWidget", QInstaller.ComponentSelection)) {
    // }
}
Component.prototype.targetChanged = function (text) {
    var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
    if (widget != null) {
        var dir = widget.targetDirectory.text;
        if (installer.fileExists(dir) && installer.fileExists(dir + "/mbc.exe")) {
                widget.warning.setText("<p style=\"color: red\">检测到程序已安装,继续将会被覆盖。</p>");
        } else {
                widget.warning.setText("");
        }
        installer.setValue("TargetDir", dir);
        widget.complete = true;
    }
}
Component.prototype.chooseTarget = function () {
    var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
    if (widget != null) {
        var newTarget = QFileDialog.getExistingDirectory("Choose your target directory.", widget
            .targetDirectory.text);
        if (newTarget != "")
            widget.targetDirectory.text = Dir.toNativeSparator(newTarget);
    }
}
Component.prototype.performInstallationPageEntered = function()
{
    var dir = installer.value("TargetDir");
    if (systemInfo.productType === "windows") {
        if (installer.fileExists(dir) && installer.fileExists(dir + "/uninstall.exe")) {
            installer.execute(dir + "/uninstall.exe",["purge"],"yes");
            //installer.execute(dir + "/install.exe", "--script=" + dir + "/script/uninstallscript.qs");
        }
   }else{
        if (installer.fileExists(dir) && installer.fileExists(dir + "/uninstall")) {
             installer.execute(dir + "/uninstall",["purge"],"yes");
        }
   }// end if
}
// Component.prototype.customInstallToggled = function (checked) {
//     if (checked) {
//         if (ComponentSelectionPage != null)
//             ComponentSelectionPage.selectDefault();
//         installer.setDefaultPageVisible(QInstaller.ComponentSelection, true);
//     }
// }
// Component.prototype.defaultInstallToggled = function (checked) {
//     if (checked) {
//         if (ComponentSelectionPage != null)
//             ComponentSelectionPage.selectDefault();
//         installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
//     }
// }
// Component.prototype.completeInstallToggled = function (checked) {
//     if (checked) {
//         if (ComponentSelectionPage != null)
//             ComponentSelectionPage.selectAll();
//         installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
//     }
// }
Component.prototype.readyToInstallWidgetEntered = function () {
    var widget = gui.pageWidgetByObjectName("DynamicReadyToInstallWidget");
    if (widget != null) {
        var html = "<b>组件安装:</b><ul>";
        var components = installer.components();
        for (i = 0; i < components.length; ++i) {
            if (components[i].installationRequested())
                html = html + "<li>" + components[i].displayName + "</li>"
        }
        html = html + "</ul>";
        widget.showDetailsBrowser.html = html;
    }
}
// Component.prototype.IntroductionPageCallback = function()
// {
//     // Installer is "updater" when it is run with "--updater"
//     // or Controller does "installer.setUpdater()"
//     if (installer.isUpdater()) {
//         var widget = gui.currentPageWidget(); // Same as gui.pageById(QInstaller.Introduction);
//     }
// }
Component.prototype.checkAccepted = function (checked) {
    var widget = gui.pageWidgetByObjectName("DynamicLicenseWidget");
    if (widget != null)
        widget.complete = checked;
}
mbsetup/packages/cm.xinhan.mbc/meta/licensewidget.ui
New file
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>LicenseWidget</class>
 <widget class="QWidget" name="LicenseWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>491</width>
    <height>190</height>
   </rect>
  </property>
  <property name="minimumSize">
   <size>
    <width>491</width>
    <height>190</height>
   </size>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <widget class="QLabel" name="label">
     <property name="sizePolicy">
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>请阅读以下许可协议。 在继续安装之前,您必须接受本协议中包含的条款。</string>
     </property>
     <property name="wordWrap">
      <bool>true</bool>
     </property>
    </widget>
   </item>
   <item>
    <widget class="QTextBrowser" name="textBrowser">
     <property name="source">
      <url>
       <string>qrc:/license.txt</string>
      </url>
     </property>
    </widget>
   </item>
   <item>
    <widget class="QRadioButton" name="acceptLicense">
     <property name="text">
      <string>我同意</string>
     </property>
    </widget>
   </item>
   <item>
    <widget class="QRadioButton" name="declineLicense">
     <property name="text">
      <string>我不同意</string>
     </property>
     <property name="checked">
      <bool>true</bool>
     </property>
    </widget>
   </item>
  </layout>
 </widget>
 <resources>
  <include location="../../../resources/res.qrc"/>
 </resources>
 <connections/>
</ui>
mbsetup/packages/cm.xinhan.mbc/meta/package.xml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package>
    <DisplayName>mbc</DisplayName>
    <Description>mbc</Description>
    <Version>1.0.0</Version>
    <ReleaseDate>2022-02-28</ReleaseDate>
    <Default>script</Default>
    <Script>installscript.js</Script>
    <UserInterfaces>
        <UserInterface>targetwidget.ui</UserInterface>
        <UserInterface>licensewidget.ui</UserInterface>
        <!-- <UserInterface>installationwidget.ui</UserInterface> -->
        <UserInterface>readytoinstallwidget.ui</UserInterface>
    </UserInterfaces>
    <Name>cm.xinhan.mbc</Name>
</Package>
mbsetup/packages/cm.xinhan.mbc/meta/readytoinstallwidget.ui
New file
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>ReadyToInstallWidget</class>
 <widget class="QWidget" name="ReadyToInstallWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>491</width>
    <height>190</height>
   </rect>
  </property>
  <property name="minimumSize">
   <size>
    <width>491</width>
    <height>190</height>
   </size>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout_3">
   <item>
    <widget class="QLabel" name="label_2">
     <property name="sizePolicy">
      <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="text">
      <string>安装程序现在已准备好开始在您的计算机上安装</string>
     </property>
    </widget>
   </item>
   <item>
    <widget class="QCheckBox" name="showDetails">
     <property name="text">
      <string>显示详细信息</string>
     </property>
     <property name="checked">
      <bool>true</bool>
     </property>
    </widget>
   </item>
   <item>
    <widget class="QTextBrowser" name="showDetailsBrowser"/>
   </item>
   <item>
    <spacer name="verticalSpacer_2">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>0</height>
      </size>
     </property>
    </spacer>
   </item>
  </layout>
  <zorder>label_2</zorder>
  <zorder>showDetails</zorder>
  <zorder>showDetailsBrowser</zorder>
  <zorder>verticalSpacer_2</zorder>
 </widget>
 <resources/>
 <connections>
  <connection>
   <sender>showDetails</sender>
   <signal>toggled(bool)</signal>
   <receiver>showDetailsBrowser</receiver>
   <slot>setVisible(bool)</slot>
   <hints>
    <hint type="sourcelabel">
     <x>63</x>
     <y>37</y>
    </hint>
    <hint type="destinationlabel">
     <x>85</x>
     <y>89</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>
mbsetup/packages/cm.xinhan.mbc/meta/targetwidget.ui
New file
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>TargetWidget</class>
 <widget class="QWidget" name="TargetWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>491</width>
    <height>190</height>
   </rect>
  </property>
  <property name="sizePolicy">
   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
    <horstretch>0</horstretch>
    <verstretch>0</verstretch>
   </sizepolicy>
  </property>
  <property name="minimumSize">
   <size>
    <width>491</width>
    <height>190</height>
   </size>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <widget class="QLabel" name="description">
     <property name="text">
      <string>选择目录</string>
     </property>
    </widget>
   </item>
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout">
     <item>
      <widget class="QLineEdit" name="targetDirectory">
       <property name="readOnly">
        <bool>true</bool>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QToolButton" name="targetChooser">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="minimumSize">
        <size>
         <width>0</width>
         <height>0</height>
        </size>
       </property>
       <property name="text">
        <string>...</string>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item>
    <widget class="QLabel" name="warning">
     <property name="enabled">
      <bool>true</bool>
     </property>
     <property name="text">
      <string></string>
     </property>
    </widget>
   </item>
   <item>
    <spacer name="verticalSpacer">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>122</height>
      </size>
     </property>
    </spacer>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>
mbsetup/resources/icon.png
mbsetup/resources/license.txt
New file
@@ -0,0 +1,27 @@
<p>用户许可协议</p>
<p>重要须知-请认真阅读:本《用户许可协议》(以下简称《协议》)是您(个人或单一机构团体)与杭州开合信息技术有限公司之间有关当前正在安装的软件产品的法律协议。本“软件产品”包括计算机软件、相关媒体及任何印刷材料,并可能包括的电子文件(以下称“软件产品”或“软件”)。您一旦安装、复制或以其它方式使用“软件产品”,即表示您接受本《协议》各项条件的约束。</p>
<p>1、软件产品许可协议
    本“软件产品”受著作权法及国际条约款和其它知识产权法及条约的保护。本“软件产品”只是提供使用许可协议,而非出售。
    许可协议的授予。本《协议》授予您下列权利:
 *储存/网络用途。您可在储存装置(例如网络服务器)上储存或安装“软件产品”的一个副本,其目的只是例您内部网络上的其它计算机能够安装或运行“软件产品”;然而,您必须为每台从储存装置安装或运行“软件产品”的计算机都购买并专门配备一份“软件产品”许可协议。一份“软件产品”许可协议不得供不同的计算机共同或同时使用。
 *许可协议。如您是在杭州开合信息技术有限公司许可之下获得该产品的多个许可证,则您可按许可数量,复制本“软件产品”,并可按上述方式,使用每份副本。</p>
<p>2、其它权利和限制说明。
 * 对反相工程(Reverse Egnineering)、反编译(Decompilation)、反汇编(Disassembly)的限制。您不得对本“软件产品”进行反相工程(Reverse Engineer)、反编译(Decompile)或反汇编(Disassemble),但如相关法律明文禁止上述限制,则不在此限。
 * 出租:不得出借,出租或租赁本“软件产品”。
 *软件的转让:您可永久转让您在本协议下的所有权利,条件是您不得保留副本,并将本“软件产品”全部转让(包括所有组成部分、媒体和印刷材料、任何更新版本以及本《协议》),且接受人须接受本《协议》的各项条件。如本“软件产品”属于更新版本,则任何转让必须包括本“软件产品”以前的所有版本。
 * 终止:如您未遵守《协议》的各项条件,在不损害其它权利的情况下,杭州开合信息技术有限公司可将本《协议》终止。如发生此种情况,则您必须销毁“软件”及其各部分的所有副本。</p>
<p>3、更新版本。
    如本“软件产品”属杭州开合信息技术有限公司所有,则您只可根据本《协议》,享受升级服务。</p>
<p>4、著作权。
    本“软件产品”(包括但不限于本“软件产品”中所含的任何图象、照片、动画、录象、录音、音乐、文字和附加程序、随附的印刷材料、及本“软件产品”的任何副本的产权和著作权,均由杭州开合信息技术有限公司拥有。本“软件产品”受著作权法及国际条约条款保护。因此,您必须将本“软件产品”与任何拥有著作权的资料同样对待,但下列情况除外,即您可(a)只为备份或存档目的的制作一份本“软件产品”的不置可否,或(b)在一台单一计算机上安装本“软件产品”,但条件是您只为备份或存档目的保留软件原件。</p>
<p>5、多重媒体软件。
    您可以用多种媒体接收“软件产品”,无论您自何种类型或大小的媒体接收,您只可使用您的计算机适用的一种媒体。您不得在另一台计算机上使用或安装另一媒体。除非(按上文规定)永久转让本“软件产品”,否则您不得将另一媒体出借、出租或租赁给另一用户。</p>
<p>6、间接损害不负责赔偿责任
    在相关法律所允许的最大范围内,杭州开合信息技术有限公司或其供应商因使用或不能使用本软件产品所发生的损害(包括,但不限于营业利益的损失,营业中断,商业信息遗失,数据或代码损坏)不负责赔偿责任,即使是杭州开合信息技术有限公司事先被告知该损害发生的可能性。不论任何情况,杭州开合信息技术有限公司就任何条款应负的责任总额,以您就该"软件产品"所实际已支付的价款为限。</p>
mbsetup/resources/res.qrc
New file
@@ -0,0 +1,6 @@
<RCC>
    <qresource prefix="/">
        <file>icon.png</file>
        <file>license.txt</file>
    </qresource>
</RCC>
setup.pro
New file
@@ -0,0 +1,5 @@
TEMPLATE = subdirs
SUBDIRS += \
  mbsetup