Skip to content

Commit

Permalink
Update Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Veha0001 committed Jan 6, 2025
1 parent 877fddc commit 3ba208e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: CI

on: push
on: [ push , pull_request ]

permissions:
contents: write

jobs:
build:
windows-build:
runs-on: windows-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -34,15 +35,16 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: BinaryPatch
path: target/release/patcher.exe
path: target/release/Patcher.exe
if-no-files-found: error

- name: Release
if: ${{ github.event_name == "push" }}
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Binary Patch
make_latest: true
tag_name: latest
files: target/release/patcher.exe
files: target/release/Patcher.exe
21 changes: 14 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
[package]
name = "patcher"
name = "Patcher"
version = "0.1.0"
edition = "2021"

[package.metadata.bundle]
name = "patcher"
identifier = "Veha0001.patch_rs"
name = "Patcher"
identifier = ""
version = "0.101.0"
copyright = "Copyright (c) 2024 Veha Veha"
copyright = "Copyright (c) 2025 Veha Veha"
category = "Program"
osx_minimum_system_version = "10.12"

[package.metadata.winres]
OriginalFilename = "Patcher.exe"
LegalCopyright = "Copyright © 2025"
ProductName = "Binary Patcher"
FileDescription = "A Rust application for patching binaries using config.json"


[profile.release]
lto = "off"
panic = "abort"
codegen-units = 256
incremental = true
split-debuginfo = "packed"
codegen-units = 1
incremental = false
opt-level = 3

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand Down
4 changes: 1 addition & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ fn main() {
if target.contains("windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("res/tsh.ico");
res.set("ProductName", "Binary Patcher");
res.set("ProductVersion", env!("CARGO_PKG_VERSION"));
res.set("FileVersion", env!("CARGO_PKG_VERSION"));
res.set("FileDescription", "A Rust application for patching binaries");
res.compile().unwrap();

if target.contains("i686") {
println!("cargo:rustc-link-arg=/FORCE:MULTIPLE");
println!("cargo:rustc-link-lib=shlwapi");
}
}
}
}

0 comments on commit 3ba208e

Please sign in to comment.