Warp to Galaxy internal rebrand

This commit is contained in:
2026-08-27 00:29:21 -05:00
parent d72874534d
commit a69b927cc3
108 changed files with 395 additions and 2098 deletions
+22 -81
View File
@@ -97,8 +97,8 @@ UNIVERSAL_BINARY=true
BUILD_BINARY=true
TARGET_ARCH=""
DMG_NAME_SUFFIX=""
# By default we build dev bundles.
RELEASE_CHANNEL="dev"
# Build the OSS bundle.
RELEASE_CHANNEL="oss"
FEATURES="release_bundle,cocoa_sentry,extern_plist"
REGISTER_SERVICES=true
DEBUG=false
@@ -184,7 +184,7 @@ while (( "$#" )); do
OPEN_AFTER_BUNDLE=true
shift
;;
# Specify the release channel (local, dev, preview, stable, oss)
# Specify the release channel (oss)
-c|--channel)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
RELEASE_CHANNEL=$2
@@ -246,21 +246,10 @@ eval set -- "$PARAMS"
# Infer a cargo profile from the bundle configuration.
if [[ $DEBUG = true ]]; then
CARGO_PROFILE="dev"
elif [[ $RELEASE_CHANNEL = "local" || $RELEASE_CHANNEL = "dev" ]]; then
# For dev bundles, we want to enable debug assertions to
# catch violations that would otherwise silently pass in
# a normal release build (e.g. in stable).
if [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
CARGO_PROFILE="release-cli-debug_assertions"
else
CARGO_PROFILE="release-lto-debug_assertions"
fi
elif [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
CARGO_PROFILE="release-cli"
else
if [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
CARGO_PROFILE="release-cli"
else
CARGO_PROFILE="release-lto"
fi
CARGO_PROFILE="release-lto"
fi
TARGET_PROFILE_DIR="$CARGO_PROFILE"
@@ -268,53 +257,13 @@ if [[ "$CARGO_PROFILE" == "dev" ]]; then
TARGET_PROFILE_DIR="debug"
fi
if [[ $RELEASE_CHANNEL = "local" ]]; then
WARP_BIN="galaxy-local"
BUNDLE_ID="com.samsung.Galaxy-Local"
WARP_APP_NAME="Galaxy Local"
WARP_SCHEME_NAME="galaxy"
FEATURES="$FEATURES,agent_mode_debug"
# For local builds, use different versions of our bundled frameworks (e.g.:
# Sentry). This needs to be exported so it can be referenced by
# app/build.rs later, while running `cargo bundle`.
export FRAMEWORK_OVERRIDE="dev"
elif [[ $RELEASE_CHANNEL = "dev" ]]; then
WARP_BIN="galaxy-dev"
BUNDLE_ID="com.samsung.Galaxy-Dev"
WARP_APP_NAME="Galaxy Dev"
WARP_SCHEME_NAME="galaxydev"
FEATURES="$FEATURES,agent_mode_debug"
# Enable heap usage tracking & profiling using jemalloc through pprof.
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
# For dev builds, use different versions of our bundled frameworks (e.g.:
# Sentry). This needs to be exported so it can be referenced by
# app/build.rs later, while running `cargo bundle`.
export FRAMEWORK_OVERRIDE="dev"
export HANDLE_MARKDOWN=1
elif [[ $RELEASE_CHANNEL = "preview" ]]; then
WARP_BIN="galaxy-preview"
BUNDLE_ID="com.samsung.Galaxy-Preview"
WARP_APP_NAME="Galaxy Preview"
WARP_SCHEME_NAME="galaxypreview"
FEATURES="$FEATURES,preview_channel"
# Enable heap usage tracking & profiling using jemalloc through pprof.
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
elif [[ $RELEASE_CHANNEL = "stable" ]]; then
WARP_BIN="stable"
BUNDLE_ID="com.samsung.Galaxy"
WARP_APP_NAME="Galaxy"
WARP_SCHEME_NAME="galaxy"
# Enable heap usage tracking & profiling using jemalloc through pprof.
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
WARP_BIN="galaxy-oss"
BUNDLE_ID="com.samsung.Galaxy"
WARP_APP_NAME="Galaxy"
WARP_SCHEME_NAME="galaxy"
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
# (which would otherwise pull in the Sentry framework dependency).
FEATURES="release_bundle,extern_plist"
fi
WARP_BIN="galaxy-oss"
BUNDLE_ID="com.galaxy.GalaxyOss"
WARP_APP_NAME="Galaxy"
WARP_SCHEME_NAME="galaxyoss"
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
# (which would otherwise pull in the Sentry framework dependency).
FEATURES="release_bundle,extern_plist"
OUT_DIR="target/$TARGET_PROFILE_DIR/bundle/osx"
DOCK_TILE_PLUGIN_NAME="GalaxyDockTilePlugin.docktileplugin"
@@ -347,6 +296,11 @@ else
fi
fi
if [[ "$RELEASE_CHANNEL" != "oss" ]]; then
echo "Error: only the oss release channel is supported" >&2
exit 1
fi
# Set artifact-specific configuration.
if [[ "$ARTIFACT" == cli ]]; then
UNIVERSAL_BINARY=false
@@ -539,15 +493,8 @@ if [[ "$ARTIFACT" == "app" ]]; then
"$WORKSPACE_ROOT_DIR/script/prepare_bundled_pprof" "$HELPERS_DIR"
fi
# Determine CLI wrapper script path based on release channel. Each channel's
# value here must match `Channel::cli_command_name` in the Rust source.
if [[ $RELEASE_CHANNEL = "stable" ]]; then
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai"
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-oss"
else
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-$RELEASE_CHANNEL"
fi
# Keep this name aligned with `Channel::cli_command_name` in the Rust source.
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-oss"
echo "Creating Resources/bin directory and CLI wrapper script..."
mkdir -p "$BUNDLED_RESOURCES_DIR/bin"
@@ -565,14 +512,8 @@ EOF
chmod +x "$CLI_SCRIPT_PATH"
if [[ ",$FEATURES," =~ ",galaxy_control_cli," ]]; then
# Each value must match `Channel::galaxyctrl_command_name` in the Rust source.
if [[ $RELEASE_CHANNEL = "stable" ]]; then
GALAXYCTRL_COMMAND_NAME="galaxyctrl"
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
GALAXYCTRL_COMMAND_NAME="galaxyctrl-oss"
else
GALAXYCTRL_COMMAND_NAME="galaxyctrl-$RELEASE_CHANNEL"
fi
# Keep this name aligned with `Channel::galaxyctrl_command_name` in the Rust source.
GALAXYCTRL_COMMAND_NAME="galaxyctrl-oss"
GALAXYCTRL_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/$GALAXYCTRL_COMMAND_NAME"
echo "Creating galaxyctrl wrapper script at $GALAXYCTRL_SCRIPT_PATH..."
"$WORKSPACE_ROOT_DIR/script/macos/create_galaxyctrl_wrapper" \
+10 -35
View File
@@ -4,11 +4,10 @@
# Galaxy as a real 'app' instead of a bare executable, so macOS can treat it
# like a real signed app (custom URL schemes, user notifications, etc.).
#
# This script is invoked by `./script/run`, which handles cross-platform
# setup (install_channel_config, binary name detection, feature-to-env-var
# mapping). The following env vars are expected to be set by the caller:
# WARP_BIN_NAME — "galaxy-local" or "galaxy-oss"
# WARP_CHANNEL — "local" or "oss"
# This script is invoked by `./script/run`; the caller supplies the OSS
# binary/channel values:
# WARP_BIN_NAME — "galaxy-oss"
# WARP_CHANNEL — "oss"
# FEATURES — comma-separated cargo features (already normalized)
# Must be called from the root directory of the Galaxy repository.
@@ -29,20 +28,15 @@ if [ -z "$TARGET_DIR" ] || [ "$TARGET_DIR" = "null" ]; then
TARGET_DIR="${REPO_ROOT}/target"
fi
if [ "$WARP_CHANNEL" = "local" ]; then
WARP_APP_PATH="${TARGET_DIR}/debug/bundle/osx/Galaxy Local.app"
WARP_SCHEME_NAME="galaxylocal"
else
WARP_APP_PATH="${TARGET_DIR}/debug/bundle/osx/Galaxy.app"
WARP_SCHEME_NAME="galaxyoss"
fi
WARP_APP_PATH="${TARGET_DIR}/debug/bundle/osx/Galaxy.app"
WARP_SCHEME_NAME="galaxyoss"
TARGET_PROFILE_DIR="debug"
DONT_OPEN=false
# Launches the binary with "open", meaning the Galaxy process is
# launched by the MacOS application launcher instead of a shell session.
# Note that since Galaxy isn't launched as a child process, using ctrl+c
# won't kill the app (but will kill the tail process displaying output).
# tl;dr better simulates running Galaxy Local/OSS
# tl;dr better simulates running Galaxy OSS
OPEN_WITH_LAUNCHD=false
# Arguments to pass directly to Galaxy (specified after --)
@@ -50,10 +44,6 @@ OPEN_WITH_LAUNCHD=false
# an application doesn't make sense.
WARP_ARGS=()
# Export this variable so it can be referenced by app/build.rs later when
# running `cargo bundle`.
export FRAMEWORK_OVERRIDE="dev"
PARAMS=""
while (( "$#" )); do
case "$1" in
@@ -69,11 +59,7 @@ while (( "$#" )); do
--release)
echo "Detected release build, pointing at release bundle under ${TARGET_DIR}/release/bundle"
TARGET_PROFILE_DIR="release"
if [ "$WARP_CHANNEL" = "local" ]; then
WARP_APP_PATH="${TARGET_DIR}/release/bundle/osx/Galaxy Local.app"
else
WARP_APP_PATH="${TARGET_DIR}/release/bundle/osx/Galaxy.app"
fi
WARP_APP_PATH="${TARGET_DIR}/release/bundle/osx/Galaxy.app"
PARAMS="$PARAMS $1"
shift
;;
@@ -81,11 +67,7 @@ while (( "$#" )); do
PROFILE="$2"
TARGET_PROFILE_DIR="$PROFILE"
shift 2
if [ "$WARP_CHANNEL" = "local" ]; then
WARP_APP_PATH="${TARGET_DIR}/${PROFILE}/bundle/osx/Galaxy Local.app"
else
WARP_APP_PATH="${TARGET_DIR}/${PROFILE}/bundle/osx/Galaxy.app"
fi
WARP_APP_PATH="${TARGET_DIR}/${PROFILE}/bundle/osx/Galaxy.app"
PARAMS="$PARAMS --profile $PROFILE"
;;
--open_with_launchd)
@@ -171,14 +153,7 @@ if [ "$DONT_OPEN" = false ] ; then
if [ "$OPEN_WITH_LAUNCHD" = true ]; then
echo "Launching with MacOS application launcher"
PATH="" /usr/bin/open "$WARP_APP_PATH"
if [ "$WARP_CHANNEL" = "local" ]; then
LOG_FILE=~/Library/Logs/warp_local.log
elif [ "$WARP_CHANNEL" = "oss" ]; then
LOG_FILE=~/Library/Logs/warp-oss.log
else
echo "Warning: unrecognized WARP_CHANNEL '$WARP_CHANNEL', defaulting to OSS log path" >&2
LOG_FILE=~/Library/Logs/warp-oss.log
fi
LOG_FILE=~/Library/Logs/warp-oss.log
tail -F "$LOG_FILE"
else
echo "Opening app at $WARP_APP_PATH/Contents/MacOS/$WARP_BIN_NAME"
+5 -5
View File
@@ -6,10 +6,10 @@ workspace_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
temp_dir="$(mktemp -d)"
trap 'rm -rf "$temp_dir"' EXIT
bundle_dir="$temp_dir/GalaxyDev.app/Contents"
wrapper_path="$bundle_dir/Resources/bin/galaxyctrl-dev"
binary_path="$bundle_dir/MacOS/galaxy-dev"
installed_path="$temp_dir/usr/local/bin/galaxyctrl-dev"
bundle_dir="$temp_dir/Galaxy.app/Contents"
wrapper_path="$bundle_dir/Resources/bin/galaxyctrl-oss"
binary_path="$bundle_dir/MacOS/galaxy-oss"
installed_path="$temp_dir/usr/local/bin/galaxyctrl-oss"
forwarded_args_file="$temp_dir/forwarded-args"
expected_args_file="$temp_dir/expected-args"
@@ -22,7 +22,7 @@ chmod +x "$binary_path"
"$workspace_root/script/macos/create_galaxyctrl_wrapper" \
"$wrapper_path" \
"../../MacOS/galaxy-dev"
"../../MacOS/galaxy-oss"
cat > "$expected_args_file" << 'EOF'
--galaxyctrl