mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-02 20:49:35 +00:00
Merge branch 'main' into qifw_4_8
This commit is contained in:
commit
564b9367be
CMakeLists.txtREADME.md
md/en
src/Deploy/src
Distributions
configparser.cppdeploycore.cppenvirement.cppextracter.cppfilemanager.cpppluginsparser.cppqmlqt6.cppsubmodules
testcases
tests
@ -8,7 +8,7 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(CQtDeployer LANGUAGES CXX)
|
||||
if(TARGET ${PROJECT_NAME})
|
||||
message("The ${PROJECT_NAME} arledy included in main Project")
|
||||
message("The ${PROJECT_NAME} already included in main Project")
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -46,14 +46,14 @@ option(CQT_DEPLOYER_TESTS "This option disables or enables tests of the ${PROJEC
|
||||
option(CQT_DEPLOYER_TOOL "This option disables or enables example app of the ${PROJECT_NAME} project" ON)
|
||||
|
||||
if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32)
|
||||
message(WARNING "CQtDeployer is not availabel for wasm, android and ios platforms")
|
||||
message(WARNING "CQtDeployer is not available for wasm, android and ios platforms")
|
||||
initAll()
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (${QT_VERSION_MAJOR} LESS 6)
|
||||
message(WARNING "CQtDeployer tests is not available for qt5. Please build cqtdeployer with qt6")
|
||||
set(CQT_DEPLOYER_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
|
||||
set(CQT_DEPLOYER_TESTS OFF CACHE BOOL "This option force disabled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
|
||||
endif()
|
||||
|
||||
make_directory(Distro)
|
||||
@ -76,6 +76,9 @@ else()
|
||||
endif()
|
||||
|
||||
if (CQT_DEPLOYER_TESTS)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WebEngineQuick)
|
||||
|
||||
|
||||
add_subdirectory(testcases)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
|
10
README.md
10
README.md
@ -37,8 +37,14 @@ Key differences of this program:
|
||||
|
||||
## Supported platforms:
|
||||
|
||||
* <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100">
|
||||
* <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100">
|
||||
* Linux
|
||||
- deb
|
||||
- snap
|
||||
- raw binaries
|
||||
- installer
|
||||
* Windows
|
||||
- raw binaries
|
||||
- installer
|
||||
|
||||
## Supported processors architectures:
|
||||
* x86
|
||||
|
@ -41,7 +41,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
|
||||
### Boolean options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| init | will initialize cqtdeployer.json file (configuration file)|
|
||||
| | For example: "cqtdeployer init" - for initialize base package configuration|
|
||||
@ -58,7 +58,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
| noCheckPATH | Disables automatic search of paths to qmake in system PATH. |
|
||||
| noRecursiveiIgnoreEnv | Disables recursive ignore for ignoreEnv option. |
|
||||
| v / version | Shows compiled version |
|
||||
| qif | Create the QIF installer for deployment programm" |
|
||||
| qif | Create the QIF installer for deployment program" |
|
||||
| | Example: cqtdeployer qif" }, |
|
||||
| | Starting with CQtDeployer 1.5 you can specify the path to your own installer template. |
|
||||
| | Examples: cqtdeployer -qif path/to/myCustom/qif. More details can be found [here](QIF.md) |
|
||||
@ -66,8 +66,8 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
| | Example: cqtdeployer deb" }, |
|
||||
| | you can specify the path to your own DEBIAN template. |
|
||||
| | Examples: cqtdeployer -deb path/to/myCustom/DEBIAN. More details can be found [here](DEB.md) |
|
||||
| deploySystem | Deploys all libraries not recomendet because there may be conflicts with system libraries |
|
||||
| noQt | Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework. |
|
||||
| deploySystem | Deploys all libraries not recommended because there may be conflicts with system libraries |
|
||||
| noQt | Ignores the error of initialize of a qmake. Use only if your application does not use the qt framework. |
|
||||
| allowEmptyPackages | Allows configure the empty packages. |
|
||||
| getDefaultTemplate | Extracts defaults deb or qif templates. For more information see the extracting default templates [page](ExtractDefaultsTemplates.md) |
|
||||
| noHashSum | Disable computation of a packages hash sum |
|
||||
@ -75,7 +75,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
|
||||
### Deploy options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -bin [list,params] | Files to deploy or folders that contain files to deploy. For example -bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll. For files: These files will be unconditional copied to the destination directory, regardless of their format or suffix. For folders: CQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory. Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and **libDir** paths. **Note**: If CQtDeployer can't find required file then CQtDeployer try find required file in the system PATH enviroment.|
|
||||
| -binPrefix [prefixPath] | Sets prefix path for bin option. Example: **-bin path/MyExecutable** is some as **-bin MyExecutable -binPrefix path** |
|
||||
@ -106,7 +106,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
|
||||
### Controll of packages options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -targetPackage [package;tar1,package;tar2]| Creates a new package and adds 'tar1 and tar2' to it |
|
||||
| -qmlOut [package;path,path] | Sets path to qml out directory |
|
||||
@ -128,7 +128,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
|
||||
### Controll of targets options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -icon [target;val,val] | Sets path to icon for a targets. This option support only png (Linux) and ico (Windows) files. |
|
||||
| -disableRunScript [target,target2,target3] | Disables the generation of run script for selected targets|
|
||||
@ -136,40 +136,40 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
| -runScript [target;val,val] | forces cqtdeployer swap default run script to new from the arguments of option. This option copy all content from input file and insert all code into runScript.sh or .bat. Example of use: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh" For get more information about customScript see the documentation [page](CustomScripts.md)|
|
||||
| -extraDepends [target;val,val] | Adds extra dependencies for target, if package is skiped then for all targets. Example -extraDepends libssl.so or -extraDepends myExecutable;libssl.so |
|
||||
|
||||
### Plugins Controll Options
|
||||
### Plugins Control Options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -extraPlugin [package;val1;val2,SingeleVal]| Sets an additional path to third-party application plug-in |
|
||||
| -enablePlugins [package;val1;val2,SingeleVal] | Enables additional plugins for distribution. |
|
||||
| -disablePlugins [package;val1;val2,SingeleVal]| Disables plugins for distribution. |
|
||||
| |You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins.|
|
||||
| |You can disable any plugin of your Qt build, just see the yourQtFolder/plugins folder for available plugins.|
|
||||
| |Example: if you want disable qxcb plugin: -disablePlugins qxcb. Note that the name of the plugin is indicated without its extension.|
|
||||
|
||||
### QtInstallFramework options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -qifStyle [path/to/style.css]| Sets the path to the CSS style file or sets the default style. Available styles: quasar |
|
||||
| -qifBanner [path/to/banner.png]| Sets path to the banner png file. |
|
||||
| -qifLogo [path/to/logo.png]| Sets path to the logo png file. |
|
||||
| -qifOut [nameOfOutputInstallerFile] | Sets name of output qifw installer. Note: on Windows, the exe suffix will be added to the installer automatically. |
|
||||
| -qifConfig [path/to/config.xml] | Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml. Note This path sets releative target folder (sets by TargetDir option). |
|
||||
| -qifPackages [path/to/packagesFodoler] | Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets releative target folder (sets by TargetDir option). |
|
||||
| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Sets a custom path to the resources files. By default this option is skipped. Note This path sets releative target folder (sets by TargetDir option). |
|
||||
| -qifConfig [path/to/config.xml] | Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml. Note This path sets relative target folder (sets by TargetDir option). |
|
||||
| -qifPackages [path/to/packagesFodoler] | Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets relative target folder (sets by TargetDir option). |
|
||||
| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Sets a custom path to the resources files. By default this option is skipped. Note This path sets relative target folder (sets by TargetDir option). |
|
||||
| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Sets the format used when packaging new component data archives. If you omit this option, the 7z format will be used as a default. |
|
||||
| -binarycreator [binarycreator command] | Sets new binarycreator command. Example : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'|
|
||||
|
||||
### Deb package options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -debOut [package;nameOfOutputDebFile,nameOfOutputDebFile]| Sets name of the output debian file. This option can be work with multiple packages |
|
||||
|
||||
### Zip pacakge options
|
||||
|
||||
| Option | Descriptiion |
|
||||
| Option | Description |
|
||||
|-----------------------------|-----------------------------------------------------------|
|
||||
| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Sets name of the output zip arrhive. This option can be work with multiple packages |
|
||||
| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Sets name of the output zip archive. This option can be work with multiple packages |
|
||||
|
||||
#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.15.4/gcc_64/bin/qmake clear
|
||||
|
@ -28,7 +28,7 @@ bool Deb::deployTemplate(PackageControl &pkg) {
|
||||
QuasarAppUtils::Params::log("Using custom template for debian pacakge: " + customTemplate,
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto& pkg: availablePacakages) {
|
||||
pakcagesTemplates.insert(pkg.fileName(), pkg.absoluteFilePath());
|
||||
|
@ -108,7 +108,7 @@ bool iDistribution::unpackDir(const QString &resource,
|
||||
|
||||
|
||||
QDir res(resource);
|
||||
auto list = res.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries);
|
||||
auto list = res.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden);
|
||||
|
||||
for (const auto & item :list) {
|
||||
|
||||
|
@ -129,7 +129,7 @@ bool QIF::deployTemplate(PackageControl &pkg) {
|
||||
QuasarAppUtils::Params::log("Using custom template for installer: " + customTemplate,
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
auto availablePacakages = QDir(customTemplate + "/packages").entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto availablePacakages = QDir(customTemplate + "/packages").entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto& pkg: availablePacakages) {
|
||||
pakcagesTemplates.insert(pkg.fileName(), pkg.absoluteFilePath());
|
||||
@ -237,7 +237,7 @@ QString QIF::location(const DistroModule &module) const {
|
||||
|
||||
QString QIF::getStyle(const QString& input) const {
|
||||
QDir resurces(":/Styles/Distributions/Templates/qif/Styles");
|
||||
auto list = resurces.entryInfoList(QDir::Files);
|
||||
auto list = resurces.entryInfoList(QDir::Files | QDir::Hidden);
|
||||
for (const auto& style : list) {
|
||||
if (input == style.baseName()) {
|
||||
QuasarAppUtils::Params::log(QString("Use the %0 installer style").arg(style.baseName()),
|
||||
|
@ -708,7 +708,7 @@ bool ConfigParser::parseDeployMode(bool checkBin) {
|
||||
QuasarAppUtils::Params::log("Failed to initialize targets or extra data!",
|
||||
QuasarAppUtils::Error);
|
||||
|
||||
QuasarAppUtils::Params::log("Use bin or extraData optins. And check input pathes.",
|
||||
QuasarAppUtils::Params::log("Use bin or extraData options and check input paths.",
|
||||
QuasarAppUtils::Info);
|
||||
return false;
|
||||
}
|
||||
@ -961,9 +961,9 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) {
|
||||
QFileInfoList list;
|
||||
|
||||
if (recursive) {
|
||||
list = d.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
list = d.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
} else {
|
||||
list = d.entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
list = d.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
@ -1639,7 +1639,7 @@ QSet<QString> ConfigParser::getSetDirsRecursive(const QString &path, int maxDepc
|
||||
return res;
|
||||
}
|
||||
|
||||
auto list = dir.entryInfoList(QDir::Dirs| QDir::NoDotAndDotDot);
|
||||
auto list = dir.entryInfoList(QDir::Dirs| QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto &subDir: list) {
|
||||
res.insert(subDir.absoluteFilePath());
|
||||
|
@ -254,7 +254,13 @@ QuasarAppUtils::OptionsDataList DeployCore::avilableOptions() {
|
||||
{"deb", "-deb"}, "",
|
||||
"Create the deb package for deployment programm"
|
||||
" You can specify the path to your own debian template.",
|
||||
"cqtdeployer -deb path/to/myCustom/DEBIAN."
|
||||
" cqtdeployer -deb path/to/myCustom/templates"
|
||||
" Where: the custom path should point to a folder with your packages templates, and template name should match with real package name."
|
||||
" For Exmaple: cqtdeployer -deb path/to/tempalates -name appnameOrPackageName "
|
||||
" path/to/tempalates/appnameOrPackageName/DEBIAN"
|
||||
" To get more information see documentation page "
|
||||
"https://quasarapp.ddns.net:3031/docs/QuasarApp/CQtDeployer/latest/md_md_2en_2DEB.html"
|
||||
|
||||
}});
|
||||
help.insert(group, {QuasarAppUtils::OptionData{
|
||||
{"deploySystem"}, "",
|
||||
@ -646,7 +652,7 @@ bool DeployCore::isContainsArraySeparators(const QString &val, int lastLvl) {
|
||||
QString DeployCore::findProcess(const QString &env, const QString& proc, bool ignoreSymLinks) {
|
||||
auto list = env.split(DeployCore::getEnvSeparator());
|
||||
|
||||
auto findEntries = QDir::NoDotAndDotDot | QDir::Files;
|
||||
auto findEntries = QDir::NoDotAndDotDot | QDir::Files | QDir::Hidden;
|
||||
if (ignoreSymLinks) {
|
||||
findEntries = findEntries | QDir::NoSymLinks;
|
||||
}
|
||||
@ -773,7 +779,7 @@ QString DeployCore::getVCredist(const QString &_qtbinDir) {
|
||||
return "";
|
||||
}
|
||||
|
||||
auto infoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto infoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
auto name = getMSVCName(msvc);
|
||||
auto version = getMSVCVersion(msvc);
|
||||
|
@ -133,7 +133,7 @@ QStringList Envirement::recursiveInvairement(QDir &dir, int depch, int depchLimi
|
||||
return {dir.absolutePath()};
|
||||
}
|
||||
|
||||
QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
QStringList res = {};
|
||||
|
||||
for (QFileInfo &i : list) {
|
||||
|
@ -357,7 +357,7 @@ bool Extracter::copyTranslations(const QStringList &list, const QString& package
|
||||
filters.push_back("*" + i + "*");
|
||||
}
|
||||
|
||||
auto listItems = dir.entryInfoList(filters, QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto listItems = dir.entryInfoList(filters, QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
@ -383,7 +383,7 @@ QFileInfoList Extracter::findFilesInsideDir(const QString &name,
|
||||
|
||||
QDir dir(dirpath);
|
||||
|
||||
auto list = dir.entryInfoList( QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto list = dir.entryInfoList( QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto & item :list) {
|
||||
if (item.isFile()) {
|
||||
@ -501,7 +501,7 @@ bool Extracter::extractQml() {
|
||||
}
|
||||
} else {
|
||||
for (const auto& plugin: std::as_const(plugins)) {
|
||||
const auto qmlFiles = QDir(plugin).entryInfoList(QDir::Files);
|
||||
const auto qmlFiles = QDir(plugin).entryInfoList(QDir::Files | QDir::Hidden);
|
||||
for (const auto& qmlFile: qmlFiles) {
|
||||
toCopyQmlFiles.push_back(qmlFile.absoluteFilePath());
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ bool FileManager::strip(const QString &dir) const {
|
||||
|
||||
if (info.isDir()) {
|
||||
QDir d(dir);
|
||||
auto list = d.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto list = d.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
bool res = false;
|
||||
for (const auto &i : list) {
|
||||
@ -298,7 +298,7 @@ bool FileManager::copyFolder(const QString &from,
|
||||
|
||||
QDir fromDir(from);
|
||||
|
||||
auto list = fromDir.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries);
|
||||
auto list = fromDir.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden);
|
||||
|
||||
for (const auto &item : list) {
|
||||
if (item.isDir()) {
|
||||
@ -402,7 +402,7 @@ bool FileManager::moveFolder(const QString &from, const QString &to, const QStri
|
||||
}
|
||||
|
||||
QDir dir(from);
|
||||
auto list = dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto list = dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
for (const auto &i :list) {
|
||||
auto targetDir = to;
|
||||
if (i.isDir()) {
|
||||
|
@ -153,7 +153,7 @@ bool PluginsParser::scan(const QString& pluginPath,
|
||||
DeployCore::QtModule qtModules,
|
||||
const QString& package) {
|
||||
|
||||
auto plugins = QDir(pluginPath).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto plugins = QDir(pluginPath).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
for (const auto &plugin: plugins) {
|
||||
scanPluginGroup(plugin, resDependencies, package, qtModules);
|
||||
}
|
||||
@ -167,7 +167,7 @@ void PluginsParser::addPlugins(const QStringList& list, const QString& package,
|
||||
|
||||
for (const auto &plugin: std::as_const(list)) {
|
||||
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
||||
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto &plugin: listPlugins) {
|
||||
container[package].insert(getPluginNameFromFile( plugin.baseName()));
|
||||
@ -211,7 +211,7 @@ void PluginsParser::scanPlatforms(const QString& package, QList<QString>& disabl
|
||||
auto platform = cnf->getPlatform(package);
|
||||
|
||||
QString platformPluginPath = cnf->qtDir.getPlugins() + "/platforms";
|
||||
auto plugins = QDir(platformPluginPath).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto plugins = QDir(platformPluginPath).entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
|
||||
for (const auto &plugin: plugins) {
|
||||
|
||||
@ -229,7 +229,7 @@ void PluginsParser::scanPluginGroup(const QFileInfo& plugin,
|
||||
const QString &package,
|
||||
DeployCore::QtModule qtModules) const {
|
||||
|
||||
auto plugins = QDir(plugin.absoluteFilePath()).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto plugins = QDir(plugin.absoluteFilePath()).entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
auto groupModule = qtModuleForPluginGroup(plugin.fileName());
|
||||
|
||||
for (const auto& info: plugins) {
|
||||
|
@ -47,7 +47,7 @@ QStringList QMLQt6::extractImportsFromFile(const QString &filepath) const {
|
||||
{
|
||||
word = word.simplified();
|
||||
if (word.startsWith("//")) continue;
|
||||
if (!word.startsWith("import")) continue;
|
||||
if (!word.startsWith("import ")) continue;
|
||||
|
||||
imports += extractImportLine(word);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fefb8d6acc78b5f63d5a78b86a4900e694bd2862
|
||||
Subproject commit 81314fff0a882b72a9ad321e7a3311660125b56e
|
@ -18,6 +18,9 @@ add_subdirectory(TestQtWidgets)
|
||||
if (NOT WIN32)
|
||||
add_subdirectory(QMLFileDialog)
|
||||
add_subdirectory(virtualkeyboard)
|
||||
add_subdirectory(quicknanobrowser)
|
||||
add_subdirectory(webui)
|
||||
|
||||
if (Qt${QT_VERSION_MAJOR}WebEngineQuick_FOUND)
|
||||
add_subdirectory(quicknanobrowser)
|
||||
add_subdirectory(webui)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -47,6 +47,10 @@ set(PUBLIC_INCUDE_DIR ${PUBLIC_INCUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/modules"
|
||||
add_definitions(-DQT_BASE_DIR="${QT_QT_ROOT}/")
|
||||
add_definitions(-DTEST_BIN_DIR="${CMAKE_CURRENT_LIST_DIR}/../testcases/bin/")
|
||||
|
||||
if (Qt${QT_VERSION_MAJOR}WebEngineQuick_FOUND)
|
||||
add_definitions(-DUSE_WEBENGINE)
|
||||
endif()
|
||||
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Test Deploy)
|
||||
|
||||
|
@ -16,12 +16,6 @@ QSet<QString> ModulesQt6_6::qmlLibs(const QString &distDir) const {
|
||||
TestUtils utils;
|
||||
auto Tree = ModulesQt6_5::qmlLibs(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
return Tree;
|
||||
}
|
||||
|
||||
|
195
tests/modules/modulesqt6_8.cpp
Normal file
195
tests/modules/modulesqt6_8.cpp
Normal file
@ -0,0 +1,195 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 QuasarApp.
|
||||
* Distributed under the lgplv3 software license, see the accompanying
|
||||
* Everyone is permitted to copy and distribute verbatim copies
|
||||
* of this license document, but changing it is not allowed.
|
||||
*/
|
||||
|
||||
|
||||
#include "modulesqt6_8.h"
|
||||
|
||||
ModulesQt6_8::ModulesQt6_8() {}
|
||||
|
||||
QSet<QString> ModulesQt6_8::qmlLibs(const QString &distDir) const {
|
||||
TestUtils utils;
|
||||
auto Tree = ModulesQt6_6::qmlLibs(distDir);
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
Tree -= utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/qml/QtQml/Base/libqmlplugin.so" ,
|
||||
"./" + distDir + "/qml/QtQml/Base/plugins.qmltypes" ,
|
||||
"./" + distDir + "/qml/QtQml/Base/qmldir",
|
||||
"./" + distDir + "/qml/QtQml/libqmlmetaplugin.so",
|
||||
"./" + distDir + "/qml/QtQuick/Controls/Imagine/impl/qtquickcontrols2imaginestyleimplplugin.qmltypes" ,
|
||||
}
|
||||
);
|
||||
|
||||
Tree += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "//lib/libQt6Network.so",
|
||||
"./" + distDir + "//lib/libQt6QmlMeta.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2Basic.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2BasicStyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2FluentWinUI3StyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2Fusion.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2FusionStyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2Imagine.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2ImagineStyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2Material.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2MaterialStyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2Universal.so",
|
||||
"./" + distDir + "//lib/libQt6QuickControls2UniversalStyleImpl.so",
|
||||
"./" + distDir + "//lib/libQt6QuickEffects.so",
|
||||
"./" + distDir + "//lib/libQt6QuickLayouts.so",
|
||||
"./" + distDir + "//qml/QML/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QML/qmldir",
|
||||
"./" + distDir + "//qml/QtQml/libqmlplugin.so",
|
||||
"./" + distDir + "//qml/QtQml/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ApplicationWindow.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/BusyIndicator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Button.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/CheckBox.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/CheckDelegate.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ComboBox.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Config.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/DelayButton.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Dialog.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/DialogButtonBox.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/FocusFrame.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Frame.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/GroupBox.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ItemDelegate.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Menu.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuBar.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuBarItem.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuItem.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuSeparator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/PageIndicator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Popup.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ProgressBar.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RadioButton.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RadioDelegate.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RangeSlider.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RoundButton.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Slider.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SpinBox.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/StyleImage.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SwipeDelegate.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Switch.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SwitchDelegate.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TabBar.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TabButton.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TextArea.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TextField.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolBar.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolButton.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolSeparator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolTip.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/ButtonBackground.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/CheckIndicator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/RadioIndicator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/SwitchIndicator.qml",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/libqtquickcontrols2fluentwinui3styleimplplugin.so",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/qmldir",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/libqtquickcontrols2fluentwinui3styleplugin.so",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/qmldir",
|
||||
"./" + distDir + "//qml/QtQuick/Controls/Imagine/impl/QuickControls2ImagineStyleImpl.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Effects/libeffectsplugin.so",
|
||||
"./" + distDir + "//qml/QtQuick/Effects/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Effects/qmldir",
|
||||
"./" + distDir + "//qml/QtQuick/Layouts/libqquicklayoutsplugin.so",
|
||||
"./" + distDir + "//qml/QtQuick/Layouts/plugins.qmltypes",
|
||||
"./" + distDir + "//qml/QtQuick/Layouts/qmldir",
|
||||
"./" + distDir + "//translations/qtdeclarative_ka.qm"
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt6_8::qmlVirtualKeyBoadrLibs(const QString &distDir) const{
|
||||
TestUtils utils;
|
||||
|
||||
auto Tree = ModulesQt6_6::qmlVirtualKeyBoadrLibs(distDir);
|
||||
#ifdef Q_OS_LINUX
|
||||
Tree -= utils.createTree(
|
||||
{
|
||||
"./" + distDir + "plugins/multimedia/libgstreamermediaplugin.so"
|
||||
}
|
||||
);
|
||||
|
||||
Tree += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/translations/qtmultimedia_ka.qm",
|
||||
"./" + distDir + "/lib/libQt6VirtualKeyboardSettings.so"
|
||||
}
|
||||
);
|
||||
#endif
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt6_8::qtWebEngine(const QString &distDir) const{
|
||||
TestUtils utils;
|
||||
|
||||
auto Tree = ModulesQt6_6::qtWebEngine(distDir);
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
|
||||
|
||||
Tree += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/lib/libQt6Network.so",
|
||||
"./" + distDir + "/lib/libQt6QmlMeta.so",
|
||||
"./" + distDir + "/lib/libQt6QmlWorkerScript.so",
|
||||
"./" + distDir + "/translations/qtdeclarative_ka.qm",
|
||||
"./" + distDir + "/translations/qtserialport_ka.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_ka.qm"
|
||||
}
|
||||
);
|
||||
#endif
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt6_8::qtWebEngineWidgets(const QString &distDir) const{
|
||||
TestUtils utils;
|
||||
|
||||
auto Tree = ModulesQt6_6::qtWebEngineWidgets(distDir);
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
|
||||
|
||||
Tree += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/lib/libQt6Network.so",
|
||||
"./" + distDir + "/lib/libQt6QmlMeta.so",
|
||||
"./" + distDir + "/lib/libQt6QmlWorkerScript.so",
|
||||
"./" + distDir + "/translations/qtdeclarative_ka.qm",
|
||||
"./" + distDir + "/translations/qtserialport_ka.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_ka.qm"
|
||||
}
|
||||
);
|
||||
|
||||
#endif
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt6_8::qtLibs(const QString &distDir) const {
|
||||
auto Tree = ModulesQt6_6::qtLibs(distDir);
|
||||
TestUtils utils;
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
|
||||
Tree += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/translations/qtbase_ka.qm",
|
||||
"./" + distDir + "/plugins/wayland-decoration-client/libadwaita.so",
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
return Tree;
|
||||
}
|
26
tests/modules/modulesqt6_8.h
Normal file
26
tests/modules/modulesqt6_8.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 QuasarApp.
|
||||
* Distributed under the lgplv3 software license, see the accompanying
|
||||
* Everyone is permitted to copy and distribute verbatim copies
|
||||
* of this license document, but changing it is not allowed.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MODULESQT6_8_H
|
||||
#define MODULESQT6_8_H
|
||||
|
||||
#include "modulesqt6_6.h"
|
||||
|
||||
|
||||
class ModulesQt6_8: public ModulesQt6_6
|
||||
{
|
||||
public:
|
||||
ModulesQt6_8();
|
||||
QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qmlVirtualKeyBoadrLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
};
|
||||
|
||||
#endif // MODULESQT6_8_H
|
@ -14,6 +14,10 @@
|
||||
<file alias="qmlFile.qml">testRes/qml/Scene</file>
|
||||
<file alias="qmlFileQt6.qml">testRes/qml/SceneQt6</file>
|
||||
<file alias="qmlDir">testRes/qml/qmldir</file>
|
||||
<file>testRes/.hidenAssets/win64/.mingw/cqtdeployer.exe</file>
|
||||
<file>testRes/.hidenAssets/win64/.mingw/.Deploy.dll</file>
|
||||
<file>testRes/.hidenAssets/win64/msvc/lib.dll</file>
|
||||
<file>testRes/.hidenAssets/win64/msvc/exe.exe</file>
|
||||
</qresource>
|
||||
<qresource prefix="/testResurces">
|
||||
<file>testRes/TestQMLWidgets.sh</file>
|
||||
|
BIN
tests/testRes/.hidenAssets/win64/.mingw/.Deploy.dll
Normal file
BIN
tests/testRes/.hidenAssets/win64/.mingw/.Deploy.dll
Normal file
Binary file not shown.
BIN
tests/testRes/.hidenAssets/win64/.mingw/cqtdeployer.exe
Normal file
BIN
tests/testRes/.hidenAssets/win64/.mingw/cqtdeployer.exe
Normal file
Binary file not shown.
BIN
tests/testRes/.hidenAssets/win64/msvc/exe.exe
Executable file
BIN
tests/testRes/.hidenAssets/win64/msvc/exe.exe
Executable file
Binary file not shown.
BIN
tests/testRes/.hidenAssets/win64/msvc/lib.dll
Normal file
BIN
tests/testRes/.hidenAssets/win64/msvc/lib.dll
Normal file
Binary file not shown.
@ -10,6 +10,7 @@
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#include "extradependstest.h"
|
||||
#include "hidenfilestest.h"
|
||||
|
||||
#include "allowemptypackagestest.h"
|
||||
#include "binprefixtest.h"
|
||||
@ -102,6 +103,7 @@ private slots:
|
||||
|
||||
// main tests works on linux only
|
||||
#ifdef Q_OS_LINUX
|
||||
TestCase(hidenFilesTest, HidenFilesTest)
|
||||
TestCase(extraDependsTest, ExtraDependsTest)
|
||||
TestCase(allowemptypackagestest, AllowEmptyPackagesTest )
|
||||
TestCase(binprefixtest, BinPrefixTest)
|
||||
@ -281,6 +283,12 @@ tstMain::tstMain() {
|
||||
cqtTestPath = cqtTestPath +
|
||||
DeployCore::getEnvSeparator() +
|
||||
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.7/bin/";
|
||||
cqtTestPath = cqtTestPath +
|
||||
DeployCore::getEnvSeparator() +
|
||||
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.8/bin/";
|
||||
cqtTestPath = cqtTestPath +
|
||||
DeployCore::getEnvSeparator() +
|
||||
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.9/bin/";
|
||||
qputenv("PATH", cqtTestPath.toLatin1().data());
|
||||
TestUtils utils;
|
||||
|
||||
|
@ -26,23 +26,29 @@ void ExtraDependsTest::test() {
|
||||
|
||||
comapareTree += utils.createTree(
|
||||
{
|
||||
"./" + DISTRO_DIR + "/lib/libicutu.so.56.1",
|
||||
"./" + DISTRO_DIR + "/lib/libicuuc.so",
|
||||
"./" + DISTRO_DIR + "/lib/libicui18n.so",
|
||||
"./" + DISTRO_DIR + "/lib/libicuio.so",
|
||||
"./" + DISTRO_DIR + "/lib/libicudata.so",
|
||||
|
||||
"./" + DISTRO_DIR + "/lib/libicui18n.so",
|
||||
"./" + DISTRO_DIR + "/lib/libicuuc.so",
|
||||
});
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
QString extraLibName = "libicuio.so.73";
|
||||
|
||||
#else
|
||||
QString extraLibName = "libicuio.so.56.1";
|
||||
|
||||
#endif
|
||||
|
||||
// this cases should contains all icu libs.
|
||||
runTestParams({"-bin", bin, "clear",
|
||||
"-libDir", QT_BASE_DIR,
|
||||
"-recursiveDepth", "4",
|
||||
"-extraDepends", "libicutu.so.56.1"}, &comapareTree);
|
||||
"-extraDepends", extraLibName}, &comapareTree);
|
||||
|
||||
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-libDir", QT_BASE_DIR,
|
||||
"-recursiveDepth", "4",
|
||||
"-extraDepends", "TestOnlyC;libicutu.so.56.1"}, &comapareTree);
|
||||
"-extraDepends", "TestOnlyC;" + extraLibName}, &comapareTree);
|
||||
|
||||
}
|
||||
|
40
tests/units/linux/hidenfilestest.cpp
Normal file
40
tests/units/linux/hidenfilestest.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
//#
|
||||
//# Copyright (C) 2020-2024 QuasarApp.
|
||||
//# Distributed under the GPLv3 software license, see the accompanying
|
||||
//# Everyone is permitted to copy and distribute verbatim copies
|
||||
//# of this license document, but changing it is not allowed.
|
||||
//#
|
||||
|
||||
|
||||
#include "hidenfilestest.h"
|
||||
|
||||
#include <filemanager.h>
|
||||
|
||||
|
||||
|
||||
void HidenFilesTest::test() {
|
||||
#ifdef Q_OS_UNIX
|
||||
TestUtils utils;
|
||||
|
||||
|
||||
QDir("tstAssets").removeRecursively();
|
||||
FileManager files;
|
||||
files.cp(":/testRes/.hidenAssets", "tstAssets");
|
||||
|
||||
|
||||
auto comapareTree = utils.createTree({
|
||||
"./" + DISTRO_DIR + "/Application.deb",
|
||||
"./" + DISTRO_DIR + "/Application.deb.md5",
|
||||
|
||||
});
|
||||
|
||||
runTestParams({"-extraData", "tstAssets", "clear" ,
|
||||
"deb", "verbose"}, &comapareTree, true);
|
||||
|
||||
// test clear for deb
|
||||
runTestParams({"clear", "verbose"}, nullptr, true);
|
||||
|
||||
QDir("tstAssets").removeRecursively();
|
||||
|
||||
#endif
|
||||
}
|
23
tests/units/linux/hidenfilestest.h
Normal file
23
tests/units/linux/hidenfilestest.h
Normal file
@ -0,0 +1,23 @@
|
||||
//#
|
||||
//# Copyright (C) 2020-2024 QuasarApp.
|
||||
//# Distributed under the GPLv3 software license, see the accompanying
|
||||
//# Everyone is permitted to copy and distribute verbatim copies
|
||||
//# of this license document, but changing it is not allowed.
|
||||
//#
|
||||
|
||||
|
||||
#ifndef HidenFilesTest_H
|
||||
#define HidenFilesTest_H
|
||||
#include "testbase.h"
|
||||
#include "testutils.h"
|
||||
|
||||
#include <QtTest>
|
||||
|
||||
class HidenFilesTest: public TestBase, protected TestUtils
|
||||
{
|
||||
public:
|
||||
void test() override;
|
||||
|
||||
};
|
||||
|
||||
#endif // HidenFilesTest_H
|
@ -7,7 +7,11 @@
|
||||
|
||||
|
||||
#include "webenginetest.h"
|
||||
|
||||
#ifdef USE_WEBENGINE
|
||||
#include "modules.h"
|
||||
#endif
|
||||
|
||||
#include <configparser.h>
|
||||
#include <dependenciesscanner.h>
|
||||
#include <filemanager.h>
|
||||
@ -16,7 +20,7 @@
|
||||
|
||||
|
||||
void WebEngineTest::test() {
|
||||
#ifdef Q_OS_UNIX
|
||||
#ifdef USE_WEBENGINE
|
||||
TestUtils utils;
|
||||
|
||||
QString bin = TestBinDir + "quicknanobrowser";
|
||||
@ -36,7 +40,5 @@ void WebEngineTest::test() {
|
||||
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-qmake", qmake}, &comapareTree);
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <QtTest>
|
||||
|
||||
// webenginetest
|
||||
class WebEngineTest: public TestBase, protected TestUtils
|
||||
{
|
||||
public:
|
||||
|
@ -11,7 +11,10 @@
|
||||
#include <configparser.h>
|
||||
#include <QSet>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
#include "modulesqt6_8.h"
|
||||
class Modules: public ModulesQt6_8
|
||||
#elif QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
|
||||
#include "modulesqt6_6.h"
|
||||
class Modules: public ModulesQt6_6
|
||||
#elif QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
|
@ -34,7 +34,7 @@ QSet<QString> TestUtils::getTree(const QString &path, int limit, int depch) {
|
||||
}
|
||||
|
||||
QDir dir(info.absoluteFilePath());
|
||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
for (const auto &i: std::as_const(list)) {
|
||||
result.unite(getTree(i.absoluteFilePath(), limit, depch + 1));
|
||||
}
|
||||
@ -61,7 +61,7 @@ QSet<QString> TestUtils::getFilesSet(const QString &path, int limit, int depch)
|
||||
}
|
||||
|
||||
QDir dir(info.absoluteFilePath());
|
||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden);
|
||||
for (const auto &i: std::as_const(list)) {
|
||||
result.unite(getFilesSet(i.absoluteFilePath(), limit, depch + 1));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user