如何使用Mogenerator? [英] How do I use Mogenerator?

查看:327
本文介绍了如何使用Mogenerator?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Mogenerator 。现在我该怎么办?我如何使用它?

I installed Mogenerator. Now what do I do? How do I use it?

我遇到的第一个问题是,我不知道它安装到哪里。在安装过程中,它只让我选择硬盘驱动器安装它,而不是目录。最自然的位置是应用程序文件夹,但它不存在。

The first problem I have is that I have no idea where it was installed to. During the install process, it only let me select the hard drive to install it on, not the directory. The most natural location would be the Applications folder, but it isn't there.

href =http://github.com/rentzsch/mogenerator/blob/master/README.markdown =nofollow noreferrer> readme (我在网上找到)说明:

Next, the readme (which I found online) states:


Xmo'd通过注意保存
* .xcdatamodel时工作。如果模型文件的Xcode项目项注释
包含xmod,一个AppleScript被触发
,它根据你的
模型的文件名创建一个文件夹,并用导出的源代码文件填充它

你的模型。然后将新的
文件夹作为Group
参考添加到您的项目中,并将所有源
文件添加到您的项目中。

Xmo'd works by noticing when your *.xcdatamodel is saved. If the model file's Xcode project item comment contains xmod, an AppleScript is fired that creates a folder based on your model's file name and populates it with derived source code files from your model. It then adds the new folder to your project as a Group Reference and adds all the source files to your project.

上面的语句有几个问题不清楚:

There are several issues with the above statement that aren't clear:


  • Xcode项目项注释是指?如何使它包含xmod?

  • 添加此注释并让mogenerator监视 .xcdatamodel 文件的唯一方法使用发电机?是否有任何方法可以手动运行mogenerator,以便重新创建生成的文件?

  • What does "the model file's Xcode project item comment" refer to? How can I make it contain "xmod"?
  • Is adding this comment and having mogenerator monitor the .xcdatamodel file the only way to use mogenerator? Is there any way I can manually run mogenerator so that it recreates the generated files?

推荐答案

mogenerator是一个脚本,安装到你的开发人员目录中,我记得。但是它可能安装在〜/ Library下的Xcode脚本目录中。

mogenerator is a script that is installed into your developer directory as I recall. However it might be installed into the Xcode scripts directory under your ~/Library.

手动触发应用程序是什么意思?您可以通过触摸数据模型来触发构建。对数据模型的任何保存将触发构建

What do you mean by manually triggering the application? You can trigger a build by "touching" the data model. Any save on the data model will trigger the build

在Xcode中,如果选择模型文件并点击⌘I,您将获得其元数据。点击评论标签,并添加xmod。

In Xcode if you select the model file and hit ⌘I you will get its metadata. Click on the comments tab and add xmod there. mogenerator looks for that comment to know if it should generate files.

您可以从以下位置运行mogenerator:命令行以及它监视您的文件。在终端中键入 mogenerator --help 以查看选项。

You can run mogenerator from the command line as well as have it monitor your files. Type mogenerator --help in the Terminal to see the options.

这篇关于如何使用Mogenerator?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆