# Kiwy Signage Player - Windows Edition Build and run the Kiwy digital signage player on Windows as a standalone `.exe`. ## ๐Ÿ“‹ Requirements Analysis The original app was built for **Raspberry Pi (Linux)**, using these technologies: | Component | Original (RPi/Linux) | Windows Equivalent | |-----------|---------------------|-------------------| | **GUI** | Kivy 2.3+ | Kivy 2.3+ (works cross-platform) | | **Video** | ffpyplayer | ffpyplayer (needs FFmpeg DLLs) | | **Card Reader** | evdev (Linux input) | **Not available** โ€” gracefully disabled | | **Screen Keep-Awake** | xset, xdotool, Wayland | `SetThreadExecutionState` (Win32 API) | | **Weblink** | chromium-browser (kiosk) | Chrome/Edge (--kiosk mode) | | **Audio** | ALSA/PulseAudio | DirectSound | | **Window Backend** | SDL2 (Wayland/X11) | SDL2 (Windows native) | | **OpenGL** | Desktop GL | ANGLE (DirectX wrapper) | ### What works on Windows - โœ… Media playback (images, videos via ffpyplayer) - โœ… Playlist sync from DigiServer (HTTP/HTTPS) - โœ… Touch & mouse controls - โœ… Settings popup - โœ… Image editing/annotation - โœ… Password-protected exit - โœ… Web links (opens in Chrome/Edge kiosk) - โœ… Network monitoring - โœ… Auto-update playlist ### What is disabled on Windows - โŒ Card reader (evdev is Linux-only; `EVDEV_AVAILABLE = False`) - โŒ HDMI power management (tvservice is RPi-specific) - โŒ WiFi restart (uses Linux `nmcli`) ## ๐Ÿš€ Quick Start (Development) ### Prerequisites 1. **Python 3.10+** (64-bit) โ€” [python.org](https://python.org) 2. **FFmpeg** โ€” for video codec support - Download from [ffmpeg.org](https://ffmpeg.org/download.html) - Add `bin\` folder to your PATH 3. **Visual C++ Redistributable** โ€” [latest](https://aka.ms/vs/17/release/vc_redist.x64.exe) ### Install & Run ```batch cd windows REM Create virtual environment python -m venv venv venv\Scripts\activate REM Install dependencies pip install -r requirements_win.txt REM Run in development mode python run_win.py ``` ## ๐Ÿ“ฆ Building the .exe ### One-Command Build ```batch cd windows build_win.bat ``` ### Manual Build ```batch cd windows venv\Scripts\activate pip install -r requirements_win.txt pyinstaller build.spec --clean --noconfirm ``` ### Output ``` windows\dist\KiwySignagePlayer\ โ”œโ”€โ”€ KiwySignagePlayer.exe # Main executable โ”œโ”€โ”€ config/ # Config files (auto-copied) โ”œโ”€โ”€ resources/ # Icons, intro video โ””โ”€โ”€ ... (supporting DLLs) ``` For a **single-file .exe**, edit `build.spec` โ€” uncomment the `exe_onefile` section and comment out the `coll = COLLECT(...)` section. ## โš™๏ธ Configuration 1. On first run, config files are created in `%APPDATA%\KiwySignage\` 2. Edit `%APPDATA%\KiwySignage\config\app_config.json` to set your server: ```json { "server_ip": "192.168.0.109", "port": "8080", "screen_name": "Birou_IT", "quickconnect_key": "8887779", "orientation": "Landscape", "touch": "True", "max_resolution": "1920x1080", "edit_feature_enabled": true, "use_https": false, "verify_ssl": false } ``` ## ๐Ÿงช Testing ```batch cd windows venv\Scripts\activate python run_win.py ``` ## ๐Ÿ”ง Troubleshooting | Problem | Solution | |---------|----------| | **"ffpyplayer not found"** | Install: `pip install ffpyplayer` | | **"No video" / black screen** | Install FFmpeg and add to PATH. Try `KIVY_GL_BACKEND=angle_sdl2` or `KIVY_GL_BACKEND=gl` | | **Kivy window doesn't open** | Run from command prompt to see error messages. Ensure GPU drivers are up to date. | | **Weblinks not opening** | Install Google Chrome or Microsoft Edge | | **Can't connect to server** | Check firewall. Try `use_https: false` and `verify_ssl: false` for testing | | **Antivirus flags .exe** | Add the output folder to antivirus exclusions. This is a false positive common with PyInstaller. | ## ๐Ÿ“ Project Structure (Build) ``` Kiwy-Signage/ โ”œโ”€โ”€ windows/ โ”‚ โ”œโ”€โ”€ run_win.py # Windows entry point (patches platform differences) โ”‚ โ”œโ”€โ”€ build.spec # PyInstaller configuration โ”‚ โ”œโ”€โ”€ build_win.bat # One-click build script โ”‚ โ”œโ”€โ”€ pyi_runtime_hook.py # PyInstaller runtime hook โ”‚ โ”œโ”€โ”€ requirements_win.txt # Windows Python dependencies โ”‚ โ””โ”€โ”€ README_WINDOWS_BUILD.md # This file โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ main.py # Main application (original) โ”‚ โ”œโ”€โ”€ get_playlists_v2.py # Playlist sync โ”‚ โ”œโ”€โ”€ player_auth.py # Authentication โ”‚ โ”œโ”€โ”€ ssl_utils.py # SSL/HTTPS โ”‚ โ”œโ”€โ”€ keyboard_widget.py # On-screen keyboard โ”‚ โ”œโ”€โ”€ network_monitor.py # Network monitoring โ”‚ โ”œโ”€โ”€ edit_popup.py # Image editing โ”‚ โ””โ”€โ”€ signage_player.kv # Kivy UI layout โ”œโ”€โ”€ config/ โ”‚ โ”œโ”€โ”€ app_config.json # Player configuration โ”‚ โ””โ”€โ”€ resources/ # Icons, images, intro video โ”œโ”€โ”€ media/ # Downloaded media (created at runtime) โ”œโ”€โ”€ playlists/ # Playlist files (created at runtime) โ””โ”€โ”€ logs/ # Log files (created at runtime) ```