-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Add support for Winget #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
wangl-cc
left a comment
There was a problem hiding this 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 }}" |
There was a problem hiding this comment.
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。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实也可以拿我的token去提PR,这样我就可以水commits了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实用你的 token 也可以。不过你如果没有这个仓库的权限,似乎没有什么安全的方法设置这个 token。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯……也是,还是用官方提供的token把
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也许可以不用这个不带版本的asset,在后面更新得时候直接用带版本号的版本。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
的确可以这样,可以改一下
Added validation for WINGET_GITHUB_TOKEN in workflow.
|
@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" |
There was a problem hiding this comment.
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打开的时候会冲突
There was a problem hiding this comment.
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。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个倒是可以,但是 winget 可以在后面加参数来忽略 self update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所以我认为没有这个必要就是了
There was a problem hiding this comment.
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 也给塞里头
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Winget 会怎么安装一个包呀?每个包有自己的一个文件夹,然后把 DLL 和 EXE 装在相同的目录下面吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Winget 会怎么安装一个包呀?每个包有自己的一个文件夹,然后把 DLL 和 EXE 装在相同的目录下面吗?
对的,可以参考wpfgui
There was a problem hiding this comment.
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在同一个文件夹?
There was a problem hiding this comment.
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 那边打包。
There was a problem hiding this comment.
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 就行。
No description provided.