summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/temp_gyp/pdfsqueeze.gyp43
-rw-r--r--chrome/chrome.gyp45
2 files changed, 77 insertions, 11 deletions
diff --git a/build/temp_gyp/pdfsqueeze.gyp b/build/temp_gyp/pdfsqueeze.gyp
new file mode 100644
index 0000000..1478410
--- /dev/null
+++ b/build/temp_gyp/pdfsqueeze.gyp
@@ -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)'],
+ },
+ ],
+ },
+ ],
+}
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 5c95528..5ef7988 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -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"', {