diff --git a/README.md b/README.md index 76c73ad..4dc23c7 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ To host a karaoke event, you only need to use the playback client. You can use t ## Installation +### Linux + The preferred way to install the client is via [Flathub](https://flathub.org/apps/rocks.syng.Syng). Alternatively Syng can be installed via the _Python Package Index_ (PyPI). When installing the client it is mandatory to include the `client` flag: @@ -41,6 +43,11 @@ This installs both the playback client (`syng client`) and a configuration GUI ( **Note:** When installing via PyPI, you need to have [mpv](https://mpv.io/) installed on the playback client, and the `mpv` binary must be in your `PATH`. +### Windows + +Windows support is experimental, but you can download the current version from [Releases](https://github.com/christofsteel/syng/releases). No installation necessary, you can just run the `exe`. + + ## Running The simplest way to run Syng is through the configuration GUI. Executing `syng` without parameters will open the GUI, from which you can start configure and start the playback client. You can start the playback client without the GUI using `syng client`. diff --git a/resources/windows/download_and_build.sh b/resources/windows/download_and_build.sh new file mode 100755 index 0000000..a2fe834 --- /dev/null +++ b/resources/windows/download_and_build.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +mkdir -p src +mkdir -p requirements +cd requirements + +# download mpv +wget https://nightly.link/mpv-player/mpv/workflows/build/master/mpv-x86_64-windows-msvc.zip +unzip mpv-x86_64-windows-msvc.zip +cp mpv.exe ../src +cp vulkan-1.dll ../src + +# download ffmpeg +wget https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z +7z x ffmpeg-release-full.7z +cp ffmpeg-7.1-full_build/bin/ffmpeg.exe ../src + + +cd .. +rm -rf requirements + +cp ../../requirements-client.txt src/requirements.txt +cp -r ../../syng/ src/ + +# docker run --volume "$(pwd)/src:/src/" batonogov/pyinstaller-linux:latest "pyinstaller --onefile syng/main.py" +# rm -rf src/build +# rm -rf src/dist +docker run --volume "$(pwd)/src:/src/" batonogov/pyinstaller-windows:latest "pyinstaller --onefile --add-binary '.\mpv.exe;.' --add-binary '.\vulkan-1.dll;.' --add-binary '.\ffmpeg.exe;.' syng/main.py" + +# cd syng-2.0.1 +# wine python -m poetry install -E client +# wine poetry run pyinstaller -w syng/main.py +# cp -rv build /out +# cp -rv dist /out diff --git a/syng/sources/s3.py b/syng/sources/s3.py index f69f447..2848bae 100644 --- a/syng/sources/s3.py +++ b/syng/sources/s3.py @@ -45,7 +45,7 @@ class S3Source(FileBasedSource): "secret_key": ("password", "Secret Key of the s3", ""), "secure": (bool, "Use SSL", True), "bucket": (str, "Bucket of the s3", ""), - "tmp_dir": (str, "Folder for\ntemporary download", "/tmp/syng"), + "tmp_dir": (str, "Folder for\ntemporary download", user_cache_dir("syng")), "index_file": (str, "Index file", os.path.join(user_cache_dir("syng"), "s3-index")), } diff --git a/syng/sources/youtube.py b/syng/sources/youtube.py index 1f24cab..1e3b86b 100644 --- a/syng/sources/youtube.py +++ b/syng/sources/youtube.py @@ -16,6 +16,7 @@ from typing import Any, Optional, Tuple from yt_dlp import YoutubeDL from yt_dlp.utils import DownloadError +from platformdirs import user_cache_dir from ..entry import Entry from ..result import Result @@ -183,7 +184,7 @@ class YoutubeSource(Source): config_schema = Source.config_schema | { "enabled": (bool, "Enable this source", True), "channels": (list, "A list channels\nto search in", []), - "tmp_dir": (str, "Folder for\ntemporary download", "/tmp/syng"), + "tmp_dir": (str, "Folder for\ntemporary download", user_cache_dir("syng")), "max_res": (int, "Maximum resolution\nto download", 720), "start_streaming": ( bool,