39 static QString project_builtin_regx()
45 for(
int i = 0;
i < builtin_exts.size(); ++
i) {
70 v[
"TEMPLATE_ASSIGN"] += templ;
74 QString builtin_regex = project_builtin_regx();
78 v[
"INCLUDEPATH"] +=
".";
82 for(
int i = 0;
i < dirs.count(); ++
i) {
84 bool add_depend =
false;
94 for (
int i = 0;
i <
files.count();
i++)
97 regex = builtin_regex;
120 for (
int i = 0;
i < entries.count();
i++)
124 for(
int i = 0;
i < (int)
files.count();
i++) {
142 knownDirs.prepend(
".");
144 for(
int i = 0;
i < knownDirs.count(); ++
i) {
157 for(
int i = 0;
i < (int)profiles.count();
i++) {
171 for(
int i = 0;
i < (int)dirs.count();
i++) {
174 knownDirs.append(nd);
188 for(
int i = 0;
i < (int)
files.count();
i++) {
198 for(
int i = 0;
i < (int)profiles.count();
i++) {
208 knownDirs.append(newdir);
221 for(
int i = 0;
i <
d.size(); ++
i)
227 bool no_qt_files =
true;
228 static const char *srcs[] = {
"SOURCES",
"YACCSOURCES",
"LEXSOURCES",
"FORMS",
nullptr };
229 for (
int i = 0; srcs[
i];
i++) {
233 for(
int i = 0;
i <
l.size(); ++
i) {
236 for(
int dep_it = 0; dep_it < tmp.size(); ++dep_it) {
238 dep = fixPathToQmake(dep);
242 for(
int inc_it = 0; inc_it < deplist.
size(); ++inc_it) {
245 v[
"INCLUDEPATH"] += inc.
real();
269 addConfig(
"lex_included");
287 for(
int i = 0;
i < var_out.
size(); ++
i) {
289 if(
v.startsWith(
"GENERATED_")) {
295 var_out <<
"SOURCES";
296 var_out <<
"HEADERS";
305 for(
int i = 0;
i < var_out.
size(); ++
i) {
323 t <<
"######################################################################" <<
Qt::endl;
325 t <<
"######################################################################" <<
Qt::endl <<
Qt::endl;
328 t << getWritableVar(
"TEMPLATE_ASSIGN",
false);
331 << getWritableVar(
"SUBDIRS");
335 if (ofn.
isEmpty() || ofn ==
"-")
339 t << getWritableVar(
"TARGET_ASSIGN")
340 << getWritableVar(
"CONFIG",
false)
341 << getWritableVar(
"CONFIG_REMOVE",
false)
342 << getWritableVar(
"INCLUDEPATH") <<
Qt::endl;
344 t <<
"# You can make your code fail to compile if you use deprecated APIs.\n"
345 "# In order to do so, uncomment the following line.\n"
346 "# Please consult the documentation of the deprecated API in order to know\n"
347 "# how to port your code away from it.\n"
348 "# You can also select to disable deprecated APIs only up to a certain version of Qt.\n"
349 "#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0\n\n";
351 t <<
"# Input" <<
"\n";
352 t << getWritableVar(
"HEADERS")
353 << getWritableVar(
"FORMS")
354 << getWritableVar(
"LEXSOURCES")
355 << getWritableVar(
"YACCSOURCES")
356 << getWritableVar(
"SOURCES")
357 << getWritableVar(
"RESOURCES")
358 << getWritableVar(
"TRANSLATIONS");
366 ProjectGenerator::addConfig(
const QString &cfg,
bool add)
370 where =
"CONFIG_REMOVE";
415 where =
"LEXSOURCES";
417 where =
"YACCSOURCES";
418 else if(
file.endsWith(
".ts") ||
file.endsWith(
".xlf"))
419 where =
"TRANSLATIONS";
420 else if(
file.endsWith(
".qrc"))
435 ProjectGenerator::getWritableVar(
const char *vk,
bool)
444 if ((*it).contains(
' ') && !(*it).startsWith(
' '))
445 *
it =
"\"" + *
it +
"\"";
449 if(
v.endsWith(
"_REMOVE"))
450 ret =
v.left(
v.length() - 7) +
" -= ";
451 else if(
v.endsWith(
"_ASSIGN"))
452 ret =
v.left(
v.length() - 7) +
" = ";
458 for(
int i = 0;
i <
ret.length();
i++)
462 return ret + join +
"\n";
479 ProjectGenerator::fixPathToQmake(
const QString &
file)
small capitals from c petite p scientific i
[1]
bool exists(QString file) const
QFileInfo fileInfo(QString file) const
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor forShell)
QString fileFixify(const QString &file, FileFixifyTypes fix=FileFixifyDefault, bool canon=true) const
virtual bool openOutput(QFile &, const QString &build) const
QString toQString() const
QString join(const ProString &sep) const
bool contains(const ProString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool openOutput(QFile &, const QString &) const override
bool writeMakefile(QTextStream &) override
static QDateTime currentDateTime()
The QDir class provides access to directory structures and their contents.
QStringList entryList(Filters filters=NoFilter, SortFlags sort=NoSort) const
static QStringList nameFiltersFromString(const QString &nameFilter)
The QFile class provides an interface for reading from and writing to files.
void setFileName(const QString &name)
QString fileName() const override
The QFileInfo class provides system-independent file information.
QString absoluteFilePath() const
QString completeBaseName() const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
const_iterator ConstIterator
const QString & local() const
const QString & real() const
VisitReturn evaluateConfigFeatures()
ProString first(const ProKey &variableName) const
ProStringList & values(const ProKey &v)
VisitReturn evaluateFeatureFile(const QString &fileName, bool silent=false)
const ProValueMap & variables() const
QStringList dependencies(const QString &file)
void addSourceFiles(const ProStringList &, uchar seek, SourceFileType type=TYPE_C)
void setDependencyPaths(const QList< QMakeLocalFileName > &)
The QRegularExpression class provides pattern matching using regular expressions.
The QString class provides a Unicode character string.
QString right(qsizetype n) const
QString & prepend(QChar c)
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QString section(QChar sep, qsizetype start, qsizetype end=-1, SectionFlags flags=SectionDefault) const
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QString left(qsizetype n) const
The QStringList class provides a list of strings.
The QTextStream class provides a convenient interface for reading and writing text.
typename C::iterator iterator
QTextStream & endl(QTextStream &stream)
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool endsWith(QByteArrayView haystack, QByteArrayView needle) noexcept
QList< QString > QStringList
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat GLfloat h
GLsizei const GLchar *const * path
GLenum GLenum GLenum input
QFileInfo fi("c:/temp/foo")
[newstuff]
QFile defaults(defaultsPath)
static QStringList project_dirs
static QMakeGlobals * globals
static QStringList cpp_ext
static QString output_dir
static bool postProcessProject(QMakeProject *)
void build(const QString &name)
QString toQString(const T &t)
void add(int &result, const int &sum)