简体   繁体   English

如何安装 MacOS 应用程序所需的系统框架

[英]How to install a system framework required for MacOS application

Years of my software development are worth nothing when it comes to MacOS, I need your help guys.在 MacOS 方面,我多年的软件开发一文不值,我需要你们的帮助。

Say, I have an application bundle brought to fresh MacOSX Lion, and it complains that Metal Framework is not found.说,我有一个应用程序包被带到新的 MacOSX Lion,它抱怨没有找到 Metal Framework。 Indeed, the otool shows a dependency on Metal.事实上,otool 显示了对 Metal 的依赖。 I don't even ask how a dependency on a framework could be described in a bundle for now!我什至不问现在如何在包中描述对框架的依赖! First please help me to understand: how do I install a missing Apple's System Framework to the given MacOS manually?首先请帮助我理解:如何手动将缺少的 Apple 系统框架安装到给定的 MacOS? And, if this makes sense at all:而且,如果这有道理的话:

  • What are the constraints?有哪些限制?
  • Are all frameworks available on all MacOS (OSX) versions?是否所有框架都适用于所有 MacOS (OSX) 版本?
  • How to get rid of a certain dependency, if it beaks compatibility with an old MacOS release?如果它与旧的 MacOS 版本兼容,如何摆脱某种依赖?

how do I install a missing Apple's System Framework to the given MacOS manually?如何手动将缺少的 Apple 系统框架安装到给定的 MacOS?

You don't.你没有。 System frameworks are exactly that - frameworks distributed with the system.系统框架就是这样 - 与系统一起分发的框架。 They're not standalone packages that you can mix and match.它们不是可以混合搭配的独立软件包。 There are surely complex interdependencies between the frameworks and the core OS, and the different frameworks themselves.框架和核心操作系统之间以及不同框架本身之间肯定存在复杂的相互依赖关系。

The different system frameworks comprise the macOS API for that version of the operating system.不同的系统框架构成了该版本操作系统的 macOS API。 You can't simply take the Metal framework and install it on an older OS - it depends on myriad other parts of the system.您不能简单地采用 Metal 框架并将其安装在较旧的操作系统上——这取决于系统的无数其他部分。

Are all frameworks available on all MacOS (OSX) versions?是否所有框架都适用于所有 MacOS (OSX) 版本?

No. See the OS X Frameworks documentation, specifically the section "System Frameworks" which details all system frameworks and when they became available.否。请参阅OS X 框架文档,特别是“系统框架”部分,其中详细介绍了所有系统框架以及它们何时可用。

How to get rid of a certain dependency, if it beaks compatibility with an old MacOS release?如果它与旧的 MacOS 版本兼容,如何摆脱某种依赖?

Do you have the source code for the application?你有应用程序的源代码吗? Rewrite the feature to use an alternative (and available on your distribution target) technology.重写该功能以使用替代(并且在您的分发目标上可用)技术。 In your example, that would be OpenGL instead of Metal.在您的示例中,那将是 OpenGL 而不是 Metal。

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

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