XCode 3.2 Ruby 和 Python 模板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1382252/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:48:36  来源:igfitidea点击:

XCode 3.2 Ruby and Python templates

pythonrubycocoaxcodepyobjc

提问by Jacob

Under xcode 3.2 my ObjectiveC + Python/Ruby projects can still be opened updated and compiled, but you cannot create new projects.

在 xcode 3.2 下,我的 ObjectiveC + Python/Ruby 项目仍然可以打开更新和编译,但你不能创建新项目。

Given that all traces of ruby and python are missing from xcode 3.2 (ie create project and add new ruby/python file), is there an easy way to get the templates installed again?

鉴于 xcode 3.2 中缺少所有 ruby​​ 和 python 痕迹(即创建项目并添加新的 ruby​​/python 文件),是否有一种简单的方法可以再次安装模板?

I found some info about copying them into a folder somewhere, but I cant seem to get it to work, I suspect the folder location has changed for 3.2.

我找到了一些关于将它们复制到某个文件夹中的信息,但我似乎无法让它工作,我怀疑文件夹位置已更改为 3.2。

采纳答案by christianbrodbeck

The folder for application templates in 3.2 is: /Developer/Library/Xcode/Project Templates/Application

3.2中应用模板的文件夹是:/Developer/Library/Xcode/Project Templates/Application

Templates for python are at: http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode/Project%20Templates/

python 模板位于:http: //svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode/Project%20Templates/

use:

用:

$svn co <address of template you want> /Developer/Library/Xcode/Project Templates/Application/<Folder you want it in>

e.g.

例如

$svn co http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode/Project%20Templates/Cocoa-Python%20Document-based%20Application/ /Developer/Library/Xcode/Project\ Templates/Application/Cocoa-Python\ NSDocument\ based\ Application

回答by Grant Limberg

Here's the wordon this from Chris Espinosa on the Xcode-Users mailing list:

这是Xcode-Users 邮件列表上 Chris Espinosa的一句话

We are deemphasizing Cocoa-Python and Cocoa-Ruby, though existing project will continue to build in Xcode. You can duplicate one of your existing projects and use the new Rename command to start a new project.

Bugs filed against the removal of these templates will be duplicated to No Python/Ruby templates in Xcode, and we'll use that bug to gauge the need for that support in the future.

我们不再强调 Cocoa-Python 和 Cocoa-Ruby,尽管现有项目将继续在 Xcode 中构建。您可以复制现有项目之一并使用新的重命名命令来启动新项目。

反对删除这些模板的错误将复制到 Xcode 中的 No Python/Ruby 模板,我们将使用该错误来衡量未来对该支持的需求。

I'd say file a bug report at https://bugreport.apple.comto voice your opinion on the subject.

我会说在https://bugreport.apple.com上提交错误报告来表达你对这个主题的看法。

回答by Barry Wark

Beginning with Xcode 3.2, Apple decided to not include project and file templates from 3rd party projects (including PyObjC, RubyCocoa or MacRuby). Since these template files were often updated more frequently than Xcode's release cycle, the templates shipped with Xcode were often out of date. Developers are now encouraged to install the templates directly from those projects' repositories. PyObjC templates are currently available only in SVN, though the PyObjC devs intend to make them available on the website "soon". Thisquestion details how to install new templates.

从 Xcode 3.2 开始,Apple 决定不包含来自 3rd 方项目(包括 PyObjC、RubyCocoa 或 MacRuby)的项目和文件模板。由于这些模板文件的更新频率通常高于 Xcode 的发布周期,因此 Xcode 附带的模板通常已经过时。现在鼓励开发人员直接从这些项目的存储库安装模板。PyObjC 模板目前仅在 SVN 中可用,但 PyObjC 开发人员打算“很快”在网站上提供它们。这个问题详细说明了如何安装新模板。

回答by papahabla

  • Download the Cocoa-Ruby Templatesto your '/Developer/Library/Xcode/Project Templates/Application/Ruby Application/' and '/Developer/Library/Xcode/File Templates/Ruby/' directories.
  • Install the latest version of Ruby Cocoa.
  • Cocoa-Ruby 模板下载到您的“/Developer/Library/Xcode/Project Templates/Application/Ruby Application/”和“/Developer/Library/Xcode/File Templates/Ruby/”目录。
  • 安装最新版本的Ruby Cocoa

More info can be found on the Ruby Cocoa website.

更多信息可以在Ruby Cocoa 网站上找到

回答by Jacob

The above coments were all good and helpful but didn't really help. Easiest thing I could find is to create an empty python/ruby project in xcode 3.1, then make copies of this project folder for every new project you work on.

以上评论都很好,很有帮助,但并没有真正帮助。我能找到的最简单的方法是在 xcode 3.1 中创建一个空的 python/ruby 项目,然后为您处理的每个新项目制作该项目文件夹的副本。

When you open the new/blank project, 3.2 has a new feature that lets you rename the project so you can have proper names for eacn new project.

当您打开新建/空白项目时,3.2 有一个新功能,可让您重命名项目,以便您可以为 eacn 新项目命名。