Page 1 of 2

Deving on PC or Android?

Posted: Wed Dec 08, 2021 7:41 pm
by JayPaul87
Ok I've got an issue, I tried creating the APK file on my laptop and then zipping the file, renaming it to love.game and I still don't see the Love icon popup on the zipped file.

Also I'm curious as to how to go about this on an Android? I have termux, Xplore and Love2d apps download, just unsure I do what I did on my laptop in termux?

I've included screenshots and the files.

https://drive.google.com/folderview?id= ... kt95xL8CLQ

Re: Deving on PC or Android?

Posted: Wed Dec 08, 2021 8:22 pm
by EngineerSmith
I never find that the SD location on the wiki to actually work. If you place the `lovegame` folder in the internal storage it will work in my experience.

Re: Deving on PC or Android?

Posted: Thu Dec 09, 2021 2:51 pm
by JayPaul87
I moved the zipped game.love file to internal storage but now I'm getting "no code to run make sure main.lua is at the top of the stack" which it is. Not exactly sure what's up with it.

Re: Deving on PC or Android?

Posted: Thu Dec 09, 2021 2:57 pm
by milon
JayPaul87 wrote: Wed Dec 08, 2021 7:41 pm Ok I've got an issue, I tried creating the APK file on my laptop and then zipping the file, renaming it to love.game and I still don't see the Love icon popup on the zipped file.
If you're trying to create a .love file, you don't start with the APK. You compress the folder your main.lua file is in and make a .zip file. Then rename that to .love (ie. AwesomeGame.zip -> AwesomeGame.love) and you should have the love icon.

If that's not what you're after can you restate the question in another way?

Re: Deving on PC or Android?

Posted: Thu Dec 09, 2021 3:20 pm
by JayPaul87
milon wrote: Thu Dec 09, 2021 2:57 pm
JayPaul87 wrote: Wed Dec 08, 2021 7:41 pm Ok I've got an issue, I tried creating the APK file on my laptop and then zipping the file, renaming it to love.game and I still don't see the Love icon popup on the zipped file.
If you're trying to create a .love file, you don't start with the APK. You compress the folder your main.lua file is in and make a .zip file. Then rename that to .love (ie. AwesomeGame.zip -> AwesomeGame.love) and you should have the love icon.

If that's not what you're after can you restate the question in another way?
Screenshot_20211209-091720.png
Screenshot_20211209-091720.png (87.53 KiB) Viewed 4492 times
Just double checking is this how the structure should look before zipping? I think my issue might be with how love is reading the zipped file OR the version of love I'm running.

Re: Deving on PC or Android?

Posted: Thu Dec 09, 2021 4:37 pm
by milon
That looks correct, except the file extension should be .love instead of .game - try renaming it to game.love or similar and see if that works.

If it doesn't work, then I'd look into the compression itself. Make sure it's creating a true zip file, rather than a rar or something else.

Re: Deving on PC or Android?

Posted: Fri Dec 10, 2021 12:27 am
by JayPaul87
milon wrote: Thu Dec 09, 2021 4:37 pm That looks correct, except the file extension should be .love instead of .game - try renaming it to game.love or similar and see if that works.

If it doesn't work, then I'd look into the compression itself. Make sure it's creating a true zip file, rather than a rar or something else.
I tried changing the file extension to what it should be and zipping it and I'm still getting a "main.lua file couldn't be found" so I then tried it on my laptop and it's still complaining about the same thing. How exactly is then file structure supposed to look before it's zipped?

Re: Deving on PC or Android?

Posted: Fri Dec 10, 2021 9:58 am
by pgimeno
As you open the .love file as a .zip file, you should NOT see only a folder. main.lua and possibly conf.lua should be immediately there without entering any folder inside the zip. Otherwise it's not right.

I'm hoping that a future version will be able to detect this situation and mount the subdirectory instead of the root of the zip file. Not sure if that's possible with PhysFS, but it's certainly causing a lot of problems to novice users.

Re: Deving on PC or Android?

Posted: Fri Dec 10, 2021 9:00 pm
by JayPaul87
That screenshot above is exactly how it's zipped before it's zipped and it still doesn't open it, I don't get what I'm doing wrong.

Re: Deving on PC or Android?

Posted: Sat Dec 11, 2021 9:48 am
by pgimeno
Wait, is that a folder? If so, the name should be lovegame, not love.game (no dot in it). If it's a zip, then yes it should have the .love extension, and as I said, when you open it as a zip, main.lua should be right there and not in a subfolder.