aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-09-17 14:50:49 -0700
committerSiva Velusamy <vsiva@google.com>2012-09-18 17:42:52 -0700
commit0b0513a87849429763e5fb5934598393daf7e6d1 (patch)
treef077bcebaa43284870799aa4c96135ff4ccf54d7
parent0f86143e55290c4851e51b9a46ff21e198a35acc (diff)
downloadsdk-0b0513a87849429763e5fb5934598393daf7e6d1.tar.gz
sdk-0b0513a87849429763e5fb5934598393daf7e6d1.tar.bz2
sdk-0b0513a87849429763e5fb5934598393daf7e6d1.zip
Add Android IDE package product build
Change-Id: I42426009df581ff51389f0641eab053ac706d723
-rw-r--r--adtproductbuild/Makefile36
-rw-r--r--adtproductbuild/build.properties50
-rw-r--r--adtproductbuild/build.xml114
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt.package/.project17
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt.package/build.properties4
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt.package/feature.xml150
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt.package/p2.inf9
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/.project22
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF10
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/build.properties8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/go.css2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/ide.product48
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/index.html21
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/introcontent.xml9
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml66
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/plugin_customization.ini7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/splash.bmpbin0 -> 10257 bytes
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java66
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.base/src/com/android/ide/eclipse/base/InstallDetails.java7
19 files changed, 630 insertions, 16 deletions
diff --git a/adtproductbuild/Makefile b/adtproductbuild/Makefile
new file mode 100644
index 000000000..64d30ef4f
--- /dev/null
+++ b/adtproductbuild/Makefile
@@ -0,0 +1,36 @@
+ADT_IDE_BUILD_LOG := out/host/eclipse/adtproduct/build/adtproduct.log
+ADT_IDE_ARTIFACT_DIR := ../../out/host/eclipse/adtproduct/build/I.RcpBuild
+ADT_IDE_RELEASE_DIR := ../../out/host/eclipse/adtproduct/release/
+
+define release-ide
+ srczip=$(ADT_IDE_ARTIFACT_DIR)/RcpBuild-$(1).$(2).zip && \
+ dstdir=$(ADT_IDE_RELEASE_DIR)/android-ide-$(1).$(2) && \
+ rm -rf $(V) $$dstdir && \
+ mkdir -p $$dstdir && \
+ unzip -q $$srczip -d $$dstdir && \
+ if [[ $(1) == "macosx.cocoa" ]]; then eclipseini=eclipse.app/Contents/MacOS/eclipse.ini; else eclipseini=eclipse.ini; fi && \
+ sed -i 's/org.eclipse.platform/com.android.ide.eclipse.adt.package.product/g' $$dstdir/eclipse/$$eclipseini && \
+ sed -i -e 's/org.eclipse.platform.ide/com.android.ide.eclipse.adt.package.product/g' \
+ -e 's/org.eclipse.platform/com.android.ide.eclipse.adt.package/g' $$dstdir/eclipse/configuration/config.ini
+endef
+
+
+all:
+ rm -f ../../$(ADT_IDE_BUILD_LOG) && mkdir -p ../../$(dir $(ADT_IDE_BUILD_LOG)) && \
+ ( java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
+ org.eclipse.equinox.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -configuration ../../out/host/eclipse/adtproduct/build/configuration \
+ -data ../../out/host/eclipse/adtproduct/workspace \
+ 2>&1 && \
+ mv -f ../../$(ADT_IDE_BUILD_LOG) ../../$(ADT_IDE_BUILD_LOG).1 ) \
+ | tee ../../$(ADT_IDE_BUILD_LOG) \
+ | sed '/SUCCESSFUL/d ; /\[java\]/!b label; s/\s\+\[java\]//; /^\s*$$/d; /Compiling/!d; :label /^\s*$$/d; s/^/ADT: /'; \
+ if [[ -f ../../$(ADT_IDE_BUILD_LOG) ]]; then \
+ echo "ADT IDE build failed. Full log:" ; \
+ cat ../../$(ADT_IDE_BUILD_LOG) ; \
+ exit 1 ; \
+ fi
+ $(call release-ide,linux.gtk,x86_64) ; \
+ $(call release-ide,macosx.cocoa,x86_64) ; \
+ $(call release-ide,win32.win32,x86_64) ; \
diff --git a/adtproductbuild/build.properties b/adtproductbuild/build.properties
new file mode 100644
index 000000000..156c3beaa
--- /dev/null
+++ b/adtproductbuild/build.properties
@@ -0,0 +1,50 @@
+# Copyright (C) 2012 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.
+
+############# PRODUCT/PACKAGING CONTROL #############
+product=/com.android.ide.eclipse.adt.package/ide.product
+runPackager=true
+archivePrefix=eclipse
+collectingFolder=${archivePrefix}
+allowBinaryCycles = true
+buildType=I
+buildId=RcpBuild
+buildLabel=${buildType}.${buildId}
+timestamp=007
+launcherName=eclipse
+
+############# 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 ##############
+compilerArg=-warn:none
+logExtension=.log
+javacDebugInfo=false
+javacFailOnError=true
+javacVerbose=true
+javacSource=1.6
+javacTarget=1.6
+
+p2.gathering=true
diff --git a/adtproductbuild/build.xml b/adtproductbuild/build.xml
new file mode 100644
index 000000000..785162592
--- /dev/null
+++ b/adtproductbuild/build.xml
@@ -0,0 +1,114 @@
+<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}/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/" />
+
+ <!-- Source for target prebuilts -->
+ <property name="deltaPackTargetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" />
+ <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" />
+
+ <!-- Location where build happens and resulting binaries are generated -->
+ <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtproduct/" />
+
+ <!-- Location where final results are released -->
+ <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/androidide/" />
+
+ <!-- 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/" />
+
+ <!-- Identify configurations to build -->
+ <condition property="buildconfigs" value="linux,gtk,x86_64">
+ <equals arg1="${buildFor}" arg2="linux" />
+ </condition>
+ <condition property="buildconfigs" value="macosx,cocoa,x86_64">
+ <equals arg1="${buildFor}" arg2="darwin" />
+ </condition>
+ <condition property="buildconfigs" value="win32,win32,x86 &amp; win32,win32,x86_64">
+ <equals arg1="${buildFor}" arg2="windows" />
+ </condition>
+
+ <!-- if no platforms are provided, then build for all platforms -->
+ <property name="buildconfigs" value="linux,gtk,x86_64 &amp; win32,win32,x86_64 &amp; macosx,cocoa,x86_64" />
+
+ <!-- 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}" preservelastmodified="true">
+ <fileset dir="${srcDir}/">
+ <include name="plugins/**" />
+ <include name="features/**" />
+ <exclude name="plugins/*/bin/**" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- create target platform -->
+ <target name="create-target">
+ <mkdir dir="${targetDir}" />
+ <mkdir dir="${targetDir}/deltapack" />
+ <mkdir dir="${targetDir}/repos" />
+
+ <unzip src="${deltaPackTargetSrcDir}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" />
+ <unzip src="${targetSrcDir}/platform/org.eclipse.platform-3.8.zip" dest="${targetDir}/repos/platform" overwrite="false" />
+ <unzip src="${targetSrcDir}/cdt/cdt-master-8.0.2.zip" dest="${targetDir}/repos/cdt" overwrite="false" />
+ <unzip src="${targetSrcDir}/emf/emf-xsd-SDK-M201201231045.zip" dest="${targetDir}/repos/emf" overwrite="false" />
+ <unzip src="${targetSrcDir}/jdt/org.eclipse.jdt.source-3.7.2.zip" dest="${targetDir}/repos/jdt" overwrite="false" />
+ <unzip src="${targetSrcDir}/wtp/wtp-repo-R-3.3.2-20120210195245.zip" dest="${targetDir}/repos/wtp" overwrite="false" />
+ <unzip src="${targetSrcDir}/gef/GEF-SDK-3.7.2.zip" dest="${targetDir}/repos/gef" overwrite="false" />
+ </target>
+
+ <!-- Launch pde build -->
+ <target name="pde-build" depends="copy_srcs, create-target">
+ <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="-configuration" />
+ <arg value="${buildDir}/configuration" />
+ <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/" />
+ <arg value="-Dconfigs=${buildconfigs}" />
+ <classpath>
+ <pathelement location="${equinox.launcher}" />
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="${outDir}" />
+ <delete dir="${targetDir}" />
+ </target>
+
+ <target name="build" depends="pde-build" />
+</project>
diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/.project b/eclipse/features/com.android.ide.eclipse.adt.package/.project
new file mode 100644
index 000000000..1024cf0de
--- /dev/null
+++ b/eclipse/features/com.android.ide.eclipse.adt.package/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>feature-adt-package</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/build.properties b/eclipse/features/com.android.ide.eclipse.adt.package/build.properties
new file mode 100644
index 000000000..36ca16cf9
--- /dev/null
+++ b/eclipse/features/com.android.ide.eclipse.adt.package/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ p2.inf,\
+ ide.product
+includeLaunchers=false
diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml
new file mode 100644
index 000000000..8bddc8e80
--- /dev/null
+++ b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="com.android.ide.eclipse.adt.package"
+ label="Android IDE Package"
+ version="20.0.0.qualifier"
+ provider-name="The Android Open Source Project"
+ plugin="com.android.ide.eclipse.adt.package">
+
+ <description url="http://developer.android.com">
+ Android Developer Tools
+ </description>
+
+ <copyright>
+ Copyright (C) 2007-2012 The Android Open Source Project
+ </copyright>
+
+ <license url="http://www.eclipse.org/org/documents/epl-v10.php">
+ Note: kxml2-2.3.0.jar is under the BSD license rather ...
+ </license>
+
+ <url>
+ <update label="Android Update Site" url="https://dl-ssl.google.com/android/eclipse/"/>
+ </url>
+
+ <includes
+ id="org.eclipse.platform"
+ version="0.0.0"
+ search-location="both"/>
+
+ <requires>
+ <import feature="org.eclipse.platform"/>
+ <import plugin="org.eclipse.equinox.app"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.debug.core"/>
+ <import plugin="org.eclipse.debug.ui"/>
+ <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ant.core"/>
+ <import plugin="org.eclipse.jdt.core"/>
+ <import plugin="org.eclipse.jdt.ui"/>
+ <import plugin="org.eclipse.jdt.launching"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="org.eclipse.ui.console"/>
+ <import plugin="org.eclipse.core.filesystem"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.forms"/>
+ <import plugin="org.eclipse.ui.browser"/>
+ <import plugin="org.eclipse.ui.views"/>
+ <import plugin="org.eclipse.wst.sse.core"/>
+ <import plugin="org.eclipse.wst.sse.ui"/>
+ <import plugin="org.eclipse.wst.xml.core"/>
+ <import plugin="org.eclipse.wst.xml.ui"/>
+ <import plugin="org.eclipse.jdt.junit"/>
+ <import plugin="org.eclipse.jdt.junit.runtime"/>
+ <import plugin="org.eclipse.ltk.core.refactoring"/>
+ <import plugin="org.eclipse.ltk.ui.refactoring"/>
+ <import plugin="org.eclipse.core.expressions"/>
+ <import feature="org.eclipse.platform"/>
+ <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.platform"/>
+ <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.equinox.p2.user.ui"/>
+ <import feature="org.eclipse.help"/>
+ <import feature="org.eclipse.platform"/>
+ <import feature="org.eclipse.rcp" version="3.7.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.wst.common_core.feature" version="3.2.3.v201011031800-7B7DFEsF7RZHOaLfS0KpNJ"/>
+ <import feature="org.eclipse.wst.common_ui.feature" version="3.2.3.v201011031800-7C78FPlEdhO_oXWe4k_elbMgT1Lq"/>
+ <import feature="org.eclipse.wst.xml_core.feature" version="3.2.3.v201102160550-7C7OFXcF7RZHQKIkMxMsW_"/>
+ <import feature="org.eclipse.wst.xml_ui.feature" version="3.2.3.v201102160550-7H7AFUWDxumQJOi9ghcTb5YgkwEZ"/>
+ <import plugin="org.eclipse.core.variables"/>
+ <import plugin="org.eclipse.cdt.core"/>
+ <import plugin="org.eclipse.cdt.ui"/>
+ <import plugin="org.eclipse.cdt.managedbuilder.core"/>
+ <import plugin="org.eclipse.cdt.managedbuilder.ui"/>
+ <import plugin="org.eclipse.cdt.debug.core"/>
+ <import plugin="org.eclipse.cdt.debug.ui"/>
+ <import plugin="org.eclipse.cdt.dsf"/>
+ <import plugin="org.eclipse.cdt.dsf.gdb"/>
+ <import plugin="org.eclipse.cdt.dsf.gdb.ui"/>
+ <import plugin="org.eclipse.cdt.launch"/>
+ </requires>
+
+ <plugin
+ id="com.android.ide.eclipse.adt.package"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="true"/>
+
+ <plugin
+ id="com.android.ide.eclipse.adt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.base"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.ddms"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.gldebugger"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.hierarchyviewer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.traceview"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="overlay.com.android.ide.eclipse.adt.overlay"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.android.ide.eclipse.ndk"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/p2.inf b/eclipse/features/com.android.ide.eclipse.adt.package/p2.inf
new file mode 100644
index 000000000..cabaa55dc
--- /dev/null
+++ b/eclipse/features/com.android.ide.eclipse.adt.package/p2.inf
@@ -0,0 +1,9 @@
+#tell pde.build not to generate start levels
+org.eclipse.pde.build.append.startlevels=false
+
+requires.1.namespace=org.eclipse.equinox.p2.iu
+requires.1.name=org.eclipse.platform.ide
+requires.1.greedy=true
+
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//dl-ssl.google.com/android/eclipse/,type:0,name:Android Developer Tools Update Site,enabled:true);
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/.project b/eclipse/plugins/com.android.ide.eclipse.adt.package/.project
new file mode 100644
index 000000000..eedf4c6de
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>plugin-adt-package</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..752f7496d
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ADT Package
+Bundle-SymbolicName: com.android.ide.eclipse.adt.package;singleton:=true
+Bundle-Version: 20.0.0.qualifier
+Bundle-Vendor: The Android Open Source Project
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.platform,
+ org.eclipse.equinox.app,
+ org.eclipse.ui.intro
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/build.properties b/eclipse/plugins/com.android.ide.eclipse.adt.package/build.properties
new file mode 100644
index 000000000..1e6342ee2
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/build.properties
@@ -0,0 +1,8 @@
+bin.includes = META-INF/,\
+ plugin.xml,\
+ plugin_customization.ini,\
+ ide.product,\
+ splash.bmp,\
+ introcontent.xml,\
+ go.css,\
+ index.html
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/go.css b/eclipse/plugins/com.android.ide.eclipse.adt.package/go.css
new file mode 100644
index 000000000..15ba70bf9
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/go.css
@@ -0,0 +1,2 @@
+/* Copy of www.google.com/css/go.css */
+@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset=latin,cyrillic-ext,greek-ext,cyrillic,greek,vietnamese,latin-ext);@media screen,projection,print{html,input,textarea{font-family:arial,sans-serif}html{line-height:1.54}body.rtl{direction:rtl}body.rtl th{text-align:right}h5,h6,pre,table,input,textarea,code{font-size:1em}address,abbr,cite{font-style:normal}table{border-collapse:collapse;border-spacing:0}th{text-align:left}fieldset,iframe,img{border:0}label input,#nav li a{font-weight:normal}label{display:block;margin:13px 0 3px}q{quotes:none}}@media screen,projection{* html{direction:ltr}*+html{direction:ltr}*+html body.rtl{max-width:none}html{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABECAMAAAB3Xq9kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyNzA2QjJCMzE5NjQxMUUxOTQ0MEE1NkNFNDk5NjQ2RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyNzA2QjJCNDE5NjQxMUUxOTQ0MEE1NkNFNDk5NjQ2RCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjI3MDZCMkIxMTk2NDExRTE5NDQwQTU2Q0U0OTk2NDZEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjI3MDZCMkIyMTk2NDExRTE5NDQwQTU2Q0U0OTk2NDZEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+AZql4QAAAAZQTFRF7+/v////ZlM36gAAAAJ0Uk5T/wDltzBKAAAAEElEQVR42mJgZBgMkAEgwAASlwBE7N+9ZgAAAABJRU5ErkJggg==) repeat-x;color:#444;font-size:13px;padding-top:5px}body,table,fieldset,#nav{margin:0}body{max-width:1000px;padding:15px}body.rtl h1 img,body.rtl #nav{float:right}body.rtl h1 img{margin:0 0 0 43px}body.rtl #nav ul,body.rtl #nav ol{margin:13px 13px 0 0}* html body.rtl #about li{margin:0 0 0 13px}*+html body.rtl #about li{margin:0 0 0 13px}body.rtl #aux{margin:0 160px 0 0}body.compact{margin:auto;width:740px}*>body.compact{max-width:740px;width:auto}h1,h2,h3,h4,h5,blockquote,q{font-family:'open sans',arial,sans-serif}h1{color:#91959c;font-size:27px;font-weight:300;height:51px;line-height:1.26;margin:0 0 25px;overflow:hidden}h1 img,#nav{float:left}h1 img{margin:0 43px 0 0;position:relative}h1 img[src$='logo_sm.gif']{width:116px}h2,h3,h4,h5{margin:20px 0 10px}h2{font-size:21px}h2:first-child,p+table,table+p{margin-top:0}h3{font-size:16px;line-height:1.56}h4{font-size:14px;line-height:1.57}h6{margin:10px 0 -10px}p,pre,table,form{margin:10px 0}blockquote,ul,ol{margin-bottom:10px;margin-top:10px}blockquote,q{font-style:italic}pre strong,pre b,a strong,a b,a code{color:inherit}pre,code{color:#060;font:13px/1.54 'courier new',courier,monospace}th,td{padding-right:10px;vertical-align:top}fieldset,#about,#nav,#nav ul,#nav ol{padding:0}legend{display:none}label,em,i,#nav li{font-weight:bold}a:link,a:visited{text-decoration:none}a:link{color:#15c}a:visited{color:#7847b2}a:focus,a:hover,a:active{text-decoration:underline}strong,b{color:#000}em,i{font-style:normal}#about,#nav,#nav *{list-style:none}#about{clear:both;font-size:11px;color:#666;line-height:1.8;margin:26px 0 0}#about li{display:inline}#about li:before{content:' · '}#about li:first-child:before{content:none}* html #about li{margin:0 13px 0 0}*+html #about li{margin:0 13px 0 0}#nav{width:142px}#nav ul,#nav ol{margin:10px 0 0 13px}#nav li{margin:0 0 10px}#aux{margin:0 0 0 160px}}@media screen and (max-width:772px){html{background-image:none}body.rtl #nav li{margin-left:10px;margin-right:0}h1,#aux{margin:0 !important}h1{height:auto}h1 img,#nav{float:none !important}h1 img{display:block}#nav{margin-bottom:13px;width:auto !important}#nav ul,#nav ol{display:none}#nav li{display:inline;margin-right:10px}}@media print{h1 img{display:block}a{color:inherit}#nav{display:none}}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/ide.product b/eclipse/plugins/com.android.ide.eclipse.adt.package/ide.product
new file mode 100644
index 000000000..645beaf14
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/ide.product
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="Eclipse IDE for Android" uid="com.android.ide.eclipse.adt.package.product" id="com.android.ide.eclipse.adt.package.product" application="org.eclipse.ui.ide.workbench" version="20.0.0.qualifier" useFeatures="true" includeLaunchers="true">
+
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-product com.android.ide.eclipse.adt.package.product</programArgs>
+ <programArgsWin>--launcher.XXMaxPermSize 256M</programArgsWin>
+ <vmArgs>-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m</vmArgs>
+ <vmArgsLin>-XX:MaxPermSize=256m</vmArgsLin>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <splash
+ location="com.android.ide.eclipse.adt.package" />
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+
+ <vm>
+ <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</linux>
+ <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</macos>
+ <windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</windows>
+ </vm>
+
+
+ <plugins>
+ </plugins>
+
+ <features>
+ <feature id="com.android.ide.eclipse.adt.package" version="20.0.0.qualifier"/>
+ </features>
+
+ <configurations>
+ <property name="eclipse.product" value="com.android.ide.eclipse.adt.package.product" />
+ </configurations>
+
+</product>
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/index.html b/eclipse/plugins/com.android.ide.eclipse.adt.package/index.html
new file mode 100644
index 000000000..ba9a74861
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/index.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+ <html lang="en">
+ <meta charset="utf-8">
+ <title>Eclipse for Android Developers</title>
+ <link rel="stylesheet" href="go.css">
+
+ <body class="compact">
+ <h1>Eclipse for Android Developers</h1>
+
+ <h2>Getting Started</h2>
+ <h2>What's New?</h2>
+ <h2>Documentation</h2>
+ <ul>
+ <li> <a href="http://d.android.com/">Android Developers</a>
+ </ul>
+ <h2>Known Issues</h2>
+
+ <ul id="about">
+ <li>© Android Open Source Project
+ <li>2012
+ </ul>
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/introcontent.xml b/eclipse/plugins/com.android.ide.eclipse.adt.package/introcontent.xml
new file mode 100644
index 000000000..65d226fb3
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/introcontent.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<introContent>
+ <page
+ id="root"
+ url="index.html"/>
+ <page
+ id="standbyPageId"
+ url="index.html"/>
+</introContent> \ No newline at end of file
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml
new file mode 100644
index 000000000..3359ee057
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ id="product"
+ point="org.eclipse.core.runtime.products">
+ <product
+ application="org.eclipse.ui.ide.workbench"
+ name="Eclipse IDE for Android">
+ <property
+ name="preferenceCustomization"
+ value="plugin_customization.ini" />
+ <property
+ name="appName"
+ value="Eclipse IDE for Android" />
+ <property
+ name="introTitle"
+ value="Eclipse IDE for Android" />
+ <property
+ name="introBrandingImage"
+ value="product:eclipse.png" />
+ <property
+ name="introBrandingImageText"
+ value="AOSP" />
+ <property
+ name="startupProgressRect"
+ value="10,250,200,5" />
+ <property
+ name="startupMessageRect"
+ value="10,260,300,30" />
+ <property
+ name="startupForegroundColor"
+ value="AAAAAA" />
+ </product>
+ </extension>
+ <extension
+ point="org.eclipse.ui.intro">
+ <intro
+ class="org.eclipse.ui.intro.config.CustomizableIntroPart"
+ icon="$nl$/icons/image_obj.gif"
+ id="org.eclipse.intro.minimal"
+ label="Android IDE"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.intro.config">
+ <config
+ content="introcontent.xml"
+ id="org.eclipse.intro.minimal.config"
+ introId="org.eclipse.intro.minimal">
+ <presentation
+ home-page-id="root"
+ standby-page-id="standby">
+ <implementation
+ kind="html">
+ </implementation>
+ </presentation>
+ </config>
+ </extension>
+ <extension
+ point="org.eclipse.ui.intro">
+ <introProductBinding
+ introId="org.eclipse.intro.minimal"
+ productId="com.android.ide.eclipse.adt.package.product">
+ </introProductBinding>
+ </extension>
+</plugin>
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin_customization.ini b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin_customization.ini
new file mode 100644
index 000000000..50c3948d2
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin_customization.ini
@@ -0,0 +1,7 @@
+org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaPerspective
+org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
+org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
+org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.slate
+org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES=overview,tutorials,samples,whatsnew,migrate,webresources
+org.eclipse.ui.intro.universal/INTRO_DATA = product:introData.xml \ No newline at end of file
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/splash.bmp b/eclipse/plugins/com.android.ide.eclipse.adt.package/splash.bmp
new file mode 100644
index 000000000..80dd82e4f
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/splash.bmp
Binary files differ
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java
index 5e69e6f77..8d8b688b2 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java
@@ -31,10 +31,12 @@ import com.android.sdkstats.SdkStatsService;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbench;
@@ -69,6 +71,10 @@ public class AdtStartup implements IStartup, IWindowListener {
@Override
public void earlyStartup() {
+ if (InstallDetails.isAndroidIdePackage()) {
+ useBundledSdk();
+ }
+
if (isFirstTime()) {
showWelcomeWizard();
// Usage statistics are sent after the wizard has run asynchronously (provided the
@@ -82,6 +88,32 @@ public class AdtStartup implements IStartup, IWindowListener {
AdtPlugin.getDefault().workbenchStarted();
}
+ private void useBundledSdk() {
+ String osSdkFolder = AdtPrefs.getPrefs().getOsSdkFolder();
+
+ // sdk path is already set
+ if (osSdkFolder != null && osSdkFolder.length() > 0) {
+ return;
+ }
+
+ // The Android IDE bundle is structured as follows:
+ // root
+ // |--eclipse
+ // |--sdk
+ // So use the SDK folder that is
+ Location install = Platform.getInstallLocation();
+ if (install != null && install.getURL() != null) {
+ String toolsFolder = new File(install.getURL().getFile()).getParent();
+ if (toolsFolder != null) {
+ String osSdkPath = toolsFolder + File.separator + "sdk";
+ if (AdtPlugin.getDefault().checkSdkLocationAndId(osSdkPath,
+ new SdkValidator())) {
+ AdtPrefs.getPrefs().setSdkLocation(new File(osSdkPath));
+ }
+ }
+ }
+ }
+
private boolean isFirstTime() {
// If we already have a known SDK location in our workspace then we know this
// is not the first time this user is running ADT.
@@ -112,22 +144,8 @@ public class AdtStartup implements IStartup, IWindowListener {
if (ok) {
// Verify that the SDK is valid
- ok = AdtPlugin.getDefault().checkSdkLocationAndId(osSdkPath,
- new AdtPlugin.CheckSdkErrorHandler() {
- @Override
- public boolean handleError(
- CheckSdkErrorHandler.Solution solution,
- String message) {
- return false;
- }
-
- @Override
- public boolean handleWarning(
- CheckSdkErrorHandler.Solution solution,
- String message) {
- return true;
- }
- });
+ ok = AdtPlugin.getDefault().checkSdkLocationAndId(
+ osSdkPath, new SdkValidator());
if (ok) {
// Yes, we've seen an SDK location before and we can use it again,
// no need to pester the user with the welcome wizard.
@@ -144,6 +162,22 @@ public class AdtStartup implements IStartup, IWindowListener {
return !mStore.isAdtUsed();
}
+ private static class SdkValidator extends AdtPlugin.CheckSdkErrorHandler {
+ @Override
+ public boolean handleError(
+ CheckSdkErrorHandler.Solution solution,
+ String message) {
+ return false;
+ }
+
+ @Override
+ public boolean handleWarning(
+ CheckSdkErrorHandler.Solution solution,
+ String message) {
+ return true;
+ }
+ }
+
private String getSdkPathFromWindowsRegistry() {
if (SdkConstants.CURRENT_PLATFORM != SdkConstants.PLATFORM_WINDOWS) {
return null;
diff --git a/eclipse/plugins/com.android.ide.eclipse.base/src/com/android/ide/eclipse/base/InstallDetails.java b/eclipse/plugins/com.android.ide.eclipse.base/src/com/android/ide/eclipse/base/InstallDetails.java
index 8c4a4a71e..71eccbfda 100644
--- a/eclipse/plugins/com.android.ide.eclipse.base/src/com/android/ide/eclipse/base/InstallDetails.java
+++ b/eclipse/plugins/com.android.ide.eclipse.base/src/com/android/ide/eclipse/base/InstallDetails.java
@@ -23,6 +23,7 @@ import org.osgi.framework.Version;
public class InstallDetails {
private static final String ADT_PLUGIN_ID = "com.android.ide.eclipse.adt"; //$NON-NLS-1$
private static final String ECLIPSE_PLATFORM_PLUGIN_ID = "org.eclipse.platform"; //$NON-NLS-1$
+ private static final String ADT_PRODUCT_PLUGIN_ID = "com.android.ide.eclipse.adt.package"; //$NON-NLS-1$
/**
* Returns true if the ADT plugin is available in the current platform. This is useful
@@ -38,4 +39,10 @@ public class InstallDetails {
Bundle b = Platform.getBundle(ECLIPSE_PLATFORM_PLUGIN_ID);
return b == null ? Version.emptyVersion : b.getVersion();
}
+
+ /** Returns true if this is the "Eclipse for Android Developers" product. */
+ public static boolean isAndroidIdePackage() {
+ Bundle b = Platform.getBundle(ADT_PRODUCT_PLUGIN_ID);
+ return b != null;
+ }
}