2013年9月3日 星期二

Motodev Studio 5.0 in linux(help you debug native c++)

ref. http://fatalfeel.blogspot.tw/2013/09/debug-cocos2d-in-c-android-ndk-eclipse.html
ref. http://www.motorola.com/sites/motodev/library/motodev_core_plugins.html
ref. http://developer.android.com/tools/devices/emulator.html#acceleration


1. Download Android-Sdk, Sdk Platform-tools, Ndk
http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
http://dl.google.com/android/repository/platform-tools_r12-linux.zip
extract to /usr/local/android-sdk-linux

http://www.crystax.net/en/download
download android-ndk-r7-crystax-5.beta3-linux-x86.tar.bz2
extract to /usr/local/android-ndk-r7-crystax-5.beta3

SDK Tools, Revision 20.0.3 (August 2012)
Dependencies:
* Android SDK Platform-tools revision 12 or later.
* If you are developing in Eclipse with ADT,
note that the SDK Tools r20.0.3 is designed for use with ADT 20.0.3
MotoDev Studio 5.0 needs "ADT 20.0.3" exactly

2. Download Eclipse Classic 4.2.1 linux 32bits

3. root@ubuntu:~# apt-get install git-core
root@ubuntu:~# git clone https://android.googlesource.com/platform/tools/motodev.git motodev_core_plugins

4. root@ubuntu:/usr/local/MotoStudio# ./eclipse
point a temp path to workspace

5. install new software
[Help] -> [Install new software]

(1)Juno
http://download.eclipse.org/releases/juno
Collaboration
Database Development
General Purpose Tools -> Memory Analyzer
Web, XML, JavaEE and OSGi Enterprise Development -> Eclipse 'XML' Editors and Tools
no restart

(2)ADT
http://dl.google.com/android/ADT-20.0.3.zip
no restart

(3)Sequoyah
http://download.eclipse.org/sequoyah/updates/2.1/2.1.1.N20120718-0509
uncheck [Group Items By Category]
[select all]
After plugins installed, restart eclipse, check 'Svn-Kit-1.3.8' then [Select All] to install

6. switch Workspace
[File] -> [Switch Workspace] -> [other]
point a new clean path to workspace

7.
[Window] -> [Preferences] -> [android] -> [sdk location] = /usr/local/android-sdk-linux
[NDK] -> [ndk location] = /usr/local/android-ndk-r7-crystax-5.beta3

8. API Baselines
[Window] -> [Preferences] -> [plug-in development] -> [Api Baselines]
click [Add Baseline] button

[Name:] = 'current'

/*make sure that the Location field is pointed at your current eclipse install path*/
[Location:] = /usr/local/MotoStudio

click [Reset] button
Click [Finish] to save, click [OK] to close

9. Import option
[File] -> [Import] -> [General] -> [Existing Projects into Workspace]
[select root directory:] = /root/MotoGit/motodev_core_plugins
uncheck follows
com.motorola.studio.android.linux.x86_64
com.motorola.studio.android.macosx
com.motorola.studio.android.win32.x86
com.motorola.studio.android.win32.x86_64

10.build motodev_core_plugins
uncheck [Project] -> [build autimatically]
check [Project] -> [Clean] -> [start a build immediately] then click [OK] button

11. Export option
[File] -> [Export] -> [Plug-in Development] -> [Deployable features]
click [Select all]
type a directory to export

12. install moto plugins
[Help] -> [Install new software]
[Name:] MotoDev plugins
[Location:] file:///root/MotoResource/export_motodev_plugins

uncheck [Group Items By Category]
[select all:]
install

13. Android Sdk Manager
Install
(1)[Android SDK Platform-tools], always do not update [Android SDK Tools]
(2)[Android 2.3.3(API 10)] -> [SDK Platform] only

14. fixed PermGen space error
modify eclipse.ini, if execute file name changed then need rename to [filename].ini
{
--launcher.XXMaxPermSize
512m
-vmargs
-Xms256m
-Xmx512m
-XX:PermSize=256M
-XX:MaxPermSize=256M
}

15.Change Package Explorer font size
Search e4_default_gtk.css of [Home]/MotoStudio
.MPartStack
{
font-size: 9; //here
swt-simple: false;
swt-mru-visible: false;
}

16.motostudio 5.0 download
http://www.mediafire.com/?ejwmzwzc4o3vm14
http://www.mediafire.com/?70iimg17npy1j1g
http://www.mediafire.com/?fq25fqhgwznpp6p