(also on OSX)
Actually all we do is rename the directory .love, and then double-click the resulting icon (so /user/Game becomes /user/Game.love). You can still navigate into the folder itself, it just changes the double-click (and the icon) action to "run with this program" rather than "open this directory".
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.
Re: Distributing your games (making a .love file)
I just drag my game folders onto my batch script, "Make LOVE.bat".
Re: Distributing your games (making a .love file)
As a long-time Mac developer, I would like to suggest that love.app should look for Contents/Resources/*.love , where * is whatever the game is named (if there are multiple files, either provide a game selector or choose the alphabetically first one). The Objective-C magic to make this happen is:
That way, the developer could just rename love.app to MyGame.app (and fix the info.plist on his own, too) -- this could be automated pretty easily.
Code: Select all
//in whatever your "application just launched" handler might be:
NSString *firstLovePath = [[[NSBundle mainBundle] pathsForResourcesOfType:@"love" inDirectory:nil] objectAtIndex:0];
//then just load it like a regular love document...
-
- Prole
- Posts: 48
- Joined: Sun Feb 01, 2009 3:32 am
Re: Distributing your games (making a .love file)
That would work nicely. Is the OS X package code available anywhere? It is apparently not in the main SVN repository.
- Sardtok
- Party member
- Posts: 108
- Joined: Thu Feb 21, 2008 2:37 pm
- Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
- Contact:
Re: Distributing your games (making a .love file)
Uhm, there are multiple files on Macs too, they're just not located in the Applications folder after you run the installer. It's similar to the Start menu folder on Windows.
Take off every Zigg for great rapist.
Now, outgay that!
Now, outgay that!
Re: Distributing your games (making a .love file)
Most Mac apps don't have an installer, you just download a .dmg and drag the application to wherever you want to store it. Besides the Apple applications and VMWare I don't think I use any applications that use installers.Sardtok wrote:Uhm, there are multiple files on Macs too, they're just not located in the Applications folder after you run the installer. It's similar to the Start menu folder on Windows.
Re: Distributing your games (making a .love file)
can we use LZMA instead of zip?
want O.Omike wrote:LÖVE IDE
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Distributing your games (making a .love file)
I vote that it should be made with LÖVE.TheLinx wrote:can we use LZMA instead of zip?want O.Omike wrote:LÖVE IDE
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
- Sardtok
- Party member
- Posts: 108
- Joined: Thu Feb 21, 2008 2:37 pm
- Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
- Contact:
Re: Distributing your games (making a .love file)
DMGs are archives, which usually contains another archive .app files. The .app files aren't just an application, but an archive containing the application, and required files. I believe there is some way, or at least used to be, to be able to turn on seeing .apps as directories, but I never really cared to get do these things myself.
One thing I've always wondered about is how Macs handle dependencies and shared libraries, or dynamic libraries on Macs. I guess most apps just contain .dylib files in their app archives.
Remember that the programs leave config files and such around on your drive. Most likely in a hidden directory with the same name as the application in your home directory. (For instance /home/~username/.Safari or something similar for your Safari config files).
I don't really see any problem with appending a zip archive to the end of an app archive, unless it needs you to actually append it to the executable inside the .app, then it could get problematic. If you can compile the thing yourself, it should be possible to do that too, though.
One thing I've always wondered about is how Macs handle dependencies and shared libraries, or dynamic libraries on Macs. I guess most apps just contain .dylib files in their app archives.
Remember that the programs leave config files and such around on your drive. Most likely in a hidden directory with the same name as the application in your home directory. (For instance /home/~username/.Safari or something similar for your Safari config files).
I don't really see any problem with appending a zip archive to the end of an app archive, unless it needs you to actually append it to the executable inside the .app, then it could get problematic. If you can compile the thing yourself, it should be possible to do that too, though.
Take off every Zigg for great rapist.
Now, outgay that!
Now, outgay that!
Re: Distributing your games (making a .love file)
It's actually a fairly subtle solution.
First, a .app is just a folder - not any type of archive. Loosely, Mac OS's file type registry permits folders to be treated as "packages" or "bundles" -- single files -- while remaining folders in actuality. So, .apps work this way, and so do .love bundles on OS X (.love ZIP archives also work; a .love bundle is just a folder named .love).
A Mac app has access to its bundle contents at runtime, so dynamic code loading can happen in a few ways:
* Link or dlopen() a .a/.so/.dylib in the usual Unix paths or somewhere in the application bundle
* NS/CFBundle API to load a framework (a bundle containing library headers, binaries, documentation, etc) in various framework search paths or within the app's Contents/Frameworks
Also, Mac config files are generally written using the NS or CFUserDefaults API and stored in ~/Library/Preferences/<bundle identifier>.plist. Auxiliary files are stored in ~/Library/Application Support. Neither of these locations is .love-appropriate.
Appending a zip archive to a .app doesn't make any sense -- zip would see the .app as a folder, because it is a folder.
The solution of making Mac LÖVE look inside Contents/Resources/ for a love package is the best one. It's trivial to do from a Makefile or from Finder.
(Edited for clarification.)
First, a .app is just a folder - not any type of archive. Loosely, Mac OS's file type registry permits folders to be treated as "packages" or "bundles" -- single files -- while remaining folders in actuality. So, .apps work this way, and so do .love bundles on OS X (.love ZIP archives also work; a .love bundle is just a folder named .love).
A Mac app has access to its bundle contents at runtime, so dynamic code loading can happen in a few ways:
* Link or dlopen() a .a/.so/.dylib in the usual Unix paths or somewhere in the application bundle
* NS/CFBundle API to load a framework (a bundle containing library headers, binaries, documentation, etc) in various framework search paths or within the app's Contents/Frameworks
Also, Mac config files are generally written using the NS or CFUserDefaults API and stored in ~/Library/Preferences/<bundle identifier>.plist. Auxiliary files are stored in ~/Library/Application Support. Neither of these locations is .love-appropriate.
Appending a zip archive to a .app doesn't make any sense -- zip would see the .app as a folder, because it is a folder.
The solution of making Mac LÖVE look inside Contents/Resources/ for a love package is the best one. It's trivial to do from a Makefile or from Finder.
(Edited for clarification.)
Who is online
Users browsing this forum: No registered users and 5 guests