fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / android / experimental / desktop / Makefile
blob4d4fe6d4eb0432886a19fc922d79cd60ac4ccf3d
1 ifeq ($(BUILDDIR),)
2 include ../../../config_host.mk
3 endif
5 # The default target just builds.
6 all: build-ant
8 # The package of this app
9 APP_PACKAGE=org.libreoffice.experimental.desktop
11 BOOTSTRAPDIR=../../Bootstrap
12 include $(BOOTSTRAPDIR)/Makefile.shared
14 # The name of the Bootstrap activity class
15 BOOTSTRAP=org.libreoffice.android.Bootstrap
17 # The default target just builds.
19 copy-stuff:
20 # Then "assets". Let the directory structure under assets mimic
21 # that under solver for now.
23 # Please note that some of thses files being set up to be present in
24 # the .apk and/or unpacked at install time might be unnecessary.
26 mkdir -p assets/gz.unpack/program/ure assets/lib assets/program assets/xml/ure assets/ComponentTarget/i18npool/util
27 gzip -9 <$(OUTDIR)/bin/offapi.rdb >assets/gz.unpack/program/offapi.rdb
28 gzip -9 <$(OUTDIR)/bin/oovbaapi.rdb >assets/gz.unpack/program/oovbaapi.rdb
29 gzip -9 <$(OUTDIR)/bin/udkapi.rdb >assets/gz.unpack/program/udkapi.rdb
30 # For some reason the vnd.sun.star.expand:$LO_LIB_DIR doesn't seem to work, it expands to empty!?
31 # So just hardcode the known APP_DATA_PATH for now...
32 for F in xml/services xml/ure/services; do \
33 sed -e 's!uri="vnd.sun.star.expand:$$LO_LIB_DIR/!uri="file://$(APP_DATA_PATH)/lib/!g' <$(OUTDIR)/$$F.rdb >assets/$$F.rdb; \
34 done
35 cp $(SRC_ROOT)/odk/examples/java/DocumentHandling/test/test1.odt \
36 $(SRC_ROOT)/sc/qa/unit/data/xls/border.xls \
37 $(SRC_ROOT)/sw/qa/core/data/odt/test.odt \
38 $(SRC_ROOT)/sw/qa/core/data/doc/testVba.doc \
39 assets
40 cp $(WORKDIR)/ComponentTarget/i18npool/util/i18npool.component assets/ComponentTarget/i18npool/util
42 mkdir -p assets/ure/share/misc assets/share/registry/res assets/share/config
43 cp -R $(OUTDIR)/xml/*.xcd assets/share/registry
44 mv assets/share/registry/fcfg_langpack_en-US.xcd assets/share/registry/res
45 cp -R $(INSTDIR)/share/config/soffice.cfg assets/share/config
46 cp -R $(OUTDIR)/xml/registry/* assets/share/registry
48 # Set up rc, the "inifile". See BootstrapMap::getBaseIni(). As this app
49 # doesn't use soffice_main() (at least I think it shouldn't), the
50 # rtl::Bootstrap::setIniFilename() call there that hardcodes
51 # /assets/program/lofficerc isn't executed. Instead the hardcoding of
52 # /assets/rc in BootstrapMap::getBaseIni() gets used.
53 echo '[Bootstrap]' > assets/rc
54 echo 'Logo=1' >> assets/rc
55 echo 'NativeProgress=1' >> assets/rc
56 echo 'URE_BOOTSTRAP=file:///assets/program/fundamentalrc' >> assets/rc
57 # echo 'RTL_LOGFILE=file:///dev/log/main' >> assets/rc
58 echo "HOME=$(APP_DATA_PATH)/cache" >> assets/rc
59 echo "OSL_SOCKET_PATH=$(APP_DATA_PATH)/cache" >> assets/rc
61 # Set up fundamentalrc
62 echo '[Bootstrap]' > assets/program/fundamentalrc
63 echo "LO_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc
64 echo "URE_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc # checkme - is this used to find configs ?
65 echo 'BRAND_BASE_DIR=file:///assets' >> assets/program/fundamentalrc
66 echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry module:$${BRAND_BASE_DIR}/share/registry/modules res:$${BRAND_BASE_DIR}/share/registry' >> assets/program/fundamentalrc
67 echo 'URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway' >> assets/program/fundamentalrc
68 echo 'URE_MORE_TYPES=file://$(APP_DATA_PATH)/program/offapi.rdb file://$(APP_DATA_PATH)/program/oovbaapi.rdb' >> assets/program/fundamentalrc
69 echo 'URE_MORE_SERVICES=file:///assets/xml/services.rdb <$$BRAND_BASE_DIR/program/services>*' >> assets/program/fundamentalrc
71 # Set up unorc
72 echo '[Bootstrap]' > assets/program/unorc
73 echo "URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/unorc
74 echo 'UNO_TYPES=file://$(APP_DATA_PATH)/program/udkapi.rdb $${URE_MORE_TYPES}' >> assets/program/unorc
75 echo 'UNO_SERVICES=file:///assets/xml/ure/services.rdb $${URE_MORE_SERVICES}' >> assets/program/unorc
77 # Set up bootstraprc
78 echo '[Bootstrap]' > assets/program/bootstraprc
79 echo 'InstallMode=<installmode>' >> assets/program/bootstraprc
80 echo 'ProductKey=LibreOffice $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR)' >> assets/program/bootstraprc
81 echo "UserInstallation=file://$(APP_DATA_PATH)" >> assets/program/bootstraprc
83 # Set up versionrc
84 echo '[Version]' > assets/program/versionrc
85 echo 'AllLanguages=en-US' >> assets/program/versionrc
86 echo 'BuildVersion=' >> assets/program/versionrc
87 echo 'buildid=dead-beef' >> assets/program/versionrc
88 echo 'ProductMajor=360' >> assets/program/versionrc
89 echo 'ProductMinor=1' >> assets/program/versionrc
90 echo 'ReferenceOOoMajorMinor=3.6' >> assets/program/versionrc
92 # .res files
93 mkdir -p assets/program/resource
94 cp $(OUTDIR)/bin/*en-US.res assets/program/resource
96 # Assets that are unpacked at run-time into the app's data directory. These
97 # are files read by non-LO code, fontconfig and freetype for now, that doesn't
98 # understand "/assets" paths.
99 mkdir -p assets/unpack/etc/fonts
100 cp fonts.conf assets/unpack/etc/fonts
101 # $UserInstallation/user/fonts is added to the fontconfig path in
102 # vcl/generic/fontmanager/helper.cxx: psp::getFontPath(). UserInstallation is
103 # set to the app's data dir above.
104 mkdir -p assets/gz.unpack/user/fonts
105 for F in $(INSTDIR)/share/fonts/truetype/Liberation*.ttf $(INSTDIR)/share/fonts/truetype/Gen*.ttf $(INSTDIR)/share/fonts/truetype/opens___.ttf; do \
106 gzip -9 <$$F >assets/gz.unpack/user/fonts/`basename $$F`; \
107 done
109 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
111 mkdir -p $(SODEST)
112 cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
113 echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup
114 # ------------ Pieces not from DocumentLoader ------------
115 # tango artwork / icons
116 mkdir -p assets/share/config
117 cp -R $(OUTDIR)/bin/images_tango.zip assets/share/config
118 # shell / splash images
119 mkdir -p assets/program
120 cp -r $(SRC_ROOT)/icon-themes/galaxy/brand/* assets/program
121 # presets - becomes the users home directory, .stamp forces .zip dir creation
122 for D in $(strip autocorr autotext backup basic config gallery \
123 psprint/driver psprint/fontmetric template \
124 uno_packages/cache wordbook); do \
125 mkdir -p assets/presets/$$D ; \
126 echo "content" > assets/presets/$$D/stamp; \
127 done
128 # lofficerc
129 mkdir -p assets/program/
130 echo "[Bootstrap]" > assets/program/lofficerc
131 echo "Logo=1" >> assets/program/lofficerc
132 echo "NativeProgress=1" >> assets/program/lofficerc
133 echo "URE_BOOTSTRAP=file:///assets/program/fundamentalrc" >> assets/program/lofficerc
134 # echo "RTL_LOGFILE=file:///dev/log/main" >> assets/program/lofficerc
135 echo "HOME=$(APP_DATA_PATH)/files" >> assets/program/lofficerc
136 echo "OSL_SOCKET_PATH=$(APP_DATA_PATH)/files" >> assets/program/lofficerc
137 # - this looks useful but breaks more than it fixes ...
138 # echo "DISABLE_EXTENSION_SYNCHRONIZATION=1" >> assets/program/lofficerc
141 setup-jars:
143 # Copy jar files we need
145 for F in $(strip \
146 java_uno \
147 juh \
148 jurt \
149 ridl \
150 unoil \
151 unoloader \
152 ); do \
153 $(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
154 done
156 build-ant: android_version_setup copy-stuff link-so properties setup-jars
157 unset JAVA_HOME && $(ANT) -quiet debug
159 run:
160 $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/.Desktop