You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "UncertaintyDeterminesYou4ndMe (via GitHub)" <gi...@apache.org> on 2026/10/21 06:46:13 UTC
[PR] feat(desktop): package the macOS desktop shell as Maka.app [maka]
UncertaintyDeterminesYou4ndMe opened a new pull request, #6208:
URL: https://github.com/apache/maka/pull/6208
On macOS the desktop window showed up as `maka-desktop-shell`, with the generic executable icon, in the Dock, the app switcher and the menu bar. macOS names a process after the bundle its executable is in, also when another process starts it directly, so the shell now runs from inside `Maka.app`. Layout agreed in #6078 (discussioncomment-19089554).
## macOS layout
- `build-cli` stages `Maka.app` beside `maka`: `Contents/MacOS/maka-desktop-shell`, `Contents/Resources/app/` (the shell already looks for `../Resources/app`), `Contents/Info.plist` (name, `id` and version from `app/gpui-shell.json`, with the keys gpui-shell's own `bundle` command writes) and `Contents/Resources/Maka.icns` (`assets/logo.png`, which already has the macOS icon margin, as one 1024-pixel entry that macOS scales). A failed staging leaves the previous bundle in place. The `app/` sidecar beside `maka` from earlier builds is removed; cargo's bare `maka-desktop-shell` stays.
- `maka desktop` starts `Maka.app/Contents/MacOS/maka-desktop-shell` beside itself. Spawning, `kill_on_drop` and the cancel path are unchanged. Only `just build` refreshes the bundle, so after rebuilding the shell with Cargo alone, `just build` is needed again (noted in the desktop-shell README).
- Opening `Maka.app` from Finder or Spotlight starts the shell without a Host, and the app reports `MAKA_HOST_ENDPOINT is not set`. `maka desktop` remains the way to start it.
- The `@maka-agent/cli-darwin-*` packages carry `bin/maka` and `bin/Maka.app/` instead of `bin/maka-desktop-shell` and `bin/app/`.
- Linux and Windows are unchanged.
## Package verification
`Target` names the desktop paths per target (`desktop_executable`, `desktop_app`, `desktop_tree`, `desktop_members`), and `archive.rs` derives its rules from them:
- On macOS the required members include `Info.plist` and `Maka.icns`, so the receipt records them and the cache and import checks verify them.
- Optional members, which may be empty, are accepted only inside the app directory.
- Directory entries are accepted only for parents of required members and for directories inside the app.
- `cached()` checks the whole `Maka.app` tree against the receipt, not only the app, because macOS reads more of a bundle than its `Info.plist`.
- A darwin package or cache entry in the old layout is refused, and older executables refuse the new layout. rust-preview keeps no compatibility here.
`release-cli` and `verify-release` run `--version` on the bundled shell, so the macOS jobs in `npm-publication.yml` build, pack, install and run the bundle. `ci.yml` runs on Linux and needs no change.
## Checked with a packed darwin-arm64 artifact
On macOS arm64, a release build packed with `pack-cli` (validated by `maka host fetch`) and installed with `npm install --offline` into a new directory:
- `bin/Maka.app/Contents/MacOS/maka-desktop-shell` kept its executable bit.
- `maka desktop --root …` started from an unrelated working directory opened the window with the bundled app.
- `lsappinfo` reports the name `Maka`, bundle id `org.apache.maka.desktop`, version `0.1.0` and the bundle path inside `node_modules`; the Dock shows the logo.
- SIGTERM to `maka desktop` ended the shell and the Host within about 3 s.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] feat(desktop): package the macOS desktop shell as Maka.app [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #6208:
URL: https://github.com/apache/maka/pull/6208#discussion_r4334913364
##########
products/maka/cli/src/distribution/target.rs:
##########
@@ -84,11 +84,42 @@ impl Target {
}
}
+ // On macOS the shell runs from inside `Maka.app`, so the system shows the
+ // bundle's name and icon for it.
pub fn desktop_executable(self) -> &'static str {
- if self == Self::Win32X64 {
- "bin/maka-desktop-shell.exe"
- } else {
- "bin/maka-desktop-shell"
+ match self {
+ Self::DarwinArm64 | Self::DarwinX64 => "bin/Maka.app/Contents/MacOS/maka-desktop-shell",
Review Comment:
P3: every pre-PR darwin binary requires `bin/maka-desktop-shell` and accepts only `bin/app/*`, so `maka upgrade` and the policy worker's `distribution::fetch` will refuse the first package with this layout ("invalid, duplicate, or oversized member"). No layout can satisfy both, and the break is disclosed, but please say in the release notes that macOS preview users need to reinstall through npm.
##########
scripts/rust/build-cli.mjs:
##########
@@ -82,10 +94,124 @@ export async function buildCli({
release ? 'release' : 'debug',
windows ? 'maka.exe' : 'maka',
);
- await stageDesktopApp(repositoryRoot, join(dirname(binary), 'app'));
+ const directory = dirname(binary);
+ if (triple.includes('-apple-darwin')) {
+ await stageDesktopBundle(
Review Comment:
P3: the bundle is a copy, so after `cargo build -p maka-desktop-shell` alone, `maka desktop` on macOS keeps running the old shell until `just build` runs again. The README documents this; noting it because before this PR the shell beside `maka` was the cargo output itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] feat(desktop): package the macOS desktop shell as Maka.app [maka]
Posted by "M4n5ter (via GitHub)" <gi...@apache.org>.
M4n5ter merged PR #6208:
URL: https://github.com/apache/maka/pull/6208
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org