mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-07 14:58:56 +00:00
Add GUI extras for platform backends
This commit is contained in:
47
README.md
47
README.md
@@ -257,10 +257,18 @@ adding the Python GUI dependencies.
|
||||
brew install pygobject3 gtk+3 adwaita-icon-theme librsvg webkitgtk
|
||||
```
|
||||
|
||||
With the system requirements in place, install the Python GUI extras:
|
||||
With the system requirements in place, install the Python GUI extras for your
|
||||
platform:
|
||||
|
||||
```bash
|
||||
pip install .[gui]
|
||||
# Linux
|
||||
pip install .[gui-gtk]
|
||||
|
||||
# Windows
|
||||
pip install .[gui-win]
|
||||
|
||||
# macOS
|
||||
pip install .[gui-mac]
|
||||
```
|
||||
|
||||
CLI-only users can skip these steps and install just the core package for a
|
||||
@@ -323,31 +331,30 @@ python -m seedpass_gui
|
||||
seedpass-gui
|
||||
```
|
||||
|
||||
GUI dependencies are optional. Install them alongside SeedPass with:
|
||||
|
||||
```bash
|
||||
pip install "seedpass[gui]"
|
||||
|
||||
# or when working from a local checkout
|
||||
pip install -e .[gui]
|
||||
```
|
||||
|
||||
After installing the optional GUI extras, add the BeeWare backend for your
|
||||
platform:
|
||||
GUI dependencies are optional. Install them alongside SeedPass with the
|
||||
extra for your platform:
|
||||
|
||||
```bash
|
||||
# Linux
|
||||
pip install toga-gtk
|
||||
|
||||
# If you see build errors about "cairo" on Linux, install the cairo
|
||||
# development headers using your package manager, e.g.:
|
||||
sudo apt-get install libcairo2 libcairo2-dev
|
||||
pip install "seedpass[gui-gtk]"
|
||||
|
||||
# Windows
|
||||
pip install toga-winforms
|
||||
pip install "seedpass[gui-win]"
|
||||
|
||||
# macOS
|
||||
pip install toga-cocoa
|
||||
pip install "seedpass[gui-mac]"
|
||||
|
||||
# or when working from a local checkout
|
||||
pip install -e ".[gui-gtk]" # Linux
|
||||
pip install -e ".[gui-win]" # Windows
|
||||
pip install -e ".[gui-mac]" # macOS
|
||||
```
|
||||
|
||||
If you see build errors about "cairo" on Linux, install the cairo development
|
||||
headers using your package manager, e.g.:
|
||||
|
||||
```bash
|
||||
sudo apt-get install libcairo2 libcairo2-dev
|
||||
```
|
||||
|
||||
The GUI works with the same vault and configuration files as the CLI.
|
||||
|
@@ -40,6 +40,11 @@ pillow = { version = "*", optional = true }
|
||||
[tool.poetry.extras]
|
||||
gui = ["toga-core", "pillow"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
gui-gtk = ["toga-gtk>=0.5.2"]
|
||||
gui-win = ["toga-winforms>=0.5.2"]
|
||||
gui-mac = ["toga-cocoa>=0.5.2"]
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = "^8.2"
|
||||
coverage = "^7.5"
|
||||
|
@@ -197,14 +197,15 @@ main() {
|
||||
fi
|
||||
fi
|
||||
if [ "$GUI_READY" = true ]; then
|
||||
pip install -e .[gui]
|
||||
print_info "Installing platform-specific Toga backend..."
|
||||
if [ "$OS_NAME" = "Linux" ]; then
|
||||
print_info "Installing toga-gtk for Linux..."
|
||||
pip install toga-gtk
|
||||
print_info "Installing Linux GUI dependencies..."
|
||||
pip install -e ".[gui-gtk]"
|
||||
elif [ "$OS_NAME" = "Darwin" ]; then
|
||||
print_info "Installing toga-cocoa for macOS..."
|
||||
pip install toga-cocoa
|
||||
print_info "Installing macOS GUI dependencies..."
|
||||
pip install -e ".[gui-mac]"
|
||||
else
|
||||
print_warning "Unsupported OS for GUI installation. Installing core package only."
|
||||
pip install -e .
|
||||
fi
|
||||
else
|
||||
print_warning "Skipping GUI installation."
|
||||
|
Reference in New Issue
Block a user