From 38dce9c13b912ba461f49f1b8ffe601fec5c8fa7 Mon Sep 17 00:00:00 2001 From: Droid-MAX Date: Tue, 25 Apr 2023 12:51:03 +0800 Subject: [PATCH 1/3] Keep log file names in the same format --- switch-desktop/src/config/log_config.rs | 4 ++-- switch-desktop/src/main.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/switch-desktop/src/config/log_config.rs b/switch-desktop/src/config/log_config.rs index 579e966..cc5d1ea 100644 --- a/switch-desktop/src/config/log_config.rs +++ b/switch-desktop/src/config/log_config.rs @@ -5,7 +5,7 @@ pub fn log_service_init() -> io::Result<()> { log_init_("switch-service.log") } pub fn log_init() -> io::Result<()> { - log_init_("switch.log") + log_init_("switch-desktop.log") } pub fn log_init_(file_name:&str) -> io::Result<()> { let home = SWITCH_HOME_PATH.lock().clone(); @@ -47,4 +47,4 @@ pub fn log_init_(file_name:&str) -> io::Result<()> { Err(_) => {} } Ok(()) -} \ No newline at end of file +} diff --git a/switch-desktop/src/main.rs b/switch-desktop/src/main.rs index 6ec624e..c2881a6 100644 --- a/switch-desktop/src/main.rs +++ b/switch-desktop/src/main.rs @@ -91,8 +91,8 @@ pub struct StartArgs { #[cfg(any(unix))] #[arg(long)] off_command_server: bool, - /// 记录日志,输出在 home/.switch 目录下,长时间使用时不建议开启 - /// Output the log in the "home/.switch" directory + /// 记录日志,输出在 home/.switch_desktop 目录下,长时间使用时不建议开启 + /// Output the log in the "home/.switch_desktop" directory #[arg(long)] log: bool, } @@ -129,7 +129,7 @@ fn main() { windows::service::start(); return; } else { - let home = dirs::home_dir().unwrap().join(".switch"); + let home = dirs::home_dir().unwrap().join(".switch_desktop"); config::set_home(home); let args = BaseArgs::parse(); if let Commands::Start(start_args) = &args.command { @@ -143,7 +143,7 @@ fn main() { #[cfg(any(target_os = "linux", target_os = "macos"))] fn main() { - let home = dirs::home_dir().unwrap().join(".switch"); + let home = dirs::home_dir().unwrap().join(".switch_desktop"); config::set_home(home); let args = BaseArgs::parse(); if let Commands::Start(start_args) = &args.command { From f260c26e4f5a76f83aa7d196a6e75c5ac623d960 Mon Sep 17 00:00:00 2001 From: Droid-MAX Date: Wed, 26 Apr 2023 11:11:03 +0800 Subject: [PATCH 2/3] Update rust.yml --- .github/workflows/rust.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a8c2dcb..24053c5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -37,22 +37,20 @@ jobs: matrix: # a list of all the targets include: - - TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac + - TARGET: i686-unknown-linux-musl # test in an alpine container on a mac OS: ubuntu-latest - TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac OS: ubuntu-latest - - TARGET: aarch64-unknown-linux-gnu # tested on aws t4g.nano - OS: ubuntu-latest - TARGET: aarch64-unknown-linux-musl # tested on aws t4g.nano in alpine container OS: ubuntu-latest - - TARGET: armv7-unknown-linux-gnueabihf # raspberry pi 2-3-4, not tested - OS: ubuntu-latest - TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested OS: ubuntu-latest - - TARGET: arm-unknown-linux-gnueabihf # raspberry pi 0-1, not tested - OS: ubuntu-latest - TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested OS: ubuntu-latest + - TARGET: mips-unknown-linux-musl # raspberry pi 0-1, not tested + OS: ubuntu-latest + - TARGET: mipsel-unknown-linux-musl # raspberry pi 0-1, not tested + OS: ubuntu-latest - TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings OS: macos-latest - TARGET: x86_64-pc-windows-msvc # tested on a windows machine @@ -88,18 +86,16 @@ jobs: # some additional configuration for cross-compilation on linux cat >>~/.cargo/config < Date: Wed, 26 Apr 2023 11:27:02 +0800 Subject: [PATCH 3/3] Update rust.yml --- .github/workflows/rust.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 24053c5..e95ee26 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -47,10 +47,6 @@ jobs: OS: ubuntu-latest - TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested OS: ubuntu-latest - - TARGET: mips-unknown-linux-musl # raspberry pi 0-1, not tested - OS: ubuntu-latest - - TARGET: mipsel-unknown-linux-musl # raspberry pi 0-1, not tested - OS: ubuntu-latest - TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings OS: macos-latest - TARGET: x86_64-pc-windows-msvc # tested on a windows machine @@ -92,10 +88,6 @@ jobs: linker = "arm-linux-gnueabihf-gcc" [target.arm-unknown-linux-musleabihf] linker = "arm-linux-gnueabihf-gcc" - [target.mips-unknown-linux-musl] - linker = "mips-openwrt-linux-gcc" - [target.mipsel-unknown-linux-musl] - linker = "mipsel-openwrt-linux-gcc" EOF - name: Install rust target run: rustup target add $TARGET