summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-12-14 17:56:10 +0200
committerTor Lillqvist <tlillqvist@suse.com>2011-12-14 18:04:50 +0200
commite730da8be75cbb87b6b78566e2bd028d43402e6b (patch)
tree482311e3b7694e34a90755c6e19c1913075e9e71 /android
parent829c5338b7102e7add7a080c50b938100a38b2e5 (diff)
Turn Bootstrap into a "library" project from Ant's point of view
Diffstat (limited to 'android')
-rw-r--r--android/Bootstrap/AndroidManifest.xml19
-rw-r--r--android/Bootstrap/Makefile129
-rw-r--r--android/Bootstrap/build.xml29
-rw-r--r--android/Bootstrap/project.properties1
-rw-r--r--android/Bootstrap/res/layout/main.xml12
-rw-r--r--android/Bootstrap/res/values/strings.xml4
6 files changed, 3 insertions, 191 deletions
diff --git a/android/Bootstrap/AndroidManifest.xml b/android/Bootstrap/AndroidManifest.xml
index 159bbf105d75..69c83e5a2224 100644
--- a/android/Bootstrap/AndroidManifest.xml
+++ b/android/Bootstrap/AndroidManifest.xml
@@ -3,22 +3,7 @@
package="org.libreoffice.android"
android:versionCode="1"
android:versionName="1.0">
- <uses-sdk android:minSdkVersion="9" />
- <!-- This .apk uses a subclass of NativeActivity, so it *has* Java code. -->
- <!-- android:hasCode="false" -->
- <application android:label="@string/app_name"
- android:debuggable="true">
- <!-- <activity android:name="android.app.NativeActivity" -->
- <activity android:name=".Bootstrap"
- android:label="LibreOffice Bootstrap"
- android:configChanges="orientation|keyboardHidden">
- <!-- Tell NativeActivity the name of our .so -->
- <meta-data android:name="android.app.lib_name"
- android:value="lo-bootstrap" />
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
+ <application>
+ <activity android:name="org.libreoffice.android.Bootstrap" />
</application>
</manifest>
diff --git a/android/Bootstrap/Makefile b/android/Bootstrap/Makefile
deleted file mode 100644
index d8a7004579c7..000000000000
--- a/android/Bootstrap/Makefile
+++ /dev/null
@@ -1,129 +0,0 @@
-# The full path the the app's directory needs to be supplied in a
-# couple of places, unfortunately.
-
-APP_DATA_PATH=/data/data/org.libreoffice.android
-
-NDK_HOME:=$(shell type -p ndk-build)
-NDK_HOME:=$(shell dirname $(NDK_HOME))
-
-SODEST=libs/armeabi-v7a
-OBJLOCAL=obj/local/armeabi-v7a
-
-define COPY
-cp $(1) $(SODEST)$(if $(2),/$(2)) && \
-arm-linux-androideabi-strip --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
-cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
-endef
-
-# The default target just builds.
-
-all: build-ant lo-bootstrap.jar
-
-copy-stuff:
-#
-# Copy shared libraries we need to libs/armeabi-v7a so that ant will
-# include them in the .apk.
-#
-# Copy them to obj/local/armeabi-v7a, too, where gdb will look for
-# them.
-#
- mkdir -p $(SODEST) $(OBJLOCAL)
-#
-# First the most important one, liblo-bootstrap.so
- $(call COPY,$(OUTDIR)/lib/liblo-bootstrap.so)
-#
-# Then the cppunittester "program". As all "program"
-# files we build for Android actually is a shared object.
- $(call COPY,$(OUTDIR)/bin/cppunit/cppunittester,libcppunittester.so)
-#
-# The cppunit library
- $(call COPY,$(OUTDIR)/lib/libcppunit-1.12.so)
-#
-# cppunit "plug-ins", first ones from sal
-#
- $(call COPY,../../sal/$(INPATH)/lib/*.so)
-#
-# and ones from other modules. Note that depending on when you try
-# this, these might not have been built yet.
-#
- for F in $(SRC_ROOT)/cppu/$(INPATH)/lib/qa_*.so; do \
- $(call COPY,$${F},`basename $${F}`); \
- done
-#
- for F in i18npool_test_breakiterator; do \
- $(call COPY,$(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so); \
- done
-#
-# Other "programs"
- $(call COPY,$(OUTDIR)/bin/uno,libunoexe.so)
-#
-# Libs and UNO components that the tests from other modules need.
-#
- for F in $(strip \
- comphelpgcc3 \
- gcc3_uno \
- i18nisolang1gcc3 \
- i18nutilgcc3 \
- icudatalo \
- icui18nlo \
- icuuclo \
- localedata_en \
- localedata_others \
- reg \
- store \
- ucbhelper4gcc3 \
- uno_cppu \
- uno_salhelpergcc3 \
- uno_cppuhelpergcc3 \
- unoexceptionprotector \
- xml2 \
- xmlreader \
- bootstrap.uno \
- i18npool.uno); do \
- $(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
- done
-#
-# Then the shared GNU C++ library
- $(call COPY,$(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so)
-#
-# bridgetest components, not in solver
- for F in bridgetest constructors cppobj; do \
- $(call COPY,$(SRC_ROOT)/testtools/$(INPATH)/lib/lib$${F}.uno.so); \
- done
-#
-# Then other "assets". Let the directory structure under assets mimic
-# that under solver for now.
- mkdir -p assets/bin assets/lib assets/xml/ure assets/ComponentTarget/i18npool/util
- cp $(OUTDIR)/bin/udkapi.rdb assets/bin
- cp $(OUTDIR)/bin/types.rdb assets/bin
- cp $(OUTDIR)/xml/ure/services.rdb assets/xml/ure
- cp $(WORKDIR)/ComponentTarget/i18npool/util/i18npool.component assets/ComponentTarget/i18npool/util
- for F in uno_services uno_types; do \
- sed -e 's!uri="./!uri="$(APP_DATA_PATH)/lib/!g' <$(SRC_ROOT)/testtools/$(INPATH)/lib/$${F}.rdb >assets/lib/$${F}.rdb; \
- done
-
-build-ant: copy-stuff
- unset JAVA_HOME && ant debug
-
-lo-bootstrap.jar: build-ant
- cd bin/classes && jar cvf ../../lo-bootstrap.jar fi/iki/tml org/libreoffice/android/Bootstrap.class
-
-install: copy-stuff lo-bootstrap.jar
- cp lo-bootstrap.jar $(OUTDIR)bin
- unset JAVA_HOME && ant debug install
- @echo
- @echo 'Run it with something like what "make run" does (see Makefile)'
- @echo
-
-run:
-# Note: these are just examples.
-#
- adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libqa_sal_types.so"
-#
- sleep 10
- adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libtest_i18npool_test_breakiterator.so --protector libunoexceptionprotector.so unoexceptionprotector '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/i18npool/util/i18npool.component' -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib"
-#
-# adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libunoexe -e lo-main-cmdline "-ro /assets/lib/uno_services.rdb -ro /assets/lib/uno_types.rdb -s com.sun.star.test.bridge.BridgeTest -- com.sun.star.test.bridge.CppTestObject" -e lo-main-delay 2
-
-clean:
- rm -rf bin assets
diff --git a/android/Bootstrap/build.xml b/android/Bootstrap/build.xml
index 6b091c49c2bd..a186d8d62060 100644
--- a/android/Bootstrap/build.xml
+++ b/android/Bootstrap/build.xml
@@ -82,33 +82,4 @@
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
- <!-- Re-define the "-package-resources" target to not compress resources -->
-
- <target name="-package-resources" depends="-crunch">
- <!-- only package resources if *not* a library project -->
- <do-only-if-not-library elseText="Library project: do not package resources..." >
- <aapt executable="${aapt}"
- command="package"
- versioncode="${version.code}"
- versionname="${version.name}"
- debug="${build.is.packaging.debug}"
- manifest="AndroidManifest.xml"
- assets="${asset.absolute.dir}"
- androidjar="${android.jar}"
- apkfolder="${out.absolute.dir}"
- nocrunch="${build.packaging.nocrunch}"
- resourcefilename="${resource.package.file.name}"
- resourcefilter="${aapt.resource.filter}"
- projectLibrariesResName="project.libraries.res"
- projectLibrariesPackageName="project.libraries.package"
- previousBuildType="${build.last.target}"
- buildType="${build.target}">
- <res path="${out.res.absolute.dir}" />
- <res path="${resource.absolute.dir}" />
- <nocompress /> <!-- forces no compression on any files in assets or res/raw -->
- <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
- </aapt>
- </do-only-if-not-library>
- </target>
-
</project>
diff --git a/android/Bootstrap/project.properties b/android/Bootstrap/project.properties
index 730e911f2f9e..5ca7d6247a65 100644
--- a/android/Bootstrap/project.properties
+++ b/android/Bootstrap/project.properties
@@ -7,5 +7,6 @@
# "ant.properties", and override values to adapt the script to your
# project structure.
+android.library=true
# Project target.
target=android-14
diff --git a/android/Bootstrap/res/layout/main.xml b/android/Bootstrap/res/layout/main.xml
deleted file mode 100644
index 5839d8cda704..000000000000
--- a/android/Bootstrap/res/layout/main.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Hello World"
- />
-</LinearLayout>
diff --git a/android/Bootstrap/res/values/strings.xml b/android/Bootstrap/res/values/strings.xml
deleted file mode 100644
index f296dd4b137d..000000000000
--- a/android/Bootstrap/res/values/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string name="app_name">LibreOfficeBootstrap</string>
-</resources>