Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -37,20 +37,14 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# a list of all the targets
|
# a list of all the targets
|
||||||
include:
|
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
|
OS: ubuntu-latest
|
||||||
- TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac
|
- TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac
|
||||||
OS: ubuntu-latest
|
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
|
- TARGET: aarch64-unknown-linux-musl # tested on aws t4g.nano in alpine container
|
||||||
OS: ubuntu-latest
|
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
|
- TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested
|
||||||
OS: ubuntu-latest
|
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
|
- TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested
|
||||||
OS: ubuntu-latest
|
OS: ubuntu-latest
|
||||||
- TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
|
- TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
|
||||||
@@ -88,16 +82,10 @@ jobs:
|
|||||||
|
|
||||||
# some additional configuration for cross-compilation on linux
|
# some additional configuration for cross-compilation on linux
|
||||||
cat >>~/.cargo/config <<EOF
|
cat >>~/.cargo/config <<EOF
|
||||||
[target.aarch64-unknown-linux-gnu]
|
|
||||||
linker = "aarch64-linux-gnu-gcc"
|
|
||||||
[target.aarch64-unknown-linux-musl]
|
[target.aarch64-unknown-linux-musl]
|
||||||
linker = "aarch64-linux-gnu-gcc"
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
[target.armv7-unknown-linux-gnueabihf]
|
|
||||||
linker = "arm-linux-gnueabihf-gcc"
|
|
||||||
[target.armv7-unknown-linux-musleabihf]
|
[target.armv7-unknown-linux-musleabihf]
|
||||||
linker = "arm-linux-gnueabihf-gcc"
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
[target.arm-unknown-linux-gnueabihf]
|
|
||||||
linker = "arm-linux-gnueabihf-gcc"
|
|
||||||
[target.arm-unknown-linux-musleabihf]
|
[target.arm-unknown-linux-musleabihf]
|
||||||
linker = "arm-linux-gnueabihf-gcc"
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ pub fn log_service_init() -> io::Result<()> {
|
|||||||
log_init_("switch-service.log")
|
log_init_("switch-service.log")
|
||||||
}
|
}
|
||||||
pub fn log_init() -> io::Result<()> {
|
pub fn log_init() -> io::Result<()> {
|
||||||
log_init_("switch.log")
|
log_init_("switch-desktop.log")
|
||||||
}
|
}
|
||||||
pub fn log_init_(file_name:&str) -> io::Result<()> {
|
pub fn log_init_(file_name:&str) -> io::Result<()> {
|
||||||
let home = SWITCH_HOME_PATH.lock().clone();
|
let home = SWITCH_HOME_PATH.lock().clone();
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ pub struct StartArgs {
|
|||||||
#[cfg(any(unix))]
|
#[cfg(any(unix))]
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
off_command_server: bool,
|
off_command_server: bool,
|
||||||
/// 记录日志,输出在 home/.switch 目录下,长时间使用时不建议开启
|
/// 记录日志,输出在 home/.switch_desktop 目录下,长时间使用时不建议开启
|
||||||
/// Output the log in the "home/.switch" directory
|
/// Output the log in the "home/.switch_desktop" directory
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
log: bool,
|
log: bool,
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ fn main() {
|
|||||||
windows::service::start();
|
windows::service::start();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
let home = dirs::home_dir().unwrap().join(".switch");
|
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
||||||
config::set_home(home);
|
config::set_home(home);
|
||||||
let args = BaseArgs::parse();
|
let args = BaseArgs::parse();
|
||||||
if let Commands::Start(start_args) = &args.command {
|
if let Commands::Start(start_args) = &args.command {
|
||||||
@@ -143,7 +143,7 @@ fn main() {
|
|||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||||
fn main() {
|
fn main() {
|
||||||
let home = dirs::home_dir().unwrap().join(".switch");
|
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
||||||
config::set_home(home);
|
config::set_home(home);
|
||||||
let args = BaseArgs::parse();
|
let args = BaseArgs::parse();
|
||||||
if let Commands::Start(start_args) = &args.command {
|
if let Commands::Start(start_args) = &args.command {
|
||||||
|
|||||||
Reference in New Issue
Block a user