Update action workflow to windows
This commit is contained in:
parent
ebe189da7b
commit
a8c1d73ea0
|
@ -12,12 +12,21 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
runs-on: ubuntu-latest
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# targetplatform: [x86, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Lint
|
|
||||||
run: cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::expect_used
|
- name: Set up MinGW
|
||||||
|
uses: egor-tensin/setup-mingw@v2
|
||||||
|
with:
|
||||||
|
platform: x64
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::expect_used
|
||||||
|
|
|
@ -4,6 +4,10 @@ version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
[package.metadata.winres]
|
||||||
|
OriginalFilename = "sharextended.exe"
|
||||||
|
LegalCopyright = "Copyright © 2022"
|
||||||
|
|
||||||
[target.'cfg(windows)'.build-dependencies]
|
[target.'cfg(windows)'.build-dependencies]
|
||||||
winres = "0.1"
|
winres = "0.1"
|
||||||
|
|
||||||
|
|
9
build.rs
9
build.rs
|
@ -1,7 +1,10 @@
|
||||||
|
use winres;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if cfg!(target_os = "windows") {
|
if cfg!(target_os = "windows") {
|
||||||
let mut res = winres::WindowsResource::new();
|
winres::WindowsResource::new()
|
||||||
res.set_icon("test.ico");
|
.set_icon("test.ico")
|
||||||
res.compile().unwrap();
|
.compile()
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue