Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
Windows: bin\ carries what raea needs, so a PC with nothing installed and no downloads works
shinyobjectz913931ad9af5
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4fca8d3d..f945edf9 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -217,9 +217,10 @@ jobs:retention-days: 3compression-level: 0- # Windows in Git's bash on GitHub's runner, with the Visual Studio Build Tools in its image (their image terms; we- # accept no licence and download no Microsoft files). The C runtime is the DLL one (the VC++ redistributable): ort's- # prebuilt ONNX Runtime is built against it, so crt-static doesn't link (LNK2019 on __imp_ symbols, 10-29).+ # Windows in Git's bash on GitHub's runner, with Visual Studio in its image. The C runtime is the DLL one: ONNX+ # Runtime is built against it (crt-static didn't link: LNK2019 on __imp_ symbols, 10-29), and Microsoft's+ # onnxruntime.dll imports it too, so the VC++ runtime's DLLs ship beside raea.exe from this image's Visual Studio+ # (tools/release/win-bundle.sh), as Microsoft documents for app-local deployment.windows:runs-on: ${{ (vars.RELEASE_WINDOWS_RUNNER && fromJSON(vars.RELEASE_WINDOWS_RUNNER)) || 'windows-latest' }}timeout-minutes: 350@@ -333,12 +334,16 @@ jobs:# static runtime ort links by default is built for AVX2 and stopped raea.exe at start on CPUs without it- name: ONNX Runtime (tools/release/onnxruntime.sh)run: bash tools/release/onnxruntime.sh target/dist- # which DLLs raea needs from the machine (the CRT's come from the VC++ redistributable)+ # and what a PC with nothing installed and no downloads needs beside raea.exe: the VC++ runtime (from this+ # runner's Visual Studio), FFmpeg (raea's LGPL build) and uv, each with its licence+ - name: The Windows bundle (tools/release/win-bundle.sh)+ run: bash tools/release/win-bundle.sh target/dist+ # which DLLs raea needs from the machine (the CRT's now ship beside it: win-bundle.sh)- name: What raea.exe importsrun: |{ echo '### what raea.exe, raea_bundle.dll, raea-perceive.exe and onnxruntime.dll import'; echo '```'dumpbin=$(ls "/c/Program Files/Microsoft Visual Studio"/*/*/VC/Tools/MSVC/*/bin/HostX64/x64/dumpbin.exe | head -1)- "$dumpbin" -nologo -dependents target/dist/raea.exe target/dist/raea_bundle.dll target/dist/raea-perceive.exe target/dist/onnxruntime.dll | grep -iE '\.dll$|Dump of' | sed 's/^ *//'+ "$dumpbin" -nologo -dependents target/dist/raea.exe target/dist/raea_bundle.dll target/dist/raea-perceive.exe target/dist/onnxruntime.dll target/dist/ffmpeg.exe | grep -iE '\.dll$|Dump of' | sed 's/^ *//'echo '```'; } | tee -a "$GITHUB_STEP_SUMMARY" || true# release.sh's checks render on Mesa's lavapipe (software Vulkan, MIT; on the runner only, never in the zip): the# runner has no GPU, and WARP, Windows' own software DX12, crashes compiling one of Bevy's compute shaders therediff --git a/NOTICE b/NOTICEindex 8dc43e59..2f9f860e 100644--- a/NOTICE+++ b/NOTICE@@ -20,8 +20,16 @@ animato (MIT OR Apache-2.0), usvg and resvg (Apache-2.0 OR MIT), mediabunny (MPLThe Windows build (docs/ports.feature PT20) adds: junction 1.4.2 (MIT, node_modules' links in io/npm) and windows-sys0.61.2 (Microsoft, MIT OR Apache-2.0, in io/trace); every build has dunce 1.0.5 (CC0-1.0 OR MIT-0 OR Apache-2.0, plain-paths for Windows in runtime/bundle). It ships none of Microsoft's C runtime or SDK files: the runtime comes from the-Microsoft Visual C++ Redistributable, installed on the machine.+paths for Windows in runtime/bundle). Its bin\ also carries, each with its licence beside it (tools/release/win-bundle.sh):+ Microsoft's Visual C++ runtime (vcruntime140.dll, vcruntime140_1.dll, msvcp140.dll, msvcp140_1.dll), redistributed+ under Microsoft's Visual Studio licence terms; ONNX Runtime's onnxruntime.dll (Microsoft, MIT);+ FFmpeg 9.0.2 (ffmpeg.exe, ffprobe.exe; LGPL-2.1-or-later), built from FFmpeg's release with FFmpeg's own code, zlib+ and libvpx 1.17.0's decoders (BSD-3-Clause with the WebM project's patent grant: libvpx-LICENSE.txt,+ libvpx-PATENTS.txt) by tools/release/ffmpeg-win.sh, its H.264 encoder Windows' own (Media Foundation), its source+ published as the release tools-ffmpeg-9.0.2-lgpl;+ uv (uv.exe; Astral, MIT OR Apache-2.0).+The Windows app adds Git for Windows with Git LFS (dugite-native; GPLv2 and its parts' licences, in git\), which raea+runs as a separate program; its complete corresponding source is published as the release tools-git-<tag>-sources.The native target (engine/rune, docs/targets.feature) builds on Rune (https://github.com/anomalyco/rune, Copyright2026 Anomaly, MIT; LICENSES/rune-0.0.1/repository-LICENSE): rune, rune-kit and their crates, by a pinned rev.diff --git a/README.md b/README.mdindex 465d48a4..050fece8 100644--- a/README.md+++ b/README.md@@ -86,8 +86,8 @@ On Windows 10 or 11, in PowerShell:irm https://raea.io/install.ps1 | iex```-It does the same under `~\.raea` and adds raea to your PATH. raea needs the Microsoft Visual C++ Redistributable-(x64), which most machines already have, and a DirectX 12 or Vulkan GPU driver.+It does the same under `~\.raea` and adds raea to your PATH. raea needs a DirectX 12 or Vulkan GPU driver; what+else it needs (the Visual C++ runtime, FFmpeg and uv) is in its `bin\` folder.## Hellodiff --git a/docs/manual/whats-new/0.1.8.md b/docs/manual/whats-new/0.1.8.mdindex 77d964a7..a95afc47 100644--- a/docs/manual/whats-new/0.1.8.md+++ b/docs/manual/whats-new/0.1.8.md@@ -24,8 +24,11 @@ On Windows, in PowerShell: `irm https://raea.io/install.ps1 | iex`.## What changed since 0.1.7**raea on Windows works.**-- ChatGPT, Claude, Gemini, OpenCode and Kimi install and connect on a Windows PC. A workspace is made even when Git- isn't installed.+- Nothing needs installing first, and nothing has to download. The app carries what raea needs from outside it:+ Git, FFmpeg, uv (which sets up the local models) and Microsoft's Visual C++ runtime, so it works on a work PC+ that blocks downloads. Before, raea.exe wouldn't start without the Visual C++ Redistributable, and a workspace+ couldn't be made without Git.+- ChatGPT, Claude, Gemini, OpenCode and Kimi install and connect on a Windows PC.- The app calls your PC a PC: Ctrl, not ⌘, everywhere, the whiteboard too.- The installer asks where raea goes. It suggests a folder in your own profile, takes any empty folder you canwrite to (or the folder raea is already in), and says why it won't use one that already holds other files. An update goes@@ -35,9 +38,11 @@ On Windows, in PowerShell: `irm https://raea.io/install.ps1 | iex`.(#155) and on Intel's integrated graphics. 3D on DirectX 12 is now drawn as on a Mac; with `WGPU_BACKEND=dx12`set by hand, 0.1.7 drew a scene's shapes into one another.- A phone's or a camera's video plays, probes and checks. raea's own decoders read H.264 without B-frames, which is- what raea writes. The first time you open a video they can't read (most phone and camera footage: H.264 with- B-frames, HEVC, VP9), raea fetches FFmpeg once, about 114 MB, and checks it before use. Nothing needs installing- first.+ what raea writes, and the FFmpeg in the app reads the rest (most phone and camera footage: H.264 with B-frames,+ HEVC, VP9). It's built from FFmpeg's own source with no GPL part (FFmpeg's code and libvpx's decoders, for+ WebM with transparency), so its licence is the LGPL, and its source is published beside raea's releases. A clip+ raea cuts for you to play, such as `raea notes check`'s, uses Windows' own H.264 encoder. With raea from the zip and no FFmpeg on the PC, raea fetches+ the same build once and checks it before use.- Agents' npm tools and MCP servers start without a shell, and their arguments arrive as written in folders withspaces or letters outside ASCII.- raea starts on a PC whose processor has no AVX2, such as an Intel Core from 2011 or 2012 (#110). The ONNX Runtimediff --git a/io/assets/src/setup.rs b/io/assets/src/setup.rsindex a691f48a..d2ae3756 100644--- a/io/assets/src/setup.rs+++ b/io/assets/src/setup.rs@@ -30,18 +30,32 @@ fn on_path(name: &str) -> Option<PathBuf> {std::env::split_paths(&std::env::var_os("PATH")?).map(|d| d.join(&exe)).find(|p| p.is_file())}-/// The FFmpeg raea fetches on Windows when none is installed: GyanD's essentials build (the one winget's-/// Gyan.FFmpeg.Essentials installs), kept on GitHub for each release; its SHA-256 is GitHub's digest for the asset+/// The tool shipped beside raea's own executable: on Windows the release puts FFmpeg and uv in raea.exe's bin/// (tools/release/win-bundle.sh), so raea finds them however it was started and fetches nothing+fn beside_exe(name: &str) -> Option<PathBuf> {+ beside(&std::env::current_exe().ok()?, name)+}++fn beside(exe_path: &Path, name: &str) -> Option<PathBuf> {+ Some(exe_path.parent()?.join(exe(name))).filter(|p| p.is_file())+}++/// The FFmpeg raea ships beside raea.exe on Windows and fetches where it isn't: raea's own build of FFmpeg's release,+/// LGPL 2.1 or later: FFmpeg's own code, zlib and libvpx's decoders, its H.264 encoder Windows' own (Media+/// Foundation) (tools/release/ffmpeg-win.sh, published with its source as the prerelease tools-ffmpeg-9.0.2-lgpl). Until 0.1.8 raea fetched GyanD's essentials build, GPLv3 with GPL libraries+/// linked in, which raea couldn't ship. tools/release/win-bundle.sh reads these pins.const FFMPEG: &str = "9.0.2";-const FFMPEG_SUM: &str = "60f467265b1e312373dbcd92200c2618a74850f98d3d078e94296bb3fa2047ba";+const FFMPEG_TOP: &str = "ffmpeg-9.0.2-lgpl-win64";+const FFMPEG_URL: &str = "https://github.com/shinyobjectz/raea/releases/download/tools-ffmpeg-9.0.2-lgpl/ffmpeg-9.0.2-lgpl-win64.zip";+const FFMPEG_SUM: &str = "d3a3d8cdcd3ee488a94328200293a312e9c81923902b9fc3c9fa5dd18779ba8c";-/// `ffmpeg` or `ffprobe` as raea runs it: the one on the PATH; else raea's own in $RAEA_TOOLS_CACHE (else-/// ~/.cache/raea-tools)/ffmpeg/bin. On Windows, where FFmpeg is rarely installed, raea's own is fetched there once-/// (114 MB; ffmpeg.exe, ffprobe.exe and its LICENSE kept, about 210 MB) the first time a video raea's own decoders-/// can't read needs it, when `fetch`: H.264 with B-frames, HEVC, VP9 (a phone's or a camera's). Elsewhere FFmpeg is-/// the system's: a Mac reads those on VideoToolbox, and Linux has FFmpeg in its package manager.+/// `ffmpeg` or `ffprobe` as raea runs it: the one on the PATH; else the one beside raea's executable (the Windows+/// release ships it there); else raea's own in $RAEA_TOOLS_CACHE (else ~/.cache/raea-tools)/ffmpeg/bin. On Windows,+/// where FFmpeg is rarely installed, raea's own is fetched there once the first time a video raea's own decoders+/// can't read needs it, when `fetch`, if the release's copy is missing: H.264 with B-frames, HEVC, VP9 (a phone's or a+/// camera's). Elsewhere FFmpeg is the system's: a Mac reads those on VideoToolbox, and Linux has FFmpeg in its package+/// manager.pub fn ffmpeg_tool(name: &str, fetch: bool) -> Result<PathBuf, String> {- if let Some(p) = on_path(name) {+ if let Some(p) = on_path(name).or_else(|| beside_exe(name)) {return Ok(p);}let dir = raea_io_home::env_path("RAEA_TOOLS_CACHE", ".cache/raea-tools").join("ffmpeg");@@ -63,13 +77,11 @@ pub fn ffmpeg_tool(name: &str, fetch: bool) -> Result<PathBuf, String> {return Ok(bin);}raea_io_home::offline(&format!("fetching FFmpeg {FFMPEG} to read a video raea's own decoders can't"))?;- eprintln!("raea: this video needs FFmpeg, which isn't installed; fetching FFmpeg {FFMPEG} (114 MB, once) into {}", dir.display());- let name_zip = format!("ffmpeg-{FFMPEG}-essentials_build.zip");- let url = format!("https://github.com/GyanD/codexffmpeg/releases/download/{FFMPEG}/{name_zip}");- let top = format!("ffmpeg-{FFMPEG}-essentials_build");- let members = [format!("{top}/bin/ffmpeg.exe"), format!("{top}/bin/ffprobe.exe"), format!("{top}/LICENSE")];+ eprintln!("raea: this video needs FFmpeg, which isn't installed; fetching FFmpeg {FFMPEG} (once) into {}", dir.display());+ let name_zip = format!("{FFMPEG_TOP}.zip");+ let members = [format!("{FFMPEG_TOP}/bin/ffmpeg.exe"), format!("{FFMPEG_TOP}/bin/ffprobe.exe"), format!("{FFMPEG_TOP}/LICENSE")];let part = dir.with_file_name(format!("ffmpeg.part{}", std::process::id()));- let fetched = fetch_archive(&part, &url, &name_zip, FFMPEG_SUM, true, &members.each_ref().map(String::as_str));+ let fetched = fetch_archive(&part, FFMPEG_URL, &name_zip, FFMPEG_SUM, true, &members.each_ref().map(String::as_str));settle(&part, &dir, &bin, fetched, "FFmpeg")}@@ -78,13 +90,14 @@ pub fn venv_python(dir: &Path) -> PathBuf {if cfg!(windows) { dir.join(".venv").join("Scripts").join("python.exe") } else { dir.join(".venv").join("bin").join("python") }}-/// uv: $RAEA_UV, the one on the PATH, or raea's own, fetched the first time (about 20 MB) into $RAEA_TOOLS_CACHE (else-/// ~/.cache/raea-tools)/uv, as tools/ensure.sh does+/// uv: $RAEA_UV, the one on the PATH, the one beside raea's executable (the Windows release ships it there), or+/// raea's own, fetched the first time (about 20 MB) into $RAEA_TOOLS_CACHE (else ~/.cache/raea-tools)/uv, as+/// tools/ensure.sh doespub fn uv() -> Result<PathBuf, String> {if let Some(p) = std::env::var_os("RAEA_UV").map(PathBuf::from).filter(|p| p.is_file()) {return Ok(p);}- if let Some(p) = on_path("uv") {+ if let Some(p) = on_path("uv").or_else(|| beside_exe("uv")) {return Ok(p);}let dir = raea_io_home::env_path("RAEA_TOOLS_CACHE", ".cache/raea-tools").join("uv");@@ -192,6 +205,31 @@ pub fn run_setup(script: &Path, var: &str, dir: &Path) -> Result<std::process::Emod tests {use super::*;+ // the release's own copy beside the executable is found; a missing one isn't+ #[test]+ fn a_tool_beside_the_executable_is_found() {+ let root = std::env::temp_dir().join(format!("raea-beside-{}", std::process::id()));+ let _ = std::fs::remove_dir_all(&root);+ std::fs::create_dir_all(root.join("bin")).unwrap();+ std::fs::write(root.join("bin").join(exe("ffmpeg")), b"").unwrap();+ let raea = root.join("bin").join(exe("raea"));+ assert_eq!(beside(&raea, "ffmpeg"), Some(root.join("bin").join(exe("ffmpeg"))));+ assert_eq!(beside(&raea, "uv"), None);+ let _ = std::fs::remove_dir_all(&root);+ }++ // the pins tools/release/win-bundle.sh reads: one line each, as its sed expects+ #[test]+ fn the_bundle_reads_these_pins() {+ let src = include_str!("setup.rs");+ for c in ["FFMPEG_URL", "FFMPEG_SUM", "FFMPEG_TOP", "UV"] {+ assert_eq!(src.lines().filter(|l| l.starts_with(&format!("const {c}: &str = \""))).count(), 1, "{c}");+ }+ assert!(FFMPEG_URL.ends_with(&format!("/{FFMPEG_TOP}.zip")) && FFMPEG_TOP.contains(FFMPEG));+ assert!(FFMPEG_SUM.len() == 64 && FFMPEG_SUM.bytes().all(|b| b.is_ascii_hexdigit()), "FFMPEG_SUM is a sha256");+ assert!(src.contains(" (\"x86_64-pc-windows-msvc\", \""));+ }+// a fetch's end sweeps the parts stopped fetches left beside its tool, and only those#[test]fn settle_sweeps_stopped_fetches() {@@ -203,7 +241,7 @@ mod tests {std::fs::write(p.join(f), b"x").unwrap();};// two stopped fetches (one with its zip), another tool's part, and this run's finished part- mk(&root.join("ffmpeg.part111"), "ffmpeg-9.0.2-essentials_build.zip");+ mk(&root.join("ffmpeg.part111"), "ffmpeg-9.0.2-lgpl-win64.zip");mk(&root.join("ffmpeg.part222"), "x");mk(&root.join("uv.part333"), "x");let part = root.join("ffmpeg.part444");diff --git a/tools/release-check.sh b/tools/release-check.shindex 7d833175..41003407 100644--- a/tools/release-check.sh+++ b/tools/release-check.sh@@ -150,15 +150,27 @@ api=$(cat "$check"/raea/bin/* | grep -aoE '(api|sign)\.raea\.io|RAEA_(SIGN|GEN)_[ -z "$api" ] || fail "the binaries name raea's API ($api): build raea-cli with --no-default-features"keys=$(grep -rlE 'sk-or-v1-[0-9a-f]{20}|sk-ant-[A-Za-z0-9_-]{20}|(^|[^A-Za-z0-9+/])AKIA[0-9A-Z]{16}([^A-Za-z0-9+/=]|$)|BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY' "$check/raea" 2>/dev/null | head -5 || true)[ -z "$keys" ] || fail "key-shaped text in: $keys"-# Windows: our binaries only. Any other DLL, or a file named like the CRT, the SDK or DirectX's redistributables, is-# Microsoft's and isn't ours to ship. The one exception is ONNX Runtime's onnxruntime.dll, which Microsoft publishes-# under MIT, shipped with its licence (#110: tools/release/onnxruntime.sh)-ms=$(cd "$check/raea" && find . -type f \( -iname '*.dll' ! -path './bin/raea_bundle.dll' ! -path './bin/onnxruntime.dll' -o -iname 'vcruntime*' -o -iname 'msvcp*' -o -iname 'ucrtbase*' -o -iname 'api-ms-win*' -o -iname 'concrt*' -o -iname 'vccorlib*' -o -iname '*.lib' -o -iname '*.pdb' -o -iname 'd3dcompiler*' -o -iname 'dxcompiler*' -o -iname 'dxil*' \) | head -5)+# Windows: our binaries, and Microsoft's only where raea ships them on purpose, with their licences: ONNX Runtime's+# onnxruntime.dll (MIT, #110) and the VC++ runtime's four DLLs (tools/release/win-bundle.sh). Any other DLL, or a file+# named like the CRT, the SDK or DirectX's redistributables, isn't ours to ship.+bundle=$(cat "$(dirname "$0")/release/win-bundle.files")+allowed=$(printf './bin/%s\n' raea_bundle.dll onnxruntime.dll $bundle)+ms=$(cd "$check/raea" && find . -type f \( -iname '*.dll' -o -iname 'vcruntime*' -o -iname 'msvcp*' -o -iname 'ucrtbase*' -o -iname 'api-ms-win*' -o -iname 'concrt*' -o -iname 'vccorlib*' -o -iname '*.lib' -o -iname '*.pdb' -o -iname 'd3dcompiler*' -o -iname 'dxcompiler*' -o -iname 'dxil*' \) | grep -ivxF "$allowed" | head -5 || true)[ -z "$ms" ] || fail "files that aren't ours: $ms"if [ -f "$check/raea/bin/raea.exe" ]; thenfor f in onnxruntime.dll onnxruntime-LICENSE.txt onnxruntime-ThirdPartyNotices.txt; do[ -f "$check/raea/bin/$f" ] || fail "bin/$f is missing: raea.exe loads ONNX Runtime from it, and its licence goes with it (#110)"done+ # what a PC with nothing installed and no downloads needs, each with its licence+ for f in $bundle; do+ [ -f "$check/raea/bin/$f" ] || fail "bin/$f is missing (tools/release/win-bundle.sh): a PC without it can't start raea, read a phone's video or set up a model"+ done+ "$check/raea/bin/ffmpeg.exe" -hide_banner -L 2>&1 | grep -q "Lesser General Public" || fail "bin/ffmpeg.exe isn't raea's LGPL build"+ # alpha WebM decodes with libvpx (#113), and a clip a person plays is cut to H.264 with Windows' own encoder+ for c in libvpx-vp9 h264_mf; do+ "$check/raea/bin/ffmpeg.exe" -hide_banner -codecs 2>&1 | grep -q "$c" || fail "bin/ffmpeg.exe has no $c"+ done+ "$check/raea/bin/uv.exe" --version 2>&1 | grep -q '^uv ' || fail "bin/uv.exe doesn't run"fiecho "release: $archive checked: an unpacked copy rendered a frame and checked an app on both targets with RAEA_NO_TREE=1"rm -rf "$check"diff --git a/tools/release.sh b/tools/release.shindex d34cd1f9..df9fd570 100755--- a/tools/release.sh+++ b/tools/release.sh@@ -137,11 +137,15 @@ loader (Debian and Ubuntu: apt install libxkbcommon-x11-0 libxcursor1 libxi6 lib[ -f "$bin/$f" ] || { echo "release.sh: $bin has no $f (tools/release/onnxruntime.sh $bin)" >&2; exit 1; }cp "$bin/$f" "$stage/bin/"done- # the C runtime isn't in the zip (ort's ONNX Runtime needs its DLLs, and they're Microsoft's to ship): the VC++- # redistributable, which most Windows machines already have, provides it+ # and what a PC with nothing installed and no downloads needs (tools/release/win-bundle.sh): the VC++ runtime+ # raea.exe and onnxruntime.dll import, FFmpeg (raea's LGPL build) and uv, each with its licence+ for f in $(cat "$root/tools/release/win-bundle.files"); do+ [ -f "$bin/$f" ] || { echo "release.sh: $bin has no $f (tools/release/win-bundle.sh $bin)" >&2; exit 1; }+ cp "$bin/$f" "$stage/bin/"+ doneprintf '%s\r\n' "raea $version for Windows x86_64 (Windows 10 or 11, a DirectX 12 or Vulkan GPU driver; with no GPU, Mesa's lavapipe and WGPU_BACKEND=vulkan)." \- "It needs the Microsoft Visual C++ Redistributable (x64), which most machines already have:" \- "https://aka.ms/vs/17/release/vc_redist.x64.exe" > "$stage/README.txt" ;;+ "bin\\ carries what raea needs from outside it: Microsoft's Visual C++ runtime and ONNX Runtime, FFmpeg (LGPL) and uv," \+ "each with its licence beside it (ffmpeg-README.txt says where FFmpeg's source is)." > "$stage/README.txt" ;;*) cp "$bin/raea" "$bin/libraea_bundle.dylib" "$bin/raea-perceive" "$bin/raea-rune-host" "$bin/raea-page-host" "$stage/bin/"# stripped as they linked (tools/link-jit.sh, #88); a binary that still holds its debug map is a build from beforefor f in raea raea-page-host raea-rune-host raea-perceive; dodiff --git a/tools/release/win-bundle.files b/tools/release/win-bundle.filesnew file mode 100644index 00000000..58dc3df5--- /dev/null+++ b/tools/release/win-bundle.files@@ -0,0 +1,14 @@+vcruntime140.dll+vcruntime140_1.dll+msvcp140.dll+msvcp140_1.dll+vcruntime-NOTICE.txt+ffmpeg.exe+ffprobe.exe+ffmpeg-LICENSE.txt+ffmpeg-README.txt+libvpx-LICENSE.txt+libvpx-PATENTS.txt+uv.exe+uv-LICENSE-MIT.txt+uv-LICENSE-APACHE.txtdiff --git a/tools/release/win-bundle.sh b/tools/release/win-bundle.shnew file mode 100755index 00000000..57baf19e--- /dev/null+++ b/tools/release/win-bundle.sh@@ -0,0 +1,62 @@+#!/usr/bin/env bash+# What raea.exe needs beside it on Windows, so a PC with nothing installed and no way to download (a work PC whose+# IT blocks GitHub's downloads) starts raea, reads a phone's video and sets up a local model. tools/release.sh packs it+# into the Windows zip's bin\, and the Windows app takes that bin\ whole.+# - the Visual C++ runtime: vcruntime140.dll, vcruntime140_1.dll, msvcp140.dll and msvcp140_1.dll, which raea.exe and+# onnxruntime.dll import. Microsoft's redistributable, from the Visual Studio on the runner that built raea, put+# beside the exe as Microsoft documents for app-local deployment; until 0.1.8 a PC without the VC++ redistributable+# installed couldn't start raea.exe at all+# - FFmpeg (ffmpeg.exe, ffprobe.exe): raea's own LGPL build (tools/release/ffmpeg-win.sh), the one setup.rs fetches+# where it isn't, with its licence and where its source is+# - uv (uv.exe), the release every local model's setup was measured with (MIT or Apache 2.0), with both licences+# The pins are setup.rs's, so what ships and what's fetched are the same build.+# tools/release/win-bundle.sh DEST (on the Windows runner, in Git's bash)+set -euo pipefail+die() { echo "win-bundle: $*" >&2; exit 1; }+dest=${1:?DEST}+root=$(cd "$(dirname "$0")/../.." && pwd)+setup=$root/io/assets/src/setup.rs+const() { sed -n "s/^const $1: &str = \"\\(.*\\)\";$/\\1/p" "$setup"; }+sha() { (sha256sum "$1" 2>/dev/null || shasum -a 256 "$1") | cut -d' ' -f1; }+fetch() { curl -fsSL --retry 5 --retry-all-errors --connect-timeout 30 -o "$2" "$1" || die "couldn't download $1"; [ "$(sha "$2")" = "$3" ] || die "$1 isn't the $3 pinned"; }+tmp=$(mktemp -d)+trap 'rm -rf "$tmp"' EXIT+mkdir -p "$dest"++# the VC++ runtime, from the newest Visual Studio with the C++ tools+vswhere="/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"+[ -x "$vswhere" ] || die "no vswhere at $vswhere: the C runtime comes from the runner's Visual Studio"+vs=$(cygpath -u "$("$vswhere" -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | tr -d '\r')")+ver=$(tr -d '\r\n ' < "$vs/VC/Auxiliary/Build/Microsoft.VCRedistVersion.default.txt")+crt=$(ls -d "$vs/VC/Redist/MSVC/$ver/x64"/Microsoft.VC14*.CRT 2>/dev/null | tail -1)+[ -n "$crt" ] || die "no Microsoft.VC14*.CRT under $vs/VC/Redist/MSVC/$ver/x64"+for f in vcruntime140.dll vcruntime140_1.dll msvcp140.dll msvcp140_1.dll; do+ [ -f "$crt/$f" ] || die "$crt has no $f"+ cp "$crt/$f" "$dest/$f"+done+printf '%s\r\n' "vcruntime140.dll, vcruntime140_1.dll, msvcp140.dll and msvcp140_1.dll are Microsoft's Visual C++ runtime ($ver)," \+ "redistributed with raea as Microsoft's Visual Studio licence terms allow, so raea starts on a PC that doesn't have the" \+ "Visual C++ Redistributable installed. They're Microsoft's, not raea's." > "$dest/vcruntime-NOTICE.txt"++# FFmpeg+url=$(const FFMPEG_URL); sum=$(const FFMPEG_SUM); top=$(const FFMPEG_TOP)+[ -n "$url" ] && [ -n "$sum" ] && [ -n "$top" ] || die "no FFMPEG_URL, FFMPEG_SUM and FFMPEG_TOP in $setup"+fetch "$url" "$tmp/ffmpeg.zip" "$sum"+unzip -q -o "$tmp/ffmpeg.zip" -d "$tmp/ff"+cp "$tmp/ff/$top/bin/ffmpeg.exe" "$tmp/ff/$top/bin/ffprobe.exe" "$dest/"+cp "$tmp/ff/$top/LICENSE" "$dest/ffmpeg-LICENSE.txt"+cp "$tmp/ff/$top/README.txt" "$dest/ffmpeg-README.txt"+cp "$tmp/ff/$top/libvpx-LICENSE" "$dest/libvpx-LICENSE.txt"+cp "$tmp/ff/$top/libvpx-PATENTS" "$dest/libvpx-PATENTS.txt"++# uv, and its licences from its source at the same tag+uv=$(const UV)+uvsum=$(sed -n 's/^ *("x86_64-pc-windows-msvc", "\([0-9a-f]*\)"),$/\1/p' "$setup")+[ -n "$uv" ] && [ -n "$uvsum" ] || die "no UV and its x86_64-pc-windows-msvc sha256 in $setup"+fetch "https://github.com/astral-sh/uv/releases/download/$uv/uv-x86_64-pc-windows-msvc.zip" "$tmp/uv.zip" "$uvsum"+unzip -q -o "$tmp/uv.zip" uv.exe -d "$dest"+[ "$uv" = 0.12.24 ] || die "uv is $uv: pin its LICENSE-MIT and LICENSE-APACHE here for that tag"+fetch "https://raw.githubusercontent.com/astral-sh/uv/$uv/LICENSE-MIT" "$dest/uv-LICENSE-MIT.txt" 860e3d7a86b84e6a7012c7a635fc64df475cebc6cce34dfeb73a5982ec58176c+fetch "https://raw.githubusercontent.com/astral-sh/uv/$uv/LICENSE-APACHE" "$dest/uv-LICENSE-APACHE.txt" c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4++echo "win-bundle: in $dest: the VC++ runtime $ver, FFmpeg ($top), uv $uv, with their licences"