4

I just started learning love2d but I can't test it because it does not seem to detect any main.lua file in the directory passed as argument.

Here's a bash output that quickly summarize the issue:

~/test ❯ pwd   
/home/simon/test
~/test ❯ lse -a
Permissions Size User  Group Date Modified Name
.rwxrwxrwx    74 simon simon  8 Dec 15:52  main.lua
~/test ❯ love /home/simon/test
Error: [love "boot.lua"]:323: Cannot load game at path '/home/simon/test'.
Make sure a folder exists at the specified path.
stack traceback:
    [love "boot.lua"]:345: in function <[love "boot.lua"]:341>
    [C]: in function 'error'
    [love "boot.lua"]:323: in function <[love "boot.lua"]:126>
    [C]: in function 'xpcall'
    [love "boot.lua"]:355: in function <[love "boot.lua"]:348>
    [C]: in function 'xpcall'
~/test ❯ cat main.lua                 
function love.draw()
    love.graphics.print("Hello World", 400, 300)
end

The exact same command and script works on the Windows 10 laptop of my colleague. On my side I'm using Ubuntu 22.04.1 and love2d has been installed to the latest stable version (11.4) using Flatpak.

Sir Robin
  • 182
  • 2
  • 14

1 Answers1

1

So in the end I managed to resolve that issue by building love2d from source and using that to run the hello world.

I don't know why the Flatpak installation didn't worked (just typing love in the terminal was correctly displaying the "no game" window just as it would do on my coworker's machine), I'll check if there were additional configuration steps with that kind of install and post it here if it's the case

Sir Robin
  • 182
  • 2
  • 14
  • I have no experience with flatpack but could it be a permission issue? https://docs.flatpak.org/en/latest/sandbox-permissions.html Did you try `love .` in the working directory? – Luke100000 Dec 09 '22 at 08:34
  • Yes ```love .``` had the same result. I'll check for permission issues after work and post back here if it yields some results. – Sir Robin Dec 09 '22 at 08:52
  • Do ```MAIN=~/test && env -i DISPLAY=:0 love ${MAIN}``` work for you? – koyaanisqatsi Dec 10 '22 at 16:42