diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 04:00:32 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 04:00:32 +0000 |
commit | cf06693e40afbc3ee50cb260739c3ef0d5ab1688 (patch) | |
tree | 7c2d05512351712bf236a5aaead33778293e0442 /chrome | |
parent | 95991b1967e509c94c3eb6bb0750fafd398c863c (diff) | |
download | chromium_src-cf06693e40afbc3ee50cb260739c3ef0d5ab1688.zip chromium_src-cf06693e40afbc3ee50cb260739c3ef0d5ab1688.tar.gz chromium_src-cf06693e40afbc3ee50cb260739c3ef0d5ab1688.tar.bz2 |
Revert 132517 - Metro/HiDPI: Move 1x icons into separate pak file
Currently all 1x art files are repacked into chrome.pak files.
This is a problem on Windows where we want to choose which pak file to load based on metro and DPI scale.
As a first step this CL does the following:
- add a new enable_hidpi build flag. This allows us to test HiDPI mode on Windows Chrome.
- stop packing theme_resources_standard.pak and ui_resources_standard.pak into chrome.pak
- update the Mac and Windows installer code to package the extra pak files.
Note, I'll be updating the Linux installer script in a separate CL. I'm still looking into the ChromeOS situation.
BUG=114311
TEST=Ran on Windows, and Mac and Linux.
Review URL: http://codereview.chromium.org/10024050
TBR=sail@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10103022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/chrome_dll.gypi | 18 | ||||
-rw-r--r-- | chrome/chrome_repack_chrome.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_repack_theme_resources_2x.gypi | 21 | ||||
-rw-r--r-- | chrome/chrome_resources.gyp | 33 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome.release | 6 | ||||
-rw-r--r-- | chrome/tools/build/chromeos/FILES.cfg | 10 | ||||
-rw-r--r-- | chrome/tools/build/linux/FILES.cfg | 10 | ||||
-rw-r--r-- | chrome/tools/build/win/FILES.cfg | 20 | ||||
-rwxr-xr-x | chrome/tools/build/win/create_installer_archive.py | 15 | ||||
-rw-r--r-- | chrome/tools/build/win/release.rules | 2 |
10 files changed, 36 insertions, 101 deletions
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index c926dc4..2744184 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -100,6 +100,7 @@ '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources_standard.rc', '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc', @@ -303,10 +304,8 @@ 'app/theme/star.pdf', 'app/theme/star_lit.pdf', 'browser/mac/install.sh', - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', - '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', - '<(grit_out_dir)/theme_resources_standard.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', + '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', + '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', # Note: pseudo_locales are generated via the packed_resources # dependency but not copied to the final target. See @@ -355,6 +354,11 @@ ], 'repack_path': '../tools/grit/grit/format/repack.py', }, + 'actions': [ + { + 'includes': ['chrome_repack_theme_resources_2x.gypi'] + }, + ], 'postbuilds': [ { # This step causes an error to be raised if the .order file @@ -533,12 +537,6 @@ '../pdf/pdf.gyp:pdf', ], }], - ['enable_hidpi==1', { - 'mac_bundle_resources': [ - '<(grit_out_dir)/theme_resources_2x.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_2x/ui_resources_2x.pak', - ], - }], ], # conditions }], # OS=="mac" ], # conditions diff --git a/chrome/chrome_repack_chrome.gypi b/chrome/chrome_repack_chrome.gypi index 342a60e..2911000 100644 --- a/chrome/chrome_repack_chrome.gypi +++ b/chrome/chrome_repack_chrome.gypi @@ -9,9 +9,11 @@ '<(grit_out_dir)/common_resources.pak', '<(grit_out_dir)/renderer_resources.pak', '<(grit_out_dir)/theme_resources.pak', + '<(grit_out_dir)/theme_resources_standard.pak', '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', ], diff --git a/chrome/chrome_repack_theme_resources_2x.gypi b/chrome/chrome_repack_theme_resources_2x.gypi new file mode 100644 index 0000000..9453118 --- /dev/null +++ b/chrome/chrome_repack_theme_resources_2x.gypi @@ -0,0 +1,21 @@ +# 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. +{ + 'action_name': 'repack_theme_resources_2x', + 'variables': { + 'pak_inputs': [ + '<(grit_out_dir)/theme_resources_2x.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/theme_resources_2x.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', + '<@(pak_inputs)'], + 'process_outputs_as_mac_bundle_resources': 1, +} diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp index d821e5e..9834578 100644 --- a/chrome/chrome_resources.gyp +++ b/chrome/chrome_resources.gyp @@ -219,39 +219,6 @@ }, ], 'includes': [ '../build/grit_target.gypi' ], - 'conditions': [ - ['OS != "mac"', { - # Copy pak files to the product directory. These files will be picked - # up by the following installer scripts: - # - Windows: chrome/installer/mini_installer/chrome.release - # - Linux: chrome/installer/linux/internal/common/installer.include - # Ensure that the above scripts are updated when adding or removing - # pak files. - # Coping files to the product directory is not needed on the Mac - # since the framework build phase will copy them into the framework - # bundle directly. - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(grit_out_dir)/theme_resources_standard.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', - ], - }, - ], - }], - ['OS != "mac" and enable_hidpi == 1', { - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(grit_out_dir)/theme_resources_2x.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_2x/ui_resources_2x.pak', - ], - }, - ], - }], - ], }, { 'target_name': 'packed_extra_resources', diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release index b3bd017..a8265a4 100644 --- a/chrome/installer/mini_installer/chrome.release +++ b/chrome/installer/mini_installer/chrome.release @@ -13,8 +13,6 @@ nacl_irt_x86_32.nexe: %(VersionDir)s\ nacl_irt_x86_64.nexe: %(VersionDir)s\ icudt.dll: %(VersionDir)s\ resources.pak: %(VersionDir)s\ -theme_resources_standard.pak: %(VersionDir)s\ -ui_resources_standard.pak: %(VersionDir)s\ locales\*.pak: %(VersionDir)s\Locales locales\*.dll: %(VersionDir)s\Locales npchrome_frame.dll: %(VersionDir)s\ @@ -32,10 +30,6 @@ xinput1_3.dll: %(VersionDir)s\ default_apps\*.crx: %(VersionDir)s\default_apps\ default_apps\external_extensions.json: %(VersionDir)s\default_apps\ -[HIDPI] -theme_resources_2x.pak: %(VersionDir)s\ -ui_resources_2x.pak: %(VersionDir)s\ - [GOOGLE_CHROME] gcswf32.dll: %(VersionDir)s\ plugin.vch: %(VersionDir)s\ diff --git a/chrome/tools/build/chromeos/FILES.cfg b/chrome/tools/build/chromeos/FILES.cfg index 958f6b2..cdf2700 100644 --- a/chrome/tools/build/chromeos/FILES.cfg +++ b/chrome/tools/build/chromeos/FILES.cfg @@ -85,16 +85,6 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'theme_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { - 'filename': 'ui_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { 'filename': 'session', 'arch': ['32bit', '64bit'], 'buildtype': ['dev'], diff --git a/chrome/tools/build/linux/FILES.cfg b/chrome/tools/build/linux/FILES.cfg index 5953a0a..88520a8 100644 --- a/chrome/tools/build/linux/FILES.cfg +++ b/chrome/tools/build/linux/FILES.cfg @@ -87,16 +87,6 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'theme_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { - 'filename': 'ui_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { 'filename': 'session', 'arch': ['32bit', '64bit'], 'buildtype': ['dev'], diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg index 60fe243..2c21743 100644 --- a/chrome/tools/build/win/FILES.cfg +++ b/chrome/tools/build/win/FILES.cfg @@ -347,26 +347,6 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'theme_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { - 'filename': 'theme_resources_2x.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { - 'filename': 'ui_resources_standard.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { - 'filename': 'ui_resources_2x.pak', - 'arch': ['32bit', '64bit'], - 'buildtype': ['dev', 'official'], - }, - { 'filename': 'wow_helper.exe', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py index 25b2972..a7adbba 100755 --- a/chrome/tools/build/win/create_installer_archive.py +++ b/chrome/tools/build/win/create_installer_archive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright (c) 2011 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. @@ -89,8 +89,7 @@ def CompressUsingLZMA(build_dir, compressed_file, input_file): RunSystemCommand(cmd) -def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir, - enable_hidpi): +def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir): """Copies the files required for installer archive. Copies all common files required for various distributions of Chromium and also files for the specific Chromium build specified by distribution. @@ -101,8 +100,6 @@ def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir, distribution = distribution[1:] CopySectionFilesToStagingDir(config, distribution.upper(), staging_dir, build_dir) - if enable_hidpi == '1': - CopySectionFilesToStagingDir(config, 'HIDPI', staging_dir, build_dir) def CopySectionFilesToStagingDir(config, section, staging_dir, build_dir): @@ -327,13 +324,11 @@ def main(options): # building the optimized mini_installer. if options.build_dir != options.output_dir: CopyAllFilesToStagingDir(config, options.distribution, - staging_dir, options.output_dir, - options.enable_hidpi) + staging_dir, options.output_dir) # Now copy the remainder of the files from the build dir. CopyAllFilesToStagingDir(config, options.distribution, - staging_dir, options.build_dir, - options.enable_hidpi) + staging_dir, options.build_dir) version_numbers = current_version.split('.') current_build_number = version_numbers[2] + '.' + version_numbers[3] @@ -385,8 +380,6 @@ def _ParseOptions(): '{BSDIFF|COURGETTE}.') parser.add_option('-n', '--output_name', default='chrome', help='Name used to prefix names of generated archives.') - parser.add_option('--enable_hidpi', default='0', - help='Whether to include HiDPI resource files.') options, args = parser.parse_args() if not options.build_dir: diff --git a/chrome/tools/build/win/release.rules b/chrome/tools/build/win/release.rules index cd3212b..21cdf14 100644 --- a/chrome/tools/build/win/release.rules +++ b/chrome/tools/build/win/release.rules @@ -7,7 +7,7 @@ <CustomBuildRule Name="Create Installer Archive" DisplayName="Create Installer Archive" - CommandLine="$(SolutionDir)..\third_party\python_24\python.exe $(SolutionDir)tools\build\win\create_installer_archive.py --output_dir="$(OutDir)" --input_file="$(InputPath)" --distribution=$(CHROMIUM_BUILD) --enable_hidpi=$(ENABLE_HIDPI) [LastChromeInstaller] [SkipRebuildArchive] [SetupExeFormat] [DiffAlgorithm]" + CommandLine="$(SolutionDir)..\third_party\python_24\python.exe $(SolutionDir)tools\build\win\create_installer_archive.py --output_dir="$(OutDir)" --input_file="$(InputPath)" --distribution=$(CHROMIUM_BUILD) [LastChromeInstaller] [SkipRebuildArchive] [SetupExeFormat] [DiffAlgorithm]" Outputs="$(OutDir)/$(InputName).7z;$(OutDir)/$(InputName).packed.7z;$(OutDir)/setup.ex_;$(OutDir)/packed_files.txt;" AdditionalDependencies="$(SolutionDir)\tools\build\win\create_installer_archive.py;$(OutDir)\chrome.exe;$(OutDir)\crash_reporter.exe;$(OutDir)\chrome.dll;$(OutDir)\locales\en-US.dll;$(OutDir)\icudt38.dll" FileExtensions="*.release" |