diff --git a/README.md b/README.md index 37e769a3..4d0152dc 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ In the [actions](https://github.com/Dummerle/Rare/actions) tab you can find pack Execute `pip install Rare` for all users, or `pip install Rare --user` for the current user only. -Linux and Mac: execute `rare` in your terminal. +Linux, Mac and FreeBSD: execute `rare` in your terminal. Windows: execute `pythonw -m rare` in cmd @@ -123,6 +123,7 @@ On Mac: If you want to be able to use the automatic login, run `pip install -r optional_requirements.txt` If you are on Arch you can run `sudo pacman --needed -S python-wheel python-setuptools python-pyqt5 python-qtawesome python-requests python-psutil` + If you are on FreeBSD you have to install py39-qt5 from the packages: `sudo pkg install py39-qt5` 4. Run `python3 -m rare` ## Contributing diff --git a/pyproject.toml b/pyproject.toml index ef7ce535..b4e12d10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ pywin32 = { version = "^304", markers = "platform_system == 'Windows'" } pywebview = [ { version = "^3.6.3", extras = ["cef"], platform = "windows", optional = true }, { version = "^3.6.3", extras = ["gtk"], platform = "linux", optional = true }, + { version = "^3.6.3", extras = ["gtk"], platform = "freebsd", optional = true }, ] legendary-gl = "^0.20.32" typing-extensions = "^4.3.0" diff --git a/rare/utils/paths.py b/rare/utils/paths.py index dbbd7bf1..9ba54959 100644 --- a/rare/utils/paths.py +++ b/rare/utils/paths.py @@ -80,6 +80,10 @@ __link_suffix = { "link": "lnk", "icon": "ico", }, + "FreeBSD": { + "link": "desktop", + "icon": "png", + }, "Linux": { "link": "desktop", "icon": "png", @@ -128,7 +132,7 @@ def get_rare_executable() -> List[str]: # lk: detect if nuitka if "__compiled__" in globals(): executable = [sys.executable] - elif platform.system() == "Linux" or platform.system() == "Darwin": + elif platform.system() == "Linux" or platform.system() == "Darwin" or platform.system() == "FreeBSD": if p := os.environ.get("APPIMAGE"): executable = [p] else: @@ -199,7 +203,7 @@ def create_desktop_link(app_name: str, app_title: str = "", link_name: str = "", else: logger.info(f"Creating shortcut for {app_title} at {shortcut_path}") - if platform.system() == "Linux": + if platform.system() == "Linux" or platform.system() == "FreeBSD": executable = get_rare_executable() executable = shlex.join(executable) if not for_rare: diff --git a/requirements-full.txt b/requirements-full.txt index cbd4cb0c..f9e309c1 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -6,6 +6,7 @@ setuptools legendary-gl pywin32; platform_system == "Windows" pywebview[qt]; platform_system == "Linux" +pywebview[qt]; platform_system == "FreeBSD" pythonnet>=3.0.0rc4; platform_system == "Windows" cefpython3; platform_system == "Windows" pywebview[cef]; platform_system == "Windows" diff --git a/requirements-webview.txt b/requirements-webview.txt index 32befea2..0fbf6423 100644 --- a/requirements-webview.txt +++ b/requirements-webview.txt @@ -1,4 +1,5 @@ pywebview[qt]; platform_system == "Linux" +pywebview[qt]; platform_system == "FreeBSD" pythonnet>=3.0.0rc4; platform_system == "Windows" cefpython3; platform_system == "Windows" pywebview[cef]; platform_system == "Windows" diff --git a/setup.py b/setup.py index c1907f01..48bd2e14 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ requirements = [ optional_reqs = dict( webview=[ 'pywebview[gtk]; platform_system == "Linux"', + 'pywebview[gtk]; platform_system == "FreeBSD"', 'pywebview[cef]; platform_system == "Windows"', ], pypresence=["pypresence"]