Page 1 of 1

getting started with love mac os, how to execute the love binary nside the application bundle directly

Posted: Tue Jul 06, 2021 2:50 am
by bobrossplshelpme
im not sure what its asking for, i tried executing the code "/Applications/love.app/Contents/MacOS/love ~/path/to/mygame" within the terminal but it doesnt work. where do i find the application bundle, and how do i execute this code.

Re: getting started with love mac os, how to execute the love binary nside the application bundle directly

Posted: Tue Jul 06, 2021 10:02 pm
by idbrii
I think I installed love on macOS with brew and was able to use `love .` to run love in the current directory.

My /usr/local/bin/love is a symlink to /Applications/love.app/Contents/MacOS/love, so I'm not sure why it doesn't work for you.

Maybe try this:

Code: Select all

cd ~/path/to/mygame
/Applications/love.app/Contents/MacOS/love .

Re: getting started with love mac os, how to execute the love binary nside the application bundle directly

Posted: Wed Jul 07, 2021 3:13 am
by bobrossplshelpme
It gives me the error code:
Error

boot.lua:577: Cannot load game at path '/Users/"username"/.cd'.
Make sure a folder exists at the specified path.


Traceback

[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

I'm not really sure what to do still to set up love on a mac since, and I'm still stuck on this step:
"However, the above method will not output printed text to the terminal window. To do that, you will need to execute the love binary inside the application bundle directly:

/Applications/love.app/Contents/MacOS/love ~/path/to/mygame"

Re: getting started with love mac os, how to execute the love binary nside the application bundle directly

Posted: Fri Jul 09, 2021 6:20 pm
by deströyer
here's the contents of the shell script that I use to execute a game. I use this so that I can print to the terminal.

The file is called "run.sh" and is in the
It is a plaintext file, which I then right-clicked, chose Open With > Other..., and then picked "Terminal" and checked the "Always open with" checkbox, so that when I doubleclick it it will fire up the terminal.

the contents of the file are the following two lines:

#!/bin/bash
exec /Applications/love.app/Contents/MacOS/love "/Users/andreas/Desktop/GameFolder/"

* note that the "love"-application is in my /Applications-folder
* my username is andreas, the folder containing main.lua and the shellscript is called GameFolder, and it is on my Desktop, which is why the second path is what it is.

Try to recreate this setup with a basic Hello World-type program?