fpasoterm 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/CONTRIBUTING.md +67 -0
  3. package/INSTALL.ja.md +204 -0
  4. package/INSTALL.md +229 -0
  5. package/LICENSE +21 -0
  6. package/README.ja.md +389 -0
  7. package/README.md +607 -0
  8. package/bin/fpasoterm +2882 -0
  9. package/completions/_fpasoterm +81 -0
  10. package/completions/fpasoterm.bash +55 -0
  11. package/completions/fpasoterm.fish +64 -0
  12. package/completions/fpasoterm.ps1 +47 -0
  13. package/docs/capability-diagnostics.en.md +77 -0
  14. package/docs/capability-diagnostics.ja.md +63 -0
  15. package/docs/completion.en.md +141 -0
  16. package/docs/completion.ja.md +113 -0
  17. package/docs/config.en.md +554 -0
  18. package/docs/config.ja.md +544 -0
  19. package/docs/debugging.en.md +72 -0
  20. package/docs/debugging.ja.md +66 -0
  21. package/docs/diagnostics.en.md +69 -0
  22. package/docs/diagnostics.ja.md +64 -0
  23. package/docs/font-diagnostics.en.md +116 -0
  24. package/docs/font-diagnostics.ja.md +105 -0
  25. package/docs/fpasoterm-plugin.d.ts +51 -0
  26. package/docs/known-issues.en.md +23 -0
  27. package/docs/known-issues.ja.md +23 -0
  28. package/docs/plugins.en.md +266 -0
  29. package/docs/plugins.ja.md +176 -0
  30. package/docs/pr-review.en.md +177 -0
  31. package/docs/pr-review.ja.md +170 -0
  32. package/docs/release-checklist.en.md +72 -0
  33. package/docs/release-checklist.ja.md +71 -0
  34. package/docs/security.en.md +36 -0
  35. package/docs/security.ja.md +31 -0
  36. package/docs/spec.en.md +106 -0
  37. package/docs/spec.ja.md +99 -0
  38. package/docs/sshfs.en.md +28 -0
  39. package/docs/sshfs.ja.md +28 -0
  40. package/docs/sync.en.md +280 -0
  41. package/docs/sync.ja.md +280 -0
  42. package/examples/apply-default-appearance.bat +8 -0
  43. package/examples/apply-default-appearance.ps1 +7 -0
  44. package/examples/apply-default-appearance.sh +7 -0
  45. package/examples/apply-runtime-appearance.bat +8 -0
  46. package/examples/apply-runtime-appearance.ps1 +7 -0
  47. package/examples/apply-runtime-appearance.sh +7 -0
  48. package/examples/config/default-appearance.toml +36 -0
  49. package/examples/config/minimal.toml +30 -0
  50. package/examples/config/profiles.toml +20 -0
  51. package/examples/config/runtime-appearance.toml +24 -0
  52. package/examples/config/sync-folder.toml +17 -0
  53. package/examples/config/tui-compatibility.toml +7 -0
  54. package/examples/config/with-plugins.toml +33 -0
  55. package/examples/plugins/hello.ts +17 -0
  56. package/examples/plugins/status-banner.ts +14 -0
  57. package/examples/plugins/theme.ts +32 -0
  58. package/examples/plugins/welcome-banner.ts +16 -0
  59. package/extra/linux/icons/hicolor/128x128/apps/fpasoterm.png +0 -0
  60. package/extra/linux/icons/hicolor/16x16/apps/fpasoterm.png +0 -0
  61. package/extra/linux/icons/hicolor/192x192/apps/fpasoterm.png +0 -0
  62. package/extra/linux/icons/hicolor/256x256/apps/fpasoterm.png +0 -0
  63. package/extra/linux/icons/hicolor/32x32/apps/fpasoterm.png +0 -0
  64. package/extra/linux/icons/hicolor/48x48/apps/fpasoterm.png +0 -0
  65. package/extra/linux/icons/hicolor/512x512/apps/fpasoterm.png +0 -0
  66. package/extra/linux/icons/hicolor/64x64/apps/fpasoterm.png +0 -0
  67. package/extra/linux/io.github.oyoguhito.fpasoterm.desktop +10 -0
  68. package/extra/logo/fpasoterm.png +0 -0
  69. package/extra/macos/fpasoterm.icns +0 -0
  70. package/extra/windows/fpasoterm.cmd +40 -0
  71. package/extra/windows/fpasoterm.ico +0 -0
  72. package/package.json +81 -0
  73. package/scripts/build-artifacts.js +183 -0
  74. package/scripts/generate-icon.js +251 -0
  75. package/scripts/init-jj-empty-main +41 -0
  76. package/scripts/install-linux-desktop.js +238 -0
  77. package/scripts/run +16 -0
  78. package/scripts/security/scan-secrets.js +89 -0
  79. package/scripts/tests/smoke.js +2476 -0
  80. package/scripts/uninstall-desktop.js +20 -0
  81. package/scripts/uninstall-linux-desktop.js +96 -0
  82. package/scripts/uninstall-windows-path.js +94 -0
  83. package/src/config.js +855 -0
  84. package/src/renderer/confirm.html +71 -0
  85. package/src/renderer/index.html +223 -0
  86. package/src/renderer/renderer.js +4166 -0
  87. package/src/renderer/styles.css +969 -0
  88. package/src/renderer/vendor/addon-fit/addon-fit.js +2 -0
  89. package/src/renderer/vendor/addon-image/LICENSE +19 -0
  90. package/src/renderer/vendor/addon-image/addon-image.js +3 -0
  91. package/src/renderer/vendor/addon-web-links/LICENSE +19 -0
  92. package/src/renderer/vendor/addon-web-links/addon-web-links.js +2 -0
  93. package/src/renderer/vendor/xterm/xterm.css +292 -0
  94. package/src/renderer/vendor/xterm/xterm.js +2 -0
  95. package/src-tauri/Cargo.lock +5253 -0
  96. package/src-tauri/Cargo.toml +29 -0
  97. package/src-tauri/build.rs +140 -0
  98. package/src-tauri/capabilities/default.json +13 -0
  99. package/src-tauri/default-config.toml +128 -0
  100. package/src-tauri/src/main.rs +9347 -0
  101. package/src-tauri/tauri.conf.json +60 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,230 @@
1
+ # Changelog
2
+
3
+ ## 1.5.7
4
+
5
+ - Added sync-folder status, cleanup, and Markdown diagnostics commands: `--sync-status`, `--sync-clean`, and `--sync-diagnostics`.
6
+ - Added CLI Broadcast: `--broadcast <text>`, repeatable/comma-separated `--broadcast-target <pid|title>`, and guarded `--broadcast-sync` delivery through a trusted sync folder.
7
+ - Added Rust build caching to pull-request and release GitHub Actions jobs while retaining the existing full checks and artifact builds.
8
+
9
+ ## 1.5.6
10
+
11
+ - Added configuration inspection commands: `--config-check`, `--config-path`, and `--config-example`.
12
+ - Added Markdown diagnostics commands: `--diagnostics`, `--copy-diagnostics`, and `--open-log-dir`.
13
+ - Added named TOML profiles with `--profile` / `--profile-list`, including a documented profile example and early CLI validation before background launch.
14
+ - Added PR and release quality checks for syntax, smoke tests, Cargo formatting, dependency/security scanning, and CodeQL.
15
+
16
+ ## 1.5.4
17
+
18
+ - Kept first-run local Cargo builds attached to the CLI and displayed preparation, compiler progress, build completion, and native window startup phases before returning the prompt.
19
+ - Appended detached Cargo build output and failure exit details to the persistent launcher log for diagnosis when a window cannot start.
20
+ - Documented the distinct cleanup scopes of `npm uninstall -g fpasoterm` and `npm run uninstall:desktop`, including the Windows `Path`-only source-uninstaller behavior.
21
+
22
+ ## 1.5.3
23
+
24
+ - Detached normal CLI launches before a possible local Cargo build so the invoking terminal prompt returns immediately on macOS, Linux, and Windows.
25
+ - Added CLI startup status for cached-runtime reuse or local Cargo builds, plus elapsed launcher phases in the persistent launcher log.
26
+
27
+ ## 1.5.2
28
+
29
+ - Fixed macOS Apple Silicon terminal cell metrics by prioritizing the native `SF Mono` and `Menlo` monospace fonts before proportional Hiragino fallbacks.
30
+ - Migrated only the previous shipped macOS font default in memory, preserving user-selected custom font families.
31
+
32
+ ## 1.5.1
33
+
34
+ - Restricted the npm source package to tracked Tauri source and configuration files, excluding generated build outputs.
35
+ - Added npm ignore rules so local build, cache, diagnostic, and session files cannot be published.
36
+
37
+ ## 1.5.0
38
+
39
+ - Added Kitty graphics protocol rendering through the xterm.js image addon, with bounded image size and storage settings under `[terminal.images]`.
40
+ - Added `Broadcast (^B)` / `Ctrl+Shift+B` to select local windows by title/PID and send a command only to those terminals.
41
+ - Added an explicit, short-lived trusted sync-folder broadcast channel for already-running remote fpasoterm instances sharing the same sync path and channel.
42
+ - Added the titlebar title to automatic terminal output log filenames so logs from multiple windows are distinguishable.
43
+ - Forwarded the terminal pixel dimensions to the PTY for Kitty-aware applications and kept `Ctrl+C` available as an interrupt fallback if a graphics layer displaces terminal focus.
44
+ - Limited experimental Kitty graphics to the official xterm.js image addon's direct-transfer (`t=d`) support; local-file and animation extensions remain unsupported.
45
+ - Disabled the experimental image addon by default after WebKitGTK image streams could block terminal input, and made `--dev` use a static-asset debug binary instead of a localhost development server.
46
+ - Fixed terminal paste handling so xterm's hidden IME textarea is treated as terminal focus and `Ctrl+Shift+V` reads the host clipboard.
47
+
48
+ ## 1.4.7
49
+
50
+ - Restored the macOS CLI wrapper at `~/.local/bin/fpasoterm`, kept the config-directory shim for compatibility, and placed the conventional user bin directory first in child-shell `PATH`.
51
+ - Limited automatic help output to argument-validation errors; runtime failures such as a missing `--close` target now print only the actionable error.
52
+
53
+ ## 1.4.6
54
+
55
+ - Audited every packaged-binary long and short CLI option, rejected Node-launcher-only `--dev` / `-d`, unknown options, and missing values before GUI startup, and explicitly flushed non-Windows CLI output.
56
+ - Added the running binary version to the in-app `Help (^H)` keyboard-shortcut panel.
57
+ - Changed CLI and Close All requests to exit each application process, so macOS does not leave fpasoterm active in the menu bar after `fpasoterm -q all`.
58
+
59
+ ## 1.4.5
60
+
61
+ - Added a regenerated macOS user CLI shim that forwards all arguments to the current app-bundle executable, preventing stale or argument-dropping launch paths inside fpasoterm terminals.
62
+ - Changed direct packaged binaries to reject Node-launcher-only options with help instead of silently opening a GUI window.
63
+
64
+ ## 1.4.4
65
+
66
+ - Excluded stale instance markers with a cross-platform heartbeat so Tile counts and title suffixes reflect running windows on Windows and macOS.
67
+ - Stabilized Tile grids, including 2x1 for two windows, 3x3 for nine windows, and 5x2 for ten windows.
68
+ - Added the macOS application executable directory to child-shell `PATH` and detached nested GUI launches so `fpasoterm` opens another window without blocking the prompt.
69
+ - Allocated `-2`, `-3`, and later title suffixes after the highest live suffix instead of using an ambiguous marker count.
70
+ - Added the reserved `all` target to `fpasoterm --close` / `-q` for closing every running window from the CLI.
71
+ - Added `fpasoterm --reset-config` / `-R` to rename the selected config as a timestamped backup, restore every platform default, and clear saved bounds so the default 1000x680 size takes effect.
72
+
73
+ ## 1.4.3
74
+
75
+ - Reduced the default terminal font size on Intel macOS from 13px to 12px when no explicit `terminal.fontSize` is configured.
76
+ - Consolidated logging, copy, and paste actions into the hamburger menu, with explicit `Log Start`, `Log Stop`, and `Log Show` labels.
77
+ - Added `Ctrl+Shift+M` for the window menu and a `Help (^H)` action with `Ctrl+Shift+H` for displaying keyboard shortcuts.
78
+ - Restored a visible `Logging` status while terminal output capture is active, left-aligned the title to avoid control overlap, and added `fpasoterm -l` / `--list` for running-window details.
79
+ - Added `fpasoterm --close <pid|title>` / `-q` to gracefully close running windows by process ID or exact displayed title.
80
+
81
+ ## 1.4.2
82
+
83
+ - Rejected unknown or invalid CLI arguments with an error, full help text, and exit code 2 instead of opening the application.
84
+ - Made Windows Log Delete All continue when a sync client or another process locks a log file, falling back to emptying files that cannot be removed.
85
+ - Added Tab, Shift+Tab, arrow, and Escape navigation with visible focus states to the titlebar menus.
86
+ - Replaced the unreliable Windows Close All WebView with a native confirmation dialog supporting keyboard controls and the standard close button.
87
+ - Reduced the default terminal font size on Intel macOS to 13px while preserving explicit user settings and other platform defaults.
88
+
89
+ ## 1.4.1
90
+
91
+ - Added a Window menu `New (^N)` action and `Ctrl+Shift+N` / `Cmd+Shift+N` shortcut for opening another fpasoterm window.
92
+ - Fixed Windows Tile target detection by checking live instance PIDs with the Windows process API instead of treating stale markers as active.
93
+ - Made the Close All confirmation window explicit, decorated, non-transparent, visible, resizable, and larger so Windows users can cancel, confirm, or close it normally.
94
+
95
+ ## 1.4.0
96
+
97
+ - Improved Tile sizing by converting renderer logical screen dimensions to native physical pixels with the display device pixel ratio.
98
+ - Added an independent confirmation window for Close All, with keyboard focus, Tab navigation, Cancel, OK, and Escape handling.
99
+ - Prevented stale Close All requests from affecting newly started windows and restored terminal focus after cancellation.
100
+ - Added optional `--x11` support for Linux window placement diagnostics.
101
+
102
+ ## 1.3.6
103
+
104
+ - Improved Log menu keyboard labels and shortcuts for logging, copy, and paste operations.
105
+ - Added keyboard-accessible Log Show search with match counts, next/previous navigation, visible focus states, and panel-contained focus cycling.
106
+ - Replaced native delete confirmations with an in-panel confirmation dialog so Delete Selected and Delete All keep focus inside the log panel.
107
+
108
+ ## 1.3.5
109
+
110
+ - Preserved half-width katakana in terminal display and readable terminal logs instead of normalizing it to full-width katakana.
111
+ - Added terminal selection copy support for `Ctrl+Shift+C`, right-click copy when text is selected, and host WebView clipboard integration for paste into other applications.
112
+ - Removed the Log Show copy button and made Log Show textarea selections copy with `Ctrl+Shift+C`.
113
+ - Added keyboard-accessible Log menu Copy/Paste buttons and arrow-key menu navigation.
114
+
115
+ ## 1.3.4
116
+
117
+ - Fixed Windows clipboard handling for Japanese paths copied from `Log Show` by writing native UTF-16 `CF_UNICODETEXT` clipboard data directly.
118
+
119
+ ## 1.3.3
120
+
121
+ - Removed the retired `Sync:` titlebar status UI entirely while keeping silent sync diagnostics snapshots.
122
+ - Fixed Windows clipboard copy/paste of Japanese paths from `Log Show` by routing PowerShell clipboard fallback through UTF-8 temporary files.
123
+
124
+ ## 1.3.2
125
+
126
+ - Removed the retired `Synced` titlebar/status wording from sync diagnostics and setup prompts.
127
+ - Added `--version` and `-v` to both the Node launcher and packaged app binary.
128
+ - Documented Windows overwrite-update checks for verifying the installed executable version.
129
+
130
+ ## 1.3.0
131
+
132
+ - Added folder-based sync for explicit clipboard text and diagnostics using local sync folders such as Google Drive for desktop.
133
+ - Added terminal output logging with `Log Start` / `Log Stop` and OSC 777 controls.
134
+ - Added interactive `--setup-sync` configuration for first-time sync folder setup.
135
+ - Removed the temporary web console feature and related `--web-console` options.
136
+
137
+ ## 1.2.2
138
+
139
+ - Allowed multiple fpasoterm windows on ChromeOS/Linux by disabling GTK application-id activation.
140
+ - Made Windows prefer PowerShell 7 (`pwsh.exe`) as the default shell when available.
141
+ - Added the fpasoterm executable directory to Windows child terminal `Path` so `fpasoterm` commands work inside the opened terminal.
142
+
143
+ ## 1.2.1
144
+
145
+ - Fixed Windows direct binary CLI handling for `--help`, `--show-config`, window overrides, and shell selection.
146
+ - Added PowerShell 7 path fallback and shell value sanitization for `--shell pwsh.exe`.
147
+ - Added pull request review documentation for the no-artifact review path.
148
+
149
+ ## 1.2.0
150
+
151
+ - Added runtime config application from inside a running terminal via OSC 777.
152
+ - Added visible runtime appearance examples and a default-appearance reset script.
153
+ - Added `terminal.termName = "xterm-256color"` and exported `TERM=xterm-256color` for tmux and other terminal multiplexers.
154
+ - Improved runtime terminal resizing after appearance and window setting changes.
155
+ - Improved ChromeOS launcher wrapper installation, update, and uninstall behavior.
156
+
157
+ ## 1.1.0
158
+
159
+ - Added configurable custom titlebar titles and colors via config and one-shot CLI options.
160
+ - Added short CLI aliases for common launch options.
161
+ - Added custom titlebar minimize and maximize/restore controls.
162
+ - Documented titlebar options in English and Japanese.
163
+
164
+ ## 1.0.5
165
+
166
+ - Fixed direct packaged app argument parsing so `fpasoterm.exe --shell pwsh.exe` selects the requested shell.
167
+ - Added direct app support for `--shell=value`, `--config <path>`, and `--config=<path>`.
168
+
169
+ ## 1.0.4
170
+
171
+ - Fixed Windows launch behavior so normal GUI launches do not open an extra console window.
172
+ - Closed the application when the shell process exits, including `exit` from Windows shells.
173
+ - Added `terminal.shell` and `--shell <command>` for selecting shells such as bash, fish, PowerShell, or cmd.
174
+ - Avoided launching stale local Tauri target binaries after source changes.
175
+
176
+ ## 1.0.3
177
+
178
+ - Fixed window size restore when launching the macOS `.app` bundle directly.
179
+
180
+ ## 1.0.2
181
+
182
+ - Added ad-hoc macOS app signing and Release workflow verification for macOS `.app` and `.dmg` artifacts.
183
+ - Documented that full Gatekeeper-friendly macOS distribution still requires Developer ID signing and notarization.
184
+
185
+ ## 1.0.1
186
+
187
+ - Included macOS Tauri rendering and resizing fixes in the release version.
188
+
189
+ ## 1.0.0
190
+
191
+ - Added a tag-driven GitHub Release workflow that builds `artifacts/` in GitHub Actions and attaches the generated files to the release.
192
+ - Expanded release artifact generation to Linux x64, Linux arm64, macOS x64, macOS arm64, and Windows x64.
193
+ - Bumped the package version to `1.0.0` so release tag `v1.0.0` and generated artifact names match.
194
+
195
+ ## 0.0.6
196
+
197
+ - Replaced the desktop runtime with Tauri and moved the PTY bridge to Rust using portable-pty.
198
+ - Kept the existing xterm.js terminal renderer, TOML config loader, plugin support, and CLI configuration commands.
199
+ - Added Linux/WebKitGTK transparency preparation and `--disable-dmabuf` diagnostics for ChromeOS/Baguette rendering issues.
200
+ - Removed runtime-specific launch options and old preload/main process files.
201
+
202
+ ## 0.0.5
203
+
204
+ - Added documented known issues for ChromeOS/Baguette window placement and transparent terminal limitations.
205
+ - Removed unsupported window position CLI overrides after ChromeOS/Baguette testing showed the compositor keeps desktop runtime windows centered.
206
+ - Kept window size persistence while avoiding aggressive position reapplication that could freeze the OS during resize.
207
+ - Removed temporary transparency diagnostic CLI options and related runtime code.
208
+
209
+ ## 0.0.4
210
+
211
+ - macOS Dock and bundle icons now use the generated project assets.
212
+ - Windows window icons now use the generated `.ico` asset.
213
+
214
+ ## 0.0.3
215
+
216
+ - Initial fpasoterm release.
217
+ - Added xterm.js based terminal with a shell-backed PTY.
218
+ - Added Linux startup wrapper for the desktop runtime.
219
+ - Added npm binary `fpasoterm`.
220
+ - Added GitHub Actions checks and release artifact generation.
221
+ - Added application window icon wiring and close-on-shell-exit behavior.
222
+ - Added hicolor launcher icon generation and local desktop entry installation.
223
+ - Local desktop installation now also installs a `fpasoterm` command into the user's local bin directory.
224
+ - Added local desktop update and uninstall scripts for clean command, launcher, and icon management.
225
+ - Added `~/.config/fpasoterm/User/config.toml` support, JavaScript/TypeScript user plugins, and configurable IME duplicate-input guard timing.
226
+ - Added detached-by-default command launching plus `--help`, `--foreground`, `--config`, and window-size CLI overrides.
227
+ - Added `--show-config`, `--enable-plugin`, and `--disable-plugin` for configuration inspection and plugin management.
228
+ - Plugin enable/disable commands now accept file names, comma-separated lists, and repeated options.
229
+ - Added example TOML configs under `examples/config/`.
230
+ - Added full default configuration documentation and TypeScript plugin samples.
@@ -0,0 +1,67 @@
1
+ # Contributing
2
+
3
+ Thank you for improving fpasoterm.
4
+
5
+ ## Development
6
+
7
+ Install Node.js 22+, Rust stable, and the native build prerequisites for the
8
+ target operating system before running the commands below.
9
+
10
+ - Linux: `libgtk-3-dev`, `libwebkit2gtk-4.1-dev`,
11
+ `libayatana-appindicator3-dev`, and `librsvg2-dev`.
12
+ - macOS: Xcode Command Line Tools (`xcode-select --install`).
13
+ - Windows: Visual Studio Build Tools with **Desktop development with C++** and
14
+ the Microsoft Edge WebView2 Runtime.
15
+
16
+ ```sh
17
+ npm ci
18
+ npm run check
19
+ node ./bin/fpasoterm --dev
20
+ ```
21
+
22
+ On Windows PowerShell, use the same launcher command with backslashes:
23
+
24
+ ```powershell
25
+ node .\bin\fpasoterm --dev
26
+ ```
27
+
28
+ Normal launcher invocations return the prompt immediately and print whether a
29
+ cached runtime is used or Cargo is building one. Use
30
+ `--foreground --console-diagnostics` only when waiting for compiler and
31
+ desktop-process output is intentional.
32
+
33
+ For IME, rendering, clipboard, and window issues, follow the forced rebuild,
34
+ event-trace, and safe-reporting workflow in [docs/debugging.en.md](docs/debugging.en.md).
35
+ Japanese contribution guidance is available in [CONTRIBUTING.ja.md](CONTRIBUTING.ja.md).
36
+
37
+ ## Pull Request Review
38
+
39
+ Do not review a tagged release asset when the requested change is in a pull
40
+ request. Check out the pull request revision, build it on the target OS, and
41
+ launch it through the Node launcher:
42
+
43
+ ```sh
44
+ gh pr checkout <number> --repo oyoguhito/fpasoterm
45
+ npm ci
46
+ npm run check
47
+ node ./bin/fpasoterm
48
+ ```
49
+
50
+ Detailed Windows MSI/direct-binary and macOS app-bundle procedures are in
51
+ [docs/pr-review.en.md](docs/pr-review.en.md). Japanese review instructions are
52
+ available in [docs/pr-review.ja.md](docs/pr-review.ja.md).
53
+
54
+ Before submitting changes, run:
55
+
56
+ ```sh
57
+ npm run check
58
+ npm run scan:secrets
59
+ desktop-file-validate extra/linux/io.github.oyoguhito.fpasoterm.desktop
60
+ npm run build:artifacts
61
+ ```
62
+
63
+ ## Scope
64
+
65
+ - Keep terminal rendering delegated to xterm.js and shell integration delegated to the backend PTY.
66
+ - Keep IME switching delegated to the platform webview and the operating system.
67
+ - Keep public documentation in both English and Japanese when user-facing behavior changes.
package/INSTALL.ja.md ADDED
@@ -0,0 +1,204 @@
1
+ # インストール
2
+
3
+ 英語版: [INSTALL.md](INSTALL.md)。概要と利用方法は[日本語 README](README.ja.md)を参照してください。
4
+
5
+ ## npm
6
+
7
+ npm registry から公開済み package をインストールします。
8
+
9
+ ```sh
10
+ npm install -g fpasoterm
11
+ fpasoterm
12
+ ```
13
+
14
+ npm の自動 audit request がネットワーク上で問題になる場合、local install には `--no-audit` を使用できます。CI では repository 内の明示的な security check を継続して実行します。window を開かずに command path 上の version と build commit を確認するには次を実行します。
15
+
16
+ ```sh
17
+ fpasoterm --version
18
+ fpasoterm -v
19
+ ```
20
+
21
+ Windows で新しい `.exe` または `.msi` を導入した後も古い version が表示される場合、`Path`、Start menu、pinned shortcut のいずれかが古い executable を起動しています。起動中の fpasoterm window を閉じ、新しい package を再インストールしてから更新後の shortcut で起動してください。
22
+
23
+ Windows build では release executable と同じ directory に `fpasoterm.cmd` を配置します。`--version`、`--plugin-path`、`--plugin-info`などCLI専用操作にはこのconsole wrapperを使ってください。CLI操作は executable を直接実行するため、stdout、stderr、終了codeがPowerShellまたはcmdへ戻ります。通常起動は従来どおり非待機です。
24
+
25
+ ```powershell
26
+ .\src-tauri\target\release\fpasoterm.cmd --version
27
+ .\src-tauri\target\release\fpasoterm.cmd --plugin-path
28
+ .\src-tauri\target\release\fpasoterm.cmd --help
29
+ .\src-tauri\target\release\fpasoterm.cmd
30
+ ```
31
+
32
+ 同じ wrapper から PowerShell の command completion を有効化できます。
33
+
34
+ ```powershell
35
+ .\src-tauri\target\release\fpasoterm.cmd --completion powershell | Out-String | Invoke-Expression
36
+ ```
37
+
38
+ Bash、Zsh、Fish、永続化方法、および `cmd.exe` の制約は[コマンド補完](docs/completion.ja.md)を参照してください。
39
+
40
+ ## 開発用の起動
41
+
42
+ Linux では Tauri/WebKitGTK の開発用 package が必要です。
43
+
44
+ ```sh
45
+ sudo apt install build-essential curl libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
46
+ ```
47
+
48
+ 依存関係を入れた後、通常の開発起動は次の通りです。
49
+
50
+ ```sh
51
+ npm install
52
+ ./scripts/run
53
+ ```
54
+
55
+ リリース用 bundle を作らず、まず起動だけ確認する場合は次を使ってください。
56
+
57
+ ```sh
58
+ ./bin/fpasoterm --dev
59
+ ```
60
+
61
+ `--dev` は既存の `src-tauri/target/release/fpasoterm` を無視して、現在のソースを Tauri dev runtime で起動します。renderer や Tauri source の修正確認では、毎回再インストールする必要はありません。
62
+ 現在のコンソールでログを見たい場合だけ `--foreground --console-diagnostics` を追加してください。
63
+ 初回の `--dev` 起動では Cargo が Tauri debug binary を作るため数分かかることがあります。2回目以降は build cache を使うため短くなります。
64
+
65
+ ## ローカルコマンドの更新
66
+
67
+ checkout の `fpasoterm` コマンドと launcher entry をインストールする場合:
68
+
69
+ ```sh
70
+ npm run install:desktop
71
+ fpasoterm
72
+ ```
73
+
74
+ checkout path、launcher icon、installed command wrapper、Rust source、renderer asset を更新した場合:
75
+
76
+ ```sh
77
+ npm run update:desktop
78
+ ```
79
+
80
+ この command は desktop launcher を上書きし、local runtime を再buildします。次の icon または command 起動では、更新後の checkout が使われます。
81
+
82
+ `npm run update:desktop` は Linux / ChromeOS の desktop integration 用です。Windows では desktop を変更せず終了します。Windows 版は最新の `.msi` または `.exe` artifact を install して更新してください。
83
+
84
+ npm でインストールした package を terminal から更新する場合:
85
+
86
+ ```sh
87
+ fpasoterm --self-update
88
+ ```
89
+
90
+ 起動せずに現在使われている version を確認する場合:
91
+
92
+ ```sh
93
+ fpasoterm --version
94
+ fpasoterm -v
95
+ ```
96
+
97
+ Windows で新しい `.exe` または `.msi` を古い版へ上書きインストールした後も古い UI が表示される場合は、まず `fpasoterm --version` を確認してください。古い version が表示される場合、`Path`、Start menu、pinned shortcut のいずれかが古い executable を起動しています。起動中の fpasoterm を閉じ、新しい installer を再実行してから更新後の shortcut で起動してください。
98
+
99
+ source checkout の場合は、通常の git または jj workflow で checkout を更新した後、
100
+ installed command、launcher entry、icons を更新します。
101
+
102
+ ```sh
103
+ fpasoterm --update-desktop
104
+ ```
105
+
106
+ clean な non-jj git checkout では、次で自動化できます。
107
+
108
+ ```sh
109
+ fpasoterm --self-update-checkout
110
+ ```
111
+
112
+ npm global install で入れた npm 管理下の `fpasoterm` command を削除する場合:
113
+
114
+ ```sh
115
+ npm uninstall -g fpasoterm
116
+ ```
117
+
118
+ この操作では source checkout の desktop launcher、ユーザー設定、cache、app data は削除されません。実行後も `type -a fpasoterm` で command が表示される場合は、source checkout launcher など別の install が残っています。
119
+
120
+ Windows では PowerShell または Command Prompt で同じ command を実行できます。実行後は新しい terminal を開き、`where.exe fpasoterm` または `Get-Command fpasoterm -All` で別の command が残っていないか確認してください。
121
+
122
+ source checkout から導入した local command、desktop launcher entry、icon、ユーザー設定、runtime cache、Tauri/WebKit app data を削除する場合:
123
+
124
+ ```sh
125
+ npm run uninstall:desktop
126
+ ```
127
+
128
+ Windows の `npm run uninstall:desktop` は、local testing で追加した fpasoterm 関連 directory を current user の `Path` から削除するだけです。global npm package、source checkout、ユーザー設定、cache、app data は削除しません。共有 npm directory は残します。
129
+
130
+ 両方を削除する場合は、source checkout 内で先に `npm run uninstall:desktop` を実行し、その後 `npm uninstall -g fpasoterm` を実行してください。
131
+
132
+ ChromeOS/Baguette で透過検証中に黒、白、ちらつきが出る場合:
133
+
134
+ ```sh
135
+ fpasoterm --disable-dmabuf
136
+ ```
137
+
138
+ ## リリース成果物
139
+
140
+ 現在の開発環境向けの成果物を作る場合:
141
+
142
+ ```sh
143
+ npm run build:artifacts
144
+ ```
145
+
146
+ 生成物は `artifacts/` に出力されます。source archive は常に生成されます。platform bundle は現在の OS 向けだけなので、Linux のローカルビルドでは Linux package だけが生成されます。
147
+
148
+ tag 付きの GitHub Release では、GitHub Actions で次の成果物を作成します。
149
+
150
+ - source package と portable source archive
151
+ - Linux x64 `.deb` / `.rpm`
152
+ - ChromeOS/Baguette を含む arm64 Linux 向け `.deb` / `.rpm`
153
+ - macOS x64 bundle
154
+ - macOS arm64 bundle
155
+ - Windows x64 bundle と `fpasoterm-<version>-windows-cli.cmd` console wrapper
156
+
157
+ Debian package をローカルにインストールする場合:
158
+
159
+ ```sh
160
+ sudo apt install ./artifacts/fpasoterm_1.3.0_arm64-linux-arm64.deb
161
+ ```
162
+
163
+ ## Linux Desktop Entry
164
+
165
+ desktop entry template は次のファイルです。
166
+
167
+ ```text
168
+ extra/linux/io.github.oyoguhito.fpasoterm.desktop
169
+ ```
170
+
171
+ application icon の元画像は次の PNG です。
172
+
173
+ ```text
174
+ extra/logo/fpasoterm.png
175
+ ```
176
+
177
+ macOS app bundle では次を使います。
178
+
179
+ ```text
180
+ extra/macos/fpasoterm.icns
181
+ ```
182
+
183
+ Windows app bundle では次を使います。
184
+
185
+ ```text
186
+ extra/windows/fpasoterm.ico
187
+ ```
188
+
189
+ desktop entry と hicolor launcher icon を current user の data directory へインストールします。
190
+
191
+ ```sh
192
+ npm run install:desktop
193
+ ```
194
+
195
+ unpacked checkout を install する場合、desktop entry の `Exec=` は絶対 path の `~/.local/bin/fpasoterm` wrapper に書き換えられ、`TryExec` は設定しません。wrapper は install 時に使用した Node.js executable を記録し、一般的な `node` path も fallback として確認します。launcher environment に user shell の `PATH` が含まれない ChromeOS でも起動できるようにするためです。
196
+
197
+ installed desktop entry は `StartupWMClass=fpasoterm` と `Icon=io.github.oyoguhito.fpasoterm` を使います。GTK application id は無効化しているため、CLI または launcher から複数の fpasoterm window を起動できます。launcher は fpasoterm の shelf icon と hover name を解決します。installer は hicolor icon theme に `io.github.oyoguhito.fpasoterm.png` と `fpasoterm.png` の両方を配置します。
198
+
199
+ `extra/logo/fpasoterm.png` を置き換えた後は、launcher icon size を再生成します。
200
+
201
+ ```sh
202
+ npm run generate:icons
203
+ npm run update:desktop
204
+ ```