mirror of
https://github.com/chris2511/xca.git
synced 2026-09-13 18:46:25 +05:00
Why? - QT will switch from qmake to cmake sooner or later. - autotools are good for unix-ish systems, cmake also for macOS and Xcode as well as Windows and VS-code - Cross compiling the windows-binaries on linux is not very helpful to attract windows-centric developers. Also drop qmake's xca.pro Generate man-page and sphinx sources of commandline arguments during build by executing xca (xcadoc.cpp). Generating Version-patchlevel and git hash is now also OS independent.
31 lines
578 B
C++
31 lines
578 B
C++
#include <iostream>
|
|
#include <QString>
|
|
#include <QFile>
|
|
|
|
#include "arguments.h"
|
|
|
|
using namespace std;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
if (argc < 2) {
|
|
cerr << "Need type argument: <man|rst|completion>" << endl;
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
QString doc = arguments::doc(argv[1]);
|
|
if (doc.isEmpty()) {
|
|
cerr << "Doc was empty: " << argv[1] << endl;
|
|
return EXIT_FAILURE;
|
|
}
|
|
if (argc == 2) {
|
|
cout << doc.toUtf8().constData() << endl;
|
|
return EXIT_SUCCESS;
|
|
}
|
|
QFile f(argv[2]);
|
|
f.open(QIODevice::WriteOnly);
|
|
f.write(doc.toUtf8());
|
|
f.close();
|
|
return EXIT_SUCCESS;
|
|
}
|