C++ Mac 上接口 .dmg 文件的库

发布于 2024-08-15 20:57:45 字数 136 浏览 1 评论 0原文

我想编写一个 C++ 程序,该程序生成一个线程来执行 .dmg 文件并在 Snow Leopard 上监视其完成情况(成功/失败)。这会像 Linux 上 fork/exec shell 脚本一样简单吗?我需要第 3 方 C++ 库来连接 .dmg 文件吗?

I want to write a C++ program that spawns off a thread to execute a .dmg file and monitor its completion (success/fail) on Snow Leopard. Would this be as trivial as fork/exec a shell script on Linux? Would I need a 3rd party C++ library to interface .dmg files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尹雨沫 2024-08-22 20:57:45

OS X 上的 .dmg 文件是卷或单个文件系统映像的容器,因此不清楚执行 .dmg 文件的含义。如果您的意思是挂载 .dmg 文件中包含的文件系统,最简单的方法是使用 hdiutil 命令:

hdiutil attach /path/to/file.dmg

如果需要解析挂载的文件系统的信息,请使用 -plist< /code> 参数将通过 stdout 以 OS X plist 格式返回该信息。

A .dmg file on OS X is a container for an image of a volume or single file system so it's not clear what you mean by execute a .dmg file. If you mean mount the file systems contained in the .dmg file, the easiest way to do that is with the hdiutil command:

hdiutil attach /path/to/file.dmg

If you need to parse the information about the file systems mounted, use the -plist argument which will return that information in OS X plist format via stdout.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文