Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
882B

  1. from generation.hasSectionGenerated import *
  2. from generation.sectionFunctions import *
  3. from generation.sectionNames import *
  4. def generateCoreSectionsSetup(c):
  5. fileName = f"{c.dir}/templates/core-section"
  6. lines = c.readFile(fileName)
  7. fmtCore = lines[1]
  8. fmtPlatform = lines[2]
  9. items = []
  10. sections = sectionNames(c)
  11. for name in sections:
  12. # Пропускаем секции, не относящиеся к установке ядра.
  13. funcs = sectionFunctions(name, c)
  14. if "setupCore" not in funcs:
  15. continue
  16. ln = fmtCore.replace("%NAME%", name)
  17. items.append(ln)
  18. # Генерированная секция.
  19. # Должна быть добавлена последней.
  20. if hasSectionGenerated(c.structure.core):
  21. items.append(fmtPlatform)
  22. c.coreSectionsSetup = "\n".join(items)