Add Linux support#1
Conversation
The Rust backend already compiled on Linux — all Windows-specific code (DPAPI, CREATE_NO_WINDOW, the yt-dlp binary name/URL) was already guarded behind cfg — so this is mostly packaging plus two WebKitGTK/Wayland runtime fixes. No Windows behaviour changes. - Bundle: add src-tauri/tauri.linux.conf.json with deb/rpm/appimage targets. deb/rpm declare their WebKitGTK, GTK and GStreamer runtime dependencies so audio decoding works out of the box. - Window resizing: a frameless window (decorations: false) has no resize affordance on WebKitGTK/WKWebView — only WebView2 provides an invisible native border. Add a WindowResizeHandles overlay that grabs the window edges/corners and calls startResizeDragging, mounted in the main shell and the floating player, gated off on Windows. Add the matching core:window:allow-start-resize-dragging capability. - Release CI: build on ubuntu-22.04 alongside windows-latest so Linux artifacts are published on tagged releases. - Docs: update README for Windows/Linux and list the Linux runtime deps, notably the GStreamer plugins WebKitGTK needs for playback.
|
Seems to work well so far. I've added it to the AUR with this PR applied: |
|
Sorry, I accidentally closed this — reopening. The linux-port branch is restored at the same commit (56632b4), so no changes to the diff. |
|
@ameenalasady This needs to be rebased, it no longer applies as of v0.2.0. |
|
@yochananmarqos Thanks! Rather than rebase this one, check out my fork for an up-to-date Linux port: https://github.com/ameenalasady/YTubic. It includes all upstream commits plus a lot of performance optimizations, fixes, and new features. |
|
@ameenalasady I've switched to your fork in the AUR package for now, then. Are you planning on submitting a revised PR? |
# Conflicts: # src/components/layout/app-shell.tsx
|
@ameenalasady Hey! I’m still learning how GitHub and pull requests work, but I’ve adapted your implementation to the current upstream codebase and prepared Linux support for the main branch. I’ve also credited you as a co-author of the integration commit. Is that okay with you? My goal is to keep all supported OS versions in the same repository and codebase, so they have the same functionality and new versions can be released together. |
|
@NUber-dev Sure thing, that works for me. Thanks for the credit! Glad to see Linux support making it into the main codebase, and nice work getting it all unified. Feel free to close this PR when done. |
Adds Linux as a supported platform. The Rust backend already compiled on Linux (all Windows-specific code is behind
cfg), so this is mostly packaging plus two WebKitGTK/Wayland fixes. No Windows changes.Changes
tauri.linux.conf.jsonaddsdeb,rpmandappimagetargets, with the WebKitGTK/GTK/GStreamer runtime dependencies declared fordeb/rpm.WindowResizeHandlesoverlay that grabs the edges/corners and callsstartResizeDragging, plus the matching capability. Gated off on Windows, where the native border already works.ubuntu-22.04job to the matrix so Linux artifacts ship on tagged releases.Testing
Built and run on CachyOS (KDE/Wayland, webkit2gtk 4.1):
pnpm build,cargo checkandcargo testall pass, playback works end to end (needsgst-plugins-goodforautoaudiosinkandmatroskademux), and the window resizes from every edge and corner.Known limitation
On Linux, sign-in cookies are stored unencrypted —
secure_storefalls back to plaintext off Windows (which uses DPAPI). Anonymous browsing and playback are unaffected; wiring this into libsecret is a sensible follow-up.