an example of spine running in corona sdk

I try to run the spine example of corona sdk but I see this log in the corona simulator

Windows simulator build date: 

Copyright © 2009-2012  C o r o n a   L a b s   I n c .

        Version: 2.0.0

        Build: 2012.971

Runtime error

        module ‘spine-lua.utils’ not found:resource (spine-lua.utils.lu) does no

t exist in archive

        no field package.preload[‘spine-lua.utils’]

        no file 'd:\archivosprogramad\spine trial\explesss\spine-runtimes-master

\spine-corona\spine-lua\utils.lRuntime error: module ‘spine-lua.utils’ not found

:resource (spine-lua.utils.lu) does not exist in archive

        no field package.preload[‘spine-lua.utils’]

        no file 'd:\archivosprogramad\spine trial\explesss\spine-runtimes-master

\spine-corona\spine-lua\utils.lua’

        no file 'D

Like the error report suggests;

 

no file 'd:\archivosprogramad\spine trial\explesss\spine-runtimes-master

\spine-corona\spine-lua\utils.l

 

Corona is trying to load ‘utils.lua’ from the directory ‘spine-lua’ under the directory that holds the main.lua. However, due to the way spine-runtimes is structured, it would actually need to look under ‘…/spine-lua’. This is possible to achieve using package.path in Lua, but to make it easier for now, I’d recommend just copying the ‘spine-lua’ directory to the directory where main.lua exists - in your case to:

 

d:\archivosprogramad\spine trial\explesss\spine-runtimes-master\spine-corona.

 

Hope this helps,

 Matias

 

 

 

 

Thank you very much for the reply. I copied the spine-lua where main lua exist. and I can run and see the animation.

so everytime I want to run a spine proyect I have to copy the file into spine-corona.

Well, yes, you must make sure that the spine-lua directory is in the same directory as the main.lua if you want to use spine-corona unedited. require() that loads the libraries separated directories from filenames using the period (’.’) and if you look in spine-corona/spine.lua, you can see that it require()s ‘spine-lua.utils’ etc, which means Lua will look for the file in directory ‘spine-lua’ relative to your main.lua. Basically, for a new project the easiest way would be to copy both the spine-corona directory (that contains spine.lua!) and spine-lua to your main.lua directory and then require(‘spine-corona.spine’) when you need Spine.

See for example this blog post for some more information on it: 

http://www.coronalabs.com/blog/2012/07/10/best-practices-for-organizing-projects/

You can also, of course, edit the spine-corona.lua to include it from whatever directory you wish.

Best regards,

  Matias

Like the error report suggests;

 

no file 'd:\archivosprogramad\spine trial\explesss\spine-runtimes-master

\spine-corona\spine-lua\utils.l

 

Corona is trying to load ‘utils.lua’ from the directory ‘spine-lua’ under the directory that holds the main.lua. However, due to the way spine-runtimes is structured, it would actually need to look under ‘…/spine-lua’. This is possible to achieve using package.path in Lua, but to make it easier for now, I’d recommend just copying the ‘spine-lua’ directory to the directory where main.lua exists - in your case to:

 

d:\archivosprogramad\spine trial\explesss\spine-runtimes-master\spine-corona.

 

Hope this helps,

 Matias

 

 

 

 

Thank you very much for the reply. I copied the spine-lua where main lua exist. and I can run and see the animation.

so everytime I want to run a spine proyect I have to copy the file into spine-corona.

Well, yes, you must make sure that the spine-lua directory is in the same directory as the main.lua if you want to use spine-corona unedited. require() that loads the libraries separated directories from filenames using the period (’.’) and if you look in spine-corona/spine.lua, you can see that it require()s ‘spine-lua.utils’ etc, which means Lua will look for the file in directory ‘spine-lua’ relative to your main.lua. Basically, for a new project the easiest way would be to copy both the spine-corona directory (that contains spine.lua!) and spine-lua to your main.lua directory and then require(‘spine-corona.spine’) when you need Spine.

See for example this blog post for some more information on it: 

http://www.coronalabs.com/blog/2012/07/10/best-practices-for-organizing-projects/

You can also, of course, edit the spine-corona.lua to include it from whatever directory you wish.

Best regards,

  Matias

I can’t get the sample to run. The beginning of the error message is:

The resource file (…/) could not be found at case-sensitive path (/Users/dani/Desktop/spine-runtimes-master/spine-corona/…/).
2013-07-12 01:24:15.070 Corona Simulator[5769:707] Runtime error
module ‘spine-lua.utils’ not found:resource (spine-lua.utils.lu) does not exist in archive
    no field package.preload[‘spine-lua.utils’]
    no file ‘/Users/dani/Library/Application Support/Corona/Simulator/Plugins/spine-lua/utils.lua’
    no file ‘/Users/dani/Desktop/spine-runtimes-master/spine-corona/spine-lua/utils.lua’
    no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/spine-lua/utils.lua’

Maybe someone can help me with this?

Daniela

Ahh… I just realized that there is complete folder called “spine-lua” above the directory where the main.lua file is in. I now understand what you guys meant :slight_smile: … I copied this and now the sample is running. Thx! :wink:

Daniela

I can’t get the sample to run. The beginning of the error message is:

The resource file (…/) could not be found at case-sensitive path (/Users/dani/Desktop/spine-runtimes-master/spine-corona/…/).
2013-07-12 01:24:15.070 Corona Simulator[5769:707] Runtime error
module ‘spine-lua.utils’ not found:resource (spine-lua.utils.lu) does not exist in archive
    no field package.preload[‘spine-lua.utils’]
    no file ‘/Users/dani/Library/Application Support/Corona/Simulator/Plugins/spine-lua/utils.lua’
    no file ‘/Users/dani/Desktop/spine-runtimes-master/spine-corona/spine-lua/utils.lua’
    no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/spine-lua/utils.lua’

Maybe someone can help me with this?

Daniela

Ahh… I just realized that there is complete folder called “spine-lua” above the directory where the main.lua file is in. I now understand what you guys meant :slight_smile: … I copied this and now the sample is running. Thx! :wink:

Daniela

in a related issue (not from this example), I’m getting: ERROR: The resource file () could not be found at case-sensitive path, but since there’s nothing inside the parentheses, there’s no way for me to track what’s missing.

is there any way to force a more complete account? THANKS!

Hi mkelly, 

  Can you post a little bit more of your log or is that the only error you see? I can’t reproduce anything like it, but something definitely goes wrong with your require()s.

br, 

 Matias

unfortunately, I found the thing it was looking for by trial and error so I can’t reproduce any more of the log than what I posted. it was a file it was looking for in the sandbox systemDirectory if that helps. 

in a related issue (not from this example), I’m getting: ERROR: The resource file () could not be found at case-sensitive path, but since there’s nothing inside the parentheses, there’s no way for me to track what’s missing.

is there any way to force a more complete account? THANKS!

Hi mkelly, 

  Can you post a little bit more of your log or is that the only error you see? I can’t reproduce anything like it, but something definitely goes wrong with your require()s.

br, 

 Matias

unfortunately, I found the thing it was looking for by trial and error so I can’t reproduce any more of the log than what I posted. it was a file it was looking for in the sandbox systemDirectory if that helps.