Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
6.0 KiB
25 — Rewrite notes and idiosyncrasies
The new ICCery is not Tauri. Keep the product name, cone artwork, unmanaged-print semantics, and Argyll process boundary.
Four different meanings of -d
| Tool | -d means |
|---|---|
targen |
colourant combination (2 RGB, 4 CMYK) |
printtarg |
custom label string (fork) |
iccgamut |
surface density (number, e.g. 10) |
colprof |
output viewing condition |
Passing the wrong -d is the #1 class of silent misconfiguration (#112).
Flags that look similar
- printtarg
-r= no randomize / raster layout; targen-r= full-spread algorithm - printtarg
-R seedvs targen-Ralgorithm - applycal
-u= unapply curves, not JSON - chartread
-Y l(letter L) = LEDs; original ticket proposed-L
JSON prefixes are inconsistent (fork)
| Tool | -u stdout |
|---|---|
chartread |
ROW_COLORS_JSON: + compact JSON |
printtarg |
pretty-printed bare JSON manifest |
profcheck |
one compact bare JSON line |
targen / colprof |
compact JSON (fork) — ICCery currently does not pass -u |
instlist |
pretty JSON, no -u needed |
Only chartread lines are intercepted by ProcessManager. Manifest/profcheck JSON arrives as process:stdout and must be parsed from the accumulator.
Windows musts
CREATE_NO_WINDOW(0x08000000) on every Argyll spawn.execandidate first (resolve_binary).icmdefault extension- GDI
SetICMMode(ICM_OFF)+DMICMMETHOD_NONE - Cache full DEVMODE bytes from DocumentProperties (#36) — applying fields onto a fresh DEVMODE drops driver extras
- Hide CUPS checkbox (
#cupsOptionsGroup) - PeekNamedPipe fork +
ARGYLL_NOT_INTERACTIVE=1 - TIFF→PNG in host, not in the webview
macOS musts
- Preferences = NSPrintPanel on the AppKit main thread, never System Settings URL, never cupsctl web UI (#188 comments 1–5)
PMPrinterCreateFromPrinterID(CUPS id)thendisplay_name→NSPrinter::printerWithName- Private SPI via
dlsym: 2-argument(PMPrintSession, *const CFString) -> i32. Passing integer1as a lock flag SIGSEGV. Try Lock, then Mode, then NoLock. Modes:AP_ApplicationColorMatchingthenApplicationColorMatchingonly - Dual keys
AP_ColorMatchingModeand dottedAP.ColorMatchingMode - Mirror into
NSPrintInfo.printSettingsdictionary (PDEs read this) - Pre-select Canon
CNIJIntent2=4, EpsonEPIJ_CMat=3(orEPIJ_CCor=0), GutenprintStpColorCorrection=Uncorrected lpalways includes both AP_* options + captured cups_options + bypass if missing- Cancel =
Ok(None), not an error - Dark WKWebView:
drawsBackground=NO, under-page colour, window hidden until paint minimumSystemVersion12.0- Ad-hoc sign Argyll Mach-O sidecars on Apple Silicon (#165)
- TargetPrint companion uses different ColorSync keys (
APCustomColorMatching). Do not mix the two dictionaries.
Linux musts
lpnotlpr- Default
-o raw; fallbackColorModel=Gray+cm-calibrationif#chkPpdFallback - Enumerate
lpstat -e/-p/-d+lpoptions -p -l+/etc/cups/ppd/{name}.ppd
Frontend musts
- No WebGL until Stage 5 visible; pause rAF on leave; survive context lost
iccgamut -d 10density- Average snapshots delete canonical
.ti3 - Open dialogs for import; save dialogs only when saving
- No
innerHTMLfor user-supplied preset/dataset names - Atomic history writes
- Deterministic printtarg
-R 1 - Honour patch count
-f
Suggested characterisation tests (from tickets)
Lock these before rewriting UI:
build_*_argsgolden vectors (already in Rust unit tests — port them)classifyChartreadLine39 casesparseGamutFilemulti-BEGIN_DATA, comments, OOB verticesparseProfcheckReportJSON + legacy + empty→warning- Color bypass detector: Canon/Epson/Gutenprint samples
filter_cups_options_stringdropscom.apple.*, keepsEPIJ_CMatbuild_lp_argsalways emits both AP_* keys- Threshold validation
good < warning snapshot_ti31-based and removes canonical- DEVMODE round-trip size
Host command list (complete)
From lib.rs generate_handler! — a rewrite should provide equivalents with the same argument names (Tauri command arguments are camelCase at the IPC boundary, Rust fields snake_case inside structs).
Process / platform
spawn_process, send_stdin, kill_process, kill_all_processes, resolve_binary, get_app_info, get_os_info, show_main_window, get_default_working_dir, get_log_path, get_recent_log_excerpt, log_frontend_message, open_log_dir
Files / dialogs
select_existing_target, select_profile_file, select_spectrum_file, select_dataset_file, select_target_file, select_directory, select_csv_save_path, read_file_base64, read_tiff_preview_png, parse_ti2_header
Wizard / Argyll
detect_instruments, get_profile_path, verify_stage_artefacts, extract_gamut, run_targen, run_printtarg, run_chartread, snapshot_ti3, promote_ti3, run_average, run_colprof, run_profcheck
get_printers, get_printer_capabilities, show_printer_properties, print_target_native
Calibration (9)
generate_calibration_target, compute_calibration_curves, apply_calibration, parse_cal_file_cmd, list_saved_calibrations, save_calibration_to_library, select_cal_file, load_project_calibration, save_project_calibration
Profile install
install_profile_to_system, get_profile_install_dir
Quality store (4)
save_verification_record, get_verification_history, clear_verification_history, export_verification_history_csv
Settings / presets (7)
load_settings, save_settings, get_all_presets, save_preset, delete_preset, export_preset_json, import_preset_json
CGATS
import_measurement_dataset, export_measurement_dataset, inspect_dataset_preview
Licence / AGPL
GUI: proprietary EULA (LICENCE.md). Argyll sidecars: AGPLv3, subprocess-only. Third-party: Three.js r128 MIT, OrbitControls, CSS2DRenderer, quickhull. Rewrite may swap the renderer but must not link Argyll.