是否有用于使用自动工具OS X框架的任何文档? [英] Is there any documentation for building OS X frameworks using autotools?
问题描述
我的共享库跨平台的,而且我在使用GNU自动工具为构建系统。我希望能够打包库在OS X系统的框架是否有可能使用自动工具+额外的脚本来做到这一点如庆典?
I have a cross-platform shared library, and I am using GNU autotools for the build system. I would like to be able to package the library as a framework on OS X. Is it possible to do this with autotools + additional scripting e.g. bash?
是否有这样做的任何好的文档,或者没有人知道,这是否一个项目的例子,我可以复制?
Is there any good documentation for doing this, or does anyone know an example of a project that does this, which I could copy?
推荐答案
一个框架是一个荣耀的目录,其中包括一个元数据文件(Info.plist),这样一个或多个库。我不知道是否有自动工具为框架的支持,但这样的:
A framework is a glorified directory that includes a metadata file (Info.plist) and one or more libraries. I’m not sure if there’s autotools support for frameworks but something like:
# create/cd MyFramework.framework
mkdir MyFramework.framework
cd MyFramework.framework
# create/cd MyFramework.framework/Versions
mkdir Versions
cd Versions
# create/cd MyFramework.framework/Versions/A
mkdir A
cd A
# create MyFramework.framework/Versions/A/MyFramework (the dylib)
cp /path/to/mylibrary.dylib MyFramework
# create MyFramework.framework/Versions/A/Resources
mkdir Resources
# create MyFramework.framework/Versions/A/Resources/Info.plist
cp /path/to/Info.plist Resources
# cd to MyFramework.framework/Versions
cd ..
# create MyFramework.framework/Versions/Current -> A
ln -s A Current
# cd to Myframework.framework
cd ..
# create MyFramework.framework/MyFramework -> Versions/Current/MyFramework
ln -s Versions/Current/MyFramework MyFramework
# create MyFramework.framework/Resources -> Versions/Current/Resources
ln -s Versions/Current/Resources Resources
应该是足够给予正确定义Info.plist文件和mylibrary.dylib。
should be enough given a properly defined Info.plist file and mylibrary.dylib.
有关框架的目录结构的更多信息和Info.plist中的内容,请参阅<一个href=\"http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html\"相对=nofollow>框架编程指南。
For more information about the framework directory structure and the contents of Info.plist, see the Framework Programming Guide.
这篇关于是否有用于使用自动工具OS X框架的任何文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!