如何为 iOS 设备构建 JavaScriptCore?

发布于 2024-09-13 10:49:17 字数 215 浏览 2 评论 0原文

我已经下载了 Webkit nightly build。我打开 JavaScriptCore 并构建它。编译完成,没有任何错误。但输出是一个仅包含 OS X 二进制文件的框架。我尝试取消选中“仅构建活动架构”,但仅构建桌面架构。 (我用 lipo 工具查看了二进制文件)

有什么简单的方法可以做到这一点吗?我期望静态库可以链接到我的 iOS 应用程序项目。我正在尝试将 JSC 嵌入为游戏内脚本引擎。

I've downloaded Webkit nightly build. I open JavaScriptCore and built it. Compilation done without any error. But the output was a Framework contains only OS X binary. I tried unchecking 'build active architecture only' but only desktop architectures built. (I looked in the binary with lipo tool)

Is there any simple way to do this? I'm expecting static library can be linked to my iOS app project. I'm trying to embed JSC as in-game script engine.

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

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

发布评论

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

评论(2

野心澎湃 2024-09-20 10:49:17

看起来有一个 JavaScriptCore 的 XCode 项目是 WebKit 代码库的一部分。我能够将目标 SDK 更改为 iOS,将目标架构更改为 arm6/arm7,并且动态框架构建得很好。当然,您需要将其编译为静态库,因此您需要为 iOS 创建一个新的静态库目标,并将 Targets->JavaScriptCore 下的所有内容复制到新的静态库目标中。这可能有点棘手,但它可能会起作用。

It looks like there is an XCode project for JavaScriptCore that is part of the WebKit codebase. I was able to change the target SDK to iOS and the target architecture to arm6/arm7, and the dynamic framework built fine. You'll need to compile it to a static library, of course, so you'll need to create a new static library target for iOS and copy everything under Targets->JavaScriptCore into your new static library target. It may be a little tricky, but it might work.

踏月而来 2024-09-20 10:49:17

我分叉了 phoboslab 的存储库,并将其更新到 WebKit 的最新版本(截至上周五)。它与 iOS 5 和 6 兼容,并包含 iOS 7 中的 Objective-C 到 Javascript 桥接器(不使用私有框架或函数)。

您可以在 GitHub 上找到该存储库:
https://github.com/darionco/JavaScriptCore-iOS

我还在为方便起见,包含库 (.a) 和所需头文件的存储库。

干杯!

I forked phoboslab's repo and updated it to the latest verson from WebKit (as of last friday). It is compatible with iOS 5 and 6 and includes the Objective-C to Javascript bridge to be featured in iOS 7 (no private frameworks or function used).

You can find the repo on GitHub at:
https://github.com/darionco/JavaScriptCore-iOS

I also added a ZIP file to the repo containing the library (.a) and needed header files for convenience.

Cheers!

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