2022-08-13 12:36:41 +03:00
|
|
|
//#
|
2023-12-31 09:24:12 +01:00
|
|
|
//# Copyright (C) 2020-2024 QuasarApp.
|
2022-08-13 12:36:41 +03:00
|
|
|
//# 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 "qifwresourcestest.h"
|
|
|
|
#include <configparser.h>
|
|
|
|
#include <dependenciesscanner.h>
|
|
|
|
#include <filemanager.h>
|
|
|
|
#include <packing.h>
|
|
|
|
#include <pluginsparser.h>
|
|
|
|
|
|
|
|
|
|
|
|
void QIFWResourcesTest::test() {
|
|
|
|
TestUtils utils;
|
|
|
|
|
|
|
|
#ifdef Q_OS_UNIX
|
|
|
|
QString bin = {TestBinDir + "TestOnlyC"};
|
|
|
|
|
|
|
|
auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.run"},
|
|
|
|
{DISTRO_DIR + "/InstallerTestOnlyC.run.md5"}});
|
|
|
|
#else
|
|
|
|
QString bin = {TestBinDir + "TestOnlyC.exe"};
|
|
|
|
|
|
|
|
auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.exe"},
|
|
|
|
{DISTRO_DIR + "/InstallerTestOnlyC.exe.md5"}});
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2022-10-03 18:22:39 +03:00
|
|
|
auto templateDir = TestBinDir + "/../../tests/testRes/QIFCustomTemplate";
|
2022-08-13 12:36:41 +03:00
|
|
|
runTestParams({
|
|
|
|
"-bin", bin,
|
2022-10-03 18:22:39 +03:00
|
|
|
"qifFromSystem",
|
2022-08-13 12:36:41 +03:00
|
|
|
"clear",
|
|
|
|
"qif",
|
|
|
|
"-qifConfig", templateDir + "/customconfig.xml",
|
|
|
|
"-qifPackages", templateDir + "/custompackages",
|
2022-10-03 18:22:39 +03:00
|
|
|
"-qifResources", templateDir + "/customRes.qrc"
|
2022-08-13 12:36:41 +03:00
|
|
|
}, &result
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|