Deving on PC or Android?

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.
JayPaul87
Prole
Posts: 7
Joined: Wed Aug 26, 2020 4:38 am

Deving on PC or Android?

Post 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
Attachments
File placement
File placement
Screenshot_20211207-203403.png (87.43 KiB) Viewed 4793 times
Main love game file
Main love game file
Screenshot_20211207-203359.png (133.27 KiB) Viewed 4793 times
User avatar
EngineerSmith
Prole
Posts: 38
Joined: Thu Dec 02, 2021 11:38 am
Contact:

Re: Deving on PC or Android?

Post 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.
JayPaul87
Prole
Posts: 7
Joined: Wed Aug 26, 2020 4:38 am

Re: Deving on PC or Android?

Post 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.
Attachments
No code?
No code?
Screenshot_20211208-192418.png (95.26 KiB) Viewed 4725 times
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Deving on PC or Android?

Post 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?
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
JayPaul87
Prole
Posts: 7
Joined: Wed Aug 26, 2020 4:38 am

Re: Deving on PC or Android?

Post 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 4718 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.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Deving on PC or Android?

Post 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.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
JayPaul87
Prole
Posts: 7
Joined: Wed Aug 26, 2020 4:38 am

Re: Deving on PC or Android?

Post 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?
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Deving on PC or Android?

Post 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.
JayPaul87
Prole
Posts: 7
Joined: Wed Aug 26, 2020 4:38 am

Re: Deving on PC or Android?

Post 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.
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Deving on PC or Android?

Post 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.
Post Reply

Who is online

Users browsing this forum: Nikki and 3 guests