From dde9ff228b72852b5abc58faa1b5e7c6f8d2c477 Mon Sep 17 00:00:00 2001 From: phernandez Date: Thu, 13 Feb 2025 18:15:22 -0600 Subject: [PATCH] fix: fix installer for mac --- installer/installer.py | 29 +++++++++++++++++++++++------ installer/setup.py | 18 ++++++++---------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/installer/installer.py b/installer/installer.py index 948adf71..9f2880fc 100644 --- a/installer/installer.py +++ b/installer/installer.py @@ -3,6 +3,10 @@ import subprocess import sys from pathlib import Path +# Use tkinter for GUI alerts on macOS +if sys.platform == "darwin": + import tkinter as tk + from tkinter import messagebox def ensure_uv_installed(): """Check if uv is installed, install if not.""" @@ -52,12 +56,25 @@ def update_claude_config(): def print_completion_message(): """Show completion message with helpful tips.""" - print("\nInstallation complete! Basic Memory is now available in Claude Desktop.") - print("Please restart Claude Desktop for changes to take effect.") - print("\nQuick Start:") - print("1. You can run sync directly using: uvx basic-memory sync") - print("2. Optionally, install globally with: uv pip install basic-memory") - print("\nBuilt with ♥️ by Basic Machines.") + message = """Installation complete! Basic Memory is now available in Claude Desktop. + +Please restart Claude Desktop for changes to take effect. + +Quick Start: +1. You can run sync directly using: uvx basic-memory sync +2. Optionally, install globally with: uv pip install basic-memory + +Built with ♥️ by Basic Machines.""" + + if sys.platform == "darwin": + # Show GUI message on macOS + root = tk.Tk() + root.withdraw() # Hide the main window + messagebox.showinfo("Basic Memory", message) + root.destroy() + else: + # Fallback to console output + print(message) def main(): diff --git a/installer/setup.py b/installer/setup.py index 78e0c12a..7033bc31 100644 --- a/installer/setup.py +++ b/installer/setup.py @@ -9,21 +9,19 @@ build_exe_options = { # Platform-specific options if sys.platform == "win32": - base = "Win32GUI" - build_exe_options.update( - { - "include_msvcr": True, # Include Visual C++ runtime - } - ) + base = "Win32GUI" # Use GUI base for Windows + build_exe_options.update({ + "include_msvcr": True, # Include Visual C++ runtime + }) target_name = "Basic Memory Installer.exe" else: # darwin - base = "gui" + base = None # Don't use GUI base for macOS target_name = "Basic Memory Installer" executables = [ Executable( script="installer.py", - target_name="Basic Memory Installer", + target_name=target_name, base=base, ) ] @@ -36,7 +34,7 @@ setup( "build_exe": build_exe_options, "bdist_mac": { "bundle_name": "Basic Memory Installer", - }, + } }, executables=executables, -) +) \ No newline at end of file