Disk space used by new projects

Hello folks.

I have an issue about the project creation.

My development environment is Linux, and I’m using Ubuntu 15.04 right now. I installed cocos2d-x v3.6 following this tutorial but then I realized, this was just for building the tests not the actual library. Then I run setup.py script in the root folder, I skipped all path prompts since I don’t have Android NDK and SDK installed, but I finished this process without any errors.

After the installation process, I created a new project using cocos command line tool’s new command and try to build it. But wait, it’s start to build it with whole cocos2d library! It took me like 10 minutes for the first build and my simple HelloWorld project’s build folder was 27mb! Then I realized, new projects are coming with their own cocos2d source codes include, and compiles into same executable with the actual project.

Now I’m thinking am I missed something during installation process or this is the default way for all new cocos2d-x projects? Because 27mb disk space for empty projects seems too much to me, and building the whole library into project’s executable instead of providing shared libraries is some kind of weird way of deploying -at least for desktops- I guess.

I make my Google searches for this situation and find a way to delete cocos2d folder from my project’s root and link to a general one, but still it compiles into one executable. And I don’t want to make further hacks with a tool that I’m using for the first time.

Actually I can live with that if it’s the default way but another thing is, my development folder is now like 800mb, and I’m not sure which files can I include to my .gitignore so that I don’t have to push a huge amount of data for remote repositories. Is there any default .gitignore for cocos2d-x projects?

Thank you!

Yeah that’s how it does it by default. I change things however and remove the cocos2d folder created by cocos new and use git submodule to add my fork of cocos2d-x. That way the project size is very small, at the slight expense of set-up time whenever I need to create the project somewhere.

Here is my .gitignore file, but I develop for Mac, iOS, Win32 and Android and not for Linux, so it might not be any good to you, but basically you just need to ignore any object or executable files within your project (you will know which ones after your first build and doing a git status):

 # Xcode
 xcuserdata/
 
 # Visual Studio
 *.sdf
 *.suo
 proj.win32/Debug.win32/
 
 # Eclipse
 proj.android/bin/
 proj.android/libs/
 proj.android/obj/