ACMX 2.136.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
acmxvk-source-manifest-cli.cpp
Go to the documentation of this file.
2
3#include <QCommandLineOption>
4#include <QCommandLineParser>
5#include <QCoreApplication>
6#include <QTextStream>
7
8int main(int argc, char **argv) {
9 QCoreApplication application(argc, argv);
10 QCoreApplication::setApplicationName(
11 QStringLiteral("create_acmxvk_source_manifest"));
12 QCoreApplication::setApplicationVersion(QStringLiteral("1.0"));
13
14 QCommandLineParser parser;
15 parser.setApplicationDescription(
16 QStringLiteral("Create an ACMXVK source library.json from Vulkan GLSL "
17 "fragment and compute sources."));
18 parser.addHelpOption();
19 parser.addVersionOption();
20 const QCommandLineOption rootOption(
21 QStringList{QStringLiteral("r"), QStringLiteral("root")},
22 QStringLiteral("Shader source directory to scan recursively."),
23 QStringLiteral("directory"));
24 const QCommandLineOption outputOption(
25 QStringList{QStringLiteral("o"), QStringLiteral("output")},
26 QStringLiteral("Manifest path (defaults to ROOT/library.json)."),
27 QStringLiteral("file"));
28 parser.addOption(rootOption);
29 parser.addOption(outputOption);
30 parser.process(application);
31
32 if (!parser.isSet(rootOption))
33 parser.showHelp(1);
34
36 QString error;
38 parser.value(rootOption), parser.value(outputOption), result, error)) {
39 QTextStream(stderr) << "Error: " << error << '\n';
40 return 1;
41 }
42
43 QTextStream(stdout)
44 << "Wrote " << result.outputPath << '\n'
45 << result.fragmentCount << " fragment shader(s), "
46 << result.computeCount << " compute shader(s), "
47 << result.customUniformCount << " custom-uniform slot(s)\n";
48 return 0;
49}
int main(int argc, char **argv)
Application entry point.
bool create_acmxvk_source_manifest(const QString &rootDirectory, const QString &outputPath, AcmxvkSourceManifestResult &result, QString &error)
Scan an ACMXVK source tree and atomically generate its library.json.