diff options
author | Samuel FORGIONE | 2015-07-07 07:19:51 +0200 |
---|---|---|
committer | Samuel FORGIONE | 2015-07-07 07:19:51 +0200 |
commit | 1f521ed4da3f75b595491c606e64838bbd55844e (patch) | |
tree | 943bdad336257d632723f3ff69b92369d6271f17 /README | |
download | aur-1f521ed4da3f75b595491c606e64838bbd55844e.tar.gz |
Initial import
Diffstat (limited to 'README')
-rw-r--r-- | README | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/README b/README new file mode 100644 index 000000000000..4121a012bd06 --- /dev/null +++ b/README @@ -0,0 +1,64 @@ +Very important point to have a full functionnal cocos2d-x install: + +******************* +** WARNING ** +******************* + * All cocos2d scripts use python2. Calling "python2 script" is not enough + as other submodule will be called with "env python" (which could point to python3). + cocos2d scripts will failed if called with python3. + + In order to use cocos2d wrapper correctly without forcing symlink python to be python2, + you can use this : https://wiki.archlinux.org/index.php/python#Dealing_with_version_problem_in_build_scripts + A first pattern I suggest is "/opt/cocos2d-x/*" + + +************************ +** CONFIGURATION ** +************************ + * In order to use android, you should define in your bashrc, zshrc, whateverrc : +export NDK_ROOT=/opt/android-ndk +export ANDROID_SDK_ROOT=/opt/android-sdk +export ANT_ROOT=/usr/bin + (Each path came with package aur/android-ndk aur/android-sdk and extra/apache-ant) + + + * Use "cocos" wrapper to create, compile, run your project... + "cocos" will echo you basic command + "cocos command" will echo you basic parameter for "command" + + Basic setup : + cocos new -l cpp -p com.firm.app myapp + cd myapp + cocos run -p android -j3 + cocos run -p linux -j3 + + Alternative 1 : + cocos new -l cpp -p com.firm.app myapp + mkdir linux-build && cd linux-build + cmake .. + ../bin/debug/linux/MyGame + + Alternative 2 (howewer compile failed near 70% on unfound malloc/free): + export CC=/usr/bin/clang + export CXX=/usr/bin/clang++ + cocos new -l cpp -p com.firm.app myapp + mkdir linux-build && cd linux-build + cmake -G Ninja -DCLANG=ON .. + ../bin/debug/linux/MyGame + + + * Personnal preference : + You can edit myapp/CMakeLists.txt to adjust personnal preference + (and speed up compile time, avoiding unnecessary things) + Here my personnal customisation : +set(DEBUG_MODE OFF CACHE BOOL "Debug or release? Release!") +set(BUILD_EXTENSIONS OFF CACHE BOOL "Turn off build extension library") +set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Turn off build editor support for spine") +set(BUILD_EDITOR_COCOSTUDIO OFF CACHE BOOL "Turn off build editor support for cocostudio") +set(BUILD_EDITOR_COCOSBUILDER OFF CACHE BOOL "Turn off build editor support for cocosbuilder") +set(BUILD_CPP_TESTS OFF CACHE BOOL "Turn off build TestCpp samples") +set(BUILD_LUA_LIBS OFF CACHE BOOL "Turn off build lua libraries") +set(BUILD_LUA_TESTS OFF CACHE BOOL "Turn off build TestLua samples") + +I think that's all for the moment. +I hope you'll enjoy as mush as I am ! |