Skip to content

Commit

Permalink
Merge pull request #104 from Cysharp/feature/SetDllVersionInfo
Browse files Browse the repository at this point in the history
Set the version information resource to .dll
  • Loading branch information
mayuki authored Dec 10, 2024
2 parents 27deebe + 9f6d2bf commit 4f6f93f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
39 changes: 39 additions & 0 deletions native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions native/yaha_native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ edition = "2021"
license = "MIT"
publish = false

[package.metadata.winres]
ProductName = "YetAnotherHttpHandler"
FileDescription = "Native implementation for YetAnotherHttpHandler"
OriginalFilename = "Cysharp.Net.Http.YetAnotherHttpHandler.Native.dll"
LegalCopyright = "Copyright © Cysharp, Inc."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["staticlib", "cdylib"]

[build-dependencies]
csbindgen = "1.9.1"
winres = "0.1.12"

[dependencies]
h2 = { version = "0.4.5" }
Expand All @@ -35,6 +42,7 @@ tokio-stream = "0.1.15"
futures-channel = "0.3.30"
futures-util = "0.3.30"


[features]
default = [ "rustls" ]
rustls = [ "hyper-rustls", "dep:rustls", "rustls-pemfile" ]
Expand All @@ -45,3 +53,4 @@ strip = true

[profile.release]
strip = true

5 changes: 5 additions & 0 deletions native/yaha_native/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@ fn main() -> Result<(), Box<dyn Error>> {
.generate_csharp_file("../../src/YetAnotherHttpHandler/NativeMethods.Uwp.g.cs")
.unwrap();

if cfg!(target_os = "windows") {
let res = winres::WindowsResource::new();
res.compile().unwrap();
}

Ok(())
}

0 comments on commit 4f6f93f

Please sign in to comment.