Best approach to updating existing 3.13 project to 3.15.1

I have an existing project which uses cocos2d-x 3.13, and would like to update to 3.15.1. I’ve created a test project with 3.15.1. Do I just copy the cocos2d folder over (after deleting the current one)?

When I copied the folder over in XCode, I think the folder automatically updates to reflect the new, modified, and deleted files. However, I’m getting an error with UIEditBox.h:

  • the “RETURN” value under EditBoxEndAction is an “unexpected identifier”

I’ve created a separate branch in my project for this. BTW, the main drivers for me to update, as I understand them are:

  1. some bugs have been fixed;
  2. edit text options may be better (UIEditBox, TextField, etc), which I really need;
  3. some audio improvements

if you have feeling good at current version (3.13), don’t update it, because you can get some bugs. Take care of your work!

You can’t just always copy. You should also double check AppDelegate, RootViewController, etc for additions. Also, sometimes XCode build settings change. I usually always make a cocos new ... and check out the build settings of a new project and see what has changed.

2 Likes

Because of time constraints, I’d like to stay with 3.13 for this first release. However, I have a cross-platform issue that seems to be resolved in 3.15 but not 3.13. I don’t know how to get a listing of files in the writeable area. Basically, I want to be able to search for “.csv” files and “.lgs” files and display them in a list screen I’ll create.

Anyone know if that can be done in 3.13? 3.15 has FileUtils.listFiles(path), but 3.13 doesn’t have that.

The only other thing I want, but I think is in 3.13 is the ability to run concurrent audio sounds (so I can add an ambient crowd noise) and change their volumes independently. But that feature can wait, if necessary.

BTW, I’m going to try to just copy CCFileUtils and tinyfile to my 3.13 project. Sure hope this works!

Quick update - copying those to my 3.13 project works when I run in the iOS simulator. Will be testing in Windows and on my iPhone device soon.

[Update - copying the 3.15 FileUtils and tinyfile to my project work great on iOS and Windows. Now to see if I can implements a sort of “file browser”]

Create a new project using 3.13 and commit it in a new git repository. Then create a new project using 3.15 and commit it in that same git repository.

Now you can easily see a ‘diff’ using sourcetree or any other git GUI app and check what all has changed in example app and project files (everything except the main cocos2d folder).

Copy-Replace the main coco2d folder and manually update any minor changes in project files or example app.

Thanks for this suggestion! I’ve had to step away for awhile, but now I’ll try these steps with 3.16 over the next few weeks (I have only weekends free now), and let you know.

BTW, I’ve been using Visual Studio 2013. Is that still recommended if I’m successful with migrating to cocos2d-x 3.16, or are people updating to a newer VS, too?

Ideally, I’d like to finish all migrations before March, so I can start tackling the next version of my game. I’d also like to look into precompiling cocos2d-x after I get everything else going.

Thanks again!

2 Likes

Hey, I want to thank you for this suggestion. I’ve finally gotten a break from my job and life, and am tackling this this weekend, hoping to get my project working with 3.16. Thanks again!

1 Like