mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
CPackIFW: Add CPACK_IFW_REPOSITORIES_DIRECTORIES variable
Add CPACK_IFW_REPOSITORIES_DIRECTORIES variable to specify additional repositories dirs that will be used to resolve and repack dependent components
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
cpackifw-repositories-directories
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
* The :module:`CPackIFW` module gained new
|
||||||
|
:variable:`CPACK_IFW_REPOSITORIES_DIRECTORIES` variable to specify
|
||||||
|
additional repositories dirs that will be used to resolve and
|
||||||
|
repack dependent components. This feature available only
|
||||||
|
since QtIFW 3.1.
|
||||||
@@ -260,6 +260,12 @@
|
|||||||
# Additional prepared packages dirs that will be used to resolve
|
# Additional prepared packages dirs that will be used to resolve
|
||||||
# dependent components.
|
# dependent components.
|
||||||
#
|
#
|
||||||
|
# .. variable:: CPACK_IFW_REPOSITORIES_DIRECTORIES
|
||||||
|
#
|
||||||
|
# Additional prepared repository dirs that will be used to resolve and
|
||||||
|
# repack dependent components. This feature available only
|
||||||
|
# since QtIFW_ 3.1.
|
||||||
|
#
|
||||||
# Tools
|
# Tools
|
||||||
# """""
|
# """""
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -56,6 +56,22 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this->RepoDirsVector.empty()) {
|
||||||
|
if (!this->IsVersionLess("3.1")) {
|
||||||
|
for (std::vector<std::string>::iterator it =
|
||||||
|
this->RepoDirsVector.begin();
|
||||||
|
it != this->RepoDirsVector.end(); ++it) {
|
||||||
|
ifwCmd += " --repository " + *it;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||||
|
<< "variable is set, but content will be skiped, "
|
||||||
|
<< "because this feature available only since "
|
||||||
|
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||||
|
<< std::endl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
|
if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
|
||||||
ifwCmd += " -i ";
|
ifwCmd += " -i ";
|
||||||
std::set<cmCPackIFWPackage*>::iterator it =
|
std::set<cmCPackIFWPackage*>::iterator it =
|
||||||
@@ -128,6 +144,22 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this->RepoDirsVector.empty()) {
|
||||||
|
if (!this->IsVersionLess("3.1")) {
|
||||||
|
for (std::vector<std::string>::iterator it =
|
||||||
|
this->RepoDirsVector.begin();
|
||||||
|
it != this->RepoDirsVector.end(); ++it) {
|
||||||
|
ifwCmd += " --repository " + *it;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||||
|
<< "variable is set, but content will be skipped, "
|
||||||
|
<< "because this feature available only since "
|
||||||
|
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||||
|
<< std::endl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this->OnlineOnly) {
|
if (this->OnlineOnly) {
|
||||||
ifwCmd += " --online-only";
|
ifwCmd += " --online-only";
|
||||||
} else if (!this->DownloadedPackages.empty() &&
|
} else if (!this->DownloadedPackages.empty() &&
|
||||||
@@ -266,6 +298,13 @@ int cmCPackIFWGenerator::InitializeInternal()
|
|||||||
cmSystemTools::ExpandListArgument(dirs, this->PkgsDirsVector);
|
cmSystemTools::ExpandListArgument(dirs, this->PkgsDirsVector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Additional repositories dirs
|
||||||
|
this->RepoDirsVector.clear();
|
||||||
|
if (const char* dirs =
|
||||||
|
this->GetOption("CPACK_IFW_REPOSITORIES_DIRECTORIES")) {
|
||||||
|
cmSystemTools::ExpandListArgument(dirs, this->RepoDirsVector);
|
||||||
|
}
|
||||||
|
|
||||||
// Installer
|
// Installer
|
||||||
this->Installer.Generator = this;
|
this->Installer.Generator = this;
|
||||||
this->Installer.ConfigureFromOptions();
|
this->Installer.ConfigureFromOptions();
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ private:
|
|||||||
bool OnlineOnly;
|
bool OnlineOnly;
|
||||||
bool ResolveDuplicateNames;
|
bool ResolveDuplicateNames;
|
||||||
std::vector<std::string> PkgsDirsVector;
|
std::vector<std::string> PkgsDirsVector;
|
||||||
|
std::vector<std::string> RepoDirsVector;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user