Distributing your games (making a .love file)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 48
- Joined: Sun Feb 01, 2009 3:32 am
Re: Distributing your games (making a .love file)
That's precisely what I was hoping someone would say, Joe.
Re: Distributing your games (making a .love file)
Moved to support (to try to pre-empt someone who is about to make a support thread about it).
Now posting IN STEREO (where available)
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Distributing your games (making a .love file)
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.
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)
What? How? Macs are weird...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.
Now posting IN STEREO (where available)
Re: Distributing your games (making a .love file)
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....
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....
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Distributing your games (making a .love file)
That worked for me. Thanks, I was compressing the folder, not the contents. Oops! Beginners mistake!appleide wrote:You have to open the folder, select all items, right click Archive... then rename the resulting zip.
It becomes a package when the correct extension is added.mike wrote:What? How? Macs are weird...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.
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.
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)
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:
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.
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"
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.
"When in doubt, use brute force." Ken Thompson
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Distributing your games (making a .love file)
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.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Distributing your games (making a .love file)
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)
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.
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.
"When in doubt, use brute force." Ken Thompson
Who is online
Users browsing this forum: No registered users and 9 guests