Compare commits
29 Commits
b39cad02fe
...
ea7b5b846c
| Author | SHA1 | Date | |
|---|---|---|---|
| ea7b5b846c | |||
| e7e1d16242 | |||
| 68f074452c | |||
| c5d5d6598d | |||
| 9ea4c03d65 | |||
| 326282476f | |||
| 3759b47bc6 | |||
| 8b309d9cad | |||
| 8fba0835b9 | |||
| 83322d9b50 | |||
| 7282d2d960 | |||
| 5cc8867878 | |||
| 93168de914 | |||
| 970fa18d86 | |||
| a4aa43461f | |||
| 9aff70bd63 | |||
| bbcf2efda6 | |||
| f1f96f1f10 | |||
| 0525e496e0 | |||
| 91ce88a51f | |||
| b675fa8fea | |||
| 2d3b3bb665 | |||
| b271037c54 | |||
| afdbeb4283 | |||
| e7ecd712e2 | |||
| 7eac7e7ecf | |||
| 7cad990c8e | |||
| a7ba0d2e87 | |||
| 7aef2e37bf |
+110
@@ -0,0 +1,110 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
Dated release notes, newest first. The same entries are summarised on the product
|
||||||
|
page; this file is the complete list.
|
||||||
|
|
||||||
|
## 0.5.4 — 1 December 2026
|
||||||
|
|
||||||
|
Windows and Linux bundles rebuilt with the new export format. macOS remains at
|
||||||
|
0.5.1 because it has to be built on a Mac.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **JPEG XL export.** The export dialog offers JPEG XL alongside JPEG, PNG, WebP and
|
||||||
|
16-bit TIFF, with the quality slider and a lossless switch. Files are 8-bit sRGB,
|
||||||
|
encoded by libjxl compiled to WebAssembly in the app itself, so the export stays
|
||||||
|
offline and nothing is uploaded. The codec loads only when a JXL is exported. No
|
||||||
|
ICC profile or XMP metadata is embedded yet, and 16-bit JXL waits on a float-input
|
||||||
|
encoder build. The codec is Apache-2.0 and makes no network requests.
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- **Static security audit published** as [SECURITY-AUDIT.md](SECURITY-AUDIT.md):
|
||||||
|
dependency scan plus a review of authentication, authorisation, uploads, path
|
||||||
|
handling, secrets at rest and outbound requests. No exploitable issue was found
|
||||||
|
in code that ships; the two production advisories are a transitive `adm-zip`
|
||||||
|
inside `onnxruntime-node` that this application cannot reach.
|
||||||
|
|
||||||
|
## 0.5.3.1 — 1 December 2026
|
||||||
|
|
||||||
|
Windows and Linux bundles rebuilt. macOS stays at 0.5.1: the app has to be built on
|
||||||
|
a Mac with the Xcode command line tools, and no Mac was available.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Before/after split** in Develop: a draggable handle compares the edited frame
|
||||||
|
with the untouched source, alongside the existing hold-`\` full-frame preview.
|
||||||
|
- **Native Windows window.** Windows bundles now ship `LuminaryWindow.exe`, a
|
||||||
|
WebView2 window host built from `windows/launcher/webview2` (.NET 8, self-contained
|
||||||
|
win-x64). The app opens its own window: no browser process, no Edge profile, no
|
||||||
|
Microsoft account and no settings sync. If the WebView2 runtime is missing, the
|
||||||
|
window says so and links to the one-time download.
|
||||||
|
- **Offline import checks in both smoke tests.** `linux/SMOKE-LINUX.sh` and
|
||||||
|
`windows/SMOKE-WINDOWS.ps1` now start under a proxy pointed at a black hole, import
|
||||||
|
a TIFF through the real upload → decode → preview path, and assert the launcher and
|
||||||
|
app window bypass proxies, so a bundle cannot regress to proxy-routed loopback
|
||||||
|
requests.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **The local process is called the local engine**, not "the server", everywhere a
|
||||||
|
user reads it: the Windows, Linux and macOS launchers, the import dialog, the join
|
||||||
|
page and the "cannot reach" error. Team-server installs keep the server wording.
|
||||||
|
- The import dialog states that raws are demosaiced by the local engine on this PC and
|
||||||
|
that nothing leaves the computer, instead of implying an upload.
|
||||||
|
- The Windows fallback app window prefers Chrome over Edge.
|
||||||
|
- The installer's **Start Luminary** tick, the Start-menu and desktop shortcuts and
|
||||||
|
start-at-login run `Luminary.exe` instead of `Luminary.vbs`, so they no longer depend
|
||||||
|
on Windows Script Host — which group policy can disable, leaving the tick silently
|
||||||
|
doing nothing. `.vbs` and `.cmd` remain fallbacks for bundles without the native
|
||||||
|
launcher.
|
||||||
|
- Downloads describe the network need as `Network: not needed` and the process as a
|
||||||
|
background service on this PC.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **The Windows bundle starts with the network disconnected.** The launcher waited for
|
||||||
|
`/api/health` with `Invoke-WebRequest`, which resolves the system proxy/PAC before
|
||||||
|
the URL; offline, every probe failed and the launcher killed a healthy engine after
|
||||||
|
120 seconds. The probe is now a raw TCP request to `127.0.0.1`, the Go launcher uses
|
||||||
|
a loopback-only transport, and app windows start with proxies disabled.
|
||||||
|
- The macOS launcher probes with `curl --noproxy '*'` for the same reason.
|
||||||
|
- A fresh Windows build creates the NSIS cache directory before extracting the
|
||||||
|
compiler, instead of failing on the first run.
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
- macOS 0.5.3.1 is not built yet. On a Mac:
|
||||||
|
`git pull && node macos/build.mjs --arch universal --node v22.23.5 --publish`.
|
||||||
|
- Screenshots and the bundled user guide still describe the team-server workflow; they
|
||||||
|
are being brought in line with the single-user desktop app.
|
||||||
|
|
||||||
|
## 0.5.2 — 1 December 2026
|
||||||
|
|
||||||
|
- AI denoise offers three models: Guided (fastest), SCUNet (learned, removes the most
|
||||||
|
grain) and NLM, each cached separately so switching back to one already rendered is
|
||||||
|
instant.
|
||||||
|
- The panel reports the stage it is in and, for SCUNet, the tile count while a render
|
||||||
|
runs instead of leaving a blank spinner.
|
||||||
|
- The bundles carry the SCUNet weights and ONNX Runtime, so the downloads are larger
|
||||||
|
than 0.5.1: the Windows setup is 165 MB and the Ubuntu `.deb` is 182 MB.
|
||||||
|
- The macOS build stays at 0.5.1.
|
||||||
|
|
||||||
|
## 0.5.1 — 28 November 2026
|
||||||
|
|
||||||
|
- Direct window launches use the PowerShell launcher instead of Windows Script Host,
|
||||||
|
fixing the direct-launch failure on systems where VBScript is disabled.
|
||||||
|
- A `.deb` for Ubuntu 22.04 and 24.04 ships alongside the Windows build: same app, same
|
||||||
|
server, menu entry included.
|
||||||
|
- A Windows setup exe installs per user with Start-menu shortcuts and keeps the catalog
|
||||||
|
when uninstalled; the portable ZIP still ships for people who want a folder.
|
||||||
|
|
||||||
|
## 0.5.0 — 28 November 2026
|
||||||
|
|
||||||
|
- First public beta: browser library, raw editor and Windows app.
|
||||||
|
- Directly opening the Windows window hands off to the launcher, so desktop mode stays
|
||||||
|
signed in.
|
||||||
|
- Masks, lens correction, print layouts and batch export.
|
||||||
|
- Client galleries with picks, comments and change requests.
|
||||||
|
- Optional team server for accounts, shared storage and admin.
|
||||||
|
- Refreshed product site and a 39-page user guide with current screenshots.
|
||||||
@@ -11,8 +11,9 @@ RAW decoding, client galleries, storage quotas and email notifications.
|
|||||||
|
|
||||||
| Mode | How to run | Catalog storage | RAW files | Accounts / galleries |
|
| Mode | How to run | Catalog storage | RAW files | Accounts / galleries |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| Browser only | `npm run dev` | IndexedDB on this device | No — raw needs the server | No |
|
| Browser only | `npm run dev` | IndexedDB on this device | No — raw needs the local engine | No |
|
||||||
| Team server | `npm run server` + `npm run dev` (or `npm start` behind a build) | SQLite + files under `server/data` | Yes — LibRaw demosaic | Yes |
|
| Team server | `npm run server` + `npm run dev` (or `npm start` behind a build) | SQLite + files under `server/data` | Yes — LibRaw demosaic | Yes |
|
||||||
|
| Desktop app (Windows, Linux, macOS) | the installed bundle — no npm, no account | SQLite in the app's data folder | Yes — bundled LibRaw | One local admin |
|
||||||
|
|
||||||
Everything edits the same `Edits` JSON document, so a photo edited locally keeps its
|
Everything edits the same `Edits` JSON document, so a photo edited locally keeps its
|
||||||
look when it is later uploaded to a server workspace.
|
look when it is later uploaded to a server workspace.
|
||||||
@@ -38,8 +39,10 @@ look when it is later uploaded to a server workspace.
|
|||||||
- [Detail-preserving denoise](#detail-preserving-denoise)
|
- [Detail-preserving denoise](#detail-preserving-denoise)
|
||||||
- [Lens profiles](#lens-profiles)
|
- [Lens profiles](#lens-profiles)
|
||||||
- [Development workflow](#development-workflow)
|
- [Development workflow](#development-workflow)
|
||||||
|
- [Desktop bundles](#desktop-bundles)
|
||||||
- [Troubleshooting](#troubleshooting)
|
- [Troubleshooting](#troubleshooting)
|
||||||
- [Limitations](#limitations)
|
- [Limitations](#limitations)
|
||||||
|
- [Changelog](#changelog)
|
||||||
- [Third-party attribution and licences](#third-party-attribution-and-licences)
|
- [Third-party attribution and licences](#third-party-attribution-and-licences)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -140,7 +143,7 @@ with a keyword library and reusable metadata presets. Save the current filters a
|
|||||||
order as a smart collection. Virtual copies share the master file but keep independent
|
order as a smart collection. Virtual copies share the master file but keep independent
|
||||||
edits; named snapshots preserve alternative looks.
|
edits; named snapshots preserve alternative looks.
|
||||||
|
|
||||||
**Export and print.** JPEG, PNG, WebP or uncompressed 16-bit TIFF; quality; resize by
|
**Export and print.** JPEG, PNG, WebP, JPEG XL (8-bit, lossy or lossless) or uncompressed 16-bit TIFF; quality; resize by
|
||||||
long edge or percent; filename template (`{name}`, `{date}`, `{time}`, `{index}`); saved
|
long edge or percent; filename template (`{name}`, `{date}`, `{time}`, `{index}`); saved
|
||||||
export recipes; output sharpening; watermark; XMP metadata embedded in JPEGs; sRGB,
|
export recipes; output sharpening; watermark; XMP metadata embedded in JPEGs; sRGB,
|
||||||
Display P3 or Adobe RGB output with a matching generated ICC profile (JPEG/TIFF); batch
|
Display P3 or Adobe RGB output with a matching generated ICC profile (JPEG/TIFF); batch
|
||||||
@@ -1090,11 +1093,47 @@ when none is installed.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Desktop bundles
|
||||||
|
|
||||||
|
The app also ships as a double-clickable desktop bundle for people who do not want a
|
||||||
|
terminal. The current release is **0.5.4**: Windows and Linux bundles are built; the
|
||||||
|
macOS app stays at 0.5.1 until it can be built on a Mac.
|
||||||
|
|
||||||
|
- **Windows** — per-user setup exe or portable zip from `windows/releases/`. The app
|
||||||
|
opens in its own native window (`LuminaryWindow.exe`, WebView2), so no browser, Edge
|
||||||
|
profile or Microsoft account is involved. `Luminary.exe` is the launcher; `-Browser`
|
||||||
|
opens a normal tab instead, and `-Stop` stops the local engine.
|
||||||
|
- **Linux** — `.deb` or portable tarball from `linux/releases/`; the launcher picks a
|
||||||
|
Chromium-based browser for its app window or falls back to a normal tab.
|
||||||
|
- **macOS** — `macos/build.mjs`, run on a Mac, produces the `.app`, zip and dmg.
|
||||||
|
|
||||||
|
Each bundle starts a Node process from its own folder that serves the UI and decodes
|
||||||
|
raws on `127.0.0.1` only. That process is the *local engine*: it is a background
|
||||||
|
service on the same PC, needs no network, and never uploads anything. The launcher
|
||||||
|
waits for it with a direct loopback connection and opens the app window with proxies
|
||||||
|
disabled, so a disconnected machine still starts and imports.
|
||||||
|
|
||||||
|
Build them from the repository root (artifacts land outside the checkout and, with
|
||||||
|
`--publish`, are copied into the release folders):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node windows/build.mjs --skip-build --installer --publish \
|
||||||
|
--webview2 /path/to/LuminaryWindow.exe
|
||||||
|
node linux/build.mjs --skip-build --publish
|
||||||
|
```
|
||||||
|
|
||||||
|
`windows/README.md`, `linux/README.md` and `macos/README.md` cover the packaging
|
||||||
|
details, the isolation guarantees and the smoke tests (`windows/SMOKE-WINDOWS.ps1`,
|
||||||
|
`linux/SMOKE-LINUX.sh`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
| Symptom | Cause and fix |
|
| Symptom | Cause and fix |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| "Cannot reach the Luminary server" in the app | The Vite dev proxy targets `127.0.0.1:8787`. Start `npm run server`, and do not change `PORT` while using `npm run dev` |
|
| "Cannot reach the Luminary local engine" in the desktop app | The bundled engine stopped, or the window's request to `127.0.0.1` was routed through a system proxy. Start the app again; 0.5.4 probes and opens the window with proxies disabled |
|
||||||
|
| "Cannot reach the Luminary server" in a dev build | The Vite dev proxy targets `127.0.0.1:8787`. Start `npm run server`, and do not change `PORT` while using `npm run dev` |
|
||||||
| `503` "The web build is missing" | `npm start` was run without `dist/`. Run `npm run build` first, or use `npm run dev` |
|
| `503` "The web build is missing" | `npm start` was run without `dist/`. Run `npm run build` first, or use `npm run dev` |
|
||||||
| Raw upload returns `422` | LibRaw could not decode the file and no embedded preview was found. Check `GET /api/health` → `raw.libraw`; install dependencies and confirm the camera is supported |
|
| Raw upload returns `422` | LibRaw could not decode the file and no embedded preview was found. Check `GET /api/health` → `raw.libraw`; install dependencies and confirm the camera is supported |
|
||||||
| Import is slow or the machine swaps | Lower `LUMINARY_RAW_WORKERS`; each decoder holds a worker and a few hundred MB |
|
| Import is slow or the machine swaps | Lower `LUMINARY_RAW_WORKERS`; each decoder holds a worker and a few hundred MB |
|
||||||
@@ -1107,6 +1146,14 @@ when none is installed.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
Release notes live in [CHANGELOG.md](CHANGELOG.md): 0.5.4 is the desktop and offline
|
||||||
|
release (before/after split, native Windows window, local-engine wording, offline
|
||||||
|
start), 0.5.2 added the three denoise models, and 0.5.1 introduced the Ubuntu package.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
- **Not a cloud service.** No hosted deployment and no camera driver: tethering is a
|
- **Not a cloud service.** No hosted deployment and no camera driver: tethering is a
|
||||||
|
|||||||
@@ -0,0 +1,136 @@
|
|||||||
|
# Security audit
|
||||||
|
|
||||||
|
Date: 1 December 2026 · Version: 0.5.4 · Scope: this repository (server, client,
|
||||||
|
build/release scripts, dependencies). Review was static: dependency scan plus a
|
||||||
|
targeted read of the server's trust boundaries. No infrastructure, host or
|
||||||
|
third-party service was tested.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
No critical or high-severity issue was found in code that ships and runs by
|
||||||
|
default. The production dependency tree has two `high` advisories that come from
|
||||||
|
one transitive package (`adm-zip` inside `onnxruntime-node`) and are not
|
||||||
|
reachable through anything this application does.
|
||||||
|
|
||||||
|
Everything else is either a development-only toolchain advisory, a hardening
|
||||||
|
opportunity, or an operational note.
|
||||||
|
|
||||||
|
| Area | Result |
|
||||||
|
| --- | --- |
|
||||||
|
| Production dependencies | 0 critical, 0 moderate, 2 high (one transitive package, not reachable) |
|
||||||
|
| Development dependencies | 2 critical, 3 high, 3 moderate — dev server and test runner only |
|
||||||
|
| Authentication and sessions | scrypt with per-user salt, random tokens, HttpOnly/SameSite cookies, rate limiting |
|
||||||
|
| Authorisation | Every `/api/admin/*` route calls `requireAdmin`; gallery routes are token-scoped |
|
||||||
|
| Injection | No `eval`, no `new Function`, no `innerHTML`/`dangerouslySetInnerHTML`; SQLite access is entirely prepared statements |
|
||||||
|
| Path traversal | Static and tether paths are resolved and compared against a root; uploads use generated IDs |
|
||||||
|
| Secret handling | SMTP and bridge credentials AES-256-GCM encrypted at rest; no secrets in the tree |
|
||||||
|
| Uploads | Global size cap, content-length checked before reading, quota per account |
|
||||||
|
| Outbound requests | Immich and dashboard URLs are operator-configured, not user-configured |
|
||||||
|
|
||||||
|
## Dependency findings
|
||||||
|
|
||||||
|
### 1. `adm-zip` — high, transitive (`onnxruntime-node` → `adm-zip`)
|
||||||
|
|
||||||
|
Advisories: crafted ZIP triggers a 4 GB allocation; extraction follows
|
||||||
|
destination symlinks and can overwrite arbitrary files; uncontrolled memory
|
||||||
|
allocation via a declared size.
|
||||||
|
|
||||||
|
Reachability here: `onnxruntime-node` declares `adm-zip` for its own archive
|
||||||
|
handling. Luminary never extracts a ZIP it did not create: the denoise models are
|
||||||
|
read from local storage, and the only ZIP code in the app writes archives
|
||||||
|
(`src/lib/zip.ts`) rather than reading them. No route accepts a ZIP. Impact is
|
||||||
|
therefore latent rather than exploitable.
|
||||||
|
|
||||||
|
Fix: upgrade `onnxruntime-node` 1.23.0 → 1.31.1 (`npm i onnxruntime-node@1.31.1`).
|
||||||
|
That is the version npm proposes, a non-major bump. Not applied in this pass
|
||||||
|
because it changes the denoise runtime and needs its own regression run.
|
||||||
|
|
||||||
|
### 2. Development toolchain — 2 critical, 3 high, 3 moderate
|
||||||
|
|
||||||
|
`vitest`/`tinypool`/`@vitest/mocker` (prototype-pollution gadget to RCE, arbitrary
|
||||||
|
file read via the Vitest UI server), `vite` (path traversal in optimised-deps
|
||||||
|
`.map` handling, `launch-editor` NTLM hash disclosure), `esbuild` (dev server
|
||||||
|
request proxying).
|
||||||
|
|
||||||
|
None of these ship: the release bundle is static `dist/` output and the Node
|
||||||
|
server does not run Vite. They matter only for a machine that runs `npm run dev`
|
||||||
|
or the Vitest UI while exposed to an untrusted network. Fix by moving to the
|
||||||
|
current Vite/Vitest majors on a branch, not by a patch bump inside the current
|
||||||
|
majors.
|
||||||
|
|
||||||
|
`npm audit --omit=dev` is the meaningful gate for releases; add it to
|
||||||
|
`predeploy` if that gate should be enforced.
|
||||||
|
|
||||||
|
## Verified controls
|
||||||
|
|
||||||
|
- **Password storage**: `scrypt` (`server/auth.mjs`), 32-byte key, per-hash random
|
||||||
|
salt, compared with `timingSafeEqual`. Non-existent accounts spend the same
|
||||||
|
scrypt work and return the same message, so the endpoint does not reveal which
|
||||||
|
addresses are registered.
|
||||||
|
- **Sessions**: 32-byte random tokens, `HttpOnly`, `SameSite=Lax`, `Secure` when
|
||||||
|
the request arrived over HTTPS, 30-day lifetime, server-side revocation on logout.
|
||||||
|
- **Rate limiting**: sign-in is limited per IP and per IP+account (429 with
|
||||||
|
`Retry-After`), gallery unlock is limited per link.
|
||||||
|
- **Authorisation**: 26 `requireAdmin` checks cover the admin surface; missing or
|
||||||
|
disabled accounts are rejected; the desktop local owner is only used when
|
||||||
|
`LUMINARY_LOCAL=1`.
|
||||||
|
- **Gallery links**: separate password hash with its own salt, constant-time
|
||||||
|
compare, unlock cookie random per session and held in memory, so a restart
|
||||||
|
re-locks the gallery. Share tokens are 18 random bytes.
|
||||||
|
- **Bridge**: HMAC-SHA256 over the payload, version-tagged, expiry checked,
|
||||||
|
constant-time signature compare.
|
||||||
|
- **Path handling**: static requests are resolved then checked with
|
||||||
|
`path.relative` against `dist`; tether file names go through `basename` and
|
||||||
|
must match exactly; stored files are addressed by generated IDs.
|
||||||
|
- **Uploads**: `MAX_UPLOAD` enforced against `content-length` before reading and
|
||||||
|
again while streaming.
|
||||||
|
- **Headers**: CSP with `object-src 'none'`, `frame-ancestors 'self'`,
|
||||||
|
`nosniff`, `SAMEORIGIN`, `same-origin` referrer policy, restrictive
|
||||||
|
`Permissions-Policy`. No CORS headers are emitted, so browsers cannot read
|
||||||
|
responses cross-origin.
|
||||||
|
- **Secrets**: SMTP app password and bridge tokens are sealed with AES-256-GCM
|
||||||
|
(`server/secrets.mjs`); the key comes from `LUMINARY_SECRET_KEY` or a
|
||||||
|
`0600` file beside the database. No credentials or API keys are committed.
|
||||||
|
|
||||||
|
## Hardening opportunities (not vulnerabilities)
|
||||||
|
|
||||||
|
1. **CSP includes `'unsafe-eval'`.** It is there for the WebAssembly engines. The
|
||||||
|
modern token is `'wasm-unsafe-eval'`; keeping the broader one means any future
|
||||||
|
DOM-XSS can compile and run script. Tighten to `'wasm-unsafe-eval'` and test
|
||||||
|
LibRaw/JXL/ONNX still initialise.
|
||||||
|
2. **Server-side request forgery surface.** The Immich base URL and dashboard URL
|
||||||
|
are operator-supplied and fetched by the server with credentials attached.
|
||||||
|
An admin can point them at internal services. Acceptable for a self-hosted
|
||||||
|
tool, but worth blocking loopback/link-local targets by default, or stating
|
||||||
|
the trust assumption in the docs.
|
||||||
|
3. **Per-account sign-in limiting is scoped by IP.** A distributed attempt against
|
||||||
|
one address is not globally throttled; scrypt cost is the only brake. A global
|
||||||
|
per-account counter would close that.
|
||||||
|
4. **30-day sessions** with no rotation on privilege change. Revoking sessions on
|
||||||
|
password change is worth adding.
|
||||||
|
5. **No HSTS, no built-in TLS.** Correct for a loopback desktop app; for team
|
||||||
|
installs it depends on a reverse proxy, so document that.
|
||||||
|
6. **`secret.key` beside the database** protects backups and dumps, not a full
|
||||||
|
data-directory compromise. `LUMINARY_SECRET_KEY` is the stronger option and
|
||||||
|
should be recommended for team installs.
|
||||||
|
7. **Minimum password length is 8** with no breach-list check. Fine; consider 12
|
||||||
|
for admin accounts.
|
||||||
|
|
||||||
|
## Release artefact checks
|
||||||
|
|
||||||
|
- The desktop bundles copy `dist/` and production `node_modules/`; no dev
|
||||||
|
dependencies or test files are included.
|
||||||
|
- The new JPEG XL encoder is WebAssembly executed in the browser sandbox, loads
|
||||||
|
only when a JXL export is chosen, makes no network requests, and is Apache-2.0
|
||||||
|
(`@jsquash/jxl`, libjxl BSD-3-Clause). No new server-side attack surface.
|
||||||
|
- JPEG exports re-encode pixels, so camera EXIF is not carried into delivered
|
||||||
|
files; only the XMP block Luminary writes is added.
|
||||||
|
|
||||||
|
## Recommended order
|
||||||
|
|
||||||
|
1. `onnxruntime-node@1.31.1` with a denoise regression run (clears both production
|
||||||
|
highs).
|
||||||
|
2. Tighten CSP to `'wasm-unsafe-eval'` and re-test raw, JXL and denoise loading.
|
||||||
|
3. Vite/Vitest major upgrade on a branch (clears every dev advisory).
|
||||||
|
4. Seal the Immich API key if it is not already sealed.
|
||||||
|
5. Add `npm audit --omit=dev --audit-level=high` to `scripts/predeploy.mjs`.
|
||||||
Binary file not shown.
+30
-28
@@ -198,9 +198,9 @@
|
|||||||
<p>Every figure is a real screenshot from a running installation with a portrait session loaded. The file names, cameras and metadata are the uploaded originals; the cull, crop and grade shown were arranged for the guide. Keys are written for both platforms: <kbd>⌘</kbd> means Command on macOS, <kbd>Ctrl</kbd> on Windows and Linux. Boxes marked <b>Try this</b> are short exercises that use the kind of photo you probably have on disk.</p>
|
<p>Every figure is a real screenshot from a running installation with a portrait session loaded. The file names, cameras and metadata are the uploaded originals; the cull, crop and grade shown were arranged for the guide. Keys are written for both platforms: <kbd>⌘</kbd> means Command on macOS, <kbd>Ctrl</kbd> on Windows and Linux. Boxes marked <b>Try this</b> are short exercises that use the kind of photo you probably have on disk.</p>
|
||||||
|
|
||||||
<div class="glance">
|
<div class="glance">
|
||||||
<div><strong>Local first</strong><span>The browser keeps its own catalogue in IndexedDB. A server adds shared storage and raw decoding; it is not required for JPEG/PNG work.</span></div>
|
<div><strong>Local first</strong><span>The browser keeps its own catalogue in IndexedDB. A team server adds shared storage and accounts; raw decoding runs in the engine bundled with the desktop app, so it is not required for JPEG/PNG work.</span></div>
|
||||||
<div><strong>Non-destructive</strong><span>Edits are parameters beside the file. The original pixels are only ever read, never rewritten.</span></div>
|
<div><strong>Non-destructive</strong><span>Edits are parameters beside the file. The original pixels are only ever read, never rewritten.</span></div>
|
||||||
<div><strong>Raw aware</strong><span>Camera raws are demosaiced by the bundled LibRaw server, then developed like any other frame — with a 16-bit sidecar for grading.</span></div>
|
<div><strong>Raw aware</strong><span>Camera raws are demosaiced by the bundled LibRaw engine on this PC, then developed like any other frame — with a 16-bit sidecar for grading.</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>Drag a card or folder onto the window.</li>
|
<li>Drag a card or folder onto the window.</li>
|
||||||
<li>Pick the event, or type a new name.</li>
|
<li>Pick the event, or type a new name.</li>
|
||||||
<li>Raws and TIFF need the server; JPEG/PNG do not.</li>
|
<li>Raws and TIFF need the local engine (bundled with the desktop app); JPEG/PNG do not.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="qs-box">
|
<div class="qs-box">
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
<div class="qs-box">
|
<div class="qs-box">
|
||||||
<h2>6 · Deliver</h2>
|
<h2>6 · Deliver</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Export</b> → JPEG/PNG/WebP/TIFF, size, recipe, watermark.</li>
|
<li><b>Export</b> → JPEG/PNG/WebP/JPEG XL/TIFF, size, recipe, watermark.</li>
|
||||||
<li><b>Share</b> → client gallery link with picks and comments.</li>
|
<li><b>Share</b> → client gallery link with picks and comments.</li>
|
||||||
<li><b>Print</b> → A4/Letter/5×7 through the same renderer.</li>
|
<li><b>Print</b> → A4/Letter/5×7 through the same renderer.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -280,7 +280,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="qs-foot">If a raw will not import, the server is offline or the camera is unsupported by LibRaw — see Chapter 4. If the canvas is black, WebGL 2 is unavailable — see Chapter 21.</div>
|
<div class="qs-foot">If a raw will not import, the local engine is not running or the camera is unsupported by LibRaw — see Chapter 4. If the canvas is black, WebGL 2 is unavailable — see Chapter 21.</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- ============================== 1 ============================== -->
|
<!-- ============================== 1 ============================== -->
|
||||||
@@ -306,7 +306,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>Browser</td><td>A current Chromium (Chrome, Edge), Firefox or Safari with WebGL 2. Hardware acceleration is strongly recommended: previews, thumbnails and exports all render on the GPU.</td></tr>
|
<tr><td>Browser</td><td>A current Chromium (Chrome, Edge), Firefox or Safari with WebGL 2. Hardware acceleration is strongly recommended: previews, thumbnails and exports all render on the GPU.</td></tr>
|
||||||
<tr><td>Display</td><td>1280 × 800 minimum. The layout is built for a laptop and expands to fill a desktop screen.</td></tr>
|
<tr><td>Display</td><td>1280 × 800 minimum. The layout is built for a laptop and expands to fill a desktop screen.</td></tr>
|
||||||
<tr><td>Server (optional)</td><td>Node 22.5+ or Docker, for raw and TIFF decoding, shared storage, accounts and proofing links. JPEG, PNG, WebP and AVIF work without it.</td></tr>
|
<tr><td>Team server (optional)</td><td>Node 22.5+ or Docker, for shared storage, accounts and proofing links. The desktop app bundles the same engine for raw and TIFF decoding; JPEG, PNG, WebP and AVIF work without either.</td></tr>
|
||||||
<tr><td>Windows app (optional)</td><td>Windows 10 or 11, 64-bit. Nothing else: Node, .NET and the VC++ runtime are bundled or not needed.</td></tr>
|
<tr><td>Windows app (optional)</td><td>Windows 10 or 11, 64-bit. Nothing else: Node, .NET and the VC++ runtime are bundled or not needed.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
<section class="chapter">
|
<section class="chapter">
|
||||||
<div class="kicker">Chapter 2</div>
|
<div class="kicker">Chapter 2</div>
|
||||||
<h1>Installing Luminary</h1>
|
<h1>Installing Luminary</h1>
|
||||||
<p class="lede">Three supported ways in. Pick the one that matches how the machine will be used; they all run the same server and the same interface.</p>
|
<p class="lede">Three supported ways in. Pick the one that matches how the machine will be used; they all run the same engine and the same interface. The Linux and macOS bundles install the same desktop app.</p>
|
||||||
|
|
||||||
<h2>Option A — Docker (recommended for a server)</h2>
|
<h2>Option A — Docker (recommended for a server)</h2>
|
||||||
<ol class="steps">
|
<ol class="steps">
|
||||||
@@ -372,18 +372,18 @@
|
|||||||
<section class="chapter">
|
<section class="chapter">
|
||||||
<div class="kicker">Chapter 3</div>
|
<div class="kicker">Chapter 3</div>
|
||||||
<h1>The Windows desktop app</h1>
|
<h1>The Windows desktop app</h1>
|
||||||
<p class="lede">An optional, self-contained Windows build of the same application: no Node install, no account, no browser chrome. It is a folder you can copy to another PC, or an installer that creates shortcuts.</p>
|
<p class="lede">An optional, self-contained Windows build of the same application: no Node install, no account, no browser. It is a folder you can copy to another PC, or an installer that creates shortcuts. The app opens its own window and starts, imports and edits with the network disconnected.</p>
|
||||||
|
|
||||||
<h2>What is in the folder</h2>
|
<h2>What is in the folder</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead><tr><th style="width:34%">Item</th><th>Purpose</th></tr></thead>
|
<thead><tr><th style="width:34%">Item</th><th>Purpose</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td><code>Luminary.exe</code> or <code>Luminary.cmd</code></td><td>The launcher: starts the server hidden, waits for health, opens the window. <code>Luminary.vbs</code> does the same with no console window at all.</td></tr>
|
<tr><td><code>Luminary.exe</code> or <code>Luminary.cmd</code></td><td>The launcher: starts the local engine hidden, waits for health, opens the window. <code>Luminary.exe</code> needs no console and no Windows Script Host; <code>Luminary.vbs</code> and <code>Luminary.cmd</code> are fallbacks.</td></tr>
|
||||||
<tr><td><code>LuminaryWindow.exe</code></td><td>The native window (WebView2). The launcher opens it; starting it directly also hands off to the launcher, so it opens in desktop mode.</td></tr>
|
<tr><td><code>LuminaryWindow.exe</code></td><td>The native window (WebView2). The launcher opens it; starting it directly also hands off to the launcher, so it opens in desktop mode.</td></tr>
|
||||||
<tr><td><code>Luminary.ps1</code></td><td>The logic behind the launchers: preflight, port choice, health wait, repair, stop, status.</td></tr>
|
<tr><td><code>Luminary.ps1</code></td><td>The logic behind the launchers: preflight, port choice, health wait, repair, stop, status.</td></tr>
|
||||||
<tr><td><code>node.exe</code></td><td>The bundled Node 24 runtime. Nothing is installed system-wide.</td></tr>
|
<tr><td><code>node.exe</code></td><td>The bundled Node 24 runtime. Nothing is installed system-wide.</td></tr>
|
||||||
<tr><td><code>app\</code></td><td><code>server\</code>, <code>dist\</code> and production <code>node_modules\</code> — the unchanged application.</td></tr>
|
<tr><td><code>app\</code></td><td><code>server\</code>, <code>dist\</code> and production <code>node_modules\</code> — the unchanged application.</td></tr>
|
||||||
<tr><td><code>Stop Luminary.cmd</code></td><td>Stops the server started from this folder.</td></tr>
|
<tr><td><code>Stop Luminary.cmd</code></td><td>Stops the local engine this folder started (<code>Luminary.exe -Stop</code> does the same from the Start menu).</td></tr>
|
||||||
<tr><td><code>version.txt</code></td><td>Version, commit, build time, Node build and SHA-256 of <code>node.exe</code>.</td></tr>
|
<tr><td><code>version.txt</code></td><td>Version, commit, build time, Node build and SHA-256 of <code>node.exe</code>.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -392,10 +392,10 @@
|
|||||||
<ol class="steps">
|
<ol class="steps">
|
||||||
<li>Copy the folder (or the ZIP) to the PC — for example <code>D:\Apps\Luminary</code>.</li>
|
<li>Copy the folder (or the ZIP) to the PC — for example <code>D:\Apps\Luminary</code>.</li>
|
||||||
<li>Double-click <code>Luminary.cmd</code> (or <code>Luminary.vbs</code> for no console window; <code>Luminary.exe</code> in the Go build). Windows SmartScreen may warn because the build is unsigned: <b>More info → Run anyway</b>.</li>
|
<li>Double-click <code>Luminary.cmd</code> (or <code>Luminary.vbs</code> for no console window; <code>Luminary.exe</code> in the Go build). Windows SmartScreen may warn because the build is unsigned: <b>More info → Run anyway</b>.</li>
|
||||||
<li>The first launch creates <code>%LOCALAPPDATA%\Luminary\data</code>, starts the server on a free port and opens the window.</li>
|
<li>The first launch creates <code>%LOCALAPPDATA%\Luminary\data</code>, starts the local engine on a free port and opens the window.</li>
|
||||||
<li>Import a shoot. There is no sign-in screen: the app runs in single-user mode with one local administrator.</li>
|
<li>Import a shoot. There is no sign-in screen: the app runs in single-user mode with one local administrator.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>The installer build (<code>Luminary-Setup.exe</code>) does the same into <code>Program Files</code>, adds Start-menu and desktop shortcuts with the Luminary icon, and registers an uninstaller. The data directory is deliberately kept out of <code>Program Files</code>, so uninstalling leaves the catalogue in place.</p>
|
<p>The installer (<code>Luminary-Setup.exe</code>) does the same for your account into <code>%LOCALAPPDATA%\Programs\Luminary</code> — no administrator prompt — adds Start-menu and desktop shortcuts with the Luminary icon, and registers an uninstaller. Its <b>Start Luminary</b> tick, the shortcuts and start-at-login all launch <code>Luminary.exe</code> directly. The data directory is deliberately kept outside the program folder, so uninstalling leaves the catalogue in place.</p>
|
||||||
|
|
||||||
<h2>Everyday commands</h2>
|
<h2>Everyday commands</h2>
|
||||||
<table>
|
<table>
|
||||||
@@ -404,22 +404,23 @@
|
|||||||
<tr><td><code>Luminary.cmd -Status</code></td><td>Prints the running state, the port and the data folder.</td></tr>
|
<tr><td><code>Luminary.cmd -Status</code></td><td>Prints the running state, the port and the data folder.</td></tr>
|
||||||
<tr><td><code>Luminary.cmd -Verify</code></td><td>Checks every file the launcher needs, including the SHA-256 of <code>node.exe</code>. Exit 0 is good.</td></tr>
|
<tr><td><code>Luminary.cmd -Verify</code></td><td>Checks every file the launcher needs, including the SHA-256 of <code>node.exe</code>. Exit 0 is good.</td></tr>
|
||||||
<tr><td><code>Luminary.cmd -Repair</code></td><td>Re-downloads a missing or corrupt <code>node.exe</code> and verifies the hash before installing it.</td></tr>
|
<tr><td><code>Luminary.cmd -Repair</code></td><td>Re-downloads a missing or corrupt <code>node.exe</code> and verifies the hash before installing it.</td></tr>
|
||||||
<tr><td><code>Luminary.cmd -Stop</code></td><td>Stops the server this folder started; refuses to kill an unrelated process on the port.</td></tr>
|
<tr><td><code>Luminary.exe -Stop</code></td><td>Stops the local engine this folder started; refuses to kill an unrelated process on the port. <code>Luminary.cmd -Stop</code> does the same.</td></tr>
|
||||||
<tr><td><code>Luminary.cmd -Browser</code></td><td>Skips the native window and opens the default browser instead.</td></tr>
|
<tr><td><code>Luminary.cmd -Browser</code></td><td>Skips the native window and opens the default browser instead.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>How it behaves</h2>
|
<h2>How it behaves</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Window choice</b> — <code>LuminaryWindow.exe</code> (native, own taskbar icon) first, then Edge or Chrome in <code>--app</code> mode, then the default browser.</li>
|
<li><b>Window choice</b> — <code>LuminaryWindow.exe</code> (native, own taskbar icon) first; only if that is missing does it use Chrome, then Edge, in <code>--app</code> mode, and the default browser last. No browser profile or Microsoft account is involved in the native window.</li>
|
||||||
<li><b>Port</b> — the preferred port is tried first; if it is taken the launcher finds a free one and records it, so the shortcut always reaches the right instance.</li>
|
<li><b>Port</b> — the preferred port is tried first; if it is taken the launcher finds a free one and records it, so the shortcut always reaches the right instance.</li>
|
||||||
<li><b>Second launch</b> — if the server is already up and healthy, the launcher reuses it instead of starting another.</li>
|
<li><b>Second launch</b> — if the local engine is already up and healthy, the launcher reuses it instead of starting another.</li>
|
||||||
|
<li><b>Offline</b> — the engine listens on <code>127.0.0.1</code> only. The launcher waits for it over a direct loopback socket and the window ignores system proxies, so unplugging the network does not stop it starting, importing or editing.</li>
|
||||||
<li><b>Logs</b> — <code>%LOCALAPPDATA%\Luminary\data\logs\server.out.log</code> and <code>server.err.log</code>.</li>
|
<li><b>Logs</b> — <code>%LOCALAPPDATA%\Luminary\data\logs\server.out.log</code> and <code>server.err.log</code>.</li>
|
||||||
<li><b>Read-only media</b> — logs and runtime state fall back to <code>%LOCALAPPDATA%</code> when the bundle folder cannot be written.</li>
|
<li><b>Read-only media</b> — logs and runtime state fall back to <code>%LOCALAPPDATA%</code> when the bundle folder cannot be written.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="note">
|
<div class="note">
|
||||||
<b>Starting the window directly.</b> Double-clicking <code>LuminaryWindow.exe</code> does not open a signed-out page. It hands off to the launcher, which starts the local server in desktop mode and reopens the window signed in. The launcher remains the recommended entry point — <code>Luminary.cmd</code> or <code>Luminary.vbs</code> (or <code>Luminary.exe</code> when the Go build is used).
|
<b>Starting the window directly.</b> Double-clicking <code>LuminaryWindow.exe</code> does not open a signed-out page. It hands off to the launcher, which starts the local engine in desktop mode and reopens the window signed in. The launcher remains the recommended entry point — <code>Luminary.cmd</code> or <code>Luminary.vbs</code> (or <code>Luminary.exe</code> when the Go build is used).
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="note">
|
<div class="note">
|
||||||
@@ -427,7 +428,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="warn note">
|
<div class="warn note">
|
||||||
<b>WebView2.</b> The native window uses the Evergreen WebView2 runtime that ships with Windows 10/11. If a machine lacks it, the launcher falls back to an Edge or Chrome app window — the application still runs, only the dedicated window shell is skipped.
|
<b>WebView2.</b> The native window uses the Evergreen WebView2 runtime that ships with Windows 10/11. If a machine lacks it, the launcher falls back to a Chrome or Edge app window — the application still runs, only the dedicated window shell is skipped.
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -439,7 +440,7 @@
|
|||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
<img src="img/10-import.jpg" alt="The import dialog">
|
<img src="img/10-import.jpg" alt="The import dialog">
|
||||||
<figcaption><b>Figure 1.</b> The import dialog. The event picker names the destination, the summary counts the batch, and the note confirms the server is ready to demosaic raws.</figcaption>
|
<figcaption><b>Figure 1.</b> The import dialog. The event picker names the destination, the summary counts the batch, and the note confirms the local engine is ready to demosaic raws on this PC.</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<h2>Adding files</h2>
|
<h2>Adding files</h2>
|
||||||
@@ -457,14 +458,14 @@
|
|||||||
<thead><tr><th style="width:34%">Type</th><th>Behaviour</th></tr></thead>
|
<thead><tr><th style="width:34%">Type</th><th>Behaviour</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>JPEG, PNG, WebP, AVIF</td><td>Decoded in the browser. EXIF camera, lens, ISO, aperture, shutter and focal length are read when present.</td></tr>
|
<tr><td>JPEG, PNG, WebP, AVIF</td><td>Decoded in the browser. EXIF camera, lens, ISO, aperture, shutter and focal length are read when present.</td></tr>
|
||||||
<tr><td>TIFF (.tif, .tiff)</td><td>Decoded on the server into an editable JPEG proxy, because browsers have no TIFF decoder. The original TIFF is stored untouched and the full-resolution proxy drives the editor and export.</td></tr>
|
<tr><td>TIFF (.tif, .tiff)</td><td>Decoded by the local engine (or the team server) into an editable JPEG proxy, because browsers have no TIFF decoder. The original TIFF is stored untouched and the full-resolution proxy drives the editor and export.</td></tr>
|
||||||
<tr><td>Camera raw — CR2, CR3, NEF, ARW, ORF, RW2, RAF, DNG, PEF, SRW, 3FR and 20 more</td><td>Sent to the server, demosaiced with LibRaw, stored as the original plus an editable JPEG proxy and a 16-bit sidecar.</td></tr>
|
<tr><td>Camera raw — CR2, CR3, NEF, ARW, ORF, RW2, RAF, DNG, PEF, SRW, 3FR and 20 more</td><td>Sent to the local engine (or the team server), demosaiced with LibRaw on this PC, stored as the original plus an editable JPEG proxy and a 16-bit sidecar. Nothing is uploaded anywhere.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>A progress bar names the file being read. Failures are listed individually with the reason while the successes are kept; an unreadable raw usually means the server is offline or LibRaw does not support that camera.</p>
|
<p>A progress bar names the file being read. Failures are listed individually with the reason while the successes are kept; an unreadable raw usually means the local engine is not running or LibRaw does not support that camera.</p>
|
||||||
|
|
||||||
<h2>Tethering instead of a card reader</h2>
|
<h2>Tethering instead of a card reader</h2>
|
||||||
<p>An event can watch a folder on the server. Point a capture app or a transfer folder at <code><data>\tether\<event id></code>; the open editor polls it, imports each new JPEG, TIFF, WebP or raw through the normal path, and only deletes the file after the client confirms. Closing the tab loses nothing — the files wait in the folder.</p>
|
<p>An event can watch a folder on the engine. Point a capture app or a transfer folder at <code><data>\tether\<event id></code>; the open editor polls it, imports each new JPEG, TIFF, WebP or raw through the normal path, and only deletes the file after the client confirms. Closing the tab loses nothing — the files wait in the folder.</p>
|
||||||
|
|
||||||
<div class="note">
|
<div class="note">
|
||||||
<b>Try this.</b> Import ten frames, name the event after the shoot, then drag the whole event onto another in the sidebar. The photos move as metadata; no file is copied or re-encoded.
|
<b>Try this.</b> Import ten frames, name the event after the shoot, then drag the whole event onto another in the sidebar. The photos move as metadata; no file is copied or re-encoded.
|
||||||
@@ -483,7 +484,7 @@
|
|||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<h2>The sidebar</h2>
|
<h2>The sidebar</h2>
|
||||||
<p><b>All photos</b> is the whole catalogue; <b>Trash</b> holds deleted photos until you empty it (restore, delete permanently, or empty all). Each event shows its photo count. <b>+</b> creates an event; drag one event onto another to move its photos; the footer reports whether a server is connected and who you are signed in as.</p>
|
<p><b>All photos</b> is the whole catalogue; <b>Trash</b> holds deleted photos until you empty it (restore, delete permanently, or empty all). Each event shows its photo count. <b>+</b> creates an event; drag one event onto another to move its photos; the footer reports whether a team server is connected and who you are signed in as.</p>
|
||||||
|
|
||||||
<h2>The filter bar</h2>
|
<h2>The filter bar</h2>
|
||||||
<figure>
|
<figure>
|
||||||
@@ -722,9 +723,9 @@
|
|||||||
<tr><td>Sharpen — Detail</td><td>How much fine structure is included; lower values protect smooth areas.</td></tr>
|
<tr><td>Sharpen — Detail</td><td>How much fine structure is included; lower values protect smooth areas.</td></tr>
|
||||||
<tr><td>Noise reduction — Luminance</td><td>Smooths luminance noise at the cost of fine detail.</td></tr>
|
<tr><td>Noise reduction — Luminance</td><td>Smooths luminance noise at the cost of fine detail.</td></tr>
|
||||||
<tr><td>Noise reduction — Detail</td><td>How much texture survives the smoothing.</td></tr>
|
<tr><td>Noise reduction — Detail</td><td>How much texture survives the smoothing.</td></tr>
|
||||||
<tr><td>Denoise</td><td>Detail-preserving pass that runs on the server for difficult high-ISO frames; the result is cached per model, so switching back to a model you already rendered is instant.</td></tr>
|
<tr><td>Denoise</td><td>Detail-preserving pass that runs in the local engine (or the team server) for difficult high-ISO frames; the result is cached per model, so switching back to a model you already rendered is instant.</td></tr>
|
||||||
<tr><td>AI denoise — Model</td><td><b>Guided</b> (default, fastest, keeps the most fine texture), <b>SCUNet</b> (learned model, removes the most grain and smooths more) or <b>NLM</b> (non-local means, between the two). Pick one and press Generate; the model is saved with the photo.</td></tr>
|
<tr><td>AI denoise — Model</td><td><b>Guided</b> (default, fastest, keeps the most fine texture), <b>SCUNet</b> (learned model, removes the most grain and smooths more) or <b>NLM</b> (non-local means, between the two). Pick one and press Generate; the model is saved with the photo.</td></tr>
|
||||||
<tr><td>AI denoise — Amount</td><td>Blends the rendered result into the frame. The server always renders at full strength, so the slider is instant and never re-runs the model.</td></tr>
|
<tr><td>AI denoise — Amount</td><td>Blends the rendered result into the frame. The engine always renders at full strength, so the slider is instant and never re-runs the model.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -930,7 +931,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead><tr><th style="width:26%">Option</th><th>What it does</th></tr></thead>
|
<thead><tr><th style="width:26%">Option</th><th>What it does</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>Format</td><td>JPEG, PNG, WebP or uncompressed 16-bit TIFF. JPEG and WebP expose quality; PNG and TIFF are lossless.</td></tr>
|
<tr><td>Format</td><td>JPEG, PNG, WebP, JPEG XL or uncompressed 16-bit TIFF. JPEG, WebP and JPEG XL expose quality; JPEG XL also has a lossless switch; PNG and TIFF are lossless.</td></tr>
|
||||||
<tr><td>Resize</td><td>Full resolution, a long-edge size in pixels, or a percentage of the cropped frame.</td></tr>
|
<tr><td>Resize</td><td>Full resolution, a long-edge size in pixels, or a percentage of the cropped frame.</td></tr>
|
||||||
<tr><td>Quality</td><td>Encoder quality, 40–100. 90–95 is visually lossless for most photographs.</td></tr>
|
<tr><td>Quality</td><td>Encoder quality, 40–100. 90–95 is visually lossless for most photographs.</td></tr>
|
||||||
<tr><td>File name</td><td>Template with <code>{name}</code>, <code>{date}</code>, <code>{time}</code> and <code>{index}</code>; the first result is previewed underneath.</td></tr>
|
<tr><td>File name</td><td>Template with <code>{name}</code>, <code>{date}</code>, <code>{time}</code> and <code>{index}</code>; the first result is previewed underneath.</td></tr>
|
||||||
@@ -1192,7 +1193,7 @@
|
|||||||
<b>If something looks wrong, press <kbd>?</kbd> and compare.</b> The shortcut sheet is generated from the same map the keyboard uses, so if a key is listed there it is live.
|
<b>If something looks wrong, press <kbd>?</kbd> and compare.</b> The shortcut sheet is generated from the same map the keyboard uses, so if a key is listed there it is live.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="end">Luminary User Guide · Version 1.1 · Screenshots captured from a live 868-photo catalog at 1500 × 940.</div>
|
<div class="end">Luminary User Guide · Version 1.3 · Screenshots captured from a live 868-photo catalog at 1500 × 940.</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- ============================== APPENDIX A ============================== -->
|
<!-- ============================== APPENDIX A ============================== -->
|
||||||
@@ -1214,7 +1215,8 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Export formats</h2>
|
<h2>Export formats</h2>
|
||||||
<p>JPEG, PNG, WebP and uncompressed 16-bit TIFF, at full resolution, a long edge, or a percentage of the cropped frame. Output dimensions always reflect the crop and rotation; colour space is sRGB, Display P3 or Adobe RGB with a generated ICC profile.</p>
|
<p>JPEG, PNG, WebP, JPEG XL and uncompressed 16-bit TIFF, at full resolution, a long edge, or a percentage of the cropped frame. Output dimensions always reflect the crop and rotation; colour space is sRGB, Display P3 or Adobe RGB with a generated ICC profile.</p>
|
||||||
|
<p>JPEG XL is exported at 8-bit in sRGB, either lossy (quality 40–100) or lossless, using libjxl compiled to WebAssembly inside the app — the file is encoded on this computer and nothing is uploaded. There is no embedded ICC profile or XMP metadata in a JXL export yet; use JPEG or 16-bit TIFF when you need those. Chrome 155+, Firefox 158+ and Safari 17+ open .jxl files; Microsoft Edge does not display them yet.</p>
|
||||||
|
|
||||||
<h2>Badges on a card</h2>
|
<h2>Badges on a card</h2>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
+7
-7
@@ -51,8 +51,8 @@ Output:
|
|||||||
|
|
||||||
```
|
```
|
||||||
<out>/
|
<out>/
|
||||||
Luminary-0.5.2-linux-x64.tar.gz portable bundle
|
Luminary-0.5.4-linux-x64.tar.gz portable bundle
|
||||||
Luminary-0.5.2-linux-amd64.deb Ubuntu package, built from the same bundle
|
Luminary-0.5.4-linux-amd64.deb Ubuntu package, built from the same bundle
|
||||||
stage/Luminary/ the unpacked bundle (kept for inspection)
|
stage/Luminary/ the unpacked bundle (kept for inspection)
|
||||||
cache/node-v24.22.2-linux-x64.tar.gz
|
cache/node-v24.22.2-linux-x64.tar.gz
|
||||||
cache/SHASUMS256-v24.22.2.txt
|
cache/SHASUMS256-v24.22.2.txt
|
||||||
@@ -72,7 +72,7 @@ catalog still live in `~/.local/share/luminary`, so removing or upgrading the
|
|||||||
package never touches them:
|
package never touches them:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install ./Luminary-0.5.2-linux-amd64.deb
|
sudo apt install ./Luminary-0.5.4-linux-amd64.deb
|
||||||
luminary # or launch Luminary from the applications menu
|
luminary # or launch Luminary from the applications menu
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ with `sudo apt remove luminary`; `sudo apt purge luminary` also removes
|
|||||||
Or stay portable — nothing installed, nothing to root:
|
Or stay portable — nothing installed, nothing to root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tar -xzf Luminary-0.5.2-linux-x64.tar.gz
|
tar -xzf Luminary-0.5.4-linux-x64.tar.gz
|
||||||
cd Luminary
|
cd Luminary
|
||||||
./luminary # starts desktop mode and opens the app window
|
./luminary # starts desktop mode and opens the app window
|
||||||
./install.sh # optional: add Luminary to the applications menu
|
./install.sh # optional: add Luminary to the applications menu
|
||||||
@@ -187,9 +187,9 @@ check (the launcher runs with `LUMINARY_WINDOW=none` during the test).
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd <out>
|
cd <out>
|
||||||
sha256sum Luminary-0.5.2-linux-x64.tar.gz
|
sha256sum Luminary-0.5.4-linux-x64.tar.gz
|
||||||
tar -tzf Luminary-0.5.2-linux-x64.tar.gz | grep -E 'luminary$|runtime/bin/node$|app/server/index.mjs$'
|
tar -tzf Luminary-0.5.4-linux-x64.tar.gz | grep -E 'luminary$|runtime/bin/node$|app/server/index.mjs$'
|
||||||
tar -xzf Luminary-0.5.2-linux-x64.tar.gz -C /tmp/luminary-check
|
tar -xzf Luminary-0.5.4-linux-x64.tar.gz -C /tmp/luminary-check
|
||||||
/tmp/luminary-check/Luminary/luminary --verify
|
/tmp/luminary-check/Luminary/luminary --verify
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -256,6 +256,78 @@ else
|
|||||||
check '--status reports stopped' 1
|
check '--status reports stopped' 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
say ''
|
||||||
|
say 'Offline import (proxy unreachable)'
|
||||||
|
# Every proxy variable points at a black hole, so a request that consults the
|
||||||
|
# system proxy fails instead of reaching 127.0.0.1. That is the shape of the
|
||||||
|
# bug where an import with the network unplugged reported that it could not
|
||||||
|
# reach the engine: the engine was fine, the request was routed through a proxy.
|
||||||
|
PROXY_VARS=(HTTP_PROXY HTTPS_PROXY ALL_PROXY http_proxy https_proxy all_proxy GLOBAL_AGENT_HTTP_PROXY)
|
||||||
|
for var in "${PROXY_VARS[@]}"; do export "$var=http://10.255.255.1:9"; done
|
||||||
|
unset NO_PROXY no_proxy
|
||||||
|
|
||||||
|
check 'app window bypasses proxies' "$(grep -q -- '--no-proxy-server' "$BUNDLE/luminary" && echo 0 || echo 1)"
|
||||||
|
|
||||||
|
"$BUNDLE/luminary" >"$WORK_DIR/offline-start.txt" 2>&1
|
||||||
|
offline_start=$?
|
||||||
|
check 'launcher starts with the proxy unreachable' "$offline_start" "$(head -n 1 "$WORK_DIR/offline-start.txt")"
|
||||||
|
|
||||||
|
OFFLINE_URL=""
|
||||||
|
if [ -f "$LUMINARY_DATA/runtime.json" ]; then
|
||||||
|
OFFLINE_URL="http://127.0.0.1:$("$NODE" -p "JSON.parse(require('fs').readFileSync('$LUMINARY_DATA/runtime.json','utf8')).port")"
|
||||||
|
check 'runtime.json written offline' 0
|
||||||
|
else
|
||||||
|
check 'runtime.json written offline' 1 "$LUMINARY_DATA/runtime.json"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$OFFLINE_URL" ]; then
|
||||||
|
code="$(http GET "$OFFLINE_URL/api/health")"
|
||||||
|
check 'health answers offline' $([ "$code" = "200" ] && echo 0 || echo 1) "HTTP $code"
|
||||||
|
|
||||||
|
# An import is an upload, a decode in the bundle and a preview read. TIFF
|
||||||
|
# takes the same server path as camera raw, so this exercises the real thing
|
||||||
|
# without shipping a raw fixture in the bundle.
|
||||||
|
"$NODE" -e '
|
||||||
|
const path = require("node:path");
|
||||||
|
const sharp = require(path.join(process.argv[1], "app", "node_modules", "sharp"));
|
||||||
|
sharp({ create: { width: 8, height: 8, channels: 3, background: { r: 200, g: 100, b: 50 } } })
|
||||||
|
.tiff()
|
||||||
|
.toFile(process.argv[2])
|
||||||
|
.then(() => process.exit(0))
|
||||||
|
.catch(() => process.exit(1));
|
||||||
|
' "$BUNDLE" "$WORK_DIR/offline-smoke.tiff"
|
||||||
|
check 'prepared a TIFF to import' "$?"
|
||||||
|
|
||||||
|
upload_status="$("$NODE" -e '
|
||||||
|
const fs = require("node:fs");
|
||||||
|
const [url, file, out] = process.argv.slice(-3);
|
||||||
|
fetch(url, { method: "POST", headers: { "Content-Type": "image/tiff" }, body: fs.readFileSync(file) })
|
||||||
|
.then(async (r) => { fs.writeFileSync(out, await r.text()); process.stdout.write(String(r.status)); })
|
||||||
|
.catch(() => process.stdout.write("0"));
|
||||||
|
' "$OFFLINE_URL/api/photos/smoke-offline/original?name=offline-smoke.tiff&mime=image%2Ftiff" "$WORK_DIR/offline-smoke.tiff" "$BODY")"
|
||||||
|
# A new upload is created (201); replacing one answers 200.
|
||||||
|
case "$upload_status" in
|
||||||
|
200|201) upload_ok=0 ;;
|
||||||
|
*) upload_ok=1 ;;
|
||||||
|
esac
|
||||||
|
check 'import upload accepted offline' "$upload_ok" "HTTP $upload_status"
|
||||||
|
|
||||||
|
preview="$(jget previewUrl)"
|
||||||
|
check 'decoded proxy offered offline' $([ -n "$preview" ] && echo 0 || echo 1) "$preview"
|
||||||
|
if [ -n "$preview" ]; then
|
||||||
|
case "$preview" in
|
||||||
|
http*) preview_url="$preview" ;;
|
||||||
|
*) preview_url="$OFFLINE_URL$preview" ;;
|
||||||
|
esac
|
||||||
|
code="$(http GET "$preview_url")"
|
||||||
|
check 'preview readable offline' $([ "$code" = "200" ] && echo 0 || echo 1) "HTTP $code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$BUNDLE/luminary" --stop >/dev/null 2>&1
|
||||||
|
check 'stopped the offline run' 0
|
||||||
|
for var in "${PROXY_VARS[@]}"; do unset "$var"; done
|
||||||
|
|
||||||
say ''
|
say ''
|
||||||
say 'Window'
|
say 'Window'
|
||||||
skip 'app window opens' 'visual check; the launcher opened nothing during this run'
|
skip 'app window opens' 'visual check; the launcher opened nothing during this run'
|
||||||
|
|||||||
+1
-1
@@ -441,7 +441,7 @@ Updating: stop Luminary, replace app/ and runtime/ from a newer bundle, start
|
|||||||
again. The data folder is outside the bundle and is untouched.
|
again. The data folder is outside the bundle and is untouched.
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
- The server listens on 127.0.0.1 only. Set HOST=0.0.0.0 when starting it
|
- The local engine listens on 127.0.0.1 only. Set HOST=0.0.0.0 when starting it
|
||||||
directly with node if client proofing galleries must reach other devices.
|
directly with node if client proofing galleries must reach other devices.
|
||||||
- The app window is the browser's own app mode with a private profile, so it
|
- The app window is the browser's own app mode with a private profile, so it
|
||||||
has no tabs or address bar. Some Wayland desktops ignore the requested
|
has no tabs or address bar. Some Wayland desktops ignore the requested
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Luminary desktop launcher for Linux.
|
# Luminary desktop launcher for Linux.
|
||||||
#
|
#
|
||||||
# Starts the bundled server in single-user desktop mode on a free loopback port,
|
# Starts the bundled local engine in single-user desktop mode on a free loopback port,
|
||||||
# waits for /api/health, then opens the UI in a chromeless app window (Chrome,
|
# waits for /api/health, then opens the UI in a chromeless app window (Chrome,
|
||||||
# Chromium, Edge, Brave or Vivaldi). Firefox, or the default browser, is the
|
# Chromium, Edge, Brave or Vivaldi). Firefox, or the default browser, is the
|
||||||
# fallback.
|
# fallback.
|
||||||
#
|
#
|
||||||
# ./luminary start and open the window
|
# ./luminary start and open the window
|
||||||
# ./luminary --stop stop the running server
|
# ./luminary --stop stop the running local engine
|
||||||
# ./luminary --status report pid, URL, data folder and health
|
# ./luminary --status report pid, URL, data folder and health
|
||||||
# ./luminary --browser open a normal browser tab instead
|
# ./luminary --browser open a normal browser tab instead
|
||||||
# ./luminary --verify check that this is a complete bundle
|
# ./luminary --verify check that this is a complete bundle
|
||||||
@@ -167,7 +167,7 @@ start() {
|
|||||||
|
|
||||||
pid="$(cat "$PID_FILE" 2>/dev/null)"
|
pid="$(cat "$PID_FILE" 2>/dev/null)"
|
||||||
if ! wait_health "$port"; then
|
if ! wait_health "$port"; then
|
||||||
problem "the server did not answer on /api/health."
|
problem "the local engine did not answer on /api/health."
|
||||||
problem "See $LOG_DIR/server.err.log, or run: cd \"$APP\" && \"$NODE\" server/index.mjs"
|
problem "See $LOG_DIR/server.err.log, or run: cd \"$APP\" && \"$NODE\" server/index.mjs"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@@ -237,12 +237,15 @@ open_window() {
|
|||||||
while IFS= read -r name; do
|
while IFS= read -r name; do
|
||||||
if browser="$(command -v "$name" 2>/dev/null)"; then
|
if browser="$(command -v "$name" 2>/dev/null)"; then
|
||||||
say "Opening the app window with $name"
|
say "Opening the app window with $name"
|
||||||
|
# --no-proxy-server: the window only ever loads 127.0.0.1, and an
|
||||||
|
# offline machine cannot resolve the system proxy it would otherwise use.
|
||||||
setsid "$browser" \
|
setsid "$browser" \
|
||||||
--app="$url" \
|
--app="$url" \
|
||||||
--user-data-dir="$DATA_DIR/window-profile" \
|
--user-data-dir="$DATA_DIR/window-profile" \
|
||||||
--class=Luminary \
|
--class=Luminary \
|
||||||
--no-first-run \
|
--no-first-run \
|
||||||
--no-default-browser-check \
|
--no-default-browser-check \
|
||||||
|
--no-proxy-server \
|
||||||
>/dev/null 2>&1 &
|
>/dev/null 2>&1 &
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
`node linux/build.mjs --skip-build --publish` drops the finished artifacts here:
|
`node linux/build.mjs --skip-build --publish` drops the finished artifacts here:
|
||||||
|
|
||||||
```
|
```
|
||||||
Luminary-0.5.2-linux-x64.tar.gz portable bundle
|
Luminary-0.5.3.1-linux-x64.tar.gz portable bundle
|
||||||
Luminary-0.5.2-linux-amd64.deb Ubuntu package
|
Luminary-0.5.3.1-linux-amd64.deb Ubuntu package
|
||||||
SHA256SUMS.txt
|
SHA256SUMS.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -16,11 +16,11 @@ Verify a copy with:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sha256sum -c SHA256SUMS.txt
|
sha256sum -c SHA256SUMS.txt
|
||||||
tar -tzf Luminary-0.5.2-linux-x64.tar.gz | head
|
tar -tzf Luminary-0.5.3.1-linux-x64.tar.gz | head
|
||||||
dpkg-deb --info Luminary-0.5.2-linux-amd64.deb
|
dpkg-deb --info Luminary-0.5.3.1-linux-amd64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
On Ubuntu the easiest install is `sudo apt install ./Luminary-0.5.2-linux-amd64.deb`,
|
On Ubuntu the easiest install is `sudo apt install ./Luminary-0.5.3.1-linux-amd64.deb`,
|
||||||
which adds Luminary to the applications menu. The portable route is to extract
|
which adds Luminary to the applications menu. The portable route is to extract
|
||||||
the whole tarball and run `./luminary` from the extracted `Luminary` folder;
|
the whole tarball and run `./luminary` from the extracted `Luminary` folder;
|
||||||
`./install.sh` adds that copy to the applications menu.
|
`./install.sh` adds that copy to the applications menu.
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
5e5725d8b918b161d7fd0633049f90fa46d2892ba8930db4230b59c2f556602e Luminary-0.5.2-linux-x64.tar.gz
|
3b2a7ac1d5b0057ce0d3796b5e2a57024a5d7d655800ed55245c2f00141827fd Luminary-0.5.4-linux-x64.tar.gz
|
||||||
c7a8325e8a1a58880d30cbec167fe1f75feb8877b41fa8857200602e09ac5a96 Luminary-0.5.2-linux-amd64.deb
|
45043c4c71003ccf210b7ee5ae8c45a58406aa526fa13e7fdb6e26f89b8c52ec Luminary-0.5.4-linux-amd64.deb
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ What it needs
|
|||||||
and no administrator password are needed for day-to-day use.
|
and no administrator password are needed for day-to-day use.
|
||||||
|
|
||||||
Start, stop and status
|
Start, stop and status
|
||||||
Opening Luminary starts the local server and opens the editor. Opening it
|
Opening Luminary starts the local engine and opens the editor. Opening it
|
||||||
again reuses the running copy instead of starting a second one.
|
again reuses the running copy instead of starting a second one.
|
||||||
- Stop Luminary.command (next to the app in the disk image) stops the server.
|
- Stop Luminary.command (next to the app in the disk image) stops it.
|
||||||
- The same commands are available from a terminal:
|
- The same commands are available from a terminal:
|
||||||
/Applications/Luminary.app/Contents/Resources/launcher.sh --status
|
/Applications/Luminary.app/Contents/Resources/launcher.sh --status
|
||||||
/Applications/Luminary.app/Contents/Resources/launcher.sh --stop
|
/Applications/Luminary.app/Contents/Resources/launcher.sh --stop
|
||||||
@@ -46,13 +46,13 @@ Logs
|
|||||||
~/Library/Application Support/Luminary/data/logs/server.err.log
|
~/Library/Application Support/Luminary/data/logs/server.err.log
|
||||||
|
|
||||||
Updating
|
Updating
|
||||||
Quit the server (Stop Luminary.command), drag the new Luminary.app over the
|
Stop the local engine (Stop Luminary.command), drag the new Luminary.app over the
|
||||||
old one, and start it again. The data folder is outside the app and is not
|
old one, and start it again. The data folder is outside the app and is not
|
||||||
touched. The catalog migrates itself on first start.
|
touched. The catalog migrates itself on first start.
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
- The server listens on 127.0.0.1 only. For proofing galleries that other
|
- The local engine listens on 127.0.0.1 only. For proofing galleries that
|
||||||
devices should reach, run the server yourself with HOST=0.0.0.0.
|
other devices should reach, run it yourself with HOST=0.0.0.0.
|
||||||
- The app window is Chrome or Edge in app mode, using its own profile in the
|
- The app window is Chrome or Edge in app mode, using its own profile in the
|
||||||
data folder, so it does not mix with your normal browsing. Set
|
data folder, so it does not mix with your normal browsing. Set
|
||||||
LUMINARY_WINDOW=browser to open a normal tab instead.
|
LUMINARY_WINDOW=browser to open a normal tab instead.
|
||||||
|
|||||||
+2
-2
@@ -44,8 +44,8 @@ Outputs:
|
|||||||
```
|
```
|
||||||
~/Library/Caches/luminary-macos/
|
~/Library/Caches/luminary-macos/
|
||||||
stage/Luminary.app
|
stage/Luminary.app
|
||||||
Luminary-0.5.2-mac-arm64.zip
|
Luminary-0.5.3.1-mac-arm64.zip
|
||||||
Luminary-0.5.2-mac-arm64.dmg
|
Luminary-0.5.3.1-mac-arm64.dmg
|
||||||
cache/ # downloaded node tarballs, icon work
|
cache/ # downloaded node tarballs, icon work
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Stop the Luminary server started by Luminary.app.
|
# Stop the Luminary local engine started by Luminary.app.
|
||||||
# Double-clicking a .command file opens Terminal for as long as this runs.
|
# Double-clicking a .command file opens Terminal for as long as this runs.
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ state_pid() {
|
|||||||
sed -n 's/.*"pid"[[:space:]]*:[[:space:]]*\([0-9][0-9]*\).*/\1/p' "$STATE" | head -1
|
sed -n 's/.*"pid"[[:space:]]*:[[:space:]]*\([0-9][0-9]*\).*/\1/p' "$STATE" | head -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --noproxy forces a direct connection: offline, curl would otherwise resolve
|
||||||
|
# the system proxy/PAC first and every health probe would fail.
|
||||||
healthy() {
|
healthy() {
|
||||||
curl -fs -m 2 "http://127.0.0.1:$1/api/health" >/dev/null 2>&1
|
curl -fs -m 2 --noproxy '*' "http://127.0.0.1:$1/api/health" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ask node rather than nc: the bundle always has one, and nc's flags differ
|
# Ask node rather than nc: the bundle always has one, and nc's flags differ
|
||||||
@@ -75,12 +77,14 @@ open_window() {
|
|||||||
open -na "Google Chrome" --args \
|
open -na "Google Chrome" --args \
|
||||||
--app="$url" \
|
--app="$url" \
|
||||||
--user-data-dir="$DATA/window-profile-chrome" \
|
--user-data-dir="$DATA/window-profile-chrome" \
|
||||||
--window-size=1500,950 --no-first-run --no-default-browser-check
|
--window-size=1500,950 --no-first-run --no-default-browser-check \
|
||||||
|
--no-proxy-server
|
||||||
elif [ -d "/Applications/Microsoft Edge.app" ] || [ -d "$HOME/Applications/Microsoft Edge.app" ]; then
|
elif [ -d "/Applications/Microsoft Edge.app" ] || [ -d "$HOME/Applications/Microsoft Edge.app" ]; then
|
||||||
open -na "Microsoft Edge" --args \
|
open -na "Microsoft Edge" --args \
|
||||||
--app="$url" \
|
--app="$url" \
|
||||||
--user-data-dir="$DATA/window-profile-edge" \
|
--user-data-dir="$DATA/window-profile-edge" \
|
||||||
--window-size=1500,950 --no-first-run --no-default-browser-check
|
--window-size=1500,950 --no-first-run --no-default-browser-check \
|
||||||
|
--no-proxy-server
|
||||||
else
|
else
|
||||||
open "$url"
|
open "$url"
|
||||||
fi
|
fi
|
||||||
@@ -162,7 +166,7 @@ start() {
|
|||||||
if ! kill -0 "$pid" 2>/dev/null; then
|
if ! kill -0 "$pid" 2>/dev/null; then
|
||||||
rm -f "$STATE"
|
rm -f "$STATE"
|
||||||
tail_logs
|
tail_logs
|
||||||
dialog "Luminary's server stopped while starting. Log: $LOGS/server.err.log"
|
dialog "Luminary's local engine stopped while starting. Log: $LOGS/server.err.log"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
@@ -232,7 +236,7 @@ Luminary.app launcher
|
|||||||
|
|
||||||
No argument starts the app (or reuses a running copy) and opens the window.
|
No argument starts the app (or reuses a running copy) and opens the window.
|
||||||
--browser open a normal browser tab instead of a Chrome/Edge app window
|
--browser open a normal browser tab instead of a Chrome/Edge app window
|
||||||
--stop stop the server this bundle started
|
--stop stop the local engine this bundle started
|
||||||
--status print version, pid, port, health and the data directory
|
--status print version, pid, port, health and the data directory
|
||||||
--verify check that the bundle is complete
|
--verify check that the bundle is complete
|
||||||
|
|
||||||
|
|||||||
Generated
+18
-2
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "luminary",
|
"name": "luminary",
|
||||||
"version": "0.5.2",
|
"version": "0.5.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "luminary",
|
"name": "luminary",
|
||||||
"version": "0.5.2",
|
"version": "0.5.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@jsquash/jxl": "^1.3.0",
|
||||||
"exifr": "^7.1.3",
|
"exifr": "^7.1.3",
|
||||||
"libraw-wasm": "^1.6.0",
|
"libraw-wasm": "^1.6.0",
|
||||||
"nodemailer": "^10.6.1",
|
"nodemailer": "^10.6.1",
|
||||||
@@ -1259,6 +1260,15 @@
|
|||||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@jsquash/jxl": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jsquash/jxl/-/jxl-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-IVOPTneyOd9eBAuow+FnCYIP6wkIc7CjrCDnZGiqAPyJ63vMVxv3zoWiucGiZVh6u9vi/l40AkcS9QwkoVSAqA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"wasm-feature-detect": "^1.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@rolldown/pluginutils": {
|
"node_modules/@rolldown/pluginutils": {
|
||||||
"version": "1.0.0-beta.27",
|
"version": "1.0.0-beta.27",
|
||||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
|
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
|
||||||
@@ -3003,6 +3013,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/wasm-feature-detect": {
|
||||||
|
"version": "1.10.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/wasm-feature-detect/-/wasm-feature-detect-1.10.1.tgz",
|
||||||
|
"integrity": "sha512-+wz9+WpMKgQ7H1tm41nJbFwAvwX4DqY0jNY8Blw5Qe6hHg1yhCJ+AqU0R4lgX7p3pyo8irYIl1+mMNoBwSj2Zg==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/why-is-node-running": {
|
"node_modules/why-is-node-running": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
|
||||||
|
|||||||
+2
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "luminary",
|
"name": "luminary",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.5.2",
|
"version": "0.5.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
"build:lens-db": "node scripts/build-lens-db.mjs"
|
"build:lens-db": "node scripts/build-lens-db.mjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@jsquash/jxl": "^1.3.0",
|
||||||
"exifr": "^7.1.3",
|
"exifr": "^7.1.3",
|
||||||
"libraw-wasm": "^1.6.0",
|
"libraw-wasm": "^1.6.0",
|
||||||
"nodemailer": "^10.6.1",
|
"nodemailer": "^10.6.1",
|
||||||
|
|||||||
Binary file not shown.
@@ -122,6 +122,12 @@ function main() {
|
|||||||
const sudoLines = SUDO_PASS ? `${SUDO_PASS}\n${SUDO_PASS}\n` : undefined;
|
const sudoLines = SUDO_PASS ? `${SUDO_PASS}\n${SUDO_PASS}\n` : undefined;
|
||||||
const script = [
|
const script = [
|
||||||
`cd ${REMOTE_PATH} || exit 3`,
|
`cd ${REMOTE_PATH} || exit 3`,
|
||||||
|
// node_modules is excluded from the rsync, so a new dependency in the
|
||||||
|
// lockfile would otherwise fail the build on a server that has never
|
||||||
|
// installed it. Installed as the login user: the checkout belongs to them.
|
||||||
|
'npm ci --no-audit --no-fund',
|
||||||
|
'deps=$?',
|
||||||
|
'[ "$deps" -eq 0 ] || { echo "deploy: remote npm ci failed ($deps)"; exit "$deps"; }',
|
||||||
`${sudo}npm run build`,
|
`${sudo}npm run build`,
|
||||||
'build=$?',
|
'build=$?',
|
||||||
'[ "$build" -eq 0 ] || { echo "deploy: remote build failed ($build)"; exit "$build"; }',
|
'[ "$build" -eq 0 ] || { echo "deploy: remote build failed ($build)"; exit "$build"; }',
|
||||||
|
|||||||
@@ -379,6 +379,26 @@ try {
|
|||||||
const lensTintOn = pixelAt(0.625, 0.469);
|
const lensTintOn = pixelAt(0.625, 0.469);
|
||||||
const lensTintOff = pixelAt(0.7, 0.469);
|
const lensTintOff = pixelAt(0.7, 0.469);
|
||||||
|
|
||||||
|
// Before / after split: the edit is drawn full-frame, then the untouched
|
||||||
|
// source is painted over the left slice. Reading the same band either side of
|
||||||
|
// the line must give the moved slider on the right and the default on the
|
||||||
|
// left, which is what proves the scissor lands where the drag line sits.
|
||||||
|
const splitAfter = defaultEdits();
|
||||||
|
splitAfter.exposure = 2;
|
||||||
|
renderer.render(splitAfter, { width: w, height: h });
|
||||||
|
const splitAfterFull = pixelAt(0.75, 0.5);
|
||||||
|
renderer.render(defaultEdits(), { width: w, height: h });
|
||||||
|
const splitBeforeFull = pixelAt(0.75, 0.5);
|
||||||
|
renderer.render(splitAfter, { width: w, height: h });
|
||||||
|
renderer.render(defaultEdits(), {
|
||||||
|
width: w,
|
||||||
|
height: h,
|
||||||
|
scissor: { x: 0, w: Math.round(w / 2) },
|
||||||
|
});
|
||||||
|
const splitLeft = pixelAt(0.25, 0.5);
|
||||||
|
const splitRight = pixelAt(0.75, 0.5);
|
||||||
|
const sameRgb = (a, b) => a.every((v, i) => Math.abs(v - b[i]) <= 1);
|
||||||
|
|
||||||
pre.textContent = 'RESULT ' + JSON.stringify({
|
pre.textContent = 'RESULT ' + JSON.stringify({
|
||||||
clipPixels,
|
clipPixels,
|
||||||
clipRed: near(clipPixels[0], RED_MARK),
|
clipRed: near(clipPixels[0], RED_MARK),
|
||||||
@@ -437,6 +457,14 @@ try {
|
|||||||
cropDetailBounded: Math.abs(cropDetailOff[2] - cropRefOff[2]) <= 3,
|
cropDetailBounded: Math.abs(cropDetailOff[2] - cropRefOff[2]) <= 3,
|
||||||
lensTintAligned: lensTintOn[0] > lensRef[0] + 40,
|
lensTintAligned: lensTintOn[0] > lensRef[0] + 40,
|
||||||
lensTintBounded: Math.abs(lensTintOff[0] - lensRefOff[0]) <= 2,
|
lensTintBounded: Math.abs(lensTintOff[0] - lensRefOff[0]) <= 2,
|
||||||
|
splitLeft,
|
||||||
|
splitRight,
|
||||||
|
splitBeforeFull,
|
||||||
|
splitAfterFull,
|
||||||
|
splitShowsBoth:
|
||||||
|
sameRgb(splitLeft, splitBeforeFull) &&
|
||||||
|
sameRgb(splitRight, splitAfterFull) &&
|
||||||
|
!sameRgb(splitAfterFull, splitBeforeFull),
|
||||||
tintStrengthWorks: tintFull[2] > tintCore[2] + 8,
|
tintStrengthWorks: tintFull[2] > tintCore[2] + 8,
|
||||||
tintOffMatches: Math.abs(tintOffPixel[2] - dabSoft[2]) <= 1,
|
tintOffMatches: Math.abs(tintOffPixel[2] - dabSoft[2]) <= 1,
|
||||||
// A hard dab covers the core, and even an 80 % feather stops at the rim.
|
// A hard dab covers the core, and even an 80 % feather stops at the rim.
|
||||||
@@ -702,6 +730,14 @@ async function main() {
|
|||||||
);
|
);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (!result.splitShowsBoth) {
|
||||||
|
console.error(
|
||||||
|
'render check FAILED: the before / after split does not follow its drag line ' +
|
||||||
|
`(left=${JSON.stringify(result.splitLeft)} vs ${JSON.stringify(result.splitBeforeFull)}, ` +
|
||||||
|
`right=${JSON.stringify(result.splitRight)} vs ${JSON.stringify(result.splitAfterFull)}).`,
|
||||||
|
);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
!result.dabCoreDarkened ||
|
!result.dabCoreDarkened ||
|
||||||
!result.dabSoftCoreDarkened ||
|
!result.dabSoftCoreDarkened ||
|
||||||
@@ -722,7 +758,11 @@ async function main() {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
console.log(
|
console.log(
|
||||||
'render check PASSED: proxy and sidecar share a row order and the clipping overlay names the channels.',
|
`render check: before / after split left=${JSON.stringify(result.splitLeft)}` +
|
||||||
|
` right=${JSON.stringify(result.splitRight)}`,
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
'render check PASSED: proxy and sidecar share a row order, the clipping overlay names the channels, and the split keeps each side to its own edit.',
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2540,6 +2540,7 @@ export default function App() {
|
|||||||
initialFiles={pendingFiles}
|
initialFiles={pendingFiles}
|
||||||
existing={photos}
|
existing={photos}
|
||||||
cloud={cloudUser ? { uploadOriginal, push: pushPhoto } : null}
|
cloud={cloudUser ? { uploadOriginal, push: pushPhoto } : null}
|
||||||
|
local={localMode}
|
||||||
onNeedServer={() => {
|
onNeedServer={() => {
|
||||||
setImportOpen(false);
|
setImportOpen(false);
|
||||||
setCloudError(null);
|
setCloudError(null);
|
||||||
|
|||||||
+87
-11
@@ -276,6 +276,9 @@ export default function Develop({
|
|||||||
const [lensCorrection, setLensCorrection] = useState<LensCorrection | null>(null);
|
const [lensCorrection, setLensCorrection] = useState<LensCorrection | null>(null);
|
||||||
const [lensSplit, setLensSplit] = useState(false);
|
const [lensSplit, setLensSplit] = useState(false);
|
||||||
const [lensSplitAt, setLensSplitAt] = useState(0.5);
|
const [lensSplitAt, setLensSplitAt] = useState(0.5);
|
||||||
|
// The whole edit compared with the untouched source, split by a drag line.
|
||||||
|
const [splitView, setSplitView] = useState(false);
|
||||||
|
const [splitAt, setSplitAt] = useState(0.5);
|
||||||
const [lensState, setLensState] = useState<{ loading: boolean; error: string | null }>({
|
const [lensState, setLensState] = useState<{ loading: boolean; error: string | null }>({
|
||||||
loading: false,
|
loading: false,
|
||||||
error: null,
|
error: null,
|
||||||
@@ -373,11 +376,16 @@ export default function Develop({
|
|||||||
onSelect(p.id);
|
onSelect(p.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const moveLensSplit = (e: React.PointerEvent<HTMLButtonElement>) => {
|
// Both splits drag the same way: the handle sits on the line, and its
|
||||||
|
// percentage follows the pointer across the canvas.
|
||||||
|
const dragSplit =
|
||||||
|
(set: (at: number) => void) => (e: React.PointerEvent<HTMLButtonElement>) => {
|
||||||
const rect = e.currentTarget.parentElement?.getBoundingClientRect();
|
const rect = e.currentTarget.parentElement?.getBoundingClientRect();
|
||||||
if (!rect || rect.width <= 0) return;
|
if (!rect || rect.width <= 0) return;
|
||||||
setLensSplitAt(clampNum((e.clientX - rect.left) / rect.width, 0.02, 0.98));
|
set(clampNum((e.clientX - rect.left) / rect.width, 0.02, 0.98));
|
||||||
};
|
};
|
||||||
|
const moveLensSplit = dragSplit(setLensSplitAt);
|
||||||
|
const moveSplit = dragSplit(setSplitAt);
|
||||||
|
|
||||||
const setEdits = useCallback(
|
const setEdits = useCallback(
|
||||||
(patch: Partial<Edits>, label: string) => {
|
(patch: Partial<Edits>, label: string) => {
|
||||||
@@ -546,7 +554,11 @@ export default function Develop({
|
|||||||
if (!renderer || !canvas || !bitmap) return;
|
if (!renderer || !canvas || !bitmap) return;
|
||||||
if (stage.w < 40 || stage.h < 40) return;
|
if (stage.w < 40 || stage.h < 40) return;
|
||||||
|
|
||||||
const activeEdits = showOriginal ? { ...defaultEdits(), crop: edits.crop } : edits;
|
// Holding \ shows the untouched source full-frame; the split paints the same
|
||||||
|
// render over the left of its drag line, and steps aside while \ is held.
|
||||||
|
const beforeEdits = { ...defaultEdits(), crop: edits.crop };
|
||||||
|
const splitOn = splitView && !showOriginal;
|
||||||
|
const activeEdits = showOriginal ? beforeEdits : edits;
|
||||||
const frame = rotatedBounds(bitmap.width, bitmap.height, edits.crop.angle, edits.crop.quarter);
|
const frame = rotatedBounds(bitmap.width, bitmap.height, edits.crop.angle, edits.crop.quarter);
|
||||||
const content: Rect = cropMode
|
const content: Rect = cropMode
|
||||||
? { x: 0, y: 0, w: 1, h: 1 }
|
? { x: 0, y: 0, w: 1, h: 1 }
|
||||||
@@ -616,7 +628,7 @@ export default function Develop({
|
|||||||
renderer.setImage(bitmap, hdrSource);
|
renderer.setImage(bitmap, hdrSource);
|
||||||
// "Show original" must show the untouched source, not the cleaned proxy.
|
// "Show original" must show the untouched source, not the cleaned proxy.
|
||||||
renderer.setDenoised(showOriginal ? null : denoisedBitmap, activeEdits.aiDenoise.amount / 100);
|
renderer.setDenoised(showOriginal ? null : denoisedBitmap, activeEdits.aiDenoise.amount / 100);
|
||||||
renderer.render(activeEdits, {
|
const frameOpts = {
|
||||||
width: pxW,
|
width: pxW,
|
||||||
height: pxH,
|
height: pxH,
|
||||||
cropPreview: cropMode,
|
cropPreview: cropMode,
|
||||||
@@ -631,11 +643,30 @@ export default function Develop({
|
|||||||
upscale: dpr * cap * fitScale * zoomFactor > 1.1,
|
upscale: dpr * cap * fitScale * zoomFactor > 1.1,
|
||||||
clipPreview,
|
clipPreview,
|
||||||
clipping: clipping ?? undefined,
|
clipping: clipping ?? undefined,
|
||||||
|
};
|
||||||
|
renderer.render(activeEdits, {
|
||||||
|
...frameOpts,
|
||||||
lens: showOriginal ? null : lensCorrection,
|
lens: showOriginal ? null : lensCorrection,
|
||||||
lensSplit: lensSplit && !showOriginal ? lensSplitAt : undefined,
|
lensSplit: lensSplit && !splitOn ? lensSplitAt : undefined,
|
||||||
maskView,
|
maskView,
|
||||||
maskStrength: maskStrength / 100,
|
maskStrength: maskStrength / 100,
|
||||||
});
|
});
|
||||||
|
if (splitOn) {
|
||||||
|
// Paint the untouched source over the left half. The scissor is in
|
||||||
|
// device pixels and the same view is reused, so the halves line up.
|
||||||
|
renderer.setDenoised(null, 0);
|
||||||
|
renderer.render(beforeEdits, {
|
||||||
|
...frameOpts,
|
||||||
|
histogram: false,
|
||||||
|
lens: null,
|
||||||
|
maskView: -1,
|
||||||
|
clipPreview: false,
|
||||||
|
scissor: { x: 0, w: Math.round(pxW * splitAt) },
|
||||||
|
});
|
||||||
|
// Restore what the rest of the frame and the eyedropper read from.
|
||||||
|
renderer.setDenoised(denoisedBitmap, edits.aiDenoise.amount / 100);
|
||||||
|
renderer.setLensCorrection(lensCorrection);
|
||||||
|
}
|
||||||
histRef.current = renderer.histogram;
|
histRef.current = renderer.histogram;
|
||||||
setHistVersion((v) => v + 1);
|
setHistVersion((v) => v + 1);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -656,6 +687,8 @@ export default function Develop({
|
|||||||
lensCorrection,
|
lensCorrection,
|
||||||
lensSplit,
|
lensSplit,
|
||||||
lensSplitAt,
|
lensSplitAt,
|
||||||
|
splitView,
|
||||||
|
splitAt,
|
||||||
localMode,
|
localMode,
|
||||||
localSelected,
|
localSelected,
|
||||||
maskOverlay,
|
maskOverlay,
|
||||||
@@ -1801,6 +1834,7 @@ export default function Develop({
|
|||||||
'separator',
|
'separator',
|
||||||
{ label: 'Crop & Straighten', shortcut: 'C', onSelect: () => setCropMode((v) => !v) },
|
{ label: 'Crop & Straighten', shortcut: 'C', onSelect: () => setCropMode((v) => !v) },
|
||||||
{ label: 'Before / After', shortcut: '\\', onSelect: () => setShowOriginal((v) => !v) },
|
{ label: 'Before / After', shortcut: '\\', onSelect: () => setShowOriginal((v) => !v) },
|
||||||
|
{ label: 'Before / After split', onSelect: () => setSplitView((v) => !v) },
|
||||||
'separator',
|
'separator',
|
||||||
{ label: 'Copy settings', shortcut: '⌘C', onSelect: onCopy },
|
{ label: 'Copy settings', shortcut: '⌘C', onSelect: onCopy },
|
||||||
{ label: 'Paste settings', shortcut: '⌘V', onSelect: () => onPaste([photo.id]), disabled: !clipboard },
|
{ label: 'Paste settings', shortcut: '⌘V', onSelect: () => onPaste([photo.id]), disabled: !clipboard },
|
||||||
@@ -1884,6 +1918,14 @@ export default function Develop({
|
|||||||
>
|
>
|
||||||
Before / After
|
Before / After
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className={`btn ghost small ${splitView ? 'on' : ''}`}
|
||||||
|
onClick={() => setSplitView((v) => !v)}
|
||||||
|
aria-pressed={splitView}
|
||||||
|
title="Compare the edit with the original on either side of a draggable line"
|
||||||
|
>
|
||||||
|
Split
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`btn ghost small ${autoSync ? 'on' : ''}`}
|
className={`btn ghost small ${autoSync ? 'on' : ''}`}
|
||||||
onClick={() => setAutoSync((v) => !v)}
|
onClick={() => setAutoSync((v) => !v)}
|
||||||
@@ -2097,14 +2139,14 @@ export default function Develop({
|
|||||||
toggleZoom(e.clientX, e.clientY);
|
toggleZoom(e.clientX, e.clientY);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{lensSplit && lensCorrection && !showOriginal && (
|
{lensSplit && lensCorrection && !showOriginal && !splitView && (
|
||||||
<div className="lens-split">
|
<div className="compare-split">
|
||||||
<div className="lens-split-line" style={{ left: `${lensSplitAt * 100}%` }} />
|
<div className="compare-split-line" style={{ left: `${lensSplitAt * 100}%` }} />
|
||||||
<span className="lens-split-label before">Before</span>
|
<span className="compare-split-label before">Before</span>
|
||||||
<span className="lens-split-label after">After</span>
|
<span className="compare-split-label after">After</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="lens-split-handle"
|
className="compare-split-handle"
|
||||||
style={{ left: `${lensSplitAt * 100}%` }}
|
style={{ left: `${lensSplitAt * 100}%` }}
|
||||||
aria-label="Drag to move the lens correction split"
|
aria-label="Drag to move the lens correction split"
|
||||||
title="Drag to compare lens correction"
|
title="Drag to compare lens correction"
|
||||||
@@ -2131,6 +2173,40 @@ export default function Develop({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{splitView && !showOriginal && (
|
||||||
|
<div className="compare-split">
|
||||||
|
<div className="compare-split-line" style={{ left: `${splitAt * 100}%` }} />
|
||||||
|
<span className="compare-split-label before">Before</span>
|
||||||
|
<span className="compare-split-label after">After</span>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="compare-split-handle"
|
||||||
|
style={{ left: `${splitAt * 100}%` }}
|
||||||
|
aria-label="Drag to move the before / after split"
|
||||||
|
title="Drag to compare the edit with the original"
|
||||||
|
onPointerDown={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.currentTarget.setPointerCapture(e.pointerId);
|
||||||
|
moveSplit(e);
|
||||||
|
}}
|
||||||
|
onPointerMove={(e) => {
|
||||||
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) moveSplit(e);
|
||||||
|
}}
|
||||||
|
onPointerUp={(e) => {
|
||||||
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onPointerCancel={(e) => {
|
||||||
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
↔
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{healMode && bitmap && (() => {
|
{healMode && bitmap && (() => {
|
||||||
const geo = geoRef.current;
|
const geo = geoRef.current;
|
||||||
const view = geo.view;
|
const view = geo.view;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const FORMATS: { value: ExportFormat; label: string }[] = [
|
|||||||
{ value: 'png', label: 'PNG (8-bit)' },
|
{ value: 'png', label: 'PNG (8-bit)' },
|
||||||
{ value: 'webp', label: 'WebP' },
|
{ value: 'webp', label: 'WebP' },
|
||||||
{ value: 'tiff16', label: 'TIFF (16-bit)' },
|
{ value: 'tiff16', label: 'TIFF (16-bit)' },
|
||||||
|
{ value: 'jxl', label: 'JPEG XL' },
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -360,7 +361,7 @@ export default function ExportModal({ photos, initial, recipes, onSaveRecipe, on
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(opts.format === 'jpeg' || opts.format === 'webp') && (
|
{(opts.format === 'jpeg' || opts.format === 'webp' || opts.format === 'jxl') && (
|
||||||
<label className="field">
|
<label className="field">
|
||||||
<span>Quality · {opts.quality}</span>
|
<span>Quality · {opts.quality}</span>
|
||||||
<input
|
<input
|
||||||
@@ -369,11 +370,29 @@ export default function ExportModal({ photos, initial, recipes, onSaveRecipe, on
|
|||||||
max={100}
|
max={100}
|
||||||
value={opts.quality}
|
value={opts.quality}
|
||||||
onChange={(e) => patch({ quality: Number(e.target.value) })}
|
onChange={(e) => patch({ quality: Number(e.target.value) })}
|
||||||
disabled={busy}
|
disabled={busy || (opts.format === 'jxl' && opts.jxlLossless === true)}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{opts.format === 'jxl' && (
|
||||||
|
<>
|
||||||
|
<label className="check-row">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={opts.jxlLossless === true}
|
||||||
|
onChange={(e) => patch({ jxlLossless: e.target.checked })}
|
||||||
|
disabled={busy}
|
||||||
|
/>
|
||||||
|
Lossless — keeps every pixel and ignores the quality setting
|
||||||
|
</label>
|
||||||
|
<p className="muted small">
|
||||||
|
JPEG XL exports are 8-bit sRGB. Chrome, Firefox and Safari open them; Microsoft Edge
|
||||||
|
does not yet.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{sample && <ExportDetailStrip photo={sample} size={previewSize} />}
|
{sample && <ExportDetailStrip photo={sample} size={previewSize} />}
|
||||||
|
|
||||||
<label className="field">
|
<label className="field">
|
||||||
@@ -478,7 +497,7 @@ export default function ExportModal({ photos, initial, recipes, onSaveRecipe, on
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={opts.embedProfile}
|
checked={opts.embedProfile}
|
||||||
onChange={(e) => patch({ embedProfile: e.target.checked })}
|
onChange={(e) => patch({ embedProfile: e.target.checked })}
|
||||||
disabled={opts.format === 'webp' || opts.format === 'png'}
|
disabled={opts.format === 'webp' || opts.format === 'png' || opts.format === 'jxl'}
|
||||||
/>
|
/>
|
||||||
Embed {COLOR_SPACE_OPTIONS.find((option) => option.value === (opts.colorSpace ?? 'srgb'))?.label ?? 'sRGB'} profile (JPEG/TIFF)
|
Embed {COLOR_SPACE_OPTIONS.find((option) => option.value === (opts.colorSpace ?? 'srgb'))?.label ?? 'sRGB'} profile (JPEG/TIFF)
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ interface Props {
|
|||||||
immichEnabled?: boolean;
|
immichEnabled?: boolean;
|
||||||
onCreateImmichGallery?: (eventId: string) => Promise<EventRecord>;
|
onCreateImmichGallery?: (eventId: string) => Promise<EventRecord>;
|
||||||
cloud?: CloudImport | null;
|
cloud?: CloudImport | null;
|
||||||
|
/** Desktop bundle: the decoder runs on this PC rather than a team server. */
|
||||||
|
local?: boolean;
|
||||||
onNeedServer: () => void;
|
onNeedServer: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +34,7 @@ export default function ImportModal({
|
|||||||
immichEnabled = false,
|
immichEnabled = false,
|
||||||
onCreateImmichGallery,
|
onCreateImmichGallery,
|
||||||
cloud,
|
cloud,
|
||||||
|
local = false,
|
||||||
onNeedServer,
|
onNeedServer,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const startId = initialEventId !== 'all' && initialEventId !== 'unsorted' ? initialEventId : events[0]?.id ?? '__new';
|
const startId = initialEventId !== 'all' && initialEventId !== 'unsorted' ? initialEventId : events[0]?.id ?? '__new';
|
||||||
@@ -278,7 +281,8 @@ export default function ImportModal({
|
|||||||
<strong>Drop photos here</strong>
|
<strong>Drop photos here</strong>
|
||||||
<p className="muted">
|
<p className="muted">
|
||||||
or click to choose files. JPEG, PNG, WebP, AVIF, TIFF and camera raw (CR2, CR3, NEF,
|
or click to choose files. JPEG, PNG, WebP, AVIF, TIFF and camera raw (CR2, CR3, NEF,
|
||||||
ARW, ORF, RW2, RAF, DNG, PEF…) — raw needs the team server.
|
ARW, ORF, RW2, RAF, DNG, PEF…) — raw needs{' '}
|
||||||
|
{local ? 'the local engine' : 'the team server'}.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
@@ -329,18 +333,24 @@ export default function ImportModal({
|
|||||||
<strong>
|
<strong>
|
||||||
{rawCount} raw file{rawCount === 1 ? '' : 's'} cannot be read by the browser.
|
{rawCount} raw file{rawCount === 1 ? '' : 's'} cannot be read by the browser.
|
||||||
</strong>{' '}
|
</strong>{' '}
|
||||||
They are decoded by the team server, so sign in before importing — or import them later
|
{local
|
||||||
from the library.
|
? 'They are decoded by the local engine on this PC. Check that Luminary is running, then import again.'
|
||||||
|
: 'They are decoded by the team server, so sign in before importing — or import them later from the library.'}
|
||||||
|
{!local && (
|
||||||
<button className="btn primary small banner-action" onClick={onNeedServer} disabled={busy}>
|
<button className="btn primary small banner-action" onClick={onNeedServer} disabled={busy}>
|
||||||
Sign in to the server
|
Sign in to the server
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{rawCount > 0 && cloud && (
|
{rawCount > 0 && cloud && (
|
||||||
<div className="banner info">
|
<div className="banner info">
|
||||||
Raw files are demosaiced by the server (LibRaw), a few at a time in parallel. Each file
|
{local
|
||||||
usually takes 2–4 seconds.
|
? 'Raw files are demosaiced by the Luminary local engine (LibRaw) on this PC, a few ' +
|
||||||
|
'at a time in parallel. Each file usually takes 2–4 seconds, and nothing leaves your computer.'
|
||||||
|
: 'Raw files are demosaiced by the server (LibRaw), a few at a time in parallel. Each ' +
|
||||||
|
'file usually takes 2–4 seconds.'}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ LUMINARY
|
|||||||
{loadError && (
|
{loadError && (
|
||||||
<>
|
<>
|
||||||
<span className="join-eyebrow">Invite</span>
|
<span className="join-eyebrow">Invite</span>
|
||||||
<h1>Can’t reach the server</h1>
|
<h1>Can’t reach Luminary</h1>
|
||||||
<p className="muted">{loadError}</p>
|
<p className="muted">{loadError}</p>
|
||||||
<a className="btn ghost wide" href="/">
|
<a className="btn ghost wide" href="/">
|
||||||
Go to Luminary
|
Go to Luminary
|
||||||
|
|||||||
@@ -2011,6 +2011,12 @@ export class Renderer {
|
|||||||
lens?: LensCorrection | null;
|
lens?: LensCorrection | null;
|
||||||
/** 0–1 screen split: left is uncorrected, right is corrected. */
|
/** 0–1 screen split: left is uncorrected, right is corrected. */
|
||||||
lensSplit?: number;
|
lensSplit?: number;
|
||||||
|
/**
|
||||||
|
* Draw only this horizontal slice of the canvas, in device pixels. The
|
||||||
|
* before/after split renders the edit full-frame, then the untouched
|
||||||
|
* source over the left side, so both halves share one view and line up.
|
||||||
|
*/
|
||||||
|
scissor?: { x: number; w: number };
|
||||||
/** hold the grain pattern still, e.g. while a crop handle is being dragged */
|
/** hold the grain pattern still, e.g. while a crop handle is being dragged */
|
||||||
freezeGrain?: boolean;
|
freezeGrain?: boolean;
|
||||||
/** paint clipped channels while the exposure control is being dragged */
|
/** paint clipped channels while the exposure control is being dragged */
|
||||||
@@ -2137,6 +2143,12 @@ export class Renderer {
|
|||||||
// Pass 4: detail, effects, grain -> canvas
|
// Pass 4: detail, effects, grain -> canvas
|
||||||
const finishDraw = (target: Target | null, clip = 0) => {
|
const finishDraw = (target: Target | null, clip = 0) => {
|
||||||
const gl2 = this.gl;
|
const gl2 = this.gl;
|
||||||
|
// Render targets are always complete frames; only the canvas is ever cut.
|
||||||
|
const scissor = target ? undefined : opts.scissor;
|
||||||
|
if (scissor) {
|
||||||
|
gl2.enable(gl2.SCISSOR_TEST);
|
||||||
|
gl2.scissor(scissor.x, 0, Math.max(1, scissor.w), h);
|
||||||
|
}
|
||||||
if (target) {
|
if (target) {
|
||||||
gl2.bindFramebuffer(gl2.FRAMEBUFFER, target.fbo);
|
gl2.bindFramebuffer(gl2.FRAMEBUFFER, target.fbo);
|
||||||
gl2.viewport(0, 0, target.w, target.h);
|
gl2.viewport(0, 0, target.w, target.h);
|
||||||
@@ -2213,6 +2225,7 @@ export class Renderer {
|
|||||||
this.finish.v2('u_outSize', target ? target.w : w, target ? target.h : h);
|
this.finish.v2('u_outSize', target ? target.w : w, target ? target.h : h);
|
||||||
this.finish.f('u_aspect', w / h);
|
this.finish.f('u_aspect', w / h);
|
||||||
this.drawQuad();
|
this.drawQuad();
|
||||||
|
if (scissor) gl2.disable(gl2.SCISSOR_TEST);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clipMode = opts.clipPreview
|
const clipMode = opts.clipPreview
|
||||||
|
|||||||
+16
-1
@@ -35,6 +35,17 @@ export interface UploadResult {
|
|||||||
note?: string | null;
|
note?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True once /api/health reports LUMINARY_LOCAL=1: the engine runs inside this
|
||||||
|
* app's own folder, so copy must not send users looking for a remote server.
|
||||||
|
*/
|
||||||
|
let localEngine = false;
|
||||||
|
|
||||||
|
/** Whether this app talks to the engine in its own bundle (desktop mode). */
|
||||||
|
export function isLocalEngine(): boolean {
|
||||||
|
return localEngine;
|
||||||
|
}
|
||||||
|
|
||||||
export class ApiError extends Error {
|
export class ApiError extends Error {
|
||||||
status: number;
|
status: number;
|
||||||
constructor(message: string, status: number) {
|
constructor(message: string, status: number) {
|
||||||
@@ -48,7 +59,10 @@ export async function request<T>(path: string, init?: RequestInit): Promise<T> {
|
|||||||
try {
|
try {
|
||||||
res = await fetch(path, { credentials: 'same-origin', ...init });
|
res = await fetch(path, { credentials: 'same-origin', ...init });
|
||||||
} catch {
|
} catch {
|
||||||
throw new ApiError('Cannot reach the Luminary server', 0);
|
throw new ApiError(
|
||||||
|
localEngine ? 'Cannot reach the Luminary local engine' : 'Cannot reach the Luminary server',
|
||||||
|
0,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
let message = `Request failed (${res.status})`;
|
let message = `Request failed (${res.status})`;
|
||||||
@@ -78,6 +92,7 @@ export async function getHealth(): Promise<Health | null> {
|
|||||||
const res = await fetch('/api/health', { credentials: 'same-origin' });
|
const res = await fetch('/api/health', { credentials: 'same-origin' });
|
||||||
if (!res.ok) return null;
|
if (!res.ok) return null;
|
||||||
const body = (await res.json()) as Health;
|
const body = (await res.json()) as Health;
|
||||||
|
localEngine = body?.local === true;
|
||||||
return body?.ok ? body : null;
|
return body?.ok ? body : null;
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { outputSize } from '../gl/renderer';
|
import { outputSize } from '../gl/renderer';
|
||||||
import { defaultEdits } from './edits';
|
import { defaultEdits } from './edits';
|
||||||
|
import { buildFileName, DEFAULT_EXPORT } from './export';
|
||||||
|
import type { PhotoRecord } from '../types';
|
||||||
|
|
||||||
describe('export output dimensions', () => {
|
describe('export output dimensions', () => {
|
||||||
it('matches the source for an uncropped image', () => {
|
it('matches the source for an uncropped image', () => {
|
||||||
@@ -19,6 +21,12 @@ describe('export output dimensions', () => {
|
|||||||
expect(outputSize(edits, 4000, 3000)).toEqual({ w: 4950, h: 4950 });
|
expect(outputSize(edits, 4000, 3000)).toEqual({ w: 4950, h: 4950 });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('writes the JPEG XL extension for a JXL export', () => {
|
||||||
|
const photo = { name: 'DSCF1234.RAF', addedAt: Date.now() } as PhotoRecord;
|
||||||
|
const name = buildFileName('{name}', photo, 0, { ...DEFAULT_EXPORT, format: 'jxl' });
|
||||||
|
expect(name).toBe('DSCF1234.jxl');
|
||||||
|
});
|
||||||
|
|
||||||
it('applies the crop after the rotated frame is calculated', () => {
|
it('applies the crop after the rotated frame is calculated', () => {
|
||||||
const edits = defaultEdits();
|
const edits = defaultEdits();
|
||||||
edits.crop.angle = 45;
|
edits.crop.angle = 45;
|
||||||
|
|||||||
+27
-1
@@ -8,8 +8,9 @@ import { createZipBlob, zipFileName } from './zip';
|
|||||||
import { profileFor, type OutputColorSpace } from './icc';
|
import { profileFor, type OutputColorSpace } from './icc';
|
||||||
import { convertFloatPixels, convertImageData } from './colorSpace';
|
import { convertFloatPixels, convertImageData } from './colorSpace';
|
||||||
import { encodeTiff16 } from './tiff';
|
import { encodeTiff16 } from './tiff';
|
||||||
|
import { encodeJxl } from './jxl';
|
||||||
|
|
||||||
export type ExportFormat = 'jpeg' | 'png' | 'webp' | 'tiff16';
|
export type ExportFormat = 'jpeg' | 'png' | 'webp' | 'tiff16' | 'jxl';
|
||||||
export type ResizeMode = 'none' | 'longEdge' | 'percent';
|
export type ResizeMode = 'none' | 'longEdge' | 'percent';
|
||||||
|
|
||||||
export type WatermarkPosition = 'br' | 'bl' | 'tr' | 'tl' | 'center';
|
export type WatermarkPosition = 'br' | 'bl' | 'tr' | 'tl' | 'center';
|
||||||
@@ -27,6 +28,8 @@ export interface ExportOptions {
|
|||||||
zip: boolean;
|
zip: boolean;
|
||||||
/** Extra capture sharpening applied only to the exported pixels. */
|
/** Extra capture sharpening applied only to the exported pixels. */
|
||||||
outputSharpen: number;
|
outputSharpen: number;
|
||||||
|
/** JPEG XL only: keep every pixel instead of using the quality slider. */
|
||||||
|
jxlLossless?: boolean;
|
||||||
/** Write title/caption/creator/copyright/keywords into the file. */
|
/** Write title/caption/creator/copyright/keywords into the file. */
|
||||||
metadata: boolean;
|
metadata: boolean;
|
||||||
/** Embed the generated sRGB ICC profile in JPEG/TIFF files. */
|
/** Embed the generated sRGB ICC profile in JPEG/TIFF files. */
|
||||||
@@ -56,6 +59,7 @@ export const DEFAULT_EXPORT: ExportOptions = {
|
|||||||
nameTemplate: '{name}',
|
nameTemplate: '{name}',
|
||||||
zip: true,
|
zip: true,
|
||||||
outputSharpen: 0,
|
outputSharpen: 0,
|
||||||
|
jxlLossless: false,
|
||||||
metadata: true,
|
metadata: true,
|
||||||
embedProfile: true,
|
embedProfile: true,
|
||||||
watermark: { enabled: false, text: '', position: 'br', opacity: 55, size: 4 },
|
watermark: { enabled: false, text: '', position: 'br', opacity: 55, size: 4 },
|
||||||
@@ -66,6 +70,7 @@ const MIME: Record<ExportFormat, string> = {
|
|||||||
png: 'image/png',
|
png: 'image/png',
|
||||||
webp: 'image/webp',
|
webp: 'image/webp',
|
||||||
tiff16: 'image/tiff',
|
tiff16: 'image/tiff',
|
||||||
|
jxl: 'image/jxl',
|
||||||
};
|
};
|
||||||
|
|
||||||
const EXT: Record<ExportFormat, string> = {
|
const EXT: Record<ExportFormat, string> = {
|
||||||
@@ -73,6 +78,7 @@ const EXT: Record<ExportFormat, string> = {
|
|||||||
png: 'png',
|
png: 'png',
|
||||||
webp: 'webp',
|
webp: 'webp',
|
||||||
tiff16: 'tif',
|
tiff16: 'tif',
|
||||||
|
jxl: 'jxl',
|
||||||
};
|
};
|
||||||
|
|
||||||
function download(blob: Blob, filename: string) {
|
function download(blob: Blob, filename: string) {
|
||||||
@@ -178,6 +184,12 @@ export async function renderPhotoBlob(
|
|||||||
if (opts.watermark.enabled && opts.watermark.text.trim()) {
|
if (opts.watermark.enabled && opts.watermark.text.trim()) {
|
||||||
output = paintWatermark(output, photo, opts);
|
output = paintWatermark(output, photo, opts);
|
||||||
}
|
}
|
||||||
|
if (opts.format === 'jxl') {
|
||||||
|
return encodeJxl(readPixels(output), {
|
||||||
|
quality: opts.quality,
|
||||||
|
lossless: opts.jxlLossless === true,
|
||||||
|
});
|
||||||
|
}
|
||||||
const mime = MIME[opts.format];
|
const mime = MIME[opts.format];
|
||||||
let blob = await new Promise<Blob | null>((resolve) =>
|
let blob = await new Promise<Blob | null>((resolve) =>
|
||||||
output.toBlob(resolve, mime, Math.min(1, Math.max(0.1, opts.quality / 100))),
|
output.toBlob(resolve, mime, Math.min(1, Math.max(0.1, opts.quality / 100))),
|
||||||
@@ -197,6 +209,20 @@ export async function renderPhotoBlob(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The render canvas holds a WebGL context, so its pixels have to be drawn into
|
||||||
|
* a 2D canvas before an encoder can read them.
|
||||||
|
*/
|
||||||
|
function readPixels(source: HTMLCanvasElement): ImageData {
|
||||||
|
const canvas = document.createElement('canvas');
|
||||||
|
canvas.width = source.width;
|
||||||
|
canvas.height = source.height;
|
||||||
|
const ctx = canvas.getContext('2d', { willReadFrequently: true });
|
||||||
|
if (!ctx) throw new Error('Could not read the export pixels');
|
||||||
|
ctx.drawImage(source, 0, 0);
|
||||||
|
return ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||||
|
}
|
||||||
|
|
||||||
function convertCanvas(source: HTMLCanvasElement, space: OutputColorSpace) {
|
function convertCanvas(source: HTMLCanvasElement, space: OutputColorSpace) {
|
||||||
const canvas = document.createElement('canvas');
|
const canvas = document.createElement('canvas');
|
||||||
canvas.width = source.width;
|
canvas.width = source.width;
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/**
|
||||||
|
* JPEG XL export (8-bit sRGB), encoded by libjxl compiled to WebAssembly.
|
||||||
|
*
|
||||||
|
* The codec is imported on demand: it is roughly 1.4 MB of wasm plus glue, and
|
||||||
|
* most sessions never export a JXL. Only the single-threaded build is used —
|
||||||
|
* the app is not cross-origin isolated, so the multithreaded glue would fall
|
||||||
|
* back anyway, and its worker entry points cannot be bundled.
|
||||||
|
*
|
||||||
|
* The glue resolves its wasm relative to its own module URL, which a bundler
|
||||||
|
* rewrites; `locateFile` points it at the URL Vite actually emitted.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import jxlWasm from '@jsquash/jxl/codec/enc/jxl_enc.wasm?url';
|
||||||
|
|
||||||
|
export interface JxlOptions {
|
||||||
|
/** 1–100, the same number the modal's quality slider shows. */
|
||||||
|
quality: number;
|
||||||
|
lossless: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface JxlEncodeOptions {
|
||||||
|
effort: number;
|
||||||
|
quality: number;
|
||||||
|
lossless: boolean;
|
||||||
|
progressive: boolean;
|
||||||
|
epf: number;
|
||||||
|
lossyPalette: boolean;
|
||||||
|
decodingSpeedTier: number;
|
||||||
|
photonNoiseIso: number;
|
||||||
|
lossyModular: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface JxlModule {
|
||||||
|
encode(data: BufferSource, width: number, height: number, options: JxlEncodeOptions): Uint8Array | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
let encoder: Promise<JxlModule> | null = null;
|
||||||
|
|
||||||
|
function loadEncoder(): Promise<JxlModule> {
|
||||||
|
if (!encoder) {
|
||||||
|
encoder = (async () => {
|
||||||
|
const [{ default: factory }, { initEmscriptenModule }] = await Promise.all([
|
||||||
|
import('@jsquash/jxl/codec/enc/jxl_enc.js'),
|
||||||
|
import('@jsquash/jxl/utils.js'),
|
||||||
|
]);
|
||||||
|
const module = await initEmscriptenModule(factory as never, undefined, {
|
||||||
|
locateFile: (path: string) => (path.endsWith('jxl_enc.wasm') ? jxlWasm : path),
|
||||||
|
});
|
||||||
|
return module as unknown as JxlModule;
|
||||||
|
})().catch((error) => {
|
||||||
|
// A failed load must not poison every later export.
|
||||||
|
encoder = null;
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return encoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function encodeJxl(image: ImageData, options: JxlOptions): Promise<Blob> {
|
||||||
|
const module = await loadEncoder();
|
||||||
|
const lossless = options.lossless === true;
|
||||||
|
const quality = Math.min(100, Math.max(1, Math.round(options.quality || 90)));
|
||||||
|
const result = module.encode(image.data, image.width, image.height, {
|
||||||
|
quality: lossless ? 100 : quality,
|
||||||
|
lossless,
|
||||||
|
// libjxl defaults to effort 7, which is a long wait single-threaded on a
|
||||||
|
// 45 MP frame. 5 keeps a batch moving and costs little for photographs.
|
||||||
|
effort: 5,
|
||||||
|
progressive: false,
|
||||||
|
epf: -1,
|
||||||
|
lossyPalette: false,
|
||||||
|
decodingSpeedTier: 0,
|
||||||
|
photonNoiseIso: 0,
|
||||||
|
lossyModular: false,
|
||||||
|
});
|
||||||
|
if (!result || !result.byteLength) throw new Error('JPEG XL encoding failed');
|
||||||
|
// A fresh buffer: the encoder returns a view that may over-allocate, and a
|
||||||
|
// Blob must not keep the wasm heap alive.
|
||||||
|
const bytes = new Uint8Array(result.byteLength);
|
||||||
|
bytes.set(result);
|
||||||
|
return new Blob([bytes], { type: 'image/jxl' });
|
||||||
|
}
|
||||||
+8
-8
@@ -5073,14 +5073,14 @@ figcaption {
|
|||||||
border-top: 1px solid var(--line);
|
border-top: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split {
|
.compare-split {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-line {
|
.compare-split-line {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@@ -5089,7 +5089,7 @@ figcaption {
|
|||||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 0, 0, 0.45);
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 0, 0, 0.45);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-handle {
|
.compare-split-handle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -5111,14 +5111,14 @@ figcaption {
|
|||||||
touch-action: none;
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-handle:hover,
|
.compare-split-handle:hover,
|
||||||
.lens-split-handle:focus-visible {
|
.compare-split-handle:focus-visible {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
border-color: #fff;
|
border-color: #fff;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-label {
|
.compare-split-label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
@@ -5130,11 +5130,11 @@ figcaption {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-label.before {
|
.compare-split-label.before {
|
||||||
left: 10px;
|
left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lens-split-label.after {
|
.compare-split-label.after {
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
+22
-13
@@ -37,8 +37,10 @@ not assumed:
|
|||||||
| `node.exe` (v24.22.2) | only Windows system DLLs (`KERNEL32`, `ADVAPI32`, `WS2_32`, `CRYPT32`, `USER32`, …) — statically linked C runtime, so **no Visual C++ Redistributable** |
|
| `node.exe` (v24.22.2) | only Windows system DLLs (`KERNEL32`, `ADVAPI32`, `WS2_32`, `CRYPT32`, `USER32`, …) — statically linked C runtime, so **no Visual C++ Redistributable** |
|
||||||
| `libvips-42.dll` + `sharp` | the Universal C Runtime (`api-ms-win-crt-*`), included in Windows 10/11; older Windows needs KB2999226 |
|
| `libvips-42.dll` + `sharp` | the Universal C Runtime (`api-ms-win-crt-*`), included in Windows 10/11; older Windows needs KB2999226 |
|
||||||
| `libraw.wasm` | a browser with WebAssembly |
|
| `libraw.wasm` | a browser with WebAssembly |
|
||||||
| launcher (`.cmd`/`.vbs`) | Windows PowerShell 5.1, included in Windows 10/11 |
|
| `Luminary.exe` launcher | only Windows system DLLs; no PowerShell, no Windows Script Host |
|
||||||
| Develop module | a current browser with WebGL2 (Edge, Chrome, Firefox) |
|
| launcher (`.cmd`/`.vbs` fallback) | Windows PowerShell 5.1, included in Windows 10/11 |
|
||||||
|
| `LuminaryWindow.exe` | the Microsoft Edge WebView2 runtime that ships with Windows 10/11 (window engine only; no browser UI, profile or account) |
|
||||||
|
| Develop module | WebGL2, provided by WebView2 (or by the fallback browser) |
|
||||||
|
|
||||||
So: a clean Windows 10/11 x64 machine, a browser, and ~250 MB where the data
|
So: a clean Windows 10/11 x64 machine, a browser, and ~250 MB where the data
|
||||||
folder lives. No VC++ redist, no .NET, no admin prompt. The setup exe installs
|
folder lives. No VC++ redist, no .NET, no admin prompt. The setup exe installs
|
||||||
@@ -88,8 +90,8 @@ Output:
|
|||||||
|
|
||||||
```
|
```
|
||||||
<out>/
|
<out>/
|
||||||
Luminary-0.5.2-win-x64.zip the portable deliverable
|
Luminary-0.5.4-win-x64.zip the portable deliverable
|
||||||
installer/Luminary-0.5.2-win-x64-setup.exe the per-user installer
|
installer/Luminary-0.5.4-win-x64-setup.exe the per-user installer
|
||||||
stage/Luminary/ the unpacked bundle (kept for inspection)
|
stage/Luminary/ the unpacked bundle (kept for inspection)
|
||||||
cache/node-v24.22.2-win-x64.exe pinned runtime, reused next time
|
cache/node-v24.22.2-win-x64.exe pinned runtime, reused next time
|
||||||
cache/SHASUMS256-v24.22.2.txt
|
cache/SHASUMS256-v24.22.2.txt
|
||||||
@@ -143,7 +145,7 @@ runs them from there, so no root install is needed. Install it yourself with
|
|||||||
<https://nsis.sourceforge.io>. Compile by hand with:
|
<https://nsis.sourceforge.io>. Compile by hand with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
makensis -DAPP_VERSION=0.5.2 -DAPP_VERSION4=0.5.2.0 \
|
makensis -DAPP_VERSION=0.5.4 -DAPP_VERSION4=0.5.4.0 \
|
||||||
-DSOURCE_DIR="$PWD/stage/Luminary" windows/installer.nsi
|
-DSOURCE_DIR="$PWD/stage/Luminary" windows/installer.nsi
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -158,7 +160,7 @@ running copy works without killing every `node.exe` on the machine.
|
|||||||
Silent install and uninstall, for a script or a school lab image:
|
Silent install and uninstall, for a script or a school lab image:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
Luminary-0.5.2-win-x64-setup.exe /S
|
Luminary-0.5.4-win-x64-setup.exe /S
|
||||||
"%LOCALAPPDATA%\Programs\Luminary\Uninstall.exe" /S
|
"%LOCALAPPDATA%\Programs\Luminary\Uninstall.exe" /S
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -283,9 +285,9 @@ Full behaviour, edge cases and the test checklist: [launcher/DESIGN.md](launcher
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd <out>
|
cd <out>
|
||||||
sha256sum Luminary-0.5.2-win-x64.zip
|
sha256sum Luminary-0.5.4-win-x64.zip
|
||||||
unzip -t Luminary-0.5.2-win-x64.zip | tail -1
|
unzip -t Luminary-0.5.4-win-x64.zip | tail -1
|
||||||
unzip -l Luminary-0.5.2-win-x64.zip | grep -E 'node.exe|Luminary\.(exe|cmd|vbs)|app/server/index.mjs'
|
unzip -l Luminary-0.5.4-win-x64.zip | grep -E 'node.exe|Luminary\.(exe|cmd|vbs)|app/server/index.mjs'
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, the real test is the checklist in `launcher/DESIGN.md` §15,
|
On Windows, the real test is the checklist in `launcher/DESIGN.md` §15,
|
||||||
@@ -342,8 +344,15 @@ then replaces `node.exe`. It refuses while Luminary is running. Set
|
|||||||
fall back to a system Node 24+ in the meantime.
|
fall back to a system Node 24+ in the meantime.
|
||||||
- No tray icon and no auto-update in this version (both are launcher features,
|
- No tray icon and no auto-update in this version (both are launcher features,
|
||||||
not app changes).
|
not app changes).
|
||||||
- Loopback only by default; set `HOST=0.0.0.0` for LAN proofing galleries.
|
- Loopback only by default: the local engine is a background service on this
|
||||||
- The PowerShell launcher cannot clean up after a server crash; a stale
|
PC that listens on `127.0.0.1`. Set `HOST=0.0.0.0` only for LAN proofing
|
||||||
|
galleries.
|
||||||
|
- Fully offline: the app, the catalog and the start-up wait are local. The
|
||||||
|
launcher probes `127.0.0.1` over plain TCP, which never consults the system
|
||||||
|
proxy or DNS, so a disconnected network, VPN or proxy setting cannot stop it
|
||||||
|
from starting. Only `-Repair` (downloading `node.exe`) and the optional Immich
|
||||||
|
sync use the network.
|
||||||
|
- The PowerShell launcher cannot clean up after the local engine crashes; a stale
|
||||||
`runtime.json` is simply ignored on the next start.
|
`runtime.json` is simply ignored on the next start.
|
||||||
- The setup exe cannot be executed on the Linux build host. It is verified by
|
- The setup exe cannot be executed on the Linux build host. It is verified by
|
||||||
unpacking it and comparing the SHA-256 of every payload file with the staged
|
unpacking it and comparing the SHA-256 of every payload file with the staged
|
||||||
@@ -360,11 +369,11 @@ then replaces `node.exe`. It refuses while Luminary is running. Set
|
|||||||
| "Luminary needs Windows 10 or 11" (exit 4) | the launcher read `CurrentBuild` below 10240. The app targets Windows 10/11; there is no Windows 7/8 build |
|
| "Luminary needs Windows 10 or 11" (exit 4) | the launcher read `CurrentBuild` below 10240. The app targets Windows 10/11; there is no Windows 7/8 build |
|
||||||
| "The Universal C Runtime is missing" | Windows 8.1 without KB2999226 — install <https://support.microsoft.com/help/2999226> or use Windows 10/11 |
|
| "The Universal C Runtime is missing" | Windows 8.1 without KB2999226 — install <https://support.microsoft.com/help/2999226> or use Windows 10/11 |
|
||||||
| "The data drive has only … GB free" | free space before starting; catalogs and previews grow in `%LOCALAPPDATA%` |
|
| "The data drive has only … GB free" | free space before starting; catalogs and previews grow in `%LOCALAPPDATA%` |
|
||||||
| "did not answer on /api/health" | `logs\server.err.log`; run `node app\server\index.mjs` from `app\` to see the failure |
|
| "did not answer on /api/health" | `logs\server.err.log`; run `node app\server\index.mjs` from `app\` to see the failure. This is not a network error: start-up only talks to `127.0.0.1`, so a disconnected machine starts the same way |
|
||||||
| Browser opens an error page | the port was taken between the check and the spawn; start again |
|
| Browser opens an error page | the port was taken between the check and the spawn; start again |
|
||||||
| RAW import fails | `app\node_modules\@img\sharp-win32-x64` must contain a `.node` binary; RAW decode itself is wasm |
|
| RAW import fails | `app\node_modules\@img\sharp-win32-x64` must contain a `.node` binary; RAW decode itself is wasm |
|
||||||
| `node.exe failed its SHA-256 check` | delete `<out>/cache` and rebuild (the download was truncated) |
|
| `node.exe failed its SHA-256 check` | delete `<out>/cache` and rebuild (the download was truncated) |
|
||||||
| A sign-in screen appears | the server was started without `LUMINARY_LOCAL=1`, or it is the normal server, not the bundle |
|
| A sign-in screen appears | the local engine was started without `LUMINARY_LOCAL=1`, or this is the full multi-user edition, not the desktop bundle |
|
||||||
| Opens as a normal tab | Edge/Chrome not found, or `-Browser` / `LUMINARY_WINDOW=browser` was used |
|
| Opens as a normal tab | Edge/Chrome not found, or `-Browser` / `LUMINARY_WINDOW=browser` was used |
|
||||||
| Build refuses `--out` | the path is inside the repo; choose one outside |
|
| Build refuses `--out` | the path is inside the repo; choose one outside |
|
||||||
| SmartScreen on first run | unsigned build: "More info" → "Run anyway" (same for the setup exe) |
|
| SmartScreen on first run | unsigned build: "More info" → "Run anyway" (same for the setup exe) |
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ second implementation to drift.
|
|||||||
|
|
||||||
```
|
```
|
||||||
repo=https://git.maple-street.net/bhursey/luminary.git
|
repo=https://git.maple-street.net/bhursey/luminary.git
|
||||||
tag=v0.5.2
|
tag=v0.5.4
|
||||||
commit=fb43ca8f1c2d… # full sha
|
commit=fb43ca8f1c2d… # full sha
|
||||||
version=0.5.2 # package.json version, checked after fetch
|
version=0.5.4 # package.json version, checked after fetch
|
||||||
node=v24.22.2
|
node=v24.22.2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -144,6 +144,70 @@ try {
|
|||||||
Check '/api/sync answers' $false $_.Exception.Message
|
Check '/api/sync answers' $false $_.Exception.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Say ''
|
||||||
|
Say 'Offline import (proxy unreachable)'
|
||||||
|
# The failure this guards against: with the network down, anything that asks
|
||||||
|
# Windows for its proxy/PAC cannot reach 127.0.0.1, so the launcher gave up on
|
||||||
|
# a healthy engine and the app window reported that it could not reach it.
|
||||||
|
$launcherText = Get-Content -LiteralPath $launcher -Raw
|
||||||
|
Check 'health probe uses a direct socket' ($launcherText -match 'TcpClient')
|
||||||
|
Check 'health probe avoids the proxy stack' ($launcherText -notmatch 'Invoke-WebRequest')
|
||||||
|
Check 'app window bypasses proxies' ($launcherText -match '--no-proxy-server')
|
||||||
|
|
||||||
|
# The import the page performs, run with every proxy variable pointing at a
|
||||||
|
# black hole: upload, decode in the bundle, read the preview back.
|
||||||
|
$probe = Join-Path $dataDir 'offline-import.cjs'
|
||||||
|
Set-Content -LiteralPath $probe -Encoding ASCII -Value @'
|
||||||
|
const fs = require('node:fs');
|
||||||
|
const path = require('node:path');
|
||||||
|
const [bundle, base, dir] = process.argv.slice(2);
|
||||||
|
const sharp = require(path.join(bundle, 'app', 'node_modules', 'sharp'));
|
||||||
|
(async () => {
|
||||||
|
const file = path.join(dir, 'offline-smoke.tiff');
|
||||||
|
await sharp({ create: { width: 8, height: 8, channels: 3, background: { r: 200, g: 100, b: 50 } } })
|
||||||
|
.tiff()
|
||||||
|
.toFile(file);
|
||||||
|
const health = await fetch(base + '/api/health');
|
||||||
|
const upload = await fetch(
|
||||||
|
base + '/api/photos/smoke-offline/original?name=offline-smoke.tiff&mime=image%2Ftiff',
|
||||||
|
{ method: 'POST', headers: { 'Content-Type': 'image/tiff' }, body: fs.readFileSync(file) },
|
||||||
|
);
|
||||||
|
const body = await upload.json().catch(() => ({}));
|
||||||
|
let preview = 0;
|
||||||
|
if (body.previewUrl) {
|
||||||
|
const target = String(body.previewUrl).startsWith('http') ? body.previewUrl : base + body.previewUrl;
|
||||||
|
preview = (await fetch(target)).status;
|
||||||
|
}
|
||||||
|
process.stdout.write(JSON.stringify({ health: health.status, upload: upload.status, preview }));
|
||||||
|
})().catch((error) => {
|
||||||
|
process.stdout.write(JSON.stringify({ error: String(error) }));
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
'@
|
||||||
|
|
||||||
|
$proxyNames = @('HTTP_PROXY', 'HTTPS_PROXY', 'ALL_PROXY', 'http_proxy', 'https_proxy', 'all_proxy')
|
||||||
|
$noProxyNames = @('NO_PROXY', 'no_proxy')
|
||||||
|
$saved = @{}
|
||||||
|
foreach ($name in $proxyNames + $noProxyNames) {
|
||||||
|
$saved[$name] = [Environment]::GetEnvironmentVariable($name, 'Process')
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
foreach ($name in $proxyNames) { Set-Item -Path "env:$name" -Value 'http://10.255.255.1:9' }
|
||||||
|
foreach ($name in $noProxyNames) { Remove-Item -Path "env:$name" -ErrorAction SilentlyContinue }
|
||||||
|
$offline = (& $nodeExe $probe $Bundle $url $dataDir | Out-String).Trim()
|
||||||
|
} finally {
|
||||||
|
foreach ($name in $proxyNames + $noProxyNames) {
|
||||||
|
if ($saved[$name]) { Set-Item -Path "env:$name" -Value $saved[$name] }
|
||||||
|
else { Remove-Item -Path "env:$name" -ErrorAction SilentlyContinue }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$offlineResult = $null
|
||||||
|
try { $offlineResult = $offline | ConvertFrom-Json } catch { }
|
||||||
|
Check 'engine answers with the proxy unreachable' ($null -ne $offlineResult -and $offlineResult.health -eq 200) $(if ($offlineResult) { "health $($offlineResult.health)" } else { $offline })
|
||||||
|
# A new upload is created (201); replacing one answers 200.
|
||||||
|
Check 'import upload accepted offline' ($null -ne $offlineResult -and $offlineResult.upload -in @(200, 201)) $(if ($offlineResult) { "upload $($offlineResult.upload)" } else { '' })
|
||||||
|
Check 'preview decodes offline' ($null -ne $offlineResult -and $offlineResult.preview -eq 200) $(if ($offlineResult) { "preview $($offlineResult.preview)" } else { '' })
|
||||||
|
|
||||||
Say ''
|
Say ''
|
||||||
Say 'Window (WebView2)'
|
Say 'Window (WebView2)'
|
||||||
if (-not (Test-Path -LiteralPath $windowExe)) {
|
if (-not (Test-Path -LiteralPath $windowExe)) {
|
||||||
|
|||||||
+24
-7
@@ -445,6 +445,19 @@ function writeVersion(bundle, pkg, launcher, nodeVersion, nodeHash, nodeSize) {
|
|||||||
|
|
||||||
function writeBundleReadme(bundle, info) {
|
function writeBundleReadme(bundle, info) {
|
||||||
const start = info.launcher === 'go' ? 'Luminary.exe' : 'Luminary.cmd (or Luminary.vbs for no console window)';
|
const start = info.launcher === 'go' ? 'Luminary.exe' : 'Luminary.cmd (or Luminary.vbs for no console window)';
|
||||||
|
const windowLine = info.nativeWindow
|
||||||
|
? 'Window: opens in its own window: no browser, no tabs, no address bar, and\n' +
|
||||||
|
' no Edge profile or Microsoft account'
|
||||||
|
: 'Window: opens in a chromeless Edge/Chrome window; "Luminary.cmd -Browser"\n' +
|
||||||
|
' for a normal tab';
|
||||||
|
const windowRequirement = info.nativeWindow
|
||||||
|
? ' - The Microsoft Edge WebView2 runtime, which Windows 10 and 11 install with\n' +
|
||||||
|
' Edge. It is the window engine only: no browser is opened and no Edge\n' +
|
||||||
|
' profile, account or synced settings are used. If it is missing the window\n' +
|
||||||
|
' says so and links to the one-time download.\n' +
|
||||||
|
' - WebGL2 for the Develop module (WebView2 provides it).'
|
||||||
|
: ' - A current browser (Edge, Chrome or Firefox) with WebGL2 for the Develop\n' +
|
||||||
|
' module.';
|
||||||
const body = `Luminary ${info.version} for Windows (x64) — portable bundle
|
const body = `Luminary ${info.version} for Windows (x64) — portable bundle
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
@@ -456,13 +469,13 @@ Logs: logs\\server.out.log and logs\\server.err.log
|
|||||||
Check: "Luminary.cmd -Verify" lists the files a complete bundle needs
|
Check: "Luminary.cmd -Verify" lists the files a complete bundle needs
|
||||||
Repair: "Luminary.cmd -Repair" downloads node.exe again and verifies its sha256
|
Repair: "Luminary.cmd -Repair" downloads node.exe again and verifies its sha256
|
||||||
Sign-in: none — single-user desktop mode, no account setup
|
Sign-in: none — single-user desktop mode, no account setup
|
||||||
Window: opens in its own window (native when bundled, else chromeless Edge/Chrome);
|
Network: not needed — the app and its service run on this PC, so it starts
|
||||||
"Luminary.cmd -Browser" for a normal tab
|
and runs with the network disconnected
|
||||||
|
${windowLine}
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
- Windows 10 or 11, 64-bit.
|
- Windows 10 or 11, 64-bit.
|
||||||
- A current browser (Edge, Chrome or Firefox) with WebGL2 for the Develop
|
${windowRequirement}
|
||||||
module.
|
|
||||||
- Nothing else. Node.js is included as node.exe, and no .NET, Visual C++
|
- Nothing else. Node.js is included as node.exe, and no .NET, Visual C++
|
||||||
Redistributable, admin rights or installer is needed.
|
Redistributable, admin rights or installer is needed.
|
||||||
- About 250 MB free where the data folder lives.
|
- About 250 MB free where the data folder lives.
|
||||||
@@ -490,8 +503,9 @@ Notes
|
|||||||
opens signed in. It is not meant for several people sharing one Windows
|
opens signed in. It is not meant for several people sharing one Windows
|
||||||
login with separate accounts.
|
login with separate accounts.
|
||||||
- The bundle is unsigned, so SmartScreen may ask once ("More info" -> "Run anyway").
|
- The bundle is unsigned, so SmartScreen may ask once ("More info" -> "Run anyway").
|
||||||
- The server listens on 127.0.0.1 only. Set HOST=0.0.0.0 before starting if
|
- The local engine listens on 127.0.0.1 only: it is a background service on
|
||||||
client proofing galleries must be reachable from other devices on the LAN.
|
this PC. Set HOST=0.0.0.0 before starting only if client proofing galleries
|
||||||
|
must be reachable from other devices on the LAN.
|
||||||
- RAW decoding uses the bundled libraw WebAssembly; sharp's Windows prebuilt
|
- RAW decoding uses the bundled libraw WebAssembly; sharp's Windows prebuilt
|
||||||
binary is included, so there is nothing else to install.
|
binary is included, so there is nothing else to install.
|
||||||
`;
|
`;
|
||||||
@@ -651,6 +665,9 @@ async function fetchMakensis(outDir) {
|
|||||||
const root = path.join(outDir, 'tools', 'nsis');
|
const root = path.join(outDir, 'tools', 'nsis');
|
||||||
mkdirSync(debs, { recursive: true });
|
mkdirSync(debs, { recursive: true });
|
||||||
rmSync(root, { recursive: true, force: true });
|
rmSync(root, { recursive: true, force: true });
|
||||||
|
// dpkg-deb -x creates the destination itself but not its parents, and a
|
||||||
|
// fresh --out has no tools/ yet.
|
||||||
|
mkdirSync(root, { recursive: true });
|
||||||
for (const name of [`nsis_${packVersion}_amd64.deb`, `nsis-common_${packVersion}_all.deb`]) {
|
for (const name of [`nsis_${packVersion}_amd64.deb`, `nsis-common_${packVersion}_all.deb`]) {
|
||||||
const file = path.join(debs, name);
|
const file = path.join(debs, name);
|
||||||
if (!existsSync(file)) {
|
if (!existsSync(file)) {
|
||||||
@@ -776,7 +793,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const info = writeVersion(bundle, pkg, launcher, options.node, node.hash, statSync(bundledNode).size);
|
const info = writeVersion(bundle, pkg, launcher, options.node, node.hash, statSync(bundledNode).size);
|
||||||
writeBundleReadme(bundle, { ...info, launcher });
|
writeBundleReadme(bundle, { ...info, launcher, nativeWindow: Boolean(options.webview2) });
|
||||||
|
|
||||||
const zipPath = path.join(options.out, `Luminary-${pkg.version}-win-x64.zip`);
|
const zipPath = path.join(options.out, `Luminary-${pkg.version}-win-x64.zip`);
|
||||||
rmSync(zipPath, { force: true });
|
rmSync(zipPath, { force: true });
|
||||||
|
|||||||
+17
-17
@@ -81,11 +81,19 @@ VIAddVersionKey "LegalCopyright" "MIT licensed"
|
|||||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show the Windows readme"
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show the Windows readme"
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
|
|
||||||
!if /FileExists "${SOURCE_DIR}/Luminary.vbs"
|
; The native launcher first: it needs no Windows Script Host (which group
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\Luminary.vbs"
|
; policy can disable, leaving "Start Luminary" doing nothing) and opens no
|
||||||
|
; console. The .vbs, then the .cmd, are only fallbacks for old bundles.
|
||||||
|
!if /FileExists "${SOURCE_DIR}/Luminary.exe"
|
||||||
|
!define APP_LAUNCH "$INSTDIR\Luminary.exe"
|
||||||
!else
|
!else
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\Luminary.cmd"
|
!if /FileExists "${SOURCE_DIR}/Luminary.vbs"
|
||||||
|
!define APP_LAUNCH "$INSTDIR\Luminary.vbs"
|
||||||
|
!else
|
||||||
|
!define APP_LAUNCH "$INSTDIR\Luminary.cmd"
|
||||||
|
!endif
|
||||||
!endif
|
!endif
|
||||||
|
!define MUI_FINISHPAGE_RUN "${APP_LAUNCH}"
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}"
|
!define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}"
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
@@ -143,12 +151,12 @@ Section "Luminary (required)" SEC_MAIN
|
|||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
CreateDirectory "$SMPROGRAMS\Luminary"
|
CreateDirectory "$SMPROGRAMS\Luminary"
|
||||||
!if /FileExists "${SOURCE_DIR}/Luminary.vbs"
|
CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "${APP_LAUNCH}" "" "$INSTDIR\Luminary.ico" 0
|
||||||
CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "$INSTDIR\Luminary.vbs" "" "$INSTDIR\Luminary.ico" 0
|
!if /FileExists "${SOURCE_DIR}/Luminary.exe"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Luminary.exe" "-Stop" "$INSTDIR\Luminary.ico" 0
|
||||||
!else
|
!else
|
||||||
CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "$INSTDIR\Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0
|
|
||||||
!endif
|
|
||||||
CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Stop Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0
|
CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Stop Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0
|
||||||
|
!endif
|
||||||
CreateShortCut "$SMPROGRAMS\Luminary\Luminary data folder.lnk" "$LOCALAPPDATA\Luminary\data" "" "$INSTDIR\Luminary.ico" 0
|
CreateShortCut "$SMPROGRAMS\Luminary\Luminary data folder.lnk" "$LOCALAPPDATA\Luminary\data" "" "$INSTDIR\Luminary.ico" 0
|
||||||
|
|
||||||
WriteRegStr HKCU "${APP_KEY}" "InstallDir" "$INSTDIR"
|
WriteRegStr HKCU "${APP_KEY}" "InstallDir" "$INSTDIR"
|
||||||
@@ -168,19 +176,11 @@ Section "Luminary (required)" SEC_MAIN
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Desktop shortcut" SEC_DESKTOP
|
Section "Desktop shortcut" SEC_DESKTOP
|
||||||
!if /FileExists "${SOURCE_DIR}/Luminary.vbs"
|
CreateShortCut "$DESKTOP\Luminary.lnk" "${APP_LAUNCH}" "" "$INSTDIR\Luminary.ico" 0
|
||||||
CreateShortCut "$DESKTOP\Luminary.lnk" "$INSTDIR\Luminary.vbs" "" "$INSTDIR\Luminary.ico" 0
|
|
||||||
!else
|
|
||||||
CreateShortCut "$DESKTOP\Luminary.lnk" "$INSTDIR\Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0
|
|
||||||
!endif
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Start Luminary when I sign in" SEC_STARTUP
|
Section "Start Luminary when I sign in" SEC_STARTUP
|
||||||
!if /FileExists "${SOURCE_DIR}/Luminary.vbs"
|
WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"${APP_LAUNCH}"'
|
||||||
WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"$INSTDIR\Luminary.vbs"'
|
|
||||||
!else
|
|
||||||
WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"$INSTDIR\Luminary.cmd"'
|
|
||||||
!endif
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
|||||||
@@ -142,8 +142,13 @@ create data dir → create log dir → pick port → spawn node.exe (hidden)
|
|||||||
second or third attempt).
|
second or third attempt).
|
||||||
- The PowerShell launcher checks `$process.HasExited` first, so a crash reports
|
- The PowerShell launcher checks `$process.HasExited` first, so a crash reports
|
||||||
the log instead of waiting the full timeout.
|
the log instead of waiting the full timeout.
|
||||||
- The browser is opened only after health succeeds; opening earlier shows a
|
- The probe is a raw HTTP request over TCP to `127.0.0.1`, in both launchers,
|
||||||
connection error on slow machines.
|
and never `Invoke-WebRequest` or a proxy-aware HTTP client. WinINET resolves
|
||||||
|
the system proxy (a PAC script or WPAD) before it looks at the URL, which can
|
||||||
|
block for far longer than the request timeout on a machine with no network;
|
||||||
|
the server was healthy the whole time, but every probe timed out and the
|
||||||
|
launcher reported that Luminary had not started. Start-up must never depend on
|
||||||
|
a connection, a proxy setting or DNS.
|
||||||
|
|
||||||
Logs are append-only: `logs\server.out.log` and `logs\server.err.log` from the
|
Logs are append-only: `logs\server.out.log` and `logs\server.err.log` from the
|
||||||
child, `logs\launcher.log` from the Go launcher. They fall back to
|
child, `logs\launcher.log` from the Go launcher. They fall back to
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
This is the no-toolchain launcher: it ships in every bundle and is what
|
This is the no-toolchain launcher: it ships in every bundle and is what
|
||||||
Luminary.exe replaces when a Go build is available. It owns the three things
|
Luminary.exe replaces when a Go build is available. It owns the three things
|
||||||
the server deliberately does not do for itself:
|
Luminary's local engine deliberately does not do for itself:
|
||||||
|
|
||||||
1. Pick a free loopback port and pass it as PORT.
|
1. Pick a free loopback port and pass it as PORT.
|
||||||
2. Start node.exe hidden with LUMINARY_DATA outside the bundle.
|
2. Start node.exe hidden with LUMINARY_DATA outside the bundle.
|
||||||
3. Wait for /api/health before opening the browser.
|
3. Wait for /api/health before opening the browser.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
Luminary.ps1 start (or reuse) the server and open the browser
|
Luminary.ps1 start (or reuse) the local engine and open the browser
|
||||||
Luminary.ps1 -Stop stop the server started from this folder
|
Luminary.ps1 -Stop stop the local engine started from this folder
|
||||||
Luminary.ps1 -Status report what is running and where the data lives
|
Luminary.ps1 -Status report what is running and where the data lives
|
||||||
Luminary.ps1 -Verify list the files the bundle must contain
|
Luminary.ps1 -Verify list the files the bundle must contain
|
||||||
Luminary.ps1 -Repair re-download node.exe and check it against version.txt
|
Luminary.ps1 -Repair re-download node.exe and check it against version.txt
|
||||||
@@ -96,11 +96,34 @@ function Read-Runtime {
|
|||||||
try { return Get-Content -Raw -LiteralPath $runtimeFile | ConvertFrom-Json } catch { return $null }
|
try { return Get-Content -Raw -LiteralPath $runtimeFile | ConvertFrom-Json } catch { return $null }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Loopback liveness probe.
|
||||||
|
#
|
||||||
|
# Invoke-WebRequest goes through WinINET, which resolves the system proxy (a PAC
|
||||||
|
# script or WPAD) before it looks at the URL. On a machine with no network that
|
||||||
|
# lookup can block for far longer than -TimeoutSec, so every probe timed out and
|
||||||
|
# the launcher killed a healthy local engine: the app "would not start" offline.
|
||||||
|
# A raw request over TCP to 127.0.0.1 uses no proxy, DNS or certificate store, so
|
||||||
|
# start-up behaves the same with or without a connection.
|
||||||
function Test-Health([int]$port) {
|
function Test-Health([int]$port) {
|
||||||
|
$client = $null
|
||||||
try {
|
try {
|
||||||
$response = Invoke-WebRequest -UseBasicParsing -TimeoutSec 2 -Uri ("http://127.0.0.1:{0}/api/health" -f $port)
|
$client = New-Object System.Net.Sockets.TcpClient
|
||||||
return ($response.StatusCode -eq 200)
|
$connect = $client.ConnectAsync([System.Net.IPAddress]::Loopback, $port)
|
||||||
} catch { return $false }
|
if (-not $connect.Wait(2000)) { return $false }
|
||||||
|
$client.ReceiveTimeout = 3000
|
||||||
|
$stream = $client.GetStream()
|
||||||
|
$request = [System.Text.Encoding]::ASCII.GetBytes((
|
||||||
|
"GET /api/health HTTP/1.0`r`nHost: 127.0.0.1:{0}`r`nConnection: close`r`n`r`n" -f $port))
|
||||||
|
$stream.Write($request, 0, $request.Length)
|
||||||
|
$stream.Flush()
|
||||||
|
$reader = New-Object System.IO.StreamReader($stream, [System.Text.Encoding]::ASCII)
|
||||||
|
$status = $reader.ReadLine()
|
||||||
|
return ($status -match '^HTTP/1\.[01] 200\b')
|
||||||
|
} catch {
|
||||||
|
return $false
|
||||||
|
} finally {
|
||||||
|
if ($client) { $client.Close() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Test-Process([int]$processId) {
|
function Test-Process([int]$processId) {
|
||||||
@@ -133,8 +156,20 @@ function Open-Browser([string]$url) {
|
|||||||
|
|
||||||
# Edge is part of Windows 10/11, so a chromeless app window costs no extra
|
# Edge is part of Windows 10/11, so a chromeless app window costs no extra
|
||||||
# runtime. Chrome is the second choice; anything else falls back to a tab.
|
# runtime. Chrome is the second choice; anything else falls back to a tab.
|
||||||
|
# Chrome first, then Edge: both are Chromium, but Edge's first run asks for a
|
||||||
|
# Microsoft account and starts syncing settings, which reads as an unwanted
|
||||||
|
# browser taking over the machine.
|
||||||
function Find-AppWindowBrowser {
|
function Find-AppWindowBrowser {
|
||||||
$candidates = @()
|
$candidates = @()
|
||||||
|
if ($env:LOCALAPPDATA) {
|
||||||
|
$candidates += (Join-Path $env:LOCALAPPDATA 'Google\Chrome\Application\chrome.exe')
|
||||||
|
}
|
||||||
|
if ($env:ProgramFiles) {
|
||||||
|
$candidates += (Join-Path $env:ProgramFiles 'Google\Chrome\Application\chrome.exe')
|
||||||
|
}
|
||||||
|
if (${env:ProgramFiles(x86)}) {
|
||||||
|
$candidates += (Join-Path ${env:ProgramFiles(x86)} 'Google\Chrome\Application\chrome.exe')
|
||||||
|
}
|
||||||
if (${env:ProgramFiles(x86)}) {
|
if (${env:ProgramFiles(x86)}) {
|
||||||
$candidates += (Join-Path ${env:ProgramFiles(x86)} 'Microsoft\Edge\Application\msedge.exe')
|
$candidates += (Join-Path ${env:ProgramFiles(x86)} 'Microsoft\Edge\Application\msedge.exe')
|
||||||
}
|
}
|
||||||
@@ -143,13 +178,6 @@ function Find-AppWindowBrowser {
|
|||||||
}
|
}
|
||||||
if ($env:LOCALAPPDATA) {
|
if ($env:LOCALAPPDATA) {
|
||||||
$candidates += (Join-Path $env:LOCALAPPDATA 'Microsoft\Edge\Application\msedge.exe')
|
$candidates += (Join-Path $env:LOCALAPPDATA 'Microsoft\Edge\Application\msedge.exe')
|
||||||
$candidates += (Join-Path $env:LOCALAPPDATA 'Google\Chrome\Application\chrome.exe')
|
|
||||||
}
|
|
||||||
if ($env:ProgramFiles) {
|
|
||||||
$candidates += (Join-Path $env:ProgramFiles 'Google\Chrome\Application\chrome.exe')
|
|
||||||
}
|
|
||||||
if (${env:ProgramFiles(x86)}) {
|
|
||||||
$candidates += (Join-Path ${env:ProgramFiles(x86)} 'Google\Chrome\Application\chrome.exe')
|
|
||||||
}
|
}
|
||||||
foreach ($candidate in $candidates) {
|
foreach ($candidate in $candidates) {
|
||||||
if ($candidate -and (Test-Path -LiteralPath $candidate)) { return $candidate }
|
if ($candidate -and (Test-Path -LiteralPath $candidate)) { return $candidate }
|
||||||
@@ -183,12 +211,16 @@ function Open-App([string]$url) {
|
|||||||
$profile = Join-Path (Get-DataDir) 'window-profile'
|
$profile = Join-Path (Get-DataDir) 'window-profile'
|
||||||
try {
|
try {
|
||||||
New-Item -ItemType Directory -Force -Path $profile | Out-Null
|
New-Item -ItemType Directory -Force -Path $profile | Out-Null
|
||||||
|
# --no-proxy-server: the window only ever loads 127.0.0.1. A proxy or PAC
|
||||||
|
# script set on the machine must not be able to intercept (or stall) it
|
||||||
|
# when the network is down.
|
||||||
Start-Process -FilePath $exe -ArgumentList @(
|
Start-Process -FilePath $exe -ArgumentList @(
|
||||||
"--app=$url",
|
"--app=$url",
|
||||||
"--user-data-dir=$profile",
|
"--user-data-dir=$profile",
|
||||||
'--window-size=1500,950',
|
'--window-size=1500,950',
|
||||||
'--no-first-run',
|
'--no-first-run',
|
||||||
'--no-default-browser-check',
|
'--no-default-browser-check',
|
||||||
|
'--no-proxy-server',
|
||||||
'--disable-features=Translate'
|
'--disable-features=Translate'
|
||||||
) | Out-Null
|
) | Out-Null
|
||||||
} catch {
|
} catch {
|
||||||
@@ -534,7 +566,7 @@ if ($running) {
|
|||||||
}
|
}
|
||||||
if (Test-Process ([int]$runtime.pid)) {
|
if (Test-Process ([int]$runtime.pid)) {
|
||||||
$logNote = Join-Path (Get-DataDir) 'logs'
|
$logNote = Join-Path (Get-DataDir) 'logs'
|
||||||
Show-ErrorDialog ("Luminary has been starting for over two minutes and is not answering on port {0}.`n`nSee {1} for the server log." -f $runtime.port, $logNote)
|
Show-ErrorDialog ("Luminary has been starting for over two minutes and is not answering on its local port {0}.`n`nSee {1} for the log." -f $runtime.port, $logNote)
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -598,7 +630,7 @@ $logsOut = Get-LogDir $dataDir
|
|||||||
$port = Find-Port
|
$port = Find-Port
|
||||||
$url = "http://127.0.0.1:$port"
|
$url = "http://127.0.0.1:$port"
|
||||||
|
|
||||||
# The server reads these from the environment; nothing is written into app\.
|
# The local engine reads these from the environment; nothing is written into app\.
|
||||||
$env:PORT = "$port"
|
$env:PORT = "$port"
|
||||||
$env:HOST = '127.0.0.1'
|
$env:HOST = '127.0.0.1'
|
||||||
$env:NODE_ENV = 'production'
|
$env:NODE_ENV = 'production'
|
||||||
@@ -640,7 +672,7 @@ while ((Get-Date) -lt $deadline) {
|
|||||||
|
|
||||||
$tail = ''
|
$tail = ''
|
||||||
if (Test-Path -LiteralPath $errLog) { $tail = (Get-Content -LiteralPath $errLog -Tail 20) -join "`n" }
|
if (Test-Path -LiteralPath $errLog) { $tail = (Get-Content -LiteralPath $errLog -Tail 20) -join "`n" }
|
||||||
Write-Host 'Luminary did not answer on /api/health.'
|
Write-Host "Luminary's local engine did not answer."
|
||||||
if ($tail) { Write-Host $tail }
|
if ($tail) { Write-Host $tail }
|
||||||
if (-not $process.HasExited) { & taskkill.exe /PID $process.Id /T /F | Out-Null }
|
if (-not $process.HasExited) { & taskkill.exe /PID $process.Id /T /F | Out-Null }
|
||||||
Remove-Item -LiteralPath $runtimeFile -Force -ErrorAction SilentlyContinue
|
Remove-Item -LiteralPath $runtimeFile -Force -ErrorAction SilentlyContinue
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem Stop the Luminary server started from this folder.
|
rem Stop the Luminary local engine started from this folder.
|
||||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Luminary.ps1" -Stop
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Luminary.ps1" -Stop
|
||||||
pause
|
pause
|
||||||
|
|||||||
+29
-13
@@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
//
|
//
|
||||||
// Luminary.exe start (or reuse) the server and open the browser
|
// Luminary.exe start (or reuse) the local engine and open the browser
|
||||||
// Luminary.exe -stop stop the server started from this folder
|
// Luminary.exe -stop stop the local engine started from this folder
|
||||||
// Luminary.exe -repair re-download node.exe and verify it against version.txt
|
// Luminary.exe -repair re-download node.exe and verify it against version.txt
|
||||||
//
|
//
|
||||||
// The design and the edge cases are described in ../DESIGN.md.
|
// The design and the edge cases are described in ../DESIGN.md.
|
||||||
@@ -58,7 +58,17 @@ var (
|
|||||||
user32 = syscall.NewLazyDLL("user32.dll")
|
user32 = syscall.NewLazyDLL("user32.dll")
|
||||||
messageBoxW = user32.NewProc("MessageBoxW")
|
messageBoxW = user32.NewProc("MessageBoxW")
|
||||||
|
|
||||||
client = &http.Client{Timeout: 2 * time.Second}
|
// Health is a loopback call: no proxy, no DNS, no internet. The default
|
||||||
|
// transport honours HTTP_PROXY, so a stale corporate proxy or PAC script
|
||||||
|
// would make every probe fail and the launcher would kill a server that was
|
||||||
|
// already answering.
|
||||||
|
client = &http.Client{
|
||||||
|
Timeout: 2 * time.Second,
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: nil,
|
||||||
|
DialContext: (&net.Dialer{Timeout: 2 * time.Second}).DialContext,
|
||||||
|
},
|
||||||
|
}
|
||||||
downloadClient = &http.Client{Timeout: 10 * time.Minute}
|
downloadClient = &http.Client{Timeout: 10 * time.Minute}
|
||||||
nodePinRE = regexp.MustCompile(`^node\s+v?(\d+\.\d+\.\d+)\s+win-x64(?:\s+sha256\s+([0-9a-f]{64}))?(?:\s+size\s+(\d+))?`)
|
nodePinRE = regexp.MustCompile(`^node\s+v?(\d+\.\d+\.\d+)\s+win-x64(?:\s+sha256\s+([0-9a-f]{64}))?(?:\s+size\s+(\d+))?`)
|
||||||
)
|
)
|
||||||
@@ -222,8 +232,8 @@ func run() error {
|
|||||||
time.Sleep(pollEvery)
|
time.Sleep(pollEvery)
|
||||||
}
|
}
|
||||||
if processAlive(info.PID) {
|
if processAlive(info.PID) {
|
||||||
return fmt.Errorf("Luminary is already starting (pid %d) but is not answering on port %d. "+
|
return fmt.Errorf("Luminary is already starting (pid %d) but is not answering on its "+
|
||||||
"See %s.", info.PID, info.Port, filepath.Join(dataDirectory(), "logs", "server.err.log"))
|
"local port %d. See %s.", info.PID, info.Port, filepath.Join(dataDirectory(), "logs", "server.err.log"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -291,7 +301,7 @@ func run() error {
|
|||||||
// code is deliberately ignored: "Stop" force-kills the child.
|
// code is deliberately ignored: "Stop" force-kills the child.
|
||||||
_ = cmd.Wait()
|
_ = cmd.Wait()
|
||||||
removeRuntime()
|
removeRuntime()
|
||||||
writeLog("launcher.log", "server exited")
|
writeLog("launcher.log", "local engine exited")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
time.Sleep(pollEvery)
|
time.Sleep(pollEvery)
|
||||||
@@ -299,8 +309,8 @@ func run() error {
|
|||||||
|
|
||||||
_ = cmd.Process.Kill()
|
_ = cmd.Process.Kill()
|
||||||
removeRuntime()
|
removeRuntime()
|
||||||
return fmt.Errorf("Luminary did not answer on %s within %s; see %s",
|
return fmt.Errorf("Luminary's local engine did not answer within %s; see %s",
|
||||||
healthPath, startupWait, filepath.Join(logDir, "server.err.log"))
|
startupWait, filepath.Join(logDir, "server.err.log"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- runtime resolution -------------------------------------------------------
|
// --- runtime resolution -------------------------------------------------------
|
||||||
@@ -572,8 +582,10 @@ func openBrowser(url string) {
|
|||||||
_ = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
|
_ = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edge ships with Windows 10/11, so a chromeless app window costs no extra
|
// Chrome comes first, then Edge: both are Chromium and cost no extra runtime,
|
||||||
// runtime. Chrome is the second choice; anything else falls back to a tab.
|
// but starting Edge prompts for the Microsoft account and settings sync, which
|
||||||
|
// reads as an unwanted browser taking over the machine. Anything else falls
|
||||||
|
// back to a normal tab.
|
||||||
func findAppBrowser() string {
|
func findAppBrowser() string {
|
||||||
candidates := []string{}
|
candidates := []string{}
|
||||||
add := func(dir string, rest ...string) {
|
add := func(dir string, rest ...string) {
|
||||||
@@ -581,12 +593,12 @@ func findAppBrowser() string {
|
|||||||
candidates = append(candidates, filepath.Join(append([]string{dir}, rest...)...))
|
candidates = append(candidates, filepath.Join(append([]string{dir}, rest...)...))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, key := range []string{"ProgramFiles(x86)", "ProgramFiles", "LOCALAPPDATA"} {
|
|
||||||
add(os.Getenv(key), "Microsoft", "Edge", "Application", "msedge.exe")
|
|
||||||
}
|
|
||||||
for _, key := range []string{"LOCALAPPDATA", "ProgramFiles", "ProgramFiles(x86)"} {
|
for _, key := range []string{"LOCALAPPDATA", "ProgramFiles", "ProgramFiles(x86)"} {
|
||||||
add(os.Getenv(key), "Google", "Chrome", "Application", "chrome.exe")
|
add(os.Getenv(key), "Google", "Chrome", "Application", "chrome.exe")
|
||||||
}
|
}
|
||||||
|
for _, key := range []string{"ProgramFiles(x86)", "ProgramFiles", "LOCALAPPDATA"} {
|
||||||
|
add(os.Getenv(key), "Microsoft", "Edge", "Application", "msedge.exe")
|
||||||
|
}
|
||||||
for _, candidate := range candidates {
|
for _, candidate := range candidates {
|
||||||
if info, err := os.Stat(candidate); err == nil && info.Size() > 0 {
|
if info, err := os.Stat(candidate); err == nil && info.Size() > 0 {
|
||||||
return candidate
|
return candidate
|
||||||
@@ -621,12 +633,16 @@ func openApp(url string) {
|
|||||||
openBrowser(url)
|
openBrowser(url)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// --no-proxy-server: the window only ever loads 127.0.0.1, so a proxy or
|
||||||
|
// PAC script on the machine must not intercept or stall it when the
|
||||||
|
// network is down.
|
||||||
cmd := exec.Command(exe,
|
cmd := exec.Command(exe,
|
||||||
"--app="+url,
|
"--app="+url,
|
||||||
"--user-data-dir="+profile,
|
"--user-data-dir="+profile,
|
||||||
"--window-size=1500,950",
|
"--window-size=1500,950",
|
||||||
"--no-first-run",
|
"--no-first-run",
|
||||||
"--no-default-browser-check",
|
"--no-default-browser-check",
|
||||||
|
"--no-proxy-server",
|
||||||
"--disable-features=Translate",
|
"--disable-features=Translate",
|
||||||
)
|
)
|
||||||
if err := cmd.Start(); err != nil {
|
if err := cmd.Start(); err != nil {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ app never looks in this folder.
|
|||||||
| File | What to do with it |
|
| File | What to do with it |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `Luminary-<version>-win-x64-setup.exe` | Copy to the Windows PC and run it. Per-user install, no admin prompt: Start-menu shortcuts, optional desktop shortcut and start-at-login, and an uninstaller that keeps `%LOCALAPPDATA%\Luminary\data`. |
|
| `Luminary-<version>-win-x64-setup.exe` | Copy to the Windows PC and run it. Per-user install, no admin prompt: Start-menu shortcuts, optional desktop shortcut and start-at-login, and an uninstaller that keeps `%LOCALAPPDATA%\Luminary\data`. |
|
||||||
| `Luminary-<version>-win-x64.zip` | The portable alternative: extract, then run `Luminary.cmd` (or `Luminary.vbs`) from the extracted `Luminary` folder. `README-windows.txt` inside the zip is the end-user guide. |
|
| `Luminary-<version>-win-x64.zip` | The portable alternative: extract, then run `Luminary.exe` from the extracted `Luminary` folder. `README-windows.txt` inside the zip is the end-user guide. |
|
||||||
| `LuminaryWindow.exe` inside the zip | optional native window (WebView2); the launcher uses it automatically when present, and starting it directly forwards to the launcher |
|
| `LuminaryWindow.exe` inside the zip | the app window (WebView2): no browser is opened, so it cannot pull in an Edge profile or Microsoft account. The launcher uses it automatically, and starting it directly forwards to the launcher |
|
||||||
| `SHA256SUMS.txt` | Check a copy did not corrupt: `certutil -hashfile Luminary-<version>-win-x64-setup.exe SHA256` |
|
| `SHA256SUMS.txt` | Check a copy did not corrupt: `certutil -hashfile Luminary-<version>-win-x64-setup.exe SHA256` |
|
||||||
|
|
||||||
## Rebuilding this folder
|
## Rebuilding this folder
|
||||||
@@ -24,7 +24,7 @@ stages and zips **outside** the checkout (`~/.cache/luminary-windows`, or
|
|||||||
artifact. Old versions are not deleted, so remove the ones you no longer ship.
|
artifact. Old versions are not deleted, so remove the ones you no longer ship.
|
||||||
|
|
||||||
Add `--webview2 <path to LuminaryWindow.exe>` for the native window; without it
|
Add `--webview2 <path to LuminaryWindow.exe>` for the native window; without it
|
||||||
the zip is about half the size (49 MB) and uses the Edge/Chrome app window.
|
the zip is about 65 MB smaller and falls back to an Edge/Chrome app window.
|
||||||
|
|
||||||
## Before a deploy
|
## Before a deploy
|
||||||
|
|
||||||
@@ -35,8 +35,9 @@ publish only when you are actually shipping a build.
|
|||||||
|
|
||||||
## What a Windows user needs
|
## What a Windows user needs
|
||||||
|
|
||||||
Windows 10/11 x64 and a current browser (Edge, Chrome or Firefox) with WebGL2.
|
Windows 10/11 x64. Node.js, .NET and the Visual C++ Redistributable are **not**
|
||||||
Node.js, .NET and the Visual C++ Redistributable are **not** required — they are
|
required — they are bundled or part of Windows. The app window uses the
|
||||||
bundled or part of Windows. The native window needs the Microsoft Edge WebView2
|
Microsoft Edge WebView2 runtime, which Windows 10/11 install with Edge; it is
|
||||||
runtime, which Windows 10/11 already has alongside Edge. See `../README.md` for
|
the window engine only, so no browser window, profile or account is used. The
|
||||||
the import-level audit.
|
Develop module needs WebGL2, which WebView2 provides. See `../README.md` for the
|
||||||
|
import-level audit.
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
e81cbe4001bef43f79a2200acecc5dafbcf6c3c04dc2f6db4685f1f0b3ba3cdc Luminary-0.5.2-win-x64.zip
|
16d033a863345542a07e65bb3914f63d35432fe7b88c33cc65f9d7634428ab98 Luminary-0.5.4-win-x64.zip
|
||||||
c95ae4d21dfd80cd6206fc3f276c1d1d6afa61f55d48e6646f65784b483ca590 Luminary-0.5.2-win-x64-setup.exe
|
97cceb61bba34733013d21e1fe240f39da790843694e1390f6266aa128f1c456 Luminary-0.5.4-win-x64-setup.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user