introduction

https://github.com/Piot/Project-Generator

Project-Generator makes the native IDE project files.

it supports Visual Studio(windows), Xcode(mac os x), makefile(linux) and so on.

it likes the GYP. but, it is smaller, simpler and easier to understand than GYP. its config option in a XML file is more readable than GYP input format file.

process in generate.py

  • parses arguments
  • project module creates target project
  • project parser module initials target project with xml node
  • generator module write to the project files with project write module

project.py

  • class SourceFileNode - all source files
  • class Dependecy - dependent projects
  • class Define - macros
  • class Settings - project settings likes include paths, defines, dependecies, libraries,framewoorks and so on
  • class configuration - inherit from Settings, it is a build Settings with a name such as "debug", "relase" and so on.
  • class Project - the project object
  • relationship
Project+- depandencies
       +- configurations
       +- settings-+-paths
                   +-defines
                   +-denpendecies
                   +-libraries
                   +-frameworks

project_object.py

project_parser.py

initial project object with xml node

project_path.py

operation about paths

project_write.py

  • class ProjectFileCreator:a Factory in where ProjectFileOutput is made.
  • class ProjectOutput:a controller of project file's indent
  • class ProjectFileOutput:inherit from ProjectOutput wrapper of file operation

generator

  • codeblocks.py
  • codelite.py
  • makefile.py makefile in Linux platform
  • visualc.py Visual Studio in Windows platform
  • xcode.py Xcode in Mac OS X platform
标签: python
日期: 2013-11-29 17:30:06, 11 years and 48 days ago
留言

回复不允许使用html标签

通过电子邮件通知我有后续评论.