1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
23 #include "Thread_Initialization.h"
26 #define LAMEXP_INC_TOOLS 1
28 #include "LockedFile.h"
29 #include "Tool_Abstract.h"
32 #include <MUtils/Global.h>
33 #include <MUtils/OSSupport.h>
34 #include <MUtils/Translation.h>
35 #include <MUtils/Exception.h>
39 #include <QCoreApplication>
44 #include <QTextStream>
46 #include <QThreadPool>
49 #include <QElapsedTimer>
53 #define PRINT_CPU_TYPE(X) case X: qDebug("Selected CPU is: " #X)
54 #define MAKE_REGEXP(STR) (((STR) && ((STR)[0])) ? QRegExp((STR)) : QRegExp())
57 static const double g_allowedExtractDelay
= 12.0;
58 static const size_t BUFF_SIZE
= 512;
59 static const size_t EXPECTED_TOOL_COUNT
= 28;
61 /* number of CPU cores -> number of threads */
62 static unsigned int cores2threads(const unsigned int cores
)
64 static const size_t LUT_LEN
= 4;
68 const unsigned int upperBound
;
69 const double coeffs
[4];
73 { 4, { -0.052695810565, 0.158087431694, 4.982841530055, -1.088233151184 } },
74 { 8, { 0.042431693989, -0.983442622951, 9.548961748634, -7.176393442623 } },
75 { 12, { -0.006277322404, 0.185573770492, 0.196830601093, 17.762622950820 } },
76 { 32, { 0.000673497268, -0.064655737705, 3.199584699454, 5.751606557377 } }
80 while((cores
> LUT
[index
].upperBound
) && (index
< (LUT_LEN
-1))) index
++;
82 const double x
= qBound(1.0, double(cores
), double(LUT
[LUT_LEN
-1].upperBound
));
83 const double y
= (LUT
[index
].coeffs
[0] * pow(x
, 3.0)) + (LUT
[index
].coeffs
[1] * pow(x
, 2.0)) + (LUT
[index
].coeffs
[2] * x
) + LUT
[index
].coeffs
[3];
85 return qRound(abs(y
));
88 ////////////////////////////////////////////////////////////
90 ////////////////////////////////////////////////////////////
92 class BaseTask
: public QRunnable
103 static void clearFlags(QMutexLocker
&lock
= QMutexLocker(&s_mutex
))
106 s_errMsg
[0] = char(0);
109 static bool getExcept(void)
112 QMutexLocker
lock(&s_mutex
);
117 static bool getErrMsg(char *buffer
, const size_t buffSize
)
119 QMutexLocker
lock(&s_mutex
);
122 strncpy_s(buffer
, BUFF_SIZE
, s_errMsg
, _TRUNCATE
);
129 virtual void taskMain(void) = 0;
135 if(!getExcept()) taskMain();
137 catch(const std::exception
&e
)
139 QMutexLocker
lock(&s_mutex
);
143 strncpy_s(s_errMsg
, BUFF_SIZE
, e
.what(), _TRUNCATE
);
146 qWarning("OptionalInitTask exception error:\n%s\n\n", e
.what());
150 QMutexLocker
lock(&s_mutex
);
154 strncpy_s(s_errMsg
, BUFF_SIZE
, "Unknown exception error!", _TRUNCATE
);
157 qWarning("OptionalInitTask encountered an unknown exception!");
161 static volatile bool s_bExcept
;
162 static QMutex s_mutex
;
163 static char s_errMsg
[BUFF_SIZE
];
166 QMutex
BaseTask::s_mutex
;
167 char BaseTask::s_errMsg
[BUFF_SIZE
] = {'\0'};
168 volatile bool BaseTask::s_bExcept
= false;
170 ////////////////////////////////////////////////////////////
171 // ExtractorTask class
172 ////////////////////////////////////////////////////////////
174 class ExtractorTask
: public BaseTask
177 ExtractorTask(QResource
*const toolResource
, const QDir
&appDir
, const QString
&toolName
, const QByteArray
&toolHash
, const unsigned int toolVersion
, const QString
&toolTag
)
180 m_toolName(toolName
),
181 m_toolHash(toolHash
),
182 m_toolVersion(toolVersion
),
184 m_toolResource(toolResource
)
193 static bool getCustom(void)
196 QMutexLocker
lock(&s_mutex
);
201 static void clearFlags(void)
203 QMutexLocker
lock(&s_mutex
);
205 BaseTask::clearFlags(lock
);
211 LockedFile
*lockedFile
= NULL
;
212 unsigned int version
= m_toolVersion
;
214 QFileInfo
toolFileInfo(m_toolName
);
215 const QString toolShortName
= QString("%1.%2").arg(toolFileInfo
.baseName().toLower(), toolFileInfo
.suffix().toLower());
217 QFileInfo
customTool(QString("%1/tools/%2/%3").arg(m_appDir
.canonicalPath(), QString::number(lamexp_version_build()), toolShortName
));
218 if(customTool
.exists() && customTool
.isFile())
220 qDebug("Setting up file: %s <- %s", toolShortName
.toLatin1().constData(), m_appDir
.relativeFilePath(customTool
.canonicalFilePath()).toLatin1().constData());
221 lockedFile
= new LockedFile(customTool
.canonicalFilePath()); version
= UINT_MAX
; s_bCustom
= true;
225 qDebug("Extracting file: %s -> %s", m_toolName
.toLatin1().constData(), toolShortName
.toLatin1().constData());
226 lockedFile
= new LockedFile(m_toolResource
.data(), QString("%1/lxp_%2").arg(MUtils::temp_folder(), toolShortName
), m_toolHash
);
231 lamexp_tools_register(toolShortName
, lockedFile
, version
, m_toolTag
);
236 QScopedPointer
<QResource
> m_toolResource
;
238 const QString m_toolName
;
239 const QByteArray m_toolHash
;
240 const unsigned int m_toolVersion
;
241 const QString m_toolTag
;
243 static volatile bool s_bCustom
;
246 volatile bool ExtractorTask::s_bCustom
= false;
248 ////////////////////////////////////////////////////////////
249 // InitAacEncTask class
250 ////////////////////////////////////////////////////////////
252 class InitAacEncTask
: public BaseTask
255 InitAacEncTask(const aac_encoder_t
*const encoder_info
)
257 m_encoder_info(encoder_info
)
261 ~InitAacEncTask(void)
268 initAacEncImpl(m_encoder_info
->toolName
, m_encoder_info
->fileNames
, m_encoder_info
->toolMinVersion
, m_encoder_info
->verDigits
, m_encoder_info
->verShift
, m_encoder_info
->verStr
, MAKE_REGEXP(m_encoder_info
->regExpVer
), MAKE_REGEXP(m_encoder_info
->regExpSig
));
271 static void initAacEncImpl(const char *const toolName
, const char *const fileNames
[], const quint32
&toolMinVersion
, const quint32
&verDigits
, const quint32
&verShift
, const char *const verStr
, QRegExp
®ExpVer
, QRegExp
®ExpSig
= QRegExp());
274 const aac_encoder_t
*const m_encoder_info
;
277 ////////////////////////////////////////////////////////////
279 ////////////////////////////////////////////////////////////
281 InitializationThread::InitializationThread(const MUtils::CPUFetaures::cpu_info_t
&cpuFeatures
)
284 m_slowIndicator(false)
287 memcpy(&m_cpuFeatures
, &cpuFeatures
, sizeof(MUtils::CPUFetaures::cpu_info_t
));
290 ////////////////////////////////////////////////////////////
292 ////////////////////////////////////////////////////////////
294 void InitializationThread::run(void)
300 catch(const std::exception
&error
)
302 MUTILS_PRINT_ERROR("\nGURU MEDITATION !!!\n\nException error:\n%s\n", error
.what());
303 MUtils::OS::fatal_exit(L
"Unhandeled C++ exception error, application will exit!");
307 MUTILS_PRINT_ERROR("\nGURU MEDITATION !!!\n\nUnknown exception error!\n");
308 MUtils::OS::fatal_exit(L
"Unhandeled C++ exception error, application will exit!");
312 double InitializationThread::doInit(const size_t threadCount
)
318 unsigned int cpuSupport
= 0;
319 if((m_cpuFeatures
.features
& MUtils::CPUFetaures::FLAG_SSE
) && (m_cpuFeatures
.features
& MUtils::CPUFetaures::FLAG_SSE2
) && m_cpuFeatures
.intel
)
321 cpuSupport
= m_cpuFeatures
.x64
? CPU_TYPE_X64_SSE
: CPU_TYPE_X86_SSE
;
325 cpuSupport
= m_cpuFeatures
.x64
? CPU_TYPE_X64_GEN
: CPU_TYPE_X86_GEN
;
328 //Hack to disable x64 on Wine, as x64 binaries won't run under Wine (tested with Wine 1.4 under Ubuntu 12.04 x64)
329 if(cpuSupport
& CPU_TYPE_X64_ALL
)
331 if(MUtils::OS::running_on_wine())
333 qWarning("Running under Wine on a 64-Bit system. Going to disable all x64 support!\n");
334 cpuSupport
= (cpuSupport
== CPU_TYPE_X64_SSE
) ? CPU_TYPE_X86_SSE
: CPU_TYPE_X86_GEN
;
338 //Print selected CPU type
341 PRINT_CPU_TYPE(CPU_TYPE_X86_GEN
); break;
342 PRINT_CPU_TYPE(CPU_TYPE_X86_SSE
); break;
343 PRINT_CPU_TYPE(CPU_TYPE_X64_GEN
); break;
344 PRINT_CPU_TYPE(CPU_TYPE_X64_SSE
); break;
345 default: MUTILS_THROW("CPU support undefined!");
349 QQueue
<QString
> queueToolName
;
350 QQueue
<QString
> queueChecksum
;
351 QQueue
<QString
> queueVersInfo
;
352 QQueue
<unsigned int> queueVersions
;
353 QQueue
<unsigned int> queueCpuTypes
;
356 for(int i
= 0; true; i
++)
358 if(!(g_lamexp_tools
[i
].pcName
|| g_lamexp_tools
[i
].pcHash
|| g_lamexp_tools
[i
].uiVersion
))
362 else if(g_lamexp_tools
[i
].pcName
&& g_lamexp_tools
[i
].pcHash
&& g_lamexp_tools
[i
].uiVersion
)
364 queueToolName
.enqueue(QString::fromLatin1(g_lamexp_tools
[i
].pcName
));
365 queueChecksum
.enqueue(QString::fromLatin1(g_lamexp_tools
[i
].pcHash
));
366 queueVersInfo
.enqueue(QString::fromLatin1(g_lamexp_tools
[i
].pcVersTag
));
367 queueCpuTypes
.enqueue(g_lamexp_tools
[i
].uiCpuType
);
368 queueVersions
.enqueue(g_lamexp_tools
[i
].uiVersion
);
372 qFatal("Inconsistent checksum data detected. Take care!");
376 QDir appDir
= QDir(QCoreApplication::applicationDirPath()).canonicalPath();
378 QScopedPointer
<QThreadPool
> pool(new QThreadPool());
379 pool
->setMaxThreadCount((threadCount
> 0) ? threadCount
: qBound(2U, cores2threads(m_cpuFeatures
.count
), EXPECTED_TOOL_COUNT
));
380 /* qWarning("Using %u threads for extraction.", pool->maxThreadCount()); */
382 LockedFile::selfTest();
383 ExtractorTask::clearFlags();
386 QElapsedTimer timeExtractStart
;
387 timeExtractStart
.start();
390 while(!(queueToolName
.isEmpty() || queueChecksum
.isEmpty() || queueVersInfo
.isEmpty() || queueCpuTypes
.isEmpty() || queueVersions
.isEmpty()))
392 const QString toolName
= queueToolName
.dequeue();
393 const QString checksum
= queueChecksum
.dequeue();
394 const QString versInfo
= queueVersInfo
.dequeue();
395 const unsigned int cpuType
= queueCpuTypes
.dequeue();
396 const unsigned int version
= queueVersions
.dequeue();
398 const QByteArray
toolHash(checksum
.toLatin1());
399 if(toolHash
.size() != 96)
401 qFatal("The checksum for \"%s\" has an invalid size!", MUTILS_UTF8(toolName
));
405 QScopedPointer
<QResource
> resource(new QResource(QString(":/tools/%1").arg(toolName
)));
406 if(!(resource
->isValid() && resource
->data()))
408 qFatal("The resource for \"%s\" could not be found!", MUTILS_UTF8(toolName
));
412 if(cpuType
& cpuSupport
)
414 pool
->start(new ExtractorTask(resource
.take(), appDir
, toolName
, toolHash
, version
, versInfo
));
420 if(!(queueToolName
.isEmpty() && queueChecksum
.isEmpty() && queueVersInfo
.isEmpty() && queueCpuTypes
.isEmpty() && queueVersions
.isEmpty()))
422 qFatal("Checksum queues *not* empty fater verification completed. Take care!");
425 //Wait for extrator threads to finish
428 //Performance measure
429 const double delayExtract
= double(timeExtractStart
.elapsed()) / 1000.0;
430 timeExtractStart
.invalidate();
432 //Make sure all files were extracted correctly
433 if(ExtractorTask::getExcept())
435 char errorMsg
[BUFF_SIZE
];
436 if(ExtractorTask::getErrMsg(errorMsg
, BUFF_SIZE
))
438 qFatal("At least one of the required tools could not be initialized:\n%s", errorMsg
);
441 qFatal("At least one of the required tools could not be initialized!");
445 qDebug("All extracted.\n");
447 //Using any custom tools?
448 if(ExtractorTask::getCustom())
450 qWarning("Warning: Using custom tools, you might encounter unexpected problems!\n");
454 if(delayExtract
> g_allowedExtractDelay
)
456 m_slowIndicator
= true;
457 qWarning("Extracting tools took %.3f seconds -> probably slow realtime virus scanner.", delayExtract
);
458 qWarning("Please report performance problems to your anti-virus developer !!!\n");
462 qDebug("Extracting the tools took %.3f seconds (OK).\n", delayExtract
);
465 //Register all translations
468 //Look for AAC encoders
469 InitAacEncTask::clearFlags();
470 for(size_t i
= 0; g_lamexp_aacenc
[i
].toolName
; i
++)
472 pool
->start(new InitAacEncTask(&(g_lamexp_aacenc
[i
])));
476 //Make sure initialization finished correctly
477 if(InitAacEncTask::getExcept())
479 char errorMsg
[BUFF_SIZE
];
480 if(InitAacEncTask::getErrMsg(errorMsg
, BUFF_SIZE
))
482 qFatal("At least one optional component failed to initialize:\n%s", errorMsg
);
485 qFatal("At least one optional component failed to initialize!");
495 ////////////////////////////////////////////////////////////
496 // INTERNAL FUNCTIONS
497 ////////////////////////////////////////////////////////////
499 void InitializationThread::delay(void)
501 MUtils::OS::sleep_ms(333);
504 ////////////////////////////////////////////////////////////
505 // Translation Support
506 ////////////////////////////////////////////////////////////
508 void InitializationThread::initTranslations(void)
510 //Search for language files
511 const QDir
qmDirectory(":/localization");
512 const QStringList qmFiles
= qmDirectory
.entryList(QStringList() << "LameXP_??.qm", QDir::Files
, QDir::Name
);
514 //Make sure we found at least one translation
515 if(qmFiles
.count() < 1)
517 qFatal("Could not find any translation files!");
521 //Initialize variables
522 const QString
langResTemplate(":/localization/%1.txt");
523 QRegExp
langIdExp("^LameXP_(\\w\\w)\\.qm$", Qt::CaseInsensitive
);
525 //Add all available translations
526 for(QStringList::ConstIterator iter
= qmFiles
.constBegin(); iter
!= qmFiles
.constEnd(); iter
++)
528 const QString langFile
= qmDirectory
.absoluteFilePath(*iter
);
529 QString langId
, langName
;
530 unsigned int systemId
= 0, country
= 0;
532 if(QFileInfo(langFile
).isFile() && (langIdExp
.indexIn(*iter
) >= 0))
534 langId
= langIdExp
.cap(1).toLower();
535 QScopedPointer
<QResource
> langRes(new QResource(langResTemplate
.arg(*iter
)));
536 if(langRes
->isValid() && langRes
->size() > 0)
538 QByteArray data
= QByteArray::fromRawData(reinterpret_cast<const char*>(langRes
->data()), langRes
->size());
539 QTextStream
stream(&data
, QIODevice::ReadOnly
);
540 stream
.setAutoDetectUnicode(false); stream
.setCodec("UTF-8");
542 while(!(stream
.atEnd() || (stream
.status() != QTextStream::Ok
)))
544 QStringList langInfo
= stream
.readLine().simplified().split(",", QString::SkipEmptyParts
);
545 if(langInfo
.count() >= 3)
547 systemId
= langInfo
.at(0).trimmed().toUInt();
548 country
= langInfo
.at(1).trimmed().toUInt();
549 langName
= langInfo
.at(2).trimmed();
556 if(!(langId
.isEmpty() || langName
.isEmpty() || (systemId
== 0)))
558 if(MUtils::Translation::insert(langId
, langFile
, langName
, systemId
, country
))
560 qDebug("Registering translation: %s = %s (%u) [%u]", MUTILS_UTF8(*iter
), MUTILS_UTF8(langName
), systemId
, country
);
564 qWarning("Failed to register: %s", langFile
.toLatin1().constData());
569 qDebug("All registered.\n");
572 ////////////////////////////////////////////////////////////
573 // AAC Encoder Detection
574 ////////////////////////////////////////////////////////////
576 void InitAacEncTask::initAacEncImpl(const char *const toolName
, const char *const fileNames
[], const quint32
&toolMinVersion
, const quint32
&verDigits
, const quint32
&verShift
, const char *const verStr
, QRegExp
®ExpVer
, QRegExp
®ExpSig
)
578 static const size_t MAX_FILES
= 8;
579 const QString appPath
= QDir(QCoreApplication::applicationDirPath()).canonicalPath();
581 QFileInfoList fileInfo
;
582 for(size_t i
= 0; fileNames
[i
] && (fileInfo
.count() < MAX_FILES
); i
++)
584 fileInfo
.append(QFileInfo(QString("%1/%2").arg(appPath
, QString::fromLatin1(fileNames
[i
]))));
587 for(QFileInfoList::ConstIterator iter
= fileInfo
.constBegin(); iter
!= fileInfo
.constEnd(); iter
++)
589 if(!(iter
->exists() && iter
->isFile()))
591 qDebug("%s encoder binaries not found -> Encoding support will be disabled!\n", toolName
);
594 if((iter
->suffix().compare("exe", Qt::CaseInsensitive
) == 0) && (!MUtils::OS::is_executable_file(iter
->canonicalFilePath())))
596 qDebug("%s executable is invalid -> %s support will be disabled!\n", MUTILS_UTF8(iter
->fileName()), toolName
);
601 qDebug("Found %s encoder binary:\n%s\n", toolName
, MUTILS_UTF8(fileInfo
.first().canonicalFilePath()));
603 //Lock the encoder binaries
604 QScopedPointer
<LockedFile
> binaries
[MAX_FILES
];
608 for(QFileInfoList::ConstIterator iter
= fileInfo
.constBegin(); iter
!= fileInfo
.constEnd(); iter
++)
610 binaries
[index
++].reset(new LockedFile(iter
->canonicalFilePath()));
615 qWarning("Failed to get excluive lock to encoder binary -> %s support will be disabled!", toolName
);
620 MUtils::init_process(process
, fileInfo
.first().absolutePath());
622 process
.start(fileInfo
.first().canonicalFilePath(), QStringList() << "-help");
624 if(!process
.waitForStarted())
626 qWarning("%s process failed to create!", toolName
);
627 qWarning("Error message: \"%s\"\n", process
.errorString().toLatin1().constData());
629 process
.waitForFinished(-1);
633 quint32 toolVersion
= 0;
634 bool sigFound
= regExpSig
.isEmpty() ? true : false;
636 while(process
.state() != QProcess::NotRunning
)
638 if(!process
.waitForReadyRead())
640 if(process
.state() == QProcess::Running
)
642 qWarning("%s process time out -> killing!", toolName
);
644 process
.waitForFinished(-1);
648 while(process
.canReadLine())
650 QString line
= QString::fromUtf8(process
.readLine().constData()).simplified();
651 if((!sigFound
) && regExpSig
.lastIndexIn(line
) >= 0)
656 if(sigFound
&& (regExpVer
.lastIndexIn(line
) >= 0))
659 if(MUtils::regexp_parse_uint32(regExpVer
, tmp
, qMin(verDigits
, 8U)))
662 for(quint32 i
= 0; i
< verDigits
; i
++)
664 toolVersion
= (toolVersion
* verShift
) + qBound(0U, tmp
[i
], (verShift
- 1));
673 qWarning("%s version could not be determined -> Encoding support will be disabled!", toolName
);
676 else if(toolVersion
< toolMinVersion
)
678 qWarning("%s version is too much outdated (%s) -> Encoding support will be disabled!", toolName
, MUTILS_UTF8(lamexp_version2string(verStr
, toolVersion
, "N/A")));
679 qWarning("Minimum required %s version currently is: %s\n", toolName
, MUTILS_UTF8(lamexp_version2string(verStr
, toolMinVersion
, "N/A")));
683 qDebug("Enabled %s encoder %s.\n", toolName
, MUTILS_UTF8(lamexp_version2string(verStr
, toolVersion
, "N/A")));
686 for(QFileInfoList::ConstIterator iter
= fileInfo
.constBegin(); iter
!= fileInfo
.constEnd(); iter
++)
688 lamexp_tools_register(iter
->fileName(), binaries
[index
++].take(), toolVersion
);
692 ////////////////////////////////////////////////////////////
693 // Self-Test Function
694 ////////////////////////////////////////////////////////////
696 void InitializationThread::selfTest(void)
698 const unsigned int cpu
[4] = {CPU_TYPE_X86_GEN
, CPU_TYPE_X86_SSE
, CPU_TYPE_X64_GEN
, CPU_TYPE_X64_SSE
};
700 LockedFile::selfTest();
702 for(size_t k
= 0; k
< 4; k
++)
707 PRINT_CPU_TYPE(CPU_TYPE_X86_GEN
); break;
708 PRINT_CPU_TYPE(CPU_TYPE_X86_SSE
); break;
709 PRINT_CPU_TYPE(CPU_TYPE_X64_GEN
); break;
710 PRINT_CPU_TYPE(CPU_TYPE_X64_SSE
); break;
711 default: MUTILS_THROW("CPU support undefined!");
714 for(int i
= 0; true; i
++)
716 if(!(g_lamexp_tools
[i
].pcName
|| g_lamexp_tools
[i
].pcHash
|| g_lamexp_tools
[i
].uiVersion
))
720 else if(g_lamexp_tools
[i
].pcName
&& g_lamexp_tools
[i
].pcHash
&& g_lamexp_tools
[i
].uiVersion
)
722 const QString toolName
= QString::fromLatin1(g_lamexp_tools
[i
].pcName
);
723 const QByteArray expectedHash
= QByteArray(g_lamexp_tools
[i
].pcHash
);
724 if(g_lamexp_tools
[i
].uiCpuType
& cpu
[k
])
726 qDebug("%02i -> %s", ++n
, MUTILS_UTF8(toolName
));
727 QFile
resource(QString(":/tools/%1").arg(toolName
));
728 if(!resource
.open(QIODevice::ReadOnly
))
730 qFatal("The resource for \"%s\" could not be opened!", MUTILS_UTF8(toolName
));
733 QByteArray hash
= LockedFile::fileHash(resource
);
734 if(hash
.isNull() || _stricmp(hash
.constData(), expectedHash
.constData()))
736 qFatal("Hash check for tool \"%s\" has failed!", MUTILS_UTF8(toolName
));
744 qFatal("Inconsistent checksum data detected. Take care!");
747 if(n
!= EXPECTED_TOOL_COUNT
)
749 qFatal("Tool count mismatch for CPU type %u !!!", cpu
[k
]);
755 ////////////////////////////////////////////////////////////
757 ////////////////////////////////////////////////////////////