diff options
17 files changed, 582 insertions, 15 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath b/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath new file mode 100644 index 0000000..2e5a9ea --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/.classpath @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry exported="true" kind="lib" path="libs/androidprefs.jar"/> + <classpathentry exported="true" kind="lib" path="libs/sdkstats.jar"/> + <classpathentry exported="true" kind="lib" path="libs/sdklib.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/.project b/eclipse/plugins/com.android.ide.eclipse.monitor/.project new file mode 100644 index 0000000..2d33f44 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>monitor-plugin</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/com.android.ide.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8401a32 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Tue Dec 06 16:39:22 PST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..fc401eb --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: com.android.ide.eclipse.monitor;singleton:=true +Bundle-Version: 16.0.0.qualifier +Bundle-Activator: com.android.ide.eclipse.monitor.MonitorPlugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.android.ide.eclipse.ddms, + com.android.ide.eclipse.gldebugger, + com.android.ide.eclipse.traceview +Bundle-ActivationPolicy: lazy +Bundle-Vendor: %Bundle-Vendor +Bundle-ClassPath: libs/androidprefs.jar, + libs/sdklib.jar, + libs/sdkstats.jar, + . diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties b/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties new file mode 100644 index 0000000..c3405b3 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + libs/,\ + libs/sdkstats.jar,\ + libs/androidprefs.jar diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/libs/.gitignore b/eclipse/plugins/com.android.ide.eclipse.monitor/libs/.gitignore new file mode 100644 index 0000000..d392f0e --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/libs/.gitignore @@ -0,0 +1 @@ +*.jar diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product b/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product new file mode 100644 index 0000000..a58283b --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?pde version="3.5"?> + +<product name="monitor" uid="com.android.ide.eclipse.monitor.product.config" id="com.android.ide.eclipse.monitor.product" application="com.android.ide.eclipse.monitor.Application" version="0.01" useFeatures="false" includeLaunchers="true"> + + <configIni use="default"> + </configIni> + + <launcherArgs> + <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac> + </launcherArgs> + + <plugins> + <plugin id="com.android.ide.eclipse.ddms"/> + <plugin id="com.android.ide.eclipse.gldebugger"/> + <plugin id="com.android.ide.eclipse.monitor"/> + <plugin id="com.android.ide.eclipse.traceview"/> + <plugin id="com.ibm.icu"/> + <plugin id="org.eclipse.compare"/> + <plugin id="org.eclipse.compare.core"/> + <plugin id="org.eclipse.core.commands"/> + <plugin id="org.eclipse.core.contenttype"/> + <plugin id="org.eclipse.core.databinding"/> + <plugin id="org.eclipse.core.databinding.observable"/> + <plugin id="org.eclipse.core.databinding.property"/> + <plugin id="org.eclipse.core.expressions"/> + <plugin id="org.eclipse.core.filebuffers"/> + <plugin id="org.eclipse.core.filesystem"/> + <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/> + <plugin id="org.eclipse.core.jobs"/> + <plugin id="org.eclipse.core.resources"/> + <plugin id="org.eclipse.core.runtime"/> + <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/> + <plugin id="org.eclipse.core.variables"/> + <plugin id="org.eclipse.debug.core"/> + <plugin id="org.eclipse.debug.ui"/> + <plugin id="org.eclipse.ecf"/> + <plugin id="org.eclipse.ecf.filetransfer"/> + <plugin id="org.eclipse.ecf.identity"/> + <plugin id="org.eclipse.ecf.provider.filetransfer"/> + <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/> + <plugin id="org.eclipse.ecf.ssl" fragment="true"/> + <plugin id="org.eclipse.equinox.app"/> + <plugin id="org.eclipse.equinox.common"/> + <plugin id="org.eclipse.equinox.p2.core"/> + <plugin id="org.eclipse.equinox.p2.engine"/> + <plugin id="org.eclipse.equinox.p2.metadata"/> + <plugin id="org.eclipse.equinox.p2.metadata.repository"/> + <plugin id="org.eclipse.equinox.p2.repository"/> + <plugin id="org.eclipse.equinox.preferences"/> + <plugin id="org.eclipse.equinox.registry"/> + <plugin id="org.eclipse.equinox.security"/> + <plugin id="org.eclipse.help"/> + <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/> + <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/> + <plugin id="org.eclipse.jdt.core"/> + <plugin id="org.eclipse.jdt.core.manipulation"/> + <plugin id="org.eclipse.jdt.debug"/> + <plugin id="org.eclipse.jdt.launching"/> + <plugin id="org.eclipse.jdt.ui"/> + <plugin id="org.eclipse.jface"/> + <plugin id="org.eclipse.jface.databinding"/> + <plugin id="org.eclipse.jface.text"/> + <plugin id="org.eclipse.ltk.core.refactoring"/> + <plugin id="org.eclipse.ltk.ui.refactoring"/> + <plugin id="org.eclipse.osgi"/> + <plugin id="org.eclipse.osgi.services"/> + <plugin id="org.eclipse.search"/> + <plugin id="org.eclipse.swt"/> + <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/> + <plugin id="org.eclipse.team.core"/> + <plugin id="org.eclipse.team.ui"/> + <plugin id="org.eclipse.text"/> + <plugin id="org.eclipse.ui"/> + <plugin id="org.eclipse.ui.console"/> + <plugin id="org.eclipse.ui.editors"/> + <plugin id="org.eclipse.ui.forms"/> + <plugin id="org.eclipse.ui.ide"/> + <plugin id="org.eclipse.ui.navigator"/> + <plugin id="org.eclipse.ui.navigator.resources"/> + <plugin id="org.eclipse.ui.views"/> + <plugin id="org.eclipse.ui.views.properties.tabbed"/> + <plugin id="org.eclipse.ui.workbench"/> + <plugin id="org.eclipse.ui.workbench.texteditor"/> + </plugins> + + +</product> diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties new file mode 100644 index 0000000..85f0ac4 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties @@ -0,0 +1,3 @@ +#Properties file for com.android.ide.eclipse.monitor +Bundle-Vendor = The Android Open Source Project +Bundle-Name = Monitor diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.xml new file mode 100644 index 0000000..de0a3f6 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + id="com.android.ide.eclipse.monitor.Application" + point="org.eclipse.core.runtime.applications"> + <application + cardinality="singleton-global" + thread="main" + visible="true"> + <run + class="com.android.ide.eclipse.monitor.Application"> + </run> + </application> + </extension> + <extension + id="com.android.ide.eclipse.monitor.product" + point="org.eclipse.core.runtime.products"> + <product + application="com.android.ide.eclipse.monitor.Application" + name="Android Device Monitor"> + </product> + </extension> + <extension + point="com.android.ide.eclipse.ddms.toolsLocator"> + <locator + class="com.android.ide.eclipse.monitor.ToolsLocator"> + </locator> + </extension> + <extension + id="product" + point="org.eclipse.core.runtime.products"> + <product + application="com.android.ide.eclipse.monitor.Application" + name="Android Device Monitor"> + <property + name="appName" + value="monitor"> + </property> + </product> + </extension> + +</plugin> diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/Application.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/Application.java new file mode 100644 index 0000000..f852e34 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/Application.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ide.eclipse.monitor; + +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.PlatformUI; + +public class Application implements IApplication { + public Object start(IApplicationContext context) throws Exception { + Display display = PlatformUI.createDisplay(); + try { + int returnCode = PlatformUI.createAndRunWorkbench(display, + new ApplicationWorkbenchAdvisor()); + if (returnCode == PlatformUI.RETURN_RESTART) { + return IApplication.EXIT_RESTART; + } + return IApplication.EXIT_OK; + } finally { + display.dispose(); + } + } + + public void stop() { + if (!PlatformUI.isWorkbenchRunning()) + return; + final IWorkbench workbench = PlatformUI.getWorkbench(); + final Display display = workbench.getDisplay(); + display.syncExec(new Runnable() { + public void run() { + if (!display.isDisposed()) + workbench.close(); + } + }); + } +} diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ApplicationWorkbenchAdvisor.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ApplicationWorkbenchAdvisor.java new file mode 100644 index 0000000..be75e00 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ApplicationWorkbenchAdvisor.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ide.eclipse.monitor; + +import com.android.ide.eclipse.ddms.Perspective; + +import org.eclipse.ui.application.WorkbenchAdvisor; + +public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { + @Override + public String getInitialWindowPerspectiveId() { + return Perspective.ID; + } + +} diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorPlugin.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorPlugin.java new file mode 100644 index 0000000..9449d6f --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorPlugin.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ide.eclipse.monitor; + +import com.android.sdkstats.DdmsPreferenceStore; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +public class MonitorPlugin extends AbstractUIPlugin { + public static final String PLUGIN_ID = "com.android.ide.eclipse.monitor"; //$NON-NLS-1$ + private static MonitorPlugin sPlugin; + private static final DdmsPreferenceStore sDdmsPreferenceStore = new DdmsPreferenceStore(); + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + sPlugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + sPlugin = null; + super.stop(context); + } + + public static MonitorPlugin getDefault() { + return sPlugin; + } + + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static DdmsPreferenceStore getDdmsPreferenceStore() { + return sDdmsPreferenceStore; + } +} diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ToolsLocator.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ToolsLocator.java new file mode 100644 index 0000000..e08352f --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/ToolsLocator.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ide.eclipse.monitor; + +import com.android.ide.eclipse.ddms.IToolsLocator; +import com.android.sdklib.SdkConstants; + +public class ToolsLocator implements IToolsLocator { + public static final String PLATFORM_EXECUTABLE_EXTENSION = + (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ? + ".exe" : ""; //$NON-NLS-1$ + + public static final String PLATFORM_SCRIPT_EXTENSION = + (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) ? + ".bat" : ""; //$NON-NLS-1$ + + public static final String FN_HPROF_CONV = "hprof-conv" + PLATFORM_EXECUTABLE_EXTENSION; //$NON-NLS-1$ + public static final String FN_TRACEVIEW = "traceview" + PLATFORM_SCRIPT_EXTENSION; //$NON-NLS-1$ + + public String getAdbLocation() { + return getSdkPlatformToolsFolder() + SdkConstants.FN_ADB; + } + + public String getTraceViewLocation() { + return getSdkToolsFolder() + FN_TRACEVIEW; + } + + public String getHprofConvLocation() { + return getSdkToolsFolder() + FN_HPROF_CONV; + } + + private String getSdkToolsFolder() { + return getSdkFolder() + "/tools/"; //$NON-NLS-1$ + } + + private String getSdkPlatformToolsFolder() { + return getSdkFolder() + "/platform-tools/"; //$NON-NLS-1$ + } + + private String getSdkFolder() { + // FIXME! + return MonitorPlugin.getDdmsPreferenceStore().getLastSdkPath(); + } +} diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh index c6cd467..ebc3dc8 100755 --- a/eclipse/scripts/create_all_symlinks.sh +++ b/eclipse/scripts/create_all_symlinks.sh @@ -1,4 +1,8 @@ #!/bin/bash +# This script copies the .jar files that each plugin depends on into the plugins libs folder. +# By default, on Mac & Linux, this script creates symlinks from the libs folder to the jar file. +# Since Windows does not support symlinks, the jar files are copied. +# Use option "-f" to copy files rather than creating symlinks on the Mac/Linux platforms. echo "## Running $0" # CD to the top android directory @@ -6,16 +10,34 @@ PROG_DIR=`dirname "$0"` cd "${PROG_DIR}/../../../" HOST=`uname` +USE_COPY="" # force copy dependent jar files rather than creating symlinks function die() { echo "Error: $*" exit 1 } -if [ "${HOST:0:6}" == "CYGWIN" ]; then +## parse arguments +while [ $# -gt 0 ]; do + if [ "$1" == "-f" ]; then + USE_COPY="1" + fi + shift +done + +if [ "$HOST" == "Linux" ]; then + PLATFORM="linux-x86" +elif [ "$HOST" == "Darwin" ]; then + PLATFORM="darwin-x86" +elif [ "${HOST:0:6}" == "CYGWIN" ]; then + USE_COPY="1" # We can't use symlinks under Cygwin PLATFORM="windows-x86" +else + echo "Unsupported platform ($HOST). Aborting." + exit 1 +fi - # We can't use symlinks under Cygwin +if [ "$USE_COPY" == "1" ]; then function cpfile { # $1=source $2=dest cp -fv $1 $2/ } @@ -24,17 +46,6 @@ if [ "${HOST:0:6}" == "CYGWIN" ]; then rsync -avW --delete-after $1 $2 } else - if [ "$HOST" == "Linux" ]; then - PLATFORM="linux-x86" - elif [ "$HOST" == "Darwin" ]; then - PLATFORM="darwin-x86" - else - echo "Unsupported platform ($HOST). Aborting." - exit 1 - fi - - # For all other systems which support symlinks - # computes the "reverse" path, e.g. "a/b/c" => "../../.." function back() { echo $1 | sed 's@[^/]*@..@g' @@ -132,6 +143,13 @@ SDMAN_LIBS="swtmenubar" LIBS="$LIBS $SDKMAN_LIBS" +### MONITOR ### + +MONITOR_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.monitor/libs" +MONITOR_LIBS="sdklib sdkstats androidprefs" + +LIBS="$LIBS $MONITOR_LIBS" +CP_FILES="$CP_FILES @:$MONITOR_DEST $MONITOR_LIBS" ### GL DEBUGGER ### @@ -147,9 +165,9 @@ fi # Make sure we have lunch sdk-<something> if [[ ! "$TARGET_PRODUCT" ]]; then - echo "## TARGET_PRODUCT is not set, running build/envsetup.sh" + echo "## TARGET_PRODUCT is not set, running build/envsetup.sh" . build/envsetup.sh - echo "## lunch sdk-eng" + echo "## lunch sdk-eng" lunch sdk-eng fi diff --git a/eclipse/scripts/rcp/HOWTO-BUILD b/eclipse/scripts/rcp/HOWTO-BUILD new file mode 100644 index 0000000..9278f98 --- /dev/null +++ b/eclipse/scripts/rcp/HOWTO-BUILD @@ -0,0 +1,9 @@ +To build the Monitor RCP based application, do: + +$ lunch sdk-eng +$ ./sdk/eclipse/scripts/create_all_symlinks.sh -f +$ cd sdk/eclipse/scripts/rcp +$ ant + +This will build the RCP in the folder: +$ANDROID_SRC/out/host/eclipse/rcp/build/I.RcpBuild/ diff --git a/eclipse/scripts/rcp/build.properties b/eclipse/scripts/rcp/build.properties new file mode 100644 index 0000000..493665e --- /dev/null +++ b/eclipse/scripts/rcp/build.properties @@ -0,0 +1,49 @@ +############################################################################### +# Copyright (c) 2003, 2009 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### + +############# PRODUCT/PACKAGING CONTROL ############# +product=/com.android.ide.eclipse.monitor/monitor.product +runPackager=true +archivePrefix=monitor +collectingFolder=${archivePrefix} +configs=linux,gtk,x86_64 & \ + linux,gtk,x86 & \ + macosx,cocoa,x86_64 & \ + win32,win32,x86_64 & \ + win32,win32,x86 +allowBinaryCycles = true +buildType=I +buildId=RcpBuild +buildLabel=${buildType}.${buildId} +timestamp=007 +launcherName=monitor + +############# BASE CONTROL ############# +baseos=linux +basews=gtk +basearch=x86_64 +filteredDependencyCheck=false +resolution.devMode=false +skipBase=true + +############# MAP FILE CONTROL ################ +skipMaps=true + +############ REPOSITORY CONTROL ############### +skipFetch=true + +############# JAVA COMPILER OPTIONS ############## +logExtension=.log +javacDebugInfo=false +javacFailOnError=true +javacVerbose=true +javacSource=1.5 +javacTarget=1.5 diff --git a/eclipse/scripts/rcp/build.xml b/eclipse/scripts/rcp/build.xml new file mode 100644 index 0000000..0079d0b --- /dev/null +++ b/eclipse/scripts/rcp/build.xml @@ -0,0 +1,89 @@ +<project name="com.android.eclipse.rcp.build" default="build"> + <!-- Root of Android Source Tree --> + <property name="ANDROID_SRC" location="../../../../" /> + + <!-- Host Eclipse used for building the RCP --> + <property name="basebuilder" value="${ANDROID_SRC}/prebuilts/tools/build/basebuilder/org.eclipse.releng.basebuilder/" /> + + <!-- Source for target prebuilts --> + <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/tools/build/target-platform/" /> + + <!-- Location where build happens and resulting binaries are generated --> + <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/rcp/" /> + + <!-- Location where the target platform is created --> + <property name="targetDir" value="${outDir}/target" /> + + <!-- Location where the target platform is created --> + <property name="buildDir" value="${outDir}/build" /> + + <!-- Location of the sources --> + <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" /> + + <!-- locate launcher plugin inside eclipse --> + <path id="equinox.launcher.path"> + <fileset dir="${basebuilder}/plugins"> + <include name="org.eclipse.equinox.launcher_*.jar" /> + </fileset> + </path> + <property name="equinox.launcher" refid="equinox.launcher.path" /> + + <!-- locate pde build plugin inside eclipse --> + <path id="pde.build.dir.path"> + <dirset dir="${basebuilder}/plugins"> + <include name="org.eclipse.pde.build_*" /> + </dirset> + </path> + <property name="pde.build.dir" refid="pde.build.dir.path" /> + + <!-- create the build directory, copy plugins and features into it --> + <target name="copy_srcs"> + <mkdir dir="${buildDir}" /> + <copy todir="${buildDir}"> + <fileset dir="${srcDir}/"> + <include name="plugins/**" /> + <include name="features/**" /> + </fileset> + </copy> + </target> + + <!-- create target platform --> + <target name="create-target"> + <mkdir dir="${targetDir}" /> + <mkdir dir="${targetDir}/deltapack" /> + <mkdir dir="${targetDir}/repos" /> + + <unzip src="${targetSrcDir}/eclipse-3.6.2-delta-pack.zip" dest="${targetDir}/deltapack" /> + <unzip src="${targetSrcDir}/org.eclipse.platform-3.6.2.zip" dest="${targetDir}/repos/platform" /> + <unzip src="${targetSrcDir}/org.eclipse.jdt-3.6.2.zip" dest="${targetDir}/repos/jdt" /> + </target> + + <!-- Launch pde build --> + <target name="pde-build"> + <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true"> + <arg value="-application" /> + <arg value="org.eclipse.ant.core.antRunner" /> + <arg value="-buildfile" /> + <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" /> + <arg value="-data" /> + <arg value="${buildDir}/workspace" /> + <arg value="-Dtimestamp=${timestamp}" /> + <arg value="-DeclipseLocation=${baseBuilder}" /> + <arg value="-DbuildDirectory=${buildDir}" /> + <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" /> + <arg value="-DrepoBaseLocation=${targetDir}/repos/" /> + <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" /> + <classpath> + <pathelement location="${equinox.launcher}" /> + </classpath> + </java> + </target> + + <target name="clean"> + <delete dir="${outDir}" /> + <delete dir="${targetDir}" /> + </target> + + <target name="build" depends="clean, copy_srcs, create-target, pde-build" /> +</project> + |