Skip to content

Commit

Permalink
Improve target version reliability (#2412)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Mar 31, 2023
1 parent ec95c1e commit 4069441
Show file tree
Hide file tree
Showing 457 changed files with 34,682 additions and 34,690 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lib.yml
Expand Up @@ -70,7 +70,7 @@ jobs:
foreach($Test in $Tests) {
$Target = $Test.Item1
$Magic = $Test.Item2
$Output = [string](& $DumpbinPath /headers crates/targets/$Target/lib/windows.lib)
$Output = [string](& $DumpbinPath /headers crates/targets/$Target/lib/windows.0.48.0.lib)
if($Output -match "Machine\s*: $Magic" -ne $True) {
Write-Error "Import lib check failed for $Target ($Magic)."
Exit 1
Expand Down
6 changes: 3 additions & 3 deletions crates/libs/bindgen/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "windows-bindgen"
version = "0.47.0"
version = "0.48.0"
authors = ["Microsoft"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -13,5 +13,5 @@ default-target = "x86_64-pc-windows-msvc"
targets = []

[dependencies]
tokens = { package = "windows-tokens", path = "../tokens", version = "0.47.0" }
metadata = { package = "windows-metadata", path = "../metadata", version = "0.47.0" }
tokens = { package = "windows-tokens", path = "../tokens", version = "0.48.0" }
metadata = { package = "windows-metadata", path = "../metadata", version = "0.48.0" }
Expand Up @@ -11,7 +11,7 @@ impl Matrix3x2 {
pub x: f32,
pub y: f32,
}
::windows::imp::link!("d2d1.dll" "system" fn D2D1MakeRotateMatrix(angle: f32, center: D2D_POINT_2F, matrix: *mut Matrix3x2) -> ());
::windows_targets::link!("d2d1.dll" "system" fn D2D1MakeRotateMatrix(angle: f32, center: D2D_POINT_2F, matrix: *mut Matrix3x2) -> ());
let mut matrix = Self::default();
unsafe {
D2D1MakeRotateMatrix(angle, D2D_POINT_2F { x, y }, &mut matrix);
Expand Down
Expand Up @@ -20,7 +20,7 @@ impl Matrix4x4 {
}
}
pub fn rotation_y(degree: f32) -> Self {
::windows::imp::link!("d2d1.dll" "system" fn D2D1SinCos(angle: f32, sin: *mut f32, cos: *mut f32) -> ());
::windows_targets::link!("d2d1.dll" "system" fn D2D1SinCos(angle: f32, sin: *mut f32, cos: *mut f32) -> ());
let angle = degree * (3.141592654 / 180.0);
let mut sin = 0.0;
let mut cos = 0.0;
Expand Down
9 changes: 3 additions & 6 deletions crates/libs/bindgen/src/functions.rs
Expand Up @@ -36,15 +36,12 @@ fn gen_sys_function(gen: &Gen, def: MethodDef) -> TokenStream {

if gen.standalone {
quote! {
#[link(name = "windows")]
extern #abi {
pub fn #name(#(#params),*) #return_type;
}
::windows_targets::link!(#link #abi fn #name(#(#params),*) #return_type);
}
} else {
quote! {
#features
::windows_sys::core::link!(#link #abi #doc fn #name(#(#params),*) #return_type);
::windows_targets::link!(#link #abi #doc fn #name(#(#params),*) #return_type);
}
}
}
Expand Down Expand Up @@ -94,7 +91,7 @@ fn gen_win_function(gen: &Gen, def: MethodDef) -> TokenStream {

if gen.namespace.starts_with("Windows.") {
quote! {
::windows::imp::link!(#link #extern_abi fn #name(#(#abi_params),*) #abi_return_type);
::windows_targets::link!(#link #extern_abi fn #name(#(#abi_params),*) #abi_return_type);
}
} else {
let link = link.trim_end_matches(".dll");
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/implement/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "windows-implement"
version = "0.47.0"
version = "0.48.0"
authors = ["Microsoft"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/interface/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "windows-interface"
version = "0.47.0"
version = "0.48.0"
edition = "2018"
authors = ["Microsoft"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/metadata/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "windows-metadata"
version = "0.47.0"
version = "0.48.0"
authors = ["Microsoft"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
7 changes: 4 additions & 3 deletions crates/libs/sys/Cargo.toml
@@ -1,7 +1,7 @@

[package]
name = "windows-sys"
version = "0.45.0"
version = "0.48.0"
authors = ["Microsoft"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -16,8 +16,9 @@ default-target = "x86_64-pc-windows-msvc"
targets = []
all-features = true

[target.'cfg(not(windows_raw_dylib))'.dependencies]
windows-targets = { path = "../targets", version = "0.47.0" }
[dependencies.windows-targets]
version = "0.48.0"
path = "../targets"

[features]
default = []
Expand Down
48 changes: 24 additions & 24 deletions crates/libs/sys/src/Windows/Wdk/System/OfflineRegistry/mod.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/libs/sys/src/Windows/Win32/Data/HtmlHelp/mod.rs
@@ -1,7 +1,7 @@
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "htmlhelp.dll""system" #[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`, `\"Win32_Foundation\"`*"] fn HtmlHelpA ( hwndcaller : super::super::Foundation:: HWND , pszfile : ::windows_sys::core::PCSTR , ucommand : HTML_HELP_COMMAND , dwdata : usize ) -> super::super::Foundation:: HWND );
::windows_targets::link ! ( "htmlhelp.dll""system" #[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`, `\"Win32_Foundation\"`*"] fn HtmlHelpA ( hwndcaller : super::super::Foundation:: HWND , pszfile : ::windows_sys::core::PCSTR , ucommand : HTML_HELP_COMMAND , dwdata : usize ) -> super::super::Foundation:: HWND );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "htmlhelp.dll""system" #[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`, `\"Win32_Foundation\"`*"] fn HtmlHelpW ( hwndcaller : super::super::Foundation:: HWND , pszfile : ::windows_sys::core::PCWSTR , ucommand : HTML_HELP_COMMAND , dwdata : usize ) -> super::super::Foundation:: HWND );
::windows_targets::link ! ( "htmlhelp.dll""system" #[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`, `\"Win32_Foundation\"`*"] fn HtmlHelpW ( hwndcaller : super::super::Foundation:: HWND , pszfile : ::windows_sys::core::PCWSTR , ucommand : HTML_HELP_COMMAND , dwdata : usize ) -> super::super::Foundation:: HWND );
pub type IITDatabase = *mut ::core::ffi::c_void;
pub type IITPropList = *mut ::core::ffi::c_void;
pub type IITResultSet = *mut ::core::ffi::c_void;
Expand Down

0 comments on commit 4069441

Please sign in to comment.