Scenario / background:
I have a basic Gitlab CI/CD pipeline setup for automatically building a tool I wrote.
When compiling on windows I can add an icon to the executable trivially with using winres, however I can't seem to find a way to add an icon to the exe from the linux runner.
I can easily add a icon to a windows x64 executable while compiling on windows. However I can't seem to find a way to do it when compiling for windows on linux.
Does anyone have any suggestions?
On windows its as easy as:
use std::io;
#[cfg(windows)]
use winres::WindowsResource;
fn main() -> io::Result<()> {
static_vcruntime::metabuild();
#[cfg(windows)] {
WindowsResource::new()
.set_icon("resources/up.ico")
.compile()?;
}
Ok(())
}```