misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
Docs screenshots from a stock Windows, taken on GitHub's runner (#129)
Ahmed Nefzaouiccb60e8b8809
diff --git a/.github/workflows/docs-shots.yml b/.github/workflows/docs-shots.ymlnew file mode 100644index 00000000..87863541--- /dev/null+++ b/.github/workflows/docs-shots.yml@@ -0,0 +1,118 @@+# The README's, docs/' and the site's screenshots (tools/lab/docs-shots.ps1), taken on GitHub's+# Windows runner: a stock Windows, so the file icons in them are Windows' own, not those of+# programs someone installed. Run by hand (Actions → Docs screenshots → Run workflow) or by a+# push to a docs-shots/** branch. Never on other pushes or pull requests. The PNGs come back as+# the "docs-shots" artifact, with what the runner had (screen, DPI, fonts, file associations);+# a person puts them in docs/images and runs tools/website/screens.py.+name: Docs screenshots++on:+ workflow_dispatch:+ push:+ branches: ["docs-shots/**"]++permissions:+ contents: read++jobs:+ shots:+ runs-on: windows-latest+ timeout-minutes: 60+ defaults:+ run:+ shell: powershell+ steps:+ - uses: actions/checkout@v4++ - name: Toolchain+ run: rustup show active-toolchain; if (-not $?) { rustup toolchain install }++ - uses: actions/cache@v4+ with:+ path: |+ ~/.cargo/registry+ ~/.cargo/git+ target+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}+ restore-keys: ${{ runner.os }}-cargo-++ - name: Build+ run: cargo build -p mdm-app -p mdm-labserver++ # The runner has no GPU and only Windows' OpenGL 1.1; the app needs 3.x. Mesa's llvmpipe+ # (software OpenGL 4.6) is put beside the program for this job only (mesa-dist-win,+ # pinned and checked).+ - name: Software OpenGL (Mesa llvmpipe)+ run: |+ $ErrorActionPreference = "Stop"+ $url = "https://github.com/pal1000/mesa-dist-win/releases/download/26.2.4/mesa3d-26.2.4-release-msvc.7z"+ Invoke-WebRequest -UseBasicParsing $url -OutFile "$env:RUNNER_TEMP\mesa.7z"+ $sum = (Get-FileHash "$env:RUNNER_TEMP\mesa.7z" -Algorithm SHA256).Hash+ if ($sum -ne "351FC8C8B695878FFB3EAA044B3EAD08672A48B1A045E3C3E3975811DF0F6695") { throw "mesa checksum $sum" }+ 7z e "$env:RUNNER_TEMP\mesa.7z" -otarget\debug x64\opengl32.dll x64\libgallium_wgl.dll -y+ if ($LASTEXITCODE) { throw "7z $LASTEXITCODE" }++ # What the shots were taken with, kept beside them.+ - name: The runner's screen, DPI, fonts and file associations+ run: |+ $out = "$env:RUNNER_TEMP\shots"; New-Item -ItemType Directory -Force $out | Out-Null+ Add-Type -AssemblyName System.Windows.Forms+ & {+ "Windows: " + (Get-CimInstance Win32_OperatingSystem).Caption + " " + [Environment]::OSVersion.Version+ "Screen: " + [System.Windows.Forms.Screen]::PrimaryScreen.Bounds+ "DPI: " + (Get-ItemProperty "HKCU:\Control Panel\Desktop\WindowMetrics" -ErrorAction SilentlyContinue).AppliedDPI+ "Session: " + [Environment]::UserInteractive + ", " + (whoami)+ ""+ "Fonts:"+ $fonts = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"+ foreach ($f in "Segoe UI", "Tahoma", "Arial", "Microsoft Sans Serif") {+ $hit = $fonts.PSObject.Properties | Where-Object { $_.Name -like "$f (*" -or $_.Name -like "$f &*" } | Select-Object -First 1+ " $f : " + $(if ($hit) { $hit.Value } else { "missing" })+ }+ ""+ "File associations (HKEY_CLASSES_ROOT; the user's own choice, if any):"+ foreach ($e in ".pdf", ".mp3", ".mp4", ".mkv", ".csv", ".zip", ".exe", ".docx", ".msi", ".iso", ".txt", ".srt") {+ $prog = (Get-ItemProperty "Registry::HKEY_CLASSES_ROOT\$e" -ErrorAction SilentlyContinue)."(default)"+ $icon = if ($prog) { (Get-ItemProperty "Registry::HKEY_CLASSES_ROOT\$prog\DefaultIcon" -ErrorAction SilentlyContinue)."(default)" }+ $choice = (Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$e\UserChoice" -ErrorAction SilentlyContinue).ProgId+ " $e -> " + $(if ($prog) { $prog } else { "(none)" }) + $(if ($icon) { " icon: $icon" }) + $(if ($choice) { " user choice: $choice" })+ }+ } | Tee-Object "$out\runner.txt"++ - name: Screenshots+ env:+ GALLIUM_DRIVER: llvmpipe+ run: |+ $ErrorActionPreference = "Stop"+ $out = "$env:RUNNER_TEMP\shots"+ $exe = "target\debug\misterdownloadmanager.exe"; $srv = "target\debug\labserver.exe"+ $torrent = "tools\lab\Open Movie Night.torrent"+ # A neutral folder and address, as they show in the shots (Properties, Add torrent): the+ # downloads come from downloads.example (a reserved name, pointed at the lab server+ # on 127.0.0.1 in this runner's hosts file) on port 80. Windows' HTTP service may hold+ # port 80 (it answers 404): it is stopped, and 8080 taken if the port stays busy.+ $work = "C:\Demo"+ Add-Content "$env:SystemRoot\System32\drivers\etc\hosts" "`n127.0.0.1 downloads.example"+ $busy = { [bool](Get-NetTCPConnection -LocalPort 80 -State Listen -ErrorAction SilentlyContinue) }+ if (& $busy) { cmd /c "net stop http /y" | Out-Null }+ $port = if (& $busy) { 8080 } else { 80 }+ $base = if ($port -eq 80) { "http://downloads.example" } else { "http://downloads.example:$port" }+ # The address reaches the lab server, or no shot is taken.+ $lab = Start-Process -PassThru -WindowStyle Hidden $srv -ArgumentList "--bind 127.0.0.1:$port"+ Start-Sleep 2+ try { $code = (Invoke-WebRequest -UseBasicParsing "$base/gen/1K/check.bin").StatusCode } finally { Stop-Process -Id $lab.Id }+ "lab server at $base answers $code" | Tee-Object -Append "$out\runner.txt"+ if ($code -ne 200) { throw "the lab server isn't reached at $base" }+ $net = @{ Port = $port; UrlHost = "downloads.example" }+ # On the screen, as nobody watches it: llvmpipe draws nothing off the screens.+ $at = "40,40"+ tools\lab\docs-shots.ps1 -Exe $exe -Server $srv -Torrent $torrent -Work $work -At $at @net -OutDir "$out\docs" -Only main-light, add-torrent, properties, progress+ tools\lab\docs-shots.ps1 -Exe $exe -Server $srv -Work $work -At $at @net -OutDir "$out\docs" -Only main-dark+ tools\lab\docs-shots.ps1 -Exe $exe -Server $srv -Work $work -At $at @net -OutDir "$out\docs" -Lang ar -Only arabic-main+ tools\lab\docs-shots.ps1 -Exe $exe -Server $srv -Torrent $torrent -Work $work -At $at @net -Dark -OutDir "$out\site-dark" -Only main-dark, add-torrent, progress++ - uses: actions/upload-artifact@v4+ if: always()+ with:+ name: docs-shots+ path: ${{ runner.temp }}/shotsdiff --git a/ROADMAP.md b/ROADMAP.mdindex 7ff4e01d..1732d9e2 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -94,6 +94,8 @@ Everything below ships together, in one release.inside their list, with their place in it ([#102](https://github.com/anefzaoui/misterdownloadmanager/issues/102));the Categories pane, the menu bar and every right-click menu too, with Shift+F10 and the Menu key([#113](https://github.com/anefzaoui/misterdownloadmanager/issues/113))+- ✅ The README's, the docs' and the website's screenshots are taken on a stock Windows (GitHub's+ runner), so the file icons in them are Windows' own- ✅ Website in European Portuguese, and an [intended use](https://misterdownloadmanager.com/intended-use.html) page- ✅ Website: the [free IDM alternative](https://misterdownloadmanager.com/idm-alternative.html) page comparesMDM with IDM and with nine other free download managers, each checked on its own site, withdiff --git a/crates/app/src/main.rs b/crates/app/src/main.rsindex 3c612e0d..13bf9c89 100644--- a/crates/app/src/main.rs+++ b/crates/app/src/main.rs@@ -81,6 +81,20 @@ pub fn offscreen() -> bool {*ON.get_or_init(|| std::env::var_os("MDM_OFFSCREEN").is_some_and(|v| v == "1"))}+/// Where [`offscreen`] puts the main window: far off the screens, or at `MDM_OFFSCREEN_AT=x,y`.+/// That is for a machine whose screen nobody watches (the docs screenshots on GitHub's runner,+/// .github/workflows/docs-shots.yml): there the software OpenGL (Mesa's llvmpipe) presents+/// through GDI, which draws nothing off the screens.+fn offscreen_at() -> [f32; 2] {+ std::env::var("MDM_OFFSCREEN_AT")+ .ok()+ .and_then(|v| {+ let (x, y) = v.split_once(',')?;+ Some([x.trim().parse().ok()?, y.trim().parse().ok()?])+ })+ .unwrap_or([-20000.0, -20000.0])+}+/// A window's builder as [`offscreen`] wants it; unchanged otherwise. Dialogs open centred on/// the main window, so they are off the screens with it.pub fn quiet(builder: egui::ViewportBuilder) -> egui::ViewportBuilder {@@ -225,7 +239,7 @@ fn app() -> eframe::Result {viewport = viewport.with_position([x as f32, y as f32]);}if offscreen() {- viewport = viewport.with_position([-20000.0, -20000.0]);+ viewport = viewport.with_position(offscreen_at());}let opts = eframe::NativeOptions {viewport,diff --git a/docs/images/add-torrent.png b/docs/images/add-torrent.pngindex f7418a36..e89e5387 100644Binary files a/docs/images/add-torrent.png and b/docs/images/add-torrent.png differdiff --git a/docs/images/arabic-main.png b/docs/images/arabic-main.pngindex 3b12dea3..25c8c677 100644Binary files a/docs/images/arabic-main.png and b/docs/images/arabic-main.png differdiff --git a/docs/images/main-dark.png b/docs/images/main-dark.pngindex 50504322..2097ad40 100644Binary files a/docs/images/main-dark.png and b/docs/images/main-dark.png differdiff --git a/docs/images/main-light.png b/docs/images/main-light.pngindex 2798a6c7..c843ff36 100644Binary files a/docs/images/main-light.png and b/docs/images/main-light.png differdiff --git a/docs/images/progress.png b/docs/images/progress.pngindex b9baffcf..92244c44 100644Binary files a/docs/images/progress.png and b/docs/images/progress.png differdiff --git a/docs/images/properties.png b/docs/images/properties.pngindex db1168b1..4dbbbb62 100644Binary files a/docs/images/properties.png and b/docs/images/properties.png differdiff --git a/tools/lab/Open Movie Night.torrent b/tools/lab/Open Movie Night.torrentnew file mode 100644index 00000000..390671a2Binary files /dev/null and b/tools/lab/Open Movie Night.torrent differdiff --git a/tools/lab/docs-shots.ps1 b/tools/lab/docs-shots.ps1index cb9380df..a9e2c881 100644--- a/tools/lab/docs-shots.ps1+++ b/tools/lab/docs-shots.ps1@@ -1,4 +1,6 @@-# Screenshots for the README and docs/ (docs/images/<name>.png), at 1x: MDM_ZOOM=2 draws the content+# Screenshots for the README and docs/ (docs/images/<name>.png). The published ones are taken on+# GitHub's Windows runner (.github/workflows/docs-shots.yml), a stock Windows whose file icons are+# Windows' own; a run here shows this PC's. At 1x: MDM_ZOOM=2 draws the content# twice as large but Windows keeps the title bar at the display's scale, out of proportion. Runs its# own Mister Download Manager instance (its own data folder, MDM_DATA_DIR) and its own labserver,# both addressed by process id: the user's own instance and anything else running are never@@ -15,6 +17,9 @@ param([string]$OutDir = "docs\images",[string]$Lang = "en",[int]$Port = 8099,+ # The name the downloads' addresses use for the lab server (it listens on 127.0.0.1): one the+ # hosts file points there gives the shots a neutral address (docs-shots.yml: downloads.example).+ [string]$UrlHost = "127.0.0.1",[int]$Zoom = 1,# A .torrent file: its Add torrent window becomes add-torrent.png.[string]$Torrent = "",@@ -22,6 +27,10 @@ param([string[]]$Only = @(),# Dark mode for every window (View → Always dark: Windows' own mode doesn't matter).[switch]$Dark,+ # Where the main window opens instead of far off the screens (MDM_OFFSCREEN_AT, "x,y"): on a+ # machine nobody watches whose OpenGL is software (GitHub's runner, docs-shots.yml), which+ # draws nothing off the screens.+ [string]$At = "",# The run's temporary folder, whose path shows in some windows (Add torrent's); default# target\docs-shots in this checkout. From a worktree, the main checkout's target keeps it short.[string]$Work = ""@@ -106,7 +115,7 @@ function Shot([int]$procId, [string]$title, [string]$name) {$srv = $null; $app = $nulltry {if (Test-Path $work) { Remove-Item $work -Recurse -Force }- New-Item -ItemType Directory -Force "$work\data", "$work\dl" | Out-Null+ New-Item -ItemType Directory -Force "$work\data", "$work\Downloads" | Out-Null# The language is chosen (no first-start picker); light mode unless asked, dark with View →# Always dark, whatever Windows' own mode. Every category's folder is under $work, so no shot# shows the user's own folders (or name). Nothing reaches out: no update check, and the torrent@@ -126,11 +135,13 @@ try {',"category_dirs":[' + ($dirs -join ",") + ']}}')$srv = Start-Process -PassThru -WindowStyle Hidden $Server -ArgumentList "--bind 127.0.0.1:$Port"+ $base = if ($Port -eq 80) { "http://$UrlHost" } else { "http://${UrlHost}:$Port" }# /show crash-test:freeze for the crash report window's shot.$env:MDM_CRASH_TEST = "1"$env:MDM_DATA_DIR = "$work\data"$env:MDM_ZOOM = "$Zoom"$env:MDM_OFFSCREEN = "1"+ if ($At) { $env:MDM_OFFSCREEN_AT = $At }$app = Start-Process -PassThru $ExeStart-Sleep 3$main = @(Titles $app.Id | Where-Object { $_ -like "Mister Download Manager*" })[0]@@ -144,7 +155,7 @@ try {@("ubuntu-26.04-desktop-amd64.iso", "6G", "?rate=256K"))foreach ($f in $files) {- & $Exe /d "http://127.0.0.1:$Port/gen/$($f[1])/$($f[0])$($f[2])" /p "$work\dl" /n+ & $Exe /d "$base/gen/$($f[1])/$($f[0])$($f[2])" /p "$work\Downloads" /nStart-Sleep -Milliseconds 400}# Let the small ones finish; close the dialogs they open (Download complete, progress), never@@ -231,7 +242,7 @@ try {} finally {if ($app) { Stop-Process -Id $app.Id -ErrorAction SilentlyContinue }if ($srv) { Stop-Process -Id $srv.Id -ErrorAction SilentlyContinue }- Remove-Item Env:MDM_DATA_DIR, Env:MDM_ZOOM, Env:MDM_OFFSCREEN, Env:MDM_CRASH_TEST -ErrorAction SilentlyContinue+ Remove-Item Env:MDM_DATA_DIR, Env:MDM_ZOOM, Env:MDM_OFFSCREEN, Env:MDM_OFFSCREEN_AT, Env:MDM_CRASH_TEST -ErrorAction SilentlyContinue# The downloads (a 6 GB file partly fetched) don't stay behind.Start-Sleep 1Remove-Item $work -Recurse -Force -ErrorAction SilentlyContinuediff --git a/website/assets/screens/add-torrent-dark.webp b/website/assets/screens/add-torrent-dark.webpindex 0f31a629..a1a08c62 100644Binary files a/website/assets/screens/add-torrent-dark.webp and b/website/assets/screens/add-torrent-dark.webp differdiff --git a/website/assets/screens/add-torrent-light.webp b/website/assets/screens/add-torrent-light.webpindex aa30ea9c..9d46985b 100644Binary files a/website/assets/screens/add-torrent-light.webp and b/website/assets/screens/add-torrent-light.webp differdiff --git a/website/assets/screens/arabic-main.webp b/website/assets/screens/arabic-main.webpindex 59868f7f..0ee70047 100644Binary files a/website/assets/screens/arabic-main.webp and b/website/assets/screens/arabic-main.webp differdiff --git a/website/assets/screens/main-dark.webp b/website/assets/screens/main-dark.webpindex 0535027e..8d304236 100644Binary files a/website/assets/screens/main-dark.webp and b/website/assets/screens/main-dark.webp differdiff --git a/website/assets/screens/main-light.webp b/website/assets/screens/main-light.webpindex 6ec20a4a..9e65d6b8 100644Binary files a/website/assets/screens/main-light.webp and b/website/assets/screens/main-light.webp differdiff --git a/website/assets/screens/progress-dark.webp b/website/assets/screens/progress-dark.webpindex 26a4940b..249dcfc2 100644Binary files a/website/assets/screens/progress-dark.webp and b/website/assets/screens/progress-dark.webp differdiff --git a/website/assets/screens/progress-light.webp b/website/assets/screens/progress-light.webpindex 7ef68380..05450526 100644Binary files a/website/assets/screens/progress-light.webp and b/website/assets/screens/progress-light.webp differ