axmol/tools/project-creator/create_project.pyw

28 lines
770 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 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
2013-12-25 15:53:47 +08:00
#create_project.py --help
2013-12-24 15:07:51 +08:00
#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-25 15:53:47 +08:00
from module.ui import createTkCocosDialog
2013-12-25 10:24:46 +08:00
createTkCocosDialog()
2013-12-24 09:42:37 +08:00
else:
2013-12-25 15:53:47 +08:00
from module.core import CocosProject
2013-12-24 09:42:37 +08:00
project = CocosProject()
name, package, language, path = project.checkParams()
project.createPlatformProjects(name, package, language, path)