コード例 #1
0
void SelectiveInstallWidget::continueInstall(bool error)
{
    qDebug() << "[SelectiveInstallWidget] continuing install with stage" << m_installStage;
    if(error) {
        qDebug() << "[SelectiveInstallWidget] Last part returned error.";
        m_logger->setFinished();
        m_installStage = 7;
    }
    m_installStage++;
    switch(m_installStage) {
        case 0: qDebug() << "[SelectiveInstallWidget] Something wrong!"; break;
        case 1: installBootloader(); break;
        case 2: installRockbox(); break;
        case 3: installFonts(); break;
        case 4: installThemes(); break;
        case 5: installGamefiles(); break;
        case 6: installBootloaderPost(); break;
        default: break;
    }

    if(m_installStage > 6) {
        qDebug() << "[SelectiveInstallWidget] All install stages done.";
        m_logger->setFinished();
        // check if Rockbox is installed by looking after rockbox-info.txt.
        // If installed uncheck bootloader installation.
        RockboxInfo info(m_mountpoint);
        ui.bootloaderCheckbox->setChecked(!info.success());
    }
}
コード例 #2
0
ファイル: rbutilqt.cpp プロジェクト: Megaco/rockbox
bool RbUtilQt::smallInstallInner()
{
    QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
    // show dialog with error if mount point is wrong
    if(!QFileInfo(mountpoint).isDir()) {
        logger->addItem(tr("Mount point is wrong!"),LOGERROR);
        logger->setFinished();
        return true;
    }
    // Bootloader
    if(RbSettings::value(RbSettings::CurBootloaderMethod) != "none")
    {
        m_error = false;
        m_installed = false;
        m_auto = true;
        if(!installBootloaderAuto()) {
            logger->setFinished();
            return true;
        }
        else
        {
            // wait for boot loader installation finished
            while(!m_installed)
                QApplication::processEvents();
        }
        m_auto = false;
        if(m_error) return true;
        logger->setRunning();
    }

    // Rockbox
    m_error = false;
    m_installed = false;
    if(!installAuto())
        return true;
    else
    {
       // wait for installation finished
       while(!m_installed)
          QApplication::processEvents();
    }

    installBootloaderPost(false);
    return false;
}