comparison tools/drcc/main.cpp @ 61:a2871e6b8b15

drcc: automatic initialization of resources with program start (disabled with option -no-static-initialize) demos: resources fixes. examples: resources fixes.
author SokoL_SD
date Tue, 19 May 2009 10:48:30 +0000
parents 7be693ea7070
children
comparison
equal deleted inserted replaced
60:fbf7881c8b0f 61:a2871e6b8b15
55 fprintf(stderr, "Qt resource compiler\n"); 55 fprintf(stderr, "Qt resource compiler\n");
56 if (!error.isEmpty()) 56 if (!error.isEmpty())
57 fprintf(stderr, "%s: %s\n", qPrintable(argv0), qPrintable(error)); 57 fprintf(stderr, "%s: %s\n", qPrintable(argv0), qPrintable(error));
58 fprintf(stderr, "Usage: %s [options] <inputs>\n\n" 58 fprintf(stderr, "Usage: %s [options] <inputs>\n\n"
59 "Options:\n" 59 "Options:\n"
60 " -o file write output to file rather than stdout\n" 60 " -o file write output to file rather than stdout\n"
61 " -name name create an external initialization function with name\n" 61 " -name name create an external initialization function with name\n"
62 " -threshold level threshold to consider compressing files\n" 62 " -threshold level threshold to consider compressing files\n"
63 " -compress level compress input files by level\n" 63 " -compress level compress input files by level\n"
64 " -root path prefix resource access path with root path\n" 64 " -root path prefix resource access path with root path\n"
65 " -no-compress disable all compression\n" 65 " -no-compress disable all compression\n"
66 " -binary output a binary file for use as a dynamic resource\n" 66 " -no-static-initialize disable automatic initialization of resources with program start\n"
67 " -namespace turn off namespace macros\n" 67 " -binary output a binary file for use as a dynamic resource\n"
68 " -project Output a resource file containing all\n" 68 " -namespace turn off namespace macros\n"
69 " files from the current directory\n" 69 " -project Output a resource file containing all\n"
70 " -version display version\n" 70 " files from the current directory\n"
71 " -help display this information\n", 71 " -version display version\n"
72 " -help display this information\n",
72 qPrintable(argv0)); 73 qPrintable(argv0));
73 } 74 }
74 75
75 void dumpRecursive(const QDir &dir, QTextStream &out) 76 void dumpRecursive(const QDir &dir, QTextStream &out)
76 { 77 {
188 return 1; 189 return 1;
189 } else if (opt == QLatin1String("-help") || opt == QLatin1String("-h")) { 190 } else if (opt == QLatin1String("-help") || opt == QLatin1String("-h")) {
190 helpRequested = true; 191 helpRequested = true;
191 } else if (opt == QLatin1String("-no-compress")) { 192 } else if (opt == QLatin1String("-no-compress")) {
192 library.setCompressLevel(-2); 193 library.setCompressLevel(-2);
194 } else if (opt == QLatin1String("-no-static-initialize")) {
195 library.setStaticInitialize(false);
193 } else if (opt == QLatin1String("-project")) { 196 } else if (opt == QLatin1String("-project")) {
194 projectRequested = true; 197 projectRequested = true;
195 } else { 198 } else {
196 errorMsg = QString::fromLatin1("Unknown option: '%1'").arg(args[i]); 199 errorMsg = QString::fromLatin1("Unknown option: '%1'").arg(args[i]);
197 } 200 }