Skip to content

Conversation

@JasonHuang79
Copy link

No description provided.

@JasonHuang79 JasonHuang79 changed the title ci; Add support for Winget ci: Add support for Winget Oct 12, 2025
@JasonHuang79 JasonHuang79 reopened this Oct 12, 2025
Copy link
Member

@wangl-cc wangl-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献,不过我不是很懂 winget,后续可能也需要你来维护。

--version "$KOMAC_VERSION" \
--urls "https://github.com/MaaAssistantArknights/maa-cli/releases/download/v$KOMAC_VERSION/maa_cli-x86_64-pc-windows-msvc-winget.zip,https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases/download/v$KOMAC_VERSION/maa_cli-aarch64-pc-windows-msvc.zip" \
--submit \
--token "${{ secrets.WINGET_GITHUB_TOKEN }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 token 好像只需要 PR 的权限,这样可以试试 secrets.MAA_HOMEBREW_BUMP_PR,不过这样会是用我的账号提得 PR。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其实也可以拿我的token去提PR,这样我就可以水commits了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其实用你的 token 也可以。不过你如果没有这个仓库的权限,似乎没有什么安全的方法设置这个 token。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯……也是,还是用官方提供的token把

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在 @MistEO 玛丽大人给我们开了个[secrets.WINGET_GITHUB_TOKEN],以后我会用那个

archive_name_unversioned="maa_cli-$target.zip"
mv "$dir/maa.exe" "$dir/maa-cli.exe"
zip -j "$archive_name" "$dir/maa-cli.exe"
cp "$archive_name" "$archive_name_unversioned"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也许可以不用这个不带版本的asset,在后面更新得时候直接用带版本号的版本。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

的确可以这样,可以改一下

@wangl-cc
Copy link
Member

@JasonHuang79 你有什么消息,可以直接发在 PR 这里,我不怎么看群。特别是我最近比较忙,所以可能顾不上。但是 PR 有什么更新,我都会抽空看一眼。

@JasonHuang79
Copy link
Author

@JasonHuang79 你有什么消息,可以直接发在 PR 这里,我不怎么看群。特别是我最近比较忙,所以可能顾不上。但是 PR 有什么更新,我都会抽空看一眼。

行,主要是我平时都习惯在群里发而已

@JasonHuang79
Copy link
Author

@JasonHuang79 你有什么消息,可以直接发在 PR 这里,我不怎么看群。特别是我最近比较忙,所以可能顾不上。但是 PR 有什么更新,我都会抽空看一眼。

等下我要重新改一下,应该是不需要加target了

archive_name="maa_cli-v$VERSION-$target.zip"
archive_name_unversioned="maa_cli-$target.zip"
mv "$dir/maa.exe" "$dir/maa-cli.exe"
zip -j "$archive_name" "$dir/maa-cli.exe"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangl-cc 这里的文件名可以用maa-cli.exe吗?
主要是因为现在跟gui版的maa都是同样的名称(maa.exe),用shell打开的时候会冲突

Copy link
Member

@wangl-cc wangl-cc Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的。不过 winget 是不是应该单独编译一个不能 self update 的版本出来,因为包管理器一般都要求不允许可以 self update。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个倒是可以,但是 winget 可以在后面加参数来忽略 self update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以我认为没有这个必要就是了

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的。不过 winget 是不是应该单独编译一个不能 self update 的版本出来,因为包管理器一般都要求不允许可以 self update。

@wangl-cc 我现在撤回这句

所以我认为没有这个必要就是了

我们的确需要一个单独编译一个不能 self update 的版本,并且如果可以,我们把 core 也给塞里头

Copy link
Member

@wangl-cc wangl-cc Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Winget 会怎么安装一个包呀?每个包有自己的一个文件夹,然后把 DLL 和 EXE 装在相同的目录下面吗?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Winget 会怎么安装一个包呀?每个包有自己的一个文件夹,然后把 DLL 和 EXE 装在相同的目录下面吗?

对的,可以参考wpfgui

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Winget 会怎么安装一个包呀?每个包有自己的一个文件夹,然后把 DLL 和 EXE 装在相同的目录下面吗?

但是我记得core并不和maa.exe在同一个文件夹?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认是放在 AppData 下面的,不过放在一个文件夹下是可以的,Core 那边 Linux 的 AppImage 就是这么带上 maa-cli 的。不过有个问题就是cli的更新比较少,所以如果带上 Core 的话会导致 Core 会比较旧。如果带上 Core 一起分发的话,我可能更建议直接在 Core 那边打包。

Copy link
Author

@JasonHuang79 JasonHuang79 Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认是放在 AppData 下面的,不过放在一个文件夹下是可以的,Core 那边 Linux 的 AppImage 就是这么带上 maa-cli 的。不过有个问题就是cli的更新比较少,所以如果带上 Core 的话会导致 Core 会比较旧。如果带上 Core 一起分发的话,我可能更建议直接在 Core 那边打包。

那还是不要带上了,反正有 maa update ,并且不在同一文件夹下,用 winget update maa-cli 也不用加 --force 参数就是。但是如果能 self update 的话,用 winget update maa-cli 就要加 --force 参数,所以说我们只需要单独编译一个不能 self update 的版本并把名称从 maa.exe 改为 maa-cli.exe 就行。

@JasonHuang79 JasonHuang79 changed the title ci: Add support for Winget feat: Add support for Winget Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants