desktop: Fix windows cross compilation of assets

This commit is contained in:
Mads Marquart 2021-01-24 23:48:47 +01:00 committed by Mike Welsh
parent 64983cde22
commit 5d887861da
2 changed files with 5 additions and 7 deletions

View File

@ -29,7 +29,7 @@ tinyfiledialogs = {git ="https://github.com/jdm/tinyfiledialogs-rs", rev="1a235d
[target.'cfg(windows)'.dependencies]
winapi = "0.3.9"
[target.'cfg(windows)'.build-dependencies]
[build-dependencies]
embed-resource = "1"
[features]

View File

@ -14,12 +14,10 @@ fn main() {
println!("cargo:rerun-if-changed=.git/HEAD");
}
#[cfg(windows)]
{
// Embed resource file w/ icon.
// Embed resource file w/ icon on windows
// To allow for cross-compilation, this must not be behind cfg(windows)!
println!("cargo:rerun-if-changed=assets/ruffle_desktop.rc");
embed_resource::compile("assets/ruffle_desktop.rc")
}
embed_resource::compile("assets/ruffle_desktop.rc");
println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL");
if option_env!("CFG_RELEASE_CHANNEL").map_or(true, |c| c == "nightly" || c == "dev") {