Argh! The root cause was that my source management system (Perforce) was representing the file differently on Windows vs Mac. The first od that I showed above was done on Windows. I assumed Mac would be the same but it was not; it was the same as the second one.
To resolve this, just before building my zip file on Mac, I used awk to make the file Windows-friendly:
发布评论
评论(2)
您的 zip 程序中肯定有错误。我还使用 zip 版本 3(Gentoo Linux,x86_64),它没有出现此问题:
也许更新您的 zip 程序,或者下载原始源代码并尝试使用它们?
尝试看看您是否有 ZIP 或 ZIPOPT 环境变量(我没有)
You definitely have a bug in your zip program. I also use zip version 3 (Gentoo Linux, x86_64) and it does not exhibit this problem:
Maybe update your zip program, or download the original sources and try with them?
Try and see also whether you have a ZIP or ZIPOPT environment variable (I don't)
啊!根本原因是我的源管理系统 (Perforce) 在 Windows 和 Mac 上以不同的方式表示文件。我上面展示的第一个
od
是在 Windows 上完成的。我以为 Mac 会是一样的,但事实并非如此;和第二个一样。为了解决这个问题,在 Mac 上构建我的 zip 文件之前,我使用 awk 使该文件适合 Windows:(
您可以使用 unix2dos,但我的构建机器上没有安装它。)
Argh! The root cause was that my source management system (Perforce) was representing the file differently on Windows vs Mac. The first
od
that I showed above was done on Windows. I assumed Mac would be the same but it was not; it was the same as the second one.To resolve this, just before building my zip file on Mac, I used awk to make the file Windows-friendly:
(You could use unix2dos but I don't have that installed on my build machine.)