stremio-community-v5/docs/WINDOWS.md
Zarg 16d1bce51c WebView2 letss gooo
- Big Massive init
2025-01-15 10:23:31 +01:00

4.6 KiB
Raw Blame History

Building on Windows


🚀 Quick Overview

This guide walks you through the process of building Stremio on Windows. Follow the steps carefully to set up the environment, build dependencies, and compile the project.


🛠️ Requirements

Ensure the following are installed on your system:


📂 Setup Guide

1 Install Essential Tools


2 Install dependency

  1. Download vcpkg here.

  2. Install using vcpkg openssl:x64-windows-static and nlohmann-json:x64-windows-static


3 Prepare the MPV Library

  • Download the MPV library: MPV libmpv.
  • Use the mpv-x86_64 version.

Note: The submodule https://github.com/Zaarrg/libmpv already includes .lib, just make sure to unzip the actual .dll for x64 systems.


4 Clone and Configure the Repository

  1. Clone the repository:

    git clone --recursive git@github.com:Zaarrg/stremio-desktop-v5.git
    cd stremio-dekstop-v5
    
  2. Update CMake Options:

     -DCMAKE_TOOLCHAIN_FILE=C:/bin/vcpkg/scripts/buildsystems/vcpkg.cmake 
     -DVCPKG_TARGET_TRIPLET=x64-windows-static
    
    -DCMAKE_TOOLCHAIN_FILE=C:\bin\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static
    
  3. Download the server.js file:

    powershell -Command Start-BitsTransfer -Source "https://s3-eu-west-1.amazonaws.com/stremio-artifacts/four/v%package_version%/server.js" -Destination server.js
    

Note: To run the cmake project make sure to add stremio-runtime.exe, server.js beside the stremio.exe


5 Build / Deploying the Shell

  1. Make sure to run the following in the x64 Native Tools Command Prompt for VS 2022 or x86 Native Tools Command Prompt for VS 2022

    1. Run the deployment script in the build folder. By default builds x64
      node deploy_windows.js --installer
      
    • For Portable (Needs 7zip and /utils/WebviewRuntime/x64/EdgeWebView )

       node deploy_windows.js --portable
      
    • For x86

      node deploy_windows.js --x86 --installer
      
    • For Portable x86 (Needs 7zip and /utils/WebviewRuntime/x86/EdgeWebView )

       node deploy_windows.js --x86 --portable
      

Note: This script uses common path for DCMAKE_TOOLCHAIN_FILE of vcpkg, make sure the script has the correct one. If running with --installer make sure u installed nsis with the needed nsprocess plugin at least once.

  1. Done. This will build the installer and dist/win folder.

Note: This will create dist/win with all necessary files like node.exe, ffmpeg.exe. Also make sure to have stremio-runtime.exe, server.js are in utils\windows\ folder


📦 Installer (Optional)

  1. Download and install NSIS.
    Default path: C:\Program Files (x86)\NSIS.

  2. Generate the installer:

     FOR /F "tokens=4 delims=() " %i IN ('findstr /C:"project(stremio VERSION" CMakeLists.txt') DO @set "package_version=%~i"
    set arch = "x64";
    "C:\Program Files (x86)\NSIS\makensis.exe" utils\windows\installer\windows-installer.nsi
    
    • Result: Stremio %package_version%.exe.

🔧 Silent Installation

Run the installer with /S (silent mode) and configure via these options:

  • /notorrentassoc: Skip .torrent association.
  • /nodesktopicon: Skip desktop shortcut.

Silent uninstall:

"%LOCALAPPDATA%\Programs\LNV\Stremio-5\Uninstall.exe" /S /keepdata

Happy Building!