|
|
@ -252,13 +252,16 @@ bool i_comp(const string &s0, const string &s1)
|
|
|
|
return nlstricmp (CFile::getFilename(s0).c_str(), CFile::getFilename(s1).c_str()) < 0;
|
|
|
|
return nlstricmp (CFile::getFilename(s0).c_str(), CFile::getFilename(s1).c_str()) < 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void packSubRecurse(const std::string &cp)
|
|
|
|
void packSubRecurse(const std::vector<std::string> &directories)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
vector<string> pathContent;
|
|
|
|
vector<string> pathContent;
|
|
|
|
|
|
|
|
|
|
|
|
printf("Treating directory : %s\n", cp.c_str());
|
|
|
|
for (std::vector<std::string>::const_iterator it = gDirectories.begin(), end = gDirectories.end(); it != end; ++it)
|
|
|
|
ToolLogger.writeDepend(PIPELINE::DIRECTORY, gDestBNPFile, cp);
|
|
|
|
{
|
|
|
|
CPath::getPathContent(cp, true, false, true, pathContent);
|
|
|
|
printf("Treating directory : %s\n", (*it).c_str());
|
|
|
|
|
|
|
|
ToolLogger.writeDepend(PIPELINE::DIRECTORY, gDestBNPFile, *it);
|
|
|
|
|
|
|
|
CPath::getPathContent(*it, true, false, true, pathContent);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Sort filename
|
|
|
|
// Sort filename
|
|
|
|
sort (pathContent.begin(), pathContent.end(), i_comp);
|
|
|
|
sort (pathContent.begin(), pathContent.end(), i_comp);
|
|
|
@ -295,7 +298,9 @@ void packSubRecurse(const std::string &cp)
|
|
|
|
|
|
|
|
|
|
|
|
void packSubRecurse()
|
|
|
|
void packSubRecurse()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
packSubRecurse(CPath::getCurrentPath());
|
|
|
|
std::vector<std::string> directories;
|
|
|
|
|
|
|
|
directories.push_back(CPath::getCurrentPath());
|
|
|
|
|
|
|
|
packSubRecurse(directories);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
@ -414,8 +419,7 @@ int main (int nNbArg, char **ppArgs)
|
|
|
|
|
|
|
|
|
|
|
|
remove(gDestBNPFile.c_str());
|
|
|
|
remove(gDestBNPFile.c_str());
|
|
|
|
gBNPHeader.OffsetFromBeginning = 0;
|
|
|
|
gBNPHeader.OffsetFromBeginning = 0;
|
|
|
|
for (std::vector<std::string>::const_iterator it = gDirectories.begin(), end = gDirectories.end(); it != end; ++it)
|
|
|
|
packSubRecurse(gDirectories);
|
|
|
|
packSubRecurse(*it);
|
|
|
|
|
|
|
|
gBNPHeader.append(gDestBNPFile);
|
|
|
|
gBNPHeader.append(gDestBNPFile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|