Update action workflow to windows

This commit is contained in:
IndyV 2022-11-04 11:09:03 +01:00
parent ebe189da7b
commit a8c1d73ea0
3 changed files with 23 additions and 7 deletions

View File

@ -12,12 +12,21 @@ env:
jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest
# strategy:
# matrix:
# targetplatform: [x86, x64]
steps:
- 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
run: cargo build --verbose
- name: Lint
run: cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::expect_used

View File

@ -4,6 +4,10 @@ version = "0.2.0"
edition = "2021"
build = "build.rs"
[package.metadata.winres]
OriginalFilename = "sharextended.exe"
LegalCopyright = "Copyright © 2022"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

View File

@ -1,7 +1,10 @@
use winres;
fn main() {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("test.ico");
res.compile().unwrap();
winres::WindowsResource::new()
.set_icon("test.ico")
.compile()
.unwrap();
}
}