Skip to content

Improve target version reliability #2412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/lib.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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" }
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Loading