Merge branch 'open_source' into google_internal
This commit is contained in:
@@ -1,11 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Quick semi-auto file to build Windows SDK tools.
|
# Quick semi-auto file to build Windows SDK tools.
|
||||||
#
|
#
|
||||||
# Limitations:
|
# Limitations and requirements:
|
||||||
# - Expects the emulator has been built first, will pick it up from prebuilt.
|
# - Expects the emulator has been built first, will pick it up from prebuilt.
|
||||||
# - Run in Cygwin
|
# - Run in Cygwin
|
||||||
# - Needs Cygwin package zip
|
|
||||||
# - Expects to have one of the existing SDK (Darwin or Linux) to build the Windows one
|
# - Expects to have one of the existing SDK (Darwin or Linux) to build the Windows one
|
||||||
|
# - Needs Cygwin packages: autoconf, bison, curl, flex, gcc, g++, git,
|
||||||
|
# gnupg, make, mingw-zlib, python, zip, unzip
|
||||||
|
# - Must NOT have cygwin package readline (its GPL license might taint the SDK if
|
||||||
|
# it gets compiled in)
|
||||||
|
# - Does not need a Java Development Kit or any other tools outside of cygwin.
|
||||||
|
# - If you think you may have Windows versions of tools (e.g. make) installed, it may
|
||||||
|
# reduce confusion levels to 'export PATH=/usr/bin'
|
||||||
|
|
||||||
set -e # Fail this script as soon as a command fails -- fail early, fail fast
|
set -e # Fail this script as soon as a command fails -- fail early, fail fast
|
||||||
|
|
||||||
@@ -41,6 +47,10 @@ function check() {
|
|||||||
# SDK number if you want, but not after, e.g these are valid:
|
# SDK number if you want, but not after, e.g these are valid:
|
||||||
# android_sdk_4242_platform.zip or blah_42_.zip
|
# android_sdk_4242_platform.zip or blah_42_.zip
|
||||||
#
|
#
|
||||||
|
# Note that the root directory name in the zip must match the zip
|
||||||
|
# name, too, so there's no point just changing the zip name to match
|
||||||
|
# the above format.
|
||||||
|
#
|
||||||
# SDK_NUMBER will be empty if nothing matched.
|
# SDK_NUMBER will be empty if nothing matched.
|
||||||
filename=`basename "$SDK_ZIP"`
|
filename=`basename "$SDK_ZIP"`
|
||||||
SDK_NUMBER=`echo $filename | sed -n 's/^.*_\([^_./]\+\)_[^_.]*\..*$/\1/p'`
|
SDK_NUMBER=`echo $filename | sed -n 's/^.*_\([^_./]\+\)_[^_.]*\..*$/\1/p'`
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include "dmtrace.h"
|
#include "dmtrace.h"
|
||||||
|
|
||||||
static const short kVersion = 2;
|
static const short kVersion = 2;
|
||||||
@@ -163,7 +164,7 @@ void DmTrace::parseAndAddFunction(int functionId, const char *name)
|
|||||||
// sig = "()I"
|
// sig = "()I"
|
||||||
|
|
||||||
// Find the first parenthesis, the start of the signature.
|
// Find the first parenthesis, the start of the signature.
|
||||||
char *paren = strchr(name, '(');
|
char *paren = (char*)strchr(name, '(');
|
||||||
|
|
||||||
// If not found, then add the original name.
|
// If not found, then add the original name.
|
||||||
if (paren == NULL) {
|
if (paren == NULL) {
|
||||||
@@ -180,7 +181,7 @@ void DmTrace::parseAndAddFunction(int functionId, const char *name)
|
|||||||
*paren = 0;
|
*paren = 0;
|
||||||
|
|
||||||
// Search for the last period, the start of the method name
|
// Search for the last period, the start of the method name
|
||||||
char *dot = strrchr(name, '.');
|
char *dot = (char*)strrchr(name, '.');
|
||||||
|
|
||||||
// If not found, then add the original name.
|
// If not found, then add the original name.
|
||||||
if (dot == NULL || dot == name) {
|
if (dot == NULL || dot == name) {
|
||||||
|
|||||||
@@ -1009,10 +1009,10 @@ void TraceReaderBase::ParseDexList(char *filename)
|
|||||||
// be freed by the caller after it is no longer needed.
|
// be freed by the caller after it is no longer needed.
|
||||||
static char *ExtractDexPathFromMmap(const char *mmap_path)
|
static char *ExtractDexPathFromMmap(const char *mmap_path)
|
||||||
{
|
{
|
||||||
char *end = rindex(mmap_path, '@');
|
const char *end = rindex(mmap_path, '@');
|
||||||
if (end == NULL)
|
if (end == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
char *start = rindex(mmap_path, '/');
|
const char *start = rindex(mmap_path, '/');
|
||||||
if (start == NULL)
|
if (start == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
int len = end - start;
|
int len = end - start;
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
<classpathentry kind="src" path="packages/providers/ImProvider/src"/>
|
<classpathentry kind="src" path="packages/providers/ImProvider/src"/>
|
||||||
<classpathentry kind="src" path="packages/providers/MediaProvider/src"/>
|
<classpathentry kind="src" path="packages/providers/MediaProvider/src"/>
|
||||||
<classpathentry kind="src" path="packages/providers/TelephonyProvider/src"/>
|
<classpathentry kind="src" path="packages/providers/TelephonyProvider/src"/>
|
||||||
<classpathentry kind="src" path="vendor/google/apps/Street/src"/>
|
|
||||||
<classpathentry kind="src" path="vendor/google/apps/YouTube/src"/>
|
|
||||||
<classpathentry kind="src" path="frameworks/base/awt"/>
|
<classpathentry kind="src" path="frameworks/base/awt"/>
|
||||||
<classpathentry kind="src" path="frameworks/base/cmds/am/src"/>
|
<classpathentry kind="src" path="frameworks/base/cmds/am/src"/>
|
||||||
<classpathentry kind="src" path="frameworks/base/cmds/input/src"/>
|
<classpathentry kind="src" path="frameworks/base/cmds/input/src"/>
|
||||||
|
|||||||
@@ -11,104 +11,53 @@ The ADT feature is composed of four plugins:
|
|||||||
- com.android.ide.eclipse.ddms:
|
- com.android.ide.eclipse.ddms:
|
||||||
A plugin version of the tool DDMS
|
A plugin version of the tool DDMS
|
||||||
|
|
||||||
Because the DDMS plugin source code is not yet released, compiling the
|
Each of these live in development/tools/eclipse/plugins/
|
||||||
ADT/Common/Editors plugins requires to install the DDMS plugin in eclipse.
|
|
||||||
|
|
||||||
Basic requirements:
|
2 Features are used to distribute the plugins:
|
||||||
|
ADT, which contains ADT, ddms, common
|
||||||
|
Editors, which contains Editors, and requires the ADT feature.
|
||||||
|
|
||||||
|
The feature projects are located in development/tools/eclipse/features/
|
||||||
|
|
||||||
|
Finally 2 site projects are located in development/tools/eclipse/sites/
|
||||||
|
internal: is a site containing the features mentioned above as well as a test feature.
|
||||||
|
external: contains only the ADT and Editors features.
|
||||||
|
|
||||||
|
|
||||||
|
Basic requirements to develop on the plugins:
|
||||||
- Eclipse 3.3 or 3.4 with JDT and PDE.
|
- Eclipse 3.3 or 3.4 with JDT and PDE.
|
||||||
- DDMS plugin installed and running.
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------
|
----------------------------------
|
||||||
1- Install the DDMS plugin
|
1- Loading the projects in Eclipse
|
||||||
--------------------------
|
----------------------------------
|
||||||
|
|
||||||
The easiest way to setup the DDMS plugin in your Eclipse environment is to
|
The plugins projects depend on jar files located in the Android source tree,
|
||||||
install the ADT features (see SDK documentation for details) and then remove
|
or, in some cases, built by the Android source.
|
||||||
the following features and plugins:
|
|
||||||
|
|
||||||
- <eclipse-directory>/features/com.android.ide.eclipse.adt_x.x.x.jar
|
Also, some source code (ddms) is located in a different location and needs to
|
||||||
- <eclipse-directory>/plugins/com.android.ide.eclipse.adt_x.x.x.jar
|
be linked into the DDMS plugin source.
|
||||||
- <eclipse-directory>/plugins/com.android.ide.eclipse.common_x.x.x.jar
|
|
||||||
- <eclipse-directory>/plugins/com.android.ide.eclipse.editors_x.x.x.jar
|
|
||||||
|
|
||||||
This will leave you with only the DDMS plugin installed in your Eclipse
|
To automatize all of this, cd into development/tools/eclipse/scripts/
|
||||||
distribution.
|
and run create_all_symlinks.sh
|
||||||
|
|
||||||
|
Once this has been done successfully, use the import project action in Eclipse
|
||||||
|
and point it to development/tools/eclipse. It will find all the projects in the
|
||||||
|
sub folder.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------
|
-----------------------------------------------
|
||||||
2- Setting up the ADT/Common project
|
2- Launching/Debugging the plugins from Eclipse
|
||||||
-------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
- Download the ADT/Common/Editors source.
|
- Open Debug Dialog.
|
||||||
|
- Create an "Eclipse Application" configuration.
|
||||||
|
- in the "Plug-ins" tab, make sure the plugins are selected (you may
|
||||||
|
want to disable the test plugin if you just want to run ADT)
|
||||||
|
|
||||||
- From the SDK, copy the following jars:
|
-----------------------------
|
||||||
* androidprefs.jar => com.android.ide.eclipse.adt folder.
|
3- Building a new update site
|
||||||
* jarutils.jar => com.android.ide.eclipse.adt folder.
|
-----------------------------
|
||||||
* ping.jar => com.android.ide.eclipse.common folder.
|
|
||||||
* androidprefs.jar => com.android.ide.eclipse.common folder.
|
|
||||||
|
|
||||||
- Create a java project from existing source for both the ADT plugin and the
|
|
||||||
common plugin.
|
|
||||||
|
|
||||||
- In the Package Explorer, right click the projects and choose
|
|
||||||
PDE Tools > Convert Projects to Plug-in Project...
|
|
||||||
|
|
||||||
- Select your projects in the dialog box and click OK.
|
|
||||||
|
|
||||||
- In the Package Explorer, for ADT and common, right click the jar files mentioned above
|
|
||||||
and choose Build Path > Add to Build Path
|
|
||||||
|
|
||||||
At this point the projects will compile.
|
|
||||||
|
|
||||||
To launch the projects, open the Run/Debug Dialog and create an "Eclipse
|
|
||||||
Application" launch configuration.
|
|
||||||
|
|
||||||
Additionnaly, another feature containing the Android Editors Plugin
|
|
||||||
(com.android.ide.eclipse.editors) is available.
|
|
||||||
|
|
||||||
- Make sure the common project is present in your workspace as the Editors
|
|
||||||
plugin depends on this plugin. Alternatively, you can have the offical ADT
|
|
||||||
feature installed in your Eclipse distribution.
|
|
||||||
- Create a java project from existing source for the Editors project.
|
|
||||||
- In the Package Explorer, right click the project and choose
|
|
||||||
PDE Tools > Convert Projects to Plug-in Project...
|
|
||||||
- Select your project in the dialog box and click OK.
|
|
||||||
|
|
||||||
Create an "Eclipse Application" launch configuration to test the plugin.
|
|
||||||
|
|
||||||
-------------------------------------
|
|
||||||
3- Setting up the Editors project
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
The "editors" plugin is optional. You can use ADT to develop Android
|
|
||||||
applications without the XML editor support. When this plugin is present, it
|
|
||||||
offers several customized form-based XML editors and one graphical layout
|
|
||||||
editor.
|
|
||||||
|
|
||||||
At the time of this release (Android 0.9 SDK), some of the supporting libraries
|
|
||||||
still need some cleanup and are currently only provided as JAR files.
|
|
||||||
|
|
||||||
- Download the ADT/Common/Editors source.
|
|
||||||
|
|
||||||
- From the source archives, copy the following jars:
|
|
||||||
* ninepatch.jar => com.android.ide.eclipse.editors folder.
|
|
||||||
* layoutlib_utils.jar => com.android.ide.eclipse.editors folder.
|
|
||||||
* layoutlib_api.jar => com.android.ide.eclipse.editors folder.
|
|
||||||
|
|
||||||
- From http://kxml.sourceforge.net/ download:
|
|
||||||
* kXML2-2.3.0.jar => com.android.ide.eclipse.editors folder.
|
|
||||||
|
|
||||||
- Create a java project from existing source for both the editors plugin.
|
|
||||||
|
|
||||||
- In the Package Explorer, right click the project and choose
|
|
||||||
PDE Tools > Convert Projects to Plug-in Project...
|
|
||||||
|
|
||||||
- Select your project in the dialog box and click OK.
|
|
||||||
|
|
||||||
- In the Package Explorer for editors, right click the jar files mentioned
|
|
||||||
above and choose Build Path > Add to Build Path
|
|
||||||
|
|
||||||
To launch the projects, reuse the "Eclipse Application" launch configuration
|
|
||||||
created for ADT.
|
|
||||||
|
|
||||||
|
- From Eclipse, open the site.xml of the site project you want to build and click
|
||||||
|
"Build All" from the "Site Map" tab.
|
||||||
|
|||||||
1
tools/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore
vendored
Normal file
1
tools/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
1
tools/eclipse/plugins/com.android.ide.eclipse.common/.gitignore
vendored
Normal file
1
tools/eclipse/plugins/com.android.ide.eclipse.common/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
31
tools/eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore
vendored
Normal file
31
tools/eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
add.png
|
||||||
|
backward.png
|
||||||
|
clear.png
|
||||||
|
d.png
|
||||||
|
debug-attach.png
|
||||||
|
debug-error.png
|
||||||
|
debug-wait.png
|
||||||
|
delete.png
|
||||||
|
device.png
|
||||||
|
down.png
|
||||||
|
e.png
|
||||||
|
edit.png
|
||||||
|
empty.png
|
||||||
|
emulator.png
|
||||||
|
forward.png
|
||||||
|
gc.png
|
||||||
|
halt.png
|
||||||
|
heap.png
|
||||||
|
i.png
|
||||||
|
importBug.png
|
||||||
|
load.png
|
||||||
|
pause.png
|
||||||
|
play.png
|
||||||
|
pull.png
|
||||||
|
push.png
|
||||||
|
save.png
|
||||||
|
thread.png
|
||||||
|
up.png
|
||||||
|
v.png
|
||||||
|
w.png
|
||||||
|
warning.png
|
||||||
1
tools/eclipse/plugins/com.android.ide.eclipse.ddms/libs/.gitignore
vendored
Normal file
1
tools/eclipse/plugins/com.android.ide.eclipse.ddms/libs/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
2
tools/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore
vendored
Normal file
2
tools/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ddmlib
|
||||||
|
ddmuilib
|
||||||
1
tools/eclipse/plugins/com.android.ide.eclipse.editors/.gitignore
vendored
Normal file
1
tools/eclipse/plugins/com.android.ide.eclipse.editors/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
1
tools/eclipse/plugins/com.android.ide.eclipse.tests/.gitignore
vendored
Normal file
1
tools/eclipse/plugins/com.android.ide.eclipse.tests/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
Reference in New Issue
Block a user