Page 3 of 28

Re: Distributing your games (making a .love file)

Posted: Wed Feb 18, 2009 5:43 pm
by philnelson
That's precisely what I was hoping someone would say, Joe.

Re: Distributing your games (making a .love file)

Posted: Mon Jun 15, 2009 8:09 am
by mike
Moved to support (to try to pre-empt someone who is about to make a support thread about it).

Re: Distributing your games (making a .love file)

Posted: Mon Jun 22, 2009 10:58 pm
by Jasoco
I just tried that trick of simply adding .love to the end of a folders name and it worked perfectly when I double-clicked it on my Mac.

Which is awesome, because for some reason, OS X's built-in ZIP archive creator creates incompatible files. Not sure why.

Re: Distributing your games (making a .love file)

Posted: Tue Jun 23, 2009 5:24 am
by mike
Jasoco wrote:I just tried that trick of simply adding .love to the end of a folders name and it worked perfectly when I double-clicked it on my Mac.
What? How? Macs are weird...

Re: Distributing your games (making a .love file)

Posted: Tue Jun 23, 2009 9:36 am
by appleide
You have to open the folder, select all items, right click Archive... then rename the resulting zip.

Mike: I made it so. so I can open the lua files in an editor, then after editing code, just save and double click. I'm sorry for the incompatible mess it might have resulted when the users try to distribute said .love files. :(

Also... when safari downloads properly packaged .love files, safari automatically unzips everything, which is very annoying, the quickest way to fix it is just rename the folder rather than re-zip the contents....

Re: Distributing your games (making a .love file)

Posted: Tue Jun 23, 2009 7:21 pm
by Jasoco
appleide wrote:You have to open the folder, select all items, right click Archive... then rename the resulting zip.
That worked for me. Thanks, I was compressing the folder, not the contents. Oops! Beginners mistake!
mike wrote:
Jasoco wrote:I just tried that trick of simply adding .love to the end of a folders name and it worked perfectly when I double-clicked it on my Mac.
What? How? Macs are weird...
It becomes a package when the correct extension is added.

Windows doesn't support packages. (If it did, life would be so much simpler for programmers and GUI modifiers)

A package is a folder with a specific extension (.app for applications, .widget for Konfabulator widgets, .pkg for installers, etc..) that acts like a single file or application in the OS. In other words, when you open it, the OS treats it like a file instead of a folder.

Smartest idea ever.

In fact, when Konfabulator was ported to Windows, they had to stop using the package format and, well, basically do the same thing you guys do by zipping the files and renaming the extension. In other words, if I tried to give a Windows user my "packaged" .love folder, it would appear as a folder to them. Not as a file. OS X will treat a file with the same extension as a folder with that extension as a file.

The benefit of packages over single binaries for applications is that you can dig inside the "file" and change the resources without needing special tools. Don't like the icon the app uses in the Dock? Don't like what the toolbar icons look like? Change them in your favorite image editor.

Image
The file on the left is a folder. The one on the right the original zipped file. Both act exactly the same on OS X.

Thus concludes my lecture on packages versus archived LÖVE files. Class dismissed. See you in the fall.

Re: Distributing your games (making a .love file)

Posted: Wed Jun 24, 2009 5:09 pm
by Tenoch
About releasing for Mac OS, I made an epic cheat for my project (http://love2d.org/forum/viewtopic.php?f=5&t=791).

I didn't want the user to have to drag a ".love" file over a "love" app, which would have brought nothing but questions and problems, so I did:
  • rename poyta.love to poyta.poyta
  • modified the Resources in the love.app bundle (removed everything and replaced with just a new icon file)
  • modified the Info.plist in the love.app bundle so that it uses the new icon, and defines the document extension .poyta as his, as well as the same icon for this document type
  • renamed the bundle to something stupid like "data.app"
Now, thanks to extensions hiding, the real app appears as the totally harmless "data", and the love file as "poyta", and both have the icon. And double-clicking poyta automatically launches the real app, which is fine.

Of course it's not perfect since if someone doubleclicks "data", they get the fancy "no game" LÖVE screen.

Well, all this to say that it would be easier if we could include the .love inside the bundle. By renaming it, and changing its icon, it would make a nice release system already.

Re: Distributing your games (making a .love file)

Posted: Wed Jun 24, 2009 10:39 pm
by Jasoco
Would be nice if eventually each LÖVE app had its own way of creating real executable apps for each OS at the click of a button. Or a menu item in the LÖVE menubar. For Windows it would dump all the stuff into a .EXE file, on OS X it would create an application bundle that contains the runtime and an optional encryption algorithm so you can decide whether or not you want the end user to be able to open the .love file and view the code or not.

Re: Distributing your games (making a .love file)

Posted: Thu Jun 25, 2009 6:09 am
by bartbes
You do know that's already possible, however OS X gives the problems here, windows is done, and linux should be done, never tested that though..

Re: Distributing your games (making a .love file)

Posted: Thu Jun 25, 2009 10:23 am
by Tenoch
On Linux:

cat `which love` game.love > game
chmod u+x game

works like a charm. Just remember to tell your players to install the libraries on which LÖVE depends.