Exemplo n.º 1
0
void cupdatenetlib::procUpdate(){
	
	if (_wmkdir(szUpdfilesPath) < 0 && errno == EEXIST){
        //if(szaLists.GetCount() <= 0){
        //    downloadList() ;
        //}
        if(m_UpdateFileArray.GetCount() <= 0){
            downloadList() ;
        }
		if ( m_UpdateFileArray.GetCount() >0 ){
//			SVP_LogMsg( _T("GOT UPDATE LIST: "));
//			SVP_LogMsg( svpToolBox.Implode(_T("\t") , &szaLists) );
            SVP_LogMsg( _T("DOWNLOAD UPDATE "));
            downloadFiles();
			//int i = 0;
			//while(  downloadFiles() != 0 ){
			//	i++;
			//	SVP_LogMsg( _T("DOWNLOAD UPDATE "));
			//	if(i > 3) break;
			//}
			SVP_LogMsg( _T("REAL UPDATE") );
			tryRealUpdate();
		}
	}else{
		SVP_LogMsg( _T("UPD dir not exist and write able: "));
	}
	bSVPCU_DONE = 1;
}
Exemplo n.º 2
0
// Fonction pricipale
bool FilesDownload::run()
{

    downloadList();

    return true;
}
Exemplo n.º 3
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QCoreApplication::setOrganizationName("Bending software");
    QCoreApplication::setApplicationName("Beta addon downloader");

    _model = new BamModel;
    ui->addonList->setModel(_model);
    downloadList();

    connect(ui->actionSettings, SIGNAL(triggered()),
            this, SLOT(openSettings()));
    connect(ui->runGame, SIGNAL(clicked()),
            this, SLOT(runGame()));
}
Exemplo n.º 4
0
void ListUpdater::finish(DownloadOperation operation) {
    if (operation == DOWNLOAD_HASH) {
        if (compareHashes()) {
            // No new updates
            removeServerHashFile();
            emit finished(NO_UPDATE);
            return ;
        }

        downloadList();

    } else if (operation == DOWNLOAD_LIST) {
        removeOldFiles();
        renameNewFiles();
        emit finished(UPDATE);
    }

}
Exemplo n.º 5
0
void MainWindow::openSettings(){
    Settings *sWindow = new Settings(this);
    sWindow->show();
    connect(sWindow, SIGNAL(accepted()),
            this, SLOT(downloadList()));
}