英文:
How can I validate a DMG file?
问题
我有一个通过jpackage生成DMG文件的应用程序。
一旦用户下载DMG文件,他们告诉我它是损坏的,应该删除。
现在,我对这种格式不熟悉,也没有任何苹果Mac可以尝试。以防jpackage确实正在构建无效的软件包,我想在提供此下载之前进行检查。
在Github的MacOS运行程序上有没有验证DMG的方法?
英文:
I have an application that builds into a DMG file (via jpackage).
As soon as users download the DMG they tell me it is corrupt and should be deleted.
Now I am unfamiliar with that format and I have no access to any Apple Mac to try myself. Just in case jpackage is really building an invalid package I would like to check that before offering such a download.
Is there any way to validate a DMG on Github's MacOS runner?
答案1
得分: 0
我找到了这个网页https://macwrench.miraheze.org/wiki/Hdiutil,提到了hdiutil
支持一些对于验证DMG文件很有用的命令:
hdiutil verify -verbose
hdiutil imageinfo -verbose
hdiutil hfsanalyze -verbose
hdiutil checksum -type SHA256 -verbose
hdiutil info -verbose
hdiutil pmap -verbose
第一个命令已经给了我以下输出:
hdiutil: verify: checksum of "
verified CRC32 $9D7EB279
因此,我可以信任我生成的文件,应该寻找下载或用户方面的问题。
英文:
I found this web page https://macwrench.miraheze.org/wiki/Hdiutil which mentions that hdiutil
supports a number of commands that are useful for validating a DMG file:
hdiutil verify -verbose <dmg>
hdiutil imageinfo -verbose <dmg>
hdiutil hfsanalyze -verbose <dmg>
hdiutil checksum -type SHA256 -verbose <dmg>
hdiutil info -verbose
hdiutil pmap -verbose <dmg>
The first one already gave me output that ended like this:
hdiutil: verify: checksum of "<dmg>" is VALID
verified CRC32 $9D7EB279
So with this I can trust my generated file and should look for issues on the download or user side.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论