From ce0f9c71f02d62664a0ba9c5328ffcf622867d77 Mon Sep 17 00:00:00 2001
From: wiiznokes <78230769+wiiznokes@users.noreply.github.com>
Date: Thu, 20 Jun 2024 00:44:02 +0200
Subject: [PATCH] Fix windows compile + some version fix  (#137)

* Update Cargo.lock

* update lhm, some windows fixes

* fix windows build path

* change version

* Update Cargo.toml
---
 .gitignore                                    |  1 +
 CHANGELOG.md                                  |  3 +-
 Cargo.lock                                    | 48 +++++++++----------
 Cargo.toml                                    |  5 +-
 DEV.md                                        |  2 +-
 VERSION                                       |  2 +-
 .../LibreHardwareMonitorWrapper.csproj        |  4 +-
 hardware/src/windows.rs                       |  1 -
 res/linux/metainfo.xml                        |  4 +-
 9 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0f6370b5..06a22c80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ obj/
 /app/
 net7.0/
 LibreHardwareMonitorWrapper.sln.DotSettings.user
+/res/lhmbuild
 
 # Lmsensors
 build/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00ef1cf9..95e30003 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,13 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
 ## [Unreleased]
 
-## [24.06] - 2024-06-19
+## [2024.6] - 2024-06-20
 
 ### Added
 
 - german translation
 - italian translation
 - new versioning
+- update lhm
 
 ### Fixed
 
diff --git a/Cargo.lock b/Cargo.lock
index 046ae824..32c1f8b7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -750,9 +750,9 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
 
 [[package]]
 name = "bytemuck"
-version = "1.16.0"
+version = "1.16.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5"
+checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e"
 dependencies = [
  "bytemuck_derive",
 ]
@@ -1007,7 +1007,7 @@ dependencies = [
 [[package]]
 name = "clipboard_macos"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "objc",
  "objc-foundation",
@@ -1017,7 +1017,7 @@ dependencies = [
 [[package]]
 name = "clipboard_wayland"
 version = "0.2.2"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "dnd",
  "mime",
@@ -1027,7 +1027,7 @@ dependencies = [
 [[package]]
 name = "clipboard_x11"
 version = "0.4.2"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "thiserror",
  "x11rb",
@@ -1227,7 +1227,7 @@ dependencies = [
 [[package]]
 name = "cosmic-config"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "atomicwrites",
  "cosmic-config-derive",
@@ -1246,7 +1246,7 @@ dependencies = [
 [[package]]
 name = "cosmic-config-derive"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "quote",
  "syn 1.0.109",
@@ -1277,7 +1277,7 @@ dependencies = [
 [[package]]
 name = "cosmic-theme"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "almost",
  "cosmic-config",
@@ -1633,7 +1633,7 @@ dependencies = [
 [[package]]
 name = "dnd"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "bitflags 2.5.0",
  "mime",
@@ -2587,7 +2587,7 @@ dependencies = [
 [[package]]
 name = "iced"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "dnd",
  "iced_accessibility",
@@ -2605,7 +2605,7 @@ dependencies = [
 [[package]]
 name = "iced_accessibility"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "accesskit",
  "accesskit_winit",
@@ -2614,7 +2614,7 @@ dependencies = [
 [[package]]
 name = "iced_core"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "bitflags 2.5.0",
  "dnd",
@@ -2634,7 +2634,7 @@ dependencies = [
 [[package]]
 name = "iced_futures"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "futures",
  "iced_core",
@@ -2647,7 +2647,7 @@ dependencies = [
 [[package]]
 name = "iced_graphics"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "bitflags 2.5.0",
  "bytemuck",
@@ -2671,7 +2671,7 @@ dependencies = [
 [[package]]
 name = "iced_renderer"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "iced_graphics",
  "iced_tiny_skia",
@@ -2683,7 +2683,7 @@ dependencies = [
 [[package]]
 name = "iced_runtime"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "dnd",
  "iced_core",
@@ -2695,7 +2695,7 @@ dependencies = [
 [[package]]
 name = "iced_style"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "iced_core",
  "once_cell",
@@ -2705,7 +2705,7 @@ dependencies = [
 [[package]]
 name = "iced_tiny_skia"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "bytemuck",
  "cosmic-text",
@@ -2722,7 +2722,7 @@ dependencies = [
 [[package]]
 name = "iced_wgpu"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "bitflags 2.5.0",
  "bytemuck",
@@ -2748,7 +2748,7 @@ dependencies = [
 [[package]]
 name = "iced_widget"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "dnd",
  "iced_renderer",
@@ -2764,7 +2764,7 @@ dependencies = [
 [[package]]
 name = "iced_winit"
 version = "0.12.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "dnd",
  "iced_graphics",
@@ -3079,7 +3079,7 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
 [[package]]
 name = "libcosmic"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic?branch=master#8d735575cd14cd5340797306e1e06c927c01159a"
+source = "git+https://github.com/pop-os/libcosmic?branch=master#f9af93c0f1f007e86c038af3c3ea95585a3b379a"
 dependencies = [
  "apply",
  "ashpd",
@@ -3361,7 +3361,7 @@ dependencies = [
 [[package]]
 name = "mime"
 version = "0.1.0"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "smithay-clipboard",
 ]
@@ -5907,7 +5907,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
 [[package]]
 name = "window_clipboard"
 version = "0.4.1"
-source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
+source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
 dependencies = [
  "clipboard-win",
  "clipboard_macos",
diff --git a/Cargo.toml b/Cargo.toml
index fa0606bc..68cf0bec 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,11 +24,12 @@ repository.workspace = true
 keywords.workspace = true
 
 [package.metadata.packager]
-version = "24.06"
+# workarround for making cargo packager happy
+version = "2024.6.0"
 before-each-package-command = "cargo build --release"
 identifier = "io.github.wiiznokes.fan-control"
 icons = ["res/windows/app_icon.ico"]
-resources = ["res/icons", "res/windows/lhmbuild"]
+resources = ["res/icons", "res/lhmbuild"]
 category = "Utility"
 
 [package.metadata.packager.windows]
diff --git a/DEV.md b/DEV.md
index d40a8363..73614aab 100644
--- a/DEV.md
+++ b/DEV.md
@@ -1,6 +1,6 @@
 ## Making a new release
 
-- get the version: `date +"%y.%m"`
+- get the version: `date +"%Y.%m"`
 - new release in the [CHANGELOG](./CHANGELOG.md)
 - update release section of [metadata file](./res/linux/metainfo.xml)
 - change the version in [VERSION](./VERSION)
diff --git a/VERSION b/VERSION
index 435fd0ca..54b2c565 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-24.06
\ No newline at end of file
+2024.6
\ No newline at end of file
diff --git a/hardware/LibreHardwareMonitorWrapper/LibreHardwareMonitorWrapper.csproj b/hardware/LibreHardwareMonitorWrapper/LibreHardwareMonitorWrapper.csproj
index 6383e530..b81c5bb6 100644
--- a/hardware/LibreHardwareMonitorWrapper/LibreHardwareMonitorWrapper.csproj
+++ b/hardware/LibreHardwareMonitorWrapper/LibreHardwareMonitorWrapper.csproj
@@ -11,11 +11,11 @@
         <RuntimeIdentifier>win-x64</RuntimeIdentifier>
         <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
         <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
-        <OutputPath>.\..\..\res\windows\lhmbuild</OutputPath>
+        <OutputPath>.\..\..\res\lhmbuild</OutputPath>
     </PropertyGroup>
 
     <ItemGroup>
-        <PackageReference Include="LibreHardwareMonitorLib" Version="0.9.3"/>
+        <PackageReference Include="LibreHardwareMonitorLib" Version="0.9.4-pre295" />
         <PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
     </ItemGroup>
 
diff --git a/hardware/src/windows.rs b/hardware/src/windows.rs
index 6b624460..621a5592 100644
--- a/hardware/src/windows.rs
+++ b/hardware/src/windows.rs
@@ -402,7 +402,6 @@ mod test {
         info!("");
 
         bridge.update().unwrap();
-        std::thread::sleep(WindowsBridge::TIME_TO_UPDATE);
 
         for h in &bridge.hardware().controls.clone() {
             bench(
diff --git a/res/linux/metainfo.xml b/res/linux/metainfo.xml
index 9be76fae..c0aa429d 100644
--- a/res/linux/metainfo.xml
+++ b/res/linux/metainfo.xml
@@ -61,9 +61,9 @@
   </screenshots>
 
   <releases>
-    <release version="24.06" date="2024-06-19">
+    <release version="2024.6" date="2024-06-20">
       <url type="details">
-        https://github.com/wiiznokes/fan-control/blob/master/CHANGELOG.md#2406---2024-06-19</url>
+        https://github.com/wiiznokes/fan-control/blob/master/CHANGELOG.md#202406---2024-06-20</url>
     </release>
   </releases>