Skip to content

Commit 1b3164e

Browse files
committed
[eoyilmaz#552] Harden Argyll setup flow and 3.5.0 docs integration
Combine Argyll setup and GUI robustness updates with the ArgyllCMS 3.5 integration/docs refresh into a single cohesive changeset for easier review and release tracking.
1 parent c420048 commit 1b3164e

24 files changed

Lines changed: 12257 additions & 1317 deletions

CHANGES.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,72 @@ <h4>Fixed in this release:</h4>
6363
</li>
6464
</ul>
6565

66+
<h4>Release highlights since 2022-04-01:</h4>
67+
68+
<p><strong>2025-04-02 - DisplayCAL 3.9.15</strong></p>
69+
<ul>
70+
<li>
71+
<span class="changelog-label moderate"><span>[</span>Moderate<span>]</span></span>
72+
Windows startup and executable launch reliability fixes, including handling for paths with spaces and frozen-environment launch variables.
73+
</li>
74+
<li>
75+
<span class="changelog-label minor"><span>[</span>Minor<span>]</span></span>
76+
macOS splash-screen rendering fix and improved Windows installer/driver handling.
77+
</li>
78+
<li>
79+
<span class="changelog-label moderate"><span>[</span>Moderate<span>]</span></span>
80+
Stability fixes for profile loader and 3D view/reporting edge cases.
81+
</li>
82+
</ul>
83+
84+
<p><strong>2025-05-04 - DisplayCAL 3.9.16</strong></p>
85+
<ul>
86+
<li>
87+
<span class="changelog-label enhancement"><span>[</span>Enhancement<span>]</span></span>
88+
Dropped Python 3.8 support and aligned project metadata/build tooling with current Python packaging expectations.
89+
</li>
90+
<li>
91+
<span class="changelog-label enhancement"><span>[</span>Enhancement<span>]</span></span>
92+
Package naming and CI workflow improvements for more reliable test/build automation.
93+
</li>
94+
<li>
95+
<span class="changelog-label moderate"><span>[</span>Moderate<span>]</span></span>
96+
Fixed recursion and menu-flow issues around ArgyllCMS detection and instrument configuration install paths.
97+
</li>
98+
</ul>
99+
100+
<p><strong>2025-09-11 - DisplayCAL 3.9.17</strong></p>
101+
<ul>
102+
<li>
103+
<span class="changelog-label moderate"><span>[</span>Moderate<span>]</span></span>
104+
Corrected black point correction handling so the <code>-b</code> argument flow is respected during calibration preparation.
105+
</li>
106+
<li>
107+
<span class="changelog-label enhancement"><span>[</span>Enhancement<span>]</span></span>
108+
Added support for ArgyllCMS 3.4 observer naming updates (CIE 2015 names).
109+
</li>
110+
<li>
111+
<span class="changelog-label moderate"><span>[</span>Moderate<span>]</span></span>
112+
Startup and runtime reliability fixes, including UTF-8 decode and madVR integration issues.
113+
</li>
114+
</ul>
115+
116+
<p><strong>Post-3.9.17 development (ongoing)</strong></p>
117+
<ul>
118+
<li>
119+
<span class="changelog-label enhancement"><span>[</span>Enhancement<span>]</span></span>
120+
Ongoing Python 3.14 compatibility and packaging modernization work.
121+
</li>
122+
<li>
123+
<span class="changelog-label enhancement"><span>[</span>Enhancement<span>]</span></span>
124+
Expanded ArgyllCMS compatibility work for 3.5.0, including newer archive/platform handling (Windows ARM64 and macOS ARM64) and related UI/docs updates.
125+
</li>
126+
<li>
127+
<span class="changelog-label minor"><span>[</span>Minor<span>]</span></span>
128+
Broad linting, refactoring, and translation/documentation maintenance across the codebase.
129+
</li>
130+
</ul>
131+
66132
<p id="changelog-3.8.9.2">2019-12-12 22:33 (UTC) 3.8.9.2 </p>
67133
<h3>DisplayCAL 3.8.9.2 </h3>
68134

DisplayCAL/argyll.py

Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,35 @@ def prompt_argyll_dir(
194194
return argyll_dir
195195

196196

197+
def get_homebrew_argyll_bin() -> None | str:
198+
"""Return Homebrew ArgyllCMS bin directory on macOS if available."""
199+
if sys.platform != "darwin":
200+
return None
201+
brew = which("brew") or which("brew", ["/opt/homebrew/bin", "/usr/local/bin"])
202+
if not brew:
203+
return None
204+
for formula in ("argyll-cms", "argyllcms"):
205+
try:
206+
result = sp.run(
207+
[brew, "--prefix", formula],
208+
check=False,
209+
capture_output=True,
210+
text=True,
211+
timeout=10,
212+
)
213+
except (OSError, ValueError, sp.SubprocessError):
214+
continue
215+
if result.returncode != 0:
216+
continue
217+
prefix = (result.stdout or "").strip()
218+
if not prefix:
219+
continue
220+
bin_dir = os.path.join(prefix, "bin")
221+
if check_argyll_bin([bin_dir]):
222+
return bin_dir
223+
return None
224+
225+
197226
def set_argyll_bin(
198227
parent: wx.Window = None,
199228
silent: bool = False,
@@ -226,21 +255,35 @@ def set_argyll_bin(
226255
parent = None if parent and not parent.IsShownOnScreen() else parent
227256
argyll_dir = prompt_argyll_dir(parent, callafter, callafter_args)
228257
if parent and not check_argyll_bin():
229-
dlg = wx.MessageDialog(
258+
choices = [("download", lang.getstr("download")), ("browse", lang.getstr("browse"))]
259+
brew_argyll_bin = get_homebrew_argyll_bin()
260+
if brew_argyll_bin:
261+
choices.append(
262+
(
263+
"homebrew",
264+
lang.getstr(
265+
"argyll.use_homebrew",
266+
brew_argyll_bin,
267+
),
268+
)
269+
)
270+
dlg = wx.SingleChoiceDialog(
230271
parent,
231272
lang.getstr("dialog.argyll.notfound.choice"),
232273
APPNAME,
233-
style=wx.YES_NO | wx.CANCEL | wx.CANCEL_DEFAULT | wx.ICON_QUESTION,
274+
[label for _, label in choices],
275+
style=wx.CHOICEDLG_STYLE,
234276
)
235-
if hasattr(dlg, "SetYesNoCancelLabels"):
236-
dlg.SetYesNoCancelLabels(
237-
lang.getstr("download"),
238-
lang.getstr("browse"),
239-
lang.getstr("cancel"),
240-
)
277+
dlg.SetSelection(0)
241278
dlg_result = dlg.ShowModal()
279+
selected = dlg.GetSelection()
242280
dlg.Destroy()
243-
if dlg_result == wx.ID_YES:
281+
if dlg_result != wx.ID_OK:
282+
if callafter:
283+
callafter(*callafter_args)
284+
return False
285+
action = choices[selected][0] if selected >= 0 else "browse"
286+
if action == "download":
244287
# Download Argyll CMS
245288
from DisplayCAL.display_cal import app_update_check
246289

@@ -254,10 +297,18 @@ def set_argyll_bin(
254297
bitmap=get_icon(size=32, name="dialog-error"),
255298
)
256299
return False
257-
if dlg_result == wx.ID_CANCEL:
258-
if callafter:
259-
callafter(*callafter_args)
260-
return False
300+
if action == "homebrew" and brew_argyll_bin:
301+
verbose_print(
302+
"Using Homebrew Argyll binary directory:",
303+
brew_argyll_bin,
304+
verbose_level=3,
305+
)
306+
setcfg("argyll.dir", brew_argyll_bin)
307+
# Always write cfg directly after setting Argyll directory so
308+
# subprocesses that read the configuration will use the right
309+
# executables
310+
writecfg()
311+
return True
261312
dlg = wx.DirDialog(
262313
parent,
263314
lang.getstr("dialog.set_argyll_bin"),

DisplayCAL/argyll_names.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"oeminst",
3232
"profcheck",
3333
"spec2cie",
34+
"specplot",
3435
]
3536

3637
# Argyll CMS tools optionally used by DisplayCAL
@@ -41,6 +42,7 @@
4142
"ccxxmake",
4243
"i1d3ccss",
4344
"oeminst",
45+
"specplot",
4446
"spec2cie",
4547
"spyd2en",
4648
"spyd4en",

DisplayCAL/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,7 @@ def optionxform(self, optionstr: str) -> str:
16691669
"extra_args.colprof": "",
16701670
"extra_args.dispcal": "",
16711671
"extra_args.dispread": "",
1672+
"extra_args.specplot": "",
16721673
"extra_args.spotread": "",
16731674
"extra_args.targen": "",
16741675
"gamap_default_intent": "p",
@@ -1692,6 +1693,7 @@ def optionxform(self, optionstr: str) -> str:
16921693
"last_icc_path": "",
16931694
"last_launch": "99", # Version
16941695
"last_reference_ti3_path": "",
1696+
"last_specplot_path": "",
16951697
"last_ti1_path": "",
16961698
"last_ti3_path": "",
16971699
"last_vrml_path": "",

0 commit comments

Comments
 (0)