Skip to content

Commit

Permalink
Android WebView: add resource paks to the Android build.
Browse files Browse the repository at this point in the history
We need to install the Chromium resource paks that webview depends on
into the Android system image. This requires adding them as dependencies
of the WebView All target, and defining custom Android build rules to
copy them to the right place.

BUG=

Review URL: https://codereview.chromium.org/11235002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163266 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
torne@chromium.org committed Oct 22, 2012
1 parent 73f201f commit 3c394c1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
25 changes: 25 additions & 0 deletions android_webview/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,28 @@ LOCAL_SRC_FILES += \
LOCAL_GENERATED_SOURCES := $(call intermediates-dir-for,GYP,shared)/net/template/NetError.java \

include $(BUILD_STATIC_JAVA_LIBRARY)


########################################################
# These packages are the resource paks used by webview.

include $(CLEAR_VARS)
LOCAL_MODULE := webviewchromium_res_chrome
LOCAL_MODULE_STEM := chrome
include $(LOCAL_PATH)/webview_pak.mk

include $(CLEAR_VARS)
LOCAL_MODULE := webviewchromium_res_resources
LOCAL_MODULE_STEM := resources
include $(LOCAL_PATH)/webview_pak.mk

include $(CLEAR_VARS)
LOCAL_MODULE := webviewchromium_res_chrome_100_percent
LOCAL_MODULE_STEM := chrome_100_percent
include $(LOCAL_PATH)/webview_pak.mk

# TODO(torne): add other locales (filtered by PRODUCT_LOCALES?)
include $(CLEAR_VARS)
LOCAL_MODULE := webviewchromium_res_en-US
LOCAL_MODULE_STEM := locales/en-US
include $(LOCAL_PATH)/webview_pak.mk
2 changes: 2 additions & 0 deletions android_webview/all_webview.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
'type': 'none',
'dependencies': [
'android_webview.gyp:libwebview',
'../chrome/chrome_resources.gyp:packed_resources',
'../chrome/chrome_resources.gyp:packed_extra_resources',
# Needed by android_webview_java
'../net/net.gyp:net_errors_java',
],
Expand Down
16 changes: 16 additions & 0 deletions android_webview/webview_pak.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This makefile fragment describes how to install a Chromium pak into the
# Android framework for use by WebView.

LOCAL_MODULE_CLASS := GYP
LOCAL_MODULE_SUFFIX := .pak
LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)/webview/paks

include $(BUILD_SYSTEM)/base_rules.mk

built_by_gyp := $(call intermediates-dir-for,GYP,shared)/$(LOCAL_INSTALLED_MODULE_STEM)

$(eval $(call copy-one-file,$(built_by_gyp),$(LOCAL_BUILT_MODULE)))

0 comments on commit 3c394c1

Please sign in to comment.