Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any interest in built-in templates? #79

Closed
wants to merge 1 commit into from
Closed

Any interest in built-in templates? #79

wants to merge 1 commit into from

Conversation

iriz
Copy link

@iriz iriz commented Dec 15, 2011

You may or may not be interested in this update I just commited:

Compile and build the default templates into the mogenerator
executable, to make it standalone for people (like me) who are happy
with the default templates. For custom installed templates everything
of course works as before.

I do this with a custom build rule script that generates a .m file for each template,
containing an NSString with the template text. This string then becomes the
final fallback for the template search.

Compile and build the default templates into the mogenerator
executable, to make it standalone for people (like me) who are happy
with the default templates. For custom installed templates everything
works as before.
@rentzsch
Copy link
Owner

rentzsch commented Jan 7, 2012

Oops, I overlooked this one.

I like the idea of building default templates into the tool itself, but I think a better way would be to house them in mogenerator's binary as a Mach-O section, see http://stackoverflow.com/questions/7780789/reading-data-embedded-plist-linked-to-executable-through-sectcreate-text for how Apple embeds Info.plist's into standalone binaries.

I think we can do the same with mogenerator.

@iriz
Copy link
Author

iriz commented Jan 9, 2012

Interesting approach. I have implemented your suggestion, using the PlistBuddy tool to add the templates to Info.plist and then link that into the executable. I'll tidy up and commit in the next couple of days, so you can have a look and see what you think.

@rentzsch
Copy link
Owner

rentzsch commented Jan 9, 2012

Cool, thanks.

@iriz
Copy link
Author

iriz commented Jan 10, 2012

I have committed the Info.plist approach. There is an issue there, which is that I cannot find a way in Xcode to make the executable depend on the Info.plist file so that it's relinked when the file changes. Which means that if you make changes to any of the templates, and hit Build, the Info.plist file will be updated but not the tool.

For that reason, rather than pushing to master I created a branch: "infoplist". master still has my first approach, which does not have this dependency issue.

@rentzsch
Copy link
Owner

Sorry I'm dragging my feet on this one -- I've been rather busy,

FYI I'll take a look at your fork and hopefully it can make v1.25.

@iriz
Copy link
Author

iriz commented Jan 27, 2012

No worries.

This was referenced Feb 17, 2012
@rentzsch
Copy link
Owner

Included in 1.26.

@rentzsch rentzsch closed this Apr 13, 2012
@iriz
Copy link
Author

iriz commented Apr 13, 2012

Cool!

-ingvar

On 13 Apr 2012, at 04:51, Jonathan 'Wolf' Rentzsch [email protected] wrote:

Included in 1.26.


Reply to this email directly or view it on GitHub:
#79 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants