diff --git a/CHANGELOG.md b/CHANGELOG.md index 96b2a3ad..93ed76e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - desktop entries: `/usr/share/applications` - custom themes: `/usr/share/bauh/themes` - symlinks/binaries : `/usr/local/bin` + - shared files: `/usr/local/share/bauh` - UI - settings panel: diff --git a/README.md b/README.md index 0a868062..0c6cb476 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ bauh is officially distributed through [PyPi](https://pypi.org/project/bauh) and - `Upgrade file`: allows to upgrade a manually installed AppImage file - `Update database`: manually synchronize the AppImage database -- Installed applications are store at `~/.local/share/bauh/appimage/installed` +- Installed applications are store at `~/.local/share/bauh/appimage/installed` (or `/usr/local/share/bauh/installed` for **root**) - Desktop entries (menu shortcuts) of the installed applications are stored at **~/.local/share/applications** (or `/usr/share/applications` for **root**). Name pattern: `bauh_appimage_appname.desktop` - Symlinks are created at `~/.local/bin` (or `/usr/local/bin` for **root**). They have the same name of the application (if the name already exists, it will be created as 'app_name-appimage'. e.g: `rpcs3-appimage`) - Downloaded database files are stored at **~/.cache/bauh/appimage** as **apps.db** and **releases.db** diff --git a/bauh/api/paths.py b/bauh/api/paths.py index 1e7b511b..fd7b5deb 100644 --- a/bauh/api/paths.py +++ b/bauh/api/paths.py @@ -12,3 +12,4 @@ TEMP_DIR = f'/tmp/{__app_name__}@{getuser()}' LOGS_DIR = f'{TEMP_DIR}/logs' AUTOSTART_DIR = f'/etc/xdg/autostart' if user.is_root() else f'{Path.home()}/.config/autostart' BINARIES_DIR = f'/usr/local/bin' if user.is_root() else f'{Path.home()}/.local/bin' +SHARED_FILES_DIR = f'/usr/local/share/{__app_name__}' if user.is_root() else f'{Path.home()}/.local/share/{__app_name__}' diff --git a/bauh/gems/appimage/__init__.py b/bauh/gems/appimage/__init__.py index db513d1f..20d91912 100644 --- a/bauh/gems/appimage/__init__.py +++ b/bauh/gems/appimage/__init__.py @@ -3,11 +3,11 @@ from pathlib import Path from typing import Optional from bauh import __app_name__ -from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR, BINARIES_DIR +from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR, BINARIES_DIR, SHARED_FILES_DIR from bauh.commons import resource ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) -LOCAL_PATH = f'{Path.home()}/.local/share/{__app_name__}/appimage' +LOCAL_PATH = f'{SHARED_FILES_DIR}/appimage' INSTALLATION_PATH = f'{LOCAL_PATH}/installed/' SUGGESTIONS_FILE = f'https://raw.githubusercontent.com/vinifmor/{__app_name__}-files/master/appimage/suggestions.txt' CONFIG_FILE = f'{CONFIG_DIR}/appimage.yml'