diff --git a/samples/Cpp/AssetsManagerTest/proj.android/README.md b/samples/Cpp/AssetsManagerTest/proj.android/README.md index e781eec14e..64c1ce2651 100644 --- a/samples/Cpp/AssetsManagerTest/proj.android/README.md +++ b/samples/Cpp/AssetsManagerTest/proj.android/README.md @@ -16,66 +16,69 @@ There are two ways of building Android projects. #### Features: 1. Complete workflow from Eclipse, including: - a. Build C++. - b. Clean C++. - c. Build and Run whole project. - d. Logcat view. - e. Debug Java code. - f. Javascript editor. - g. Project management. + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. 2. True C++ editing, including: - a. Code completion. - b. Jump to definition. - c. Refactoring tools etc. - d. Quick open C++ files. + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. -#### Setup Eclipse Environment +#### Setup Eclipse Environment (only once) **NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. -1. Download Eclipse ADT bundle from [Google](http://developer.android.com/sdk/index.html) +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) **OR** Install Eclipse with Java. Add ADT and CDT plugins. -2. Set up Variables: - 1. Path Variable **COCOS2DX**: - A. Eclipse->Preferences->General->Workspace->**Linked Resources** - B. Click **New** button to add a Path Variable **COCOS2DX** pointing to the root cocos2d-x directory (Directory containing cocos2dx/ external/ tools/ scripting/ etc.). - - 2. C/C++ Environment Variable **NDK_ROOT**: - A. Eclipse->Preferences->General->C/C++->Build->**Environment**. - B. Click **Add** button and add a new variable **NDK_ROOT** pointing to the root NDK directory. +2. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) 3. Import libcocos2dx library project: - 1. File->new->Project..->Android Project From Existing Code. - 2. Click **Browse** button and open cocos2d-x/cocos2dx/platform/android/java directory. + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. 3. Click **Finish** to add project. - - #### Adding and running from Eclipse +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) -1. File->new->Project..->Android Project From Existing Code -2. **Browse** to cocos2d-x/cocos2dx/samples/Cpp/AssetsManagerTest/proj.android/ directory. +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` 3. Add the project 4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. ### Running project from Command Line -1. `cd cocos2d-x/samples/Cpp/AssetsManagerTest/proj.android/` -2. `export NDK_ROOT=/path/to/ndk` -3. `./build_native.sh` -4. `ant debug install` -5. If step 4 results in sdk.dir missing error then follow step 6-8. -6. `android list target` -7. `android update project -p . -t (id from step 6)` -8. `android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)` + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/samples/Cpp/HelloCpp/proj.android/README.md b/samples/Cpp/HelloCpp/proj.android/README.md index 2212724c10..64c1ce2651 100644 --- a/samples/Cpp/HelloCpp/proj.android/README.md +++ b/samples/Cpp/HelloCpp/proj.android/README.md @@ -16,66 +16,69 @@ There are two ways of building Android projects. #### Features: 1. Complete workflow from Eclipse, including: - a. Build C++. - b. Clean C++. - c. Build and Run whole project. - d. Logcat view. - e. Debug Java code. - f. Javascript editor. - g. Project management. + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. 2. True C++ editing, including: - a. Code completion. - b. Jump to definition. - c. Refactoring tools etc. - d. Quick open C++ files. + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. -#### Setup Eclipse Environment +#### Setup Eclipse Environment (only once) **NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. -1. Download Eclipse ADT bundle from [Google](http://developer.android.com/sdk/index.html) +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) **OR** Install Eclipse with Java. Add ADT and CDT plugins. -2. Set up Variables: - 1. Path Variable **COCOS2DX**: - A. Eclipse->Preferences->General->Workspace->**Linked Resources** - B. Click **New** button to add a Path Variable **COCOS2DX** pointing to the root cocos2d-x directory (Directory containing cocos2dx/ external/ tools/ scripting/ etc.). - - 2. C/C++ Environment Variable **NDK_ROOT**: - A. Eclipse->Preferences->General->C/C++->Build->**Environment**. - B. Click **Add** button and add a new variable **NDK_ROOT** pointing to the root NDK directory. +2. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) 3. Import libcocos2dx library project: - 1. File->new->Project..->Android Project From Existing Code. - 2. Click **Browse** button and open cocos2d-x/cocos2dx/platform/android/java directory. + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. 3. Click **Finish** to add project. - - #### Adding and running from Eclipse +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) -1. File->new->Project..->Android Project From Existing Code -2. **Browse** to cocos2d-x/cocos2dx/samples/Cpp/HelloCpp/proj.android/ directory. +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` 3. Add the project 4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. ### Running project from Command Line -1. `cd cocos2d-x/samples/Cpp/HelloCpp/proj.android/` -2. `export NDK_ROOT=/path/to/ndk` -3. `./build_native.sh` -4. `ant debug install` -5. If step 4 results in sdk.dir missing error then follow step 6-8. -6. `android list target` -7. `android update project -p . -t (id from step 6)` -8. `android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)` + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/samples/Cpp/SimpleGame/proj.android/README.md b/samples/Cpp/SimpleGame/proj.android/README.md index 1de98c0905..64c1ce2651 100644 --- a/samples/Cpp/SimpleGame/proj.android/README.md +++ b/samples/Cpp/SimpleGame/proj.android/README.md @@ -16,66 +16,69 @@ There are two ways of building Android projects. #### Features: 1. Complete workflow from Eclipse, including: - a. Build C++. - b. Clean C++. - c. Build and Run whole project. - d. Logcat view. - e. Debug Java code. - f. Javascript editor. - g. Project management. + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. 2. True C++ editing, including: - a. Code completion. - b. Jump to definition. - c. Refactoring tools etc. - d. Quick open C++ files. + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. -#### Setup Eclipse Environment +#### Setup Eclipse Environment (only once) **NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. -1. Download Eclipse ADT bundle from [Google](http://developer.android.com/sdk/index.html) +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) **OR** Install Eclipse with Java. Add ADT and CDT plugins. -2. Set up Variables: - 1. Path Variable **COCOS2DX**: - A. Eclipse->Preferences->General->Workspace->**Linked Resources** - B. Click **New** button to add a Path Variable **COCOS2DX** pointing to the root cocos2d-x directory (Directory containing cocos2dx/ external/ tools/ scripting/ etc.). - - 2. C/C++ Environment Variable **NDK_ROOT**: - A. Eclipse->Preferences->General->C/C++->Build->**Environment**. - B. Click **Add** button and add a new variable **NDK_ROOT** pointing to the root NDK directory. +2. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) 3. Import libcocos2dx library project: - 1. File->new->Project..->Android Project From Existing Code. - 2. Click **Browse** button and open cocos2d-x/cocos2dx/platform/android/java directory. + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. 3. Click **Finish** to add project. - - #### Adding and running from Eclipse +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) -1. File->new->Project..->Android Project From Existing Code -2. **Browse** to cocos2d-x/cocos2dx/samples/Cpp/SimpleGame/proj.android/ directory. +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` 3. Add the project 4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. ### Running project from Command Line -1. `cd cocos2d-x/samples/Cpp/SimpleGame/proj.android/` -2. `export NDK_ROOT=/path/to/ndk` -3. `./build_native.sh` -4. `ant debug install` -5. If step 4 results in sdk.dir missing error then follow step 6-8. -6. `android list target` -7. `android update project -p . -t (id from step 6)` -8. `android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)` + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/samples/Cpp/TestCpp/proj.android/README.md b/samples/Cpp/TestCpp/proj.android/README.md index fba255eb7a..64c1ce2651 100644 --- a/samples/Cpp/TestCpp/proj.android/README.md +++ b/samples/Cpp/TestCpp/proj.android/README.md @@ -16,66 +16,69 @@ There are two ways of building Android projects. #### Features: 1. Complete workflow from Eclipse, including: - a. Build C++. - b. Clean C++. - c. Build and Run whole project. - d. Logcat view. - e. Debug Java code. - f. Javascript editor. - g. Project management. + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. 2. True C++ editing, including: - a. Code completion. - b. Jump to definition. - c. Refactoring tools etc. - d. Quick open C++ files. + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. -#### Setup Eclipse Environment +#### Setup Eclipse Environment (only once) **NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. -1. Download Eclipse ADT bundle from [Google](http://developer.android.com/sdk/index.html) +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) **OR** Install Eclipse with Java. Add ADT and CDT plugins. -2. Set up Variables: - 1. Path Variable **COCOS2DX**: - A. Eclipse->Preferences->General->Workspace->**Linked Resources** - B. Click **New** button to add a Path Variable **COCOS2DX** pointing to the root cocos2d-x directory (Directory containing cocos2dx/ external/ tools/ scripting/ etc.). - - 2. C/C++ Environment Variable **NDK_ROOT**: - A. Eclipse->Preferences->General->C/C++->Build->**Environment**. - B. Click **Add** button and add a new variable **NDK_ROOT** pointing to the root NDK directory. +2. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) 3. Import libcocos2dx library project: - 1. File->new->Project..->Android Project From Existing Code. - 2. Click **Browse** button and open cocos2d-x/cocos2dx/platform/android/java directory. + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. 3. Click **Finish** to add project. - - #### Adding and running from Eclipse +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) -1. File->new->Project..->Android Project From Existing Code -2. **Browse** to cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/ directory. +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` 3. Add the project 4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. ### Running project from Command Line -1. `cd cocos2d-x/samples/Cpp/TestCpp/proj.android/` -2. `export NDK_ROOT=/path/to/ndk` -3. `./build_native.sh` -4. `ant debug install` -5. If step 4 results in sdk.dir missing error then follow step 6-8. -6. `android list target` -7. `android update project -p . -t (id from step 6)` -8. `android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)` + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)