mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
add installer for mac/windows
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: install test lint clean format type-check installer
|
||||
.PHONY: install test lint clean format type-check installer-mac installer-win
|
||||
|
||||
install:
|
||||
pip install -e ".[dev]"
|
||||
@@ -21,7 +21,7 @@ clean:
|
||||
rm -rf dist
|
||||
rm -rf installer/build
|
||||
rm -rf installer/dist
|
||||
rm .coverage.*
|
||||
rm -f .coverage.*
|
||||
|
||||
format:
|
||||
uv run ruff format .
|
||||
@@ -31,8 +31,12 @@ run-dev:
|
||||
uv run mcp dev src/basic_memory/mcp/main.py
|
||||
|
||||
# Build app installer
|
||||
installer:
|
||||
installer-mac:
|
||||
cd installer && uv run python setup.py bdist_mac
|
||||
|
||||
installer-win:
|
||||
cd installer && uv run python setup.py bdist_win32
|
||||
|
||||
|
||||
update-deps:
|
||||
uv lock f--upgrade
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Basic Memory Installer
|
||||
|
||||
This directory contains the macOS installer for Basic Memory.
|
||||
|
||||
## Building the Installer
|
||||
|
||||
Build the installer:
|
||||
```bash
|
||||
cd installer
|
||||
python setup.py build
|
||||
```
|
||||
|
||||
The installer app will be created in `installer/build/Basic Memory Installer`
|
||||
|
||||
## Development
|
||||
|
||||
- `installer.py` - Main installation script
|
||||
- `setup.py` - py2app configuration for building the macOS app
|
||||
+12
-3
@@ -11,10 +11,19 @@ def ensure_uv_installed():
|
||||
print("Installing uv package manager...")
|
||||
subprocess.run(['curl', '-LsSf', 'https://github.com/astral-sh/uv/releases/download/0.1.23/uv-installer.sh', '|', 'sh'], shell=True)
|
||||
|
||||
def get_config_path():
|
||||
"""Get Claude Desktop config path for current platform."""
|
||||
if sys.platform == "darwin":
|
||||
return Path.home() / 'Library/Application Support/Claude/claude_desktop_config.json'
|
||||
elif sys.platform == "win32":
|
||||
return Path.home() / 'AppData/Roaming/Claude/claude_desktop_config.json'
|
||||
else:
|
||||
raise RuntimeError(f"Unsupported platform: {sys.platform}")
|
||||
|
||||
def update_claude_config():
|
||||
"""Update Claude Desktop config to include basic-memory."""
|
||||
config_path = Path.home() / 'Library/Application Support/Claude/claude_desktop_config.json'
|
||||
config_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
"""Update Claude Desktop config to include basic-memory."""
|
||||
config_path = get_config_path()
|
||||
config_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Load existing config or create new
|
||||
if config_path.exists():
|
||||
|
||||
+29
-3
@@ -1,16 +1,42 @@
|
||||
from cx_Freeze import setup, Executable
|
||||
import sys
|
||||
|
||||
# Build options for all platforms
|
||||
build_exe_options = {
|
||||
"packages": ["json", "pathlib"],
|
||||
"excludes": [],
|
||||
}
|
||||
|
||||
# Platform-specific options
|
||||
if sys.platform == "win32":
|
||||
base = "Win32GUI"
|
||||
build_exe_options.update(
|
||||
{
|
||||
"include_msvcr": True, # Include Visual C++ runtime
|
||||
}
|
||||
)
|
||||
target_name = "Basic Memory Installer.exe"
|
||||
else: # darwin
|
||||
base = "gui"
|
||||
target_name = "Basic Memory Installer"
|
||||
|
||||
executables = [
|
||||
Executable(
|
||||
"installer.py",
|
||||
script="installer.py",
|
||||
target_name="Basic Memory Installer",
|
||||
base="gui"
|
||||
base=base,
|
||||
)
|
||||
]
|
||||
|
||||
setup(
|
||||
name="basic-memory",
|
||||
version=open("../pyproject.toml").read().split('version = "', 1)[1].split('"', 1)[0],
|
||||
description="Basic Memory",
|
||||
description="Basic Memory - Local-first knowledge management",
|
||||
options={
|
||||
"build_exe": build_exe_options,
|
||||
"bdist_mac": {
|
||||
"bundle_name": "Basic Memory Installer",
|
||||
},
|
||||
},
|
||||
executables=executables,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user