use super::*;
impl NativePlatform {
pub fn platform_name(self) -> &'static str {
match self {
NativePlatform::Macos => PLATFORM_MACOS,
NativePlatform::Linux => PLATFORM_LINUX,
NativePlatform::Windows => PLATFORM_WINDOWS,
NativePlatform::Ios => PLATFORM_IOS,
NativePlatform::IosSimulator => PLATFORM_IOS_SIMULATOR,
NativePlatform::Android => PLATFORM_ANDROID,
}
}
pub fn required_host(self) -> &'static str {
match self {
NativePlatform::Macos => HOST_MACOS,
NativePlatform::Linux => HOST_LINUX,
NativePlatform::Windows => HOST_WINDOWS,
NativePlatform::Ios => HOST_MACOS,
NativePlatform::IosSimulator => HOST_MACOS,
NativePlatform::Android => "macos or linux",
}
}
}
impl HostOs {
pub fn host_name(self) -> &'static str {
match self {
HostOs::Macos => HOST_MACOS,
HostOs::Linux => HOST_LINUX,
HostOs::Windows => HOST_WINDOWS,
HostOs::Unsupported => HOST_UNSUPPORTED,
}
}
}
impl NativeTask {
pub fn task_name(self) -> &'static str {
match self {
NativeTask::Android => "android builder",
NativeTask::Client => "client builder",
}
}
}