move gnu warning to build script
This commit is contained in:
1 parent
a4600294c5
commit
7d2bbda53d
2 files changed
+9
-11
No files matched your search
@@ -0,0 +1,9 @@
|
|||||||
|
fn main() {
|
||||||
|
// WARN about wry support on windows gnu targets. GNU windows targets don't work well in wry currently
|
||||||
|
if std::env::var("CARGO_CFG_WINDOWS").is_ok()
|
||||||
|
&& std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "gnu"
|
||||||
|
&& !cfg!(feature = "gnu")
|
||||||
|
{
|
||||||
|
println!("cargo:warning=GNU windows targets have some limitations within Wry. Using the MSVC windows toolchain is recommended. If you would like to use continue using GNU, you can read https://github.com/wravery/webview2-rs#cross-compilation and disable this warning by adding the gnu feature to dioxus-desktop in your Cargo.toml")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,17 +19,6 @@ mod webview;
|
|||||||
#[cfg(any(target_os = "ios", target_os = "android"))]
|
#[cfg(any(target_os = "ios", target_os = "android"))]
|
||||||
mod mobile_shortcut;
|
mod mobile_shortcut;
|
||||||
|
|
||||||
// WARN about wry support on windows gnu targets. GNU windows targets don't work well in wry currently
|
|
||||||
#[cfg(all(windows, target_env = "gnu", not(feature = "gnu")))]
|
|
||||||
mod wry_gnu_warning {
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[must_use = "GNU windows targets have some limitations within Wry. Using the MSVC windows toolchain is recommended. If you would like to use continue using GNU, you can read https://github.com/wravery/webview2-rs#cross-compilation and disable this warning by adding the gnu feature to dioxus-desktop in your Cargo.toml"]
|
|
||||||
struct WryGnuWarning;
|
|
||||||
const _: () = {
|
|
||||||
let dont_use_gnu = WryGnuWarning;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
use crate::query::QueryResult;
|
use crate::query::QueryResult;
|
||||||
pub use cfg::{Config, WindowCloseBehaviour};
|
pub use cfg::{Config, WindowCloseBehaviour};
|
||||||
pub use desktop_context::DesktopContext;
|
pub use desktop_context::DesktopContext;
|
||||||
|
|||||||
Reference in new issue
Block a user