Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(lume): include resource bundle in installation (#821)

Francesco Bonaccid5a764249818
diff --git a/libs/lume/scripts/build/build-release-notarized.sh b/libs/lume/scripts/build/build-release-notarized.sh
index 79d1d44f17..59ab5040fa 100755
--- a/libs/lume/scripts/build/build-release-notarized.sh
+++ b/libs/lume/scripts/build/build-release-notarized.sh
@@ -168,6 +168,12 @@ log "normal" "Using release directory: $RELEASE_DIR"
# Copy extracted lume to the release directory
cp -f usr/local/bin/lume "$RELEASE_DIR/lume"
+# Copy the resource bundle (contains unattended presets) from the build directory
+BUILD_BUNDLE="$LUME_DIR/.build/release/lume_lume.bundle"
+if [ -d "$BUILD_BUNDLE" ]; then
+ cp -rf "$BUILD_BUNDLE" "$RELEASE_DIR/"
+fi
+
# Install to user-local bin directory (standard location)
USER_BIN="$HOME/.local/bin"
mkdir -p "$USER_BIN"
@@ -191,8 +197,12 @@ rm -f lume-*.tar.gz lume-*.pkg.tar.gz
# Create version-specific archives
log "essential" "Creating version-specific archives (${VERSION})..."
-# Package the binary
-tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1
+# Package the binary and resource bundle
+if [ -d "lume_lume.bundle" ]; then
+ tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume lume_lume.bundle > /dev/null 2>&1
+else
+ tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1
+fi
# Package the installer
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1
diff --git a/libs/lume/scripts/build/build-release.sh b/libs/lume/scripts/build/build-release.sh
index e25ecbe5ff..0f5d3f373e 100755
--- a/libs/lume/scripts/build/build-release.sh
+++ b/libs/lume/scripts/build/build-release.sh
@@ -14,11 +14,21 @@ codesign --force --entitlement ./resources/lume.entitlements --sign - .build/rel
mkdir -p ./.release
cp -f .build/release/lume ./.release/lume
+# Copy the resource bundle (contains unattended presets)
+if [ -d ".build/release/lume_lume.bundle" ]; then
+ cp -rf .build/release/lume_lume.bundle ./.release/
+fi
+
# Install to user-local bin directory (standard location)
USER_BIN="$HOME/.local/bin"
mkdir -p "$USER_BIN"
cp -f ./.release/lume "$USER_BIN/lume"
+# Install the resource bundle alongside the binary
+if [ -d "./.release/lume_lume.bundle" ]; then
+ cp -rf ./.release/lume_lume.bundle "$USER_BIN/"
+fi
+
# Advise user to add to PATH if not present
if ! echo "$PATH" | grep -q "$USER_BIN"; then
echo "[lume build] Note: $USER_BIN is not in your PATH. Add 'export PATH=\"$USER_BIN:\$PATH\"' to your shell profile."
diff --git a/libs/lume/scripts/install.sh b/libs/lume/scripts/install.sh
index 3d85ec0394..f56d62f892 100755
--- a/libs/lume/scripts/install.sh
+++ b/libs/lume/scripts/install.sh
@@ -262,10 +262,17 @@ install_binary() {
# Move the binary to the installation directory
mv "$TEMP_DIR/lume" "$INSTALL_DIR/"
-
+
# Make the binary executable
chmod +x "$INSTALL_DIR/lume"
-
+
+ # Move the resource bundle if it exists (contains unattended presets)
+ if [ -d "$TEMP_DIR/lume_lume.bundle" ]; then
+ rm -rf "$INSTALL_DIR/lume_lume.bundle"
+ mv "$TEMP_DIR/lume_lume.bundle" "$INSTALL_DIR/"
+ echo "Resource bundle installed to ${BOLD}$INSTALL_DIR/lume_lume.bundle${NORMAL}"
+ fi
+
echo "${GREEN}Installation complete!${NORMAL}"
echo "Lume has been installed to ${BOLD}$INSTALL_DIR/lume${NORMAL}"
@@ -388,6 +395,13 @@ apply_update() {
mv "$TEMP_DIR/lume" "$INSTALL_DIR/"
chmod +x "$INSTALL_DIR/lume"
+ # Install resource bundle if it exists (contains unattended presets)
+ if [ -d "$TEMP_DIR/lume_lume.bundle" ]; then
+ rm -rf "$INSTALL_DIR/lume_lume.bundle"
+ mv "$TEMP_DIR/lume_lume.bundle" "$INSTALL_DIR/"
+ log "Resource bundle installed"
+ fi
+
# Restart the daemon
launchctl load "$HOME/Library/LaunchAgents/com.trycua.lume_daemon.plist" 2>/dev/null || true