gyp file for pdfsqueeze

make chrome app depend on pdfsqueeze
add a rule to run pdfs through pdfsqueeze

BUG=7654
TEST=pdf files in resources should be smaller now.
Review URL: http://codereview.chromium.org/113911

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17022 0039d316-1c4b-4281-b951-d872f2087c98
Esse commit está contido em:
thomasvl@chromium.org
2009-05-27 21:12:12 +00:00
commit 10d66c2e54
2 arquivos alterados com 77 adições e 11 exclusões
+43
Ver Arquivo
@@ -0,0 +1,43 @@
# 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.
{
'includes': [
'../common.gypi',
],
'targets': [
{
'target_name': 'pdfsqueeze',
'type': 'executable',
'sources': [
'../../third_party/pdfsqueeze/pdfsqueeze.m',
],
'defines': [
# Use defines to map the full path names that will be used for
# the vars into the short forms expected by pdfsqueeze.m.
'______third_party_pdfsqueeze_ApplyGenericRGB_qfilter=ApplyGenericRGB_qfilter',
'______third_party_pdfsqueeze_ApplyGenericRGB_qfilter_len=ApplyGenericRGB_qfilter_len',
],
'include_dirs': [
'<(INTERMEDIATE_DIR)',
],
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
],
'actions': [
{
'action_name': 'Generate inline filter data',
'inputs': [
'../../third_party/pdfsqueeze/ApplyGenericRGB.qfilter',
],
'outputs': [
'<(INTERMEDIATE_DIR)/ApplyGenericRGB.h',
],
'action': ['xxd', '-i', '<@(_inputs)', '<@(_outputs)'],
},
],
},
],
}
+34 -11
Ver Arquivo
@@ -2046,6 +2046,8 @@
'app/scoped_ole_initializer.h',
],
'mac_bundle_resources': [
# put any pdfs down in the sources block below so pdfsqueeze runs on
# them.
'app/nibs/en.lproj/About.xib',
'app/nibs/en.lproj/BrowserWindow.xib',
'app/nibs/en.lproj/FindBar.xib',
@@ -2056,15 +2058,7 @@
'app/nibs/en.lproj/TabContents.xib',
'app/nibs/en.lproj/TabView.xib',
'app/nibs/en.lproj/Toolbar.xib',
'app/theme/back.pdf',
'app/theme/close_bar.pdf',
'app/theme/close_bar_h.pdf',
'app/theme/close_bar_p.pdf',
'app/theme/forward.pdf',
'app/theme/go.pdf',
'app/theme/grow_box.png',
'app/theme/nav.pdf',
'app/theme/newtab.pdf',
'app/theme/o2_globe.png',
'app/theme/o2_history.png',
'app/theme/o2_more.png',
@@ -2072,9 +2066,6 @@
'app/theme/o2_star.png',
'app/theme/reload.pdf',
'app/theme/sadtab.png',
'app/theme/star.pdf',
'app/theme/starred.pdf',
'app/theme/stop.pdf',
'../app/resources/throbber.png',
'app/theme/throbber_waiting.png',
'app/app-Info.plist',
@@ -2183,6 +2174,38 @@
'CHROMIUM_BUNDLE_ID': '<(bundle_id)',
'CHROMIUM_SHORT_NAME': '<(branding)',
},
# Bring in pdfsqueeze and run it on all pdfs
'sources': [
'app/theme/back.pdf',
'app/theme/close_bar.pdf',
'app/theme/close_bar_h.pdf',
'app/theme/close_bar_p.pdf',
'app/theme/forward.pdf',
'app/theme/go.pdf',
'app/theme/nav.pdf',
'app/theme/newtab.pdf',
'app/theme/star.pdf',
'app/theme/starred.pdf',
'app/theme/stop.pdf',
],
'dependencies': [
'../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
],
'rules': [
{
'rule_name': 'pdfsqueeze',
'extension': 'pdf',
'inputs': [
'<(PRODUCT_DIR)/pdfsqueeze',
],
'outputs': [
'<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
],
'action': ['<(PRODUCT_DIR)/pdfsqueeze', '<(RULE_INPUT_PATH)', '<@(_outputs)'],
'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
'process_outputs_as_mac_bundle_resources': 1,
},
],
}, { # else: OS != "mac"
'conditions': [
['branding=="Chrome"', {