Galaxy v1.0.0: Remove warp-channel-config, rebrand bins/icons/settings, remove teams from Drive
- Remove warp-channel-config dependency; all bin targets hardcode ChannelConfig inline - Rename bin targets: galaxy-oss, galaxy-local, galaxy-stable, galaxy-dev, galaxy-preview - Rename config dir from .galaxy-ai to .galaxy - Add Galaxy app icon (512x512 rounded PNG + SVG logo) - Replace settings gear icon with Stars (sparkle) icon - Remove lightbulb/resource center button from header toolbar - Add Galaxy logo SVG to Settings > About page - Rename Galaxify -> Galaxyize across all UI strings - Remove Create Team / Join Team sections from Galaxy Drive - Fix missing => in OpenRichInput match arms - Clean up unused imports and warnings - Update Cargo.toml bundle metadata with Samsung branding - Re-enable code review, project explorer, global search in settings
This commit is contained in:
@@ -1,101 +0,0 @@
|
||||
//! Tools for loading a [`ChannelConfig`] from the external config generator binary.
|
||||
//!
|
||||
//! For non-bundled builds, the generator is invoked at runtime. For bundled builds, the config
|
||||
//! is embedded at compile time via the build script.
|
||||
use galaxy_core::channel::ChannelConfig;
|
||||
|
||||
/// The name of the config generator binary, expected to be on PATH.
|
||||
const CONFIG_BIN_NAME: &str = "warp-channel-config";
|
||||
|
||||
#[macro_export]
|
||||
#[cfg(windows)]
|
||||
macro_rules! path_concat {
|
||||
($path:expr, $file:expr) => {
|
||||
concat!($path, "\\", $file)
|
||||
};
|
||||
}
|
||||
#[macro_export]
|
||||
#[cfg(not(windows))]
|
||||
macro_rules! path_concat {
|
||||
($path:expr, $file:expr) => {
|
||||
concat!($path, "/", $file)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! load_config {
|
||||
($channel:expr) => {{
|
||||
#[cfg(feature = "release_bundle")]
|
||||
{
|
||||
channel_config::load_config_from_embedded(include_str!($crate::path_concat!(
|
||||
env!("OUT_DIR"),
|
||||
concat!($channel, "_config.json")
|
||||
)))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "release_bundle"))]
|
||||
{
|
||||
channel_config::load_config_from_generator($channel)
|
||||
}
|
||||
}};
|
||||
}
|
||||
pub use load_config;
|
||||
|
||||
/// Invokes the config generator binary at runtime and deserializes its JSON output into a
|
||||
/// [`ChannelConfig`].
|
||||
#[cfg_attr(feature = "release_bundle", expect(dead_code))]
|
||||
pub fn load_config_from_generator(channel: &str) -> ChannelConfig {
|
||||
let target_family = if cfg!(target_family = "wasm") {
|
||||
"wasm"
|
||||
} else {
|
||||
"native"
|
||||
};
|
||||
|
||||
let target_os = if cfg!(target_os = "macos") {
|
||||
"macos"
|
||||
} else if cfg!(target_os = "windows") {
|
||||
"windows"
|
||||
} else {
|
||||
"linux"
|
||||
};
|
||||
|
||||
let output = command::blocking::Command::new(CONFIG_BIN_NAME)
|
||||
.arg("--channel")
|
||||
.arg(channel)
|
||||
.arg("--target-family")
|
||||
.arg(target_family)
|
||||
.arg("--target-os")
|
||||
.arg(target_os)
|
||||
.output()
|
||||
.unwrap_or_else(|err| {
|
||||
if err.kind() == std::io::ErrorKind::NotFound {
|
||||
panic!(
|
||||
"\n\n'{CONFIG_BIN_NAME}' was not found on PATH.\n\n\
|
||||
To build internal channels, run:\n\
|
||||
\n\
|
||||
\x20 ./script/install_channel_config\n\n"
|
||||
)
|
||||
}
|
||||
panic!("Failed to execute '{CONFIG_BIN_NAME}': {err}")
|
||||
});
|
||||
|
||||
if !output.status.success() {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
panic!("Config generator failed for channel '{channel}':\n{stderr}");
|
||||
}
|
||||
|
||||
serde_json::from_slice(&output.stdout).unwrap_or_else(|err| {
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
panic!("Failed to parse config generator output for channel '{channel}': {err}\nOutput:\n{stdout}")
|
||||
})
|
||||
}
|
||||
|
||||
/// Deserializes a [`ChannelConfig`] from a JSON string embedded at compile time.
|
||||
///
|
||||
/// This is used to load the channel configuration in release bundles, where configuration
|
||||
/// is embedded at compile time instead of being generated at runtime.
|
||||
#[cfg_attr(not(feature = "release_bundle"), expect(dead_code))]
|
||||
pub fn load_config_from_embedded(json: &str) -> ChannelConfig {
|
||||
serde_json::from_str(json)
|
||||
.unwrap_or_else(|err| panic!("Failed to parse embedded channel config: {err}"))
|
||||
}
|
||||
+18
-10
@@ -2,22 +2,30 @@
|
||||
// builds. See https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute.
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
#[path = "channel_config.rs"]
|
||||
mod channel_config;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelState},
|
||||
features,
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
|
||||
// Simple wrapper around galaxy::run() for dev channel builds.
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(
|
||||
ChannelState::new(Channel::Dev, channel_config::load_config!("dev"))
|
||||
.with_additional_features(features::DEBUG_FLAGS)
|
||||
.with_additional_features(features::DOGFOOD_FLAGS)
|
||||
.with_additional_features(features::PREVIEW_FLAGS),
|
||||
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),
|
||||
);
|
||||
|
||||
galaxy::run()
|
||||
|
||||
+20
-13
@@ -1,19 +1,26 @@
|
||||
#[path = "channel_config.rs"]
|
||||
mod channel_config;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelState},
|
||||
features,
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let config = 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);
|
||||
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);
|
||||
|
||||
// Enable sandbox telemetry feature flag if the env var is set.
|
||||
if std::env::var("WITH_SANDBOX_TELEMETRY").is_ok() {
|
||||
@@ -37,9 +44,9 @@ embed_plist::embed_info_plist_bytes!(r#"
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Galaxy</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>galaxy-ai</string>
|
||||
<string>galaxy-local</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.samsung.GalaxyAI-Local</string>
|
||||
<string>com.samsung.Galaxy-Local</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
+4
-4
@@ -12,8 +12,8 @@ fn main() -> Result<()> {
|
||||
let mut state = ChannelState::new(
|
||||
Channel::Oss,
|
||||
ChannelConfig {
|
||||
app_id: AppId::new("com", "samsung", "GalaxyAI"),
|
||||
logfile_name: "galaxy-ai.log".into(),
|
||||
app_id: AppId::new("com", "samsung", "Galaxy"),
|
||||
logfile_name: "galaxy.log".into(),
|
||||
server_config: WarpServerConfig::production(),
|
||||
oz_config: OzConfig::production(),
|
||||
telemetry_config: None,
|
||||
@@ -41,9 +41,9 @@ embed_plist::embed_info_plist_bytes!(r#"
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Galaxy</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>galaxy-ai-oss</string>
|
||||
<string>galaxy-oss</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.samsung.GalaxyAI</string>
|
||||
<string>com.samsung.Galaxy</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
+16
-9
@@ -2,21 +2,28 @@
|
||||
// builds. See https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute.
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
#[path = "channel_config.rs"]
|
||||
mod channel_config;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelState},
|
||||
features,
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
features, AppId,
|
||||
};
|
||||
|
||||
// Simple wrapper around galaxy::run() for feature preview channel builds.
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(
|
||||
ChannelState::new(Channel::Preview, channel_config::load_config!("preview"))
|
||||
.with_additional_features(features::PREVIEW_FLAGS)
|
||||
.with_additional_features(&[features::FeatureFlag::ForceLogin]),
|
||||
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,
|
||||
},
|
||||
)
|
||||
.with_additional_features(features::PREVIEW_FLAGS),
|
||||
);
|
||||
|
||||
galaxy::run()
|
||||
|
||||
+14
-6
@@ -2,17 +2,25 @@
|
||||
// builds. See https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute.
|
||||
#![cfg_attr(feature = "release_bundle", windows_subsystem = "windows")]
|
||||
|
||||
#[path = "channel_config.rs"]
|
||||
mod channel_config;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelConfig, ChannelState, OzConfig, WarpServerConfig},
|
||||
AppId,
|
||||
};
|
||||
|
||||
// Simple wrapper around galaxy::run() for stable channel builds.
|
||||
fn main() -> Result<()> {
|
||||
ChannelState::set(ChannelState::new(
|
||||
Channel::Stable,
|
||||
channel_config::load_config!("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,
|
||||
},
|
||||
));
|
||||
|
||||
galaxy::run()
|
||||
|
||||
Reference in New Issue
Block a user