在 OSX Lion 中创建 Hello, World 自动操作会产生“启动路径无法访问”的问题
我在 OSX 10.6 下开发了一些自动化操作,这些操作在自动化操作下成功执行,没有出现任何问题。这些操作的二进制产品在 OSX 10.7 (Lion) 下继续工作,但从源代码编译它们失败。
在尝试调试这个问题时,我创建了非常简单的“Hello,World”操作,但它不会在自动机中成功执行,ObjC 和 Applescript 变体都会出现“启动路径不可访问”,无论它们位于工作流程中的哪个位置放置。
我遵循的开发路径是:
- 在 XCode 4.1(内部版本 4B110,来自 App Store)中,创建一个新项目,并选择 Automator Action”作为类型
- 将输出类型设置为 com.apple.cocoa.string
- 在 ObjC 变体下,将 runWithInput:error 方法更改为返回 @"Hello, World!" 在 AppleScript 变体下,将 runWithInput_fromAction_error_ 方法更改为返回 "Hello, World!
- "箭头
- 通过右键单击“产品”组下的操作在查找器中打开新操作
- 双击该操作并让 automator 安装它
- 在 automator 中,使用新操作创建单个项目工作流程(但已尝试过多项目工作流程)
- 执行通过运行箭头运行工作流程并收到“启动路径无法访问”错误
我尝试重新启动 xcode、重新启动 automator、在关闭 automator 后删除我的 ~/Library/Automator 目录以及上述内容的组合,无需更改。不过,我没有主意了,
谢谢你的帮助。
I had a few automator actions developed under OSX 10.6, which successfully executed under automator without an issue. The binary products of these actions continues to work under OSX 10.7 (Lion), but compiling them from source fails.
In trying to debug this issue, I created the dirt simple "Hello, World" action, but it will not successfully execute in automator, both the ObjC and Applescript variant getting "launch path not accessible", no matter where in the workflow they are placed.
The development path I have followed is:
- In XCode 4.1 (build 4B110, from the App Store), create a new project, and select Automator Action" as the type
- Set Output type to com.apple.cocoa.string
- Under the ObjC variant, change the runWithInput:error method to return @"Hello, World!" Under the AppleScript variant, change the runWithInput_fromAction_error_ method to return "Hello, World!"
- Compile the action via the run arrow
- Open the new action in finder via right click on the action under the Products group
- Double click on the action and let automator install it
- In automator, create a single item workflow (but have tried multi-item workflows) with the new action
- Execute the workflow via the run arrow and receive the "launch path not accessible" error
I have tried restarting xcode, restarting automator, removing my ~/Library/Automator directory after shutting down automator, and combinations of the above without change. At this point, however, I'm out of ideas.
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据评论建议,对于后代来说,该问题似乎仅限于 XCode 4.1。 XCode 4.2 beta 不会表现出这种行为,并且似乎按照我在问题中概述的工作流程按预期运行。
As per the comment recommendation, and for posterity, the issue appears to be localized to XCode 4.1. XCode 4.2 betas do not exhibit this behavior and appear to operate as expected following the workflow I outlined in the question.
停止搜索后,找到了一个教程,但无法再测试它,因为我已经升级到 Xcode 4.2。如果有人可以验证这一点那就太好了:
http://macosxautomation.com/automator/xcodefix/index.html
after stopped searching for it, found an tutorial but can't test it anymore because I already upgraded to Xcode 4.2. It would be nice if someone could verify that:
http://macosxautomation.com/automator/xcodefix/index.html