diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 12:41:40 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 12:41:40 +0000 |
commit | 4b0d2dd2046099d9602aa256bde12a6634afcca5 (patch) | |
tree | b958bf27de5ce5fc0299e1e8671251ff92ad39d0 /chrome/tools | |
parent | b2abac7f32280c9d8bd0fd0d23c5432701634807 (diff) | |
download | chromium_src-4b0d2dd2046099d9602aa256bde12a6634afcca5.zip chromium_src-4b0d2dd2046099d9602aa256bde12a6634afcca5.tar.gz chromium_src-4b0d2dd2046099d9602aa256bde12a6634afcca5.tar.bz2 |
Wire up resource bundles on the mac:
- compile resource_bundle
- add resource_bundle_mac by cloning the linux and using some NSBundle to find
the files.
- enable resource bundles on the mac in the calling code.
- added script to app target to repack .pak files into larger chunks (chrome,
theme, and localized bits).
- added script to copy repacked files into the app bundle.
Review URL: http://codereview.chromium.org/28171
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-x | chrome/tools/mac_copy_grit_resources.sh | 37 | ||||
-rwxr-xr-x | chrome/tools/mac_repack_grit_resources.sh | 34 |
2 files changed, 71 insertions, 0 deletions
diff --git a/chrome/tools/mac_copy_grit_resources.sh b/chrome/tools/mac_copy_grit_resources.sh new file mode 100755 index 0000000..936e221 --- /dev/null +++ b/chrome/tools/mac_copy_grit_resources.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# Copyright (c) 2009 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. + +set -ex +GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated" +REPACKED_DIR="${GENERATED_DIR}/grit_repacked" +APP_RESOURCES_ROOT_DIR="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +mkdir -p "${APP_RESOURCES_ROOT_DIR}" + + +if [ "${APP_RESOURCES_ROOT_DIR}/chrome.pak" -ot \ + "${REPACKED_DIR}/chrome.pak" ] +then + cp -f "${REPACKED_DIR}/chrome.pak" \ + "${APP_RESOURCES_ROOT_DIR}/chrome.pak" +fi + +if [ "${APP_RESOURCES_ROOT_DIR}/theme.pak" -ot \ + "${REPACKED_DIR}/theme.pak" ] +then + cp -f "${REPACKED_DIR}/theme.pak" \ + "${APP_RESOURCES_ROOT_DIR}/theme.pak" +fi + +# TODO: this should loop though all the languages and copy them to the +# right folder (note the name change) + +if [ "${APP_RESOURCES_ROOT_DIR}/locale.pak" -ot \ + "${REPACKED_DIR}/locale_en-US.pak" ] +then + mkdir -p "${APP_RESOURCES_ROOT_DIR}/English.lproj" + cp -f "${REPACKED_DIR}/locale_en-US.pak" \ + "${APP_RESOURCES_ROOT_DIR}/English.lproj/locale.pak" +fi diff --git a/chrome/tools/mac_repack_grit_resources.sh b/chrome/tools/mac_repack_grit_resources.sh new file mode 100755 index 0000000..1fc3596 --- /dev/null +++ b/chrome/tools/mac_repack_grit_resources.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# Copyright (c) 2009 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. + +set -ex +GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated" +GRIT_DIR="${GENERATED_DIR}/grit" +REPACKED_DIR="${GENERATED_DIR}/grit_repacked" +mkdir -p "${REPACKED_DIR}" + +# TODO: these need dependency checks + +python "${PROJECT_DIR}/../tools/data_pack/repack.py" \ + "${REPACKED_DIR}/chrome.pak" \ + "${GRIT_DIR}/browser_resources.pak" \ + "${GRIT_DIR}/debugger_resources.pak" \ + "${GRIT_DIR}/common_resources.pak" \ + "${GRIT_DIR}/renderer_resources.pak" + +# Need two to repack, but linux avoids that by directly invoking the module, so +# we just cp instead. +cp -f "${GRIT_DIR}/theme_resources.pak" "${REPACKED_DIR}/theme.pak" + + +# TODO: we when these are built for each language, we need to loop over +# the languages and do the repack on all of them. + +python "${PROJECT_DIR}/../tools/data_pack/repack.py" \ + "${REPACKED_DIR}/locale_en-US.pak" \ + "${GRIT_DIR}/generated_resources_en-US.pak" \ + "${GRIT_DIR}/chromium_strings_en-US.pak" \ + "${GRIT_DIR}/locale_settings_en-US.pak" |