From c6bd9befaba72472051b832b335afd8b29a3083b Mon Sep 17 00:00:00 2001 From: progre Date: Sat, 11 May 2024 11:48:37 +0900 Subject: [PATCH] chore(lib): update windows crate --- Cargo.lock | 109 ++++++++++++++++++++--------- Cargo.toml | 19 +++++ archives/th19padlight/Cargo.toml | 2 +- junowen-lib/Cargo.toml | 17 +---- junowen-lib/src/find_process_id.rs | 5 +- junowen/Cargo.toml | 19 +---- th19loader/Cargo.toml | 15 +--- 7 files changed, 101 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 84254b8..bef5a73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1631,7 +1631,7 @@ dependencies = [ "tracing-subscriber", "urlencoding", "webrtc", - "windows 0.52.0", + "windows 0.56.0", ] [[package]] @@ -1662,7 +1662,7 @@ dependencies = [ "tracing", "uuid", "webrtc", - "windows 0.52.0", + "windows 0.56.0", ] [[package]] @@ -3028,7 +3028,7 @@ dependencies = [ "anyhow", "junowen-lib", "static_vcruntime", - "windows 0.52.0", + "windows 0.56.0", "winres", ] @@ -3058,7 +3058,7 @@ version = "1.0.0" dependencies = [ "anyhow", "junowen-lib", - "windows 0.52.0", + "windows 0.56.0", ] [[package]] @@ -3909,12 +3909,12 @@ dependencies = [ [[package]] name = "windows" -version = "0.52.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ - "windows-core 0.52.0", - "windows-targets 0.52.0", + "windows-core 0.56.0", + "windows-targets 0.52.5", ] [[package]] @@ -3928,11 +3928,45 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.52.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" dependencies = [ - "windows-targets 0.52.0", + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.5", ] [[package]] @@ -3961,17 +3995,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3982,9 +4017,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3994,9 +4029,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -4006,9 +4041,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -4018,9 +4059,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -4030,9 +4071,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -4042,9 +4083,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -4054,9 +4095,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" diff --git a/Cargo.toml b/Cargo.toml index 23ae17a..cb71e62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,3 +30,22 @@ tracing-subscriber = { version = "0.3.17", features = [ "env-filter", "local-time" ] } +windows = { version = "0.56.0", features = [ + "Win32_Foundation", + "Win32_Graphics_Direct3D9", + "Win32_Graphics_Gdi", + "Win32_Security", + "Win32_Storage_FileSystem", + "Win32_System_Console", + "Win32_System_Diagnostics_Debug", + "Win32_System_Diagnostics_ToolHelp", + "Win32_System_LibraryLoader", + "Win32_System_Memory", + "Win32_System_ProcessStatus", + "Win32_System_SystemInformation", + "Win32_System_SystemServices", + "Win32_System_Threading", + "Win32_UI_Input_KeyboardAndMouse", + "Win32_UI_Shell", + "Win32_UI_WindowsAndMessaging", +] } diff --git a/archives/th19padlight/Cargo.toml b/archives/th19padlight/Cargo.toml index 7176e8e..f0f18b6 100644 --- a/archives/th19padlight/Cargo.toml +++ b/archives/th19padlight/Cargo.toml @@ -12,7 +12,7 @@ crate-type = ['cdylib'] [dependencies] anyhow.workspace = true junowen-lib.workspace = true -windows = { version = "0.52.0", features = [ +windows = { workspace = true, features = [ "Win32_Foundation", "Win32_Graphics_Direct3D9", "Win32_Graphics_Gdi", diff --git a/junowen-lib/Cargo.toml b/junowen-lib/Cargo.toml index e314aef..8ccb22f 100644 --- a/junowen-lib/Cargo.toml +++ b/junowen-lib/Cargo.toml @@ -30,19 +30,4 @@ toml = "0.8.0" tracing.workspace = true uuid = "1.5.0" webrtc = "0.9.0" -windows = { version = "0.52.0", features = [ - "Win32_Foundation", - "Win32_Graphics_Direct3D9", - "Win32_Graphics_Gdi", - "Win32_Security", - "Win32_Storage_FileSystem", - "Win32_System_Console", - "Win32_System_Diagnostics_Debug", - "Win32_System_Diagnostics_ToolHelp", - "Win32_System_LibraryLoader", - "Win32_System_Memory", - "Win32_System_ProcessStatus", - "Win32_System_SystemInformation", - "Win32_System_SystemServices", - "Win32_System_Threading", -] } +windows.workspace = true diff --git a/junowen-lib/src/find_process_id.rs b/junowen-lib/src/find_process_id.rs index f061c0b..5307ef4 100644 --- a/junowen-lib/src/find_process_id.rs +++ b/junowen-lib/src/find_process_id.rs @@ -1,4 +1,4 @@ -use std::mem::size_of; +use std::mem::{size_of, transmute}; use anyhow::{anyhow, Result}; use windows::Win32::System::Diagnostics::ToolHelp::{ @@ -24,7 +24,8 @@ fn find_process_id_in_snapshot(snapshot: SafeHandle, exe_file: &str) -> Option(&pe.szExeFile[..]) }); if current.contains(exe_file) { return Some(pe.th32ProcessID); } diff --git a/junowen/Cargo.toml b/junowen/Cargo.toml index 367c861..a7f5f9c 100644 --- a/junowen/Cargo.toml +++ b/junowen/Cargo.toml @@ -39,21 +39,4 @@ tracing-appender = "0.2.2" tracing-subscriber.workspace = true urlencoding = "2.1.3" webrtc = "0.9.0" -windows = { version = "0.52.0", features = [ - "Win32_Foundation", - "Win32_Graphics_Direct3D9", - "Win32_Graphics_Gdi", - "Win32_Security", - "Win32_Storage_FileSystem", - "Win32_System_Console", - "Win32_System_Diagnostics_Debug", - "Win32_System_Diagnostics_ToolHelp", - "Win32_System_LibraryLoader", - "Win32_System_Memory", - "Win32_System_ProcessStatus", - "Win32_System_SystemInformation", - "Win32_System_SystemServices", - "Win32_System_Threading", - "Win32_UI_Input_KeyboardAndMouse", - "Win32_UI_Shell", -] } +windows.workspace = true diff --git a/th19loader/Cargo.toml b/th19loader/Cargo.toml index cbda4bd..1f7763e 100644 --- a/th19loader/Cargo.toml +++ b/th19loader/Cargo.toml @@ -16,20 +16,7 @@ winres = "0.1" [dependencies] anyhow.workspace = true junowen-lib = { path = "../junowen-lib" } -windows = { version = "0.52.0", features = [ - "Win32_Foundation", - "Win32_Graphics_Direct3D9", - "Win32_System_Console", - "Win32_System_Diagnostics_Debug", - "Win32_System_Diagnostics_ToolHelp", - "Win32_System_LibraryLoader", - "Win32_System_Memory", - "Win32_System_ProcessStatus", - "Win32_System_SystemInformation", - "Win32_System_SystemServices", - "Win32_System_Threading", - "Win32_UI_WindowsAndMessaging", -] } +windows.workspace = true [package.metadata.winres] LegalCopyright = "© Progre"