2 include ..
/..
/..
/config_host.mk
5 # The default target just builds.
9 # The package of this app
10 APP_PACKAGE
=org.libreoffice
12 BOOTSTRAPDIR
=..
/..
/Bootstrap
13 include $(BOOTSTRAPDIR
)/Makefile.shared
16 # Then "assets". Let the directory structure under assets mimic
17 # that under solver for now.
19 # Please note that I have no idea what all of this is really necessary and for
20 # much of this stuff being copied, no idea whether it makes any sense at all.
21 # Much of this is copy-pasted from android/qa/sc/Makefile (where a couple of
22 # unit tests for sc are built, and those do seem to mostly work) and
23 # android/qa/desktop/Makefile (mmeeks's desktop demo, also works to some
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 for F in xml
/services xml
/ure
/services
; do \
32 sed
-e
's!uri="vnd.sun.star.expand:$$LO_LIB_DIR/!uri="file://$$APP_DATA_DIR/lib/!g' <$(OUTDIR
)/$$F.rdb
>assets
/$$F.rdb
; \
34 cp
$(SRC_ROOT
)/odk
/examples
/java
/DocumentHandling
/test/test1.odt \
35 $(SRC_ROOT
)/sc
/qa
/unit
/data
/xls
/border.xls \
36 $(SRC_ROOT
)/sw
/qa
/core
/data
/odt
/test.odt \
37 $(SRC_ROOT
)/sw
/qa
/core
/data
/doc
/testVba.doc \
39 cp
$(WORKDIR
)/ComponentTarget
/i18npool
/util
/i18npool.component assets
/ComponentTarget
/i18npool
/util
41 mkdir
-p assets
/ure
/share
/misc assets
/share
/registry
/res assets
/share
/config
42 cp
-R
$(OUTDIR
)/xml
/*.xcd assets
/share
/registry
43 mv assets
/share
/registry
/fcfg_langpack_en-US.xcd assets
/share
/registry
/res
44 cp
-R
$(INSTDIR
)/share
/config
/soffice.cfg assets
/share
/config
45 cp
-R
$(OUTDIR
)/xml
/registry
/* assets
/share
/registry
47 # Set up rc, the "inifile". See BootstrapMap::getBaseIni(). As this app
48 # doesn't use soffice_main() (at least I think it shouldn't), the
49 # rtl::Bootstrap::setIniFilename() call there that hardcodes
50 # /assets/program/lofficerc isn't executed. Instead the hardcoding of
51 # /assets/rc in BootstrapMap::getBaseIni() gets used.
52 echo
'[Bootstrap]' > assets
/rc
53 echo
'Logo=1' >> assets
/rc
54 echo
'NativeProgress=1' >> assets
/rc
55 echo
'URE_BOOTSTRAP=file:///assets/program/fundamentalrc' >> assets
/rc
56 # echo 'RTL_LOGFILE=file:///dev/log/main' >> assets/rc
57 echo
'HOME=$$APP_DATA_DIR/cache' >> assets
/rc
58 echo
'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' >> assets
/rc
60 # Set up fundamentalrc
61 echo
'[Bootstrap]' > assets
/program
/fundamentalrc
62 echo
'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> assets
/program
/fundamentalrc
63 echo
'URE_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> assets
/program
/fundamentalrc
# checkme - is this used to find configs ?
64 echo
'BRAND_BASE_DIR=file:///assets' >> assets
/program
/fundamentalrc
65 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
66 echo
'URE_BIN_DIR=file:///assets/ure/bin/dir/nothing-here/we-can/exec-anyway' >> assets
/program
/fundamentalrc
69 echo
'[Bootstrap]' > assets
/program
/unorc
70 echo
'URE_INTERNAL_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> assets
/program
/unorc
71 echo
'UNO_TYPES=file://$$APP_DATA_DIR/program/udkapi.rdb file://$$APP_DATA_DIR/program/offapi.rdb file://$$APP_DATA_DIR/program/oovbaapi.rdb' >> assets
/program
/unorc
72 echo
'UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/xml/services.rdb <$$BRAND_BASE_DIR/program/services>*' >> assets
/program
/unorc
75 echo
'[Bootstrap]' > assets
/program
/bootstraprc
76 echo
'InstallMode=<installmode>' >> assets
/program
/bootstraprc
77 echo
'ProductKey=LibreOffice $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR)' >> assets
/program
/bootstraprc
78 echo
'UserInstallation=file://$$APP_DATA_DIR' >> assets
/program
/bootstraprc
81 echo
'[Version]' > assets
/program
/versionrc
82 echo
'AllLanguages=en-US' >> assets
/program
/versionrc
83 echo
'BuildVersion=' >> assets
/program
/versionrc
84 echo
'buildid=dead-beef' >> assets
/program
/versionrc
85 echo
'ProductMajor=360' >> assets
/program
/versionrc
86 echo
'ProductMinor=1' >> assets
/program
/versionrc
87 echo
'ReferenceOOoMajorMinor=3.6' >> assets
/program
/versionrc
90 mkdir
-p assets
/program
/resource
91 cp
$(OUTDIR
)/bin
/*en-US.res assets
/program
/resource
93 # Assets that are unpacked at run-time into the app's data directory. These
94 # are files read by non-LO code, fontconfig and freetype for now, that doesn't
95 # understand "/assets" paths.
96 mkdir
-p assets
/unpack
/etc
/fonts
97 cp fonts.conf assets
/unpack
/etc
/fonts
98 # $UserInstallation/user/fonts is added to the fontconfig path in
99 # vcl/generic/fontmanager/helper.cxx: psp::getFontPath(). UserInstallation is
100 # set to the app's data dir above.
101 mkdir
-p assets
/gz.unpack
/user
/fonts
102 for F in
$(INSTDIR
)/share
/fonts
/truetype
/Liberation
*.ttf
$(INSTDIR
)/share
/fonts
/truetype
/Gen
*.ttf
$(INSTDIR
)/share
/fonts
/truetype
/opens___.ttf
; do \
103 gzip
-9 <$$F >assets
/gz.unpack
/user
/fonts
/`basename $$F`; \
106 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
109 cp
$(ANDROID_NDK_GDBSERVER
) $(SODEST
)
110 echo set solib-search-path .
/obj
/local
/$(ANDROID_APP_ABI
) >$(SODEST
)/gdb.setup
112 build-ant
: android_version_setup copy-stuff link-so properties
113 echo sdk.
dir=$(ANDROID_SDK_HOME
) >..
/..
/abs-lib
/local.properties
114 # ActionBarSherlock uses the v4 support library, apparently one needs to copy
115 # it like this for it to be found
116 mkdir
-p ..
/..
/abs-lib
/libs
117 cp
$(ANDROID_SDK_HOME
)/extras
/android
/support
/v4
/android-support-v4.jar ..
/..
/abs-lib
/libs
119 # Copy jar files we need
129 $(call COPYJAR
,$(OUTDIR
)/bin
/$${F}.jar
); \
132 unset JAVA_HOME
&& $(ANT
) -quiet debug
135 adb
shell am start
-n
$(APP_PACKAGE
)/.ui.LibreOfficeUIActivity
-e input
/assets
/test1.odt