chore: add WindowsResource

This commit is contained in:
b1n
2024-06-26 02:31:44 +08:00
parent b7a4bda3cc
commit 2b3017cab3
6 changed files with 69 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
name: build-release name: build-release
on: on:
workflow_dispatch:
push: push:
tags: tags:
- "v[0-9]+.[0-9]+.[0-9]+" - "v[0-9]+.[0-9]+.[0-9]+"

50
Cargo.lock generated
View File

@@ -2219,7 +2219,7 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
dependencies = [ dependencies = [
"toml_edit", "toml_edit 0.21.1",
] ]
[[package]] [[package]]
@@ -2252,6 +2252,7 @@ dependencies = [
"rand", "rand",
"rfd", "rfd",
"tokio", "tokio",
"winresource",
] ]
[[package]] [[package]]
@@ -2574,6 +2575,15 @@ dependencies = [
"syn 2.0.66", "syn 2.0.66",
] ]
[[package]]
name = "serde_spanned"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "simd-adler32" name = "simd-adler32"
version = "0.3.7" version = "0.3.7"
@@ -2879,11 +2889,39 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "toml"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.19.15",
]
[[package]] [[package]]
name = "toml_datetime" name = "toml_datetime"
version = "0.6.6" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
]
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
@@ -3774,6 +3812,16 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "winresource"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77e2aaaf8cfa92078c0c0375423d631f82f2f57979c2884fdd5f604a11e45329"
dependencies = [
"toml",
"version_check",
]
[[package]] [[package]]
name = "x11-dl" name = "x11-dl"
version = "2.21.0" version = "2.21.0"

View File

@@ -1,12 +1,16 @@
[package] [package]
name = "pumpbin" name = "pumpbin"
version = "0.1.0" version = "0.1.0"
edition = "2021"
default-run = "pumpbin"
authors = ["b1n <b1n@b1n.io>"] authors = ["b1n <b1n@b1n.io>"]
license = "MIT" edition = "2021"
description = "PumpBin is an Implant Generation Platform."
documentation = "https://pumpbin.b1n.io"
readme = "README.md"
homepage = "https://b1n.io" homepage = "https://b1n.io"
repository = "https://github.com/pumpbin/pumpbin" repository = "https://github.com/pumpbin/pumpbin"
license = "MIT"
build = "build.rs"
default-run = "pumpbin"
[[bin]] [[bin]]
name = "maker" name = "maker"
@@ -24,6 +28,9 @@ memchr = "2.7.4"
aes-gcm = "0.10.3" aes-gcm = "0.10.3"
tokio = { version = "1.38.0", default-features = false , features = ["time"]} tokio = { version = "1.38.0", default-features = false , features = ["time"]}
[package.metadata.winresource]
LegalCopyright = "Copyright (c) 2024 b1n <b1n@b1n.io>"
[dependencies.iced] [dependencies.iced]
version = "0.13.0-dev" version = "0.13.0-dev"
git = "https://github.com/iced-rs/iced" git = "https://github.com/iced-rs/iced"
@@ -31,8 +38,10 @@ rev = "6c1027af8d54ad21e282337b53097eb196d62c00"
default-features = false default-features = false
features = ["advanced", "svg", "tokio", "wgpu"] features = ["advanced", "svg", "tokio", "wgpu"]
[target."cfg(windows)".build-dependencies]
winresource = "0.1.17"
[profile.release] [profile.release]
strip = true strip = true
opt-level = 3 opt-level = 3
lto = true lto = true
codegen-units = 1

7
build.rs Normal file
View File

@@ -0,0 +1,7 @@
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" {
let mut res = winresource::WindowsResource::new();
res.set_icon("logo/icon.ico");
res.compile().unwrap();
}
}

BIN
logo/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
logo/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB