project renamed as 'bauh'
124
CHANGELOG.md
@@ -9,127 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- suggestions are now retrieved asynchronously taking 45% less time.
|
||||
- search response takes an average of 20% less time ( reaching 35% for several results )
|
||||
- app boot takes 98% less time when snapd is installed, but disabled
|
||||
- FPAKMAN_TRAY (--tray) is not enabled by default (0).
|
||||
- BAUH_TRAY (--tray) is not enabled by default (0).
|
||||
### Fixes
|
||||
- not showing correctly the latest flatpak app versions when bringing the search results
|
||||
- [flatpak dependency](https://github.com/vinifmor/fpakman/issues/36)
|
||||
|
||||
## [0.5.0] - 2019-08-06
|
||||
### Improvements
|
||||
- search results sorting takes an average of 35% less time, reaching 60% in some scenarios
|
||||
- app boot takes an average of 80% less time
|
||||
- installed / uninstalled icons replaced by install / uninstall button
|
||||
- check update button design changed
|
||||
- app information is now available through an "Info" button
|
||||
- app extra actions are now available through a "Settings" button instead of a right-click
|
||||
- a confirmation popup is shown when the "install" / "upgrade all" button is clicked
|
||||
- "About" icon added to the manage panel
|
||||
- "Updates" icon left-aligned
|
||||
- show application suggestions when no app is installed. Can be enabled / disabled through the environment variable / parameter FPAKMAN_SUGGESTIONS (--sugs)
|
||||
- showing a warning popup after initialization when no Flatpak remotes are set
|
||||
- new environment variable / argument to enable / disable the tray icon and update-check daemon: FPAKMAN_TRAY (--tray)
|
||||
- minor GUI improvements
|
||||
### Fixes:
|
||||
- apps table not showing empty descriptions
|
||||
- replacing default app icons by null icons
|
||||
- maximized window resize fix when filtering apps
|
||||
- changing table state after retrieving app history / information or an error happens
|
||||
- i18n
|
||||
|
||||
### Comments:
|
||||
- not adding Flatpak default remote (flathub) when initializing. It requires root actions, and will be addressed in a different way in future releases.
|
||||
|
||||
## [0.4.2] - 2019-07-28
|
||||
### Improvements
|
||||
- showing a warning dialog when the application starts and **snapd** is unavailable
|
||||
### Fixes:
|
||||
- [Snaps read index error](https://github.com/vinifmor/fpakman/issues/30)
|
||||
|
||||
## [0.4.1] - 2019-07-25
|
||||
### Improvements
|
||||
- retrieving some Snaps data (icon, description and confinement) through Ubuntu API instead of Snap Store
|
||||
### Fixes:
|
||||
- not showing app disk cached description when listing installed apps
|
||||
- not updating disk cached data of installed apps
|
||||
|
||||
## [0.4.0] - 2019-07-25
|
||||
### Features
|
||||
- supporting snaps
|
||||
- search filters by application type and updates
|
||||
- "Refresh" option when right-clicking an installed snap application (see **Comments**)
|
||||
- snap / flatpak usage can be enabled / disabled via this new environment variables and arguments: FPAKMAN_FLATPAK (--flatpak), FPAKMAN_SNAP (--snap)
|
||||
### Improvements
|
||||
- automatically shows all updates after refreshing
|
||||
- more accurate search results.
|
||||
- system notifications when an application is installed, removed or downgraded. Also when an error occurs.
|
||||
- showing management panel when right-clicking the tray icon.
|
||||
- "Updates" label replaced by an exclamation icon and moved to the right.
|
||||
- new environments variables / arguments associated with performance: FPAKMAN_DOWNLOAD_ICONS (--download-icons), FPAKMAN_CHECK_PACKAGING_ONCE (--check-packaging-once)
|
||||
- minor GUI improvements
|
||||
### Comments
|
||||
- currently snap daemon (2.40) automatically upgrades your installed applications in background. Although it's possible to check for new updates
|
||||
programmatically, it requires root access and would mess up with the user experience if every 5 minutes the application asked for the password. But not to let the
|
||||
user with empty hands, it was added a "Refresh" option when right-clicking an installed snap application. It will update the application if its not already updated by the daemon.
|
||||
|
||||
## [0.3.1] - 2019-07-13
|
||||
### Improvements
|
||||
- Console output now is optional and not shown by default
|
||||
- Search bar is cleaned when 'Refresh' is clicked
|
||||
- Full Flatpak database is not loaded during initialization: speeds up the process and reduces memory usage
|
||||
- Applications data not available offline are now retrieved from Flathub API on demand and cached in memory and disk (only installed)
|
||||
- In-memory cached data have an expiration time and are cleaned overtime to reduce memory usage
|
||||
- Code was refactored to support other types of packaging in the future (e.g: snap)
|
||||
- flatpak is not a requirement anymore
|
||||
- the amount of columns of the applications table was reduced to improve the user experience
|
||||
- new environment variables and arguments: FPAKMAN_ICON_EXPIRATION (--icon-exp), FPAKMAN_DISK_CACHE (--disk-cache)
|
||||
- minor GUI improvements
|
||||
|
||||
### Fixes:
|
||||
- flatpak 1.0.X: search is now retrieving the application name
|
||||
- app crashes when there is no internet connection while initializing, downgrading or retrieving app history
|
||||
|
||||
## [0.3.0] - 2019-07-02
|
||||
### Features
|
||||
- Applications search
|
||||
- Now when you right-click a selected application you can:
|
||||
- retrieve its information
|
||||
- retrieve its commit history
|
||||
- downgrade
|
||||
- install and uninstall it
|
||||
- "About" window available when right-clicking the tray icon.
|
||||
|
||||
### Improvements
|
||||
- Performance and memory usage
|
||||
- Adding tooltips to toolbar buttons
|
||||
- "Update ?" column renamed to "Upgrade ?"
|
||||
- Management panel title renamed
|
||||
- Showing runtime apps when no app is available
|
||||
- Allowing to specify a custom app translation with the environment variable **FPAKMAN_LOCALE**
|
||||
- Adding expiration time for cached app data. Default to 1 hour. The environment variable **FPAKMAN_CACHE_EXPIRATION** can change this value.
|
||||
- Now the application accepts arguments related to environment variables as well. Check 'README.md'.
|
||||
- Minor GUI improvements
|
||||
- Notifying only new updates
|
||||
- New icon
|
||||
- Progress bar
|
||||
|
||||
## [0.2.1] - 2019-06-24
|
||||
### Features
|
||||
- Showing the number of apps and runtime updates available
|
||||
### Fixes
|
||||
- Retrieving information for the same AppId from different branches.
|
||||
|
||||
## [0.2.0] - 2019-06-18
|
||||
### Features
|
||||
- Management panel shows update commands streams
|
||||
- Management panel status label is "orange" now
|
||||
|
||||
### Fixes
|
||||
- Application name is not properly showing for Flatpak 1.2.X
|
||||
|
||||
## [0.1.0] - 2019-06-14
|
||||
### Features
|
||||
- System tray icon.
|
||||
- Applications management window.
|
||||
- Support for the following locales: PT, EN, ES.
|
||||
- System notification for new updates.
|
||||
- Update applications.
|
||||
- flatpak client dependency
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
include requirements.txt
|
||||
recursive-include fpakman/resources *
|
||||
recursive-include bauh/resources *
|
||||
46
README.md
@@ -1,4 +1,4 @@
|
||||
## fpakman
|
||||
## bauh
|
||||
|
||||
Non-official graphical user interface for Flatpak / Snap application management. It is a tray icon that let the user known when new updates are available and
|
||||
an application management panel where you can search, update, install and uninstall applications.
|
||||
@@ -20,12 +20,12 @@ an application management panel where you can search, update, install and uninst
|
||||
### Distribution
|
||||
**PyPi**
|
||||
```
|
||||
sudo pip3 install fpakman
|
||||
sudo pip3 install bauh
|
||||
```
|
||||
|
||||
**AUR**
|
||||
|
||||
As **fpakman** package. There is also a staging version (**fpakman-staging**) but is intended for testing and may not work properly.
|
||||
As **bauh** package. There is also a staging version (**bauh-staging**) but is intended for testing and may not work properly.
|
||||
|
||||
|
||||
### Manual installation:
|
||||
@@ -33,35 +33,35 @@ If you prefer a manual and isolated installation, type the following commands wi
|
||||
```
|
||||
python3 -m venv env
|
||||
env/bin/pip install .
|
||||
env/bin/fpakman
|
||||
env/bin/bauh
|
||||
```
|
||||
|
||||
### Autostart
|
||||
In order to autostart the application, use your Desktop Environment settings to register it as a startup application / script ("fpakman").
|
||||
In order to autostart the application, use your Desktop Environment settings to register it as a startup application / script (**bauh**).
|
||||
|
||||
|
||||
### Settings
|
||||
You can change some application settings via environment variables or arguments (type ```fpakman --help``` to get more information).
|
||||
- **FPAKMAN_UPDATE_NOTIFICATION**: enable or disable system updates notifications. Use **0** (disable) or **1** (enable, default).
|
||||
- **FPAKMAN_CHECK_INTERVAL**: define the updates check interval in seconds. Default: 60.
|
||||
- **FPAKMAN_LOCALE**: define a custom app translation for a given locale key (e.g: 'pt', 'en', 'es', ...). Default: system locale.
|
||||
- **FPAKMAN_CACHE_EXPIRATION**: define a custom expiration time in SECONDS for cached API data. Default: 3600 (1 hour).
|
||||
- **FPAKMAN_ICON_EXPIRATION**: define a custom expiration time in SECONDS for cached icons. Default: 300 (5 minutes).
|
||||
- **FPAKMAN_DISK_CACHE**: enables / disables disk cache. When disk cache is enabled, the installed applications data are loaded faster. Use **0** (disable) or **1** (enable, default).
|
||||
- **FPAKMAN_DOWNLOAD_ICONS**: Enables / disables app icons download. It may improve the application speed depending on how applications data are being retrieved. Use **0** (disable) or **1** (enable, default).
|
||||
- **FPAKMAN_FLATPAK**: enables / disables flatpak usage. Use **0** (disable) or **1** (enabled, default)
|
||||
- **FPAKMAN_SNAP**: enables / disables snap usage. Use **0** (disable) or **1** (enabled, default)
|
||||
- **FPAKMAN_CHECK_PACKAGING_ONCE**: If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Use **0** (disable, default) or **1** (enable).
|
||||
- **FPAKMAN_TRAY**: If the tray icon and update-check daemon should be created. Use **0** (disable, default) or **1** (enable).
|
||||
- **FPAKMAN_SUGGESTIONS**: If application suggestions should be displayed if no app is installed (runtimes do not count as apps). Use **0** (disable) or **1** (enable, default).
|
||||
You can change some application settings via environment variables or arguments (type ```bauh --help``` to get more information).
|
||||
- **BAUH_UPDATE_NOTIFICATION**: enable or disable system updates notifications. Use **0** (disable) or **1** (enable, default).
|
||||
- **BAUH_CHECK_INTERVAL**: define the updates check interval in seconds. Default: 60.
|
||||
- **BAUH_LOCALE**: define a custom app translation for a given locale key (e.g: 'pt', 'en', 'es', ...). Default: system locale.
|
||||
- **BAUH_CACHE_EXPIRATION**: define a custom expiration time in SECONDS for cached API data. Default: 3600 (1 hour).
|
||||
- **BAUH_ICON_EXPIRATION**: define a custom expiration time in SECONDS for cached icons. Default: 300 (5 minutes).
|
||||
- **BAUH_DISK_CACHE**: enables / disables disk cache. When disk cache is enabled, the installed applications data are loaded faster. Use **0** (disable) or **1** (enable, default).
|
||||
- **BAUH_DOWNLOAD_ICONS**: Enables / disables app icons download. It may improve the application speed depending on how applications data are being retrieved. Use **0** (disable) or **1** (enable, default).
|
||||
- **BAUH_FLATPAK**: enables / disables flatpak usage. Use **0** (disable) or **1** (enabled, default)
|
||||
- **BAUH_SNAP**: enables / disables snap usage. Use **0** (disable) or **1** (enabled, default)
|
||||
- **BAUH_CHECK_PACKAGING_ONCE**: If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Use **0** (disable, default) or **1** (enable).
|
||||
- **BAUH_TRAY**: If the tray icon and update-check daemon should be created. Use **0** (disable, default) or **1** (enable).
|
||||
- **BAUH_SUGGESTIONS**: If application suggestions should be displayed if no app is installed (runtimes do not count as apps). Use **0** (disable) or **1** (enable, default).
|
||||
|
||||
### How to improve the application performance
|
||||
- If you don't care about a specific packaging technology and don't want **fpakman** to deal with it, just disable it via the specific argument or environment variable. For instance, if I don't care
|
||||
about **snaps**, I can initialize the application setting "snap=0" (**fpakman --snap=0**). This will improve the application response time, since it won't need to do any verifications associated
|
||||
- If you don't care about a specific packaging technology and don't want the app to deal with it, just disable it via the specific argument or environment variable. For instance, if I don't care
|
||||
about **snaps**, I can initialize the application setting "snap=0" (**bauh --snap=0**). This will improve the application response time, since it won't need to do any verifications associated
|
||||
with the technology that I don't care every time an action is executed.
|
||||
- If you don't care about restarting **fpakman** every time a new supported packaging technology is installed, set "check-packaging-once=1" (**fpakman --check-packaging-once=1**). This can reduce the application response time up to 80% in some scenarios, since it won't need to recheck if the packaging type is available for every action you request.
|
||||
- If you don't mind to see the applications icons, you can set "download-icons=0" (**fpakman --download-icons=0**). The application may have a slight response improvement, since it will reduce the parallelism within it.
|
||||
- If you don't mind app suggestions, disable it (**fpakman --sugs=0**)
|
||||
- If you don't care about restarting the app every time a new supported packaging technology is installed, set "check-packaging-once=1" (**bauh --check-packaging-once=1**). This can reduce the application response time up to 80% in some scenarios, since it won't need to recheck if the packaging type is available for every action you request.
|
||||
- If you don't mind to see the applications icons, you can set "download-icons=0" (**bauh --download-icons=0**). The application may have a slight response improvement, since it will reduce the parallelism within it.
|
||||
- If you don't mind app suggestions, disable it (**bauh --sugs=0**)
|
||||
|
||||
### Roadmap
|
||||
- Support for other packaging technologies
|
||||
|
||||
@@ -5,18 +5,18 @@ import sys
|
||||
desktop_file = """
|
||||
[Desktop Entry]
|
||||
Type = Application
|
||||
Name = fpakman
|
||||
Name = bauh
|
||||
Categories = System;
|
||||
Comment = Manage your Flatpak / Snap applications
|
||||
Exec = {path}
|
||||
Icon = {lib_path}/python{version}/site-packages/fpakman/resources/img/logo.svg
|
||||
Icon = {lib_path}/python{version}/site-packages/bauh/resources/img/logo.svg
|
||||
"""
|
||||
|
||||
py_version = "{}.{}".format(sys.version_info.major, sys.version_info.minor)
|
||||
|
||||
fpakman_cmd = os.getenv('FPAKMAN_PATH', '/usr/bin/fpakman')
|
||||
app_cmd = os.getenv('BAUH_PATH', '/usr/bin/bauh')
|
||||
|
||||
with open('fpakman.desktop', 'w+') as f:
|
||||
f.write(desktop_file.format(lib_path=os.getenv('FPAKMAN_LIB_PATH', '/usr/lib'),
|
||||
with open('bauh.desktop', 'w+') as f:
|
||||
f.write(desktop_file.format(lib_path=os.getenv('BAUH_LIB_PATH', '/usr/lib'),
|
||||
version=py_version,
|
||||
path=fpakman_cmd))
|
||||
path=app_cmd))
|
||||
|
||||
@@ -5,22 +5,22 @@ import sys
|
||||
desktop_file = """
|
||||
[Desktop Entry]
|
||||
Type = Application
|
||||
Name = fpakman (tray)
|
||||
Name = bauh (tray)
|
||||
Categories = System;
|
||||
Comment = Manage your Flatpak / Snap applications
|
||||
Exec = {path}
|
||||
Icon = {lib_path}/python{version}/site-packages/fpakman/resources/img/logo.svg
|
||||
Icon = {lib_path}/python{version}/site-packages/bauh/resources/img/logo.svg
|
||||
"""
|
||||
|
||||
py_version = "{}.{}".format(sys.version_info.major, sys.version_info.minor)
|
||||
|
||||
fpakman_cmd = os.getenv('FPAKMAN_PATH', '/usr/bin/fpakman') + ' --tray=1'
|
||||
app_cmd = os.getenv('BAUH_PATH', '/usr/bin/bauh') + ' --tray=1'
|
||||
|
||||
with open('fpakman_tray.desktop', 'w+') as f:
|
||||
f.write(desktop_file.format(lib_path=os.getenv('FPAKMAN_LIB_PATH', '/usr/lib'),
|
||||
with open('bauh_tray.desktop', 'w+') as f:
|
||||
f.write(desktop_file.format(lib_path=os.getenv('BAUH_LIB_PATH', '/usr/lib'),
|
||||
version=py_version,
|
||||
path=fpakman_cmd))
|
||||
path=app_cmd))
|
||||
|
||||
|
||||
with open('fpakman-tray', 'w') as f:
|
||||
f.write(fpakman_cmd)
|
||||
with open('bauh-tray', 'w') as f:
|
||||
f.write(app_cmd)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
__version__ = '0.5.1'
|
||||
__app_name__ = 'fpakman'
|
||||
__app_name__ = 'bauh'
|
||||
|
||||
import os
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -8,21 +8,21 @@ from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from colorama import Fore
|
||||
|
||||
from fpakman import __version__, __app_name__
|
||||
from fpakman.core import resource
|
||||
from fpakman.core.controller import GenericApplicationManager
|
||||
from fpakman.core.disk import DiskCacheLoaderFactory
|
||||
from fpakman.core.flatpak.constants import FLATPAK_CACHE_PATH
|
||||
from fpakman.core.flatpak.controller import FlatpakManager
|
||||
from fpakman.core.flatpak.model import FlatpakApplication
|
||||
from fpakman.core.snap.constants import SNAP_CACHE_PATH
|
||||
from fpakman.core.snap.controller import SnapManager
|
||||
from fpakman.core.snap.model import SnapApplication
|
||||
from fpakman.util import util
|
||||
from fpakman.util.cache import Cache
|
||||
from fpakman.util.memory import CacheCleaner
|
||||
from fpakman.view.qt.systray import TrayIcon
|
||||
from fpakman.view.qt.window import ManageWindow
|
||||
from bauh import __version__, __app_name__
|
||||
from bauh.core import resource
|
||||
from bauh.core.controller import GenericApplicationManager
|
||||
from bauh.core.disk import DiskCacheLoaderFactory
|
||||
from bauh.core.flatpak.constants import FLATPAK_CACHE_PATH
|
||||
from bauh.core.flatpak.controller import FlatpakManager
|
||||
from bauh.core.flatpak.model import FlatpakApplication
|
||||
from bauh.core.snap.constants import SNAP_CACHE_PATH
|
||||
from bauh.core.snap.controller import SnapManager
|
||||
from bauh.core.snap.model import SnapApplication
|
||||
from bauh.util import util
|
||||
from bauh.util.cache import Cache
|
||||
from bauh.util.memory import CacheCleaner
|
||||
from bauh.view.qt.systray import TrayIcon
|
||||
from bauh.view.qt.window import ManageWindow
|
||||
|
||||
|
||||
def log_msg(msg: str, color: int = None):
|
||||
@@ -35,18 +35,18 @@ def log_msg(msg: str, color: int = None):
|
||||
|
||||
parser = argparse.ArgumentParser(prog=__app_name__, description="GUI for Flatpak applications management")
|
||||
parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(__version__))
|
||||
parser.add_argument('-e', '--cache-exp', action="store", default=int(os.getenv('FPAKMAN_CACHE_EXPIRATION', 60 * 60)), type=int, help='cached API data expiration time in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-ie', '--icon-exp', action="store", default=int(os.getenv('FPAKMAN_ICON_EXPIRATION', 60 * 5)), type=int, help='cached icons expiration time in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-l', '--locale', action="store", default=os.getenv('FPAKMAN_LOCALE', 'en'), help='Translation key. Default: %(default)s')
|
||||
parser.add_argument('-i', '--check-interval', action="store", default=int(os.getenv('FPAKMAN_CHECK_INTERVAL', 60)), type=int, help='Updates check interval in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-n', '--update-notification', action="store", choices=[0, 1], default=os.getenv('FPAKMAN_UPDATE_NOTIFICATION', 1), type=int, help='Enables / disables system notifications for new updates. Default: %(default)s')
|
||||
parser.add_argument('-dc', '--disk-cache', action="store", choices=[0, 1], default=os.getenv('FPAKMAN_DISK_CACHE', 1), type=int, help='Enables / disables disk cache. When disk cache is enabled, the installed applications data are loaded faster. Default: %(default)s')
|
||||
parser.add_argument('-di', '--download-icons', action="store", choices=[0, 1], default=os.getenv('FPAKMAN_DOWNLOAD_ICONS', 1), type=int, help='Enables / disables app icons download. It may improve the application speed, depending of how applications data are retrieved by their extensions.')
|
||||
parser.add_argument('--flatpak', action="store", default=os.getenv('FPAKMAN_FLATPAK', 1), choices=[0, 1], type=int, help='Enables / disables flatpak usage. Default: %(default)s')
|
||||
parser.add_argument('--snap', action="store", default=os.getenv('FPAKMAN_SNAP', 1), choices=[0, 1], type=int, help='Enables / disables snap usage. Default: %(default)s')
|
||||
parser.add_argument('-co', '--check-packaging-once', action="store", default=os.getenv('FPAKMAN_CHECK_PACKAGING_ONCE', 0), choices=[0, 1], type=int, help='If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Default: %(default)s')
|
||||
parser.add_argument('--tray', action="store", default=os.getenv('FPAKMAN_TRAY', 0), choices=[0, 1], type=int, help='If the tray icon and update-check daemon should be created. Default: %(default)s')
|
||||
parser.add_argument('--sugs', action="store", default=os.getenv('FPAKMAN_SUGGESTIONS', 1), choices=[0, 1], type=int, help='If app suggestions should be displayed if no app is installed (runtimes do not count as apps). Default: %(default)s')
|
||||
parser.add_argument('-e', '--cache-exp', action="store", default=int(os.getenv('BAUH_CACHE_EXPIRATION', 60 * 60)), type=int, help='cached API data expiration time in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-ie', '--icon-exp', action="store", default=int(os.getenv('BAUH_ICON_EXPIRATION', 60 * 5)), type=int, help='cached icons expiration time in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-l', '--locale', action="store", default=os.getenv('BAUH_LOCALE', 'en'), help='Translation key. Default: %(default)s')
|
||||
parser.add_argument('-i', '--check-interval', action="store", default=int(os.getenv('BAUH_CHECK_INTERVAL', 60)), type=int, help='Updates check interval in SECONDS. Default: %(default)s')
|
||||
parser.add_argument('-n', '--update-notification', action="store", choices=[0, 1], default=os.getenv('BAUH_UPDATE_NOTIFICATION', 1), type=int, help='Enables / disables system notifications for new updates. Default: %(default)s')
|
||||
parser.add_argument('-dc', '--disk-cache', action="store", choices=[0, 1], default=os.getenv('BAUH_DISK_CACHE', 1), type=int, help='Enables / disables disk cache. When disk cache is enabled, the installed applications data are loaded faster. Default: %(default)s')
|
||||
parser.add_argument('-di', '--download-icons', action="store", choices=[0, 1], default=os.getenv('BAUH_DOWNLOAD_ICONS', 1), type=int, help='Enables / disables app icons download. It may improve the application speed, depending of how applications data are retrieved by their extensions.')
|
||||
parser.add_argument('--flatpak', action="store", default=os.getenv('BAUH_FLATPAK', 1), choices=[0, 1], type=int, help='Enables / disables flatpak usage. Default: %(default)s')
|
||||
parser.add_argument('--snap', action="store", default=os.getenv('BAUH_SNAP', 1), choices=[0, 1], type=int, help='Enables / disables snap usage. Default: %(default)s')
|
||||
parser.add_argument('-co', '--check-packaging-once', action="store", default=os.getenv('BAUH_CHECK_PACKAGING_ONCE', 0), choices=[0, 1], type=int, help='If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Default: %(default)s')
|
||||
parser.add_argument('--tray', action="store", default=os.getenv('BAUH_TRAY', 0), choices=[0, 1], type=int, help='If the tray icon and update-check daemon should be created. Default: %(default)s')
|
||||
parser.add_argument('--sugs', action="store", default=os.getenv('BAUH_SUGGESTIONS', 1), choices=[0, 1], type=int, help='If app suggestions should be displayed if no app is installed (runtimes do not count as apps). Default: %(default)s')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.cache_exp < 0:
|
||||
@@ -1,6 +1,6 @@
|
||||
from pathlib import Path
|
||||
|
||||
from fpakman import __app_name__
|
||||
from bauh import __app_name__
|
||||
|
||||
HOME_PATH = Path.home()
|
||||
CACHE_PATH = '{}/.cache/{}'.format(HOME_PATH, __app_name__)
|
||||
@@ -3,9 +3,9 @@ from argparse import Namespace
|
||||
from threading import Thread
|
||||
from typing import List, Dict
|
||||
|
||||
from fpakman.core.disk import DiskCacheLoader, DiskCacheLoaderFactory
|
||||
from fpakman.core.model import Application, ApplicationUpdate
|
||||
from fpakman.core.system import FpakmanProcess
|
||||
from bauh.core.disk import DiskCacheLoader, DiskCacheLoaderFactory
|
||||
from bauh.core.model import Application, ApplicationUpdate
|
||||
from bauh.core.system import BauhProcess
|
||||
|
||||
|
||||
class ApplicationManager(ABC):
|
||||
@@ -23,7 +23,7 @@ class ApplicationManager(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def downgrade_app(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def downgrade_app(self, app: Application, root_password: str) -> BauhProcess:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -35,11 +35,11 @@ class ApplicationManager(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def update_and_stream(self, app: Application) -> FpakmanProcess:
|
||||
def update_and_stream(self, app: Application) -> BauhProcess:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def uninstall_and_stream(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def uninstall_and_stream(self, app: Application, root_password: str) -> BauhProcess:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -55,7 +55,7 @@ class ApplicationManager(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def install_and_stream(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def install_and_stream(self, app: Application, root_password: str) -> BauhProcess:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -71,7 +71,7 @@ class ApplicationManager(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def refresh(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def refresh(self, app: Application, root_password: str) -> BauhProcess:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -202,7 +202,7 @@ class GenericApplicationManager(ApplicationManager):
|
||||
def can_downgrade(self):
|
||||
return True
|
||||
|
||||
def downgrade_app(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def downgrade_app(self, app: Application, root_password: str) -> BauhProcess:
|
||||
man = self._get_manager_for(app)
|
||||
|
||||
if man and man.can_downgrade():
|
||||
@@ -216,19 +216,19 @@ class GenericApplicationManager(ApplicationManager):
|
||||
if man:
|
||||
return man.clean_cache_for(app)
|
||||
|
||||
def update_and_stream(self, app: Application) -> FpakmanProcess:
|
||||
def update_and_stream(self, app: Application) -> BauhProcess:
|
||||
man = self._get_manager_for(app)
|
||||
|
||||
if man:
|
||||
return man.update_and_stream(app)
|
||||
|
||||
def uninstall_and_stream(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def uninstall_and_stream(self, app: Application, root_password: str) -> BauhProcess:
|
||||
man = self._get_manager_for(app)
|
||||
|
||||
if man:
|
||||
return man.uninstall_and_stream(app, root_password)
|
||||
|
||||
def install_and_stream(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def install_and_stream(self, app: Application, root_password: str) -> BauhProcess:
|
||||
man = self._get_manager_for(app)
|
||||
|
||||
if man:
|
||||
@@ -269,7 +269,7 @@ class GenericApplicationManager(ApplicationManager):
|
||||
if man:
|
||||
return man.requires_root(action, app)
|
||||
|
||||
def refresh(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
def refresh(self, app: Application, root_password: str) -> BauhProcess:
|
||||
self._wait_to_be_ready()
|
||||
|
||||
man = self._get_manager_for(app)
|
||||
@@ -4,8 +4,8 @@ from pathlib import Path
|
||||
from threading import Thread, Lock
|
||||
from typing import List, Dict
|
||||
|
||||
from fpakman.core.model import Application
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.core.model import Application
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class DiskCacheLoader(Thread):
|
||||
@@ -1,4 +1,4 @@
|
||||
from fpakman.core.constants import CACHE_PATH
|
||||
from bauh.core.constants import CACHE_PATH
|
||||
|
||||
FLATHUB_URL = 'https://flathub.org'
|
||||
FLATHUB_API_URL = FLATHUB_URL + '/api/v1'
|
||||
@@ -4,15 +4,15 @@ from argparse import Namespace
|
||||
from datetime import datetime
|
||||
from typing import List, Dict
|
||||
|
||||
from fpakman.core import disk
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.disk import DiskCacheLoader
|
||||
from fpakman.core.flatpak import flatpak
|
||||
from fpakman.core.flatpak.model import FlatpakApplication
|
||||
from fpakman.core.flatpak.worker import FlatpakAsyncDataLoader, FlatpakUpdateLoader
|
||||
from fpakman.core.model import ApplicationData, ApplicationUpdate
|
||||
from fpakman.core.system import FpakmanProcess
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.core import disk
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.disk import DiskCacheLoader
|
||||
from bauh.core.flatpak import flatpak
|
||||
from bauh.core.flatpak.model import FlatpakApplication
|
||||
from bauh.core.flatpak.worker import FlatpakAsyncDataLoader, FlatpakUpdateLoader
|
||||
from bauh.core.model import ApplicationData, ApplicationUpdate
|
||||
from bauh.core.system import BauhProcess
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class FlatpakManager(ApplicationManager):
|
||||
@@ -97,7 +97,7 @@ class FlatpakManager(ApplicationManager):
|
||||
def can_downgrade(self):
|
||||
return True
|
||||
|
||||
def downgrade_app(self, app: FlatpakApplication, root_password: str) -> FpakmanProcess:
|
||||
def downgrade_app(self, app: FlatpakApplication, root_password: str) -> BauhProcess:
|
||||
|
||||
commits = flatpak.get_app_commits(app.ref, app.origin)
|
||||
|
||||
@@ -107,8 +107,8 @@ class FlatpakManager(ApplicationManager):
|
||||
if commit_idx == len(commits) - 1:
|
||||
return None
|
||||
|
||||
return FpakmanProcess(subproc=flatpak.downgrade_and_stream(app.ref, commits[commit_idx + 1], root_password),
|
||||
success_phrase='Updates complete.')
|
||||
return BauhProcess(subproc=flatpak.downgrade_and_stream(app.ref, commits[commit_idx + 1], root_password),
|
||||
success_phrase='Updates complete.')
|
||||
|
||||
def clean_cache_for(self, app: FlatpakApplication):
|
||||
self.api_cache.delete(app.base_data.id)
|
||||
@@ -116,11 +116,11 @@ class FlatpakManager(ApplicationManager):
|
||||
if app.supports_disk_cache() and os.path.exists(app.get_disk_cache_path()):
|
||||
shutil.rmtree(app.get_disk_cache_path())
|
||||
|
||||
def update_and_stream(self, app: FlatpakApplication) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=flatpak.update_and_stream(app.ref))
|
||||
def update_and_stream(self, app: FlatpakApplication) -> BauhProcess:
|
||||
return BauhProcess(subproc=flatpak.update_and_stream(app.ref))
|
||||
|
||||
def uninstall_and_stream(self, app: FlatpakApplication, root_password: str = None) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=flatpak.uninstall_and_stream(app.ref))
|
||||
def uninstall_and_stream(self, app: FlatpakApplication, root_password: str = None) -> BauhProcess:
|
||||
return BauhProcess(subproc=flatpak.uninstall_and_stream(app.ref))
|
||||
|
||||
def get_info(self, app: FlatpakApplication) -> dict:
|
||||
app_info = flatpak.get_app_info_fields(app.base_data.id, app.branch)
|
||||
@@ -132,8 +132,8 @@ class FlatpakManager(ApplicationManager):
|
||||
def get_history(self, app: FlatpakApplication) -> List[dict]:
|
||||
return flatpak.get_app_commits_data(app.ref, app.origin)
|
||||
|
||||
def install_and_stream(self, app: FlatpakApplication, root_password: str) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=flatpak.install_and_stream(app.base_data.id, app.origin))
|
||||
def install_and_stream(self, app: FlatpakApplication, root_password: str) -> BauhProcess:
|
||||
return BauhProcess(subproc=flatpak.install_and_stream(app.base_data.id, app.origin))
|
||||
|
||||
def is_enabled(self):
|
||||
return flatpak.is_installed()
|
||||
@@ -145,7 +145,7 @@ class FlatpakManager(ApplicationManager):
|
||||
def requires_root(self, action: str, app: FlatpakApplication):
|
||||
return action == 'downgrade'
|
||||
|
||||
def refresh(self, app: FlatpakApplication, root_password: str) -> FpakmanProcess:
|
||||
def refresh(self, app: FlatpakApplication, root_password: str) -> BauhProcess:
|
||||
raise Exception("'refresh' is not supported for {}".format(app.__class__.__name__))
|
||||
|
||||
def prepare(self):
|
||||
@@ -2,8 +2,8 @@ import re
|
||||
import subprocess
|
||||
from typing import List
|
||||
|
||||
from fpakman.core import system
|
||||
from fpakman.core.exception import NoInternetException
|
||||
from bauh.core import system
|
||||
from bauh.core.exception import NoInternetException
|
||||
|
||||
BASE_CMD = 'flatpak'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fpakman.core import resource
|
||||
from fpakman.core.flatpak.constants import FLATPAK_CACHE_PATH
|
||||
from fpakman.core.model import Application, ApplicationData
|
||||
from bauh.core import resource
|
||||
from bauh.core.flatpak.constants import FLATPAK_CACHE_PATH
|
||||
from bauh.core.model import Application, ApplicationData
|
||||
|
||||
|
||||
class FlatpakApplication(Application):
|
||||
@@ -4,13 +4,13 @@ from threading import Thread
|
||||
|
||||
from colorama import Fore
|
||||
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.flatpak import flatpak
|
||||
from fpakman.core.flatpak.constants import FLATHUB_API_URL, FLATHUB_URL
|
||||
from fpakman.core.flatpak.model import FlatpakApplication
|
||||
from fpakman.core.model import ApplicationStatus
|
||||
from fpakman.core.worker import AsyncDataLoader
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.flatpak import flatpak
|
||||
from bauh.core.flatpak.constants import FLATHUB_API_URL, FLATHUB_URL
|
||||
from bauh.core.flatpak.model import FlatpakApplication
|
||||
from bauh.core.model import ApplicationStatus
|
||||
from bauh.core.worker import AsyncDataLoader
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class FlatpakAsyncDataLoader(AsyncDataLoader):
|
||||
@@ -1,7 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from enum import Enum
|
||||
|
||||
from fpakman.core import resource
|
||||
from bauh.core import resource
|
||||
|
||||
|
||||
class ApplicationStatus(Enum):
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
from fpakman import ROOT_DIR
|
||||
from bauh import ROOT_DIR
|
||||
|
||||
|
||||
def get_path(resource_path):
|
||||
@@ -1,4 +1,4 @@
|
||||
from fpakman.core.constants import CACHE_PATH
|
||||
from bauh.core.constants import CACHE_PATH
|
||||
|
||||
SNAP_API_URL = 'https://search.apps.ubuntu.com/api/v1'
|
||||
SNAP_CACHE_PATH = '{}/snap/installed'.format(CACHE_PATH)
|
||||
@@ -4,15 +4,15 @@ from argparse import Namespace
|
||||
from datetime import datetime
|
||||
from typing import Dict, List
|
||||
|
||||
from fpakman.core import disk
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.disk import DiskCacheLoader
|
||||
from fpakman.core.model import ApplicationData, Application, ApplicationUpdate
|
||||
from fpakman.core.snap import snap
|
||||
from fpakman.core.snap.model import SnapApplication
|
||||
from fpakman.core.snap.worker import SnapAsyncDataLoader
|
||||
from fpakman.core.system import FpakmanProcess
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.core import disk
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.disk import DiskCacheLoader
|
||||
from bauh.core.model import ApplicationData, Application, ApplicationUpdate
|
||||
from bauh.core.snap import snap
|
||||
from bauh.core.snap.model import SnapApplication
|
||||
from bauh.core.snap.worker import SnapAsyncDataLoader
|
||||
from bauh.core.system import BauhProcess
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class SnapManager(ApplicationManager):
|
||||
@@ -76,8 +76,8 @@ class SnapManager(ApplicationManager):
|
||||
def read_installed(self, disk_loader: DiskCacheLoader) -> List[SnapApplication]:
|
||||
return [self.map_json(app_json, installed=True, disk_loader=disk_loader) for app_json in snap.read_installed()]
|
||||
|
||||
def downgrade_app(self, app: Application, root_password: str) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=snap.downgrade_and_stream(app.base_data.name, root_password), wrong_error_phrase=None)
|
||||
def downgrade_app(self, app: Application, root_password: str) -> BauhProcess:
|
||||
return BauhProcess(subproc=snap.downgrade_and_stream(app.base_data.name, root_password), wrong_error_phrase=None)
|
||||
|
||||
def clean_cache_for(self, app: SnapApplication):
|
||||
self.api_cache.delete(app.base_data.name)
|
||||
@@ -88,11 +88,11 @@ class SnapManager(ApplicationManager):
|
||||
def can_downgrade(self):
|
||||
return True
|
||||
|
||||
def update_and_stream(self, app: SnapApplication) -> FpakmanProcess:
|
||||
def update_and_stream(self, app: SnapApplication) -> BauhProcess:
|
||||
pass
|
||||
|
||||
def uninstall_and_stream(self, app: SnapApplication, root_password: str) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=snap.uninstall_and_stream(app.base_data.name, root_password))
|
||||
def uninstall_and_stream(self, app: SnapApplication, root_password: str) -> BauhProcess:
|
||||
return BauhProcess(subproc=snap.uninstall_and_stream(app.base_data.name, root_password))
|
||||
|
||||
def get_app_type(self):
|
||||
return SnapApplication
|
||||
@@ -112,8 +112,8 @@ class SnapManager(ApplicationManager):
|
||||
def get_history(self, app: Application) -> List[dict]:
|
||||
return []
|
||||
|
||||
def install_and_stream(self, app: SnapApplication, root_password: str) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=snap.install_and_stream(app.base_data.name, app.confinement, root_password))
|
||||
def install_and_stream(self, app: SnapApplication, root_password: str) -> BauhProcess:
|
||||
return BauhProcess(subproc=snap.install_and_stream(app.base_data.name, app.confinement, root_password))
|
||||
|
||||
def is_enabled(self) -> bool:
|
||||
return snap.is_installed()
|
||||
@@ -125,8 +125,8 @@ class SnapManager(ApplicationManager):
|
||||
def requires_root(self, action: str, app: SnapApplication):
|
||||
return action != 'search'
|
||||
|
||||
def refresh(self, app: SnapApplication, root_password: str) -> FpakmanProcess:
|
||||
return FpakmanProcess(subproc=snap.refresh_and_stream(app.base_data.name, root_password))
|
||||
def refresh(self, app: SnapApplication, root_password: str) -> BauhProcess:
|
||||
return BauhProcess(subproc=snap.refresh_and_stream(app.base_data.name, root_password))
|
||||
|
||||
def prepare(self):
|
||||
pass
|
||||
@@ -1,6 +1,6 @@
|
||||
from fpakman.core import resource
|
||||
from fpakman.core.model import Application, ApplicationData
|
||||
from fpakman.core.snap.constants import SNAP_CACHE_PATH
|
||||
from bauh.core import resource
|
||||
from bauh.core.model import Application, ApplicationData
|
||||
from bauh.core.snap.constants import SNAP_CACHE_PATH
|
||||
|
||||
|
||||
class SnapApplication(Application):
|
||||
@@ -2,7 +2,7 @@ import re
|
||||
import subprocess
|
||||
from typing import List
|
||||
|
||||
from fpakman.core import system
|
||||
from bauh.core import system
|
||||
|
||||
BASE_CMD = 'snap'
|
||||
|
||||
@@ -3,13 +3,13 @@ import traceback
|
||||
|
||||
from colorama import Fore
|
||||
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.model import ApplicationStatus
|
||||
from fpakman.core.snap import snap
|
||||
from fpakman.core.snap.constants import SNAP_API_URL
|
||||
from fpakman.core.snap.model import SnapApplication
|
||||
from fpakman.core.worker import AsyncDataLoader
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.model import ApplicationStatus
|
||||
from bauh.core.snap import snap
|
||||
from bauh.core.snap.constants import SNAP_API_URL
|
||||
from bauh.core.snap.model import SnapApplication
|
||||
from bauh.core.worker import AsyncDataLoader
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class SnapAsyncDataLoader(AsyncDataLoader):
|
||||
@@ -2,11 +2,11 @@ import os
|
||||
import subprocess
|
||||
from typing import List
|
||||
|
||||
from fpakman import __app_name__
|
||||
from fpakman.core import resource
|
||||
from bauh import __app_name__
|
||||
from bauh.core import resource
|
||||
|
||||
|
||||
class FpakmanProcess:
|
||||
class BauhProcess:
|
||||
|
||||
def __init__(self, subproc: subprocess.Popen, success_phrase: str = None, wrong_error_phrase: str = '[sudo] password for'):
|
||||
self.subproc = subproc
|
||||
@@ -3,7 +3,7 @@ from threading import Thread
|
||||
|
||||
from colorama import Fore
|
||||
|
||||
from fpakman.core.model import Application
|
||||
from bauh.core.model import Application
|
||||
|
||||
|
||||
class AsyncDataLoader(Thread):
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -2,7 +2,7 @@ import time
|
||||
from threading import Thread
|
||||
from typing import List
|
||||
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class CacheCleaner(Thread):
|
||||
@@ -1,6 +1,6 @@
|
||||
import locale
|
||||
|
||||
from fpakman.core import resource
|
||||
from bauh.core import resource
|
||||
import glob
|
||||
import re
|
||||
|
||||
@@ -2,11 +2,11 @@ from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QDialog, QLabel
|
||||
|
||||
from fpakman import __version__, __app_name__
|
||||
from fpakman.core import resource
|
||||
from bauh import __version__, __app_name__
|
||||
from bauh.core import resource
|
||||
|
||||
PROJECT_URL = 'https://github.com/vinifmor/fpakman'
|
||||
LICENSE_URL = 'https://raw.githubusercontent.com/vinifmor/fpakman/master/LICENSE'
|
||||
PROJECT_URL = 'https://github.com/vinifmor/' + __app_name__
|
||||
LICENSE_URL = 'https://raw.githubusercontent.com/vinifmor/{}/master/LICENSE'.format(__app_name__)
|
||||
|
||||
|
||||
class AboutDialog(QDialog):
|
||||
@@ -8,12 +8,12 @@ from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest
|
||||
from PyQt5.QtWidgets import QTableWidget, QTableView, QMenu, QAction, QTableWidgetItem, QWidget, \
|
||||
QHeaderView, QLabel, QHBoxLayout, QPushButton, QToolButton, QToolBar
|
||||
|
||||
from fpakman.core import resource
|
||||
from fpakman.core.model import ApplicationStatus
|
||||
from fpakman.util import util
|
||||
from fpakman.util.cache import Cache
|
||||
from fpakman.view.qt import dialog
|
||||
from fpakman.view.qt.view_model import ApplicationView, ApplicationViewStatus
|
||||
from bauh.core import resource
|
||||
from bauh.core.model import ApplicationStatus
|
||||
from bauh.util import util
|
||||
from bauh.util.cache import Cache
|
||||
from bauh.view.qt import dialog
|
||||
from bauh.view.qt.view_model import ApplicationView, ApplicationViewStatus
|
||||
|
||||
INSTALL_BT_STYLE = 'background: {back}; color: white; font-size: 10px; font-weight: bold'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
|
||||
from fpakman.core import resource
|
||||
from bauh.core import resource
|
||||
|
||||
|
||||
def show_error(title: str, body: str, icon: QIcon = QIcon(resource.get_path('img/logo.svg'))):
|
||||
@@ -5,7 +5,7 @@ from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QColor
|
||||
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QTableWidget, QTableWidgetItem, QHeaderView
|
||||
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
|
||||
class HistoryDialog(QDialog):
|
||||
@@ -2,8 +2,8 @@ from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QFormLayout, QGroupBox, \
|
||||
QLineEdit, QLabel
|
||||
|
||||
from fpakman.util import util
|
||||
from fpakman.util.cache import Cache
|
||||
from bauh.util import util
|
||||
from bauh.util.cache import Cache
|
||||
|
||||
IGNORED_ATTRS = {'name', '__app__'}
|
||||
|
||||
@@ -4,7 +4,7 @@ import subprocess
|
||||
|
||||
from PyQt5.QtWidgets import QInputDialog, QLineEdit
|
||||
|
||||
from fpakman.view.qt.dialog import show_error
|
||||
from bauh.view.qt.dialog import show_error
|
||||
|
||||
|
||||
def is_root():
|
||||
@@ -6,12 +6,12 @@ from PyQt5.QtCore import QThread, pyqtSignal, QCoreApplication, Qt
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QSystemTrayIcon, QMenu
|
||||
|
||||
from fpakman import __app_name__
|
||||
from fpakman.core import resource, system
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.model import ApplicationUpdate
|
||||
from fpakman.view.qt.about import AboutDialog
|
||||
from fpakman.view.qt.window import ManageWindow
|
||||
from bauh import __app_name__
|
||||
from bauh.core import resource, system
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.model import ApplicationUpdate
|
||||
from bauh.view.qt.about import AboutDialog
|
||||
from bauh.view.qt.window import ManageWindow
|
||||
|
||||
|
||||
class UpdateCheck(QThread):
|
||||
@@ -6,18 +6,18 @@ from typing import List
|
||||
import requests
|
||||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.exception import NoInternetException
|
||||
from fpakman.core.model import ApplicationStatus
|
||||
from fpakman.core.system import FpakmanProcess
|
||||
from fpakman.util.cache import Cache
|
||||
from fpakman.view.qt import dialog
|
||||
from fpakman.view.qt.view_model import ApplicationView
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.exception import NoInternetException
|
||||
from bauh.core.model import ApplicationStatus
|
||||
from bauh.core.system import BauhProcess
|
||||
from bauh.util.cache import Cache
|
||||
from bauh.view.qt import dialog
|
||||
from bauh.view.qt.view_model import ApplicationView
|
||||
|
||||
|
||||
class AsyncAction(QThread):
|
||||
|
||||
def notify_subproc_outputs(self, proc: FpakmanProcess, signal) -> bool:
|
||||
def notify_subproc_outputs(self, proc: BauhProcess, signal) -> bool:
|
||||
"""
|
||||
:param subproc:
|
||||
:param signal:
|
||||
@@ -1,6 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
from fpakman.core.model import Application
|
||||
from bauh.core.model import Application
|
||||
|
||||
|
||||
class ApplicationViewStatus(Enum):
|
||||
@@ -7,19 +7,19 @@ from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QPixmap
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication, QCheckBox, QHeaderView, QToolButton, QToolBar, \
|
||||
QSizePolicy, QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QHBoxLayout
|
||||
|
||||
from fpakman.core import resource, system
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.model import Application
|
||||
from fpakman.util.cache import Cache
|
||||
from fpakman.view.qt import dialog
|
||||
from fpakman.view.qt.about import AboutDialog
|
||||
from fpakman.view.qt.apps_table import AppsTable
|
||||
from fpakman.view.qt.history import HistoryDialog
|
||||
from fpakman.view.qt.info import InfoDialog
|
||||
from fpakman.view.qt.root import is_root, ask_root_password
|
||||
from fpakman.view.qt.thread import UpdateSelectedApps, RefreshApps, UninstallApp, DowngradeApp, GetAppInfo, \
|
||||
from bauh.core import resource, system
|
||||
from bauh.core.controller import ApplicationManager
|
||||
from bauh.core.model import Application
|
||||
from bauh.util.cache import Cache
|
||||
from bauh.view.qt import dialog
|
||||
from bauh.view.qt.about import AboutDialog
|
||||
from bauh.view.qt.apps_table import AppsTable
|
||||
from bauh.view.qt.history import HistoryDialog
|
||||
from bauh.view.qt.info import InfoDialog
|
||||
from bauh.view.qt.root import is_root, ask_root_password
|
||||
from bauh.view.qt.thread import UpdateSelectedApps, RefreshApps, UninstallApp, DowngradeApp, GetAppInfo, \
|
||||
GetAppHistory, SearchApps, InstallApp, AnimateProgress, VerifyModels, RefreshApp, FindSuggestions, ListWarnings
|
||||
from fpakman.view.qt.view_model import ApplicationView
|
||||
from bauh.view.qt.view_model import ApplicationView
|
||||
|
||||
DARK_ORANGE = '#FF4500'
|
||||
|
||||
11
setup.py
@@ -7,7 +7,8 @@ DESCRIPTION = (
|
||||
|
||||
AUTHOR = "Vinicius Moreira"
|
||||
AUTHOR_EMAIL = "vinicius_fmoreira@hotmail.com"
|
||||
URL = "https://github.com/vinifmor/fpakman"
|
||||
NAME = 'bauh'
|
||||
URL = "https://github.com/vinifmor/" + NAME
|
||||
|
||||
file_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -15,12 +16,12 @@ with open(file_dir + '/requirements.txt', 'r') as f:
|
||||
requirements = [line.strip() for line in f.readlines() if line]
|
||||
|
||||
|
||||
with open(file_dir + '/fpakman/__init__.py', 'r') as f:
|
||||
with open(file_dir + '/{}/__init__.py'.format(NAME), 'r') as f:
|
||||
exec(f.readlines()[0])
|
||||
|
||||
|
||||
setup(
|
||||
name="fpakman",
|
||||
name=NAME,
|
||||
version=eval('__version__'),
|
||||
description=DESCRIPTION,
|
||||
long_description=DESCRIPTION,
|
||||
@@ -29,11 +30,11 @@ setup(
|
||||
python_requires=">=3.5",
|
||||
url=URL,
|
||||
packages=find_packages(),
|
||||
package_data={"fpakman": ["resources/locale/*", "resources/img/*"]},
|
||||
package_data={NAME: ["resources/locale/*", "resources/img/*"]},
|
||||
install_requires=requirements,
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"fpakman=fpakman.app"
|
||||
"{name}={name}.app".format(name=NAME)
|
||||
]
|
||||
},
|
||||
include_package_data=True,
|
||||
|
||||