Page 1 of 1
-bash: love: command not found
Posted: Tue Aug 07, 2018 2:52 pm
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?
Re: -bash: love: command not found
Posted: Tue Aug 07, 2018 7:37 pm
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
Re: -bash: love: command not found
Posted: Thu Aug 09, 2018 2:44 pm
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'
Re: -bash: love: command not found
Posted: Thu Aug 09, 2018 2:46 pm
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.
Re: -bash: love: command not found
Posted: Thu Aug 09, 2018 11:29 pm
by udayanthaw
So how should I run it?
Re: -bash: love: command not found
Posted: Fri Aug 10, 2018 12:06 am
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.
Re: -bash: love: command not found
Posted: Fri Aug 10, 2018 7:30 am
by 0x72
if
Code: Select all
$ ls mygame/main.lua
mygame/main.lua
then
Code: Select all
$ love.app/Contents/MacOS/love mygame
elseif
then
end