2013-02-18 22:09:42 +08:00
|
|
|
#!/usr/bin/python
|
|
|
|
# create_project.py
|
2013-12-24 09:42:37 +08:00
|
|
|
#coding=utf-8
|
2013-02-18 22:09:42 +08:00
|
|
|
# Create cross-platform cocos2d-x project
|
|
|
|
# Copyright (c) 2012 cocos2d-x.org
|
2013-12-24 09:42:37 +08:00
|
|
|
# Author: chuanwei
|
2013-02-18 22:09:42 +08:00
|
|
|
|
|
|
|
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-02-22 16:32:12 +08:00
|
|
|
|
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)
|
2013-02-18 22:09:42 +08:00
|
|
|
|