-bash: love: command not found

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
udayanthaw
Prole
Posts: 3
Joined: Tue Aug 07, 2018 2:46 pm

-bash: love: command not found

Post by udayanthaw »

I downloaded the zip version 11.1 in to my Mac, unzip it and put the app into the application folder. When I click on that app I get a window displaying a ballon with text "no game".
When I check for the version "love --version" I get the error
-bash: love: command not found
.

Is this a bug/ known issue for Mac? Please let me know.
Has anyone try running Love on MacBook?
User avatar
0x72
Citizen
Posts: 55
Joined: Thu Jun 18, 2015 9:02 am

Re: -bash: love: command not found

Post by 0x72 »

It works just fine:

Terminal

Code: Select all

$ ls
love-11.1-macos.zip
$ unzip love-11.1-macos.zip
...
$ mkdir mygame
$ echo "function love.draw() love.graphics.print('Hello world') end" > mygame/main.lua
$ love.app/Contents/MacOS/love mygame
If you wish you may want to add an alias, or update your $PATH variable so you can just call love from bash.

GUI
To run it from the Finder you need to drag mygame directory onto love.app. MacOS might complain about security - in such a case go to Settings -> Security & Privacy and click "Open anyway" button. Then drag mygame directory onto love.app again.

hope it helps :awesome:
udayanthaw
Prole
Posts: 3
Joined: Tue Aug 07, 2018 2:46 pm

Re: -bash: love: command not found

Post by udayanthaw »

After I run this I got this in a different terminal window.

Error

boot.lua:479: No code to run
Your game might be packaged incorrectly.
Make sure main.lua is at the top level of the zip.


Traceback

[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: -bash: love: command not found

Post by zorg »

that usually happens when you try to run main.lua directly with löve, and not the folder, as it was said above.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
udayanthaw
Prole
Posts: 3
Joined: Tue Aug 07, 2018 2:46 pm

Re: -bash: love: command not found

Post by udayanthaw »

So how should I run it?
User avatar
bbsamurai
Prole
Posts: 2
Joined: Fri Aug 10, 2018 12:00 am

Re: -bash: love: command not found

Post by bbsamurai »

udayanthaw wrote: Thu Aug 09, 2018 11:29 pm So how should I run it?
In order to use the love command in the terminal, you need to create an alias as 0x72 said, .

You can read more about how to set a love alias in the Getting Started section of the wiki, under the Mac OS X heading.
User avatar
0x72
Citizen
Posts: 55
Joined: Thu Jun 18, 2015 9:02 am

Re: -bash: love: command not found

Post by 0x72 »

if

Code: Select all

$ ls mygame/main.lua
mygame/main.lua
then

Code: Select all

$ love.app/Contents/MacOS/love mygame
elseif

Code: Select all

$ ls
main.lua
then

Code: Select all

$ love.app/Contents/MacOS/love .
end
Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests