Re: [MacRuby-devel] Adding ruby 1.8.7 scripts to an application bundle during build
Hey Stephen, You will need to create a new "Move Files" phase (can't remember the exact name at the moment…) after the macruby_deploy phase. The macruby_deploy script will attempt to compile any *.rb file it finds under your project, which is why you're seeing this. Cheers, Josh On Wednesday, June 20, 2012 at 9:26 PM, Stephen Horne wrote: > I have a collection of scripts that I want to call from my application. These > are 1.8.7 ruby scripts, and cannot be converted to MacRuby. > > Currently, I have them installed in a separate directory, and I just call > them from the application. > > I would like to place them within the bundle to keep everything together, and > prevent breaking the external ones through future changes, but I can't figure > out how to copy them in during the build phase without trying to compile them > to MacRuby, which fails. > > I've been trying to do it by adding the directory to the 'Copy Bundle > Resources' phase of the project's Build Phases in Targets. > > Does anyone know a way to do this? > > Thanks, > -- > Stephen Horne > > ___ > MacRuby-devel mailing list > [email protected] (mailto:[email protected]) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Adding ruby 1.8.7 scripts to an application bundle during build
Hey Josh, I think this is where I'm getting lost - I can't see a macruby_deploy phase anywhere. I'm clicking on the project icon above all the files in the project navigator, then clicking on the target, then 'Build Phases', and the final phase is 'Copy Bundle Resources'. I tried adding another copy files after that one, but it still compiles them. I've tried googling it, but no luck. Am I missing something obvious? Thanks -- Stephen Horne On 21/06/2012 at 08:25, Joshua Ballanco wrote: > Hey Stephen, > > You will need to create a new "Move Files" phase (can't remember the exact > name at the moment…) after the macruby_deploy phase. The macruby_deploy > script will attempt to compile any *.rb file it finds under your project, > which is why you're seeing this. > > Cheers, > > Josh > > On Wednesday, June 20, 2012 at 9:26 PM, Stephen Horne wrote: > > > I have a collection of scripts that I want to call from my application. > > These are 1.8.7 ruby scripts, and cannot be converted to MacRuby. > > > > Currently, I have them installed in a separate directory, and I just call > > them from the application. > > > > I would like to place them within the bundle to keep everything together, > > and prevent breaking the external ones through future changes, but I can't > > figure out how to copy them in during the build phase without trying to > > compile them to MacRuby, which fails. > > > > I've been trying to do it by adding the directory to the 'Copy Bundle > > Resources' phase of the project's Build Phases in Targets. > > > > Does anyone know a way to do this? > > > > Thanks, > > -- > > Stephen Horne > > > > ___ > > MacRuby-devel mailing list > > [email protected] > > (mailto:[email protected]) > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > ___ > MacRuby-devel mailing list > [email protected] (mailto:[email protected]) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Adding ruby 1.8.7 scripts to an application bundle during build
I'm going to risk this being a stupid answer, but have you tried deleting the file extension? That way MacRuby will not compile those files, and you might still be able to execute those scripts they way you need them. -- Mark Villacampa Twitter: @MarkVillacampa On Thursday, June 21, 2012 at 1:00 PM, Stephen Horne wrote: > Hey Josh, > > I think this is where I'm getting lost - I can't see a macruby_deploy phase > anywhere. > > I'm clicking on the project icon above all the files in the project > navigator, then clicking on the target, then 'Build Phases', and the final > phase is 'Copy Bundle Resources'. > > I tried adding another copy files after that one, but it still compiles them. > I've tried googling it, but no luck. Am I missing something obvious? > > Thanks > -- > Stephen Horne > > > On 21/06/2012 at 08:25, Joshua Ballanco wrote: > > > Hey Stephen, > > > > You will need to create a new "Move Files" phase (can't remember the exact > > name at the moment…) after the macruby_deploy phase. The macruby_deploy > > script will attempt to compile any *.rb file it finds under your project, > > which is why you're seeing this. > > > > Cheers, > > > > Josh > > > > On Wednesday, June 20, 2012 at 9:26 PM, Stephen Horne wrote: > > > > > I have a collection of scripts that I want to call from my application. > > > These are 1.8.7 ruby scripts, and cannot be converted to MacRuby. > > > > > > Currently, I have them installed in a separate directory, and I just call > > > them from the application. > > > > > > I would like to place them within the bundle to keep everything together, > > > and prevent breaking the external ones through future changes, but I > > > can't figure out how to copy them in during the build phase without > > > trying to compile them to MacRuby, which fails. > > > > > > I've been trying to do it by adding the directory to the 'Copy Bundle > > > Resources' phase of the project's Build Phases in Targets. > > > > > > Does anyone know a way to do this? > > > > > > Thanks, > > > -- > > > Stephen Horne > > > > > > ___ > > > MacRuby-devel mailing list > > > [email protected] > > > (mailto:[email protected]) > > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > > > > > > > ___ > > MacRuby-devel mailing list > > [email protected] > > (mailto:[email protected]) > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > ___ > MacRuby-devel mailing list > [email protected] (mailto:[email protected]) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Adding ruby 1.8.7 scripts to an application bundle during build
Consider yourself my hero Mark. Oddly, they appear in the bundle uncompiled, but with their extensions back on =] Thanks for the help. -- Stephen Horne On 21/06/2012 at 12:02, Mark Villacampa wrote: > I'm going to risk this being a stupid answer, but have you tried deleting the > file extension? That way MacRuby will not compile those files, and you might > still be able to execute those scripts they way you need them. > > -- > Mark Villacampa > Twitter: @MarkVillacampa > > > On Thursday, June 21, 2012 at 1:00 PM, Stephen Horne wrote: > > > Hey Josh, > > > > I think this is where I'm getting lost - I can't see a macruby_deploy phase > > anywhere. > > > > I'm clicking on the project icon above all the files in the project > > navigator, then clicking on the target, then 'Build Phases', and the final > > phase is 'Copy Bundle Resources'. > > > > I tried adding another copy files after that one, but it still compiles > > them. I've tried googling it, but no luck. Am I missing something obvious? > > > > Thanks > > -- > > Stephen Horne > > > > > > On 21/06/2012 at 08:25, Joshua Ballanco wrote: > > > > > Hey Stephen, > > > > > > You will need to create a new "Move Files" phase (can't remember the > > > exact name at the moment…) after the macruby_deploy phase. The > > > macruby_deploy script will attempt to compile any *.rb file it finds > > > under your project, which is why you're seeing this. > > > > > > Cheers, > > > > > > Josh > > > > > > On Wednesday, June 20, 2012 at 9:26 PM, Stephen Horne wrote: > > > > > > > I have a collection of scripts that I want to call from my application. > > > > These are 1.8.7 ruby scripts, and cannot be converted to MacRuby. > > > > > > > > Currently, I have them installed in a separate directory, and I just > > > > call them from the application. > > > > > > > > I would like to place them within the bundle to keep everything > > > > together, and prevent breaking the external ones through future > > > > changes, but I can't figure out how to copy them in during the build > > > > phase without trying to compile them to MacRuby, which fails. > > > > > > > > I've been trying to do it by adding the directory to the 'Copy Bundle > > > > Resources' phase of the project's Build Phases in Targets. > > > > > > > > Does anyone know a way to do this? > > > > > > > > Thanks, > > > > -- > > > > Stephen Horne > > > > > > > > ___ > > > > MacRuby-devel mailing list > > > > [email protected] > > > > (mailto:[email protected]) > > > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > > > > > > > > > > > > > ___ > > > MacRuby-devel mailing list > > > [email protected] > > > (mailto:[email protected]) > > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > > > > > > > ___ > > MacRuby-devel mailing list > > [email protected] > > (mailto:[email protected]) > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > > > > > > ___ > MacRuby-devel mailing list > [email protected] (mailto:[email protected]) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] MacRuby questions
Hello all, I'm an experienced Mac developer trying to add Ruby to my toolbox. Most of my previous experience is with Python, Tcl, Objective-C, and AppleScript, and I'd like to add Ruby as well. My interest in MacRuby stems in large part because it appears to have vastly superior app deployment tools than are found in standard Ruby, which are non-existent. I had a few questions about MacRuby and its differences from standard C-Ruby: 1. Is MacRuby mature enough to function as a drop-in replacement for standard Ruby? Are there significant gaps in functionality? Specifically, does ffi work? (I tried to run a "hello world" ruby-tk app using the ffi and ffi-tk gems, but MacRuby just segfaulted with an error code of 11.) 2. Is it possible to have a command-line toolchain/workflow for development and deployment of MacRuby apps, or is heavy use of Xcode required? Here's a bit more about my specific use case for MacRuby: I develop desktop apps using scripting languages; most of my experience to date has been with Tcl/Tk and Python/Tk, dropping down into Objective-C or C where necessary for speed or integration with specific API's, using just a basic text editor-Terminal workflow. (I'm one the maintainers of Tk on the Mac.) My apps integrate heavily into Cocoa or Carbon API's when necessary to implement stuff like NSServices, AppleScript support, etc. Both Tcl and Python have excellent support for deployment of desktop apps (Tcl has an entire standalone app environment, while Python has py2app and related tools). Standard Ruby has no such tools on the Mac whatsoever. I like the fact that MacRuby would make AppleScript support for my app easy, and the macruby_deploy tool seems to be what's missing from standard Ruby--gathering all bits and libs into an app bundle, running install_name_tool where necessary, etc. The segfault with ffi-tk, however, has me concerned (this particular lib has been advertised to work with any and all Ruby implementations including JRuby). Any guidance on these questions is apprecaited. I hope I'm able to move forward with a new app idea with MacRuby. Thanks, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
