Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[target.thumbv7em-none-eabihf]
runner = 'npx --yes -- nwlink@0.0.15 install-nwa'
runner = 'npm exec --yes -- nwlink@0.0.15 install-nwa'
rustflags = ["-C", "link-arg=--relocatable", "-C", "link-arg=-no-gc-sections"]

[build]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build
on: [pull_request, push]
on: [pull_request, push, workflow_dispatch]

jobs:
build:
Expand Down
21 changes: 17 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@ use std::process::Command;
fn main() {
// Turn icon.png into icon.nwi
println!("cargo:rerun-if-changed=src/icon.png");
let output = Command::new("nwlink")
.args(&["png-nwi", "src/icon.png", "target/icon.nwi"])
.output().expect("Failure to launch process");
assert!(output.status.success(), "{}", String::from_utf8_lossy(&output.stderr));
let output = Command::new("npm")
.args(&[
"exec",
"--yes",
"--",
"nwlink",
"png-nwi",
"src/icon.png",
"target/icon.nwi",
])
.output()
.expect("Failure to launch process");
assert!(
output.status.success(),
"{}",
String::from_utf8_lossy(&output.stderr)
);
}