diff --git a/.gitignore b/.gitignore index 4d89670..ac65820 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ images/* ref ref/* config.json +DiaShower-venv +build +dist diff --git a/README.md b/README.md index e20ce66..5abab51 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # DiaShower A chromecast ambient mode like Diashow + + +## Setup and run +1. Make sure python is installed +2. Create a python VENV `python -m venv DiaShower-venv` +3. Activate the VENV `. ./DiaShower-venv/bin/activate` for :Linux or `.\DiaShower-venv\Scripts\Activate.ps1` for Windows +4. Install dependencies `pip install -r requirements.txt` +5. Copy the `config.json.example` to `config.json.example' and edit it to fit your needs +6. Create the the images folder definded in the config and put your images in to it +7. Run with `python server.py` + +## Convert to binary (Advanced) +* Make sure the VENV is still activated +1. Install `pyinstaller` using `pip install -U pyinstaller` +2. Create binary using `pyinstaller server-pyinstaller.spec` +3. The binary is created in the dist folder, to use it create a config an the configured image folder here (or wherever you move the binary to) + +* if you wish to cleanup you can remove the build (and if you copied the binary somware else the dist folder) +* Removing `pyinstaller` is safe you can use `pip uninstall -y altgraph setuptools packaging pyinstaller-hooks-contrib pyinstaller pywin32-ctypes pefile` diff --git a/server-pyinstaller.spec b/server-pyinstaller.spec new file mode 100644 index 0000000..ad35431 --- /dev/null +++ b/server-pyinstaller.spec @@ -0,0 +1,38 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['server.py'], + pathex=[], + binaries=[], + datas=[('show.html', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='server', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +)