Build Breakpad from source for mac build
Previously official build (--branding=GoogleJapaneseInput) for macOS
build has relied on prebuilt Breakpad binaries on macOS. With this CL,
Breakpad is always built from source code, including
OSS (--branding=Mozc) build.
Note that unless --branding=GoogleJapaneseInput is specified
- |mozc::config::StatsConfigUtil::IsEnabled()| always returns false.
- Crash dumps are stored in $TMPDIR/Mozc/CrashReports.
- The URL of crash server is pointed to file:///dev/null, as an invalid
parameter.
Now Breakpad is copied to each application, which slightly increases the
size of package. Here we relax the size limit of dmg file to 70MB.
BUG=
TEST=
REF_BUG=31891161
REF_CL=135875361,136678890,136686011,136689657,136987935,137123863,137673918,137777808,139689028
REF_TIME=2016-10-20T16:30:11+09:00
REF_TIME_RAW=1476948611 +0900
Hiroyuki Komatsu
7 years ago
427 | 427 | ], |
428 | 428 | }], |
429 | 429 | ['OS=="mac"', { |
430 | 'hard_dependency': 1, | |
430 | 431 | 'sources': [ |
431 | 432 | 'crash_report_handler_mac.mm', |
432 | 433 | ], |
433 | 434 | 'sources!': [ |
434 | 435 | 'crash_report_handler.cc', |
435 | ] | |
436 | ], | |
437 | 'dependencies': [ | |
438 | 'breakpad', | |
439 | ], | |
436 | 440 | }], |
437 | 441 | ], |
438 | 442 | }, |
534 | 538 | ['OS=="mac"', { |
535 | 539 | 'targets': [ |
536 | 540 | { |
541 | 'target_name': 'breakpad', | |
542 | 'type': 'none', | |
543 | 'variables': { | |
544 | 'pbdir': '<(third_party_dir)/breakpad', | |
545 | }, | |
546 | 'actions': [{ | |
547 | 'action_name': 'build_breakpad', | |
548 | 'inputs': [ | |
549 | '<(pbdir)/src/client/mac/Breakpad.xcodeproj/project.pbxproj', | |
550 | ], | |
551 | 'outputs': [ | |
552 | '<(mac_breakpad_dir)/Breakpad.framework', | |
553 | '<(mac_breakpad_dir)/Inspector', | |
554 | '<(mac_breakpad_dir)/dump_syms', | |
555 | '<(mac_breakpad_dir)/symupload', | |
556 | ], | |
557 | 'action': [ | |
558 | 'python', '../build_tools/build_breakpad.py', | |
559 | '--pbdir', '<(pbdir)', '--outdir', '<(mac_breakpad_dir)', | |
560 | ], | |
561 | }], | |
562 | 'direct_dependent_settings': { | |
563 | 'mac_framework_dirs': [ | |
564 | '<(mac_breakpad_dir)', | |
565 | ], | |
566 | }, | |
567 | }, | |
568 | { | |
537 | 569 | 'target_name': 'mac_util_main', |
538 | 570 | 'type': 'executable', |
539 | 571 | 'sources': [ |
30 | 30 | |
31 | 31 | #import "base/crash_report_handler.h" |
32 | 32 | |
33 | #import <Cocoa/Cocoa.h> | |
34 | #if defined(GOOGLE_JAPANESE_INPUT_BUILD) | |
35 | #import <GoogleBreakpad/GoogleBreakpad.h> | |
36 | #endif // GOOGLE_JAPANESE_INPUT_BUILD | |
33 | #import "base/const.h" | |
34 | ||
35 | #import <Breakpad/Breakpad.h> | |
36 | #import <CoreFoundation/CoreFoundation.h> | |
37 | 37 | |
38 | 38 | namespace mozc { |
39 | 39 | |
40 | #if defined(GOOGLE_JAPANESE_INPUT_BUILD) | |
41 | // The reference count for GoogleBreakpad | |
40 | // The reference count for Breakpad | |
42 | 41 | int g_reference_count = 0; |
43 | 42 | |
44 | GoogleBreakpadRef g_breakpad = nullptr; | |
45 | #endif // GOOGLE_JAPANESE_INPUT_BUILD | |
43 | BreakpadRef g_breakpad = nullptr; | |
46 | 44 | |
47 | 45 | bool CrashReportHandler::Initialize(bool check_address) { |
48 | #if defined(GOOGLE_JAPANESE_INPUT_BUILD) | |
49 | 46 | ++g_reference_count; |
50 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
51 | NSDictionary *plist = [[NSBundle mainBundle] infoDictionary]; | |
52 | if (g_reference_count == 1 && plist != nullptr && g_breakpad == nullptr) { | |
53 | g_breakpad = GoogleBreakpadCreate(plist); | |
54 | [pool release]; | |
55 | return true; | |
47 | @autoreleasepool { | |
48 | NSMutableDictionary *plist = | |
49 | [[[NSBundle mainBundle] infoDictionary] mutableCopy]; | |
50 | if (g_reference_count == 1 && plist != nullptr && g_breakpad == nullptr) { | |
51 | // Create a crash reports directory under tmpdir, and set it to the plist | |
52 | NSString *tmpDir = NSTemporaryDirectory(); | |
53 | // crashDir will be $TMPDIR/GoogleJapaneseInput/CrashReports | |
54 | NSString *crashDir = [NSString | |
55 | pathWithComponents:@[tmpDir, @kProductPrefix, @"CrashReports"]]; | |
56 | [[NSFileManager defaultManager] createDirectoryAtPath:crashDir | |
57 | withIntermediateDirectories:YES | |
58 | attributes:nil | |
59 | error:NULL]; | |
60 | [plist setValue:crashDir forKey:@BREAKPAD_DUMP_DIRECTORY]; | |
61 | g_breakpad = BreakpadCreate(plist); | |
62 | return true; | |
63 | } | |
56 | 64 | } |
57 | [pool release]; | |
58 | #endif // GOOGLE_JAPANESE_INPUT_BUILD | |
59 | 65 | return false; |
60 | 66 | } |
61 | 67 | |
62 | 68 | bool CrashReportHandler::Uninitialize() { |
63 | #if defined(GOOGLE_JAPANESE_INPUT_BUILD) | |
64 | 69 | --g_reference_count; |
65 | 70 | if (g_reference_count == 0 && g_breakpad != nullptr) { |
66 | GoogleBreakpadRelease(g_breakpad); | |
71 | BreakpadRelease(g_breakpad); | |
67 | 72 | g_breakpad = nullptr; |
68 | 73 | return true; |
69 | 74 | } |
70 | #endif // GOOGLE_JAPANESE_INPUT_BUILD | |
71 | 75 | return false; |
72 | 76 | } |
73 | 77 |
47 | 47 | # in Megabytes. |
48 | 48 | EXPECTED_MAXIMUM_SIZES = { |
49 | 49 | # Distribution package files: |
50 | 'GoogleJapaneseInput.dmg': 65, | |
50 | 'GoogleJapaneseInput.dmg': 70, | |
51 | 51 | 'GoogleJapaneseInput32.msi': 65, |
52 | 52 | 'GoogleJapaneseInput64.msi': 65, |
53 | 53 | } |
0 | # -*- coding: utf-8 -*- | |
1 | # Copyright 2010-2016, Google Inc. | |
2 | # All rights reserved. | |
3 | # | |
4 | # Redistribution and use in source and binary forms, with or without | |
5 | # modification, are permitted provided that the following conditions are | |
6 | # met: | |
7 | # | |
8 | # * Redistributions of source code must retain the above copyright | |
9 | # notice, this list of conditions and the following disclaimer. | |
10 | # * Redistributions in binary form must reproduce the above | |
11 | # copyright notice, this list of conditions and the following disclaimer | |
12 | # in the documentation and/or other materials provided with the | |
13 | # distribution. | |
14 | # * Neither the name of Google Inc. nor the names of its | |
15 | # contributors may be used to endorse or promote products derived from | |
16 | # this software without specific prior written permission. | |
17 | # | |
18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 | ||
30 | """Script building Breakpad for Mozc/Mac. | |
31 | ||
32 | ././tools/build_breakpad.py | |
33 | --pbdir ./third_party/breakpad --outdir /tmp/breakpad | |
34 | """ | |
35 | ||
36 | import optparse | |
37 | import os | |
38 | import subprocess | |
39 | import sys | |
40 | ||
41 | ||
42 | def ParseOption(): | |
43 | parser = optparse.OptionParser() | |
44 | parser.add_option('--pbdir', default='./third_party/breakpad') | |
45 | parser.add_option('--outdir', default='./out_mac/Release/Breakpad') | |
46 | ||
47 | (opts, _) = parser.parse_args() | |
48 | return opts | |
49 | ||
50 | ||
51 | def ProcessCall(command): | |
52 | try: | |
53 | subprocess.check_output(command) | |
54 | except subprocess.CalledProcessError as e: | |
55 | print e.output | |
56 | sys.exit(e.returncode) | |
57 | print 'Done: %s' % ' '.join(command) | |
58 | ||
59 | ||
60 | def Xcodebuild(projdir, target, arch, outdir): | |
61 | ProcessCall([ | |
62 | 'xcodebuild', '-project', projdir, '-configuration', 'Release', | |
63 | '-target', target, '-arch', arch, '-sdk', 'macosx10.9', | |
64 | 'GCC_VERSION=com.apple.compilers.llvm.clang.1_0', | |
65 | 'CONFIGURATION_BUILD_DIR=%s' % outdir, | |
66 | ]) | |
67 | ||
68 | ||
69 | def BuildBreakpad(outdir): | |
70 | projdir = os.path.join(outdir, 'src/client/mac/Breakpad.xcodeproj') | |
71 | Xcodebuild(projdir, 'Breakpad', 'i386', outdir) | |
72 | ||
73 | ||
74 | def BuildDumpSyms(outdir): | |
75 | projdir = os.path.join(outdir, 'src/tools/mac/dump_syms/dump_syms.xcodeproj') | |
76 | Xcodebuild(projdir, 'dump_syms', 'x86_64', outdir) | |
77 | ||
78 | ||
79 | def BuildSymupload(outdir): | |
80 | projdir = os.path.join(outdir, 'src/tools/mac/symupload/symupload.xcodeproj') | |
81 | # This build fails with Xcode8/i386. | |
82 | Xcodebuild(projdir, 'symupload', 'x86_64', outdir) | |
83 | ||
84 | ||
85 | def CreateOutDir(pbdir, outdir): | |
86 | workdir = os.path.join(outdir, 'src') | |
87 | if not os.path.isdir(workdir): | |
88 | os.makedirs(workdir) | |
89 | ProcessCall(['rsync', '-avH', os.path.join(pbdir, 'src/'), workdir]) | |
90 | ||
91 | ||
92 | def main(): | |
93 | opts = ParseOption() | |
94 | pbdir = os.path.abspath(opts.pbdir) | |
95 | outdir = os.path.abspath(opts.outdir) | |
96 | ||
97 | CreateOutDir(pbdir, outdir) | |
98 | BuildBreakpad(outdir) | |
99 | BuildDumpSyms(outdir) | |
100 | BuildSymupload(outdir) | |
101 | ||
102 | ||
103 | if __name__ == '__main__': | |
104 | main() |
112 | 112 | '@executable_path/../Frameworks/%s' % toollib_framework, |
113 | 113 | GetReferenceTo(toollib_framework)) |
114 | 114 | |
115 | # Change the reference to GoogleBreakpad from the target application | |
116 | breakpad_framework = GetFrameworkPath('GoogleBreakpad', 'A') | |
117 | InstallNameTool(target, | |
118 | '@executable_path/../Frameworks/%s' % breakpad_framework, | |
119 | GetReferenceTo(breakpad_framework)) | |
120 | ||
121 | 115 | |
122 | 116 | if __name__ == '__main__': |
123 | 117 | main() |
80 | 80 | |
81 | 81 | version = mozc_version.MozcVersion(options.version_file) |
82 | 82 | |
83 | # \xC2\xA9 is the copyright mark in UTF-8 | |
84 | copyright_message = '\xC2\xA9 %d Google Inc.' % _COPYRIGHT_YEAR | |
83 | copyright_message = (u'© %d Google Inc.' % _COPYRIGHT_YEAR).encode('utf-8') | |
85 | 84 | long_version = version.GetVersionString() |
86 | 85 | short_version = version.GetVersionInFormat('@MAJOR@.@MINOR@.@BUILD@') |
87 | domain_prefix = 'org.mozc' | |
88 | product_name = 'Mozc' | |
86 | ||
89 | 87 | if options.branding == 'GoogleJapaneseInput': |
90 | 88 | domain_prefix = 'com.google' |
91 | 89 | product_name = 'Google Japanese Input' |
90 | breakpad_product = 'Google_Japanese_IME_Mac' | |
91 | breakpad_url = 'https://clients2.google.com/cr/report' | |
92 | else: | |
93 | domain_prefix = 'org.mozc' | |
94 | product_name = 'Mozc' | |
95 | breakpad_product = 'Mozc' | |
96 | # Reports are generated under $TMPDIR, but not sent to a server. | |
97 | breakpad_url = 'file:///dev/null' | |
98 | ||
92 | 99 | variables = { |
93 | 100 | 'GOOGLE_VERSIONINFO_LONG': long_version, |
94 | 101 | 'GOOGLE_VERSIONINFO_SHORT': short_version, |
97 | 104 | '%s %s, %s' % (product_name, long_version, copyright_message), |
98 | 105 | 'BRANDING': options.branding, |
99 | 106 | 'DOMAIN_PREFIX': domain_prefix, |
100 | } | |
107 | 'BREAKPAD_PRODUCT': breakpad_product, | |
108 | 'BREAKPAD_URL': breakpad_url, | |
109 | } | |
101 | 110 | |
102 | 111 | open(options.output, 'w').write( |
103 | 112 | tweak_data.ReplaceVariables(open(options.input).read(), variables)) |
23 | 23 | <string>${GOOGLE_VERSIONINFO_LONG}</string> |
24 | 24 | <key>CFBundleShortVersionString</key> |
25 | 25 | <string>${GOOGLE_VERSIONINFO_SHORT}</string> |
26 | <key>CFBundleGetInfoString</key> | |
27 | <string>${GOOGLE_VERSIONINFO_FINDER}</string> | |
28 | <key>NSHumanReadableCopyright</key> | |
29 | <string>${GOOGLE_VERSIONINFO_ABOUT}</string> | |
30 | <key>CSResourcesFileMapped</key> | |
26 | <key>CFBundleGetInfoString</key> | |
27 | <string>${GOOGLE_VERSIONINFO_FINDER}</string> | |
28 | <key>NSHumanReadableCopyright</key> | |
29 | <string>${GOOGLE_VERSIONINFO_ABOUT}</string> | |
30 | <key>CSResourcesFileMapped</key> | |
31 | 31 | <true/> |
32 | 32 | <key>NSPrincipalClass</key> |
33 | 33 | <string>NSApplication</string> |
34 | 34 | <key>LSUIElement</key> |
35 | 35 | <string>1</string> |
36 | <key>GoogleBreakpadProduct</key> | |
37 | <string>Google_Japanese_IME_Mac</string> | |
38 | <key>GoogleBreakpadProductDisplay</key> | |
39 | <string>${PRODUCT_NAME}</string> | |
40 | <key>GoogleBreakpadVersion</key> | |
41 | <string>${GOOGLE_VERSIONINFO_LONG}</string> | |
42 | <key>GoogleBreakpadURL</key> | |
43 | <string>https://clients2.google.com/cr/report</string> | |
44 | <key>GoogleBreakpadReportInterval</key> | |
45 | <string>86400</string> | |
46 | <key>GoogleBreakpadSkipConfirm</key> | |
47 | <string>YES</string> | |
48 | <key>GoogleBreakpadSendAndExit</key> | |
49 | <string>YES</string> | |
36 | <key>BreakpadProduct</key> | |
37 | <string>${BREAKPAD_PRODUCT}</string> | |
38 | <key>BreakpadProductDisplay</key> | |
39 | <string>${PRODUCT_NAME}</string> | |
40 | <key>BreakpadVersion</key> | |
41 | <string>${GOOGLE_VERSIONINFO_LONG}</string> | |
42 | <key>BreakpadURL</key> | |
43 | <string>${BREAKPAD_URL}</string> | |
44 | <key>BreakpadReportInterval</key> | |
45 | <string>86400</string> | |
46 | <key>BreakpadSkipConfirm</key> | |
47 | <string>YES</string> | |
48 | <key>BreakpadSendAndExit</key> | |
49 | <string>YES</string> | |
50 | <key>BreakpadInProcess</key> | |
51 | <string>YES</string> | |
50 | 52 | </dict> |
51 | 53 | </plist> |
35 | 35 | <string>1</string> |
36 | 36 | <key>NSPrincipalClass</key> |
37 | 37 | <string>NSApplication</string> |
38 | <key>GoogleBreakpadProduct</key> | |
39 | <string>Google_Japanese_IME_Mac</string> | |
40 | <key>GoogleBreakpadProductDisplay</key> | |
38 | <key>BreakpadProduct</key> | |
39 | <string>${BREAKPAD_PRODUCT}</string> | |
40 | <key>BreakpadProductDisplay</key> | |
41 | 41 | <string>${PRODUCT_NAME}</string> |
42 | <key>GoogleBreakpadVersion</key> | |
42 | <key>BreakpadVersion</key> | |
43 | 43 | <string>${GOOGLE_VERSIONINFO_LONG}</string> |
44 | <key>GoogleBreakpadURL</key> | |
45 | <string>https://clients2.google.com/cr/report</string> | |
46 | <key>GoogleBreakpadReportInterval</key> | |
44 | <key>BreakpadURL</key> | |
45 | <string>${BREAKPAD_URL}</string> | |
46 | <key>BreakpadReportInterval</key> | |
47 | 47 | <string>86400</string> |
48 | <key>GoogleBreakpadSkipConfirm</key> | |
48 | <key>BreakpadSkipConfirm</key> | |
49 | 49 | <string>YES</string> |
50 | <key>GoogleBreakpadSendAndExit</key> | |
50 | <key>BreakpadSendAndExit</key> | |
51 | <string>YES</string> | |
52 | <key>BreakpadInProcess</key> | |
51 | 53 | <string>YES</string> |
52 | 54 | </dict> |
53 | 55 | </plist> |
23 | 23 | <string>${GOOGLE_VERSIONINFO_LONG}</string> |
24 | 24 | <key>CFBundleShortVersionString</key> |
25 | 25 | <string>${GOOGLE_VERSIONINFO_SHORT}</string> |
26 | <key>CFBundleGetInfoString</key> | |
27 | <string>${GOOGLE_VERSIONINFO_FINDER}</string> | |
28 | <key>NSHumanReadableCopyright</key> | |
29 | <string>${GOOGLE_VERSIONINFO_ABOUT}</string> | |
30 | <key>CSResourcesFileMapped</key> | |
26 | <key>CFBundleGetInfoString</key> | |
27 | <string>${GOOGLE_VERSIONINFO_FINDER}</string> | |
28 | <key>NSHumanReadableCopyright</key> | |
29 | <string>${GOOGLE_VERSIONINFO_ABOUT}</string> | |
30 | <key>CSResourcesFileMapped</key> | |
31 | 31 | <true/> |
32 | 32 | <key>NSPrincipalClass</key> |
33 | 33 | <string>NSApplication</string> |
34 | <key>GoogleBreakpadProduct</key> | |
35 | <string>Google_Japanese_IME_Mac</string> | |
36 | <key>GoogleBreakpadProductDisplay</key> | |
37 | <string>${PRODUCT_NAME}</string> | |
38 | <key>GoogleBreakpadVersion</key> | |
39 | <string>${GOOGLE_VERSIONINFO_LONG}</string> | |
40 | <key>GoogleBreakpadURL</key> | |
41 | <string>https://clients2.google.com/cr/report</string> | |
42 | <key>GoogleBreakpadReportInterval</key> | |
43 | <string>86400</string> | |
44 | <key>GoogleBreakpadSkipConfirm</key> | |
45 | <string>YES</string> | |
46 | <key>GoogleBreakpadSendAndExit</key> | |
47 | <string>YES</string> | |
34 | <key>BreakpadProduct</key> | |
35 | <string>${BREAKPAD_PRODUCT}</string> | |
36 | <key>BreakpadProductDisplay</key> | |
37 | <string>${PRODUCT_NAME}</string> | |
38 | <key>BreakpadVersion</key> | |
39 | <string>${GOOGLE_VERSIONINFO_LONG}</string> | |
40 | <key>BreakpadURL</key> | |
41 | <string>${BREAKPAD_URL}</string> | |
42 | <key>BreakpadReportInterval</key> | |
43 | <string>86400</string> | |
44 | <key>BreakpadSkipConfirm</key> | |
45 | <string>YES</string> | |
46 | <key>BreakpadSendAndExit</key> | |
47 | <string>YES</string> | |
48 | <key>BreakpadInProcess</key> | |
49 | <string>YES</string> | |
48 | 50 | </dict> |
49 | 51 | </plist> |
29 | 29 | |
30 | 30 | MAJOR=2 |
31 | 31 | MINOR=19 |
32 | BUILD=2643 | |
32 | BUILD=2644 | |
33 | 33 | REVISION=102 |
34 | 34 | # This version represents the version of Mozc IME engine (converter, predictor, |
35 | 35 | # etc.). This version info is included both in the Mozc server and in the Mozc |
1013 | 1013 | 'INSTALL_PATH': '@executable_path/../Frameworks', |
1014 | 1014 | 'INFOPLIST_FILE': '<(gen_out_dir)/mozc_tool_lib_info', |
1015 | 1015 | }, |
1016 | 'dependencies+': [ | |
1016 | 'dependencies': [ | |
1017 | 1017 | 'gen_mozc_tool_lib_info_plist', |
1018 | 1018 | 'prelauncher_lib', |
1019 | ], | |
1019 | '../base/base.gyp:breakpad', | |
1020 | ], | |
1021 | 'link_settings': { | |
1022 | 'libraries': [ | |
1023 | '<(mac_breakpad_framework)', | |
1024 | ], | |
1025 | }, | |
1020 | 1026 | 'conditions': [ |
1021 | ['branding=="GoogleJapaneseInput"', { | |
1022 | 'link_settings': { | |
1023 | 'libraries': [ | |
1024 | '<(mac_breakpad_framework)', | |
1025 | ], | |
1026 | }, | |
1027 | }], | |
1028 | 1027 | ['use_qt=="YES"', { |
1029 | 1028 | 'postbuilds': [ |
1030 | 1029 | { |
381 | 381 | ['LDPLUSPLUS', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'], |
382 | 382 | ], |
383 | 383 | 'conditions': [ |
384 | ['branding=="GoogleJapaneseInput"', { | |
385 | 'mac_framework_dirs': [ | |
386 | '<(mac_breakpad_dir)', | |
387 | ], | |
388 | }], | |
389 | 384 | ['target_platform=="Mac"', { |
390 | 385 | 'xcode_settings': { |
391 | 386 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
49 | 49 | |
50 | 50 | 'mozc_data_dir': '<(SHARED_INTERMEDIATE_DIR)/', |
51 | 51 | |
52 | # For some reasons, mac_breakpad_dir cannot be inside of 'conditions', | |
53 | # otherwise it errors. | |
54 | # TODO(komatsu): Move them to the 'conditions' block. | |
55 | # | |
56 | # Assign dummy value to avoid errors of GYP. | |
57 | # TODO: Update this. | |
58 | 'mac_breakpad_dir': 'dummy_mac_breakpad_dir', | |
59 | 'mac_breakpad_framework': '<(mac_breakpad_dir)/GoogleBreakpad.framework', | |
52 | # Ninja requires <(abs_depth) instead of <(DEPTH). | |
53 | 'mac_breakpad_dir': '<(PRODUCT_DIR)/Breakpad', | |
54 | # This points to the same dir with mac_breakpad_dir, but this should use | |
55 | # '${BUILT_PRODUCTS_DIR}' instead of '<(PRODUCT_DIR)'. | |
56 | # See post_build_mac.gypi | |
57 | 'mac_breakpad_tools_dir': '${BUILT_PRODUCTS_DIR}/Breakpad', | |
58 | 'mac_breakpad_framework': '<(mac_breakpad_dir)/Breakpad.framework', | |
60 | 59 | |
61 | 60 | 'conditions': [ |
62 | 61 | ['target_platform=="Windows"', { |
33 | 33 | # gui/gui.gyp). |
34 | 34 | 'copying_frameworks%': [], |
35 | 35 | }, |
36 | 'conditions': [ | |
37 | ['branding=="GoogleJapaneseInput"', { | |
38 | 'link_settings': { | |
39 | 'libraries': [ | |
40 | '<(mac_breakpad_framework)', | |
41 | ], | |
42 | }, | |
43 | 'copies': [ | |
44 | { | |
45 | 'files': [ | |
46 | '<(mac_breakpad_framework)', | |
47 | '<@(copying_frameworks)', | |
48 | ], | |
49 | 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks', | |
50 | }, | |
36 | 'link_settings': { | |
37 | 'libraries': [ | |
38 | '<(mac_breakpad_framework)', | |
39 | ], | |
40 | }, | |
41 | 'dependencies': ['../base/base.gyp:breakpad'], | |
42 | 'copies': [ | |
43 | { | |
44 | 'files': [ | |
45 | '<(mac_breakpad_framework)', | |
46 | '<@(copying_frameworks)', | |
51 | 47 | ], |
52 | 'postbuilds': [ | |
53 | { | |
54 | 'postbuild_name': 'dump symbols', | |
55 | 'action': [ | |
56 | 'python', '../build_tools/redirect.py', | |
57 | '${BUILT_PRODUCTS_DIR}/<(product_name)_i386.breakpad', | |
58 | '<(mac_breakpad_dir)/dump_syms', | |
59 | '-a', 'i386', | |
60 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', | |
61 | ], | |
62 | }, | |
63 | { | |
64 | 'postbuild_name': 'strip binary', | |
65 | 'action': [ | |
66 | '/usr/bin/strip', | |
67 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)' | |
68 | ], | |
69 | }, | |
48 | 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks', | |
49 | }, | |
50 | ], | |
51 | 'postbuilds': [ | |
52 | { | |
53 | 'postbuild_name': 'dump symbols', | |
54 | 'action': [ | |
55 | 'python', '../build_tools/redirect.py', | |
56 | '${BUILT_PRODUCTS_DIR}/<(product_name)_i386.breakpad', | |
57 | '<(mac_breakpad_tools_dir)/dump_syms', | |
58 | '-a', 'i386', | |
59 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', | |
70 | 60 | ], |
71 | }, { # branding != GoogleJapaneseInput | |
72 | 'copies': [ | |
73 | { | |
74 | 'files': [ | |
75 | '<@(copying_frameworks)', | |
76 | ], | |
77 | 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks', | |
78 | }, | |
61 | }, | |
62 | { | |
63 | 'postbuild_name': 'strip binary', | |
64 | 'action': [ | |
65 | '/usr/bin/strip', | |
66 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)' | |
79 | 67 | ], |
80 | 'postbuilds': [ | |
81 | { | |
82 | 'postbuild_name': 'strip binary', | |
83 | 'action': [ | |
84 | '/usr/bin/strip', | |
85 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)' | |
86 | ], | |
87 | }, | |
88 | ], | |
89 | }], | |
68 | }, | |
90 | 69 | ], |
91 | 70 | } |
207 | 207 | </array> |
208 | 208 | <key>tsInputMethodIconFileKey</key> |
209 | 209 | <string>product_icon.icns</string> |
210 | <key>GoogleBreakpadProduct</key> | |
211 | <string>Google_Japanese_IME_Mac</string> | |
212 | <key>GoogleBreakpadProductDisplay</key> | |
210 | <key>BreakpadProduct</key> | |
211 | <string>${BREAKPAD_PRODUCT}</string> | |
212 | <key>BreakpadProductDisplay</key> | |
213 | 213 | <string>${PRODUCT_NAME}</string> |
214 | <key>GoogleBreakpadVersion</key> | |
214 | <key>BreakpadVersion</key> | |
215 | 215 | <string>${GOOGLE_VERSIONINFO_LONG}</string> |
216 | <key>GoogleBreakpadURL</key> | |
217 | <string>https://clients2.google.com/cr/report</string> | |
218 | <key>GoogleBreakpadReportInterval</key> | |
216 | <key>BreakpadURL</key> | |
217 | <string>${BREAKPAD_URL}</string> | |
218 | <key>BreakpadReportInterval</key> | |
219 | 219 | <string>86400</string> |
220 | <key>GoogleBreakpadSkipConfirm</key> | |
220 | <key>BreakpadSkipConfirm</key> | |
221 | 221 | <string>YES</string> |
222 | <key>GoogleBreakpadSendAndExit</key> | |
222 | <key>BreakpadSendAndExit</key> | |
223 | <string>YES</string> | |
224 | <key>BreakpadInProcess</key> | |
223 | 225 | <string>YES</string> |
224 | 226 | </dict> |
225 | 227 | </plist> |
33 | 33 | <string>NSApplication</string> |
34 | 34 | <key>LSUIElement</key> |
35 | 35 | <string>1</string> |
36 | <key>GoogleBreakpadProduct</key> | |
37 | <string>Google_Japanese_IME_Mac</string> | |
38 | <key>GoogleBreakpadProductDisplay</key> | |
36 | <key>BreakpadProduct</key> | |
37 | <string>${BREAKPAD_PRODUCT}</string> | |
38 | <key>BreakpadProductDisplay</key> | |
39 | 39 | <string>${PRODUCT_NAME}</string> |
40 | <key>GoogleBreakpadVersion</key> | |
40 | <key>BreakpadVersion</key> | |
41 | 41 | <string>${GOOGLE_VERSIONINFO_LONG}</string> |
42 | <key>GoogleBreakpadURL</key> | |
43 | <string>https://clients2.google.com/cr/report</string> | |
44 | <key>GoogleBreakpadReportInterval</key> | |
42 | <key>BreakpadURL</key> | |
43 | <string>${BREAKPAD_URL}</string> | |
44 | <key>BreakpadReportInterval</key> | |
45 | 45 | <string>86400</string> |
46 | <key>GoogleBreakpadSkipConfirm</key> | |
46 | <key>BreakpadSkipConfirm</key> | |
47 | 47 | <string>YES</string> |
48 | <key>GoogleBreakpadSendAndExit</key> | |
48 | <key>BreakpadSendAndExit</key> | |
49 | <string>YES</string> | |
50 | <key>BreakpadInProcess</key> | |
49 | 51 | <string>YES</string> |
50 | 52 | <key>NSHighResolutionCapable</key> |
51 | 53 | <true/> |