mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-20 09:11:55 +03:00
refactor(tauri-utils)!: remove windows_version
and is_windows_7
(#8271)
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
parent
46451aee13
commit
3b91e236c6
@ -2,4 +2,4 @@
|
|||||||
'tauri-utils': 'minor:breaking'
|
'tauri-utils': 'minor:breaking'
|
||||||
---
|
---
|
||||||
|
|
||||||
Changed `platform::windows_version` to return a `(u32, u32, u32)` instead of `Option<(u32, u32, u32)>`
|
Removed `platform::windows_version` and `platform::is_windows_7`, use `windows-version` crate instead.
|
||||||
|
@ -43,9 +43,6 @@ log = "0.4.20"
|
|||||||
[target."cfg(target_os = \"linux\")".dependencies]
|
[target."cfg(target_os = \"linux\")".dependencies]
|
||||||
heck = "0.4"
|
heck = "0.4"
|
||||||
|
|
||||||
[target."cfg(windows)".dependencies]
|
|
||||||
windows-version = "0.1"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
build = [ "proc-macro2", "quote" ]
|
build = [ "proc-macro2", "quote" ]
|
||||||
compression = [ "brotli" ]
|
compression = [ "brotli" ]
|
||||||
|
@ -255,21 +255,3 @@ pub fn resource_dir(package_info: &PackageInfo, env: &Env) -> crate::Result<Path
|
|||||||
|
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
pub use windows_platform::{is_windows_7, windows_version};
|
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
mod windows_platform {
|
|
||||||
/// Checks if we're running on Windows 7.
|
|
||||||
pub fn is_windows_7() -> bool {
|
|
||||||
let v = windows_version();
|
|
||||||
v.0 == 6 && v.1 == 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a tuple of (major, minor, buildnumber) for the Windows version.
|
|
||||||
pub fn windows_version() -> (u32, u32, u32) {
|
|
||||||
let v = windows_version::OsVersion::current();
|
|
||||||
(v.major, v.minor, v.build)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -12,7 +12,6 @@ use std::ffi::c_void;
|
|||||||
use crate::utils::config::WindowEffectsConfig;
|
use crate::utils::config::WindowEffectsConfig;
|
||||||
use crate::window::{Color, Effect};
|
use crate::window::{Color, Effect};
|
||||||
use raw_window_handle::HasRawWindowHandle;
|
use raw_window_handle::HasRawWindowHandle;
|
||||||
use tauri_utils::platform::{is_windows_7, windows_version};
|
|
||||||
use windows::Win32::Foundation::HWND;
|
use windows::Win32::Foundation::HWND;
|
||||||
|
|
||||||
pub fn apply_effects(window: impl HasRawWindowHandle, effects: WindowEffectsConfig) {
|
pub fn apply_effects(window: impl HasRawWindowHandle, effects: WindowEffectsConfig) {
|
||||||
|
586
tooling/cli/Cargo.lock
generated
586
tooling/cli/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user