[Kde-cygwin-cvs] CVS: tools/installer/gui gui.pro,NONE,1.1 main.cpp,NONE,1.1
Status: Inactive
Brought to you by:
habacker
From: Ralf H. <hab...@us...> - 2006-01-22 18:40:12
|
Update of /cvsroot/kde-cygwin/tools/installer/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7851/installer/gui Added Files: gui.pro main.cpp Log Message: version 0.5.1 --- NEW FILE: gui.pro --- TARGET=kde-installer-gui TEMPLATE=app HEADERS = ..\shared\package.h \ ..\shared\packagelist.h \ ..\shared\downloader.h SOURCES = ..\shared\package.cpp \ ..\shared\packagelist.cpp \ ..\shared\downloader.cpp \ main.cpp QT += network CONFIG += debug DEFINES += USE_GUI INCLUDEPATH += ..\shared DESTDIR = ..\bin # install target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/simplewizard sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/simplewizard INSTALLS += target sources --- NEW FILE: main.cpp --- /**************************************************************************** ** ** ****************************************************************************/ #include <QApplication> #include "downloader.h" #include "packagelist.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); // 1. test // Downloader downloader(/*wait=*/ true); // downloader.start("http://sourceforge.net/project/showfiles.php?group_id=23617","packages.html"); // the following does not work for unknown reasons // app.connect(&downloader, SIGNAL(done),&app, SLOT(quit)); // 2. scenario download package files Downloader downloader(/*wait=*/ true); downloader.start("http://sourceforge.net/project/showfiles.php?group_id=23617","packages.html"); PackageList packageList; if (!packageList.readFromHTMLFile("packages.html")) return 1; packageList.listPackages("Package List"); if (!packageList.writeToFile("packages.txt")) return 1; QFile::remove("packages.html"); QStringList list = packageList.getPackageFiles("unzip"); for (int i = 0; i < list.size(); ++i) { qDebug() << list.at(i); downloader.start(list.at(i)); } // return app.exec(); } |