Warp to Galaxy internal rebrand
This commit is contained in:
+10
-35
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user