在Mac 10.9.4上安装lightblue出错

0 投票
2 回答
2777 浏览
提问于 2025-04-18 16:17

我正在尝试在 OSx 10.9.4 和 xCode 5.1.1 上安装 lightblue(http://lightblue.sourceforge.net/),但是当我执行

sudo python setup.py install

时出现了这个错误:

=== BUILD TARGET LightAquaBlue OF PROJECT LightAquaBlue WITH CONFIGURATION Release ===

Check dependencies
error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.4u.sdk'

所以我在 OSx 上现有的内容是:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

还有

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

谢谢!

2 个回答

1

我觉得你应该按照作者在说明文件里的指示来操作。

Xcode 1.5 / Mac OS X 10.3 的安装说明

LightAquaBlue 框架的 Mac OS X 安装文件在一个 .xcodeproj 包里,这个包只能用 Xcode 2.1 及以上版本打开,而 Xcode 2.1 不能在 Mac OS X 10.3 上运行。所以,要在 Mac OS X 10.3 上构建 LightBlue,你需要自己创建一个 .xcode 包:

  • 打开 Xcode,选择 文件 -> 新建项目。选择“Cocoa Framework”(在“框架”下拉列表中),然后把项目保存为“LightAquaBlue”。保存的位置随便,只要不覆盖掉现有的 LightBlue 的 src/mac/LightAquaBlue 目录就可以。
  • 接着去 项目 -> 添加文件...,把 LightBlue 的 src/mac/LightAquaBlue 文件夹里的所有 .h 和 .m 文件都添加进来。还要添加 OBEXFileTransferDictionary.plist、OBEXObjectPushDictionary.plist 和 SerialPortDictionary.plist 这些文件。
  • 然后去 项目 -> 添加框架...,添加 IOBluetooth.framework(这个文件在 /System/Library/Frameworks/IOBluetooth.framework 里)。
  • 在 Xcode 窗口左侧的“目标”项目上点击,这里会显示你刚刚添加的所有 .h 和 .m 文件,还有其他一些文件。在“角色”这一列,所有的 .h 文件现在都是“项目”角色。点击每个下拉菜单,把它们都改成“公开”。
  • 现在去 Finder 找到你刚创建的 xcode 项目。复制 LightAquaBlue.xcode 文件,然后把它粘贴到 LightBlue 的 src/mac/LightAquaBlue 目录里。

接下来去 LightBlue 的根目录,运行以下命令:

sudo python setup.py install

你应该能看到 xcode 项目构建的输出结果。

2

GitHub上下载最新版本

你需要把第66行的内容从

os.system("xcodebuild install -arch '$(NATIVE_ARCH_ACTUAL)' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")

改成

os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")

(把 $(NATIVE_ARCH_ACTUAL) 改成 x86_64。)

撰写回答