first pass of merging in warp (doesn't build)
This commit is contained in:
+6
-20
@@ -3,29 +3,15 @@
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::features;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(
|
||||
ChannelState::new(
|
||||
Channel::Dev,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new("com", "samsung", "Galaxy-Dev"),
|
||||
logfile_name: "galaxy.log".into(),
|
||||
server_config: WarpServerConfig::production(),
|
||||
oz_config: OzConfig::production(),
|
||||
telemetry_config: None,
|
||||
crash_reporting_config: None,
|
||||
autoupdate_config: None,
|
||||
mcp_static_config: None,
|
||||
},
|
||||
)
|
||||
.with_additional_features(features::DEBUG_FLAGS)
|
||||
.with_additional_features(features::DOGFOOD_FLAGS)
|
||||
.with_additional_features(features::PREVIEW_FLAGS),
|
||||
ChannelState::new(Channel::Dev, warp_channel_config::load_config!("dev"))
|
||||
.with_additional_features(features::DEBUG_FLAGS)
|
||||
.with_additional_features(features::DOGFOOD_FLAGS)
|
||||
.with_additional_features(features::PREVIEW_FLAGS),
|
||||
);
|
||||
|
||||
galaxy::run()
|
||||
|
||||
@@ -10,10 +10,6 @@ use std::io::Write;
|
||||
|
||||
use schemars::SchemaGenerator;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
use galaxy_core::features::{
|
||||
FeatureFlag, DEBUG_FLAGS, DOGFOOD_FLAGS, PREVIEW_FLAGS, RELEASE_FLAGS,
|
||||
};
|
||||
use settings::schema::SettingSchemaEntry;
|
||||
|
||||
/// Ensures all `inventory::submit!` registrations from the app crate's
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use warp_cli::WorkerCommand;
|
||||
use galaxy_core::channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig};
|
||||
use galaxy_core::AppId;
|
||||
|
||||
#[derive(Debug, Default, Parser, Clone)]
|
||||
#[command(name = "warp-integration")]
|
||||
#[clap(args_conflicts_with_subcommands = true)]
|
||||
pub struct Args {
|
||||
#[command(subcommand)]
|
||||
command: Option<WorkerCommand>,
|
||||
}
|
||||
|
||||
pub fn main() -> Result<()> {
|
||||
ChannelState::set(ChannelState::new(
|
||||
Channel::Integration,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new(
|
||||
"dev",
|
||||
"warp",
|
||||
if cfg!(target_os = "macos") {
|
||||
"Warp-Integration"
|
||||
} else {
|
||||
"WarpIntegration"
|
||||
},
|
||||
),
|
||||
logfile_name: "warp_integration.log".into(),
|
||||
server_config: WarpServerConfig {
|
||||
firebase_auth_api_key: "".into(),
|
||||
// Use an IP in the IANA testing range, with the TCP discard port, to
|
||||
// black-hole server traffic.
|
||||
server_root_url: "http://192.0.2.0:9".into(),
|
||||
rtc_server_url: "ws://192.0.2.0:9/graphql/v2".into(),
|
||||
session_sharing_server_url: None,
|
||||
iap_config: None,
|
||||
},
|
||||
oz_config: OzConfig {
|
||||
// Use an IP in the IANA testing range, with the TCP discard port, to
|
||||
// black-hole server traffic.
|
||||
oz_root_url: "http://192.0.2.0:9".into(),
|
||||
workload_audience_url: None,
|
||||
},
|
||||
telemetry_config: None,
|
||||
crash_reporting_config: None,
|
||||
autoupdate_config: None,
|
||||
mcp_static_config: None,
|
||||
},
|
||||
));
|
||||
|
||||
let args = Args::parse();
|
||||
|
||||
if let Some(command) = &args.command {
|
||||
match command {
|
||||
#[cfg(unix)]
|
||||
WorkerCommand::TerminalServer(args) => {
|
||||
// If we were asked to run as a terminal server (as opposed to the main
|
||||
// GUI application), do so. This must occur before init_logging, as the
|
||||
// terminal server sets up its own logger, and attempting to set a second
|
||||
// logger leads to a panic.
|
||||
warp::terminal::local_tty::server::run_terminal_server(args);
|
||||
return Ok(());
|
||||
}
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
WorkerCommand::RemoteServerProxy(_) | WorkerCommand::RemoteServerDaemon(_) => {
|
||||
return warp::run();
|
||||
}
|
||||
// This is a catch-all to handle the plugin host, which the integration test crate doesn't have a feature flag for.
|
||||
#[allow(unreachable_patterns)]
|
||||
other => panic!("Worker not supported in integration tests: {other:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
warp::run()
|
||||
}
|
||||
+9
-20
@@ -1,26 +1,15 @@
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::features;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut state = ChannelState::new(
|
||||
Channel::Local,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new("com", "samsung", "Galaxy-Local"),
|
||||
logfile_name: "galaxy.log".into(),
|
||||
server_config: WarpServerConfig::production(),
|
||||
oz_config: OzConfig::production(),
|
||||
telemetry_config: None,
|
||||
crash_reporting_config: None,
|
||||
autoupdate_config: None,
|
||||
mcp_static_config: None,
|
||||
},
|
||||
)
|
||||
.with_additional_features(features::DEBUG_FLAGS)
|
||||
.with_additional_features(features::DOGFOOD_FLAGS)
|
||||
.with_additional_features(features::PREVIEW_FLAGS);
|
||||
let config = warp_channel_config::load_config!("local");
|
||||
|
||||
let mut state = ChannelState::new(Channel::Local, config)
|
||||
.with_additional_features(features::DEBUG_FLAGS)
|
||||
.with_additional_features(features::DOGFOOD_FLAGS)
|
||||
.with_additional_features(features::PREVIEW_FLAGS)
|
||||
.with_additional_features(features::LOCAL_FLAGS);
|
||||
|
||||
// Enable sandbox telemetry feature flag if the env var is set.
|
||||
if std::env::var("WITH_SANDBOX_TELEMETRY").is_ok() {
|
||||
|
||||
+2
-4
@@ -3,10 +3,8 @@
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
AppId,
|
||||
};
|
||||
use galaxy_core::channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig};
|
||||
use galaxy_core::AppId;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
+5
-15
@@ -3,27 +3,17 @@
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::features;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(
|
||||
ChannelState::new(
|
||||
Channel::Preview,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new("com", "samsung", "Galaxy-Preview"),
|
||||
logfile_name: "galaxy.log".into(),
|
||||
server_config: WarpServerConfig::production(),
|
||||
oz_config: OzConfig::production(),
|
||||
telemetry_config: None,
|
||||
crash_reporting_config: None,
|
||||
autoupdate_config: None,
|
||||
mcp_static_config: None,
|
||||
},
|
||||
warp_channel_config::load_config!("preview"),
|
||||
)
|
||||
.with_additional_features(features::PREVIEW_FLAGS),
|
||||
.with_additional_features(features::PREVIEW_FLAGS)
|
||||
.with_additional_features(&[features::FeatureFlag::ForceLogin]),
|
||||
);
|
||||
|
||||
galaxy::run()
|
||||
|
||||
+1
-10
@@ -11,16 +11,7 @@ use galaxy_core::{
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(ChannelState::new(
|
||||
Channel::Stable,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new("com", "samsung", "Galaxy"),
|
||||
logfile_name: "galaxy.log".into(),
|
||||
server_config: WarpServerConfig::production(),
|
||||
oz_config: OzConfig::production(),
|
||||
telemetry_config: None,
|
||||
crash_reporting_config: None,
|
||||
autoupdate_config: None,
|
||||
mcp_static_config: None,
|
||||
},
|
||||
warp_channel_config::load_config!("stable"),
|
||||
));
|
||||
|
||||
galaxy::run()
|
||||
|
||||
Reference in New Issue
Block a user