This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add icon and manifest to launcher exe at build time
- Loading branch information
1 parent
79b6882
commit 94b0f47
Showing
4 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
[package] | ||
name = "bgarmor" | ||
version = "0.1.0" | ||
version = "0.0.6" | ||
edition = "2018" | ||
build = "build.rs" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
winres = "0.1.12" | ||
clap = "2.33.3" | ||
subprocess = "0.2.8" | ||
subprocess = "0.2.8" | ||
|
||
[build-dependencies] | ||
winres = "0.1.12" | ||
|
||
[package.metadata.winres] | ||
FileDescription = "BGArmor: BGE and UPBGE game packer and launcher." | ||
ProductName = "BGArmor" | ||
OriginalFilename = "BGArmor.exe" | ||
LegalCopyright = "MIT" | ||
CompanyName = "BGEmpire" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?> | ||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<security> | ||
<requestedPrivileges> | ||
<requestedExecutionLevel level='asInvoker' uiAccess='false' /> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
use std::io; | ||
#[cfg(windows)] | ||
use winres::WindowsResource; | ||
extern crate winres; | ||
|
||
fn main() -> io::Result<()> { | ||
#[cfg(windows)] | ||
{ | ||
WindowsResource::new() | ||
.set_icon("../icons/icon-launcher.ico") | ||
.compile() | ||
.expect("X Could not set icon"); | ||
} | ||
Ok(()) | ||
fn main() { | ||
if cfg!(target_os = "windows") { | ||
let mut res = winres::WindowsResource::new(); | ||
res.set_icon("../icons/icon-launcher.ico"); | ||
res.set_manifest_file("./bgarmor.manifest.xml"); | ||
res.compile().unwrap(); | ||
} | ||
} |