mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-28 18:54:33 +00:00
Merge pull request #673 from QuasarApp/task_672
Added support folders for the tr option
This commit is contained in:
commit
3a0d661ed7
@ -269,8 +269,22 @@ bool Extracter::copyTr() {
|
|||||||
|
|
||||||
const auto trFiles = i->tr();
|
const auto trFiles = i->tr();
|
||||||
for (const auto &tr: trFiles) {
|
for (const auto &tr: trFiles) {
|
||||||
if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
|
||||||
return false;
|
QFileInfo info(tr);
|
||||||
|
|
||||||
|
if (info.isDir()) {
|
||||||
|
QDir dir(info.absoluteFilePath());
|
||||||
|
auto availableQm = dir.entryInfoList({"*.qm"}, QDir::Files);
|
||||||
|
for (const auto & trFile : qAsConst(availableQm)) {
|
||||||
|
if (!_fileManager->copyFile(trFile.absoluteFilePath(),
|
||||||
|
cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1190,21 +1190,22 @@ void deploytest::testDeployGeneralFiles() {
|
|||||||
void deploytest::testTr() {
|
void deploytest::testTr() {
|
||||||
TestUtils utils;
|
TestUtils utils;
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
QString bin = TestBinDir + "QtWidgetsProject";
|
QString bin = TestBinDir + "TestOnlyC";
|
||||||
QString qmake = TestQtDir + "bin/qmake";
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QString bin = TestBinDir + "QtWidgetsProject.exe";
|
QString bin = TestBinDir + "TestOnlyC.exe";
|
||||||
QString qmake = TestQtDir + "bin/qmake.exe";
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
auto comapareTree = TestModule.qtLibs();
|
|
||||||
|
|
||||||
comapareTree += utils.createTree({"./" + DISTRO_DIR + "/translations/TestTr.qm"});
|
|
||||||
|
|
||||||
runTestParams({"-bin", bin, "clear" ,
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
"-tr", ":/testResurces/testRes/TestTr.qm",
|
"-tr", ":/testResurces/testRes/TestTr.qm",});
|
||||||
"-qmake", qmake}, &comapareTree);
|
|
||||||
|
QVERIFY(QFile::exists("./" + DISTRO_DIR + "/translations/TestTr.qm"));
|
||||||
|
|
||||||
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
|
"-tr", ":/testResurces/testRes/"});
|
||||||
|
|
||||||
|
QVERIFY(QFile::exists("./" + DISTRO_DIR + "/translations/TestTr.qm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void deploytest::testVirtualKeyBoard() {
|
void deploytest::testVirtualKeyBoard() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user