From c3db229e67612c70df873161787d199ae4791be2 Mon Sep 17 00:00:00 2001
From: Cyrix126 <58007246+Cyrix126@users.noreply.github.com>
Date: Tue, 26 Mar 2024 08:02:23 +0100
Subject: [PATCH] fix: do not start on windows

fix: change wgpu to glow fix this issue, letting wgpu for unix like.
feat: remove unused deps
---
 Cargo.lock | 219 +++--------------------------------------------------
 Cargo.toml |  17 +++--
 2 files changed, 22 insertions(+), 214 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index c605b70..b0c0776 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -620,22 +620,11 @@ dependencies = [
  "zbus 3.15.1",
 ]
 
-[[package]]
-name = "atty"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
-dependencies = [
- "hermit-abi 0.1.19",
- "libc",
- "winapi",
-]
-
 [[package]]
 name = "autocfg"
-version = "1.1.0"
+version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
 
 [[package]]
 name = "av1-grain"
@@ -675,12 +664,6 @@ dependencies = [
  "rustc-demangle",
 ]
 
-[[package]]
-name = "base64"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
-
 [[package]]
 name = "base64ct"
 version = "1.6.0"
@@ -1540,19 +1523,6 @@ dependencies = [
  "regex",
 ]
 
-[[package]]
-name = "env_logger"
-version = "0.5.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
-dependencies = [
- "atty",
- "humantime 1.3.0",
- "log",
- "regex",
- "termcolor",
-]
-
 [[package]]
 name = "env_logger"
 version = "0.11.3"
@@ -1562,7 +1532,7 @@ dependencies = [
  "anstream",
  "anstyle",
  "env_filter",
- "humantime 2.1.0",
+ "humantime",
  "log",
 ]
 
@@ -2105,7 +2075,7 @@ dependencies = [
  "eframe",
  "egui",
  "egui_extras",
- "env_logger 0.11.3",
+ "env_logger",
  "figment",
  "flate2",
  "hyper",
@@ -2116,7 +2086,6 @@ dependencies = [
  "lzma-sys",
  "num-format",
  "once_cell",
- "openssl",
  "portable-pty",
  "rand",
  "readable",
@@ -2131,9 +2100,6 @@ dependencies = [
  "sudo",
  "sysinfo",
  "tar",
- "tls-api",
- "tls-api-native-tls",
- "tls-api-openssl",
  "tokio",
  "toml 0.8.12",
  "walkdir",
@@ -2183,15 +2149,6 @@ version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
 
-[[package]]
-name = "hermit-abi"
-version = "0.1.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
-dependencies = [
- "libc",
-]
-
 [[package]]
 name = "hermit-abi"
 version = "0.3.9"
@@ -2262,15 +2219,6 @@ version = "1.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
 
-[[package]]
-name = "humantime"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
-dependencies = [
- "quick-error 1.2.3",
-]
-
 [[package]]
 name = "humantime"
 version = "2.1.0"
@@ -2454,7 +2402,7 @@ version = "1.0.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
 dependencies = [
- "hermit-abi 0.3.9",
+ "hermit-abi",
  "libc",
  "windows-sys 0.48.0",
 ]
@@ -2488,9 +2436,9 @@ dependencies = [
 
 [[package]]
 name = "itoa"
-version = "1.0.10"
+version = "1.0.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
 
 [[package]]
 name = "jni"
@@ -3031,7 +2979,7 @@ version = "1.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
 dependencies = [
- "hermit-abi 0.3.9",
+ "hermit-abi",
  "libc",
 ]
 
@@ -3190,15 +3138,6 @@ version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
 
-[[package]]
-name = "openssl-src"
-version = "300.2.3+3.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843"
-dependencies = [
- "cc",
-]
-
 [[package]]
 name = "openssl-sys"
 version = "0.9.101"
@@ -3207,7 +3146,6 @@ checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff"
 dependencies = [
  "cc",
  "libc",
- "openssl-src",
  "pkg-config",
  "vcpkg",
 ]
@@ -3304,17 +3242,6 @@ dependencies = [
  "sha2",
 ]
 
-[[package]]
-name = "pem"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb"
-dependencies = [
- "base64",
- "once_cell",
- "regex",
-]
-
 [[package]]
 name = "percent-encoding"
 version = "2.3.1"
@@ -3387,7 +3314,7 @@ checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6"
 dependencies = [
  "cfg-if",
  "concurrent-queue",
- "hermit-abi 0.3.9",
+ "hermit-abi",
  "pin-project-lite",
  "rustix 0.38.32",
  "tracing",
@@ -3495,12 +3422,6 @@ dependencies = [
  "bytemuck",
 ]
 
-[[package]]
-name = "quick-error"
-version = "1.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
-
 [[package]]
 name = "quick-error"
 version = "2.0.1"
@@ -3599,7 +3520,7 @@ dependencies = [
  "avif-serialize",
  "imgref",
  "loop9",
- "quick-error 2.0.1",
+ "quick-error",
  "rav1e",
  "rayon",
  "rgb",
@@ -3750,21 +3671,6 @@ dependencies = [
  "bytemuck",
 ]
 
-[[package]]
-name = "ring"
-version = "0.17.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
-dependencies = [
- "cc",
- "cfg-if",
- "getrandom",
- "libc",
- "spin",
- "untrusted 0.9.0",
- "windows-sys 0.52.0",
-]
-
 [[package]]
 name = "rustc-demangle"
 version = "0.1.23"
@@ -3934,9 +3840,9 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.114"
+version = "1.0.115"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
+checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
 dependencies = [
  "itoa",
  "ryu",
@@ -4319,17 +4225,6 @@ dependencies = [
  "libc",
 ]
 
-[[package]]
-name = "test-cert-gen"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345f92b7cac59507cdaba298c5493f7c40e2063d31f6fc621105183344d5d50a"
-dependencies = [
- "once_cell",
- "pem",
- "tempfile",
-]
-
 [[package]]
 name = "thiserror"
 version = "1.0.58"
@@ -4420,68 +4315,6 @@ version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
 
-[[package]]
-name = "tls-api"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66d1b3dfb0a60da3e8a130c9f2432063d9979928a05c2b2cdcfc9fd05e4f53a3"
-dependencies = [
- "anyhow",
- "log",
- "pem",
- "tempfile",
- "thiserror",
- "tokio",
- "void",
- "webpki",
-]
-
-[[package]]
-name = "tls-api-native-tls"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b935bda2458120a5d2cea542013796fcf13937566580027f6a08f42a52206f7"
-dependencies = [
- "anyhow",
- "native-tls",
- "thiserror",
- "tls-api",
- "tls-api-test",
- "tokio",
-]
-
-[[package]]
-name = "tls-api-openssl"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82155f245c99a3b652627f32abeacd4eae9e0fec996c1090df121e01379d28f3"
-dependencies = [
- "anyhow",
- "openssl",
- "openssl-sys",
- "thiserror",
- "tls-api",
- "tls-api-test",
- "tokio",
-]
-
-[[package]]
-name = "tls-api-test"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9df107843d725428d76bb159040fbae6d1524dcf25d5b24c56daa6b37ce9dbb5"
-dependencies = [
- "anyhow",
- "env_logger 0.5.13",
- "log",
- "pem",
- "test-cert-gen",
- "tls-api",
- "tokio",
- "untrusted 0.6.2",
- "webpki",
-]
-
 [[package]]
 name = "tokio"
 version = "1.36.0"
@@ -4719,18 +4552,6 @@ version = "0.2.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
 
-[[package]]
-name = "untrusted"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f"
-
-[[package]]
-name = "untrusted"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
-
 [[package]]
 name = "url"
 version = "2.5.0"
@@ -4790,12 +4611,6 @@ version = "0.0.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314"
 
-[[package]]
-name = "void"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
-
 [[package]]
 name = "vte"
 version = "0.11.1"
@@ -5059,16 +4874,6 @@ dependencies = [
  "web-sys",
 ]
 
-[[package]]
-name = "webpki"
-version = "0.22.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
-dependencies = [
- "ring",
- "untrusted 0.9.0",
-]
-
 [[package]]
 name = "weezl"
 version = "0.1.8"
diff --git a/Cargo.toml b/Cargo.toml
index 96c3584..ea58e03 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,7 +40,6 @@ egui_extras = { version = "0.26.2", features = ["image"] }
 ## 2024-03-18: Both `glow` and `wgpu` seem to crash:
 ## <https://github.com/hinto-janai/gupax/issues/84>
 ## `wgpu` seems to crash on less computers though so...
-eframe = { version = "0.26.2", features = ["wgpu"] }
 
 ## 2023-02-06: The below gets fixed by using the [wgpu] backend instead of [glow]
 ## It also fixes crashes on CPU-based graphics. Only used for Windows.
@@ -71,8 +70,8 @@ rfd = "0.14.1"
 serde = { version = "1.0.197", features = ["rc", "derive"] }
 serde_json = "1.0.114"
 sysinfo = { version = "0.30.7", default-features = false }
-tls-api = "0.9.0"
-tokio = { version = "1.36.0", features = ["rt", "time", "macros", "process"] }
+# tls-api = "0.9.0"
+tokio = { version = "1.36.0", features = ["rt", "time", "macros", "process", "rt-multi-thread"] }
 toml = { version = "0.8.12", features = ["preserve_order"] }
 walkdir = "2.5.0"
 zeroize = "1.7.0"
@@ -84,31 +83,35 @@ readable = "0.16"
 chrono = {version="0.4.35", default-features=false, features=["clock", "std"]}
 # Unix dependencies
 [target.'cfg(unix)'.dependencies]
+eframe = { version = "0.26.2", features = ["wgpu"] }
 tar = "0.4.40"
 flate2 = "1.0"
 sudo = "0.6.0"
 # macOS
 [target.'cfg(target_os = "macos")'.dependencies]
+eframe = { version = "0.26.2", features = ["wgpu"] }
 # On apple-darwin targets there is an issue with the native and rustls
 # tls implementation so this makes it fall back to the openssl variant.
 #
 # https://gitlab.torproject.org/tpo/core/arti/-/issues/715
-tls-api-openssl = "0.9.0"
+# tls-api-openssl = "0.9.0"
 # `arti-client` with `static` doesn't actually
 # statically link OpenSSL on macOS, both x64 + ARM.
 # Should probably file a bug report.
-openssl = { version = "0.10", features = ["vendored"] }
+# openssl = { version = "0.10", features = ["vendored"] }
 # We don't even use `xz` in `flate2` but this gets dynamically
 # linked as well which causes problems, so statically link it.
 lzma-sys = { version = "0.1.20", features = ["static"] }
 [dev-dependencies]
 egui = {version = "0.26.2", features=["callstack"]}
 
-[target.'cfg(not(target_os = "macos"))'.dependencies]
-tls-api-native-tls = "0.9.0"
+# [target.'cfg(not(target_os = "macos"))'.dependencies]
+# tls-api-native-tls = "0.9.0"
 
 # Windows dependencies
 [target.'cfg(windows)'.dependencies]
+# glow start on windows but not wgpu
+eframe = { version = "0.26.2", features = ["glow"] }
 zip = "0.6.6"
 is_elevated = "0.1.2"