mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3705] [Other] Mac: double-click launchers from source (START-HERE.command, SETUP/UPDATE/BENCH.command) #4754
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4754
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3705
Author: @OakRoller
Created: 10/22/2026
Status: 🔄 Open
Base:
main← Head:claude/practical-volta-drwpek📝 Commits (2)
f3e65bcMac: one-click install from source (START-HERE.command, SETUP/UPDATE/BENCH.command), the .bat files' counterpartse3ed984Mac docs: the source-zip links beside START-HERE.command point at Niko1221/Strata, where the launchers go📊 Changes
12 files changed (+263 additions, -12 deletions)
View changed files
📝
.gitattributes(+1 -0)➕
BENCH.command(+18 -0)📝
README.md(+8 -3)📝
README.zh-CN.md(+6 -2)➕
SETUP.command(+3 -0)➕
START-HERE.command(+24 -0)➕
UPDATE.command(+24 -0)📝
docs/INSTALL.md(+6 -3)📝
docs/MAC.md(+9 -2)📝
setup.sh(+6 -0)➕
tools/test_mac_launchers.py(+152 -0)📝
update.sh(+6 -2)📄 Description
Problem and result
On a Mac the source install was terminal-only:
./setup.shtyped in a Terminal window. Windows hasSTART-HERE.bat,SETUP.bat,UPDATE.batandBENCH.batfor people who do not want a terminal; a Mac had nocounterpart. Two smaller things on the same path: an Intel Mac ran
setup.shuntil the arm64 standalone Python ithad just downloaded failed to start, with no word about the chip; and
update.shtold a Mac without git to useapt.After: four
.commandfiles beside the.batfiles. A double-click in Finder opens Terminal, runs the.shof thesame name from the Strata folder with the options passed on, and keeps the window open on an error so the reason
stays on screen.
setup.shtells an Intel Mac at once that the engine needs Apple Silicon and downloads nothing.update.shnamesxcode-select --installon a Mac. The default path on an Apple Silicon Mac is unchanged:./setup.shbehaves as before, the.commandfiles only call it.Related discussion
none (no new feature in the engine, no change to a default; the launchers mirror the existing
.batfiles)Approach
START-HERE.commandrunssh ./setup.sh "$@";SETUP.commandisSTART-HERE.command --setup;UPDATE.commandruns./update.sh;BENCH.commandruns./bench.sh. Eachcds to its own folder first(Terminal starts a double-clicked file in the home folder), refuses to run off a Mac with a pointer to the
.sh/.bat, and waits for Enter after an error.UPDATE.commandkeeps its body in a function, asupdate.shdoes, because the
git pullit starts can change the file while it runs.setup.sh: the Intel check isuname -s = Darwin,uname -m != arm64andsysctl hw.optional.arm64 != 1.The third term keeps a Rosetta terminal (which reports x86_64 on an Apple Silicon Mac) on the normal path.
.gitattributes:*.command text eol=lf, so a Windows checkout with autocrlf does not break the launchers.docs/INSTALL.md ("From source: Mac"), docs/MAC.md (the "two ways in" list and the Install section). They also
say what to do when macOS blocks a
.commandfile from a downloaded zip the first time (right-click, Open).Validation
Passed:
python -m unittest tools.test_mac_launchersatf3e65bc, Linux x86-64, Python 3.13: 11 tests OK. They copy thelaunchers next to stub
setup.sh/update.sh/bench.shand a stubuname/sysctl/curlon PATH, and check:the right script runs from its own folder with the options in order; the exit code is passed through and the
"Press Enter" prompt appears only on an error; a non-Mac is refused;
SETUP.commandprepends--setup; eachfile is LF, executable,
#!/bin/shand passessh -n; the realsetup.shstops an Intel Mac beforecurliscalled, and goes on (to the Python download) on arm64 and in a Rosetta terminal.
python tools/test_setup_mac.pyatf3e65bc, same machine: 26 tests OK (unchanged, run to show the Mac setuppath is untouched).
python tools/test_setup_update.py: 8 tests OK.sh -nonsetup.sh,update.shand the four.commandfiles: clean.Failed:
none observed
Not run:
on a zip download and the right-click-Open way around it, Terminal's window-closing behaviour after a clean exit,
and
sysctl hw.optional.arm64in a Rosetta terminal. The code paths are the sameshlines the tests run onLinux.
Limits
.commandfile from a downloaded zip is blocked by Gatekeeper once; the docs give the right-click step. Agit clonehas no quarantine mark. Signing the scripts is out of scope..commandopens Terminal, so the model still runs in a Terminal window (closing it stops the model, as the.batwindow does on Windows). It is not a.app; the.dmgremains the no-terminal way.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.