Skip to content

Commit

Permalink
Merge pull request #8 from dumganhar/master
Browse files Browse the repository at this point in the history
Refactor folder structure, put some stuffs to 'frameworks' folder.
  • Loading branch information
James Chen committed Feb 27, 2014
2 parents db855b7 + 86118ea commit 846a0cc
Show file tree
Hide file tree
Showing 1,612 changed files with 6,994 additions and 477 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,13 @@ DerivedData/
.Target-Release/

# Ignore files built by blackberry
Simulator/
Device-Debug/
Device-Release/

# Ignore vim swaps
*.swp
*.swo

# Ignore files created by create_project.py
projects/

# Ignore config files in javascript bindings generator
tools/tojs/user.cfg
# ... userconf.ini generated if running from tools/tojs
Expand All @@ -92,9 +88,6 @@ tools/jenkins_scripts/mac/android/userconf.ini
# CTags
tags

# ignore files, created with make-all-linux-project script
/lib

# Cmake files
CMakeCache.txt
CMakeFiles
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[submodule "cocos2d-x"]
path = jsb/cocos2d-x
[submodule "frameworks/js-bindings/cocos2d-x"]
path = frameworks/js-bindings/cocos2d-x
url = git://github.com/cocos2d/cocos2d-x.git
[submodule "cocos2d-html5"]
path = cocos2d-html5
[submodule "frameworks/cocos2d-html5"]
path = frameworks/cocos2d-html5
url = git://github.com/cocos2d/cocos2d-html5.git
[submodule "tools/cocos2d-console"]
path = tools/cocos2d-console
Expand Down
53 changes: 29 additions & 24 deletions jsb/build/android-build.py → build/android-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,45 +118,50 @@ def copy_resources(app_android_root):
if os.path.isdir(assets_dir):
shutil.rmtree(assets_dir)

# copy resources(cpp samples and lua samples)
# copy resources
os.mkdir(assets_dir)
resources_dir = os.path.join(app_android_root, "../Resources")
if os.path.isdir(resources_dir):
copy_files(resources_dir, assets_dir)

# jsb samples should copy javascript files and resources(shared with cocos2d-html5)
resources_dir = os.path.join(app_android_root, "../../bindings/script")
copy_files(resources_dir, assets_dir)
assets_res_dir = assets_dir + "/res";
assets_scripts_dir = assets_dir + "/src";
os.mkdir(assets_res_dir);
os.mkdir(assets_scripts_dir);

resources_dir = os.path.join(app_android_root, "../../../tests")
copy_files(resources_dir, assets_dir)
resources_dir = os.path.join(app_android_root, "../../res")
copy_files(resources_dir, assets_res_dir)

resources_dir = os.path.join(app_android_root, "../../src")
copy_files(resources_dir, assets_scripts_dir)

# js project should copy js script
resources_dir = os.path.join(app_android_root, "../../../../frameworks/js-bindings/bindings/script")
copy_files(resources_dir, assets_dir)

def build_samples(ndk_build_param,android_platform,build_mode):
def build(ndk_build_param,android_platform,build_mode):

ndk_root = check_environment_variables()
sdk_root = None
select_toolchain_version()

current_dir = os.path.dirname(os.path.realpath(__file__))
cocos_root = os.path.join(current_dir, "../cocos2d-x")
cocos_root = os.path.join(current_dir, "../frameworks/js-bindings/cocos2d-x")

app_android_root = os.path.join(current_dir, "../samples/js-tests/project/proj.android")
copy_resources(app_android_root)

if android_platform is not None:
sdk_root = check_environment_variables_sdk()
if android_platform.isdigit():
android_platform = 'android-'+android_platform
else:
print 'please use vaild android platform'
exit(1)
sdk_root = check_environment_variables_sdk()
if android_platform.isdigit():
android_platform = 'android-'+android_platform
else:
print 'please use vaild android platform'
exit(1)
if build_mode is None:
build_mode = 'debug'
build_mode = 'debug'
elif build_mode != 'release':
build_mode = 'debug'

app_android_root = os.path.join(cocos_root, '../tests-project/proj.android')
copy_resources(os.path.join(cocos_root, app_android_root))
do_build(cocos_root, ndk_root, app_android_root, ndk_build_param,sdk_root,android_platform,build_mode)

do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)

# -------------- main --------------
if __name__ == '__main__':
Expand Down Expand Up @@ -184,7 +189,7 @@ def build_samples(ndk_build_param,android_platform,build_mode):
(opts, args) = parser.parse_args()

try:
build_samples(opts.ndk_build_param,opts.android_platform,opts.build_mode)
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
except Exception as e:
print e
sys.exit(1)
Original file line number Diff line number Diff line change
@@ -1,59 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d-x\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\frameworks\js-bindings\cocos2d-x\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d-x\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\frameworks\js-bindings\cocos2d-x\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\cocos2d-x\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\frameworks\js-bindings\cocos2d-x\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d-x\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\frameworks\js-bindings\cocos2d-x\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d-x\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\frameworks\js-bindings\cocos2d-x\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d-x\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\frameworks\js-bindings\cocos2d-x\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2d-x\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\frameworks\js-bindings\cocos2d-x\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d-x\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\frameworks\js-bindings\cocos2d-x\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos2d-x\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\frameworks\js-bindings\cocos2d-x\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d-x\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\frameworks\js-bindings\cocos2d-x\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos2d-x\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\frameworks\js-bindings\cocos2d-x\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libJSBinding", "libJSBinding", "{10F98A57-B9A1-47DA-9FBA-12D328E72ED1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "..\tests-project\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
ProjectSection(ProjectDependencies) = postProject
{79D34511-E54E-410A-8BBA-EF175AD6C695} = {79D34511-E54E-410A-8BBA-EF175AD6C695}
{21070E58-EEC6-4E16-8B4F-6D083DF55790} = {21070E58-EEC6-4E16-8B4F-6D083DF55790}
{E78CDC6B-F37D-48D2-AD91-1DB549497E32} = {E78CDC6B-F37D-48D2-AD91-1DB549497E32}
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE} = {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}
{9A844C88-97E8-4E2D-B09A-E138C67D338B} = {9A844C88-97E8-4E2D-B09A-E138C67D338B}
{625F7391-9A91-48A1-8CFC-79508C822637} = {625F7391-9A91-48A1-8CFC-79508C822637}
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD} = {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC} = {3BEC13F5-E227-4D80-BC77-1C857F83BCFC}
EndProjectSection
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "..\samples\js-tests\project\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\frameworks\js-bindings\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForBuilder", "..\bindings\proj.win32\libJSBindingForBuilder.vcxproj", "{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForBuilder", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForBuilder.vcxproj", "{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\bindings\proj.win32\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\bindings\proj.win32\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForGui", "..\bindings\proj.win32\libJSBindingForGui.vcxproj", "{9A844C88-97E8-4E2D-B09A-E138C67D338B}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForGui", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForGui.vcxproj", "{9A844C88-97E8-4E2D-B09A-E138C67D338B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\bindings\proj.win32\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForNetwork", "..\bindings\proj.win32\libJSBindingForNetwork.vcxproj", "{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForNetwork", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForNetwork.vcxproj", "{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForSpine", "..\bindings\proj.win32\libJSBindingForSpine.vcxproj", "{E78CDC6B-F37D-48D2-AD91-1DB549497E32}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForSpine", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForSpine.vcxproj", "{E78CDC6B-F37D-48D2-AD91-1DB549497E32}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForStudio", "..\bindings\proj.win32\libJSBindingForStudio.vcxproj", "{79D34511-E54E-410A-8BBA-EF175AD6C695}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForStudio", "..\frameworks\js-bindings\bindings\proj.win32\libJSBindingForStudio.vcxproj", "{79D34511-E54E-410A-8BBA-EF175AD6C695}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Loading

0 comments on commit 846a0cc

Please sign in to comment.