diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-08 15:33:38 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-08 15:33:38 -0500 |
commit | e51ce5d1bac31afdadc9a4c86175fac00677b31a (patch) | |
tree | 8c905d76ac93de51c5284881da06d58aa55e523c /python | |
parent | 3804ca1ad7edce934065e697289bdbda06277085 (diff) | |
parent | 8d5ff5cae765ff9f7711c564685ebb15a52ee96f (diff) | |
download | servo-e51ce5d1bac31afdadc9a4c86175fac00677b31a.tar.gz servo-e51ce5d1bac31afdadc9a4c86175fac00677b31a.zip |
Auto merge of #11646 - pcwalton:real-info-plist, r=metajack
servo: Add an `Info.plist` on the Mac and opt into integrated graphics.
Discrete GPUs cause power use problems and tend to perform badly
with WebRender.
See:
* https://developer.apple.com/library/mac/qa/qa1734/_index.html
* https://reverse.put.as/2013/05/28/gimmedebugah-how-to-embedded-a-info-plist-into-arbitrary-binaries/
r? @metajack
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11646)
<!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/build_commands.py | 18 | ||||
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 7e2845b598f..1d4931dc78c 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -186,6 +186,10 @@ class MachCommands(CommandBase): if release: opts += ["--release"] + servo_path = release_path + else: + servo_path = dev_path + if jobs is not None: opts += ["-j", jobs] if verbose: @@ -241,6 +245,20 @@ class MachCommands(CommandBase): shutil.copy(path.join(self.get_top_dir(), "components", "servo", "servo.exe.manifest"), path.join(base_path, "debug" if dev else "release")) + # On the Mac, set a lovely icon. This makes it easier to pick out the Servo binary in tools + # like Instruments.app. + if sys.platform == "darwin": + try: + import Cocoa + icon_path = path.join(self.get_top_dir(), "resources", "servo.png") + icon = Cocoa.NSImage.alloc().initWithContentsOfFile_(icon_path) + if icon is not None: + Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(icon, + servo_path, + 0) + except ImportError: + pass + # Generate Desktop Notification if elapsed-time > some threshold value notify_build_done(elapsed) diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index fcf51dbf3cb..5bc64956a15 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -41,6 +41,9 @@ ignored_files = [ os.path.join(".", "tests", "wpt", "metadata", "MANIFEST.json"), os.path.join(".", "tests", "wpt", "metadata-css", "MANIFEST.json"), os.path.join(".", "components", "script", "dom", "webidls", "ForceTouchEvent.webidl"), + # FIXME(pcwalton, #11679): This is a workaround for a tidy error on the quoted string + # `"__TEXT,_info_plist"` inside an attribute. + os.path.join(".", "components", "servo", "platform", "macos", "mod.rs"), # Hidden files os.path.join(".", "."), ] |