Skip to content

Commit e000a13

Browse files
committed
feat: prepare native desktop 1.0.0 release
1 parent 2cebc61 commit e000a13

121 files changed

Lines changed: 5922 additions & 3109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
[env]
2+
# The embedded stream-server library must not link its standalone EXE resource
3+
# table into the Stremio GUI executable. The GUI supplies its own icon/version.
4+
STREAM_SERVER_SKIP_WINDOWS_RESOURCES = "1"
5+
16
[target.'cfg(all(windows, target_env = "msvc"))']
2-
# MPV's official MSVC dependency bundle uses /MD. Keep Rust on the matching
3-
# dynamic CRT while libmpv, FFmpeg, and the codec stack remain static archives.
7+
# Keep Rust and its statically linked native crates on the static MSVC runtime.
8+
# libmpv remains isolated behind its DLL C API boundary.
49
rustflags = ["-C", "target-feature=+crt-static"]

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# The statically linked MPV SDK is required by playback-mpv/build.rs.
2-
# Keep the reproducible binary inputs out of normal Git object storage.
3-
/dist/mpv/**/*.lib filter=lfs diff=lfs merge=lfs -text
1+
* text=auto

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: github-actions
10+
directory: /
11+
schedule:
12+
interval: weekly
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependency freshness
2+
3+
on:
4+
schedule:
5+
- cron: "17 4 * * *"
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- "mpv.lock.json"
10+
- "**/Cargo.toml"
11+
- "Cargo.lock"
12+
13+
jobs:
14+
rust:
15+
runs-on: windows-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
submodules: recursive
20+
- uses: dtolnay/rust-toolchain@stable
21+
- uses: Swatinem/rust-cache@v2
22+
- run: cargo install cargo-outdated --locked
23+
- run: cargo outdated --workspace --exit-code 1

.github/workflows/mpv-windows.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Desktop release builds
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
paths:
10+
- "**/*.rs"
11+
- "**/*.slint"
12+
- "**/Cargo.toml"
13+
- "Cargo.lock"
14+
- "mpv.lock.json"
15+
- "setup/**"
16+
- ".github/workflows/**"
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
CARGO_NET_RETRY: 10
21+
CARGO_HTTP_MULTIPLEXING: false
22+
23+
jobs:
24+
windows:
25+
name: Windows x64
26+
runs-on: windows-2022
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
submodules: recursive
31+
- uses: dtolnay/rust-toolchain@stable
32+
with:
33+
target: x86_64-pc-windows-msvc
34+
- uses: Swatinem/rust-cache@v2
35+
- name: Build release
36+
run: cargo build --locked --release --package stremio-native
37+
- name: Verify runtime bundle
38+
shell: pwsh
39+
run: |
40+
$root = "target/release"
41+
@("stremio-native.exe", "libmpv-2.dll", "licenses/mpv/LICENSE.GPL", "licenses/mpv/LICENSE.LGPL") | ForEach-Object {
42+
if (-not (Test-Path (Join-Path $root $_))) { throw "Missing release artifact: $_" }
43+
}
44+
- name: Build installer and updater archive
45+
shell: cmd
46+
run: |
47+
set "SKIP_BUILD=1"
48+
call setup\create_setup.cmd
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: stremio-native-windows-x64
52+
path: |
53+
target/release/stremio-native.exe
54+
target/release/libmpv-2.dll
55+
target/release/licenses/mpv
56+
artifacts/StremioSetup-v*-x64.exe
57+
artifacts/stremio-native-v*-x86_64-pc-windows-msvc.zip
58+
if-no-files-found: error
59+
60+
linux:
61+
name: Linux x64
62+
runs-on: ubuntu-24.04
63+
steps:
64+
- uses: actions/checkout@v5
65+
with:
66+
submodules: recursive
67+
- uses: dtolnay/rust-toolchain@stable
68+
- uses: Swatinem/rust-cache@v2
69+
- name: Install native dependencies
70+
run: |
71+
sudo apt-get update
72+
sudo apt-get install -y build-essential clang cmake ninja-build pkg-config libssl-dev libtorrent-rasterbar-dev libboost-dev libclang-dev libgtk-3-dev libayatana-appindicator3-dev libmpv-dev libfontconfig1-dev libfreetype6-dev libxkbcommon-dev libwayland-dev libx11-xcb-dev libxcb-shape0-dev libxcb-xfixes0-dev libgl1-mesa-dev libegl1-mesa-dev
73+
- name: Build release
74+
run: cargo build --locked --release --package stremio-native
75+
- uses: actions/upload-artifact@v4
76+
with:
77+
name: stremio-native-linux-x64
78+
path: target/release/stremio-native
79+
if-no-files-found: error

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
# Rust and generated build output
22
/target/
3+
/dist/mpv/
34

45
# Runtime-generated application state and downloaded artwork
56
/storage/
67
/image_cache/
78
/config.json
9+
/config.json.bak
10+
/artifacts/
811

912
# Local diagnostics and performance captures
1013
/trace-*.json
1114
*.log
1215

1316
# Local agent, editor, and automation metadata
1417
/.agents/
15-
/.github/
1618
/docs/
1719
/skills-lock.json
1820
/.idea/
1921
/.vscode/
2022
*.swp
2123
*.tmp
24+
/app/ui/debug/
25+
/vendor/skia/
2226

2327
# Non-build documentation
2428
/README.md

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vendor/stremio-translations"]
2+
path = vendor/stremio-translations
3+
url = https://github.com/Stremio/stremio-translations.git

CHANGELOG.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,53 @@
22

33
This file records notable changes to Stremio Native relative to the initial source snapshot.
44

5-
## Unreleased - 2026-07-16
5+
## Unreleased - 2026-07-18
6+
7+
### Desktop lifecycle and startup
8+
9+
- Projects the persisted model for the active tab synchronously before starting network loads and performs tab-entry projection on Slint's UI thread, preventing an older queued snapshot from replacing newer Continue Watching, Calendar, Library, Discover, Addons, or Settings state.
10+
- Runs Core sequential effects through a single FIFO executor instead of spawning them concurrently, so an older library/profile storage snapshot cannot commit after a newer snapshot and reappear after restart.
11+
- Reloads only the bounded initial Board/Search catalog range when first-login profile hydration introduces addon catalogs that Core intentionally leaves unloaded, removing the former full-restart requirement.
12+
- Invalidates Calendar's cached metadata requests only when its relevant library items or addon catalogs change; unchanged revisits reuse the ready schedule without a network reload.
13+
- Uses Core's canonical storage-key constants at startup, retains a legacy `server_urls` read fallback, and maps the legacy JSON filename to the canonical `streaming_server_urls` database key.
14+
- Shows the Slint client and starts its event loop before icon lookup, tray/update setup, database initialization, stream-server startup, storage hydration, Core construction, or MPV initialization; the responsive loading UI is now the first startup milestone and reports `shell_ready_ms` for cold-start profiling.
15+
- Runs stream-server startup and all independent Core storage reads concurrently after configuration is available.
16+
- Configures Turso WAL through its row-returning query path, batches the remaining pragmas and schema work, migrates legacy storage in one transaction, and defers log/image-table maintenance beyond the first-frame window.
17+
- Initializes libmpv's shared OpenGL context from the first available render callback after deferred engine startup and requests that callback explicitly, fixing audio-only playback when Slint's one-time graphics-setup event occurred before MPV was ready.
18+
- Queues network-backed external subtitles through libmpv's asynchronous command API and cancels outstanding subtitle requests before Stop, keeping the MPV actor free to process Player Back immediately while preserving ordered `loadfile`/`stop` semantics.
19+
- Reprojects a matching ready Core details model immediately on every details entry path, preventing repeat visits to cached titles from waiting forever for a state event Core correctly omits.
20+
- Keeps details-page Back navigation available during genuine metadata loading so a failed or slow request cannot trap the client on its skeleton state.
21+
- Removes the tray component by ownership during post-event-loop shutdown instead of changing its finalized visibility property, preventing Slint's `Constant property being changed` panic on quit.
22+
- Adds a native system tray with GUI-relevant actions for opening Stremio, Settings, logs, update checks, installation, and quit; closing the window now respects the quit-on-close setting and otherwise hides to the tray.
23+
- Queues tray-driven show/navigation operations onto Slint's event loop to avoid re-entrant Winit window borrows.
24+
- Adds single-instance activation plus official `stremio:` and `magnet:` deep-link forwarding, with commands queued until Core and playback are ready.
25+
- Keeps the latest Discord activity pending while IPC is unavailable, retries connection with a bounded 2-to-30-second backoff, and treats media/pause/resume activity changes as reconnect opportunities without blocking the UI.
26+
27+
### Native shell and UI polish
28+
29+
- Uses the official desktop card interaction split: one Discover click selects and loads the metadata preview, a double-click opens full details, and Library retains its one-click details route through the same shared card primitive.
30+
- Uses the stream-server's exact `icon_48.png` and `app.ico` assets for the tray, Slint window, taskbar, executable resources, and Windows installer.
31+
- Applies the official shell's `#15122b` Windows caption color with white caption text while keeping the operating system's native title-bar controls.
32+
- Centers the Stremio navigation mark against the same fixed rail and header tokens used by the sidebar icons at every responsive UI scale.
33+
- Vertically centers the details stream-row play button in a full-height action slot, including rows whose descriptions wrap.
34+
- Adds localized tray/update strings, a web-style language selector, application/build/shell versions in their official Settings positions, and shell version `1.0.0`.
35+
- Adds an official-style update notification and installer flow backed by GitHub releases through `self_update`.
36+
37+
### Playback dependency and release system
38+
39+
- Replaces the tracked static MPV SDK with the pinned optimized x86-64-v3 `libmpv-2.dll` and COFF import library from the trusted shinchiro GitHub release.
40+
- Downloads, extracts, SHA-256 verifies, caches, links, and deploys the DLL and pinned licenses directly from the Rust build script; Cargo builds no longer require PowerShell, 7-Zip, or repository-stored media binaries.
41+
- Resolves dynamic libmpv through `pkg-config` on Linux, with `STREMIO_MPV_DIR` retained as an explicit local SDK override.
42+
- Pins the current Core head plus its `flate2` compatibility correction from `perpetus/stremio-core`, and pins the lifecycle-fixed stream-server revision through remote Git dependencies, so clean CI checkouts do not rely on sibling repositories.
43+
- Disables stream-server's standalone Windows EXE resource table only when it is embedded, preventing duplicate `VERSIONINFO`/icon resources while preserving the GUI executable's own `1.0.0` metadata.
44+
- Preserves only OpenGL state supported by the active context and uses an ES2-compatible RGBA render target, preventing ES3-only libmpv sharing operations from leaking `GL_INVALID_ENUM` into Slint/FemtoVG on Windows.
45+
- Adds clean Windows and Linux release jobs. The Windows job also produces the Inno Setup installer and GitHub updater archive.
46+
47+
### Resource baseline
48+
49+
- The settled `1.0.0` process measured 358.6 MB private working set and 0.19% five-second CPU, 455.8 MB (56.0%) below the retained 814.4 MB official Stremio WebView2 baseline.
50+
51+
## Earlier implementation baseline - 2026-07-16
652

753
### Highlights
854

0 commit comments

Comments
 (0)