Skip to content

Put automata on PATH from the installers - #117

Merged
thethinkmachine merged 1 commit into
mainfrom
feat/cli
Sep 30, 2026
Merged

thethinkmachine merged 1 commit into
mainfrom
feat/cli

Conversation

@thethinkmachine

Copy link
Copy Markdown
Owner

The installers now put the automata command line on PATH.

  • Windows: the NSIS installer adds resources\cli to the user's PATH, and the uninstaller removes it. It leaves PATH alone during an update. The PATH editing is in build/win/cli-path.ps1, which works on HKCU\Environment directly. That keeps %VAR% entries unexpanded and never truncates a long PATH.
  • Linux (.deb): installing links /usr/local/bin/automata, and removing the package takes the link away. An existing automata there is left alone. The scripts carry electron-builder's default steps, because a custom script replaces them.
  • macOS: the app menu gains Install and Uninstall 'automata' Command in PATH. They ask for a password only when needed, and refuse while the app is still running from the disk image.
  • Launcher: the POSIX launcher now follows symlinks itself, because readlink -f is missing before macOS 12.3.
  • CI: the Electron build installs the real Windows and .deb packages, runs automata from PATH, uninstalls, and checks it's gone. On macOS it runs the launcher through a chain of links.
  • Docs: docs/cli.md Install section updated.

Not covered by CI: the macOS menu items, which need a click on a real Mac.

- Windows: the NSIS installer adds resources\cli to the user's PATH and the
  uninstaller removes it (build/installer.nsh), skipping the removal during an
  update. The editing is done by build/win/cli-path.ps1 against HKCU\Environment
  directly, keeping %VARIABLE% entries unexpanded and the value's kind, never
  listing the folder twice, and removing only its own entry. NSIS itself would
  truncate a PATH longer than 1024 characters.
- Linux (.deb): after-install links /usr/local/bin/automata, after-remove takes
  it away; an automata already there is left alone. The scripts carry
  electron-builder's own defaults, which a custom script replaces.
- macOS: Install/Uninstall 'automata' Command in PATH in the app menu, linking
  /usr/local/bin/automata, with an admin prompt only when needed, and a refusal
  while the app runs translocated from the disk image.
- The POSIX launcher follows symlinks itself: readlink -f is missing before
  macOS 12.3.
- CI installs the real Windows and .deb packages, runs automata from PATH,
  uninstalls and checks it is gone; on macOS it runs the launcher through a
  chain of relative links.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 03:23
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@thethinkmachine
thethinkmachine merged commit f92c234 into main Sep 30, 2026
18 checks passed
@thethinkmachine
thethinkmachine deleted the feat/cli branch September 30, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants