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
+10 -10
View File
@@ -3,36 +3,36 @@
# Compile a .icon bundle using actool and update the app's Info.plist
# to support macOS Sequoia's icon tinting feature.
#
# Usage: compile_icon <channel> <app_bundle_path>
# channel: The release channel (e.g., stable)
# app_bundle_path: Path to the .app bundle (e.g., Warp.app)
# Usage: compile_icon oss <app_bundle_path>
# app_bundle_path: Path to the Galaxy.app bundle
set -e
if [ "$#" -ne 2 ]; then
echo "Usage: compile_icon <channel> <app_bundle_path>"
echo "Usage: compile_icon oss <app_bundle_path>"
exit 1
fi
CHANNEL="$1"
APP_BUNDLE_PATH="$2"
if [[ "$CHANNEL" != "oss" ]]; then
echo "Error: only the oss release channel is supported" >&2
exit 1
fi
# Determine the repository root directory
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ICON_BUNDLE_PATH="$REPO_ROOT/app/channels/$CHANNEL/icon/AppIcon.icon"
# Only compile if the .icon bundle exists for this channel.
# Only compile the OSS .icon bundle.
if [[ ! -d "$ICON_BUNDLE_PATH" ]]; then
if [[ "$CHANNEL" = "oss" ]]; then
echo "Warning: no .icon bundle found for $CHANNEL channel at $ICON_BUNDLE_PATH; skipping adaptive icon compilation." >&2
exit 0
fi
echo "Error: .icon bundle not found at $ICON_BUNDLE_PATH" >&2
exit 1
fi
echo "Compiling .icon bundle for $CHANNEL channel"
echo "Compiling Galaxy OSS .icon bundle"
BUNDLED_RESOURCES_DIR="$APP_BUNDLE_PATH/Contents/Resources"
PARTIAL_INFO_PLIST="$(dirname "$APP_BUNDLE_PATH")/partial-icon-info.plist"
+7 -76
View File
@@ -6,14 +6,10 @@
# copy_conditional_skills <channel> <gated_skills_src> <dest_skills_dir>
#
# Arguments:
# channel: Release channel (local, dev, preview, stable).
# channel: Release channel (oss or integration).
# gated_skills_src: Path to resources/channel-gated-skills/.
# dest_skills_dir: Destination skills directory (e.g. .../bundled/skills/).
#
# Gating is progressive: earlier gates include all skills from later gates.
# For example, a dogfood build includes skills from both dogfood/ and
# preview/. The stable channel has no gate — stable-ready skills belong
# in resources/bundled/skills/ (the always-bundled directory).
set -e
@@ -26,83 +22,18 @@ CHANNEL="$1"
GATED_SKILLS_SRC="$2"
DEST_SKILLS_DIR="$3"
# Gate labels ordered from most-inclusive to least-inclusive.
# A channel's gate includes all gates at or after its position.
GATE_ORDER=("dogfood" "preview")
if [ ! -d "$GATED_SKILLS_SRC" ]; then
exit 0
fi
# Error out if a stable/ gate directory exists — stable skills should live
# in the always-bundled resources/bundled/skills/ directory instead.
if [ -d "$GATED_SKILLS_SRC/stable" ]; then
echo "Error: found a 'stable/' directory in $GATED_SKILLS_SRC." >&2
echo "The stable channel does not use gated skills. Move stable-ready skills to resources/bundled/skills/ (the always-bundled directory) instead." >&2
exit 1
fi
# Map the release channel to its gate label.
# OSS and integration bundles have no gated skills.
case "$CHANNEL" in
local|dev) GATE="dogfood" ;;
preview) GATE="preview" ;;
*)
oss|integration)
echo " Channel '$CHANNEL' has no gated skills, skipping"
exit 0
;;
*)
echo "Error: unsupported release channel '$CHANNEL'" >&2
exit 1
;;
esac
# Build the set of included gates (progressive: this gate and all after it).
INCLUDED_GATES=()
FOUND=false
for g in "${GATE_ORDER[@]}"; do
if [ "$g" = "$GATE" ]; then
FOUND=true
fi
if [ "$FOUND" = true ]; then
INCLUDED_GATES+=("$g")
fi
done
# Helper: check if a value is in the included gates list.
is_included() {
local needle="$1"
for g in "${INCLUDED_GATES[@]}"; do
if [ "$g" = "$needle" ]; then
return 0
fi
done
return 1
}
# Iterate over gate directories and copy matching skills.
for gate_dir in "$GATED_SKILLS_SRC"/*/; do
# Skip if the glob didn't match anything.
[ -d "$gate_dir" ] || continue
gate_name="$(basename "$gate_dir")"
if ! is_included "$gate_name"; then
# List the skills that would have been included for the skip message.
skills=""
for skill_dir in "$gate_dir"/*/; do
[ -d "$skill_dir" ] || continue
if [ -n "$skills" ]; then
skills="$skills, "
fi
skills="$skills$(basename "$skill_dir")"
done
echo " Skipping gate '$gate_name' (channel '$CHANNEL') — would include: $skills"
continue
fi
for skill_dir in "$gate_dir"/*/; do
[ -d "$skill_dir" ] || continue
skill_name="$(basename "$skill_dir")"
dest="$DEST_SKILLS_DIR/$skill_name"
echo " Copying gated skill: $skill_name (gate: $gate_name)"
mkdir -p "$dest"
cp -R "$skill_dir"/. "$dest"/
done
done
-4
View File
@@ -14,10 +14,6 @@ if [ "${GITHUB_ACTIONS}" != "true" ]; then
cargo binstall --force -y diesel_cli
fi
# Install the internal channel config binary. This will fail gracefully for
# external contributors who don't have access to the private configuration.
"$PWD"/script/install_channel_config || echo "Skipping internal channel config installation (no repo access)."
if [ "$(uname -s)" = "Darwin" ]; then
"$PWD"/script/macos/install_build_deps
fi
-28
View File
@@ -1,28 +0,0 @@
#!/usr/bin/env bash
#
# Installs the warp_channel_config binary at a pinned revision.
#
# This script acts as a lockfile: the REVISION variable pins the exact version
# of the config binary to the code that reads its output. Update REVISION when
# the config binary changes.
#
# Usage:
# ./script/install_channel_config # install if not already at pinned rev
# ./script/install_channel_config --force # force reinstall
REPO="ssh://git@github.com/warpdotdev/warp-channel-config.git"
REVISION="97a199b5bba11af9c7d3bd43dfb3669316d1f0f8"
BIN_NAME="warp-channel-config"
# Check for repo access before attempting to `cargo install` the binary.
if ! git ls-remote --exit-code "${REPO}" HEAD >/dev/null 2>&1; then
echo "Cannot access ${REPO} (no SSH access?). Skipping install."
exit 1
fi
FORCE_FLAG=""
if [ "${1:-}" = "--force" ]; then
FORCE_FLAG="--force"
fi
cargo install ${FORCE_FLAG} --git "${REPO}" --rev "${REVISION}" --bin "${BIN_NAME}"
+17 -69
View File
@@ -17,8 +17,8 @@ cleanup() {
# Run cleanup() when the script terminates (whether it succeeded or failed).
trap cleanup EXIT
# By default we build dev bundles.
RELEASE_CHANNEL="dev"
# Build the OSS bundle.
RELEASE_CHANNEL="oss"
FEATURES="release_bundle"
EXTRA_FEATURES=""
PACKAGES=( appimage )
@@ -140,21 +140,10 @@ DIST_DIR="$CARGO_TARGET_OUTPUT_ROOT/dist"
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
if [[ "$CARGO_PROFILE" == "dev" ]]; then
@@ -168,54 +157,20 @@ fi
OUT_DIR="$CARGO_TARGET_OUTPUT_DIR/bundle/linux"
mkdir -p "$OUT_DIR"
# Update parameters based on the target release channel.
#
# APP_NAME here must match the value used in Rust as the
# application name; see app/src/channel.rs.
#
# GALAXY_BIN is the name of the binary produced by cargo;
# BINARY_NAME is the desired name of the binary in the final package.
if [[ $RELEASE_CHANNEL = "local" ]]; then
GALAXY_BIN="galaxy-local"
BINARY_NAME="galaxy-local"
APP_NAME="GalaxyLocal"
FEATURES="$FEATURES,agent_mode_debug"
export HANDLE_MARKDOWN=1
elif [[ $RELEASE_CHANNEL = "dev" ]]; then
GALAXY_BIN="galaxy-dev"
BINARY_NAME="galaxy-dev"
APP_NAME="GalaxyDev"
FEATURES="$FEATURES,agent_mode_debug"
# Enable heap usage tracking & profiling using jemalloc through pprof.
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
export HANDLE_MARKDOWN=1
elif [[ $RELEASE_CHANNEL = "preview" ]]; then
GALAXY_BIN="galaxy-preview"
BINARY_NAME="galaxy-preview"
APP_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
GALAXY_BIN="stable"
BINARY_NAME="galaxy"
APP_NAME="Galaxy"
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
GALAXY_BIN="galaxy-oss"
BINARY_NAME="galaxy-oss"
APP_NAME="GalaxyOss"
if [[ "$RELEASE_CHANNEL" != "oss" ]]; then
echo "Error: only the oss release channel is supported" >&2
exit 1
fi
# OSS is the only supported release channel.
GALAXY_BIN="galaxy-oss"
BINARY_NAME="galaxy-oss"
APP_NAME="GalaxyOss"
# Artifact-specific binary naming
if [[ "$ARTIFACT" == "cli" ]]; then
# Keep packaged CLI names aligned with `Channel::cli_command_name`.
case "$RELEASE_CHANNEL" in
stable) BINARY_NAME="galaxy-ai" ;;
preview) BINARY_NAME="galaxy-ai-preview" ;;
dev) BINARY_NAME="galaxy-ai-dev" ;;
local) BINARY_NAME="galaxy-ai-local" ;;
oss) BINARY_NAME="galaxy-ai-oss" ;;
esac
BINARY_NAME="galaxy-ai-oss"
elif [[ "$ARTIFACT" == "galaxyctrl" ]]; then
BINARY_NAME="galaxyctrl"
PACKAGES=()
@@ -235,7 +190,7 @@ if [[ -n "$EXTRA_FEATURES" ]]; then
FEATURES="$FEATURES,$EXTRA_FEATURES"
fi
BUNDLE_ID="dev.galaxy.$APP_NAME"
BUNDLE_ID="com.galaxy.GalaxyOss"
EXECUTABLE_PATH="$CARGO_TARGET_OUTPUT_DIR/$GALAXY_BIN"
DEBUG_EXECUTABLE_PATH="$EXECUTABLE_PATH.debug"
@@ -261,15 +216,8 @@ if [[ "$BUILD" == "true" ]]; then
cp "$EXECUTABLE_PATH" "$DEBUG_EXECUTABLE_PATH"
echo "Stripping debug symbols from '$EXECUTABLE_PATH'"
if [[ $RELEASE_CHANNEL = "dev" ]]; then
# For dev builds, only strip debug symbols, as we want to keep some
# symbols for profiling purposes.
"${WARP_MUSL_STRIP:-strip}" --strip-debug "$EXECUTABLE_PATH"
else
# For production builds, strip all symbols, to keep the binary size
# smaller.
"${WARP_MUSL_STRIP:-strip}" --strip-all "$EXECUTABLE_PATH"
fi
# Strip all symbols to keep the shipped OSS binary small.
"${WARP_MUSL_STRIP:-strip}" --strip-all "$EXECUTABLE_PATH"
else
echo 'Skipping `cargo build` step due to --skip-build argument'
fi
+2 -2
View File
@@ -7,8 +7,8 @@
# - DIST_DIR: A temporary directory we can use for staging files as we build the package.
# - OUT_DIR: The directory into which we should place the final package.
# - CARGO_TARGET_OUTPUT_DIR: The cargo target directory containing build output.
# - RELEASE_CHANNEL: The release channel we're bundling (e.g.: "dev").
# - BUNDLE_ID: The app ID for the bundle (e.g.: "dev.galaxy.GalaxyDev").
# - RELEASE_CHANNEL: The release channel we're bundling ("oss").
# - BUNDLE_ID: The app ID for the bundle ("com.galaxy.GalaxyOss").
# - EXECUTABLE_PATH: The path to the compiled executable we want to install.
# - BINARY_NAME: The name that the compiled executable should have on the target machine.
# - APPIMAGE_NAME: The name of the AppImage file to produce.
+2 -2
View File
@@ -7,8 +7,8 @@
# - DIST_DIR: A temporary directory we can use for staging files as we build the package.
# - OUT_DIR: The directory into which we should place the final package.
# - CARGO_TARGET_OUTPUT_DIR: The cargo target directory containing build output.
# - RELEASE_CHANNEL: The release channel we're bundling (e.g.: "dev").
# - BUNDLE_ID: The app ID for the bundle (e.g.: "dev.galaxy.GalaxyDev").
# - RELEASE_CHANNEL: The release channel we're bundling ("oss").
# - BUNDLE_ID: The app ID for the bundle ("com.galaxy.GalaxyOss").
# - EXECUTABLE_PATH: The path to the compiled executable we want to install.
# - BINARY_NAME: The name that the compiled executable should have on the target machine.
# - ARTIFACT: Which artifact to build: app or cli.
+2 -11
View File
@@ -7,8 +7,8 @@
# - DIST_DIR: A temporary directory we can use for staging files as we build the package.
# - OUT_DIR: The directory into which we should place the final package.
# - CARGO_TARGET_OUTPUT_DIR: The cargo target directory containing build output.
# - RELEASE_CHANNEL: The release channel we're bundling (e.g.: "dev").
# - BUNDLE_ID: The app ID for the bundle (e.g.: "dev.galaxy.GalaxyDev").
# - RELEASE_CHANNEL: The release channel we're bundling ("oss").
# - BUNDLE_ID: The app ID for the bundle ("com.galaxy.GalaxyOss").
# - EXECUTABLE_PATH: The path to the compiled executable we want to install.
# - BINARY_NAME: The name that the compiled executable should have on the target machine.
# - ARTIFACT: Which artifact to build: app or cli.
@@ -18,15 +18,6 @@ set -e
source "$WORKSPACE_ROOT_DIR/script/linux/package_metadata"
TEMPLATE_DIR="$WORKSPACE_ROOT_DIR/resources/linux/debian/$ARTIFACT"
# Add a simple test to make sure we're generating the appropriate repository
# name for the stable channel.
if [ "$RELEASE_CHANNEL" = "stable" ]; then
if [ "$REPO_NAME" != "warpdotdev" ]; then
echo "::error ::Unexpected repo name for $RELEASE_CHANNEL channel: $REPO_NAME (expected \"warpdotdev\")"
exit 1
fi
fi
BUILD_ARCH="${BUILD_ARCH:-$(uname -m)}"
if [ "$BUILD_ARCH" = "aarch64" ]; then
ARCH="arm64"
+4 -4
View File
@@ -8,8 +8,8 @@
# - WORKSPACE_ROOT_DIR: The root directory of the Cargo workspace.
# - CARGO_TARGET_OUTPUT_DIR: The cargo target directory containing build output.
# - OPT_DIR: The absolute path to our install directory (under /opt) on the target machine.
# - RELEASE_CHANNEL: The release channel we're bundling (e.g.: "dev").
# - BUNDLE_ID: The app ID for the bundle (e.g.: "dev.galaxy.GalaxyDev").
# - RELEASE_CHANNEL: The release channel we're bundling ("oss").
# - BUNDLE_ID: The app ID for the bundle ("com.galaxy.GalaxyOss").
# - EXECUTABLE_PATH: The path to the compiled executable we want to install.
# - BINARY_NAME: The name that the compiled executable should have on the target machine.
# - ARTIFACT: Which artifact to build: app or cli.
@@ -52,9 +52,9 @@ EOF
"${TARGET_DIR}/usr/bin/$GALAXY_AI_COMMAND_NAME" \
"${TARGET_DIR}/usr/bin/$GALAXY_CONTROL_COMMAND_NAME"
install -Dm644 "$WORKSPACE_ROOT_DIR/app/channels/$RELEASE_CHANNEL/$BUNDLE_ID.desktop" "${TARGET_DIR}/usr/share/applications/$BUNDLE_ID.desktop"
install -Dm644 "$WORKSPACE_ROOT_DIR/app/channels/oss/$BUNDLE_ID.desktop" "${TARGET_DIR}/usr/share/applications/$BUNDLE_ID.desktop"
for size in 16x16 32x32 64x64 128x128 256x256 512x512; do
src_path="$WORKSPACE_ROOT_DIR/app/channels/$RELEASE_CHANNEL/icon/no-padding/$size.png"
src_path="$WORKSPACE_ROOT_DIR/app/channels/oss/icon/no-padding/$size.png"
if [[ -f "$src_path" ]]; then
install -Dm644 "$src_path" "${TARGET_DIR}/usr/share/icons/hicolor/$size/apps/$BUNDLE_ID.png"
fi
+2 -2
View File
@@ -7,8 +7,8 @@
# - DIST_DIR: A temporary directory we can use for staging files as we build the package.
# - OUT_DIR: The directory into which we should place the final package.
# - CARGO_TARGET_OUTPUT_DIR: The cargo target directory containing build output.
# - RELEASE_CHANNEL: The release channel we're bundling (e.g.: "dev").
# - BUNDLE_ID: The app ID for the bundle (e.g.: "dev.galaxy.GalaxyDev").
# - RELEASE_CHANNEL: The release channel we're bundling ("oss").
# - BUNDLE_ID: The app ID for the bundle ("com.galaxy.GalaxyOss").
# - EXECUTABLE_PATH: The path to the compiled executable we want to install.
# - BINARY_NAME: The name that the compiled executable should have on the target machine.
# - ARTIFACT: Which artifact to build: app or cli.
+2 -2
View File
@@ -12,8 +12,8 @@
# as installing a .deb or .rpm package.
#
# Required environment variables:
# WARP_BINARY_NAME: Name of the binary (e.g. "galaxy-dev").
# WARP_PACKAGE_NAME: Package directory name (e.g. "galaxy-terminal-dev").
# WARP_BINARY_NAME: Name of the binary (e.g. "galaxy-oss").
# WARP_PACKAGE_NAME: Package directory name (e.g. "galaxy-oss").
# WARP_BUNDLED_RESOURCES_DIR: Path to the staged resources directory to copy.
set -e
+8 -21
View File
@@ -3,32 +3,19 @@
# Derives Linux package metadata from Galaxy's release channel and artifact.
# This file is sourced by the individual package builders.
case "$RELEASE_CHANNEL" in
stable)
CHANNEL_SUFFIX=""
;;
local|dev|preview|oss)
CHANNEL_SUFFIX="-$RELEASE_CHANNEL"
;;
*)
echo "::error ::Unknown RELEASE_CHANNEL: $RELEASE_CHANNEL" >&2
return 1
;;
esac
if [[ "$RELEASE_CHANNEL" != "oss" ]]; then
echo "::error ::Only the oss release channel is supported" >&2
return 1
fi
CHANNEL_SUFFIX="-oss"
GALAXY_AI_COMMAND_NAME="galaxy-ai$CHANNEL_SUFFIX"
GALAXY_CONTROL_COMMAND_NAME="galaxyctrl$CHANNEL_SUFFIX"
case "$ARTIFACT" in
app)
# The OSS desktop entry invokes the Cargo binary directly. Other channels
# expose the traditional `*-terminal` launcher independently of the Cargo
# binary name.
if [[ "$RELEASE_CHANNEL" == "oss" ]]; then
PACKAGE_NAME="galaxy-oss"
else
PACKAGE_NAME="galaxy-terminal$CHANNEL_SUFFIX"
fi
PACKAGE_NAME="galaxy-oss"
;;
cli)
PACKAGE_NAME="galaxy-ai$CHANNEL_SUFFIX"
@@ -41,4 +28,4 @@ esac
# Repository provisioning still uses the existing release infrastructure and
# templates. This name is intentionally independent of Galaxy package names.
REPO_NAME="warpdotdev$CHANNEL_SUFFIX"
REPO_NAME="galaxy-oss"
+5 -5
View File
@@ -49,16 +49,16 @@ PATH="$temp_dir/bin:$PATH" \
grep -qx -- '--features' "$temp_dir/cargo-args"
grep -qx -- 'galaxy' "$temp_dir/cargo-args"
grep -qx -- 'galaxy-dev' "$temp_dir/cargo-args"
grep -qx -- 'release_bundle,agent_mode_debug,jemalloc_pprof,heap_usage_tracking,standalone,galaxy_control_cli,smoke_feature' "$temp_dir/cargo-args"
grep -qx -- 'galaxy-oss' "$temp_dir/cargo-args"
grep -qx -- 'release_bundle,standalone,galaxy_control_cli,smoke_feature' "$temp_dir/cargo-args"
profile_dir="$temp_dir/target/$target/release-cli-debug_assertions"
profile_dir="$temp_dir/target/$target/release-cli"
mkdir -p "$profile_dir"
cat > "$profile_dir/galaxy-dev" <<'EOF'
cat > "$profile_dir/galaxy-oss" <<'EOF'
#!/usr/bin/env bash
printf '%s\n' "$@" > "$FORWARDED_ARGS_FILE"
EOF
chmod +x "$profile_dir/galaxy-dev"
chmod +x "$profile_dir/galaxy-oss"
PATH="$temp_dir/bin:$PATH" \
CARGO_TARGET_DIR="$temp_dir/target" \
+18 -30
View File
@@ -19,32 +19,20 @@ assert_metadata() {
[[ "$GALAXY_CONTROL_COMMAND_NAME" == "galaxyctrl$expected_suffix" ]]
}
assert_metadata app stable "" galaxy-terminal
assert_metadata app local -local galaxy-terminal-local
assert_metadata app dev -dev galaxy-terminal-dev
assert_metadata app preview -preview galaxy-terminal-preview
assert_metadata app oss -oss galaxy-oss
assert_metadata cli stable "" galaxy-ai
assert_metadata cli local -local galaxy-ai-local
assert_metadata cli dev -dev galaxy-ai-dev
assert_metadata cli preview -preview galaxy-ai-preview
assert_metadata cli oss -oss galaxy-ai-oss
assert_desktop_launcher() {
local channel="$1"
local app_name="$2"
local expected_launcher="$3"
local desktop_file="$workspace_root/app/channels/$channel/dev.galaxy.$app_name.desktop"
local desktop_file
desktop_file="$workspace_root/app/channels/oss/com.galaxy.$app_name.desktop"
[[ -f "$desktop_file" ]]
grep -qx -- "Exec=$expected_launcher %U" "$desktop_file"
}
assert_desktop_launcher stable Galaxy galaxy-terminal
assert_desktop_launcher local GalaxyLocal galaxy-terminal-local
assert_desktop_launcher dev GalaxyDev galaxy-terminal-dev
assert_desktop_launcher preview GalaxyPreview galaxy-terminal-preview
assert_desktop_launcher oss GalaxyOss galaxy-oss
grep -qx -- 'Package: @@PACKAGE_NAME@@' \
@@ -68,7 +56,7 @@ stage_dir="$temp_dir/stage"
mkdir -p \
"$fake_workspace/bin" \
"$fake_workspace/script/linux" \
"$fake_workspace/app/channels/dev" \
"$fake_workspace/app/channels/oss" \
"$stage_dir"
ln -s \
"$workspace_root/script/linux/package_metadata" \
@@ -90,29 +78,29 @@ mkdir -p "$(dirname "${paths[1]}")"
cp "${paths[0]}" "${paths[1]}"
EOF
chmod +x "$fake_workspace/bin/install"
cat > "$fake_workspace/app/channels/dev/dev.galaxy.GalaxyDev.desktop" <<'EOF'
cat > "$fake_workspace/app/channels/oss/com.galaxy.GalaxyOss.desktop" <<'EOF'
[Desktop Entry]
Name=Galaxy Dev
Exec=galaxy-terminal-dev %U
Name=GalaxyOss
Exec=galaxy-oss %U
EOF
cat > "$temp_dir/galaxy-dev" <<'EOF'
cat > "$temp_dir/galaxy-oss" <<'EOF'
#!/usr/bin/env bash
exit 0
EOF
chmod +x "$temp_dir/galaxy-dev"
chmod +x "$temp_dir/galaxy-oss"
PATH="$fake_workspace/bin:$PATH" \
WORKSPACE_ROOT_DIR="$fake_workspace" \
RELEASE_CHANNEL=dev \
RELEASE_CHANNEL=oss \
ARTIFACT=app \
BUNDLE_ID=dev.galaxy.GalaxyDev \
EXECUTABLE_PATH="$temp_dir/galaxy-dev" \
BINARY_NAME=galaxy-dev \
OPT_DIR=/opt/warpdotdev/galaxy-terminal-dev \
CARGO_PROFILE=dev \
BUNDLE_ID=com.galaxy.GalaxyOss \
EXECUTABLE_PATH="$temp_dir/galaxy-oss" \
BINARY_NAME=galaxy-oss \
OPT_DIR=/opt/warpdotdev/galaxy-oss \
CARGO_PROFILE=release \
"$workspace_root/script/linux/bundle_install" "$stage_dir"
grep -Fq 'exec -a "$0" "/opt/warpdotdev/galaxy-terminal-dev/galaxy-dev" "$@"' \
"$stage_dir/usr/bin/galaxy-ai-dev"
grep -Fq 'exec -a "$0" "/opt/warpdotdev/galaxy-terminal-dev/galaxy-dev" --galaxyctrl "$@"' \
"$stage_dir/usr/bin/galaxyctrl-dev"
grep -Fq 'exec -a "$0" "/opt/warpdotdev/galaxy-oss/galaxy-oss" "$@"' \
"$stage_dir/usr/bin/galaxy-ai-oss"
grep -Fq 'exec -a "$0" "/opt/warpdotdev/galaxy-oss/galaxy-oss" --galaxyctrl "$@"' \
"$stage_dir/usr/bin/galaxyctrl-oss"
+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
+9 -7
View File
@@ -12,8 +12,8 @@
# destination_directory: The directory where resources should be installed.
# Resources will be copied to subdirectories within
# this path (e.g., $DEST_DIR/skills).
# channel: (Optional) Release channel (local, dev, preview,
# stable). Used to include channel-gated skills.
# channel: (Optional) Release channel. OSS has no gated skills;
# integration remains supported for test bundles.
# cargo_profile: (Optional) Cargo build profile to use when
# generating the settings schema. Reusing the same
# profile as the main build avoids recompiling deps.
@@ -86,10 +86,15 @@ if [ -n "$GIT_RELEASE_TAG" ]; then
printf '{\n "warp_version": "%s"\n}\n' "$GIT_RELEASE_TAG" > "$VERSION_METADATA_PATH"
fi
# Copy channel-gated skills matching the current release channel.
# OSS and integration bundles do not consume channel-gated skills.
GATED_SRC="$REPO_ROOT/resources/channel-gated-skills"
DEST_SKILLS="$DEST_DIR/bundled/skills"
if [ -n "$CHANNEL" ] && [[ "$CHANNEL" != "oss" && "$CHANNEL" != "integration" ]]; then
echo "Error: unsupported release channel '$CHANNEL'" >&2
exit 1
fi
if [ -n "$CHANNEL" ] && [ -d "$GATED_SRC" ]; then
echo "Copying channel-gated skills for channel '$CHANNEL'..."
"$SCRIPT_DIR/copy_conditional_skills" \
@@ -156,10 +161,7 @@ if [ "${SKIP_SETTINGS_SCHEMA:-}" != "1" ]; then
if [ -n "$CARGO_PROFILE" ]; then
SCHEMA_CMD+=(--profile "$CARGO_PROFILE")
fi
SCHEMA_CMD+=(--manifest-path "$REPO_ROOT/Cargo.toml" --bin generate_settings_schema --)
if [ -n "$CHANNEL" ]; then
SCHEMA_CMD+=(--channel "$CHANNEL")
fi
SCHEMA_CMD+=(--manifest-path "$REPO_ROOT/Cargo.toml" --bin generate_settings_schema -- --channel oss)
SCHEMA_CMD+=("$SCHEMA_OUTPUT")
"${SCHEMA_CMD[@]}"
+4 -32
View File
@@ -6,10 +6,8 @@
# as a real `.app` bundle (with code signing, plist updates, etc.). On Linux
# and Windows it invokes `cargo run` directly for the appropriate binary.
#
# This script owns all cross-platform setup (running install_channel_config,
# detecting internal vs OSS builds, and mapping legacy `--features` entries
# to environment variables), so platform-specific scripts can assume those
# values are already provided via environment variables.
# This script owns all cross-platform setup and passes the OSS channel values
# to the platform-specific scripts.
set -e
@@ -23,17 +21,8 @@ INSTALL_COMMON_SKILLS=1
FORCE_COMMON_SKILLS=0
COMMON_SKILLS_TARGET="${WARP_COMMON_SKILLS_INSTALL_TARGET:-}"
./script/install_channel_config || echo "Skipping internal channel config installation (no repo access)."
# If warp_channel_config is on PATH, build the Local channel binary; otherwise build the OSS channel.
if command -v warp-channel-config &>/dev/null; then
WARP_BIN_NAME="galaxy-local"
WARP_CHANNEL="local"
else
WARP_BIN_NAME="galaxy-oss"
WARP_CHANNEL="oss"
fi
WARP_BIN_NAME="galaxy-oss"
WARP_CHANNEL="oss"
# Shared argument parsing. macOS-specific flags (--dont-open,
# --open_with_launchd, --generate-schema) are forwarded through MAC_ARGS and
@@ -122,23 +111,6 @@ if [[ "$INSTALL_COMMON_SKILLS" -eq 1 ]]; then
fi
fi
# These cargo features were removed and replaced by environment variables read
# by warp-channel-config. Intercept them here so that existing --features
# invocations keep working.
for mapping in \
"with_local_server:WITH_LOCAL_SERVER" \
"with_local_session_sharing_server:WITH_LOCAL_SESSION_SHARING_SERVER" \
"with_sandbox_telemetry:WITH_SANDBOX_TELEMETRY"; do
feature="${mapping%%:*}"
env_var="${mapping##*:}"
if [[ ",$FEATURES," =~ ,"$feature", ]]; then
export "$env_var"=1
FEATURES="$(echo "$FEATURES" | sed "s/,$feature,/,/; s/^$feature,//; s/,$feature$//; s/^$feature$//")"
FEATURES="$(echo "$FEATURES" | sed 's/,,*/,/g; s/^,//; s/,$//')"
echo "Note: '$feature' is no longer a cargo feature; setting $env_var=1 instead."
fi
done
export FEATURES
export WARP_BIN_NAME
export WARP_CHANNEL
+5 -16
View File
@@ -2,29 +2,18 @@
#
# Run a local `warp_tui` build.
#
# Selects the internal `local` channel when the `warp-channel-config` generator
# is available (mirroring `./script/run`), otherwise falls back to the OSS
# channel so contributors without repo access can still run the TUI. Unlike the
# GUI `./script/run`, the TUI is a console binary, so there is no `.app` bundle
# step — it just runs the appropriate `cargo` binary.
# Runs the OSS TUI binary. Unlike the GUI `./script/run`, the TUI is a
# console binary, so there is no `.app` bundle step.
#
# Extra arguments are forwarded to `cargo run` (e.g. `--release`); use `--` to
# pass arguments through to the binary itself.
# Extra arguments are forwarded to `cargo run` (e.g. `--release`).
set -e
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
cd "${REPO_ROOT}"
./script/install_channel_config || echo "Skipping internal channel config installation (no repo access)."
if command -v warp-channel-config &>/dev/null; then
BIN="warp-tui"
CHANNEL="local"
else
BIN="warp-tui-oss"
CHANNEL="oss"
fi
BIN="warp-tui-oss"
CHANNEL="oss"
echo "Running cargo run -p warp_tui --bin ${BIN} (channel: ${CHANNEL})"
exec cargo run -p warp_tui --bin "${BIN}" "$@"
+4 -13
View File
@@ -19,17 +19,13 @@ assert_cargo_target() {
grep -qx -- 'galaxy' "$args_file"
grep -qx -- '--bin' "$args_file"
grep -qx -- "$expected_bin" "$args_file"
if grep -Eqx -- 'warp|warp-oss|dev|preview' "$args_file"; then
if grep -Eqx -- 'warp|warp-oss|local|dev|preview|stable' "$args_file"; then
echo "Found a removed Cargo package or binary target in $args_file" >&2
exit 1
fi
}
for channel_and_bin in \
"local galaxy-local" \
"dev galaxy-dev" \
"preview galaxy-preview" \
"stable stable" \
"oss galaxy-oss"
do
channel="${channel_and_bin%% *}"
@@ -55,18 +51,14 @@ do
done
macos_bundle="$workspace_root/script/macos/bundle"
grep -Fq -- 'CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai"' "$macos_bundle"
grep -Fq -- 'CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-oss"' "$macos_bundle"
grep -Fq -- 'CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-$RELEASE_CHANNEL"' "$macos_bundle"
if grep -Eq -- 'CLI_SCRIPT_PATH=.*(warp|oz)' "$macos_bundle"; then
echo "Found a removed Warp/Oz CLI launcher in $macos_bundle" >&2
exit 1
fi
windows_bundle="$workspace_root/script/windows/bundle.ps1"
for expected_bin in galaxy-local galaxy-dev galaxy-preview stable galaxy-oss; do
grep -Fq -- "\$GALAXY_BIN = '$expected_bin'" "$windows_bundle"
done
grep -Fq -- "\$GALAXY_BIN = 'galaxy-oss'" "$windows_bundle"
grep -Fq -- 'cargo check -p galaxy' "$windows_bundle"
grep -Fq -- 'cargo build -p galaxy' "$windows_bundle"
if grep -Eq -- "cargo (check|build) -p warp|\\\$GALAXY_BIN = '(warp|warp-oss|dev|preview)'" "$windows_bundle"; then
@@ -75,9 +67,8 @@ if grep -Eq -- "cargo (check|build) -p warp|\\\$GALAXY_BIN = '(warp|warp-oss|dev
fi
windows_installer="$workspace_root/script/windows/windows-installer.iss"
grep -Fq -- "AppId=galaxy-terminal-{#ReleaseChannel}" "$windows_installer"
grep -Fq -- "CmdScriptName := 'galaxy-ai.cmd'" "$windows_installer"
grep -Fq -- "CmdScriptName := 'galaxy-ai-{#ReleaseChannel}.cmd'" "$windows_installer"
grep -Fq -- "AppId=com.galaxy.GalaxyOss" "$windows_installer"
grep -Fq -- "CmdScriptName := 'galaxy-ai-oss.cmd'" "$windows_installer"
grep -Fq -- 'set "GALAXY_CLI_MODE=1"' "$windows_installer"
grep -Fq -- 'WizardSmallImageFile="installer-images\galaxy-logo.bmp"' "$windows_installer"
grep -Fq -- 'WizardImageFile="installer-images\galaxy-banner.bmp"' "$windows_installer"
+8 -23
View File
@@ -18,8 +18,8 @@ fi
WORKSPACE_ROOT_DIR="$(pwd)"
CARGO_TARGET_DIR="$WORKSPACE_ROOT_DIR/target/wasm32-unknown-unknown"
# By default we build dev bundles.
RELEASE_CHANNEL="dev"
# Build the OSS bundle.
RELEASE_CHANNEL="oss"
FEATURES="release_bundle,gui"
DEBUG=false
@@ -84,11 +84,6 @@ eval set -- "$PARAMS"
if [[ $DEBUG = true ]]; then
CARGO_PROFILE="dev-wasm"
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).
CARGO_PROFILE="release-wasm-debug_assertions"
else
CARGO_PROFILE="release-wasm"
fi
@@ -110,24 +105,14 @@ mkdir -p "$ASSET_TARGET_DIR"
EXTRAS_DIR="$CARGO_TARGET_OUTPUT_DIR/bundle/extras"
mkdir -p "$EXTRAS_DIR"
# Update parameters based on the target release channel.
#
# GALAXY_BIN is the name of the binary produced by cargo.
# N.B. The bundled outputs will always be galaxy.js and galaxy_bg.wasm.
if [[ $RELEASE_CHANNEL = "local" ]]; then
GALAXY_BIN="galaxy-local"
FEATURES="$FEATURES,remote_tty"
elif [[ $RELEASE_CHANNEL = "dev" ]]; then
GALAXY_BIN="galaxy-dev"
elif [[ $RELEASE_CHANNEL = "preview" ]]; then
GALAXY_BIN="galaxy-preview"
FEATURES="$FEATURES,preview_channel"
elif [[ $RELEASE_CHANNEL = "stable" ]]; then
GALAXY_BIN="stable"
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
GALAXY_BIN="galaxy-oss"
if [[ "$RELEASE_CHANNEL" != "oss" ]]; then
echo "Error: only the oss release channel is supported" >&2
exit 1
fi
# OSS is the only supported release channel.
GALAXY_BIN="galaxy-oss"
if [ -n "${FEATURES_OVERRIDE+x}" ]; then
FEATURES="$FEATURES_OVERRIDE"
fi
+1 -1
View File
@@ -8,7 +8,7 @@ WASM_BINDGEN_VERSION="$(cargo metadata --format-version 1 | jq -rc '.packages[]
cargo install wasm-bindgen-cli --version "$WASM_BINDGEN_VERSION"
# We source the bundle script so we can access its calculated $OUT_DIR.
source ./script/wasm/bundle --debug --no-split --channel local "$@"
source ./script/wasm/bundle --debug --no-split --channel oss "$@"
BUNDLE_DIR="$(dirname "$OUT_DIR")"
+3 -3
View File
@@ -49,9 +49,9 @@ Usage: `iscc <script path> /D<name>[=<value>]`
The following constants can be overwritten:
* `MyAppVersion` (default: `0.1.0`)
* `MyAppExeName` (default: `galaxy-dev.exe`)
* `ReleaseChannel` (default: `dev`)
* `TargetProfileDir` (default: `debug`)
* `MyAppExeName` (default: `galaxy-oss.exe`)
* `ReleaseChannel` (default: `oss`)
* `TargetProfileDir` (default: `target\\rlto`)
### Option 2: Use the GUI
1. Open the Inno Setup application and select this script.
+10 -42
View File
@@ -3,14 +3,14 @@
# Bundle the application for release.
Param (
# Build dev bundles by default.
# Build a debug OSS bundle when requested.
[Switch]$DEBUG_BUILD = $False,
[Alias('check-only')]
[Switch]$CHECK_ONLY,
[ValidateSet('local', 'dev', 'preview', 'stable', 'oss')]
[String]$CHANNEL = 'dev',
[ValidateSet('oss')]
[String]$CHANNEL = 'oss',
[Alias('release-tag')]
[String]$RELEASE_TAG = '',
@@ -65,11 +65,6 @@ $WINDOWS_INSTALLER_DIR = $WORKSPACE_ROOT_DIR + '\script\windows'
if ($DEBUG_BUILD) {
$CARGO_PROFILE = 'dev'
} elseif (("$CHANNEL" -eq 'local') -or ("$CHANNEL" -eq 'dev')) {
# 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).
$CARGO_PROFILE = 'rltoda'
} else {
$CARGO_PROFILE = 'rlto'
}
@@ -79,43 +74,17 @@ if ($CARGO_PROFILE -eq 'dev') {
} else {
$CARGO_TARGET_OUTPUT_DIR = "$CARGO_TARGET_DIR" + '\' + $PLATFORM_TARGET + '\' + "$CARGO_PROFILE"
}
# Update parameters based on the target release channel.
#
# APP_NAME here must match the value used in Rust as the
# application name; see app/src/channel.rs.
#
# GALAXY_BIN is the name of the binary produced by cargo;
# BINARY_NAME is the desired name of the binary in the final package.
if ("$CHANNEL" -eq 'local') {
$GALAXY_BIN = 'galaxy-local'
$BINARY_NAME = 'galaxy-local.exe'
$APP_NAME = 'GalaxyLocal'
} elseif ("$CHANNEL" -eq 'dev') {
$GALAXY_BIN = 'galaxy-dev'
$BINARY_NAME = 'galaxy-dev.exe'
$APP_NAME = 'GalaxyDev'
$FEATURES = "$FEATURES,agent_mode_debug"
} elseif ("$CHANNEL" -eq 'preview') {
$GALAXY_BIN = 'galaxy-preview'
$BINARY_NAME = 'galaxy-preview.exe'
$APP_NAME = 'GalaxyPreview'
$FEATURES = "$FEATURES,preview_channel"
} elseif ("$CHANNEL" -eq 'stable') {
$GALAXY_BIN = 'stable'
$BINARY_NAME = 'galaxy.exe'
$APP_NAME = 'Galaxy'
} elseif ("$CHANNEL" -eq 'oss') {
$GALAXY_BIN = 'galaxy-oss'
$BINARY_NAME = 'galaxy-oss.exe'
$APP_NAME = 'GalaxyOss'
$FEATURES = 'release_bundle,gui'
}
# OSS is the only supported release channel.
$GALAXY_BIN = 'galaxy-oss'
$BINARY_NAME = 'galaxy-oss.exe'
$APP_NAME = 'GalaxyOss'
$FEATURES = 'release_bundle,gui'
# All channels ship the v3 classifier and v2 heuristic.
# The OSS bundle ships the v3 classifier and v2 heuristic.
$FEATURES = "$FEATURES,nld_classifier_v3,nld_heuristic_v2"
$BINARY_PATH = "$CARGO_TARGET_OUTPUT_DIR\$BINARY_NAME"
$BUNDLE_ID = "samsung.galaxy.$APP_NAME"
$BUNDLE_ID = 'com.galaxy.GalaxyOss'
$INSTALLER_OUTPUT_DIR = "$WINDOWS_INSTALLER_DIR\Output"
$INSTALLER_NAME = "$($APP_NAME)$($FILE_ENDING)"
$INSTALLER_PATH = "$($INSTALLER_OUTPUT_DIR)\$($INSTALLER_NAME).exe"
@@ -143,7 +112,6 @@ if ($CHECK_ONLY) {
if (-Not $SKIP_BUILD_BINARY) {
Write-Output "Building Galaxy for channel $CHANNEL and bundle id $BUNDLE_ID"
$env:CARGO_BIN_NAME = $CHANNEL
$env:GALAXY_APP_NAME = $APP_NAME
cargo build -p galaxy --profile "$CARGO_PROFILE" --bin "$GALAXY_BIN" --features "$FEATURES" --target $PLATFORM_TARGET
if (-Not $?) {
+4 -50
View File
@@ -66,53 +66,9 @@ if ($env:GIT_RELEASE_TAG) {
Set-Content -Path $VersionMetadataPath -Encoding utf8
}
# Copy channel-gated skills matching the current release channel.
$GatedSource = Join-Path (Join-Path $RepoRoot 'resources') 'channel-gated-skills'
$DestSkills = Join-Path (Join-Path $DestinationDir 'bundled') 'skills'
if ($Channel -and (Test-Path $GatedSource -PathType Container)) {
Write-Output "Copying channel-gated skills for channel '$Channel'..."
# Error out if a stable/ gate directory exists.
$StableDir = Join-Path $GatedSource 'stable'
if (Test-Path $StableDir -PathType Container) {
Write-Error "Found a 'stable/' directory in $GatedSource. The stable channel does not use gated skills. Move stable-ready skills to resources/skills/ instead."
exit 1
}
# Gate labels ordered from most-inclusive to least-inclusive.
$GateOrder = @('dogfood', 'preview')
# Map the release channel to its gate label.
switch ($Channel) {
'local' { $Gate = 'dogfood' }
'dev' { $Gate = 'dogfood' }
'preview' { $Gate = 'preview' }
default {
Write-Output " Channel '$Channel' has no gated skills, skipping"
$Gate = $null
}
}
if ($Gate) {
# Build the set of included gates (progressive: this gate and all after it).
$GateIndex = [array]::IndexOf($GateOrder, $Gate)
$IncludedGates = $GateOrder[$GateIndex..($GateOrder.Length - 1)]
foreach ($GateDir in Get-ChildItem -Path $GatedSource -Directory | Sort-Object Name) {
if ($GateDir.Name -notin $IncludedGates) {
$Skills = (Get-ChildItem -Path $GateDir.FullName -Directory | Sort-Object Name | ForEach-Object { $_.Name }) -join ', '
Write-Output " Skipping gate '$($GateDir.Name)' (channel '$Channel') - would include: $Skills"
continue
}
foreach ($SkillDir in Get-ChildItem -Path $GateDir.FullName -Directory | Sort-Object Name) {
$Dest = Join-Path $DestSkills $SkillDir.Name
Write-Output " Copying gated skill: $($SkillDir.Name) (gate: $($GateDir.Name))"
Copy-Item -Path $SkillDir.FullName -Destination $Dest -Recurse -Force
}
}
}
if ($Channel -and $Channel -notin @('oss', 'integration')) {
Write-Error "Unsupported release channel '$Channel'"
exit 1
}
# Generate third-party license attribution.
@@ -169,9 +125,7 @@ if ($env:SKIP_SETTINGS_SCHEMA -ne '1') {
$SchemaCmd += @('--profile', $CargoProfile)
}
$SchemaCmd += @('--manifest-path', (Join-Path $RepoRoot 'Cargo.toml'), '--bin', 'generate_settings_schema', '--')
if ($Channel) {
$SchemaCmd += @('--channel', $Channel)
}
$SchemaCmd += @('--channel', 'oss')
$SchemaCmd += $SchemaOutput
& cargo @SchemaCmd
+14 -28
View File
@@ -4,38 +4,33 @@
#define MyAppPublisher "Galaxy"
#ifndef MyAppName
#define MyAppName "GalaxyDev"
#define MyAppName "GalaxyOss"
#endif
#ifndef MyAppVersion
#define MyAppVersion "0.1.0"
#endif
#ifndef MyAppExeName
#define MyAppExeName "galaxy-dev.exe"
#define MyAppExeName "galaxy-oss.exe"
#endif
#ifndef ReleaseChannel
#define ReleaseChannel "dev"
#define ReleaseChannel "oss"
#endif
#ifndef TargetProfileDir
#define TargetProfileDir "target\release-lto-debug_assertions"
#define TargetProfileDir "target\rlto"
#endif
#define AssetsDir "..\..\app\assets\windows"
// The mutex name must match what the Rust app creates in single_instance_manager.rs:
#define ChannelPascalCase \
(ReleaseChannel == "stable") ? "Stable" : \
((ReleaseChannel == "dev") ? "Dev" : \
((ReleaseChannel == "preview") ? "Preview" : \
((ReleaseChannel == "local") ? "Local" : \
((ReleaseChannel == "integration") ? "Integration" : \
((ReleaseChannel == "oss") ? "Oss" : \
"Unknown")))))
(ReleaseChannel == "oss") ? "Oss" : \
"Unknown"
#define AppMutexName "Local\Galaxy" + ChannelPascalCase + "_SingleInstance"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId=galaxy-terminal-{#ReleaseChannel}
AppId=com.galaxy.GalaxyOss
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
@@ -55,7 +50,7 @@ SolidCompression=yes
WizardStyle=modern
WizardSmallImageFile="installer-images\galaxy-logo.bmp"
WizardImageFile="installer-images\galaxy-banner.bmp"
SetupIconFile="..\..\app\channels\{#ReleaseChannel}\icon\no-padding\icon.ico"
SetupIconFile="..\..\app\channels\oss\icon\no-padding\icon.ico"
UninstallDisplayIcon="{app}\icon.ico"
; Force close previous Galaxy if it hasn't shut down yet.
; In the update flow we already warn the user if they have something running and make them confirm
@@ -94,7 +89,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Source: "{#TargetProfileDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\conpty.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\OpenConsole.exe"; DestDir: "{app}\{#Arch}"; Flags: ignoreversion
Source: "..\..\app\channels\{#ReleaseChannel}\icon\no-padding\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\app\channels\oss\icon\no-padding\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\vcruntime140.dll"; DestDir: "{app}"
Source: "{#AssetsDir}\{#Arch}\vcruntime140_1.dll"; DestDir: "{app}"
Source: "{#AssetsDir}\{#Arch}\msvcp140.dll"; DestDir: "{app}"
@@ -136,8 +131,8 @@ Type: filesandordirs; Name: "{localappdata}\galaxy\{#MyAppName}"
Type: filesandordirs; Name: "{app}\bin"
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "samsung.galaxy.{#MyAppName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "samsung.galaxy.{#MyAppName}"; Tasks: desktopicon
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "com.galaxy.GalaxyOss"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "com.galaxy.GalaxyOss"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: postinstall runhidden nowait
@@ -145,11 +140,7 @@ Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChang
[Code]
function IsNotStable(): Boolean;
begin
#if ReleaseChannel == "stable"
Result := False;
#else
Result := True;
#endif
end;
{ Returns true when the installer was launched by Galaxy's auto-update code.
@@ -199,7 +190,7 @@ begin
if CheckForMutexes('{#AppMutexName}') then
begin
Log('Galaxy mutex still held after timeout; force-killing remaining processes.');
{ Kill by image name. {#MyAppExeName} (e.g. galaxy.exe, galaxy-dev.exe) is unique
{ Kill by image name. {#MyAppExeName} (galaxy-oss.exe) is unique
enough that collateral damage is not a concern. OpenConsole.exe is NOT
killed by name because it is shared with Windows Terminal; instead we
rely on Galaxy's Job Object (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE) to
@@ -236,13 +227,8 @@ begin
if not DirExists(BinDir) then
CreateDir(BinDir);
{ Determine the channel-specific script name. These values must match
`Channel::cli_command_name` in the Rust source. }
#if ReleaseChannel == "stable"
CmdScriptName := 'galaxy-ai.cmd';
#else
CmdScriptName := 'galaxy-ai-{#ReleaseChannel}.cmd';
#endif
{ Keep this name aligned with `Channel::cli_command_name` in the Rust source. }
CmdScriptName := 'galaxy-ai-oss.cmd';
{ Create the helper CMD script }
CmdScriptPath := BinDir + '\' + CmdScriptName;