Skip to content

添加 Linux 编译支持#44

Draft
ttimasdf wants to merge 8 commits into
EasyTier:profrom
ttimasdf:fix/linux-build
Draft

添加 Linux 编译支持#44
ttimasdf wants to merge 8 commits into
EasyTier:profrom
ttimasdf:fix/linux-build

Conversation

@ttimasdf
Copy link
Copy Markdown
Contributor

Fix #21, Fix #39

当前分支可以保证编译通过,不过软件打开是白屏,还需要进一步修复。当前分支是 cherry pick 出来方便 PR 合并的,依赖 #43 ,我个人的完整开发分支在 rabit-dev

  • Use conditional compilation for Windows-specific CommandExt trait
  • Provide Linux-compatible version without creation_flags
  • Fix child.id() to use expect() for better error handling

@ttimasdf
Copy link
Copy Markdown
Contributor Author

Mac 编译和 Linux 应该比较接近毕竟都是UNIX,不过我手头没有 mac 没办法测试。后面可以把 Github Actions 跑起来让 CI 编译

@xlc520
Copy link
Copy Markdown
Collaborator

xlc520 commented Feb 27, 2026

只是添加 Linux 编译,可能依旧无法使用,里面有些功能,我只做了windows的,很多地方都是用 powershell ,还有服务安装,需要单独适配,等有空我看看加上 Actions

@xlc520 xlc520 added the todo 待办 label Feb 27, 2026
- Use conditional compilation for Windows-specific CommandExt trait
- Provide Linux-compatible version without creation_flags
- Fix child.id() to use expect() for better error handling
ttimasdf and others added 4 commits February 27, 2026 16:49
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extend all Windows-specific functionality to support Linux (systemd, ip route,
xterm) and macOS (launchd, route, Terminal.app). Key changes:

- Add systemd/launchd service management alongside NSSM
- Rename 'nssm' install method to 'native' (dispatches per OS)
- Add cross-platform route, network adapter, and process management
- Make remote tools (ping/SSH/telnet/RDP) platform-aware
- Fix getRunningProcesses() Unix branch JSON.parse bug
- Add platform encoding helper (GBK on Windows, UTF-8 elsewhere)
- Update Tauri capabilities with Linux/macOS shell commands
- Conditionally show Windows-only UI (Xshell, username/password)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nly installs

On read-only installations (Nix store, Flatpak, system packages), resourceDir
is not writable. This adds a startup writability check that falls back to
appDataDir (~/.local/share/easytier-manager-pro on Linux) with one-time
data migration from resourceDir. Writable installs are unaffected.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `dirs` dependency to Cargo.lock and update capabilities to allow
recursive read/write access to appdata directory. Refine error messages
in shellUtil.ts to clearly display command failures and output.
@xlc520
Copy link
Copy Markdown
Collaborator

xlc520 commented Feb 27, 2026

我大概看了一下新提交的代码,似乎改了存储配置文件的目录,还有日志,存在安装目录是为了方便打包后给其他不懂的解压直接运行配置,config/、resource/、logs/ 这些目录尽量不要动,还关联了下载内核,首页的日志查看,首页的运行配置

一次性迁移:将 resourceDir 下的 config/、resource/、logs/ 复制到 appDataDir

dir: resourceDirPath + '\' + LOG_PATH, // parseValue.file_logger?.dir ? parseValue.file_logger?.dir : logsDir.value,
dir: await join(dataDirPath, LOG_PATH),

ttimasdf and others added 2 commits February 28, 2026 08:36
Tauri FS plugin blocks dotfile paths in appDataDir. Rename .migrated
to migrated-flag. Also fix unused mut warning in build.rs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename shell scope entries for $RESOURCE binaries to -resource suffix,
add $APPDATA entries, and add bare PATH lookup entries. shellUtil now
tries each scope in priority order with automatic fallback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ttimasdf
Copy link
Copy Markdown
Contributor Author

ttimasdf commented Feb 28, 2026

我大概看了一下新提交的代码,似乎改了存储配置文件的目录,还有日志,存在安装目录是为了方便打包后给其他不懂的解压直接运行配置,

配置文件目录与之前兼容,默认使用程序所在目录。新增的逻辑是,如果程序所在目录不可写入,则回退到操作系统默认的程序数据目录,Windows 下是 %APPDATA/easytier-manager-pro/ (C:\Users\<用户名>\Appdata\easytier-manager-pro) ,Linux 下是 $XDG_DATA_DIR/easytier-manager-pro (/home/<用户名>/.local/share/easytier-manage-pro) ,这样可以兼容程序目录不可写的情况,比如,windows 安装到 C:\Program Files 下,某些 Linux (NixOS / Nix Home Manager) 安装到 Nix Store 下,或打包进 Flatpak/Appimage 里。Mac 应用程序打包输出的 .app 目录有签名校验应该也是不可写的(不太确定,太久没用Mac了)

所以对老用户来说,应该没有变化。

config/、resource/、logs/ 这些目录尽量不要动,还关联了下载内核,首页的日志查看,首页的运行配置

这些目录的根目录都会统一通过 getBaseDirectory 访问,所以应该也不会break掉已有的功能。

Apply same resource/appdata/PATH fallback pattern to nssm as was done
for easytier-cli and easytier-core.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

todo 待办

Projects

None yet

Development

Successfully merging this pull request may close these issues.

你好 管理工具打包的时候 出一个mac版本 [FEATURE] 支持linux版本

2 participants