• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ADT_IDE_BUILD_LOG := out/host/eclipse/adtproduct/build/adtproduct.log
2ADT_IDE_ARTIFACT_DIR := ../../out/host/eclipse/adtproduct/build/I.RcpBuild
3ADT_IDE_RELEASE_DIR := ../../out/host/eclipse/adtproduct/release/
4
5define release-ide
6    srczip=$(ADT_IDE_ARTIFACT_DIR)/RcpBuild-$(1).$(2).zip && \
7    dstdir=$(ADT_IDE_RELEASE_DIR)/android-ide-$(1).$(2) && \
8    rm -rf $(V) $$dstdir && \
9    mkdir -p $$dstdir && \
10    unzip -q $$srczip -d $$dstdir && \
11	if [[ $(1) == "macosx.cocoa" ]]; then eclipseini=eclipse.app/Contents/MacOS/eclipse.ini; else eclipseini=eclipse.ini; fi && \
12	sed -i 's/org.eclipse.platform/com.android.ide.eclipse.adt.package.product/g' $$dstdir/eclipse/$$eclipseini && \
13	sed -i -e 's/org.eclipse.platform.ide/com.android.ide.eclipse.adt.package.product/g' \
14		   -e 's/org.eclipse.platform/com.android.ide.eclipse.adt.package/g' $$dstdir/eclipse/configuration/config.ini
15endef
16
17
18all:
19	rm -f ../../$(ADT_IDE_BUILD_LOG) && mkdir -p ../../$(dir $(ADT_IDE_BUILD_LOG)) && \
20		( java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
21			org.eclipse.equinox.launcher.Main \
22			-application org.eclipse.ant.core.antRunner \
23			-configuration ../../out/host/eclipse/adtproduct/build/configuration \
24			-data ../../out/host/eclipse/adtproduct/workspace \
25			2>&1 && \
26		  mv -f ../../$(ADT_IDE_BUILD_LOG) ../../$(ADT_IDE_BUILD_LOG).1 ) \
27		| tee ../../$(ADT_IDE_BUILD_LOG) \
28		| sed '/SUCCESSFUL/d ; /\[java\]/!b label; s/\s\+\[java\]//; /^\s*$$/d; /Compiling/!d; :label /^\s*$$/d; s/^/ADT: /'; \
29		if [[ -f ../../$(ADT_IDE_BUILD_LOG) ]]; then \
30		  echo "ADT IDE build failed. Full log:" ; \
31		  cat ../../$(ADT_IDE_BUILD_LOG) ; \
32		  exit 1 ; \
33		fi
34	$(call release-ide,linux.gtk,x86_64) ; \
35	$(call release-ide,macosx.cocoa,x86_64) ; \
36	$(call release-ide,win32.win32,x86_64) ; \
37