Skip to content
e-dream-aiPublic

About

No description, website, or topics provided.

Resources

Stars

35 stars

Watchers

2 watching

Forks

Repository files navigation

Copyright e-dream, inc

2025.05     renamed e-dream to infinidream
2023.07     forked to work with new server and repository, renamed from Electric Sheep to e-dream
2015.05     moved from code.google.com repo
2011.01.30  based on revision 1546 on sf.net

infinidream: visuals for your vibe. a platform for generative visuals. this repository has the native client. See the backend for the server that it connects to.

Originally known as Electric Sheep.

dev docs

This repository no longer uses Git LFS. Commits from before LFS was dropped (#762) stored cache/univ-osx/**/libavcodec.a in LFS, so checking one of those out still needs git lfs install first.

If you are doing releases you will need:

brew install gh                      # GitHub releases, appcast, Homebrew cask
gh auth login
brew install bugsnag/tap/bugsnag-cli
brew install komac                   # winget PRs from Mac release.py (see "winget" below)

The general C++ dependencies are handled by vcpkg. The Microsoft vcpkg repo is included as a git submodule at vcpkg/. After cloning this repo, fetch it and build dependencies.

macOS

git submodule update --init --recursive
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install

Windows (from repo root; typical desktop build is x64)

git submodule update --init --recursive
vcpkg\bootstrap-vcpkg.bat
vcpkg\vcpkg.exe install --triplet x64-windows

The root vcpkg.json is the manifest. Set VCPKG_ROOT to the full path of the vcpkg folder (for example D:\src\client\vcpkg) so Visual Studio MSBuild integration can resolve packages.

For a fresh clone you can use git clone --recurse-submodules <url> so vcpkg/ is populated immediately; otherwise run git submodule update --init after clone.

On Mac, open client_generic/MacBuild/infinidream.xcodeproj. On Windows, open client_generic/MSVC/e-dream.sln.

Use the "File>Packages>Update to Latest" menu to load the Mac specific dependencies.

There are four targets: app, screensaver, staging app, and staging screensaver. The staging targets have their own directory /Users/Shared/infinidream.ai-stage that can coexist with the normal one /Users/Shared/infinidream.ai

Those folders belong to the first user who runs the client on the Mac. Any other user gets their own, /Users/Shared/infinidream.ai- (and infinidream.ai-stage-) (#902).

Timing diagnostics

These environment variables add timing detail to the log, on every platform. All are off unless set. They are read once at startup, so set them before launching, e.g. from a terminal:

INFINIDREAM_HEARTBEAT_SECONDS=1 INFINIDREAM_STEP_TIMING_MS=5 \
  ./infinidream.app/Contents/MacOS/infinidream
Variable Effect
INFINIDREAM_HEARTBEAT_SECONDS=N Heartbeat line every N seconds (default 60) with tick counts, max_tick_ms, late_ticks (ticks over 1.5 display intervals), clamped ticks, display_fps and the state of each clip.
INFINIDREAM_STEP_TIMING_MS=N Logs Slow step <label> ms=<n> for any timed step taking N ms or more, and Late tick ms=<n> for every late tick. 0 logs every timed step on every frame.
INFINIDREAM_TEST_STALL_MS=N Spins the render thread for N ms every INFINIDREAM_TEST_STALL_EVERY_MS (default 5000), to check the counters above.

To find what made a frame late, look at the Slow step lines just before each Late tick; they all come from the render thread unless the label says otherwise. A threshold of 5 ms is a good start: a frame is 16.7 ms at 60 Hz.

The timed steps cover:

  • The player tick: player Update total, player ProcessPendingCommands, current and next clip Update, the transition preflight, player PlayNextDream and player RenderFrame.
  • Starting a clip: creating the CClip and starting or preloading it, in both PlayClip and PreloadClip.
  • Opening the decoder: avformat_open_input, avformat_find_stream_info, hw device setup, avcodec_open2 and the total. On Windows a clip usually reuses the open decoder of an earlier one, and then only the first two are timed. The total's label says whether it ran on the decoder thread (streams and preloaded local files) or the caller's thread (other local files).
  • Decoding (Windows): decoder D3D11VA context lock held, how long ffmpeg held the D3D11 context lock that the renderer also takes each frame, the decoder's own holds of it during a seek, and avcodec_send_packet / avcodec_receive_frame calls of 10 ms or more.
  • Dropping the old clip: ReleaseRenderResources and the GPU WaitForIdle inside it.
  • Frame boundaries: frame BeginDisplayFrame and frame EndDisplayFrame, which can wait for the next drawable or for vsync, and frame HUD Render. The two waits log only when they take longer than a late tick, whatever the threshold.

A late tick with no Slow step before it was spent in an untimed step. To time one, put a Base::CStepTimer on the stack around it (client_generic/Common/StepTimer.h) with a string-literal label.

Build on Linux

Prerequisites

Install the required system packages (Arch Linux):

sudo pacman -S --needed \
    base-devel cmake pkgconf \
    vulkan-headers vulkan-icd-loader vulkan-tools shaderc \
    libx11 \
    openssl \
    boost \
    ffmpeg \
    libpng curl \
    wayland wayland-protocols \
    libxkbcommon

On Ubuntu (tested on 26.04):

sudo apt install -y \
    build-essential cmake pkg-config \
    libvulkan-dev glslc \
    libx11-dev libxrender-dev \
    libssl-dev \
    libboost-all-dev \
    libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev \
    libpng-dev libcurl4-openssl-dev \
    libwayland-dev wayland-protocols libxkbcommon-dev libdecor-0-dev

A distro upgrade can remove the Boost development packages; if CMake reports Could not find a package configuration file provided by "Boost", reinstall libboost-all-dev and reconfigure with cmake --fresh -B build.

Wayland support is optional — the build falls back to X11/XWayland if the Wayland packages are absent.

Also initialise the submodules (ImGui UI library):

git submodule update --init

Build

cd client_generic/LinuxBuild
cmake -B build
cmake --build build -j$(nproc)

For a release build:

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

The binary is placed at client_generic/LinuxBuild/build/infinidream, with compiled shaders in build/shaders/ and logo.png copied next to it automatically.

For a stage build (talks to api-stage.infinidream.ai and keeps its data in ~/.config/infinidream-stage/), use a separate build tree:

cmake -B build-stage -DCMAKE_BUILD_TYPE=Release -DINFINIDREAM_STAGE=ON
cmake --build build-stage -j$(nproc)

To package a portable AppImage, run ./build_appimage.py (add --stage for a stage AppImage). -v X.Y.Z sets the version it reports; without it, it takes the latest git tag. -g uploads it to the GitHub release X.Y.Z (see "to prerelease" below).

Authentication

On first run the client signs in with a code emailed to you: the first-run wizard asks for your email and the code, or a console prompt does when no GUI wizard is available. This stores a sealed session in ~/.config/infinidream/settings.json, so later launches sign in automatically.

An API key still works as a fallback (for headless use), but it skips the sealed-session refresh paths:

Option 1 — environment variable (one-off or scripted):

export INFINIDREAM_API_KEY=<your-key>
./build/infinidream

The key is persisted to ~/.config/infinidream/settings.json on first run, so subsequent launches work without the variable.

Option 2 — settings file (persistent): Add the key directly to ~/.config/infinidream/settings.json:

{
  "settings": {
    "content": {
      "api_key": "<your-key>"
    }
  }
}

Running against a test server

client_generic/tests/mock-server has a mock server that stands in for the backend, and an end-to-end test that runs the Mac client against it. See its README.

For test runs (see #733), set INFINIDREAM_DATA_DIR to keep settings, cache and logs in their own folder. The run leaves the installed client alone: it skips the instance check, auto-update (Mac), crash reporting (Mac) and screensaver activation (Windows).

To use a server without TLS, give the scheme explicitly in that folder's settings.json:

{ "settings": { "content": { "server": "http://127.0.0.1:8765" } } }

A bare host always means https/wss, and so does http:// when INFINIDREAM_DATA_DIR isn't set. Over http the client logs a warning, ignores any stored login and sends only INFINIDREAM_API_KEY, so set that variable; an api_key in settings.json isn't used.

The log gets a Heartbeat line from the render thread every 60 seconds; set INFINIDREAM_HEARTBEAT_SECONDS=1 to get one per second (see Timing diagnostics above for this and related variables). It stops whenever frames stop, which includes a locked screen on macOS, so check for that before calling a missing heartbeat a hang.

Running

cd client_generic/LinuxBuild/build
./infinidream
./infinidream --fullscreen   # start fullscreen (default is windowed)

Arrow keys navigate between dreams. F1–F4 toggle HUD overlays (help, server stats, render stats, display stats). F toggles fullscreen and Esc leaves it (Esc never quits). Close the window or press Ctrl-Q to quit.

Hardware video decoding

Video is decoded with Vulkan Video on the rendering GPU when the driver supports it (NVIDIA proprietary drivers, AMD and Intel with recent Mesa), and in software otherwise. Either way, YUV→RGB conversion runs on the GPU. The log says which path was chosen (Vulkan Video decode available on ... or no Vulkan Video decode on ...).

Intel's Mesa driver only exposes Vulkan Video when ANV_DEBUG=video-decode is set. The client sets it at startup and uses Vulkan Video on Intel from Mesa 26; older versions decode in software. To force software decoding, for example to rule out a driver bug:

INFINIDREAM_NO_HW_DECODE=1 ./infinidream

Build on macOS

Prerequisites

  • Xcode 14.0 or later
  • macOS 12.4 or later
  • Python packages for build.py (it uses dmgbuild to lay out the DMG window): cd client_generic/MacBuild && python3 -m pip install -r requirements.txt

Quick Build for Debugging

The just run the app in xcode with the debugger and without making the embedded screensaver:

cd client_generic/MacBuild mkdir -p Resources/infinidream.saver

Then in xcode just use command-R.

Starting fullscreen

For test scripts, the app takes --fullscreen, like Windows and Linux. Pass it to the executable directly or through open:

/Applications/infinidream.app/Contents/MacOS/infinidream --fullscreen
open -a infinidream --args --fullscreen

Launched from the Finder or Dock it opens in a window as usual. In Xcode, add --fullscreen under Product > Scheme > Edit Scheme > Run > Arguments.

Build Script

cd client_generic/MacBuild
./build.py [options]

Options

  • -r : Build in Release mode (default: Debug)
  • -s : Build stage version (default: production)
  • -n : Enable notarization (requires -r)
  • -v VERSION : Set version string (e.g., 0.12.0) for DMG naming and GitHub release
  • -g : Create GitHub release with tag (requires -v)

Code Signing

Auto-discovers Developer ID certificate and Team ID from keychain.

Override via environment variables:

DEVELOPER_ID_CERT="Developer ID Application: Your Name (TEAM123)" \
TEAM_ID="TEAM123" \
KEYCHAIN_PROFILE="your-profile" \
./build.py -r

Default keychain profile: infinidream-notarization

Examples

# Debug build (default)
./build.py

# Release build
./build.py -r

# Stage debug build
./build.py -s

# Release with notarization
./build.py -r -n

# Release with notarization and version (creates infinidream-0.12.0.dmg)
./build.py -r -n -v 0.12.0

# Full release with appcast and GitHub release
./build.py -r -n -v 0.12.0 -g

Output

  • Screensaver: build/DerivedData/Build/Products/{Debug|Release}/infinidream.saver
  • Application: build/{Debug|Release}/AppExport/infinidream.app
  • Distribution DMG: build/{Debug|Release}/infinidream-{version}.dmg (or infinidream-{version}-stage.dmg)

The app bundle contains the embedded screensaver at infinidream.app/Contents/Resources/infinidream.saver. The DMG contains the app plus an Applications symlink for drag-to-install, in a window with a background picture (client_generic/MacBuild/dmg/; regenerate it with make_background.py, after python3 -m pip install -r dmg/requirements.txt).

Build on Windows

Covers the native MSVC client (e-dream.sln), vcpkg manifest dependencies, and the NSIS installer via client_generic/WinBuild/ (same style as MacBuild/build.py and release.py).

Prerequisites

Everything used to build and release on Windows can be installed with winget (ships with Windows 10 1809+ / Windows 11). Open an elevated cmd/PowerShell and run:

winget install --id Git.Git -e
winget install --id Python.Python.3.12 -e
winget install --id Microsoft.VisualStudio.2022.Community -e
winget install --id NSIS.NSIS -e
winget install --id GitHub.cli -e
Package Purpose Notes
Git.Git Clone, submodules.
Python.Python.3.12 Drives WinBuild/build.py and release.py, and every MSBuild build runs generate_build_version.py. Any 3.10+ works. python must be on PATH, for Visual Studio builds too.
Microsoft.VisualStudio.2022.Community MSBuild, C++ toolchain, Windows 10/11 SDK, signtool.exe. Use Microsoft.VisualStudio.2022.BuildTools for headless/CI. The winget install launches the VS Installer but does not select workloads — add Desktop development with C++ (and the Windows SDK) in that UI, or pass --override "--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended" to winget.
NSIS.NSIS makensis for the Windows installer. Installs to C:\Program Files (x86)\NSIS\ but does not add itself to PATH; release.py auto-discovers it there, or honors MAKENSIS=<path>.
GitHub.cli release.py -g uploads artifacts via gh. Run gh auth login once.

vcpkg is not a separate install — it's a git submodule at vcpkg/ that is bootstrapped with vcpkg\bootstrap-vcpkg.bat (see dev docs at the top of this file).

signtool.exe for Authenticode signing (release.py --sign) ships with the Windows SDK that the VS workload above installs. Signing also needs Microsoft.AzureCLI and Microsoft.Azure.ArtifactSigningClientTools from winget; see Signing.

Quick build in Visual Studio

Open client_generic/MSVC/e-dream.sln, choose Release and x64, build. Typical output directory:

client_generic/MSVC/Release/ → infinidream.exe, infinidream.scr

infinidream.exe opens windowed; infinidream.exe --fullscreen starts fullscreen (Esc or F11 returns to a window).

Version: before compiling, every build runs WinBuild/generate_build_version.py, which writes MSVC/edream_build_version_generated.h (gitignored). A Visual Studio build is a dev build: its version is the latest git tag and its revision is git describe --tags --always --dirty (e.g. 0.16.1-12-g4aeae8cf-dirty), which Settings shows. Release builds come from build.py -v.

Toolsets: the solution mixes toolsets — x64 configurations use v143; Win32 configurations may still reference v140 and legacy Boost paths inside electricsheep.vcxproj. Prefer Release | x64 unless you maintain Win32 explicitly (the installer is 64-bit only).

Drop-in runtime files: place extra DLLs or assets under client_generic/MSVC/dll/Release/ or dll/Debug/ (folder name matches the MSBuild configuration — Release, Debug, DebugMD, etc.). After each successful link, MSBuild flattens every file under that folder into $(OutDir) (nested paths land flat; duplicate basenames overwrite). If dll/<Configuration>/ doesn't exist, the step is skipped.

vcpkg on Windows: electricsheep.vcxproj enables VcpkgEnableManifest; Visual Studio resolves packages when VCPKG_ROOT points at your vcpkg submodule checkout. Set VCPKG_ROOT as a user/system env var (e.g. D:\src\client\vcpkg) and restart Visual Studio. For Win32 builds you may need the x86-windows triplet.

Build script

cd client_generic\WinBuild
python build.py

Defaults: Release, x64, runs MSBuild restore then build (uses MSBUILD env or vswhere to locate MSBuild).

Options (summary)

Flag Description
-v SEMVER, --version SEMVER Release version to embed in the binary (Settings, About, the server, the installer). Without it the build is a dev build, versioned from the latest git tag, and release.py won't package it. Either way the revision is git describe --tags --always --dirty.
-r, --release Configuration Release (default).
-d, --debug Configuration Debug (outputs infinidreamd.exe).
--configuration NAME Override configuration (e.g. DebugMD).
--platform Win32 | x64 Default x64.
--run-vcpkg Run vcpkg install for --triplet first (default triplet x64-windows).
--triplet TRIPLET Triplet for --run-vcpkg.
--no-restore Skip MSBuild /restore.
--msbuild PATH Force a specific MSBuild.exe.
--sanitize asan Test build with AddressSanitizer (see below).

MSBuild discovery: uses the MSBUILD env var if set; otherwise vswhere (%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe) to locate MSBuild.exe. You can also add the MSBuild Bin folder to PATH so msbuild.exe resolves without vswhere.

Examples

cd client_generic\WinBuild
python build.py
python build.py -d --platform x64
python build.py --run-vcpkg --triplet x64-windows

Hardware video decoding

Video is decoded with D3D11VA on the GPU that renders, and YUV→RGB conversion runs on the GPU. At startup the log names that GPU, e.g. D3D11 adapter: NVIDIA GeForce RTX 5090 (32187 MB video memory), and each clip logs D3D11VA hw device created successfully.

To decode on the CPU instead, for example to tell corrupted video from the GPU's decoder or driver from anything else:

set INFINIDREAM_SOFTWARE_DECODE=1
client_generic\MSVC\Release\infinidream.exe

The log then says INFINIDREAM_SOFTWARE_DECODE is set: decoding on the CPU, and each clip logs Software decode (INFINIDREAM_SOFTWARE_DECODE). The F2 overlay's "DirectX 11" is the renderer, the same either way. To confirm, Task Manager's Performance tab (GPU, "Video Decode" graph) stays at 0%. 1080p takes roughly a quarter of one CPU core.

AddressSanitizer build

python build.py --sanitize asan

Builds only infinidream.exe, with /fsanitize=address, unoptimized and unsigned, into client_generic\MSVC\build-asan\ with the ASan runtime DLL and a .pdb next to it, and prints the path for the mock-server tests' --app. It never touches MSVC\Release\, makes no .scr, and can't be combined with -v, so it can't be packaged. MSVC has ASan only: for ThreadSanitizer, UBSan or leak checking use the Mac or Linux build. See tests/mock-server/README.md "Sanitizers".

Release installer

Build with the semver you will ship. release.py refuses a dev build (one built without -v):

python client_generic\WinBuild\build.py -v 0.14.0

Then package the NSIS Setup.exe. It takes the version the binaries were built with; passing a different -v is an error, so the installer and the app always agree:

python client_generic\WinBuild\release.py

The installer packages straight from client_generic\MSVC\Release\: the exe and scr plus every *.dll, *.png and *.ttf there. build.py empties that folder before every build (like the Mac build), so nothing left over from an older build ships; object files are kept, so builds stay incremental (--clean removes those too). After a Visual Studio build, which doesn't empty the folder, run build.py before packaging a release. License content is embedded from client_generic\RuntimeMSVC\License.rtf.

Output: client_generic\WinBuild\dist\infinidream-{version}.exe

Options:

Flag Description
-v, --version Version for the installer and file name. Defaults to the version build.py compiled in; a different value is an error.
--configuration MSVC folder to package (default Release).
--output-dir DIR Where to write artifacts.
--sign Authenticode-sign the exe, scr, uninstaller and setup exe (see Signing).
-g, --github-release Upload the setup exe with gh to the release whose tag is the version (e.g. 0.16.2).

Signing

--sign signs with Azure Artifact Signing (formerly Trusted Signing): account infinidream-signing, certificate profile infinidream-public, configured in artifact-signing.json. It signs infinidream.exe and infinidream.scr in the output folder before packaging, the uninstaller while makensis builds it (!uninstfinalize), then the setup exe, and checks each signature with signtool verify /pa. One-time setup on the release machine:

winget install -e --id Microsoft.AzureCLI
winget install -e --id Microsoft.Azure.ArtifactSigningClientTools
az login

Your Azure account needs the Artifact Signing Certificate Profile Signer role on the profile. The certificates are short-lived (a few days) and every signature is timestamped, so signed releases stay valid. Re-run az login when the CLI's login expires.

Overrides: SIGNTOOL (x64 signtool.exe), SIGN_DLIB (Azure.CodeSigning.Dlib.dll), SIGN_METADATA (another metadata file), SIGN_TIMESTAMP_URL. Setting SIGN_THUMBPRINT (a certificate in the Windows store) or SIGN_PFX / SIGN_PFX_PASSWORD signs with that certificate instead.

Installer behavior

  • x64 Windows 10+ only; the installer aborts otherwise.
  • Installs to %ProgramFiles%\Infinidream\ (admin required). A different folder chosen on the directory page always gets \Infinidream appended, so the program has a folder of its own.
  • Ships the VC++ runtime DLLs next to the app (the Release build copies them from Visual Studio's Microsoft.VC143.CRT redist folder), so no separate redistributable is needed.
  • Creates one Start Menu shortcut.
  • The finish page's "Run Infinidream and sign in" launches the app as the user, not elevated, by handing it to Explorer (explorer.exe <app>), and lets its window come to the front.
  • The app, not the installer, selects itself as the current screensaver on each launch (HKCU\Control Panel\Desktop\SCRNSAVE.EXE), unless "keep screensaver enabled" is turned off in its settings.
  • The uninstaller removes the program folder, shortcut and registry entries, and clears SCRNSAVE.EXE if it still points at our .scr (in either long or 8.3 form). It keeps the user's data in %LOCALAPPDATA%\Infinidream\ (sign-in, downloaded content, logs), and removes the legacy %ProgramData%\Infinidream\ from older builds.

The NSIS script lives at client_generic/InstallerMSVC/nsis_installer.nsi.

Windows crash symbols

Windows builds produce PDB files next to binaries (e.g. under client_generic\MSVC\Release\). Upload PDBs to BugSnag following their Windows symbol-upload guidance; macOS dSYM instructions below do not apply on Windows.

to prerelease (for testers, without Sparkle)

A GitHub prerelease lets a few people download a build without any installed client being offered it. Sparkle only reads the public appcast, which changes only when Mac release.py runs, and a prerelease isn't marked Latest, so the website keeps the current version.

Use plain X.Y.Z versions, increasing each time (0.16.2, 0.16.3, …), not -beta suffixes. The Mac app reinstalls the screensaver only when the bundled version is higher, compared with NSNumericSearch, which ranks 0.17.0 below 0.17.0-beta.3. Tags are shared with Windows, so pick numbers that don't collide with Windows builds.

The scripts' names don't line up across platforms: Windows release.py packages and uploads, like the second half of Mac build.py, while Mac release.py is the separate "go public" step.

Step Mac Windows Linux
Compile build.py build.py -v build_appimage.py -v
Package and sign build.py -r -n release.py --sign build_appimage.py
Tag and create the GitHub release build.py -g — (needs the Mac one) —
Upload to the release build.py -g release.py -g build_appimage.py -g
Push to users (Sparkle, website, Latest, Homebrew, winget) release.py — —

Commit and push first, then build the same commit on every machine.

1. Mac, first. Creates the tag and the prerelease, and uploads the DMG:

cd client_generic/MacBuild
./build.py -r -n -g -v 0.16.2

2. Windows. release.py -g uploads to the release Mac created, and fails if it doesn't exist yet. It takes the version build.py -v compiled in:

git fetch --tags && git checkout 0.16.2
cd client_generic\WinBuild
python build.py -v 0.16.2
python release.py --sign -g

3. Linux. build_appimage.py -g uploads to the release Mac created, and checks that it exists before building:

git fetch --tags && git checkout 0.16.2
cd client_generic/LinuxBuild
./build_appimage.py -v 0.16.2 -g

4. Release notes, from any machine, or edit them on GitHub:

gh release edit 0.16.2 --notes-file notes.md

Repeat with the next version for each round. Testers update by hand between prereleases; once you promote a version higher than theirs, Sparkle offers it to them like everyone else.

5. Promote the one you're happy with (Mac only), as in step 4 of the next section:

cd client_generic/MacBuild
./release.py -v 0.16.5 --dry-run
./release.py -v 0.16.5

This pushes the release to users on every platform; see to release for what it does.

to release

A release is a prerelease that gets promoted. Build and upload on every platform, test, then run Mac release.py, which pushes the release to users everywhere. You run all of it by hand on the build machines; nothing runs in CI.

1. Build and upload on every platform

Steps 1–3 of to prerelease: Mac first (build.py -r -n -g -v X.Y.Z notarizes, creates tag X.Y.Z and the GitHub prerelease, and uploads infinidream-X.Y.Z.dmg), then Windows (release.py --sign -g uploads infinidream-X.Y.Z.exe) and Linux (build_appimage.py -v X.Y.Z -g uploads the AppImage).

Upload the Windows installer before step 4. The winget step hashes the uploaded exe, and skips with a warning if it isn't there.

2. Test the app

open build/Release/AppExport/infinidream.app

3. Edit release notes (optional)

On GitHub (https://github.com/e-dream-ai/client/releases), or gh release edit X.Y.Z --notes-file notes.md. Step 4 copies them into the appcast, so finish them first.

4. Promote (Mac release.py)

Preview, then publish:

cd client_generic/MacBuild
./release.py -v X.Y.Z --dry-run
./release.py -v X.Y.Z        # production
./release.py -v X.Y.Z -s     # stage: stage appcast only

A production run, in order:

  1. Generates appcast.xml for the DMG, adds the release notes from GitHub (with issue references linked), and commits it to landing-page public/alpha/appcast.xml. Installed Mac clients see the update on their next check (How Sparkle works).
  2. Sets APP_VERSION in frontend src/version.ts (main), so the install page links to the new downloads. Cloudflare deploys it in a few minutes.
  3. Marks the GitHub release Latest (removes the prerelease label).
  4. Updates the Homebrew cask.
  5. Opens a winget PR.

Steps 4 and 5 warn instead of aborting, since everything before them is already published; the warning says what to run by hand. A stage run (-s) only publishes public/stage/appcast.xml.

Once a version is promoted, never replace its files. Homebrew and winget pin each file's sha256, and users may already have it. WinBuild/release.py refuses to re-upload the exe of a final release. Fix a bad release by shipping a new version.

Homebrew

Mac users can install with brew install --cask e-dream-ai/tap/infinidream. The cask lives in e-dream-ai/homebrew-tap. Step 4 sets version and sha256 in Casks/infinidream.rb, taking the sha256 GitHub reports for the uploaded DMG and refusing if it differs from the local build. If it fails, edit those two lines by hand.

winget

Windows users can install with winget install infinidream.Infinidream (or winget install infinidream) and upgrade with winget upgrade infinidream. The manifests live in microsoft/winget-pkgs under manifests/i/infinidream/Infinidream/.

Step 5 runs komac (brew install komac), which downloads the uploaded exe, hashes it, writes the new version's manifests (copying descriptions and tags from the previous version), pushes a branch to the org's fork e-dream-ai/winget-pkgs (KOMAC_FORK_OWNER), and opens a PR to microsoft/winget-pkgs. The PR's author is whoever owns the token: GITHUB_TOKEN if set, else your gh login (it needs public_repo; a fine-grained token won't work, since it writes to the fork and opens the PR on Microsoft's repo). Microsoft's bots validate the PR by installing silently in a sandbox. Version updates usually merge automatically once that passes; a new package's first version also needs a moderator's review. Moderators can't push fixes to a branch on an org fork, so if they ask for a change, make it on the branch yourself.

If step 5 fails, run the command it prints:

KOMAC_FORK_OWNER=e-dream-ai komac update infinidream.Infinidream --version X.Y.Z \
  --urls https://github.com/e-dream-ai/client/releases/download/X.Y.Z/infinidream-X.Y.Z.exe --submit

komac cleanup deletes fork branches whose PRs have merged or closed. To change the description or tags, edit infinidream.Infinidream.locale.en-US.yaml in the next version's PR; komac carries it forward from then on.

The installer is built for silent installs: winget runs it with /S (and /D= for a custom folder), it closes a running app and screensaver before replacing their files, and its Apps & Features entry is named Infinidream, without the version, which is how winget matches it.

How Sparkle Auto-Update Works

  1. App checks appcast URL on launch:
    • Production app: https://infinidream.ai/appcast.xml
    • Stage app: https://infinidream.ai/stage/appcast.xml
  2. Compares sparkle:version in appcast with app's CFBundleVersion
  3. If newer version found, shows update dialog
  4. User clicks "Update Now" → downloads DMG from GitHub → installs → relaunches

Sparkle Tools Setup (one-time)

Download Sparkle tools from https://github.com/sparkle-project/Sparkle/releases

Extract and copy to client_generic/MacBuild/bin/:

  • generate_appcast - generates appcast.xml with signatures
  • sign_update - signs update archives
  • generate_keys - generates EdDSA key pair (one-time use)

EdDSA Key Pair

Sparkle uses EdDSA (Ed25519) signatures to verify updates are authentic.

Public key is in Info.plist:

<key>SUPublicEDKey</key>
<string>pkDT5qmpWtyaZxw5X6Ca7DPHueEfBEKrxkrKzSN/qS0=</string>

Private key is stored in macOS Keychain under the name Sparkle EdDSA Key.

To generate a new key pair (only if needed):

cd client_generic/MacBuild
./bin/generate_keys

This will:

  1. Create a new EdDSA key pair
  2. Store the private key in Keychain
  3. Print the public key to add to Info.plist

Important: If you generate new keys, you must update SUPublicEDKey in:

  • App-Info.plist
  • App-Stage-Info.plist
  • Screensaver-Info.plist

Existing users won't be able to update if the public key changes, so only regenerate keys if the private key is lost.

to test (manually)

On stage, running with xcode, test with playlists Keyframe Test and Basic Playlist.

Then do it again but after rm -rf /Users/Shared/infinidream.ai-stage/content/ to test while streaming.

Then do a basic test after rm -rf /Users/Shared/infinidream.ai-stage/ to test sign-in flow.

After building, test on alpha with Wanderlust and Pink Floyd and Wankel Rotary Engine.

With fully downloaded playlists, go through all navigation acommands: next, prev, forward, backward, faster, slower, pause, both from keyboard and with remote control. Remote only interactions: switching playlists, playing from filmstrip.

Then do it again but after rm -rf /Users/Shared/infinidream.ai/content/ to test while streaming.

Then do a basic test after rm -rf /Users/Shared/infinidream.ai/ to test sign-in flow.

Then disable the screensaver, then uninstall the screen saver, then run the app and make sure it installs and selects the screen saver.

Also test the screensaver, not just the app. Test it:

  • with the app quit, so the screensaver runs online,
  • while the app is running: the screensaver should still play, offline from cached dreams (#756),
  • on one screen and on multiple screens,
  • with hot plugging: plug in and unplug a second screen while it runs, then dismiss it,
  • in the Preview of the Screen Saver pane in System Settings.

After each test, quit System Settings to clear out its screensaver processes, and check that pgrep -l legacyScreenSaver prints nothing: a leftover process may still be playing invisibly (#755).

Upload symbols to BugSnag

Upload the symbols to bugsnag, on a terminal:

About

No description, website, or topics provided.

Resources

Stars

35 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages