Change in how love2d deals with folders on OSX?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Change in how love2d deals with folders on OSX?
I recently upgraded to Mountain Lion from Snow Leopard (10.6 to 10.8) and have gotten back into love2d/Lua programming. What I remember doing - and what my old project files seem to back up - is that I used to be able to simply add a .love extension to a folder, and it became love-executable (no need to make a zip or anything). That no longer appears to be the case. Did I set something special up and have since forgotten, or has some change been made to the OS or to love that makes that no longer work?
Re: Change in how love2d deals with folders on OSX?
Oh great, another reason not to upgrade. BlackBulletIV might know the answer, I think he likes to update to these things
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Change in how love2d deals with folders on OSX?
You always need to zip the contents of the folder and change the extension to .love. You can also drag the folder onto the LÖVE application and it will run it, you might be mixing the two in your head by accident.
Re: Change in how love2d deals with folders on OSX?
No slime, nunix's right. I've updated as well, and that no longer works. You should know that back when you didn't properly zip the folder, it wouldn't work on different OS's. So yes, that it is a change to the OS, and not your fault.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Change in how love2d deals with folders on OSX?
Well either way, renaming a folder to .love is not a correct method.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Change in how love2d deals with folders on OSX?
Not on OS X. Adding .love to a folder name turns it into a .love package which is treated exactly the same as a .love zip file. At least it's supposed to be. I've noticed that 0.8.0 will not let me open a Package by double-clicking, but 0.7.x and lower all do so something was broken on Löve's end.slime wrote:You always need to zip the contents of the folder and change the extension to .love. You can also drag the folder onto the LÖVE application and it will run it, you might be mixing the two in your head by accident.
For my own projects I use the Terminal so it doesn't come up as often as you'd think. But if I want to open a project I'm not currently working on and therefore haven't set up in the Terminal, I run into that problem. I can't even drop the package on the love.app. Löve 0.8.0 is set up to not recognize packages for some reason. Unless it really is something Mountain Lion did which seems strange. I'm just glad someone else noticed this same problem.
Re: Change in how love2d deals with folders on OSX?
Jasoco are you packaging the game every time you want to test it? I make it find the relevant main.lua based on the directory of the currently open (or focussed) file and just run that.
%%d escapes into the appropriate directory. This might not work if you're editing a file that's more than 1 'level below' the root main.lua dir, but it's possible to change that of course. Oh, and spaces in dir names cause it to fail. I tend to not use spaces in filenames though so it's not a problem for myself.
Code: Select all
#!/usr/bin/bash
pdir=%%d
if ! [ -f %%d"/main.lua" ]; then
pdir=%%d"/.."
fi
/Applications/love.app/Contents/MacOS/love $pdir
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Change in how love2d deals with folders on OSX?
Where did you get that from, anyway? That's not at all what love wants/needs, it's just something OSX did.Jasoco wrote:At least it's supposed to be.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Change in how love2d deals with folders on OSX?
No. I run it from the Terminal. I don't even put the .love extension on my folders until I need to upload it really.Lafolie wrote:Jasoco are you packaging the game every time you want to test it? I make it find the relevant main.lua based on the directory of the currently open (or focussed) file and just run that.
I have no problems when I'm working with my own projects. It's when I want to quickly run someone elses project and need to edit a file and quickly run it.
All Löve versions up to 0.7.2 would let me double-click packages. 0.8.0 doesn't work anymore. Which is strange. As I still have 0.7.2 and 0.6.0 and 0.5.0 as well all for testing purposes. All non-0.8.0 versions let me double-click. I can run a package fine from the Terminal since I'm running the love binary directly.
Re: Change in how love2d deals with folders on OSX?
So since apparently it's a .8.0 thing, is there a way to set up something in OSX to restore this functionality? Automator script or folder action or something? (I am not an OSX power user, obviously)
Who is online
Users browsing this forum: Bing [Bot] and 5 guests