Ubuntu issue

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Jay-H
Prole
Posts: 3
Joined: Tue Oct 15, 2013 5:26 pm

Ubuntu issue

Post by Jay-H »

Hi,

I'm keen to get into the Love, but I can't :(

I've followed the tuts hear and there online, but I'm unable to launch a home-made program.

I'm using ubuntu 13.04 and installed Love through the Software Centre (so I haven't done anything weird) - if I launch 'Love' through the menu (unity) the piggy with hearts appears in a window. If I run the supplied 'examples' with the love extension i.e. "examples.love", they launch and work fine.

But if I create my own "Hello World" I always get the same error:

boot.lua:335: No code to run
Your game might be packaged wrong
.... etc.

Now I know all noobs probably get the same issue because they package the external folder when they shouldn't - in this case I haven't, 'main.lua' is in the root of the archive and should run, but doesn't.

I've tried two methods to run, one, by double clicking on the file, up pops the error above in a nice blue window.
I've also tried launching from the Terminal in the directory i.e. 'love myapp.love', but the same error.

Any ideas what to do guys?
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Ubuntu issue

Post by Lafolie »

Sounds like you're trying to load main.lua instead of the directory it's located in.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Ubuntu issue

Post by micha »

Try this: Open a terminal, go to the directory where main.lua is located and then type

Code: Select all

love .
(Mind the dot)
Jay-H
Prole
Posts: 3
Joined: Tue Oct 15, 2013 5:26 pm

Re: Ubuntu issue

Post by Jay-H »

Typing "love" into the Terminal in the directory of the 'main.lau' file, it naturally justs launches Love with the piggywiggy as I said before.

As for "loading 'main.lau' instead of the directory it's located in" makes no sense, could you explain futher what you mean please Lafolie?
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Ubuntu issue

Post by micha »

Jay-H wrote:Typing "love" into the Terminal in the directory of the 'main.lau' file, it naturally justs launches Love with the piggywiggy as I said before.
That's why I wrote this command:

Code: Select all

love .
in words: love + space + dot
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Ubuntu issue

Post by miko »

Jay-H wrote:Typing "love" into the Terminal in the directory of the 'main.lau' file, it naturally justs launches Love with the piggywiggy as I said before.

As for "loading 'main.lau' instead of the directory it's located in" makes no sense, could you explain futher what you mean please Lafolie?
It is main.lua, not main.lau - I hope you got it right.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Jay-H
Prole
Posts: 3
Joined: Tue Oct 15, 2013 5:26 pm

Re: Ubuntu issue

Post by Jay-H »

It had to be a stupidly simple thing, yep, just a typo on my part. Thanks Miko :)
User avatar
shatterblast
Party member
Posts: 136
Joined: Tue Dec 11, 2012 9:47 pm
Location: Dallas, Texas, USA

Re: Ubuntu issue

Post by shatterblast »

When you feel comfortable with LOVE, I would suggest trying out the ZeroBrane studio in my signature. In the software, you have to specify where your project folder is, but after that, it will run your software from clicking with your mouse or running the project from within the software itself.

In case you didn't know, you can rename a ".zip" file into ".love" and it will run in Windows or Ubuntu Linux just fine as long as the LOVE library is loaded onto the appropriate system.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Ubuntu issue

Post by T-Bone »

Also note that Ubuntu's built-in text editor, gedit, has support for running arbitrary commands from key combinations. So you can tell it to run the command "love ." whenever you hit a key combination (I use Ctrl+Shift+L). That way, you can easily launch any LÖVE project you're working on as long as all the .lua files are in the same directory.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Ubuntu issue

Post by Lafolie »

Jay-H wrote: As for "loading 'main.lau' instead of the directory it's located in" makes no sense, could you explain futher what you mean please Lafolie?
Often we see people that people are greeted by the Rubber Pig instead of their awesome project because they target the main.lua file instead of the directory it's located within (see [wiki]Getting Started[/wiki]).It is a common error for beginners to make.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 160 guests