Skip to content

Commit

Permalink
chore: up
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Jul 15, 2024
1 parent f3ba2a8 commit 52d46d8
Showing 1 changed file with 50 additions and 5 deletions.
55 changes: 50 additions & 5 deletions nyanpasu-utils/src/core/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,56 @@ pub enum CoreType {
impl CoreType {
pub fn get_executable_name(&self) -> &'static str {
match self {
CoreType::Clash(ClashCoreType::Mihomo) => "mihomo",
CoreType::Clash(ClashCoreType::MihomoAlpha) => "mihomo-alpha",
CoreType::Clash(ClashCoreType::ClashRust) => "clash-rust",
CoreType::Clash(ClashCoreType::ClashPremium) => "clash-premium",
CoreType::SingBox => "singbox",
CoreType::Clash(ClashCoreType::Mihomo) => {
#[cfg(target_os = "windows")]
{
"mihomo.exe"
}
#[cfg(not(target_os = "windows"))]
{
"mihomo"
}
},
CoreType::Clash(ClashCoreType::MihomoAlpha) => {
#[cfg(target_os = "windows")]
{
"mihomo-alpha.exe"
}
#[cfg(not(target_os = "windows"))]
{
"mihomo-alpha"
}
},
CoreType::Clash(ClashCoreType::ClashRust) => {
#[cfg(target_os = "windows")]
{
"clash-rust.exe"
}
#[cfg(not(target_os = "windows"))]
{
"clash-rust"
}
},
CoreType::Clash(ClashCoreType::ClashPremium) => {
#[cfg(target_os = "windows")]
{
"clash-premium.exe"
}
#[cfg(not(target_os = "windows"))]
{
"clash-premium"
}
},
CoreType::SingBox => {
#[cfg(target_os = "windows")]
{
"singbox.exe"
}
#[cfg(not(target_os = "windows"))]
{
"singbox"
}
},
}
}
}
Expand Down

0 comments on commit 52d46d8

Please sign in to comment.