diff --git a/code/nel/tools/pipeline/service/build_task_queue.cpp b/code/nel/tools/pipeline/service/build_task_queue.cpp index a015e7b39..4177c3883 100644 --- a/code/nel/tools/pipeline/service/build_task_queue.cpp +++ b/code/nel/tools/pipeline/service/build_task_queue.cpp @@ -32,6 +32,7 @@ // NeL includes #include +#include // Project includes #include "pipeline_workspace.h" @@ -146,7 +147,36 @@ void CBuildTaskQueue::loadQueue(CPipelineWorkspace *workspace, bool bypassDepend } } - // TODO_TODO_TODO Dependencies between projects ************************************************************************* + // Dependencies between projects + for (std::map::const_iterator pr_it = projects.begin(), pr_end = projects.end(); pr_it != pr_end; ++pr_it) + { + const std::string &projectName = pr_it->first; + CPipelineProject *project = pr_it->second; + std::map &builtTaskByPlugin = builtTaskByProjectAndPlugin[projectName]; + std::vector dependentProjects; + project->getValues(dependentProjects, "DependentProjects"); + for (std::vector::iterator it2 = dependentProjects.begin(), end2 = dependentProjects.end(); it2 != end2; ++it2) + { + const std::string &dependentProject = NLMISC::CFile::getFilenameWithoutExtension(*it2); + std::map >::iterator dependencyTasksIt = builtTaskByProjectAndPlugin.find(dependentProject); + if (dependencyTasksIt == builtTaskByProjectAndPlugin.end()) + { + nlwarning("Project '%s' depends on project '%s' which does not exist in this workspace", projectName.c_str(), dependentProject.c_str()); + } + else + { + for (std::map::iterator cur_it = builtTaskByPlugin.begin(), cur_end = builtTaskByPlugin.end(); cur_it != cur_end; ++cur_it) + { + CBuildTaskInfo *currentTask = cur_it->second; + for (std::map::iterator dep_it = dependencyTasksIt->second.begin(), dep_end = dependencyTasksIt->second.end(); dep_it != dep_end; ++dep_it) + { + currentTask->Dependencies.push_back(dep_it->second->Id.Sub.Task); + } + } + } + } + } + m_Mutex.unlock(); } @@ -400,7 +430,7 @@ void CBuildTaskQueue::sortBuildableTaskListByMostWaitingDependents(std::vector::size_type i = 0; i < dependentsCache.size() - 1; ++i) + for (ptrdiff_t i = 0; i < (ptrdiff_t)dependentsCache.size() - 1; ++i) { if (dependentsCache[i + 1] > dependentsCache[i]) { diff --git a/code/nel/tools/pipeline/service/pipeline_project.cpp b/code/nel/tools/pipeline/service/pipeline_project.cpp index 84a4f5867..76000c679 100644 --- a/code/nel/tools/pipeline/service/pipeline_project.cpp +++ b/code/nel/tools/pipeline/service/pipeline_project.cpp @@ -68,7 +68,7 @@ bool CPipelineProject::getValue(std::string &result, const std::string &name) } if (!valueElm) { - nlwarning("Node '%s' not found in '%s', valueElm returned NULL, probably using default value", name.c_str(), m_Form->getFilename().c_str()); + nlwarning("Node '%s' not found in '%s', valueElm NULL, probably using default value", name.c_str(), m_Form->getFilename().c_str()); return false; } std::string value; @@ -100,6 +100,11 @@ bool CPipelineProject::getValues(std::vector &resultAppend, const s nlwarning("Node '%s' not found in '%s'", name.c_str(), m_Form->getFilename().c_str()); return false; } + if (!elm) + { + nlwarning("Node '%s' not found in '%s', elm NULL, probably using default value", name.c_str(), m_Form->getFilename().c_str()); + return false; + } uint size; if (!elm->getArraySize(size)) { diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin index f45d28c58..833197280 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin @@ -22,6 +22,12 @@ + + + + + + @@ -50,5 +56,10 @@ Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Description = Builds comp Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Handler = CProcessTextureDDS Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Info = CProcessTextureDDSInfo Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Process = TextureDDS -Sat Aug 04 15:33:08 2012 (kaetemi) formName Resized = 3 +Sat Aug 04 15:33:08 2012 (kaetemi) formName Resized = 3 +Sat Aug 04 21:08:26 2012 (kaetemi) .ProcessHandlers[3].Description = Builds a big nel package +Sat Aug 04 21:08:26 2012 (kaetemi) .ProcessHandlers[3].Handler = CProcessPackageBNP +Sat Aug 04 21:08:26 2012 (kaetemi) .ProcessHandlers[3].Info = CProcessPackageBNPInfo +Sat Aug 04 21:08:26 2012 (kaetemi) .ProcessHandlers[3].Process = PackageBNP +Sat Aug 04 21:08:26 2012 (kaetemi) formName Resized = 4 diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/ryzom_core.pipeline_workspace b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/ryzom_core.pipeline_workspace index 3cfada30e..3f9683079 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/ryzom_core.pipeline_workspace +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/ryzom_core.pipeline_workspace @@ -4,6 +4,7 @@ + @@ -22,5 +23,9 @@ Sat Feb 18 23:23:17 2012 (Kaetemi) .Description = Ryzom Core Test Sat Feb 18 23:23:26 2012 (Kaetemi) .Description = Ryzom Core Sat Mar 03 10:58:02 2012 (Kaetemi) .Plugins[0] = plugin_nel.pipeline_plugin Sat Mar 03 10:58:02 2012 (Kaetemi) .Plugins[1] = plugin_max.pipeline_plugin -Sat Mar 03 10:58:02 2012 (Kaetemi) formName Resized = 2 +Sat Mar 03 10:58:02 2012 (Kaetemi) formName Resized = 2 +Sat Aug 04 21:04:25 2012 (kaetemi) .Projects[1] = interfaces.pipeline_package +Sat Aug 04 21:04:25 2012 (kaetemi) formName Resized = 2 +Sat Aug 04 21:09:02 2012 (kaetemi) .Projects[0] = interfaces.pipeline_package +Sat Aug 04 21:09:02 2012 (kaetemi) .Projects[1] = common_interface.pipeline_project