-
Notifications
You must be signed in to change notification settings - Fork 53
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
Make service working on Windows & Switch winpty to conpty on Windows 10 #20
Conversation
windows10 自动更新会影响吧,会下载 windows10 专用 binary 吗? |
conpty是内置的,不用下载任何东西 |
win10 agent 自动更新 |
抱歉理解错了,这个还需要改一下 |
要不单开一个仓库放win10的binary吧,这个方式比较简单。 |
不要这么做
…On Sun, May 19, 2024 at 22:09 UUBulb ***@***.***> wrote:
windows10 自动更新会影响吧,会下载 windows10 专用 binary 吗?
conpty是内置的,不用下载任何东西
win10 agent 自动更新
要不单开一个仓库放win10的binary吧,这个方式比较简单。
—
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7DUMPL4XLHCJQT4FFUGQ3ZDCXAZAVCNFSM6AAAAABH6JS4GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGI2TCNBZGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
那我改一下selfupdate,加一个win10的参数 |
既然能在 selfupdate 判断win10,也可以在 pty_windows 那里判断下,不用搞这么麻烦还要单独一个 binary |
抱歉没看到,等会改 |
好吧,我试了不行,不搞单独binary的话判断条件会比较麻烦,而且在编译windows arm64的时候 |
可以加个arm64条件编译,里面不支持winpty
…On Sun, May 19, 2024 at 23:42 UUBulb ***@***.***> wrote:
既然能在 selfupdate 判断win10,也可以在 pty_windows 那里判断下,不用搞这么麻烦还要单独一个 binary
好吧,我试了不行,不搞单独binary的话判断条件会比较麻烦,而且在编译windows arm64的时候go-winpty
会弹错误(因为他没作arm64兼容):
..***@***.***/winpty.go:72:19:
undefined: createAgentCfg
..***@***.***/winpty.go:112:19:
undefined: createSpawnCfg
—
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7DUMKA7VWVZUT4HYH3QNDZDDB5TAVCNFSM6AAAAABH6JS4GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGI3TSNZYGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
可以了,win10 x86和win11 arm64都测试可用了。2012R2也测试可用 |
a4439c4
to
54a35c7
Compare
* Remove the remnants of Daocloud * Make service working on Windows * Fix goreleaser * Change to a different detect method * Simplify * Fix version detection * fmt * fmt #2
Linux上测试过了吗 |
pty Linux不影响吧,我没动那一块的代码 |
Windows的服务需要主命令返回一个“成功”状态才能正确启用,于是把原来service.go里的服务创建部分移到main.go里了,并创建了新函数runService用来daemonize agent
诡异的是改完之后macos又不能通过launchctl启动了(直接运行没事),只能暂时搞个判断条件让macos运行原来的方法
另外加了一个build tag windows10 用于使用conpty代替原先的winpty,conpty是微软官方pty实现(需要version 1809以上),全架构通用,不需要额外依赖。这样agent也可以在win10/11 arm64上跑了。