desktop: Fix windows cross compilation of assets
This commit is contained in:
parent
64983cde22
commit
5d887861da
|
@ -29,7 +29,7 @@ tinyfiledialogs = {git ="https://github.com/jdm/tinyfiledialogs-rs", rev="1a235d
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = "0.3.9"
|
winapi = "0.3.9"
|
||||||
|
|
||||||
[target.'cfg(windows)'.build-dependencies]
|
[build-dependencies]
|
||||||
embed-resource = "1"
|
embed-resource = "1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -14,12 +14,10 @@ fn main() {
|
||||||
println!("cargo:rerun-if-changed=.git/HEAD");
|
println!("cargo:rerun-if-changed=.git/HEAD");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
// Embed resource file w/ icon on windows
|
||||||
{
|
// To allow for cross-compilation, this must not be behind cfg(windows)!
|
||||||
// Embed resource file w/ icon.
|
|
||||||
println!("cargo:rerun-if-changed=assets/ruffle_desktop.rc");
|
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");
|
println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL");
|
||||||
if option_env!("CFG_RELEASE_CHANNEL").map_or(true, |c| c == "nightly" || c == "dev") {
|
if option_env!("CFG_RELEASE_CHANNEL").map_or(true, |c| c == "nightly" || c == "dev") {
|
||||||
|
|
Loading…
Reference in New Issue