fix: fix installer for mac

This commit is contained in:
phernandez
2025-02-13 18:15:22 -06:00
parent 2f9178b050
commit dde9ff228b
2 changed files with 31 additions and 16 deletions
+23 -6
View File
@@ -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():
+8 -10
View File
@@ -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,
)
)