Skip to content
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

Improve extract tarball package on windows. #5538

Closed
star-hengxing opened this issue Aug 29, 2024 · 20 comments
Closed

Improve extract tarball package on windows. #5538

star-hengxing opened this issue Aug 29, 2024 · 20 comments

Comments

@star-hengxing
Copy link
Contributor

Is your feature request related to a problem? Please describe.

7z extract tarball: package.tar.gz -> package.gz -> src
Use tar: package.tar.gz -> src

Describe the solution you'd like

Use busybox tar ...
https://frippery.org/busybox

Describe alternatives you've considered

No response

Additional context

No response

@star-hengxing star-hengxing changed the title Improve extract tarball package instead of 7z on windows. Improve extract tarball package on windows. Aug 29, 2024
@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

Does it support to extract 7z/bz2/xz?

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

看了下,除了 7z 其他的基本都支持,不过 xmake-repo 有些包是 7z 的。。不然倒是可以将 7z 替换成这个。。安装包还小点

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After looking at it, except for 7z, everything else is basically supported, but some xmake-repo packages are for 7z. . Otherwise, you can replace 7z with this one. . The installation package is a bit smaller

@star-hengxing
Copy link
Contributor Author

现在上规模的大型库,解压两次实在太慢。反正只给 Windows 用,多带一个工具感觉没啥问题。
而且如果用户使用 scoop 安装这个包,scoop 会自动创建好 tar shim ,命令行可以直接用。所以看下 xmake 解压缩模块怎么支持就行。

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

我是想做减法,目前塞了 7z.exe 和 curl.exe 。。我都想去掉。。我看 busybox 里有 wget ,要是它还是支持 7z ,我都可以把前两都去了,只塞 busybox。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Nowadays, for large-scale libraries, decompressing them twice is too slow. Anyway, it’s only for Windows, so it doesn’t feel like a problem to bring an extra tool.
And if the user uses scoop to install this package, scoop will automatically create the tar shim, which can be used directly from the command line. So just look at how the xmake decompression module supports it.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I want to do subtraction, and currently I have 7z.exe and curl.exe stuck. . I want to get rid of them all. . I see wget is included in busybox. If it still supports 7z, I can remove the first two and only add busybox.

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

而且塞 busybox 还不好塞。。

  1. x86 下打包 busybox.exe
  2. win7 x64 得打包 busybox64.exe
  3. win10 x64 以上得打包 busybox64u.exe
  4. win arm64 得用 busybox64a.exe

而且 arm 版本的二进制似乎会很慢

A binary for 64-bit Windows on ARM systems is provided as busybox64a.exe. It's 669,696 bytes in size. Take care to download this binary for Windows on ARM: binaries for other architectures will run, slowly and imperfectly, as emulations.

另外,这个走的也是 mingw64 编译的,估计也不会太快。

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

我看 win10 以上好像自带 tar 么。。tar.gz/zip 本身就能解,可以优先用。。不过需要过滤掉 msys2 下的 tar

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I think win10 or above seems to come with tar. . tar.gz/zip can be solved by itself and can be used first. . But you need to filter out the tar under msys2

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

  1. win tar 能解压 .tar.gz, .tar. zip
  2. msys2 不能解压 .zip,但是能解压 .tar .tar.gz, tar.bz2 ..

所以 优先尝试用 tar 去解压 tar.gz 应该还是可以的。。你试试

#5540

@waruqi waruqi added this to the v2.9.5 milestone Aug 29, 2024
@star-hengxing
Copy link
Contributor Author

#5540

不行,看 log 好像都没去 find tar

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

再试试

@star-hengxing
Copy link
Contributor Author

star-hengxing commented Aug 29, 2024

成功用 tar 解压了,但用 xmake l scripts\test.lua --shallow -v 解压时会打印目录文件路径刷屏

@waruqi
Copy link
Member

waruqi commented Aug 29, 2024

再试试

@star-hengxing
Copy link
Contributor Author

完美了。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


try again

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Successfully decompressed with tar, but when decompressing with xmake l scripts\test.lua --shallow -v, the print directory file path will be flushed.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


try again

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Perfect.

waruqi added a commit that referenced this issue Sep 4, 2024
waruqi added a commit that referenced this issue Sep 4, 2024
waruqi added a commit that referenced this issue Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants