diff options
author | Siva Velusamy <vsiva@google.com> | 2012-09-17 14:50:49 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-09-18 17:42:52 -0700 |
commit | 0b0513a87849429763e5fb5934598393daf7e6d1 (patch) | |
tree | f077bcebaa43284870799aa4c96135ff4ccf54d7 /adtproductbuild | |
parent | 0f86143e55290c4851e51b9a46ff21e198a35acc (diff) | |
download | sdk-0b0513a87849429763e5fb5934598393daf7e6d1.zip sdk-0b0513a87849429763e5fb5934598393daf7e6d1.tar.gz sdk-0b0513a87849429763e5fb5934598393daf7e6d1.tar.bz2 |
Add Android IDE package product build
Change-Id: I42426009df581ff51389f0641eab053ac706d723
Diffstat (limited to 'adtproductbuild')
-rw-r--r-- | adtproductbuild/Makefile | 36 | ||||
-rw-r--r-- | adtproductbuild/build.properties | 50 | ||||
-rw-r--r-- | adtproductbuild/build.xml | 114 |
3 files changed, 200 insertions, 0 deletions
diff --git a/adtproductbuild/Makefile b/adtproductbuild/Makefile new file mode 100644 index 0000000..64d30ef --- /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 0000000..156c3be --- /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 0000000..7851625 --- /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 & 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 & win32,win32,x86_64 & 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> |