Auto merge of #20316 - UK992:win32-icon, r=jdm

Windows: Add icon to servo.exe

Based on https://github.com/servo/servo/pull/11969

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20316)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-18 14:31:35 -04:00 committed by GitHub
commit 840c44e2a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 9 deletions

View file

@ -13,6 +13,15 @@ path = "main.rs"
test = false
bench = false
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[package.metadata.winres]
FileDescription = "Servo"
LegalCopyright = "© The Servo Project Developers"
OriginalFilename = "servo.exe"
ProductName = "Servo"
[features]
default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"]

View file

@ -2,6 +2,9 @@
* 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/. */
#[cfg(windows)]
extern crate winres;
use std::env;
use std::path::Path;
use std::process;
@ -13,6 +16,14 @@ fn main() {
if target.contains("android") {
android_main()
}
#[cfg(windows)]
{
let mut res = winres::WindowsResource::new();
res.set_icon("../../resources/Servo.ico");
res.set_manifest_file("platform/windows/servo.exe.manifest");
res.compile().unwrap();
}
}
fn android_main() {

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity type="win32"
name="servo.Servo"
version="0.1.0.0"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 7 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!-- Windows 8 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows 8.1 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 10 -->
</application>
</compatibility>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>