From c84aa3a31c923b0cdcda152ae880e2848a457203 Mon Sep 17 00:00:00 2001 From: ZHANGYU Date: Sun, 17 Nov 2024 20:38:33 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index a549546..ead8e74 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,22 @@ A modern and elegant speedtest tool built with Tauri and React, powered by the o Please check the [releases page](https://github.com/zhangyu1818/speedtest-ui/releases). +### MacOS + +**The application is damaged** + +```bash +xattr -cr /Applications/Speedtest\ UI.app/ +``` + +### Linux + +Untested + +### Windows + +Untested + ## Development ### Prerequisites From 08a7f0b4b114a579b31434c49eeb225b3d996e89 Mon Sep 17 00:00:00 2001 From: ZHANGYU Date: Sun, 17 Nov 2024 20:41:27 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ead8e74..d1b2db0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -A modern and elegant speedtest tool built with Tauri and React, powered by the official Speedtest® CLI. +A modern and elegant speedtest tool built with Tauri and React, based on Speedtest® CLI. > [!IMPORTANT] > This software is for learning and research purposes only. Commercial use is strictly prohibited. From 14d5505107ca2df0593c355fbd633270d05b4f32 Mon Sep 17 00:00:00 2001 From: zhangyu1818 Date: Tue, 19 Nov 2024 10:48:40 +0800 Subject: [PATCH 3/3] Fix issue with Speedtest CLI requiring --accept-license flag --- src-tauri/src/lib.rs | 9 ++------- src-tauri/tauri.conf.json | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 6a5b92e..3b7c130 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,6 +1,6 @@ pub mod models; -use std::io::{BufRead, BufReader, Write}; +use std::io::{BufRead, BufReader}; use std::process::{Command, Stdio}; use std::thread; use tauri::{path::BaseDirectory, AppHandle, Emitter, Manager}; @@ -21,6 +21,7 @@ async fn run_speedtest(app: AppHandle) -> Result { .map_err(|e| format!("Failed to resolve resource path: {}", e))?; let mut child = Command::new(command_path) + .arg("--accept-license") .arg("--format=json") .arg("--progress=yes") .arg("--unit=B/s") @@ -30,12 +31,6 @@ async fn run_speedtest(app: AppHandle) -> Result { .spawn() .map_err(|e| e.to_string())?; - if let Some(mut stdin) = child.stdin.take() { - thread::spawn(move || { - stdin.write_all(b"y\n").unwrap(); - }); - } - let stdout = child .stdout .take() diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 272a124..6f8da5d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Speedtest UI", - "version": "0.0.1", + "version": "0.0.2", "identifier": "com.speedtest-ui.app", "build": { "beforeDevCommand": "pnpm dev",