From 9d407e87850eb826d0ced9fddcc32b0ee0ee8c56 Mon Sep 17 00:00:00 2001 From: hacknus Date: Thu, 9 Jan 2025 00:17:52 +0100 Subject: [PATCH 1/7] license fix for cargo-wix --- Cargo.toml | 3 +-- README.md | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 80fd381..eda4966 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,5 +45,4 @@ dbg-name = false name = "Serial Monitor" no-build = false output = "target/wix/SerialMonitorInstaller.msi" -version = "0.3.3" -license = "GPL-3.0" \ No newline at end of file +version = "0.3.3" \ No newline at end of file diff --git a/README.md b/README.md index e321292..edbf87f 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev lib ``` After downloading -```cargo install cargo-bundle``` or ```cargo install cargo-wix``` +```cargo install cargo-bundle``` on linux and macOS or ```cargo install cargo-wix``` on windows run -```cargo bundle``` or ```cargo wix``` to create platform-executable bundles. +```cargo bundle``` on linux and macOS or ```cargo wix``` on windows to create platform-executable bundles. It can be compiled and run on all platforms. From 3e6a2b59fb63822d248d382b86b51a2520d62284 Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 17 Jan 2025 08:46:44 +0100 Subject: [PATCH 2/7] add self-update option and settings window --- CHANGELOG.md | 2 +- Cargo.lock | 1127 ++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 5 + src/gui.rs | 76 ++- src/main.rs | 2 + src/settings_window.rs | 65 +++ src/update.rs | 173 ++++++ 7 files changed, 1386 insertions(+), 64 deletions(-) create mode 100644 src/settings_window.rs create mode 100644 src/update.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index ebd6ee2..8d88dd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to the `Serial Monitor` crate will be documented in this fil # Unreleased 0.3.x -* ... +* implement option to update the application ## 0.3.3 diff --git a/Cargo.lock b/Cargo.lock index 949ba9f..99bb276 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ "accesskit_consumer", "atspi-common", "serde", - "thiserror", + "thiserror 1.0.69", "zvariant 4.2.0", ] @@ -114,12 +114,32 @@ dependencies = [ "winit", ] +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + [[package]] name = "adler2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "ahash" version = "0.8.11" @@ -167,7 +187,7 @@ dependencies = [ "ndk-context", "ndk-sys 0.6.0+11769913", "num_enum", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -214,7 +234,7 @@ dependencies = [ "derive_more", "regex", "serde", - "thiserror", + "thiserror 1.0.69", "toml", ] @@ -240,6 +260,15 @@ dependencies = [ "objc", ] +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arboard" version = "3.4.1" @@ -368,7 +397,7 @@ dependencies = [ "polling 2.8.0", "rustix 0.37.27", "slab", - "socket2", + "socket2 0.4.10", "waker-fn", ] @@ -556,6 +585,21 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + [[package]] name = "base64" version = "0.21.7" @@ -568,6 +612,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bindgen" version = "0.63.0" @@ -584,7 +634,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 1.0.109", "which", @@ -707,6 +757,27 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "calloop" version = "0.13.0" @@ -718,7 +789,7 @@ dependencies = [ "polling 3.7.4", "rustix 0.38.42", "slab", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -831,6 +902,16 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -858,7 +939,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -886,6 +967,31 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + [[package]] name = "convert_case" version = "0.4.0" @@ -927,7 +1033,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -951,6 +1057,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.2" @@ -1003,6 +1124,33 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "darling" version = "0.14.4" @@ -1044,6 +1192,22 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" +[[package]] +name = "deflate64" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "deranged" version = "0.3.11" @@ -1064,6 +1228,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "derive_builder" version = "0.13.1" @@ -1116,6 +1291,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", + "subtle", ] [[package]] @@ -1203,6 +1379,31 @@ dependencies = [ "serde", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "signature", + "subtle", + "zeroize", +] + [[package]] name = "eframe" version = "0.30.0" @@ -1306,7 +1507,7 @@ dependencies = [ "epaint", "log", "profiling", - "thiserror", + "thiserror 1.0.69", "type-map", "web-time", "wgpu", @@ -1422,6 +1623,12 @@ dependencies = [ "serde", ] +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "endi" version = "1.1.0" @@ -1599,6 +1806,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "flate2" version = "1.0.35" @@ -1627,6 +1840,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -1634,7 +1856,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -1648,6 +1870,12 @@ dependencies = [ "syn 2.0.91", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -1663,6 +1891,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + [[package]] name = "futures-core" version = "0.3.31" @@ -1770,8 +2008,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1784,6 +2024,12 @@ dependencies = [ "weezl", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + [[package]] name = "gl_generator" version = "0.14.0" @@ -1930,6 +2176,25 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.7.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1977,6 +2242,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + [[package]] name = "home" version = "0.5.11" @@ -1986,6 +2260,119 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2 0.5.8", + "tokio", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -2177,7 +2564,7 @@ dependencies = [ "byteorder", "skeptic", "strum", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2217,22 +2604,44 @@ dependencies = [ ] [[package]] -name = "instant" -version = "0.1.13" +name = "indicatif" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ - "cfg-if", + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.0", + "web-time", ] [[package]] -name = "io-kit-sys" -version = "0.4.1" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "core-foundation-sys", - "mach2", + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-kit-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" +dependencies = [ + "core-foundation-sys", + "mach2", ] [[package]] @@ -2246,6 +2655,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + [[package]] name = "itoa" version = "1.0.14" @@ -2263,7 +2678,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -2303,7 +2718,7 @@ dependencies = [ "cfg-if", "core-foundation 0.9.4", "derive_builder", - "thiserror", + "thiserror 1.0.69", "windows 0.52.0", "zbus 3.15.2", ] @@ -2427,12 +2842,28 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + [[package]] name = "mach2" version = "0.4.2" @@ -2493,7 +2924,7 @@ dependencies = [ "bitflags 2.6.0", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "log", "objc", "paste", @@ -2531,6 +2962,17 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + [[package]] name = "naga" version = "23.1.0" @@ -2545,13 +2987,30 @@ dependencies = [ "hexf-parse", "indexmap 2.7.0", "log", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", - "thiserror", + "thiserror 1.0.69", "unicode-xid", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.9.0" @@ -2564,7 +3023,7 @@ dependencies = [ "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2677,6 +3136,12 @@ dependencies = [ "syn 2.0.91", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "objc" version = "0.2.7" @@ -2889,12 +3354,65 @@ dependencies = [ "objc2-foundation", ] +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -2964,6 +3482,16 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -3025,6 +3553,16 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.31" @@ -3088,6 +3626,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "portable-atomic" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" + [[package]] name = "powerfmt" version = "0.2.0" @@ -3187,6 +3731,67 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.0", + "rustls", + "socket2 0.5.8", + "thiserror 2.0.11", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom", + "rand", + "ring", + "rustc-hash 2.1.0", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.11", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases 0.2.1", + "libc", + "once_cell", + "socket2 0.5.8", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -3264,7 +3869,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3302,6 +3907,54 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" +[[package]] +name = "reqwest" +version = "0.12.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "windows-registry", +] + [[package]] name = "resvg" version = "0.37.0" @@ -3358,12 +4011,24 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3415,11 +4080,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -3453,6 +4130,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -3478,6 +4164,61 @@ dependencies = [ "tiny-skia", ] +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "self-replace" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7" +dependencies = [ + "fastrand 2.3.0", + "tempfile", + "windows-sys 0.52.0", +] + +[[package]] +name = "self_update" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d832c086ece0dacc29fb2947bb4219b8f6e12fe9e40b7108f9e57c4224e47b5c" +dependencies = [ + "hyper", + "indicatif", + "log", + "quick-xml 0.37.2", + "regex", + "reqwest", + "self-replace", + "semver", + "serde_json", + "tempfile", + "urlencoding", + "zip", + "zipsign-api", +] + [[package]] name = "semver" version = "1.0.24" @@ -3539,6 +4280,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serial-monitor-rust" version = "0.3.3" @@ -3556,8 +4309,13 @@ dependencies = [ "log", "preferences", "regex", + "reqwest", + "self_update", + "semver", "serde", "serialport", + "tempfile", + "zip", ] [[package]] @@ -3591,6 +4349,17 @@ dependencies = [ "digest", ] +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shlex" version = "1.3.0" @@ -3606,6 +4375,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3680,7 +4459,7 @@ dependencies = [ "log", "memmap2", "rustix 0.38.42", - "thiserror", + "thiserror 1.0.69", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -3721,6 +4500,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -3736,6 +4525,16 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3823,6 +4622,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.13.1" @@ -3873,7 +4681,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -3887,6 +4704,17 @@ dependencies = [ "syn 2.0.91", ] +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "time" version = "0.3.37" @@ -3954,6 +4782,69 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2 0.5.8", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.6.0" @@ -4016,6 +4907,33 @@ dependencies = [ "winnow 0.6.20", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + [[package]] name = "tracing" version = "0.1.41" @@ -4047,6 +4965,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "ttf-parser" version = "0.25.1" @@ -4059,7 +4983,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] @@ -4085,7 +5009,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4112,6 +5036,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -4151,6 +5081,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "usvg" version = "0.37.0" @@ -4207,6 +5143,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" @@ -4229,6 +5171,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4506,9 +5457,9 @@ dependencies = [ "parking_lot", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 1.0.69", "wgpu-hal", "wgpu-types", ] @@ -4544,9 +5495,9 @@ dependencies = [ "profiling", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", "web-sys", "wgpu-types", @@ -4715,6 +5666,17 @@ dependencies = [ "syn 2.0.91", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.1.2" @@ -5360,6 +6322,20 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] [[package]] name = "zerovec" @@ -5383,6 +6359,87 @@ dependencies = [ "syn 2.0.91", ] +[[package]] +name = "zip" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap 2.7.0", + "lzma-rs", + "memchr", + "pbkdf2", + "rand", + "sha1", + "thiserror 2.0.11", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zipsign-api" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413a546ada9dbcd0b9a3e0b0880581279e35047bce9797e523b3408e1df607c" +dependencies = [ + "ed25519-dalek", + "thiserror 1.0.69", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zvariant" version = "3.15.2" diff --git a/Cargo.toml b/Cargo.toml index eda4966..faed43f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,11 @@ regex = "1" serde = { version = "1.0", features = ["derive"] } serialport = { version = "4.6.1", features = ["serde"] } log = "0.4.22" +self_update = { version = "0.42.0", features = ["archive-zip"] } +tempfile = "3.14.0" +reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls", "http2"] } +zip = "2.2.2" +semver = "1.0.24" [build-dependencies] regex = "1.11" diff --git a/src/gui.rs b/src/gui.rs index 1640808..5425b5b 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -6,29 +6,28 @@ use std::sync::mpsc::{Receiver, Sender}; use std::sync::{Arc, RwLock}; use std::time::Duration; +use crate::color_picker::{color_picker_widget, color_picker_window, COLORS}; +use crate::custom_highlighter::highlight_impl; +use crate::data::{DataContainer, SerialDirection}; +use crate::serial::{clear_serial_settings, save_serial_settings, Device, SerialDevices}; +use crate::settings_window::settings_window; +use crate::toggle::toggle; +use crate::FileOptions; +use crate::{APP_INFO, PREFS_KEY}; use eframe::egui::panel::Side; use eframe::egui::{ Align2, CollapsingHeader, Color32, FontFamily, FontId, KeyboardShortcut, Pos2, Sense, Ui, Vec2, - Visuals, }; use eframe::{egui, Storage}; use egui::ThemePreference; use egui_file_dialog::information_panel::InformationPanel; use egui_file_dialog::FileDialog; use egui_plot::{log_grid_spacer, GridMark, Legend, Line, Plot, PlotPoint, PlotPoints}; -use egui_theme_switch::ThemeSwitch; use preferences::Preferences; +use self_update::update::Release; use serde::{Deserialize, Serialize}; use serialport::{DataBits, FlowControl, Parity, StopBits}; -use crate::color_picker::{color_picker_widget, color_picker_window, COLORS}; -use crate::custom_highlighter::highlight_impl; -use crate::data::{DataContainer, SerialDirection}; -use crate::serial::{clear_serial_settings, save_serial_settings, Device, SerialDevices}; -use crate::toggle::toggle; -use crate::FileOptions; -use crate::{APP_INFO, PREFS_KEY}; - const DEFAULT_FONT_ID: FontId = FontId::new(14.0, FontFamily::Monospace); pub const RIGHT_PANEL_WIDTH: f32 = 350.0; const BAUD_RATES: &[u32] = &[ @@ -121,6 +120,7 @@ pub struct MyApp { file_dialog: FileDialog, information_panel: InformationPanel, file_opened: bool, + settings_window_open: bool, gui_conf: GuiSettingsContainer, device_lock: Arc>, devices_lock: Arc>>, @@ -144,6 +144,7 @@ pub struct MyApp { show_warning_window: WindowFeedback, do_not_show_clear_warning: bool, init: bool, + new_release: Option, } #[allow(clippy::too_many_arguments)] @@ -240,6 +241,8 @@ impl MyApp { init: false, show_color_window: ColorWindow::NoShow, file_opened: false, + new_release: None, + settings_window_open: false, } } @@ -350,7 +353,7 @@ impl MyApp { .saturating_sub(self.plotting_range); for (i, time) in self.data.time[window..].iter().enumerate() { - let x = *time as f64 / 1000.0; + let x = *time / 1000.0; for (graph, data) in graphs.iter_mut().zip(&self.data.dataset) { if self.data.time.len() == data.len() { if let Some(y) = data.get(i + window) { @@ -874,13 +877,22 @@ impl MyApp { fn draw_global_settings(&mut self, ui: &mut Ui) { ui.add_space(20.0); + if ui - .add(ThemeSwitch::new(&mut self.gui_conf.theme_preference)) - .changed() + .button(format!("{} Settings", egui_phosphor::regular::GEAR_FINE)) + .clicked() { - ui.ctx().set_theme(self.gui_conf.theme_preference); - }; - self.gui_conf.dark_mode = ui.visuals() == &Visuals::dark(); + self.settings_window_open = true; + } + if self.settings_window_open { + settings_window( + ui.ctx(), + &mut self.gui_conf, + &mut self.new_release, + &mut self.settings_window_open, + ); + } + ui.add_space(20.0); if ui @@ -900,6 +912,7 @@ impl MyApp { self.data = DataContainer::default(); // self.names_tx.send(self.serial_devices.labels[self.device_idx].clone()).expect("Failed to send names"); } + ui.add_space(5.0); ui.horizontal(|ui| { if ui.button("Clear Device History").clicked() { self.serial_devices = SerialDevices::default(); @@ -911,19 +924,26 @@ impl MyApp { // self.serial_devices.labels[self.device_idx] = self.serial_devices.labels.clone(); } }); - - ui.end_row(); - ui.label("Show Sent Commands"); - ui.add(toggle(&mut self.show_sent_cmds)) - .on_hover_text("Show sent commands in console."); - ui.end_row(); - ui.label("Show Timestamp"); - ui.add(toggle(&mut self.show_timestamps)) - .on_hover_text("Show timestamp in console."); - ui.end_row(); - ui.label("EOL character"); - ui.add(egui::TextEdit::singleline(&mut self.eol).desired_width(ui.available_width() * 0.9)) + ui.add_space(5.0); + ui.horizontal(|ui| { + ui.add(toggle(&mut self.show_sent_cmds)) + .on_hover_text("Show sent commands in console."); + ui.label("Show Sent Commands"); + }); + ui.add_space(5.0); + ui.horizontal(|ui| { + ui.add(toggle(&mut self.show_timestamps)) + .on_hover_text("Show timestamp in console."); + ui.label("Show Timestamp"); + }); + ui.add_space(5.0); + ui.horizontal(|ui| { + ui.label("EOL character"); + ui.add( + egui::TextEdit::singleline(&mut self.eol).desired_width(ui.available_width() * 0.9), + ) .on_hover_text("Configure your EOL character for sent commands.."); + }); } fn draw_plot_settings(&mut self, ui: &mut Ui) { diff --git a/src/main.rs b/src/main.rs index ae98190..7820fd4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,9 @@ mod data; mod gui; mod io; mod serial; +mod settings_window; mod toggle; +mod update; const APP_INFO: AppInfo = AppInfo { name: "Serial Monitor", diff --git a/src/settings_window.rs b/src/settings_window.rs new file mode 100644 index 0000000..c3c6610 --- /dev/null +++ b/src/settings_window.rs @@ -0,0 +1,65 @@ +use crate::gui::GuiSettingsContainer; +use crate::update::{check_update, update}; +use eframe::egui; +use eframe::egui::{Align2, InnerResponse, Vec2, Visuals}; +use egui_theme_switch::ThemeSwitch; +use self_update::update::Release; +use semver::Version; + +pub fn settings_window( + ctx: &egui::Context, + gui_conf: &mut GuiSettingsContainer, + new_release: &mut Option, + settings_window_open: &mut bool, +) -> Option>> { + egui::Window::new("Settings") + .fixed_size(Vec2 { x: 600.0, y: 200.0 }) + .anchor(Align2::CENTER_CENTER, Vec2 { x: 0.0, y: 0.0 }) + .collapsible(false) + .show(ctx, |ui| { + egui::Grid::new("settings").striped(true).show(ui, |ui| { + if ui + .add(ThemeSwitch::new(&mut gui_conf.theme_preference)) + .changed() + { + ui.ctx().set_theme(gui_conf.theme_preference); + }; + gui_conf.dark_mode = ui.visuals() == &Visuals::dark(); + + ui.end_row(); + ui.end_row(); + + if ui.button("Check for Updates").clicked() { + *new_release = check_update(); + } + + let current_version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap(); + ui.label(format!("Current version: {}", current_version)); + + ui.end_row(); + + if let Some(r) = &new_release { + ui.label(format!("New release: {}", r.version)); + ui.end_row(); + if ui.button("Update").clicked() { + if let Ok(()) = update(r.clone()) { + *new_release = None; + } + } + } else { + ui.label(""); + ui.end_row(); + ui.horizontal(|ui| { + ui.disable(); + let _ = ui.button("Update"); + }); + ui.label("No new update"); + } + + ui.end_row(); + if ui.button("Exit Settings").clicked() { + *settings_window_open = false; + } + }); + }) +} diff --git a/src/update.rs b/src/update.rs new file mode 100644 index 0000000..51b7b7d --- /dev/null +++ b/src/update.rs @@ -0,0 +1,173 @@ +use self_update::self_replace; +use self_update::update::Release; +use semver::Version; +use std::fs::File; +use std::path::Path; +use std::{env, fs, io}; +use zip::ZipArchive; + +const REPO_OWNER: &str = "hacknus"; +const REPO_NAME: &str = "serial-monitor-rust"; + +const MACOS_APP_NAME: &str = "Serial Monitor.app"; + +fn extract_zip(tmp_archive_path: &Path, tmp_archive_dir: &Path) -> io::Result<()> { + // Open the zip file + let file = File::open(tmp_archive_path)?; + let mut archive = ZipArchive::new(file)?; + + // Iterate through the entries in the zip file + for i in 0..archive.len() { + let mut file = archive.by_index(i)?; + let outpath = Path::new(tmp_archive_dir).join(file.name()); + + if file.is_dir() { + // Create directories + std::fs::create_dir_all(&outpath)?; + } else { + // If the parent directory doesn't exist, create it + if let Some(parent) = outpath.parent() { + if !parent.exists() { + std::fs::create_dir_all(parent)?; + } + } + + // Write the file to disk + let mut outfile = File::create(&outpath)?; + io::copy(&mut file, &mut outfile)?; + } + + // Set file permissions if needed + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + if let Some(mode) = file.unix_mode() { + std::fs::set_permissions(&outpath, std::fs::Permissions::from_mode(mode))?; + } + } + } + + Ok(()) +} + +fn copy_dir(src: &Path, dest: &Path, binary_name: &str) -> io::Result<()> { + // Ensure the destination directory exists + if !dest.exists() { + fs::create_dir_all(dest)?; + } + + // Iterate through entries in the source directory + for entry in fs::read_dir(src)? { + let entry = entry?; + let path = entry.path(); + let dest_path = dest.join(entry.file_name()); + + if path.is_dir() { + // Recursively copy subdirectories + copy_dir(&path, &dest_path, binary_name)?; + } else if let Some(file_name) = path.file_name() { + if file_name != binary_name { + // Copy files except for the binary + fs::copy(&path, &dest_path)?; + } + } + } + + Ok(()) +} + +pub fn check_update() -> Option { + if let Ok(builder) = self_update::backends::github::ReleaseList::configure() + .repo_owner(REPO_OWNER) + .repo_name(REPO_NAME) + .build() + { + if let Ok(releases) = builder.fetch() { + let current_version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap(); + return releases + .iter() + .filter_map(|release| { + let release_version_str = release + .version + .strip_prefix("v") + .unwrap_or(&release.version); + Version::parse(release_version_str) + .ok() + .map(|parsed_version| (parsed_version, release)) + }) + .filter(|(parsed_version, _)| parsed_version > ¤t_version) // Compare versions + .max_by(|(a, _), (b, _)| a.cmp(b)) // Find the max version + .map(|(_, release)| release.clone()); // Return the release + } + } + None +} + +pub fn update(release: Release) -> Result<(), Box> { + let target_asset = release.asset_for(self_update::get_target(), None).unwrap(); + + let tmp_archive_dir = tempfile::TempDir::new()?; + let tmp_archive_path = tmp_archive_dir.path().join(&target_asset.name); + let tmp_archive = fs::File::create(&tmp_archive_path)?; + + self_update::Download::from_url(&target_asset.download_url) + .set_header(reqwest::header::ACCEPT, "application/octet-stream".parse()?) + .download_to(&tmp_archive)?; + + extract_zip(&tmp_archive_path, tmp_archive_dir.path())?; + let new_exe = if cfg!(target_os = "windows") { + let binary = env::current_exe() + .unwrap() + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_string(); + tmp_archive_dir.path().join(binary) + } else if cfg!(target_os = "macos") { + let binary = env::current_exe() + .unwrap() + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_string(); + let app_dir = env::current_exe() + .unwrap() + .parent() + .unwrap() + .parent() + .unwrap() + .parent() + .unwrap() + .to_path_buf(); + + let app_name = app_dir + .clone() + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_string(); + + let _ = copy_dir(&tmp_archive_dir.path().join(&app_name), &app_dir, &binary); + + tmp_archive_dir + .path() + .join(format!("{}/Contents/MacOS/{}", MACOS_APP_NAME, binary)) + } else if cfg!(target_os = "linux") { + let binary = env::current_exe() + .unwrap() + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_string(); + tmp_archive_dir.path().join(binary) + } else { + panic!("Running on an unsupported OS"); + }; + + self_replace::self_replace(new_exe)?; + Ok(()) +} From 27b61ea7cc5b57623383929335e102b43f625312 Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 17 Jan 2025 09:22:46 +0100 Subject: [PATCH 3/7] clean up not used tags --- Cargo.lock | 2 +- Cargo.toml | 7 ++----- build.rs | 35 ----------------------------------- 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99bb276..e3a5c30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4294,7 +4294,7 @@ dependencies = [ [[package]] name = "serial-monitor-rust" -version = "0.3.3" +version = "0.3.2" dependencies = [ "csv", "eframe", diff --git a/Cargo.toml b/Cargo.toml index faed43f..6330fd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serial-monitor-rust" -version = "0.3.3" +version = "0.3.2" edition = "2021" authors = ["Linus Leo Stöckli"] description = "Serial Monitor and Plotter written in rust." @@ -36,11 +36,9 @@ regex = "1.11" name = "Serial Monitor" identifier = "com.hacknus.serial_monitor" icon = ["./icons/install.png"] -version = "0.3.3" copyright = "Copyright (c) hacknus 2025. All rights reserved." category = "Developer Tool" short_description = "Serial Monitor and Plotter written in rust." -license = "GPL-3.0" osx_minimum_system_version = "10.8" osx_url_schemes = ["com.hacknus.serial_monitor"] @@ -49,5 +47,4 @@ dbg-build = false dbg-name = false name = "Serial Monitor" no-build = false -output = "target/wix/SerialMonitorInstaller.msi" -version = "0.3.3" \ No newline at end of file +output = "target/wix/SerialMonitorInstaller.msi" \ No newline at end of file diff --git a/build.rs b/build.rs index a8bd963..ab9c06a 100644 --- a/build.rs +++ b/build.rs @@ -1,38 +1,3 @@ -use std::fs; fn main() { println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.8"); - - // Get the package version from the environment variable - let version = env!("CARGO_PKG_VERSION"); - - // Define the paths to `Cargo.toml` - let cargo_toml_path = "Cargo.toml"; - - // Read `Cargo.toml` - let content = fs::read_to_string(cargo_toml_path).expect("Failed to read Cargo.toml"); - - // Replace `version = ...` only within `[package.metadata.bundle]` and `[package.metadata.wix]` - let updated_content = content - .lines() - .map(|line| { - if line.trim_start().starts_with("version =") { - // Check if we're inside the relevant sections - if content.contains("[package.metadata.bundle]") - || content.contains("[package.metadata.wix]") - { - format!(r#"version = "{}""#, version) - } else { - line.to_string() - } - } else { - line.to_string() - } - }) - .collect::>() - .join("\n"); - - // Write the updated content back to `Cargo.toml` - fs::write(cargo_toml_path, updated_content).expect("Failed to write updated Cargo.toml"); - - println!("cargo:rerun-if-changed={}", cargo_toml_path); } From 5a40f4fe302b04072f525a833a9a39ff30297ed2 Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 17 Jan 2025 09:37:26 +0100 Subject: [PATCH 4/7] clean up release names --- .github/workflows/deployment.yml | 80 +++++++++++++++++++++++++------- src/update.rs | 13 +++++- 2 files changed, 74 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 3b23bad..c6e4a50 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -9,7 +9,7 @@ env: CARGO_TERM_COLOR: always jobs: - build-linux: + build-linux-deb: permissions: write-all name: linux runs-on: ubuntu-20.04 @@ -19,18 +19,40 @@ jobs: run: sudo apt-get update && sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle - name: Build run: cargo bundle --release - # - name: Compress. - # run: ls target/release/bundle/deb && cd target/release/bundle/deb && zip rust-serial-monitor.deb.zip *.deb - - name: Rename - run: ls target/release/bundle/deb && cd target/release/bundle/deb && mv *.deb rust-serial-monitor.deb + - name: Compress. + run: ls target/release/bundle/deb && cd target/release/bundle/deb && zip serial-monitor.deb.zip *.deb + # - name: Rename + # run: ls target/release/bundle/deb && cd target/release/bundle/deb && mv *.deb serial-monitor.deb - name: Upload Deb uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./target/release/bundle/deb/rust-serial-monitor.deb - asset_name: rust-serial-monitor-linux_x86.deb + asset_path: ./target/release/bundle/deb/serial-monitor.deb.zip + asset_name: serial-monitor-i686-unknown-linux-gnu.deb.zip + asset_content_type: binary + + build-linux-bin: + permissions: write-all + name: linux + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Update Libs + run: sudo apt-get update && sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle + - name: Build + run: cargo build --release + - name: Compress. + run: cd target/release && zip -r serial-monitor.zip serial-monitor-rust + - name: Upload Bin + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./target/release/bundle/deb/serial-monitor.zip + asset_name: serial-monitor-i686-unknown-linux-gnu-bin.zip asset_content_type: binary build-macos-x86: @@ -44,15 +66,15 @@ jobs: - name: Build run: cargo bundle --release - name: Compress - run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/* + run: cd target/release/bundle/osx && ls && zip -r serial-monitor.app.zip Serial\ Monitor.app/* - name: Upload uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip - asset_name: rust-serial-monitor-macos_x86.app.zip + asset_path: ./target/release/bundle/osx/serial-monitor.app.zip + asset_name: serial-monitor-i686-apple-darwin.app.zip asset_content_type: binary build-macos-arm: @@ -66,18 +88,42 @@ jobs: - name: Build run: cargo bundle --release - name: Compress - run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/* + run: cd target/release/bundle/osx && ls && zip -r serial-monitor.app.zip Serial\ Monitor.app/* + - name: Upload + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./target/release/bundle/osx/serial-monitor.app.zip + asset_name: serial-monitor-x86_64-apple-darwin.app.zip + asset_content_type: binary + + build-windows-exe: + permissions: write-all + name: windows + runs-on: windows-2019 + steps: + - uses: actions/checkout@v3 + - name: Update Libs + run: cargo install --force cargo-wix + - name: Build + run: cargo build --release + - name: Compress + run: | + cd target/release + Compress-Archive serial-monitor-rust.exe serial-monitor.exe.zip - name: Upload uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip - asset_name: rust-serial-monitor-macos_arm.app.zip + asset_path: target/release/rust-serial-monitor.exe.zip + asset_name: serial-monitor-i686-pc-windows-msvc.exe.zip asset_content_type: binary - build-windows: + build-windows-msi: permissions: write-all name: windows runs-on: windows-2019 @@ -88,13 +134,13 @@ jobs: - name: Build run: cargo wix - name: Compress - run: cd target/wix && ls && Compress-Archive *.msi rust-serial-monitor.msi.zip + run: cd target/wix && ls && Compress-Archive *.msi serial-monitor.msi.zip - name: Upload uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: target/wix/rust-serial-monitor.msi.zip - asset_name: rust-serial-monitor-windows_x86.msi.zip + asset_path: target/wix/serial-monitor.msi.zip + asset_name: serial-monitor-i686-pc-windows-msvc.msi.zip asset_content_type: binary diff --git a/src/update.rs b/src/update.rs index 51b7b7d..2ddc69e 100644 --- a/src/update.rs +++ b/src/update.rs @@ -104,8 +104,17 @@ pub fn check_update() -> Option { } pub fn update(release: Release) -> Result<(), Box> { - let target_asset = release.asset_for(self_update::get_target(), None).unwrap(); - + let target_asset = if cfg!(target_os = "windows") { + release + .asset_for(self_update::get_target(), Some("exe")) + .unwrap() + } else if cfg!(target_os = "linux") { + release + .asset_for(self_update::get_target(), Some("bin")) + .unwrap() + } else { + release.asset_for(self_update::get_target(), None).unwrap() + }; let tmp_archive_dir = tempfile::TempDir::new()?; let tmp_archive_path = tmp_archive_dir.path().join(&target_asset.name); let tmp_archive = fs::File::create(&tmp_archive_path)?; From a2086b952d9e867a34ed356384e2ca2122310b07 Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 17 Jan 2025 10:00:24 +0100 Subject: [PATCH 5/7] implement application restart --- src/gui.rs | 5 +++++ src/settings_window.rs | 15 +++++++++++++-- src/update.rs | 12 ++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/gui.rs b/src/gui.rs index 5425b5b..c7fde18 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -12,6 +12,7 @@ use crate::data::{DataContainer, SerialDirection}; use crate::serial::{clear_serial_settings, save_serial_settings, Device, SerialDevices}; use crate::settings_window::settings_window; use crate::toggle::toggle; +use crate::update::check_update; use crate::FileOptions; use crate::{APP_INFO, PREFS_KEY}; use eframe::egui::panel::Side; @@ -121,6 +122,7 @@ pub struct MyApp { information_panel: InformationPanel, file_opened: bool, settings_window_open: bool, + update_text: String, gui_conf: GuiSettingsContainer, device_lock: Arc>, devices_lock: Arc>>, @@ -243,6 +245,7 @@ impl MyApp { file_opened: false, new_release: None, settings_window_open: false, + update_text: "".to_string(), } } @@ -882,6 +885,7 @@ impl MyApp { .button(format!("{} Settings", egui_phosphor::regular::GEAR_FINE)) .clicked() { + self.new_release = check_update(); self.settings_window_open = true; } if self.settings_window_open { @@ -890,6 +894,7 @@ impl MyApp { &mut self.gui_conf, &mut self.new_release, &mut self.settings_window_open, + &mut self.update_text, ); } diff --git a/src/settings_window.rs b/src/settings_window.rs index c3c6610..4cfcad2 100644 --- a/src/settings_window.rs +++ b/src/settings_window.rs @@ -1,5 +1,5 @@ use crate::gui::GuiSettingsContainer; -use crate::update::{check_update, update}; +use crate::update::{check_update, restart_application, update}; use eframe::egui; use eframe::egui::{Align2, InnerResponse, Vec2, Visuals}; use egui_theme_switch::ThemeSwitch; @@ -11,6 +11,7 @@ pub fn settings_window( gui_conf: &mut GuiSettingsContainer, new_release: &mut Option, settings_window_open: &mut bool, + update_text: &mut String, ) -> Option>> { egui::Window::new("Settings") .fixed_size(Vec2 { x: 600.0, y: 200.0 }) @@ -44,6 +45,7 @@ pub fn settings_window( if ui.button("Update").clicked() { if let Ok(()) = update(r.clone()) { *new_release = None; + *update_text = "Update done. Please Restart Application.".to_string(); } } } else { @@ -55,10 +57,19 @@ pub fn settings_window( }); ui.label("No new update"); } + }); + ui.label(update_text.clone()); - ui.end_row(); + ui.horizontal(|ui| { if ui.button("Exit Settings").clicked() { *settings_window_open = false; + *update_text = "".to_string(); + } + + if !update_text.is_empty() && ui.button("Restart").clicked() { + let _ = restart_application(); + ctx.request_repaint(); // Optional: Request repaint for immediate feedback + ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); } }); }) diff --git a/src/update.rs b/src/update.rs index 2ddc69e..9f8fe5b 100644 --- a/src/update.rs +++ b/src/update.rs @@ -3,6 +3,7 @@ use self_update::update::Release; use semver::Version; use std::fs::File; use std::path::Path; +use std::process::{Command, ExitStatus}; use std::{env, fs, io}; use zip::ZipArchive; @@ -11,6 +12,17 @@ const REPO_NAME: &str = "serial-monitor-rust"; const MACOS_APP_NAME: &str = "Serial Monitor.app"; +pub fn restart_application() -> std::io::Result { + // Get the current executable path + let current_exe = std::env::current_exe().expect("Failed to get current executable path"); + + // Launch a new instance of the application + Command::new(current_exe) + .spawn() + .expect("Failed to restart application") + .wait() +} + fn extract_zip(tmp_archive_path: &Path, tmp_archive_dir: &Path) -> io::Result<()> { // Open the zip file let file = File::open(tmp_archive_path)?; From 6f32bbe03e0c16647ad3e7455706c68aeb859a8f Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 17 Jan 2025 13:09:16 +0100 Subject: [PATCH 6/7] restart application fix --- src/settings_window.rs | 17 +++++++++++------ src/update.rs | 14 +++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/settings_window.rs b/src/settings_window.rs index 4cfcad2..c5fe090 100644 --- a/src/settings_window.rs +++ b/src/settings_window.rs @@ -55,19 +55,24 @@ pub fn settings_window( ui.disable(); let _ = ui.button("Update"); }); - ui.label("No new update"); + ui.label("You have the latest version"); } }); ui.label(update_text.clone()); ui.horizontal(|ui| { - if ui.button("Exit Settings").clicked() { - *settings_window_open = false; - *update_text = "".to_string(); - } + ui.horizontal(|ui| { + if !update_text.is_empty() { + ui.disable(); + }; + if ui.button("Exit Settings").clicked() { + *settings_window_open = false; + *update_text = "".to_string(); + } + }); if !update_text.is_empty() && ui.button("Restart").clicked() { - let _ = restart_application(); + restart_application(); ctx.request_repaint(); // Optional: Request repaint for immediate feedback ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); } diff --git a/src/update.rs b/src/update.rs index 9f8fe5b..98b6574 100644 --- a/src/update.rs +++ b/src/update.rs @@ -3,24 +3,20 @@ use self_update::update::Release; use semver::Version; use std::fs::File; use std::path::Path; -use std::process::{Command, ExitStatus}; +use std::process::Command; use std::{env, fs, io}; use zip::ZipArchive; const REPO_OWNER: &str = "hacknus"; const REPO_NAME: &str = "serial-monitor-rust"; - const MACOS_APP_NAME: &str = "Serial Monitor.app"; -pub fn restart_application() -> std::io::Result { +pub fn restart_application() { // Get the current executable path let current_exe = std::env::current_exe().expect("Failed to get current executable path"); // Launch a new instance of the application - Command::new(current_exe) - .spawn() - .expect("Failed to restart application") - .wait() + let _ = Command::new(current_exe).spawn(); } fn extract_zip(tmp_archive_path: &Path, tmp_archive_dir: &Path) -> io::Result<()> { @@ -173,6 +169,10 @@ pub fn update(release: Release) -> Result<(), Box> { let _ = copy_dir(&tmp_archive_dir.path().join(&app_name), &app_dir, &binary); + // MACOS_APP_NAME either needs to be hardcoded or extracted from the downloaded and + // extracted archive, but we cannot just assume that the parent directory of the + // currently running executable is equal to the app name - this is especially not + // the case if we run the code with `cargo run`. tmp_archive_dir .path() .join(format!("{}/Contents/MacOS/{}", MACOS_APP_NAME, binary)) From 26d8d3ed244be582d1f599ca969f5a7799472211 Mon Sep 17 00:00:00 2001 From: hacknus Date: Sat, 18 Jan 2025 14:59:21 +0100 Subject: [PATCH 7/7] update dependencies and bump to 0.3.4 --- Cargo.lock | 588 ++++++++++++++--------------------------- Cargo.toml | 11 +- src/settings_window.rs | 5 +- src/update.rs | 56 +--- 4 files changed, 217 insertions(+), 443 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3a5c30..dc64ea7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,7 +79,7 @@ dependencies = [ "async-executor", "async-task", "atspi", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "futures-util", "serde", "zbus 4.4.0", @@ -129,17 +129,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.8.11" @@ -176,7 +165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.6.0", + "bitflags 2.8.0", "cc", "cesu8", "jni", @@ -323,11 +312,11 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -354,7 +343,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.3.0", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "slab", ] @@ -378,7 +367,7 @@ checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ "async-lock 3.4.0", "blocking", - "futures-lite 2.5.0", + "futures-lite 2.6.0", ] [[package]] @@ -395,7 +384,7 @@ dependencies = [ "log", "parking", "polling 2.8.0", - "rustix 0.37.27", + "rustix 0.37.28", "slab", "socket2 0.4.10", "waker-fn", @@ -411,10 +400,10 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "parking", "polling 3.7.4", - "rustix 0.38.42", + "rustix 0.38.43", "slab", "tracing", "windows-sys 0.59.0", @@ -435,7 +424,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "event-listener-strategy", "pin-project-lite", ] @@ -453,7 +442,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.42", + "rustix 0.38.43", "windows-sys 0.48.0", ] @@ -470,9 +459,9 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.3.1", - "futures-lite 2.5.0", - "rustix 0.38.42", + "event-listener 5.4.0", + "futures-lite 2.6.0", + "rustix 0.38.43", "tracing", ] @@ -484,7 +473,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -499,7 +488,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.42", + "rustix 0.38.43", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -513,13 +502,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -563,7 +552,7 @@ checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" dependencies = [ "atspi-common", "atspi-proxies", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "zbus 4.4.0", ] @@ -663,9 +652,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -703,7 +692,7 @@ dependencies = [ "async-channel", "async-task", "futures-io", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "piper", ] @@ -736,7 +725,7 @@ checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -757,37 +746,16 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "calloop" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "log", "polling 3.7.4", - "rustix 0.38.42", + "rustix 0.38.43", "slab", "thiserror 1.0.69", ] @@ -799,7 +767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ "calloop", - "rustix 0.38.42", + "rustix 0.38.43", "wayland-backend", "wayland-client", ] @@ -837,9 +805,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.5" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "jobserver", "libc", @@ -902,16 +870,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clang-sys" version = "1.8.1" @@ -986,12 +944,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - [[package]] name = "convert_case" version = "0.4.0" @@ -1057,21 +1009,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" version = "1.4.2" @@ -1148,7 +1085,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1192,12 +1129,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" -[[package]] -name = "deflate64" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" - [[package]] name = "der" version = "0.7.9" @@ -1236,7 +1167,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1280,7 +1211,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1291,7 +1222,6 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -1329,7 +1259,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1463,7 +1393,7 @@ dependencies = [ [[package]] name = "egui-file-dialog" version = "0.8.0" -source = "git+https://github.com/hacknus/egui-file-dialog?branch=sort_by_metadata#6685bf25dbc2b29f2472d588539f7e5dba420a20" +source = "git+https://github.com/hacknus/egui-file-dialog?branch=sort_by_metadata#288accb08f3c0cf07fd0dad48210b537fac4dbd9" dependencies = [ "chrono", "directories", @@ -1653,14 +1583,14 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "enumflags2" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" +checksum = "ba2f4b465f5318854c6f8dd686ede6c0a9dc67d4b1ac241cf0eb51521a309147" dependencies = [ "enumflags2_derive", "serde", @@ -1668,13 +1598,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" +checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1685,7 +1615,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1763,9 +1693,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ "concurrent-queue", "parking", @@ -1778,7 +1708,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "pin-project-lite", ] @@ -1867,7 +1797,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1930,9 +1860,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" dependencies = [ "fastrand 2.3.0", "futures-core", @@ -1949,7 +1879,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2043,9 +1973,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "glow" @@ -2073,11 +2003,11 @@ dependencies = [ [[package]] name = "glutin" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec69412a0bf07ea7607e638b415447857a808846c2b685a43c8aa18bc6d5e499" +checksum = "03642b8b0cce622392deb0ee3e88511f75df2daac806102597905c3ea1974848" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_aliases 0.2.1", "cgl", "core-foundation 0.9.4", @@ -2110,9 +2040,9 @@ dependencies = [ [[package]] name = "glutin_egl_sys" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" dependencies = [ "gl_generator", "windows-sys 0.52.0", @@ -2120,9 +2050,9 @@ dependencies = [ [[package]] name = "glutin_glx_sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" dependencies = [ "gl_generator", "x11-dl", @@ -2130,9 +2060,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" dependencies = [ "gl_generator", ] @@ -2143,7 +2073,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-alloc-types", ] @@ -2153,7 +2083,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2162,7 +2092,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-descriptor-types", "hashbrown 0.15.2", ] @@ -2173,7 +2103,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2242,15 +2172,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - [[package]] name = "home" version = "0.5.11" @@ -2511,7 +2432,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2616,15 +2537,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - [[package]] name = "instant" version = "0.1.13" @@ -2700,9 +2612,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -2783,7 +2695,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall 0.5.8", ] @@ -2816,9 +2728,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -2842,27 +2754,11 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lockfree-object-pool" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" - [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "lzma-rs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" -dependencies = [ - "byteorder", - "crc", -] +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "mach2" @@ -2921,7 +2817,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -2954,9 +2850,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", "simd-adler32", @@ -2981,7 +2877,7 @@ checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", @@ -3017,7 +2913,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys 0.6.0+11769913", @@ -3068,7 +2964,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "cfg_aliases 0.2.1", "libc", @@ -3133,7 +3029,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -3173,7 +3069,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "libc", "objc2", @@ -3189,7 +3085,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -3213,7 +3109,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3255,7 +3151,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "dispatch", "libc", @@ -3280,7 +3176,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3292,7 +3188,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3315,7 +3211,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-cloud-kit", @@ -3347,7 +3243,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -3375,7 +3271,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -3392,7 +3288,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -3482,16 +3378,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest", - "hmac", -] - [[package]] name = "peeking_take_while" version = "0.1.2" @@ -3512,29 +3398,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3621,7 +3507,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.42", + "rustix 0.38.43", "tracing", "windows-sys 0.59.0", ] @@ -3679,9 +3565,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -3698,7 +3584,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "memchr", "unicase", ] @@ -3794,9 +3680,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3858,7 +3744,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -4000,7 +3886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.6.0", + "bitflags 2.8.0", "serde", "serde_derive", ] @@ -4040,9 +3926,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" +version = "0.37.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" dependencies = [ "bitflags 1.3.2", "errno", @@ -4054,22 +3940,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", - "linux-raw-sys 0.4.14", + "linux-raw-sys 0.4.15", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "log", "once_cell", @@ -4111,9 +3997,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -4170,7 +4056,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -4201,8 +4087,7 @@ dependencies = [ [[package]] name = "self_update" version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d832c086ece0dacc29fb2947bb4219b8f6e12fe9e40b7108f9e57c4224e47b5c" +source = "git+https://github.com/hacknus/self_update#5bb7379d02012843cb65b34ef243c18fdffde6b7" dependencies = [ "hyper", "indicatif", @@ -4230,29 +4115,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "itoa", "memchr", @@ -4268,7 +4153,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4294,7 +4179,7 @@ dependencies = [ [[package]] name = "serial-monitor-rust" -version = "0.3.2" +version = "0.3.4" dependencies = [ "csv", "eframe", @@ -4315,16 +4200,15 @@ dependencies = [ "serde", "serialport", "tempfile", - "zip", ] [[package]] name = "serialport" -version = "4.6.1" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779e2977f0cc2ff39708fef48f96f3768ac8ddd8c6caaaab82e83bd240ef99b2" +checksum = "5ecfc4858c2266c7695d8b8460bbd612fa81bd2e250f5f0dd16195e4b4f8b3d8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "core-foundation 0.10.0", "core-foundation-sys", @@ -4393,9 +4277,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simplecss" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" dependencies = [ "log", ] @@ -4451,14 +4335,14 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "calloop", "calloop-wayland-source", "cursor-icon", "libc", "log", "memmap2", - "rustix 0.38.42", + "rustix 0.38.43", "thiserror 1.0.69", "wayland-backend", "wayland-client", @@ -4522,7 +4406,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -4613,9 +4497,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.91" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -4639,14 +4523,14 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "sysinfo" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "948512566b1895f93b1592c7574baeb2de842f224f2aab158799ecadb8ebbb46" +checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" dependencies = [ "core-foundation-sys", "libc", @@ -4655,14 +4539,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand 2.3.0", + "getrandom", "once_cell", - "rustix 0.38.42", + "rustix 0.38.43", "windows-sys 0.59.0", ] @@ -4701,7 +4586,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4712,7 +4597,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4904,7 +4789,7 @@ checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.7.0", "toml_datetime 0.6.8", - "winnow 0.6.20", + "winnow 0.6.24", ] [[package]] @@ -4953,7 +4838,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5014,9 +4899,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" @@ -5188,34 +5073,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -5226,9 +5112,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5236,22 +5122,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wayland-backend" @@ -5261,7 +5150,7 @@ checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.42", + "rustix 0.38.43", "scoped-tls", "smallvec", "wayland-sys", @@ -5273,8 +5162,8 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "bitflags 2.6.0", - "rustix 0.38.42", + "bitflags 2.8.0", + "rustix 0.38.43", "wayland-backend", "wayland-scanner", ] @@ -5285,7 +5174,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cursor-icon", "wayland-backend", ] @@ -5296,7 +5185,7 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b08bc3aafdb0035e7fe0fdf17ba0c09c268732707dca4ae098f60cb28c9e4c" dependencies = [ - "rustix 0.38.42", + "rustix 0.38.43", "wayland-client", "xcursor", ] @@ -5307,7 +5196,7 @@ version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -5319,7 +5208,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b31cab548ee68c7eb155517f2212049dc151f7cd7910c2b66abfd31c3ee12bd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -5332,7 +5221,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -5364,9 +5253,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -5447,7 +5336,7 @@ checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_aliases 0.1.1", "document-features", "indexmap 2.7.0", @@ -5473,7 +5362,7 @@ dependencies = [ "android_system_properties", "arrayvec", "ash", - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "cfg_aliases 0.1.1", "core-graphics-types", @@ -5510,7 +5399,7 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "js-sys", "web-sys", ] @@ -5524,7 +5413,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.42", + "rustix 0.38.43", ] [[package]] @@ -5630,7 +5519,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5641,7 +5530,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5652,7 +5541,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5663,7 +5552,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5921,14 +5810,14 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.6" +version = "0.30.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3d72dfa0f47e429290cd0d236884ca02f22dbd5dd33a43ad2b8bf4d79b6c18" +checksum = "f5d74280aabb958072864bff6cfbcf9025cf8bfacdde5e32b5e12920ef703b0f" dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "bytemuck", "calloop", @@ -5951,7 +5840,7 @@ dependencies = [ "pin-project", "raw-window-handle", "redox_syscall 0.4.1", - "rustix 0.38.42", + "rustix 0.38.43", "sctk-adwaita", "smithay-client-toolkit", "smol_str", @@ -5982,9 +5871,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -6023,7 +5912,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 0.38.42", + "rustix 0.38.43", "x11rb-protocol", ] @@ -6061,7 +5950,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "dlib", "log", "once_cell", @@ -6076,9 +5965,9 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "xml-rs" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432" +checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" [[package]] name = "xmlwriter" @@ -6106,7 +5995,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "synstructure", ] @@ -6157,7 +6046,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ - "async-broadcast 0.7.1", + "async-broadcast 0.7.2", "async-executor", "async-fs 2.1.2", "async-io 2.4.0", @@ -6168,7 +6057,7 @@ dependencies = [ "async-trait", "blocking", "enumflags2", - "event-listener 5.3.1", + "event-listener 5.4.0", "futures-core", "futures-sink", "futures-util", @@ -6207,7 +6096,7 @@ checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "zbus-lockstep", "zbus_xml", "zvariant 4.2.0", @@ -6236,7 +6125,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "zvariant_utils 2.1.0", ] @@ -6293,7 +6182,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -6313,7 +6202,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "synstructure", ] @@ -6322,20 +6211,6 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] [[package]] name = "zerovec" @@ -6356,7 +6231,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -6365,27 +6240,14 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ - "aes", "arbitrary", - "bzip2", - "constant_time_eq", "crc32fast", "crossbeam-utils", - "deflate64", "displaydoc", - "flate2", - "hmac", "indexmap 2.7.0", - "lzma-rs", "memchr", - "pbkdf2", - "rand", - "sha1", "thiserror 2.0.11", "time", - "zeroize", - "zopfli", - "zstd", ] [[package]] @@ -6398,48 +6260,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "zopfli" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" -dependencies = [ - "bumpalo", - "crc32fast", - "lockfree-object-pool", - "log", - "once_cell", - "simd-adler32", -] - -[[package]] -name = "zstd" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "zvariant" version = "3.15.2" @@ -6489,7 +6309,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "zvariant_utils 2.1.0", ] @@ -6512,5 +6332,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] diff --git a/Cargo.toml b/Cargo.toml index 6330fd6..129ea34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serial-monitor-rust" -version = "0.3.2" +version = "0.3.4" edition = "2021" authors = ["Linus Leo Stöckli"] description = "Serial Monitor and Plotter written in rust." @@ -21,12 +21,11 @@ keepawake = { version = "0.5.1" } preferences = { version = "2.0.0" } regex = "1" serde = { version = "1.0", features = ["derive"] } -serialport = { version = "4.6.1", features = ["serde"] } -log = "0.4.22" -self_update = { version = "0.42.0", features = ["archive-zip"] } -tempfile = "3.14.0" +serialport = { version = "4.7", features = ["serde"] } +log = "0.4" +self_update = { git = "https://github.com/hacknus/self_update", features = ["archive-zip"] } +tempfile = "3.15" reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls", "http2"] } -zip = "2.2.2" semver = "1.0.24" [build-dependencies] diff --git a/src/settings_window.rs b/src/settings_window.rs index c5fe090..ad841bc 100644 --- a/src/settings_window.rs +++ b/src/settings_window.rs @@ -1,8 +1,9 @@ use crate::gui::GuiSettingsContainer; -use crate::update::{check_update, restart_application, update}; +use crate::update::{check_update, update}; use eframe::egui; use eframe::egui::{Align2, InnerResponse, Vec2, Visuals}; use egui_theme_switch::ThemeSwitch; +use self_update::restart::restart; use self_update::update::Release; use semver::Version; @@ -72,7 +73,7 @@ pub fn settings_window( }); if !update_text.is_empty() && ui.button("Restart").clicked() { - restart_application(); + restart(); ctx.request_repaint(); // Optional: Request repaint for immediate feedback ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); } diff --git a/src/update.rs b/src/update.rs index 98b6574..b6b6a8d 100644 --- a/src/update.rs +++ b/src/update.rs @@ -1,63 +1,15 @@ use self_update::self_replace; use self_update::update::Release; use semver::Version; -use std::fs::File; use std::path::Path; -use std::process::Command; use std::{env, fs, io}; -use zip::ZipArchive; const REPO_OWNER: &str = "hacknus"; const REPO_NAME: &str = "serial-monitor-rust"; const MACOS_APP_NAME: &str = "Serial Monitor.app"; -pub fn restart_application() { - // Get the current executable path - let current_exe = std::env::current_exe().expect("Failed to get current executable path"); - - // Launch a new instance of the application - let _ = Command::new(current_exe).spawn(); -} - -fn extract_zip(tmp_archive_path: &Path, tmp_archive_dir: &Path) -> io::Result<()> { - // Open the zip file - let file = File::open(tmp_archive_path)?; - let mut archive = ZipArchive::new(file)?; - - // Iterate through the entries in the zip file - for i in 0..archive.len() { - let mut file = archive.by_index(i)?; - let outpath = Path::new(tmp_archive_dir).join(file.name()); - - if file.is_dir() { - // Create directories - std::fs::create_dir_all(&outpath)?; - } else { - // If the parent directory doesn't exist, create it - if let Some(parent) = outpath.parent() { - if !parent.exists() { - std::fs::create_dir_all(parent)?; - } - } - - // Write the file to disk - let mut outfile = File::create(&outpath)?; - io::copy(&mut file, &mut outfile)?; - } - - // Set file permissions if needed - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - if let Some(mode) = file.unix_mode() { - std::fs::set_permissions(&outpath, std::fs::Permissions::from_mode(mode))?; - } - } - } - - Ok(()) -} - +/// method to copy the complete directory `src` to `dest` but skipping the binary `binary_name` +/// since we have to use `self-replace` for that. fn copy_dir(src: &Path, dest: &Path, binary_name: &str) -> io::Result<()> { // Ensure the destination directory exists if !dest.exists() { @@ -84,6 +36,7 @@ fn copy_dir(src: &Path, dest: &Path, binary_name: &str) -> io::Result<()> { Ok(()) } +/// Function to check for updates and return the latest one, if it is more recent than the current version pub fn check_update() -> Option { if let Ok(builder) = self_update::backends::github::ReleaseList::configure() .repo_owner(REPO_OWNER) @@ -111,6 +64,7 @@ pub fn check_update() -> Option { None } +/// custom update function for use with bundles pub fn update(release: Release) -> Result<(), Box> { let target_asset = if cfg!(target_os = "windows") { release @@ -131,7 +85,7 @@ pub fn update(release: Release) -> Result<(), Box> { .set_header(reqwest::header::ACCEPT, "application/octet-stream".parse()?) .download_to(&tmp_archive)?; - extract_zip(&tmp_archive_path, tmp_archive_dir.path())?; + self_update::Extract::from_source(&tmp_archive_path).extract_into(tmp_archive_dir.path())?; let new_exe = if cfg!(target_os = "windows") { let binary = env::current_exe() .unwrap()