clementfarabet / torch-ios

Torch7 for iOS.
Other
196 stars 42 forks source link

Make Torch libraries require-able and runnable #9

Closed grunion closed 9 years ago

grunion commented 9 years ago

Summary: Requiring Torch packages and running Torch examples failed for a copule resource path related issues. Framework bundle resources are stored in a specific path that is also different from the path used for main.lua (the application provided lua code and other resources). Lua package.path is also unaware of the right place to look for resources. One can also use the included code to allow Lua to find additional resources in the main bundle if they're located in some subdirectory.

Test Plan: Create a test app that links against the produced Torch.framework. Don't forget to copy bundle resources for the Torch.framework. Use the new Torch.h and Torch.m files to initialize Torch.

soumith commented 9 years ago

nice. thanks a lot :)