LOVE 0.5 Mac with working .love access

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.
User avatar
smrx
Prole
Posts: 4
Joined: Sun Jan 04, 2009 11:07 pm

Re: LOVE 0.5 Mac with working .love access

Post by smrx » Mon Jan 05, 2009 2:07 pm

Hm...even when i save it as .lua from the beginning, it doesn't work.

But - then i get no error when starting the new .love Archive, instead the Script itself doesn't even start, i just see in the Dock that Love is running...

iLove
Prole
Posts: 2
Joined: Wed Dec 10, 2008 7:52 am

Re: LOVE 0.5 Mac with working .love access

Post by iLove » Wed Jan 07, 2009 3:41 am

smrx: (and anybody else wanting to know) to be able to use Mac OS X's TextEdit to write code or script (of any kind), it needs to be in Plain Text mode. To switch modes you go to the Format menu and select "Make Plain Text" or "Make Rich Text". (The menu option changes depending on which of the two modes of operation you're currently in.)

codonnell
Prole
Posts: 2
Joined: Tue Jan 27, 2009 7:50 pm

Re: LOVE 0.5 Mac with working .love access

Post by codonnell » Tue Jan 27, 2009 8:07 pm

I love Löve on OS X. There are a couple of idiosyncrasies, but I'd be happy to help in whatever capacity I can. So far I'm just tickled. For those other OS X users out there. To launch your project, I'm using the terminal this way:

Code: Select all

$ open -a love ~/Proj/Löve/MyTest/
To create a .love file do this:

Code: Select all

$ ditto -c -k -X MyTest MyTest.love
I'm looking into what it takes to create a stand-alone binary distribution, but that is lower on my list of things to do that... playing with Löve! Super work!

Oh, and I recommend TextWrangler or TextMate for editing your files. Both are full of awesomeness.

interlol
Prole
Posts: 2
Joined: Fri Jan 30, 2009 9:48 am

Re: LOVE 0.5 Mac with working .love access

Post by interlol » Fri Jan 30, 2009 10:06 am

codonnell wrote:To create a .love file do this:

Code: Select all

$ ditto -c -k -X MyTest MyTest.love
I had a problem launching my applications and found a "problem" with the way ZIP files were created on the Mac, I hope this quick explanation can be useful:

I just discovered Löve today (from Reddit) and you have to tweak the ZIP file with Löve 0.5 if you want the .love file to work.
For example, if I decompress a file and recompress it (with a right-click on the folder), it will be broken because the structure inside the ZIP file will have changed. If you want the .love file to work, I discovered that the main.lua file must not be inside a subdirectory (which is sadly the default behaviour if you right-click on the folder and ask to "Compress the folder.")

Here is an example, before (it's working :) ):

Code: Select all

$ unzip -l myhamsterball.love 
Archive:  myhamsterball.love
  Length     Date   Time    Name
 --------    ----   ----    ----
    10854  01-24-08 03:09   hamster.png
      648  03-23-08 18:34   main.lua
       92  03-23-08 18:34   game.conf
 --------                   -------
    11594                   3 files
And after clicking "Compress folder" (it's not working anymore :( ):

Code: Select all

$ unzip -l myhamsterball.love 
Archive:  myhamsterball.love
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  01-30-09 10:40   myhamsterball/
       92  03-23-08 18:34   myhamsterball/game.conf
    10854  01-24-08 03:09   myhamsterball/hamster.png
      648  03-23-08 18:34   myhamsterball/main.lua
 --------                   -------
    11594                   4 files
You see that the files are inside a subdirectory in the ZIP file, which seems to be ignored by Löve for the moment.
You must either use loveMaker (I haven't tried it yet but it's mentioned in the forum) or use the appropriate command in the Terminal, something like:

Code: Select all

cd myhamsterball/
zip ../myhamsterball.love *
or

Code: Select all

cd myhamsterball/
zip -r ../myhamsterball.love *
if you have data directories to add to the archive.

I hope it's clearer now for those who use a Mac...

klopfer
Prole
Posts: 3
Joined: Fri Jan 30, 2009 1:12 pm

Re: LOVE 0.5 Mac with working .love access

Post by klopfer » Fri Jan 30, 2009 1:17 pm

I note that the original post indicates that this doesn't work well with Tiger (10.4). I can confirm that-- seems to be a problem with physfs referencing some symbol in a 10.4 library.

Has anyone worked around or solved this?

tmm1
Prole
Posts: 2
Joined: Fri Jan 30, 2009 3:03 am

Re: LOVE 0.5 Mac with working .love access

Post by tmm1 » Fri Jan 30, 2009 8:36 pm

http://love2d.org/docs/GameDistribution.html should be updated with instructions for OSX:
cp -R /Applications/love.app mygame.app; cat file.love >> mygame.app/Contents/MacOS/love

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: LOVE 0.5 Mac with working .love access

Post by rude » Fri Jan 30, 2009 10:02 pm

@ tmm1: does that actually work? Will the embedded game run?

xhx
Prole
Posts: 2
Joined: Sun Feb 01, 2009 8:17 pm
Location: Ukraine

Re: LOVE 0.5 Mac with working .love access

Post by xhx » Sun Feb 01, 2009 8:21 pm

klopfer wrote:I note that the original post indicates that this doesn't work well with Tiger (10.4). I can confirm that-- seems to be a problem with physfs referencing some symbol in a 10.4 library.

Has anyone worked around or solved this?
I rebuilt physfs from sources, and now games run on my 10.4

klopfer
Prole
Posts: 3
Joined: Fri Jan 30, 2009 1:12 pm

Re: LOVE 0.5 Mac with working .love access

Post by klopfer » Sun Feb 01, 2009 9:08 pm

Could you perhaps post or send a link to the physfs library for 10.4?

User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: LOVE 0.5 Mac with working .love access

Post by appleide » Sun Feb 01, 2009 10:21 pm

I wonder if it works by just selecting the X items thats supposed to be in the ZIP and right click "compress X items". It shouldn't have a subdirectory that way, theoretically speaking.

Post Reply

Who is online

Users browsing this forum: Google [Bot], master both and 9 guests