Skip to content

Commit c5771ae

Browse files
committed
LR-EDIT-OPTICS-PROFILE: merge main (split engine modules, ILCE-6700 / lens-exception ARW warps: the ILCE-7RM6 CA map stays full-frame-body only beside main's warp planes)
2 parents 559db99 + f30dd5e commit c5771ae

1,096 files changed

Lines changed: 262106 additions & 63450 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.coderabbit.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
reviews:
3+
auto_review:
4+
# Dependabot bumps are checked by CI; skip CodeRabbit reviews on them.
5+
ignore_usernames:
6+
- "dependabot[bot]"

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<!--
2+
Title: start with the checklist id or the issue, as the commits do:
3+
`LR-IMP-FORMATS: folder import finds Sony SR2 and SRF files`, or `Issue #123: …` when there is no checklist row.
4+
5+
One change per pull request. Unrelated fixes and clean-ups (clippy, formatting, a second feature) go in their own:
6+
small ones land fast, bundles get sent back to be split. The rules are in AGENTS.md.
7+
8+
Delete the sections and lines that don't apply, and these comments. A translation or a one-line fix needs only the
9+
first three sections.
10+
-->
11+
12+
Fixes #
13+
14+
<!-- `Part of #123` when this does only part of the issue. Built on another open pull request? Say so here
15+
(`Stacked on #123`) and name the commits that are this one's own. -->
16+
17+
## Problem
18+
19+
<!-- What is wrong or missing, as a person using the app meets it. For a bug: the cause. -->
20+
21+
## Change
22+
23+
<!-- What you changed and where. -->
24+
25+
**Not in this PR:** <!-- what you left out on purpose, and known limits -->
26+
27+
## How it was checked
28+
29+
- [ ] `cargo xtask ci` passes on this branch, rebased on current `main`
30+
- [ ] A test that fails without this change (for a crash fix: a regression test that panicked before it)
31+
- [ ] User-visible change: ran the app and looked at the result
32+
33+
<!-- Numbers, when it changes rendering, decoding or speed: before and after, on more than one photo or camera
34+
(ΔE against the reference, `cargo xtask bench`, `/usr/bin/time`, memory). Name the files or corpus entries used. -->
35+
36+
## Screenshots
37+
38+
<!-- For a visible change: before and after, labelled. Never a screenshot of an Adobe app. -->
39+
40+
## Merging
41+
42+
<!-- Pull requests land in batches, merged together. This is what the person merging can't see in the diff. -->
43+
44+
- **Overlap:** <!-- open pull requests that fix the same issue or change the same functions, by number, and how
45+
this one differs. Search the open pull requests for the issue number and checklist id first. "none found" is fine. -->
46+
- **Existing edits and libraries:** <!-- does any photo already edited render differently, or any saved setting,
47+
preset, sort order or default change? Then it goes behind a new process version (docs/process-versions.md) or is a
48+
setting that is off by default, with a line in docs/whats-new.md. "unchanged" is fine. -->
49+
- **Shared numbers taken:** <!-- catalog format `VERSION` (crates/catalog/src/journal.rs), `RENDER_CACHE_VERSION`,
50+
`LOOK_VERSION`, process version: the number this takes. If another pull request lands with it first, take one
51+
past main's when you rebase. -->
52+
- **Where it came from:** <!-- for a decoder, camera or lens data, or fitted constants: the public spec, your own
53+
measurements, or observed output, and the files measured. Never GPL / LGPL code (dcraw, LibRaw, rawspeed, darktable,
54+
RawTherapee, lensfun …), text derived from it, or Adobe profiles. -->
55+
- **New dependencies, `unsafe`, build scripts, network access, spawned processes, deleted files, CI or `xtask` gate
56+
changes:** <!-- each with its reason, or "none". Dependencies are pure Rust and use `workspace = true`; actions are
57+
pinned by SHA; downloads are checked against a sha256; nothing leaves the machine unless the person asked. -->
58+
59+
## Checklist
60+
61+
- [ ] No new panic path in non-test code: no `unwrap` / `expect` / `panic!`, no indexing or unchecked arithmetic on a
62+
number from a file, a person or an agent (`get`, `checked_mul`, NaN and char boundaries handled)
63+
- [ ] New text on screen goes through `tr()` and has its key in `crates/ui-egui/locales/*.json`; a new shortcut is
64+
free in `docs/library-shortcuts.md`
65+
- [ ] The feature's rows in `docs/parity-checklist.md` and its entry in `docs/gaps.md` are updated, honestly (🟡 when
66+
it is partial), in the same commit
67+
- [ ] New code has a caller: no command, module or setting that nothing reaches yet
68+
- [ ] Every new image, icon or other asset has its entry in `assets/ATTRIBUTION.md`; no font or media files added
69+
- [ ] Ready to merge (otherwise open it as a draft)

‎.github/dependabot.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
# Maintain Rust / Cargo dependencies
4+
- package-ecosystem: "cargo"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
time: "06:00"
9+
timezone: "America/New_York"
10+
# Consolidate updates into a single PR rather than one PR per crate
11+
groups:
12+
cargo-dependencies:
13+
patterns:
14+
- "*"
15+
commit-message:
16+
prefix: "chore(deps)"
17+
18+
# Maintain GitHub Actions workflows
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "daily"
23+
time: "06:00"
24+
timezone: "America/New_York"
25+
groups:
26+
actions:
27+
patterns:
28+
- "*"
29+
commit-message:
30+
prefix: "ci(deps)"

‎.github/workflows/ci.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
# Quality gates for every push to main and every pull request (`cargo xtask ci`), through the
4+
# suite's shared gate workflow in craft-common-actions.
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
# A newer push to a PR branch cancels its older run; every push to main runs to the end.
15+
concurrency:
16+
group: ci-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
17+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
18+
19+
jobs:
20+
gate:
21+
# Tracks @main so suite-wide CI fixes reach every app without a PR in each repository.
22+
uses: storytold/craft-common-actions/.github/workflows/gate.yml@main
23+
with:
24+
# Same craft-fonts commit as release.yml.
25+
craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83
26+
timeout-minutes: 90
27+
# xtask ci runs cargo test: the demo scene cache is per process, so nextest is slower here.
28+
tools: ""
29+
packages: >-
30+
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev
31+
libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers
32+
libgl1-mesa-dev libdbus-1-dev

‎.github/workflows/freebsd.yml‎

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# Builds and tests the workspace on FreeBSD, inside a FreeBSD VM on a Linux runner
2-
# (GitHub has no FreeBSD runners). GPU tests skip themselves when the VM has no adapter.
1+
# FreeBSD build and package check in a QEMU VM.
32
name: FreeBSD
43

4+
# The VM build is slow, so it runs nightly on main and on pushes to `release`, not on every pull
5+
# request: a drifted dependency still shows up within a day, and always before a release ships.
6+
# PRs that change the FreeBSD workflow or packaging itself still run it.
57
on:
68
push:
7-
branches: [main]
9+
branches: [release]
810
pull_request:
911
paths:
10-
- Cargo.toml
11-
- Cargo.lock
12-
- "**/Cargo.toml"
1312
- .github/workflows/freebsd.yml
13+
- packaging/freebsd/**
14+
schedule:
15+
- cron: "7 4 * * *"
1416
workflow_dispatch:
1517

1618
concurrency:
@@ -22,34 +24,8 @@ permissions:
2224

2325
jobs:
2426
freebsd:
25-
name: FreeBSD 14 (build + test)
26-
runs-on: ubuntu-latest
27-
timeout-minutes: 300
28-
steps:
29-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30-
# Optional font build input, so the Japanese font tests run (they skip without it).
31-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32-
with:
33-
repository: storytold/craft-fonts
34-
ref: 8dcdacd5153e64560d109541a47d806f26f048c0
35-
path: craft-fonts
36-
- name: Build and test in a FreeBSD VM
37-
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9
38-
with:
39-
release: "14.3"
40-
usesh: true
41-
cpu: 4
42-
mem: 12288
43-
# Nothing to bring back; copying the target dir out of the VM fails on large builds.
44-
copyback: false
45-
prepare: |
46-
pkg install -y git curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 alsa-lib
47-
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
48-
run: |
49-
. "$HOME/.cargo/env"
50-
# The checkout is synced in under another owner; let tests that call git read it.
51-
git config --global --add safe.directory "*"
52-
rustc --version
53-
export CRAFT_FONTS_DIR="$PWD/craft-fonts" CRAFT_FONTS_REQUIRED=1
54-
CARGO_PROFILE_DEV_DEBUG=0 cargo build --workspace --all-targets --locked
55-
CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked
27+
# Intentionally tracked at @main (not SHA-pinned) so org-wide CI improvements, security fixes, and build optimizations propagate without PR churn across all craftapp repos.
28+
uses: storytold/craft-common-actions/.github/workflows/freebsd.yml@main
29+
with:
30+
require-craft-fonts: true
31+
craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83

‎.github/workflows/nix.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Evaluates the Nix flake (no build, about a minute): `nix build` / `nix develop` stop at evaluation
2+
# when Cargo.lock gains something nix/package.nix can't vendor, and nothing else would notice.
3+
name: Nix
4+
5+
on:
6+
push:
7+
branches: [main]
8+
paths: ["flake.nix", "flake.lock", "nix/**", "Cargo.lock", ".github/workflows/nix.yml"]
9+
pull_request:
10+
paths: ["flake.nix", "flake.lock", "nix/**", "Cargo.lock", ".github/workflows/nix.yml"]
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: nix-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
git-sources:
22+
name: Git dependencies come from storytold
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
steps:
26+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27+
- name: Git dependencies come from storytold
28+
run: |
29+
set -euo pipefail
30+
test -f Cargo.lock || { echo "Cargo.lock is missing"; exit 1; }
31+
# Source replacement, patches and path overrides in cargo config never show up
32+
# in Cargo.lock. Parsed rather than grepped: TOML has many spellings of one key.
33+
# Cargo still reads the legacy .cargo/config.
34+
python3 - <<'PY'
35+
import os, sys, tomllib
36+
for path in (".cargo/config", ".cargo/config.toml"):
37+
if not os.path.exists(path):
38+
continue
39+
config = tomllib.load(open(path, "rb"))
40+
replaced = [name for name, source in config.get("source", {}).items()
41+
if isinstance(source, dict) and "replace-with" in source]
42+
if replaced or "patch" in config or "paths" in config:
43+
print(f"{path} replaces, patches or overrides a source")
44+
sys.exit(1)
45+
PY
46+
# Fails when Cargo.lock is out of date with the manifests.
47+
cargo metadata --locked --format-version 1 > /dev/null
48+
python3 - <<'PY'
49+
import sys, tomllib
50+
lock = tomllib.load(open("Cargo.lock", "rb"))
51+
bad = sorted({p["source"] for p in lock.get("package", [])
52+
if p.get("source", "").startswith("git+")
53+
and not p["source"].startswith("git+https://github.com/storytold/")})
54+
if bad:
55+
print("Git dependencies outside github.com/storytold:", *bad, sep="\n")
56+
sys.exit(1)
57+
PY
58+
59+
nix:
60+
# Intentionally tracked at @main (not SHA-pinned) so org-wide CI improvements, security fixes, and build optimizations propagate without PR churn across all craftapp repos.
61+
uses: storytold/craft-common-actions/.github/workflows/nix.yml@main
Lines changed: 30 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# Quick checks for the release pipeline (no Rust build): workflow syntax, packaging
2-
# shell/PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata (seconds), plus a
3-
# Windows job that builds and installs throwaway per-user MSI probes for the install-folder
4-
# searches (a few minutes).
1+
# Quick static checks for the release pipeline (seconds, no Rust build): workflow syntax,
2+
# packaging shell/PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata.
53
name: Packaging lint
64

75
on:
@@ -21,58 +19,10 @@ concurrency:
2119

2220
jobs:
2321
lint:
24-
runs-on: ubuntu-latest
25-
env:
26-
ACTIONLINT_VERSION: 1.7.12
27-
steps:
28-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29-
- name: Install tools
30-
run: |
31-
sudo apt-get update
32-
sudo apt-get install -y --no-install-recommends shellcheck desktop-file-utils appstream libxml2-utils python3-yaml
33-
curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \
34-
| tar -xz -C "$RUNNER_TEMP" actionlint
35-
- name: actionlint
36-
run: |
37-
"$RUNNER_TEMP/actionlint" -color
38-
- name: shellcheck
39-
run: shellcheck packaging/*.sh packaging/*/*.sh
40-
- name: PowerShell
41-
shell: pwsh
42-
run: |
43-
foreach ($f in Get-ChildItem packaging/windows/*.ps1) {
44-
$errors = $null
45-
[System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$null, [ref]$errors) | Out-Null
46-
if ($errors) { $errors | ForEach-Object { Write-Output "::error file=$($f.Name)::$_" }; exit 1 }
47-
Write-Output "ok $($f.Name)"
48-
}
49-
- name: XML, desktop entry, AppStream, Flatpak manifest
50-
run: |
51-
xmllint --noout packaging/windows/lightcraft.wxs packaging/macos/*.plist* packaging/linux/*.xml*
52-
# Windows Installer needs Icon ids ending in .ico or .exe, or shortcuts show a blank icon.
53-
if grep -oE '<Icon Id="[^"]*"' packaging/windows/lightcraft.wxs | grep -vE '\.(ico|exe)"$'; then
54-
echo "::error::Icon Id must end in .ico or .exe"; exit 1
55-
fi
56-
# The interactive installer asks where to install and ends on a completion page (issues #18, #399).
57-
for want in '<UIRef Id="LightcraftUI" />' 'Value="InstallDirDlg"' '<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />' \
58-
'Key="Software\LightCraft" Name="InstallFolder"' 'Value="LaunchLightcraft"'; do
59-
grep -qF "$want" packaging/windows/lightcraft.wxs || { echo "::error::lightcraft.wxs lost: $want"; exit 1; }
60-
done
61-
desktop-file-validate packaging/linux/ai.storyteller.lightcraft.desktop
62-
sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' packaging/linux/ai.storyteller.lightcraft.metainfo.xml.in >"$RUNNER_TEMP/ai.storyteller.lightcraft.metainfo.xml"
63-
appstreamcli validate --no-net --explain "$RUNNER_TEMP/ai.storyteller.lightcraft.metainfo.xml"
64-
python3 - <<'EOF'
65-
import yaml
66-
src = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.lightcraft.yml"))
67-
bundle = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml"))
68-
for m in (src, bundle):
69-
assert m["id"] == "ai.storyteller.lightcraft" and m["command"] == "lightcraft", m["id"]
70-
for key in ("runtime", "runtime-version", "sdk", "finish-args"):
71-
assert src[key] == bundle[key], f"Flatpak manifests disagree on {key}: {src[key]} vs {bundle[key]}"
72-
print("Flatpak manifests ok")
73-
EOF
74-
- name: FreeBSD tarball layout (stub binaries)
75-
run: bash packaging/freebsd/package.sh --dry-run
22+
# Intentionally tracked at @main (not SHA-pinned) so org-wide CI improvements, security fixes, and build optimizations propagate without PR churn across all craftapp repos.
23+
uses: storytold/craft-common-actions/.github/workflows/packaging-lint.yml@main
24+
with:
25+
extra-checks-script: packaging/check-app-specific.sh
7626

7727
windows-install-folder:
7828
runs-on: windows-latest
@@ -87,3 +37,27 @@ jobs:
8737
run: |
8838
./packaging/windows/test-install-folder.ps1 -Arch x64
8939
./packaging/windows/test-install-folder.ps1 -Arch x86
40+
41+
windows-install-policy:
42+
timeout-minutes: 10
43+
name: Windows installation policy (no app build)
44+
runs-on: windows-latest
45+
steps:
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47+
with:
48+
persist-credentials: false
49+
- name: Install the pinned packaging toolchain
50+
shell: pwsh
51+
run: |
52+
$tools = Join-Path $env:RUNNER_TEMP 'craft-install-policy-wix'
53+
dotnet tool install --tool-path $tools wix --version 5.0.2
54+
if ($LASTEXITCODE -ne 0) { throw 'WiX installation failed.' }
55+
$tools >> $env:GITHUB_PATH
56+
$policy = Get-Content -Raw -LiteralPath packaging/windows/install-policy.json | ConvertFrom-Json
57+
foreach ($extension in @($policy.extensions)) {
58+
& (Join-Path $tools 'wix.exe') extension add -g "WixToolset.$extension.wixext/5.0.2"
59+
if ($LASTEXITCODE -ne 0) { throw "WiX extension $extension installation failed." }
60+
}
61+
- name: Build and check non-executable installer fixtures
62+
shell: pwsh
63+
run: ./packaging/windows/test-install-policy.ps1 -OutputDirectory (Join-Path $env:RUNNER_TEMP 'craft-install-policy-tests')

0 commit comments

Comments
 (0)