简体   繁体   English

什么是Mac上的App Bundle?

[英]What is an App Bundle on Mac?

I have a basic C++ applicatin build using g++ and -framework ... 我有一个使用g ++和-framework的基本C ++应用程序构建...

when I run it, I get a : 当我运行它时,我得到一个:

Working in unbundled mode.  You should build a .app wrapper for your Mac OS X applications.

(which is not std::couted by any of my application). (这不是std ::由我的任何申请表决)。

What causes this, and how can I get rid of it? 是什么导致这种情况,我怎么能摆脱它?

Thanks! 谢谢!

You need to create a folder structure and place the binary in a special location. 您需要创建文件夹结构并将二进制文件放在特殊位置。 For an example with explanation see this Qt page 有关解释的示例,请参阅此Qt页面

Mac OS X handles most applications as "bundles". Mac OS X将大多数应用程序作为“捆绑包”处理。 A bundle is a directory structure that groups related files together. 捆绑包是将相关文件组合在一起的目录结构。 Bundles are used for GUI applications, frameworks, and installer packages. 捆绑包用于GUI应用程序,框架和安装程序包。 These are presented to the user as one file in the Finder. 这些在Finder中作为一个文件呈现给用户。 When set up correctly, bundles make for easy deployment. 正确设置后,捆绑包便于部署。 All one needs to do is to archive the application using some preferred method. 所有人需要做的是使用一些首选方法归档应用程序。 Users then open the archive and drag the application to wherever they please and are ready to go. 然后,用户打开存档并将应用程序拖到他们喜欢的任何地方并准备好。

There is something written about this for wxWidgets too wxWidgets也有关于此的内容

MacOSX introduces a new way of putting together an application. MacOSX引入了一种组合应用程序的新方法。 Instead of adding a resource fork to the executable file, you can simply create a special directory (folder). 您可以简单地创建一个特殊目录(文件夹),而不是将资源分支添加到可执行文件中。 This is the preferred method for OSX. 这是OSX的首选方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM