2013-10-29 11:25:25 -05:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
#- Env ------------------------------------------------------------------------
|
|
|
|
|
2013-12-17 16:03:02 -06:00
|
|
|
MobileLibreOffice_resource := MobileLibreOffice/resource_link
|
2013-10-29 11:25:25 -05:00
|
|
|
BUILDID :=$(shell cd $(SRCDIR) && git log -1 --format=%H)
|
2013-11-22 04:42:58 -06:00
|
|
|
|
2013-10-29 11:25:25 -05:00
|
|
|
#- Macros ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
define MobileLibreOfficeXcodeBuild
|
2013-12-17 16:03:02 -06:00
|
|
|
CC=;xcodebuild -project shared/ios_sharedlo.xcodeproj -target ios_sharedlo -arch $(XCODE_ARCHS) -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
|
|
|
|
CC=;xcodebuild -project MobileLibreOffice/MobileLibreOffice.xcodeproj -target MobileLibreOffice -arch $(XCODE_ARCHS) -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
|
2013-10-29 11:25:25 -05:00
|
|
|
endef
|
2013-10-31 07:19:56 -05:00
|
|
|
|
2013-10-29 11:25:25 -05:00
|
|
|
#- Targets --------------------------------------------------------------------
|
|
|
|
|
|
|
|
.PHONY: MobileLibreOffice_setup
|
|
|
|
|
|
|
|
#==============================================================================
|
|
|
|
# Register target
|
|
|
|
$(eval $(call gb_CustomTarget_CustomTarget,ios/MobileLibreOffice))
|
|
|
|
#==============================================================================
|
|
|
|
|
|
|
|
#==============================================================================
|
|
|
|
# Build
|
2013-12-16 09:45:52 -06:00
|
|
|
# Depend on the custom target that sets up lo.xcconfig
|
|
|
|
$(call gb_CustomTarget_get_target,ios/MobileLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) MobileLibreOffice_setup
|
2013-10-29 11:25:25 -05:00
|
|
|
#==============================================================================
|
|
|
|
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
|
2013-12-31 08:05:01 -06:00
|
|
|
$(SRCDIR)/solenv/bin/native-code.py \
|
2014-03-06 06:46:02 -06:00
|
|
|
-g core -g writer \
|
2013-12-31 08:05:01 -06:00
|
|
|
> $(SRCDIR)/ios/shared/ios_sharedlo/cxx/native-code.mm
|
2013-10-29 11:25:25 -05:00
|
|
|
$(call MobileLibreOfficeXcodeBuild, clean build)
|
|
|
|
|
|
|
|
#==============================================================================
|
|
|
|
# Setup
|
|
|
|
MobileLibreOffice_setup:
|
|
|
|
#==============================================================================
|
|
|
|
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
|
|
|
|
|
|
|
|
# Resources #
|
2013-12-17 16:03:02 -06:00
|
|
|
rm -rf $(MobileLibreOffice_resource) 2>/dev/null
|
|
|
|
mkdir -p $(MobileLibreOffice_resource)
|
|
|
|
mkdir -p $(MobileLibreOffice_resource)/ure
|
2013-10-29 11:25:25 -05:00
|
|
|
|
|
|
|
# copy rdb files
|
2013-12-17 16:03:02 -06:00
|
|
|
cp $(INSTDIR)/ure/share/misc/types.rdb $(MobileLibreOffice_resource)
|
|
|
|
cp $(INSTDIR)/program/types/offapi.rdb $(MobileLibreOffice_resource)
|
|
|
|
cp $(INSTDIR)/program/types/oovbaapi.rdb $(MobileLibreOffice_resource)
|
|
|
|
cp $(INSTDIR)/program/services/services.rdb $(MobileLibreOffice_resource)
|
|
|
|
cp $(INSTDIR)/ure/share/misc/services.rdb $(MobileLibreOffice_resource)/ure
|
2013-10-29 11:25:25 -05:00
|
|
|
|
|
|
|
# copy .res files
|
|
|
|
# program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
|
|
|
|
# we could set STAR_RESOURCE_PATH instead. sigh...
|
2013-12-17 16:03:02 -06:00
|
|
|
mkdir -p $(MobileLibreOffice_resource)/program/resource
|
|
|
|
cp $(INSTDIR)/program/resource/*en-US.res $(MobileLibreOffice_resource)/program/resource
|
2013-10-29 11:25:25 -05:00
|
|
|
|
|
|
|
# soffice.cfg
|
2013-12-17 16:03:02 -06:00
|
|
|
mkdir -p $(MobileLibreOffice_resource)/share/config
|
|
|
|
cp -R $(INSTDIR)/share/config/soffice.cfg $(MobileLibreOffice_resource)/share/config
|
2013-11-22 04:42:58 -06:00
|
|
|
|
2013-10-29 11:25:25 -05:00
|
|
|
# "registry"
|
2013-12-17 16:03:02 -06:00
|
|
|
cp -R $(INSTDIR)/share/registry $(MobileLibreOffice_resource)/share
|
2013-11-22 04:42:58 -06:00
|
|
|
|
2013-10-29 11:25:25 -05:00
|
|
|
# Set up rc, the "inifile". See getIniFileName_Impl().
|
2013-12-17 16:03:02 -06:00
|
|
|
file=$(MobileLibreOffice_resource)/rc; \
|
2013-10-29 11:25:25 -05:00
|
|
|
echo '[Bootstrap]' > $$file; \
|
|
|
|
echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' >> $$file; \
|
|
|
|
echo 'HOME=$$APP_DATA_DIR/tmp' >> $$file;
|
|
|
|
|
|
|
|
# Set up fundamentalrc, unorc, bootstraprc and versionrc.
|
|
|
|
# Do we really need all these?
|
2013-12-17 16:03:02 -06:00
|
|
|
file=$(MobileLibreOffice_resource)/fundamentalrc; \
|
2013-10-29 11:25:25 -05:00
|
|
|
echo '[Bootstrap]' > $$file; \
|
|
|
|
echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' >> $$file; \
|
|
|
|
echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry res:$${BRAND_BASE_DIR}/registry' >> $$file;
|
|
|
|
|
2013-12-17 16:03:02 -06:00
|
|
|
file=$(MobileLibreOffice_resource)/unorc; \
|
2013-10-29 11:25:25 -05:00
|
|
|
echo '[Bootstrap]' > $$file;
|
|
|
|
|
|
|
|
# bootstraprc must be in $BRAND_BASE_DIR/program
|
2013-12-17 16:03:02 -06:00
|
|
|
mkdir -p $(MobileLibreOffice_resource)/program
|
|
|
|
file=$(MobileLibreOffice_resource)/program/bootstraprc; \
|
2013-10-29 11:25:25 -05:00
|
|
|
echo '[Bootstrap]' > $$file; \
|
|
|
|
echo 'InstallMode=<installmode>' >> $$file; \
|
|
|
|
echo "ProductKey=LibreOffice $(PRODUCTVERSION)" >> $$file; \
|
|
|
|
echo 'UserInstallation=file://$$APP_DATA_DIR/../Library/Application%20Support' >> $$file;
|
|
|
|
|
|
|
|
# Is this really needed?
|
2013-12-17 16:03:02 -06:00
|
|
|
file=$(MobileLibreOffice_resource)/program/versionrc; \
|
2013-10-29 11:25:25 -05:00
|
|
|
echo '[Version]' > $$file; \
|
|
|
|
echo 'AllLanguages=en-US' >> $$file; \
|
|
|
|
echo 'BuildVersion=' >> $$file; \
|
|
|
|
echo "buildid=$(BUILDID)" >> $$file; \
|
|
|
|
echo 'ProductMajor=360' >> $$file; \
|
|
|
|
echo 'ProductMinor=1' >> $$file;
|
2013-11-22 04:42:58 -06:00
|
|
|
|
2013-10-29 11:25:25 -05:00
|
|
|
#==============================================================================
|
|
|
|
# Clean
|
|
|
|
$(call gb_CustomTarget_get_clean_target,ios/MobileLibreOffice):
|
|
|
|
#==============================================================================
|
|
|
|
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
|
|
|
|
$(call MobileLibreOfficeXcodeBuild, clean)
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# vim: set noet sw=4 ts=4:
|