Files
WebODF/programs/qtjsruntime/qtjsruntime.cpp
T
Jos van den Oever 9cf1318458 Simplify Qt based executables.
Zip implementation is no longer in C++ but in JavaScript. Runtime customization is now shared between the two Qt executables.
2011-07-26 13:23:46 +02:00

21 lines
673 B
C++

/**
* Small executable that loads a javascript or html page from local a URI.
* If the URI ends in .js it will be run in QtScript engine, otherwise, it will
* be assumed to be a webpage that will be opened in
*/
#include "pagerunner.h"
#include <QtGui/QApplication>
int
main(int argc, char** argv) {
if (argc < 2) {
QTextStream err(stderr);
err << "Usage: " << argv[0] << " [--export-pdf pdffile] "
"[--export-png pngfile] html/javascripfile [arguments]\n";
return 1;
}
QApplication app(argc, argv);
app.setApplicationName(argv[0]);
PageRunner p(QCoreApplication::arguments().mid(1));
return app.exec();
}