diff --git a/cmd/ssh-keyselect-gui/gui_history.go b/cmd/ssh-keyselect-gui/gui_history.go index 2b460b2..d858858 100644 --- a/cmd/ssh-keyselect-gui/gui_history.go +++ b/cmd/ssh-keyselect-gui/gui_history.go @@ -347,7 +347,7 @@ func (s *guiHistoryState) view(c *ui.Context) { table := ui.Table(c, &s.tableState, selectionHistoryColumns, len(events), func(row, column int) { event := events[row] cell := guitable.CompactCell(c, row, s.selectedRow, theme) - cell.ContextMenu(func(menu *ui.Menu) { + cell.PopoverMenu(func(menu *ui.Menu) { copyRow := menu.Item("Copy row").Shortcut(ui.Cmd, ui.KeyC).Disabled(s.deleting) if copyRow.Chosen() && !s.deleting { mygo.Clipboard.WriteText(selectionHistoryCopyText(event)) diff --git a/cmd/ssh-keyselect-gui/gui_status.go b/cmd/ssh-keyselect-gui/gui_status.go index 46d4d9c..4a5bf56 100644 --- a/cmd/ssh-keyselect-gui/gui_status.go +++ b/cmd/ssh-keyselect-gui/gui_status.go @@ -353,7 +353,7 @@ func (a *guiApp) identityCard(c *ui.Context, theme *ui.Theme) { a.identityTable.KeepOffset = true table := guitable.IdentityTable(c, &a.identityTable, rows, true, true). Grow(1).MinHeight(theme.Space(50)) - table.ContextMenu(func(menu *ui.Menu) { + table.PopoverMenu(func(menu *ui.Menu) { hasSelection := a.selectedIdentity >= 0 && a.selectedIdentity < len(rows) copyItem := menu.Item("Copy").Disabled(!hasSelection). Shortcut(ui.Cmd, ui.KeyC) diff --git a/docs/dev.md b/docs/dev.md index 0ea1b07..3fa8c63 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -328,7 +328,7 @@ The MSI Summary Information uses the standard `Installation Database` title, the Linux and Windows release archives contain both executables, `LICENSE`, and `CREDITS`. macOS archives contain the CLI executable, `SSH KeySelect.app`, `LICENSE`, and `CREDITS`; they omit the standalone GUI executable. Linux packages install the license files under `/usr/share/doc/ssh-keyselect` and install the GUI desktop entry and PNG icons. The Windows MSI installers contain both executables and the license notices, add a Start menu shortcut, and install for all users. MyGo builds the universal macOS DMG containing the GUI app. -GoReleaser builds the release archives and Linux packages. [`go-msi`](https://github.com/digitalxero/go-msi) builds the Windows MSI installers from the CLI and GUI executables, and MyGo builds the macOS DMG from `mygo.json`; the build script replaces the app bundle and DMG volume icons with the project-generated ICNS so Finder renders its small icon sizes correctly. Package versions come from the current release tag or the matching snapshot version. Both Windows executables include their version resources, and the GUI executable includes the app icon. The MSI includes the `LICENSE` and `CREDITS` files. +GoReleaser builds the release archives and Linux packages. [`go-msi`](https://github.com/digitalxero/go-msi) builds the Windows MSI installers from the CLI and GUI executables, and MyGo builds the macOS DMG from `mygo.json`; the build script renames its slug-based output to `SSH KeySelect .dmg` to preserve the release filename. It also replaces the app bundle and DMG volume icons with the project-generated ICNS so Finder renders its small icon sizes correctly. Package versions come from the current release tag or the matching snapshot version. Both Windows executables include their version resources, and the GUI executable includes the app icon. The MSI includes the `LICENSE` and `CREDITS` files. The macOS GUI post-build hook still creates `SSH KeySelect.app` for the GoReleaser archive. Separate Darwin build IDs let that archive contain the CLI and app bundle without the standalone GUI executable. The MyGo DMG contains the same app as a universal binary. Neither macOS package is signed with a Developer ID or notarized, so Gatekeeper may block apps downloaded from a release. The Windows archive executables remain GoReleaser builds; the MSI installer packages both executables. diff --git a/go.mod b/go.mod index 26a5a7a..52740d9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jfut/ssh-keyselect -go 1.27.1 +go 1.27.3 tool github.com/egoist/mygo/cmd/mygo @@ -8,11 +8,11 @@ require ( github.com/BurntSushi/toml v1.6.0 github.com/Microsoft/go-winio v0.6.4 github.com/abemedia/go-cfb v0.2.0 - github.com/alecthomas/kong v1.16.1 - github.com/ebitengine/purego v0.11.2 - github.com/egoist/mygo v0.5.5 + github.com/alecthomas/kong v1.17.0 + github.com/ebitengine/purego v0.11.3 + github.com/egoist/mygo v0.7.4 github.com/ncruces/go-sqlite3 v0.36.0 - go.digitalxero.dev/go-msi v0.5.0 + go.digitalxero.dev/go-msi v0.5.5 golang.org/x/crypto v0.58.0 golang.org/x/image v0.47.0 golang.org/x/sys v0.49.0 @@ -21,8 +21,9 @@ require ( require ( github.com/go-text/typesetting v0.3.5 // indirect - github.com/ncruces/go-sqlite3-wasm/v6 v6.4.35401 // indirect + github.com/ncruces/go-sqlite3-wasm/v6 v6.5.35401 // indirect github.com/ncruces/julianday v1.0.0 // indirect + golang.org/x/net v0.62.0 // indirect golang.org/x/text v0.43.0 // indirect software.sslmate.com/src/go-pkcs12 v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index 49542dc..4602e6d 100644 --- a/go.sum +++ b/go.sum @@ -6,16 +6,16 @@ github.com/abemedia/go-cfb v0.2.0 h1:amLvu7/DX65XtcmMuc0an/t09W36gMOrnYwLxGGmwX8 github.com/abemedia/go-cfb v0.2.0/go.mod h1:ytSRuNKf2VMDQDs8TSZ/VmkVfS4giAdc4xl5XOnpKKA= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/kong v1.16.1 h1:ixhCt93XkJ98kGposQ54+bl0IK6XwqB40AsMynU7Z8E= -github.com/alecthomas/kong v1.16.1/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I= +github.com/alecthomas/kong v1.17.0 h1:f52BVWChYMDkMkCoqkEWRuFOk/K4B5LO7xIijeLJRdk= +github.com/alecthomas/kong v1.17.0/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/ebitengine/purego v0.11.2 h1:WWiTx8rD8zYdOwSj8O/NiNbsOvSAgJMTlyV1XlbUSeU= -github.com/ebitengine/purego v0.11.2/go.mod h1:DCHPP08djqhNSoTfImcnHYQRZmd0qhakvrozqaEYhGQ= -github.com/egoist/mygo v0.5.5 h1:3pvlEwumsck/L99cbDpay/Eqcf51B7zhKNXekiodLOw= -github.com/egoist/mygo v0.5.5/go.mod h1:daHGetyAlBkHhIZOOIcAI7C82yLUY7HgeT2+Z6w2VPU= +github.com/ebitengine/purego v0.11.3 h1:OB+JLpdm7ioymhyA+6s5kbb/uOuYycAgL8NNTFc5MLg= +github.com/ebitengine/purego v0.11.3/go.mod h1:DCHPP08djqhNSoTfImcnHYQRZmd0qhakvrozqaEYhGQ= +github.com/egoist/mygo v0.7.4 h1:0qkDpDRo7C9g8PM8eu4V6FVouhLiTrUdqKD6I31Lv3Q= +github.com/egoist/mygo v0.7.4/go.mod h1:dVav53PwF2xEotjf4oA5lTY2Jp2exgzyjLhbSXhbMwE= github.com/go-text/typesetting v0.3.5 h1:XZPUooClHY0Vf/rFyUyuPRNEkawARaFzLMQcXLSEyPk= github.com/go-text/typesetting v0.3.5/go.mod h1:XZO1hD+nQVyvVa5IicQk7FsCa4PFQaJ2soWAP1f//68= github.com/go-text/typesetting-utils v0.0.0-20260419141703-4ffe8874dabc h1:8FGo2It5K75XkavhTiCKExUfVaVDS1feBnLCru5qeoY= @@ -26,20 +26,22 @@ github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUq github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/ncruces/go-sqlite3 v0.36.0 h1:/tmetPB+789WApzUWWfXVlDRtraPKil2iopXlQbET4A= github.com/ncruces/go-sqlite3 v0.36.0/go.mod h1:HhzaJ0fX5RHXe+09Nfz7pKiNuJVexXTAqX0/gNmA06w= -github.com/ncruces/go-sqlite3-wasm/v6 v6.4.35401 h1:CJ7ClSmm84xWaefcVSbiMlU3luCiMfC/eJ0vaPntbhQ= -github.com/ncruces/go-sqlite3-wasm/v6 v6.4.35401/go.mod h1:KG11ycVocsrsZ6OoNm4j2T7SKyzb/6ELHo0M+bAX50A= +github.com/ncruces/go-sqlite3-wasm/v6 v6.5.35401 h1:GM27MxQNSRvqi44IYsZANqQKGonIRjUcPojI67RJfq4= +github.com/ncruces/go-sqlite3-wasm/v6 v6.5.35401/go.mod h1:zeroyGPjT3/xj22bhcPdlFLSYugMoi74v+aISTwWrtM= github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -go.digitalxero.dev/go-msi v0.5.0 h1:sYHs+evvSP7cV9lTbAorVQ2JVCVU7DzDt8iHstIVO1w= -go.digitalxero.dev/go-msi v0.5.0/go.mod h1:KmoYF1YR3JjpaZmRmiZunTpQ4fKJsnYGgFmTN6gqlgE= +go.digitalxero.dev/go-msi v0.5.5 h1:Bl2U3N2s4+rg7j0avl+cuKUy7xegbcqEKAXf3zBqjiw= +go.digitalxero.dev/go-msi v0.5.5/go.mod h1:35kwoGr7xw3X4JQdNLZLsKozJiuQgLCNbadpE9dNZEk= golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= golang.org/x/image v0.47.0 h1:za/8gVz++PPZqmZJBNSISICN5Rrj5zixP/8K++fgmqo= golang.org/x/image v0.47.0/go.mod h1:IkN5o4A7vq55vXN8FWjjnhg9Rs2GOtffqsSi9mWAKYE= +golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= +golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM= diff --git a/internal/selector/gui.go b/internal/selector/gui.go index 9b5ee5e..e5449a6 100644 --- a/internal/selector/gui.go +++ b/internal/selector/gui.go @@ -492,7 +492,7 @@ func (p *guiPickerState) view(c *ui.Context) { p.tableState.Selected = &p.selected table := guitable.IdentityTable(c, &p.tableState, p.tableRows, true, false). Grow(1).MinHeight(theme.Space(37)) - table.ContextMenu(func(menu *ui.Menu) { + table.PopoverMenu(func(menu *ui.Menu) { copyItem := menu.Item("Copy").Disabled(p.selected < 0 || p.selected >= len(matches)). Shortcut(ui.Cmd, ui.KeyC) if copyItem.Chosen() && p.selected >= 0 && p.selected < len(matches) { diff --git a/mygo.json b/mygo.json index 2f34e74..177fefb 100644 --- a/mygo.json +++ b/mygo.json @@ -1,5 +1,6 @@ { "name": "SSH KeySelect", + "slug": "ssh-keyselect", "identifier": "jp.integ.ssh-keyselect-gui", "version": "0.0.0", "copyright": "Copyright contributors to the ssh-keyselect project", diff --git a/scripts/build-mygo-packages.sh b/scripts/build-mygo-packages.sh index 1b85a88..2cb64c2 100644 --- a/scripts/build-mygo-packages.sh +++ b/scripts/build-mygo-packages.sh @@ -83,9 +83,11 @@ build_macos() { go run ./scripts/generate-platform-icons.go GOFLAGS="$build_flags" go tool mygo build -platform darwin/universal local app_path="dist/mygo/darwin-universal/SSH KeySelect.app" + local generated_dmg_path="dist/mygo/darwin-universal/ssh-keyselect-$version.dmg" local dmg_path="dist/mygo/darwin-universal/SSH KeySelect $version.dmg" # Also fix MyGo's standalone app bundle; its DMG contains a separate copy patched below. cp assets/gui/generated/platform/ssh-keyselect.icns "$app_path/Contents/Resources/AppIcon.icns" + mv "$generated_dmg_path" "$dmg_path" patch_dmg_icons "$dmg_path" mkdir -p release-packages/macos cp "$dmg_path" release-packages/macos/