From 1ddbf369ecf219c5c634254869513af5f4a71c12 Mon Sep 17 00:00:00 2001 From: Josh Wren Date: Sat, 8 Aug 2026 13:14:06 -0500 Subject: [PATCH 1/3] Fix cask DSL deprecation and document brew trust Homebrew 6 warns that 'depends_on macos: ">= :big_sur"' is deprecated and prints a report-this-issue notice on every tap; the symbol form already means 'at least'. Confirmed with 'brew info --cask', which now reports 'macOS >= 11' cleanly. Homebrew 6 also refuses to load casks from an untrusted third-party tap, so the documented install needs a 'brew trust' step or it fails outright. --- README.md | 5 +++++ scripts/update-cask.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6c6f1e..130e01c 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,14 @@ libraries. Alpine Linux and musl-based systems are unsupported. ```bash brew tap JoshCLWren/tap +brew trust joshclwren/tap brew install --cask cdisplayagain ``` +Homebrew 6 refuses to load casks from a third-party tap until you trust it, +which is why the `brew trust` line is there. Trust the single cask instead of +the whole tap with `brew trust --cask joshclwren/tap/cdisplayagain`. + The cask installs the same notarization-free bundle the release workflow publishes for Apple silicon. Intel Macs get no release asset; build from source with `make install` instead. Because the app is ad-hoc signed rather than diff --git a/scripts/update-cask.sh b/scripts/update-cask.sh index 3f4f939..52eba27 100755 --- a/scripts/update-cask.sh +++ b/scripts/update-cask.sh @@ -57,7 +57,7 @@ cask "cdisplayagain" do # Only Apple silicon builds are published; Intel users build from source. depends_on arch: :arm64 - depends_on macos: ">= :big_sur" + depends_on macos: :big_sur # package-macos.sh zips a versioned parent directory holding the bundle # alongside install.sh and the license, so the app is one level down. From 6424f59e702a37d9cb3090c86aa35ba873161ba8 Mon Sep 17 00:00:00 2001 From: Josh Wren Date: Sat, 8 Aug 2026 13:18:20 -0500 Subject: [PATCH 2/3] Lead the README with platform install instructions The install section opened with a Linux-only release archive and buried macOS under a build-from-source heading, which no longer matches reality now that a cask exists. Add a platform table up front, put the Homebrew path first with its trust step, opening a comic, and upgrade/uninstall verbs, and fold the duplicate Homebrew section that had accumulated below it. --- README.md | 71 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 130e01c..9a11e04 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,51 @@ viewer without wrestling dated IDEs or registry quirks. ### Installation +Every route gives you a self-contained app with `.cbz`/`.cbr` double-click +support and no Python installation to manage. + +| Platform | Install | +| --- | --- | +| macOS (Apple silicon) | `brew install --cask cdisplayagain` (see below for the two setup lines) | +| Linux (x86-64) | Download the release archive, run `./install.sh` | +| Anything else | Build from source with `make install` | + +#### macOS via Homebrew + +```bash +brew tap JoshCLWren/tap +brew trust joshclwren/tap +brew install --cask cdisplayagain +``` + +Homebrew refuses to load casks from a third-party tap until you trust it, which +is what the middle line does. It is a one-time decision per machine, and you can +scope it to this cask alone with +`brew trust --cask joshclwren/tap/cdisplayagain`. + +Then open any comic: + +```bash +open ~/Comics/issue.cbz +``` + +Or double-click a `.cbz`/`.cbr` in Finder, which works because the installer +registers the app as their default handler. + +Upgrade and removal are the usual Homebrew verbs: + +```bash +brew upgrade --cask cdisplayagain +brew uninstall --cask cdisplayagain +``` + +The cask ships the Apple silicon build the release workflow publishes. It is +ad-hoc signed rather than notarized, since notarization requires a paid Apple +Developer account, so Homebrew's quarantine flag is cleared during install; the +[tap README](https://github.com/JoshCLWren/homebrew-tap) explains how to handle +that yourself instead. Intel Macs have no published asset and should build from +source, which sidesteps quarantine entirely. + #### Linux release (Linux x86-64) Download the latest Linux release archive from GitHub. No Python installation @@ -49,9 +94,8 @@ data directory. Uninstall with `./install.sh --uninstall` from the extracted release directory. `PREFIX`, `HOME`, and `XDG_DATA_HOME` can override these locations for testing or custom user-local layouts. -Only Linux x86-64 release downloads are currently provided. Packaged Windows -and macOS releases are not yet available; macOS users build the app locally -with `make build && make install` (see below). +Linux downloads are x86-64 only. macOS is published as an Apple silicon app +bundle (see above); Windows has no packaged release yet. Release builds are produced in Ubuntu 22.04 (glibc 2.35), the oldest verified distribution baseline, and compatibility checks run the same archive on @@ -63,27 +107,6 @@ bundle includes its Python, Pillow, pyvips/libvips, unrar, and Tk runtime components; it requires a glibc-based Linux x86-64 system with the usual X11 libraries. Alpine Linux and musl-based systems are unsupported. -#### macOS via Homebrew - -```bash -brew tap JoshCLWren/tap -brew trust joshclwren/tap -brew install --cask cdisplayagain -``` - -Homebrew 6 refuses to load casks from a third-party tap until you trust it, -which is why the `brew trust` line is there. Trust the single cask instead of -the whole tap with `brew trust --cask joshclwren/tap/cdisplayagain`. - -The cask installs the same notarization-free bundle the release workflow -publishes for Apple silicon. Intel Macs get no release asset; build from source -with `make install` instead. Because the app is ad-hoc signed rather than -notarized, and Homebrew quarantines every cask download, the cask clears the -quarantine flag on install. See the -[tap README](https://github.com/JoshCLWren/homebrew-tap) if you would rather -handle that yourself with `--no-quarantine`. Building from source avoids the -question entirely, since a locally built app is never quarantined. - #### macOS app bundle (build from source) Build a real `cdisplayagain.app` from a clone and install it, so `.cbz`/`.cbr` From 26f4541f9b996d2dd43c1c580854e26163e2f292 Mon Sep 17 00:00:00 2001 From: Josh Wren Date: Sat, 8 Aug 2026 13:25:34 -0500 Subject: [PATCH 3/3] Make a cask install do everything install-macos.sh does A cask install moved the app and cleared quarantine, but never registered with Launch Services, never set the default handlers, and never refreshed Finder's icon cache. Local testing hid this: earlier 'make install' runs had already set those, so only a new user would have found .cbz not opening on double-click. The cask now depends on duti and repeats the installer's registration, handler assignment, and icon-cache refresh. Every step is must_succeed: false, since none of them should fail an otherwise good install. --- scripts/update-cask.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/scripts/update-cask.sh b/scripts/update-cask.sh index 52eba27..f58d430 100755 --- a/scripts/update-cask.sh +++ b/scripts/update-cask.sh @@ -58,17 +58,43 @@ cask "cdisplayagain" do # Only Apple silicon builds are published; Intel users build from source. depends_on arch: :arm64 depends_on macos: :big_sur + # duti sets the default handlers below; without it a cask install would do + # strictly less than scripts/install-macos.sh and .cbz would not open on + # double-click for anyone whose Launch Services database already has a claim. + depends_on formula: "duti" # package-macos.sh zips a versioned parent directory holding the bundle # alongside install.sh and the license, so the app is one level down. app "cdisplayagain-#{version}-macos-arm64/cdisplayagain.app" - # The app is ad-hoc signed rather than notarized, so Gatekeeper blocks the - # quarantined copy Homebrew downloads until the flag is cleared. postflight do + installed = "#{appdir}/cdisplayagain.app" + + # The app is ad-hoc signed rather than notarized, so Gatekeeper blocks the + # quarantined copy Homebrew downloads until the flag is cleared. system_command "/usr/bin/xattr", - args: ["-dr", "com.apple.quarantine", "#{appdir}/cdisplayagain.app"], - sudo: false + args: ["-dr", "com.apple.quarantine", installed], + sudo: false, + must_succeed: false + + launch_services = "/System/Library/Frameworks/CoreServices.framework/Versions/A" + + "/Frameworks/LaunchServices.framework/Versions/A/Support" + system_command "#{launch_services}/lsregister", + args: ["-f", installed], + sudo: false, + must_succeed: false + + ["cbz", "cbr", "cbt", "cba"].each do |extension| + system_command "#{HOMEBREW_PREFIX}/bin/duti", + args: ["-s", "io.github.joshclwren.cdisplayagain", extension, "all"], + sudo: false, + must_succeed: false + end + + # Finder caches an icon against the bundle path and mtime, so a fresh + # install over a previous one otherwise keeps showing the stale icon. + system_command "/usr/bin/touch", args: [installed], sudo: false, must_succeed: false + system_command "/usr/bin/killall", args: ["Finder"], sudo: false, must_succeed: false end zap trash: [