axmol/tools/project-creator/create_project.py

27 lines
708 B
Python
Raw Normal View History

#!/usr/bin/python
# create_project.py
2013-12-24 09:42:37 +08:00
#coding=utf-8
# Create cross-platform cocos2d-x project
# Copyright (c) 2012 cocos2d-x.org
2013-12-24 09:42:37 +08:00
# Author: chuanwei
import sys
2013-12-24 15:07:51 +08:00
from module.ui import TkCocosDialog
2013-12-24 09:42:37 +08:00
from module.core import CocosProject
2013-12-24 09:42:37 +08:00
# ------------ main --------------
2013-07-26 10:50:37 +08:00
if __name__ == '__main__':
2013-12-24 15:07:51 +08:00
"""
There have double ways to create cocos project.
1.UI
2.console
#create_project.py -n MyGame -k com.MyCompany.AwesomeGame -l javascript -p c:/mycompany
"""
2013-12-24 09:42:37 +08:00
if len(sys.argv)==1:
2013-12-24 15:07:51 +08:00
TkCocosDialog()
2013-12-24 09:42:37 +08:00
else:
project = CocosProject()
name, package, language, path = project.checkParams()
project.createPlatformProjects(name, package, language, path)