I’ve just tried the latest V3 RC. I’ve created a new cross-platform project and found out that now the project directory contains ‘cocos2d’ directory which duplicates entirely the codebase of cocos2d-x.
SERIOUSLY??
How do we now supposed to update the codebase of cocos2d-x when a new version or bugfix or hotfix or whatever is released? Recreate the project?
I hope I’m just don’t understand something. Otherwise you definitely make it wrong.
Sorry, but I think that all the benefits you’ve listed are teared down by one serious drawback: there is no easy way to update the engine’s codebase.
In v2.x I could do ‘git pull’ and that’s all.
In v3.x we’ll have to do that manually. That’s error-prone and inconvenient.
@zhangxm
i agree with @dotsquid even opened bug request when this option was presented
my solution is simple :
just add new flag in the project-creator script for us the developers to decide
if we want to copy the cocos2d tree or not .
Because our template will use the folder structure, for example, Xcode needs these paths to work. So we can not just have an argument then, it can work. And we will offer an IDE which also needs the folder structure.
Is it possible to make the engine’s directory ( ‘cocos2d’ ) in the project’s directory as a git’s submodule?
The script which creates a new project asks the user if (s)he wants to use a repository or not. If the user chooses the repository the script may ask to select which one should be used: master, dev or user’s fork, and then clones it. If the user doesn’t want to use a repository, just copy the files as you do now in v.3 RC.
This will allow us to update the engine’s codebase easily.
I totally agree with @dotsquid, it’s hard to update cocos2d-x if we are copying the engine’s source code as a new project. It should have another way to create new project inside the cocos2d-x directory
I too want to be able to update the base code easily.
Maybe an option in the cocos binary to ‘update’ the base engine (removing the local copy, and replace the files). It should work if the sub-projects don’t change folder.
Instead of v2 that all game projects must be under sub folder of cocos2d, v3 copies the cocos library to corresponding game projects.
It looks better because now a project includes cocos2d library (v3), not a library has a project (v2). But still it could be further improved by using reference link as mentioned by others.
So developer can switch their cocos reference (Dev/Master/etc) whenever necessary
@dotsquid
But this also have problem, should we clone all codes? Because new project doesn’t need tests and other files.
It is hard to use reference, especially on windows. And if we use reference, it will cause error when building Android projects. Because when using a reference, then what does the path of .. of the reference?
Are you aware of git submodules? http://git-scm.com/book/en/Git-Tools-Submodules
I guess you should, because submodules are used in v.2 for some features, like javascript support etc (I don’t remember exactly, since I don’t use them).
Just make the core of the engine as a submodule and include it into the main repo.
I am not familiar in building android solution. But isn’t that using environment variable could work?
Just kindly note that Ant will be replaced by Gradle, which is officially supported by Google to be next advanced build system for android. Maybe it is also good timing to check it out (also Android Studio)?