Skip to content

发版:ModAVDManager v0.4.1 (#83)

Choose a tag to compare

@github-actions github-actions released this 05 Nov 21:32
· 47 commits to main since this release
Immutable release. Only release title and notes can be modified.
3ad766f

ModAVDManager v0.4.1

  • ModAVD.exe:5448c8b6e30d3839fe8243c546f85a2ea5fdd63cea2709f55511d27d1aa36380
  • tools/modavd.exe:7a7b43a0ce2bfd076bb6080d19568efa4b34340ae03f4880fbab0b0b05291054

随 ModAVD 0.38.1 进包。下面是相对 v0.4.0 的改动。

变更

  • 更新换包(modavd update install):

    • 关机命令刚返回就装,偶尔会在关机辅助进程正好退出的那一刻,把它当成「读不到路径」的占用而拒绝。现在读不到程序路径或命令行时,先按 PID 和创建时间确认这个进程还在不在,已经退出的不算占用。
    • 换包前最后一次检查时,要是碰上本根目录的 modavd 短命令(比如 AUTO-MAS 定时调的 status),最多隔 250 毫秒重扫两次,等它结束。还在的话照旧拒绝,什么都不动。
    • 换包由当前装着的那份 modavd 来做,所以这一条从 0.4.1 装好以后才生效:从 ModAVD 0.38.0(管理器 0.4.0)升到 0.38.1 的那一次仍可能被拒一次,重试即可。

    (ModAVD/ModAVD#77,ModAVDManager#77)

  • 执行桥日志 logs\modavd-bridge-<编号>-<时间>.log 并进日志清理:每台留最新 10 份,算进 logs\ 的 1 GiB 上限。收集问题信息时,按实例归类收进问题包,不再把它当成一台叫 modavd-bridge-<编号> 的实例。(ModAVD/ModAVD#97,ModAVDManager#74)

  • 带界面的管理器 ModAVD.exe --help(-h、-help 一样)改成用信息框显示用法和各个选项,退出码 0。以前弹「命令行参数不对」的报错框,退出码 2。其他参数错误照旧报错,退出码 2。(ModAVD/ModAVD#115,ModAVDManager#81)

  • 补全组件(modavd components fetch)要下载时,先打一行「下载源:…」,说明这次从哪里下、为什么:

    • 默认是自动,依次试 Google 中国下载、腾讯云镜像、Google 官方;
    • 给了 --mirror 就只用那一个;
    • 给了 --mirror-url 就用自定义地址。

    (ModAVD/ModAVD#45,ModAVDManager#82)

给调用方(AUTO-MAS)

  • protocol 还是 2:命令、参数、已有字段和退出码都没变。
  • 错误的 --json 里,error.details 多了几个机读的键,值都是字符串,调用方要容忍缺少和不认识的键(ModAVD/ModAVD#105,ModAVDManager#75):
    • 实例操作报 busy 时,reason 说明是哪一种:running、locked、starting、stopping、window_mismatch、port_in_use、port_other_root。
    • reason 是 locked 时,lock 说明是哪把锁:start、stop、boot、bridge、create、guest、disk、metadata、config。
    • start 的开机等待或开机后设置失败时,带上 instance_status、qemu_running。
    • create 失败时,带上 instance_exists,清理结束后再填 instance_status、qemu_running。instance_exists 只表示这个编号现在有实例文件,不表示是这次建的,不能只凭它自动删除。
    • 每个键的取值和含义见 README「错误的 details」一节。

下载与核对

用 Go 1.26.5、GOTOOLCHAIN=local 运行仓库里的 build.ps1,能编出相同的字节。单独下载的包里还有 Go 的许可原文和文件清单。请用附件 SHA256SUMS.txt 核对 zip 和解压出的两个 exe,例如在 PowerShell 里运行 Get-FileHash .\ModAVDManager-0.4.1-win-x64.zip -Algorithm SHA256。

单独下载的管理器不会自己更新,新版本要手动替换;ModAVD 包里的那份随 ModAVD 整包一起更新。单独使用时请给 --root 或设置 MODAVD_ROOT,否则会提示找不到 ModAVD 根目录。不要把单独下载的 zip 解压到 ModAVD 根目录,覆盖整包里的文件。

English

Shipped in ModAVD 0.38.1. Changes since v0.4.0:

Changes

  • Updating the package (modavd update install):

    • Installing right after the shutdown command returned could now and then be refused, because a shutdown helper exiting at that very moment was taken for a use whose path could not be read. Now, when a program's path or command line cannot be read, it first checks by PID and creation time whether the process is still there; one that has exited no longer counts as a use.
    • If the last check before the swap meets a short modavd command of this root (for example the status AUTO-MAS calls on a timer), it scans again up to twice, 250 ms apart, for it to finish. If it is still there, the install refuses as before and changes nothing.
    • The swap is done by the modavd already installed, so this takes effect only once 0.4.1 is in place: the update from ModAVD 0.38.0 (manager 0.4.0) to 0.38.1 may still be refused once; try again.

    (ModAVD/ModAVD#77, ModAVDManager#77)

  • The execution bridge logs logs\modavd-bridge-<index>-<time>.log join the log cleanup: each instance keeps the newest 10, counted in the 1 GiB limit of logs\. Problem-info collection files them under their instance instead of treating them as an instance named modavd-bridge-<index>. (ModAVD/ModAVD#97, ModAVDManager#74)

  • ModAVD.exe --help (and -h, -help) of the desktop manager now shows the usage and each option in an information box and exits with 0. It used to show a "wrong command-line arguments" error box and exit with 2. Other argument errors still show an error box and exit with 2. (ModAVD/ModAVD#115, ModAVDManager#81)

  • When component download (modavd components fetch) has something to download, it first prints a line "下载源:…" (download source) saying where it downloads from and why:

    • by default, automatic: Google's China download site, the Tencent Cloud mirror and Google's official site in turn;
    • with --mirror, only that one;
    • with --mirror-url, your own addresses.

    (ModAVD/ModAVD#45, ModAVDManager#82)

For callers (AUTO-MAS)

  • protocol is still 2: commands, arguments, existing fields and exit codes are unchanged.
  • In the --json of an error, error.details gains some machine-readable keys. All values are strings; callers must tolerate missing and unknown keys (ModAVD/ModAVD#105, ModAVDManager#75):
    • For busy from an instance operation, reason says which kind: running, locked, starting, stopping, window_mismatch, port_in_use or port_other_root.
    • With reason locked, lock names the lock: start, stop, boot, bridge, create, guest, disk, metadata or config.
    • When the boot wait or the post-boot setup of start fails, instance_status and qemu_running are added.
    • When create fails, instance_exists is added, and instance_status and qemu_running are filled in after the cleanup. instance_exists only means that this index has instance files now, not that this create made them; do not delete on it alone.
    • The values and their meaning are in the README section on error details.

Download and verification

Building with Go 1.26.5 and GOTOOLCHAIN=local through the repository's build.ps1 gives the same bytes. The standalone package also holds the Go license text and a file list. Check the zip and the two exes with the attached SHA256SUMS.txt, for example Get-FileHash .\ModAVDManager-0.4.1-win-x64.zip -Algorithm SHA256 in PowerShell.

The standalone manager does not update itself; replace it by hand. The copy in the ModAVD package is updated with the whole package. When you use it standalone, pass --root or set MODAVD_ROOT, or it reports that it cannot find the ModAVD root. Do not extract the standalone zip over the files of a ModAVD root.