Recreating projects - best practices

I have created a project.

I have setup CMake files so that I can regenerate it across platforms.

In the project folder is the cocos folder which I have excluded from my repos.

A contributor has picked the project up and generated the Windows build. In order to do so they created a new project and copied the cocos folder into his repos src. Is this the correct process?

If I was to update my version of cocos2dx from the GitHub repos. What is the process of updating the project. Same as above?

Is there an easy way to refresh any of the templated results in the created project. Ie the boiler plate osx/iOS/windows code files etc… Or again is it just create a new project and copy the files over?

Have you considered creating a link to the cocos folder instead of copying it over? Install cocos, set it up, and then just create a link to the /cocos2d-x_install_folder/cocos => /yourproject/cocos2d. With the use of CMake and out-of-source builds, the cocos2d folder in your project won’t be affected any time you build.

This would also allow you to switch over to another version of cocos2d-x very quickly in case you want to test a new version etc. It’s just a matter of re-creating the link to point elsewhere.

1 Like

On my team we have a fork of the cocos2d repo and add it to the project as a submodule.
Submodules aren’t bullet proof but atleast is easy to get new members working on the project without having to copy stuff by hand.

I will retry that, I did try that that first time around and had problems… but it might have been late! :slight_smile: