From 45ed500fa24afb71e0e3b2f8e90eaa64b9143c70 Mon Sep 17 00:00:00 2001 From: pepaskopec-blip Date: Thu, 17 Sep 2026 18:27:43 +0200 Subject: [PATCH] Ship the macOS installer as a double-clickable app. A regular user can unzip and open it; install no longer needs Terminal or chmod. Co-authored-by: Cursor --- .github/workflows/build.yml | 6 +- Makefile | 8 +- README.md | 18 ++-- installers/macos/Info.plist | 26 ++++++ installers/maturita-installer-linux.sh | 9 +- installers/maturita-installer-linux.zip | Bin 1437 -> 1483 bytes installers/maturita-installer-macos.command | 94 +++++++++++++++----- installers/maturita-installer-macos.zip | Bin 1386 -> 3010 bytes installers/pack-installer-zips.sh | 26 ++++++ 9 files changed, 147 insertions(+), 40 deletions(-) create mode 100644 installers/macos/Info.plist create mode 100755 installers/pack-installer-zips.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 026b866..57df86c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,11 +158,11 @@ jobs: - name: Collect installers run: | + chmod +x installers/pack-installer-zips.sh + ./installers/pack-installer-zips.sh cp installers/maturita-installer-linux.sh staged/ cp installers/maturita-installer-windows.cmd staged/ - chmod +x installers/maturita-installer-macos.command - (cd installers && zip -q ../staged/maturita-installer-macos.zip \ - maturita-installer-macos.command) + cp installers/maturita-installer-*.zip staged/ # The updater downloads this to see whether it is behind. echo "${{ github.sha }}" > staged/VERSION diff --git a/Makefile b/Makefile index 00e1f3a..6d900a5 100644 --- a/Makefile +++ b/Makefile @@ -107,11 +107,11 @@ bundle: endif # Browsers render .command/.sh/.cmd as text/plain. Rebuild these zips after -# changing a script so the README download links stay in sync. +# changing a script so the README download links stay in sync. The macOS zip +# is a double-clickable .app — no Terminal, no chmod. installer-zips: - cd installers && zip -q -FS maturita-installer-macos.zip maturita-installer-macos.command - cd installers && zip -q -FS maturita-installer-windows.zip maturita-installer-windows.cmd - cd installers && zip -q -FS maturita-installer-linux.zip maturita-installer-linux.sh + chmod +x installers/pack-installer-zips.sh + ./installers/pack-installer-zips.sh -include $(DEP) diff --git a/README.md b/README.md index 7fcd7ad..ea11b44 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,13 @@ Instalátor samotnou aplikaci neobsahuje — při spuštění si dohledá aktuá commit větve `builds` a stáhne ten soubor, ne kešovanou kopii podle názvu větve. -**Nejjednodušší je instalátor pro vaši platformu** (soubory z `main`, ať -nedostanete starý skript z keše větve `builds`): +**Stáhni zip, rozbal ho a otevři instalátor.** Nic víc (žádný Terminál): | Platforma | Soubor | Jak spustit | | --------- | ------ | ----------- | -| macOS (Apple Silicon) | [maturita-installer-macos.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-macos.zip) | Rozbalit, v Terminálu `chmod +x maturita-installer-macos.command` a pak pravý klik → **Otevřít** | -| Windows (x64) | [maturita-installer-windows.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-windows.zip) | Rozbalit a dvojklik na `.cmd`; u SmartScreenu **Další informace → Přesto spustit** | -| Linux (x86_64) | [maturita-installer-linux.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-linux.zip) | Rozbalit a `sh maturita-installer-linux.sh` | +| macOS (Apple Silicon) | [maturita-installer-macos.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-macos.zip) | Rozbalit, pravý klik na **Nainstalovat maturita.C** → **Otevřít** | +| Windows (x64) | [maturita-installer-windows.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-windows.zip) | Rozbalit a dvojklik; u SmartScreenu **Další informace → Přesto spustit** | +| Linux (x86_64) | [maturita-installer-linux.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-linux.zip) | Rozbalit a dvojklik na instalátor | Kam se to nainstaluje: `/Applications` nebo `~/Applications` (macOS), `%LOCALAPPDATA%\Programs\Maturita` (Windows), `~/Applications` (Linux). @@ -159,14 +158,13 @@ whenever `main` changes. The installer carries no app of its own — it fetches the current `builds` commit when you run it, not a CDN-cached copy of the branch-named file. -**Start with the installer for your platform** (files from `main`, so you -do not get a stale script cached from the `builds` branch): +**Download the zip, unzip it, and open the installer.** No Terminal: | Platform | File | How to run | | -------- | ---- | ---------- | -| macOS (Apple Silicon) | [maturita-installer-macos.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-macos.zip) | Unzip, `chmod +x maturita-installer-macos.command` in Terminal, then right-click → **Open** | -| Windows (x64) | [maturita-installer-windows.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-windows.zip) | Unzip and double-click the `.cmd`; if SmartScreen appears, **More info → Run anyway** | -| Linux (x86_64) | [maturita-installer-linux.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-linux.zip) | Unzip, then `sh maturita-installer-linux.sh` | +| macOS (Apple Silicon) | [maturita-installer-macos.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-macos.zip) | Unzip, right-click **Nainstalovat maturita.C** → **Open** | +| Windows (x64) | [maturita-installer-windows.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-windows.zip) | Unzip and double-click; if SmartScreen appears, **More info → Run anyway** | +| Linux (x86_64) | [maturita-installer-linux.zip](https://github.com/pepaskopec-blip/maturita.c/raw/main/installers/maturita-installer-linux.zip) | Unzip and double-click the installer | Install locations: `/Applications` or `~/Applications` (macOS), `%LOCALAPPDATA%\Programs\Maturita` (Windows), `~/Applications` (Linux). diff --git a/installers/macos/Info.plist b/installers/macos/Info.plist new file mode 100644 index 0000000..abea478 --- /dev/null +++ b/installers/macos/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + cs + CFBundleExecutable + installer + CFBundleIdentifier + org.maturita.installer + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Nainstalovat maturita.C + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + LSMinimumSystemVersion + 12.0 + LSUIElement + + NSHighResolutionCapable + + + diff --git a/installers/maturita-installer-linux.sh b/installers/maturita-installer-linux.sh index 57254a5..e15372a 100755 --- a/installers/maturita-installer-linux.sh +++ b/installers/maturita-installer-linux.sh @@ -5,7 +5,7 @@ # raw.githubusercontent.com, so this script looks up the tip of `builds` # and downloads that commit — not a stale AppImage from the last five minutes. # -# Run it with: sh maturita-installer-linux.sh +# Double-click the file (or run: sh maturita-installer-linux.sh). # The app updates itself from then on. set -eu @@ -20,7 +20,12 @@ DESKTOP_DIR="$HOME/.local/share/applications" ICON_DIR="$HOME/.local/share/icons/hicolor/512x512/apps" say() { printf '%s\n' "$*"; } -die() { printf '\nError: %s\n' "$*" >&2; exit 1; } +die() { + printf '\nError: %s\n' "$*" >&2 + printf 'Press Enter to close. ' + read -r _ || true + exit 1 +} builds_sha() { curl -fsSL --max-time 20 \ diff --git a/installers/maturita-installer-linux.zip b/installers/maturita-installer-linux.zip index 22e83b911fba5fdd2c06ae2d6e55bb3888b48b22..20a8d94051efc1ffa1b46aa1d2303779e36c325f 100644 GIT binary patch delta 1388 zcmV-y1(W)n3(E@_P)h>@6aWAK2mo@EFQ2pO52tU<|at%YS_0zw+gih^s% zl!hZA>uE^V(5BCSv=-ceRKTjL5DBwFNl+OGYe3z}5I!uuusr zaAcU~5nFLM?4KOJXezMFCd%<&p>*`q_RbXloC7>a47=ax!8fS1kT!$v4`wX85Og+! zckoD3!QCzaeC8HoInY|^J!nl~e|=}g=2UZIV1UDarNJsl3T1c*U2mf~OMz;*f`{aDk}0^#ESQ5H!;j zz~wtX!#+MX1_C9K?#(VVr~&pHDrAu`IZt2Xs%A9rh~n@ScDLZNEkf0ZlCMC2 zV9nnJ!pIAT;Y0Us-JUI<9nP9 zoDAf%fh0aIZ)M38X%;cG& zS}7a-?=V5*&r#n)zIYwQJTQww3Vvz&!scVf$n)}*)?6~Rc z|H+f~md8thm1HpGN$i_Th7RxfE*Wu+pAW2vGgcT*`bfxYh#TPbVhCh+7^>vTbO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NDRu~o(UXGtS-$EJ(LxLiKk?sz5->eown zRdVy|0>_3I@BZq`Hb^4ujnjzv`}c#>kL2>O`3?i+%>5M^-IpR-x~<3w`dZYwA@LTA z8h?n+{Ags{+_(OhiDzH`PZ76wG~NolAcLuhqk6bx=<%Mfl94cY*Yi9|d2R*iqad%f z|3woGlB&tRM|_RTUe(;}Y}N(CFMPtScw%4c>orm@ZC^#~IrDR-5;JYkxv-T8;KFg^ zYMC^@HEI>l$@`=V@-I+J0RkQa6aWAK2oC@TlQCUa#(&2; printf 'Press Return to close. '; read -r _; exit 1; } +# An .app has no TTY; show dialogs so a regular user never needs Terminal. +GUI=0 +if [ ! -t 1 ] && command -v osascript >/dev/null 2>&1; then + GUI=1 +fi + +say() { printf '%s\n' "$*"; } + +gui_dialog() { + osascript - "$1" <<'APPLESCRIPT' +on run argv + display dialog (item 1 of argv) with title "maturita.C" buttons {"OK"} default button 1 +end run +APPLESCRIPT +} + +gui_alert() { + osascript - "$1" <<'APPLESCRIPT' +on run argv + display dialog (item 1 of argv) with title "maturita.C" buttons {"OK"} default button 1 with icon stop +end run +APPLESCRIPT +} + +die() { + if [ "$GUI" = 1 ]; then + gui_alert "$*" >/dev/null || true + else + printf '\nChyba: %s\n' "$*" >&2 + printf 'Stiskněte Return. ' + read -r _ || true + fi + exit 1 +} -# Atom feed of the builds branch: curl only, no GitHub API token. builds_sha() { curl -fsSL --max-time 20 \ "https://github.com/$REPO/commits/$BRANCH.atom" | @@ -24,16 +55,24 @@ builds_sha() { head -n 1 } -say "Installing maturita.C" -say "---------------------" +if [ "$GUI" = 1 ]; then + if ! osascript <<'APPLESCRIPT' +display dialog "Nainstalovat maturita.C do složky Aplikace? Stáhne se aktuální verze." with title "maturita.C" buttons {"Zrušit", "Instalovat"} default button "Instalovat" +APPLESCRIPT + then + exit 0 + fi +else + say "Installing maturita.C" + say "---------------------" +fi arch=$(uname -m) if [ "$arch" != "arm64" ]; then - die "this build is for Apple Silicon Macs, but this one reports '$arch'. -Build from source instead: https://github.com/$REPO" + die "Tento instalátor je pro Mac s čipem Apple. Tento počítač hlásí '$arch'." fi -command -v curl >/dev/null 2>&1 || die "curl was not found." +command -v curl >/dev/null 2>&1 || die "Na Macu chybí curl, bez něj nejde nic stáhnout." if [ -w /Applications ]; then dest_dir="/Applications" @@ -45,24 +84,33 @@ fi tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT INT TERM -say "Looking up the latest build..." +if [ "$GUI" = 1 ]; then + osascript <<'APPLESCRIPT' >/dev/null || true +display notification "Stahuji aktuální verzi…" with title "maturita.C" +APPLESCRIPT +fi + sha=$(builds_sha) -[ ${#sha} -eq 40 ] || die "could not find the latest build on GitHub." +[ ${#sha} -eq 40 ] || die "Nepodařilo se najít aktuální verzi na GitHubu." URL="https://raw.githubusercontent.com/$REPO/$sha/$ASSET" -say "Downloading build $(printf '%.7s' "$sha")..." -curl -fL --progress-bar --max-time 1800 -o "$tmp/$ASSET" "$URL" || - die "the download failed. Check your internet connection." +if [ "$GUI" = 1 ]; then + curl -fsSL --max-time 1800 -o "$tmp/$ASSET" "$URL" || + die "Stažení se nezdařilo. Zkontrolujte internet a zkuste to znovu." +else + say "Downloading build $(printf '%.7s' "$sha")..." + curl -fL --progress-bar --max-time 1800 -o "$tmp/$ASSET" "$URL" || + die "Stažení se nezdařilo. Zkontrolujte internet a zkuste to znovu." + say "Unpacking..." +fi -say "Unpacking..." mkdir -p "$tmp/new" -ditto -x -k "$tmp/$ASSET" "$tmp/new" || die "the archive could not be unpacked." +ditto -x -k "$tmp/$ASSET" "$tmp/new" || die "Archiv se nepodařilo rozbalit." app=$(find "$tmp/new" -maxdepth 1 -name '*.app' -print -quit) -[ -n "$app" ] || die "the archive did not contain an application." +[ -n "$app" ] || die "V archivu není žádná aplikace." name=$(basename "$app") -say "Installing to $dest_dir/$name" rm -rf "$dest_dir/$name.old" if [ -e "$dest_dir/$name" ]; then mv "$dest_dir/$name" "$dest_dir/$name.old" @@ -71,11 +119,15 @@ if mv "$app" "$dest_dir/$name"; then rm -rf "$dest_dir/$name.old" else [ -e "$dest_dir/$name.old" ] && mv "$dest_dir/$name.old" "$dest_dir/$name" - die "could not write to $dest_dir." + die "Do $dest_dir se nepodařilo zapsat." fi xattr -cr "$dest_dir/$name" 2>/dev/null || true -say "" -say "Done. Starting the app..." +if [ "$GUI" = 1 ]; then + gui_dialog "Hotovo. Aplikace se teď otevře." >/dev/null || true +else + say "" + say "Done. Starting the app..." +fi open "$dest_dir/$name" diff --git a/installers/maturita-installer-macos.zip b/installers/maturita-installer-macos.zip index 464c63f6a6abe4973e09822ec075c0cc1773b820..86806c937d4bda0df872d0cf26960f5fd94173d7 100644 GIT binary patch literal 3010 zcmbW3c{G%5AIE1bV`oTVl&DC^zOM<{m&Tg4;U#1@gDA|{qo%QCEFn^u${HTa5My5x zWy@GfgCW@;%FEO9zSVh8%k$pXx$pbB{Rd1J|z`B;NbB~lCb-0^Y`Z{ z;3&Wd=H}%Ohk1Ahz~H=|FgU``4Gt645QX{ph?$$w0VucFaqb5%B8UM1q*@08095Sz z_f39SmH!u2HN3sx&R%f;|FgXC@0K@&IT@S&5^~TB?O&78JFKoM0RjLFm;nIke+Kz7 zLJw!ZpG~aCvIoko4Q^OAm5xAx-%g|mT84UbouNLYK>*Qr6t<*x@sMx#=L~fRyI6#a zn}-4|MQf`4rV}$9nmCAByQfIl6bm+5p(;%pdTEu3Pl&Kj>m_yU0oAmKKAUKu40bvi z#OjmFWXM*KBYc=gv$m(v=0XNj5&IQLBvpC=9s1D}G<=al4l;|OC0;2q^rK+C73})@ zqM4?OLq9Nnitt%Vn(e*zKprtX!+y9!+7!bcO?ODs&xfUgYH$Vu&ku6v#gske(_hgC zML(1s9y4l9vchX=o3((Q#x-A9G+k?g%U$KNarh^2nL>MmwRTa-RD(H#pzW>M< z0p!5K6k|3uU9uv#St%BjYK;V@siauIXK{{aZQbqemFNMK*sKk5DbuTS(ikkFOVbF* zIX9QaE7&=*_Y!$nw-Z{lBk7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ccjLOY^dLJw{`mTWuEmGsmHQ)gSYx9%iKEev0UK$biKrD z>Q9c{TkiDzL=+EaMdFXy9oJqyJ^H|RMz@A~1*7HRkQX9~EM7u}v9;A$b6r<)eHuE2Un z>$T5f|EgS1*0(qF-O=3`Xxj9?QIO;5?UoZaeB@?G?A^Hi#z*;Ek8_?zN9gBOu2Jy;1=IT}`EPY}lzttxc>7rQ(zoO@EYF{WWqv(d$slXIch$ak>*w+XTwP$Q-&UWv zc*VNuS52RCbGP*@OkO59=ZTE&7tU}#@pDDGJB`ycDd1Rd&-(>$R;J4MC_iDe)gI-8RdOl?HuS_j|(eyvY zafftbM#or5`J#^g}E8 V0=!w-K>8VhFbzn*1D2=^3;-4$ZGr#* diff --git a/installers/pack-installer-zips.sh b/installers/pack-installer-zips.sh new file mode 100755 index 0000000..37c91c6 --- /dev/null +++ b/installers/pack-installer-zips.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# Rebuild the three installer zips that README links to. Browsers download a +# zip; they render .command / .sh / .cmd as a text tab. + +set -eu + +cd "$(dirname "$0")" +here=$PWD + +chmod +x maturita-installer-macos.command maturita-installer-linux.sh + +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT INT TERM + +app="$tmp/Nainstalovat maturita.C.app" +mkdir -p "$app/Contents/MacOS" +cp macos/Info.plist "$app/Contents/Info.plist" +cp maturita-installer-macos.command "$app/Contents/MacOS/installer" +chmod +x "$app/Contents/MacOS/installer" + +rm -f "$here/maturita-installer-macos.zip" +(cd "$tmp" && zip -r -q "$here/maturita-installer-macos.zip" \ + "Nainstalovat maturita.C.app") + +zip -q -FS maturita-installer-windows.zip maturita-installer-windows.cmd +zip -q -FS maturita-installer-linux.zip maturita-installer-linux.sh