summarylogtreecommitdiffstats
path: root/README
blob: 1af775b5380d7cf631f780fa1b6f236e72016ff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
************************
**    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 (working on 3.5, to adujst if necessary) :
   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 !