Projects

Ticket #163 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

macruby_main forces a relative path

Reported by: jjoonathan@… Owned by: lsansonetti@…
Priority: minor Milestone: MacRuby 0.4
Component: MacRuby Keywords:
Cc:

Description

Sometimes it makes sense to load a script from a path external to the main bundle (say, inside an input manager or something), but macruby_main automatically prepends the main bundle's resource path, making the use of absolute paths (via ../../ etc) extremely hackish.

My proposed solution is also hackish, but it works. Simply check to see if the path starts with a "/" and don't prepend the resource folder path if that's the case.

objc.m:2819 s/&p1[2]/(path[0] != '/') ? &p1[2] : ""

Attachments

objc.m.diff Download (431 bytes) - added by jjoonathan@… 3 years ago.
A diff file if you want to do it that way :)

Change History

Changed 3 years ago by jjoonathan@…

A diff file if you want to do it that way :)

Changed 3 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed

Thanks for the patch. I agree that the solution is hackish but we can probably live with it for now. I will make sure this will be correctly documented. I committed it as r760, thanks!

Note: See TracTickets for help on using tickets.