diff options
Diffstat (limited to 'components/servo/platform/macos')
-rw-r--r-- | components/servo/platform/macos/Info.plist | 21 | ||||
-rw-r--r-- | components/servo/platform/macos/mod.rs | 19 |
2 files changed, 40 insertions, 0 deletions
diff --git a/components/servo/platform/macos/Info.plist b/components/servo/platform/macos/Info.plist new file mode 100644 index 00000000000..c2855eb82b4 --- /dev/null +++ b/components/servo/platform/macos/Info.plist @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> + <key>CFBundleDisplayName</key> + <string>Servo</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleName</key> + <string>Servo</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright © 2016 The Servo Authors</string> + <key>CFBundleVersion</key> + <string>0.0.1</string> + <key>CFBundleIdentifier</key> + <string>org.servo.servo</string> +</dict> +</plist> + diff --git a/components/servo/platform/macos/mod.rs b/components/servo/platform/macos/mod.rs new file mode 100644 index 00000000000..b980b83f5fb --- /dev/null +++ b/components/servo/platform/macos/mod.rs @@ -0,0 +1,19 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use std::ptr; + +pub fn deinit() { + // An unfortunate hack to make sure the linker's dead code stripping doesn't strip our + // `Info.plist`. + unsafe { + ptr::read_volatile(&INFO_PLIST[0]); + } +} + +#[cfg(target_os = "macos")] +#[link_section = "__TEXT,__info_plist"] +#[no_mangle] +pub static INFO_PLIST: [u8; 619] = *include_bytes!("Info.plist"); + |