6.1 KiB
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:
- Operating System: Windows 7 or newer
- Utilities: 7zip or similar
- Tools:
📂 Setup Guide
1️⃣ Install Essential Tools
- Git: Download and install.
- Visual Studio: Download Community 2022.
- Vcpkg: Download
2️⃣ Install dependency
-
Download vcpkg here.
-
Install using vcpkg
openssl:x64-windows-static,nlohmann-json:x64-windows-static,webview2:x64-windows-staticandcurl:x64-windows-static
⏳ Note: To deploy x86 install the x86 versions of the dependencies above.
3️⃣ Prepare the MPV Library
- Optional step as mpv is included as submodule:
- Download the MPV library: MPV libmpv.
- Use the
mpv-x86_64version.
⏳ 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
- Clone the repository:
git clone --recursive git@github.com:Zaarrg/stremio-desktop-v5.git cd stremio-dekstop-v5 - Update CMake Options:
As Oneliner:-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=x64-windows-static - Download the
server.jsfile: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.jsbeside thestremio.exe
5️⃣ Build / Deploying the Shell
-
Make sure to run the following in the
x64 Native Tools Command Prompt for VS 2022orx86 Native Tools Command Prompt for VS 2022- Run the deployment script in the
buildfolder. By default buildsx64node deploy_windows.js --installer
-
For Portable (Needs
7zipand/utils/WebviewRuntime/x64/EdgeWebView)node deploy_windows.js --portable -
For x86
node deploy_windows.js --x86 --installer -
For Portable x86 (Needs
7zipand/utils/WebviewRuntime/x86/EdgeWebView)node deploy_windows.js --x86 --portable
- Run the deployment script in the
-
Requirements
- To run the deploy_window.js script successfully the following is always required:
libmpv-2.dllindeps/libmpv/i686forx86ordeps/libmpv/x86_64forx64server.jsandstremio-runtime.exeinutils/windowsffmpegfolder with ffmpeg and .dlls inutils/windows/ffmpeganime4kinutils/mpv/anime4k/portable_configstremio-settings.inias default settings inutils/stremiovcpkg toolchaininC:/bin/vcpkg/scripts/buildsystems/vcpkg.cmakeor change theVCPKG_CMAKEpath in the script.cmake-build-release-x64orcmake-build-release-x86folders in project root. Run cmake once before deployment for this.
- For the installer
nsisinC:\Program Files (x86)\NSIS\makensis.exeor change path manuallynsprocessnsis plugin. Can be found inutils/window/NsProcess. Drop the contents into your nsis install folder.
- For Portable
7zipinC:\Program Files\7-Zip\7z.exeorC:\Program Files (x86)\7-Zip\7z.exeWebView2 Runtimeinutils/windows/WebviewRuntime/x64/EdgeWebViewor../x86/EdgeWebView. The Runtime can be found atC:\Program Files (x86)\Microsoft\EdgeWebView\Application\131.0.2903.146. Copy the contents of this to ourutils/windows/WebviewRuntime/x64/EdgeWebView. Forx86installWebView2 Runtime x86and do the same.
- To run the deploy_window.js script successfully the following is always required:
⏳ Note: This script uses common path for
DCMAKE_TOOLCHAIN_FILEof vcpkg, make sure the script has the correct one. If running with--installermake sure u installednsiswith the needednsprocessplugin at least once.
- Done. This will build the
installeranddist/winfolder.
⏳ Note: This will create
dist/winwith all necessary files likenode.exe,ffmpeg.exe. Also make sure to havestremio-runtime.exe, server.jsare inutils\windows\folder
📦 Installer (Optional)
-
Download and install NSIS.
Default path:C:\Program Files (x86)\NSIS. -
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.
- Result:
🔧 Silent Installation
Run the installer with /S (silent mode) and configure via these options:
/notorrentassoc: Skip.torrentassociation./nodesktopicon: Skip desktop shortcut.
Silent uninstall:
"%LOCALAPPDATA%\Programs\LNV\Stremio-5\Uninstall.exe" /S /keepdata
✨ Happy Building!