Mac OSX port would be lovely

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Mac OSX port would be lovely

Post by qubodup »

Image

If you have a mac and find LÖVE stylish: port it, will ya? :D
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Mac OSX port would be lovely

Post by rude »

Yeah ... we would of course provide MacOSX binaries, but as you may know, none of us have a Mac. :(
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Mac OSX port would be lovely

Post by mike »

I mean.. we would do it if someone would donate a mac to us.. *hint hint*

(preferably a MacBook Pro)
Now posting IN STEREO (where available)
User avatar
Sardtok
Party member
Posts: 108
Joined: Thu Feb 21, 2008 2:37 pm
Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
Contact:

Re: Mac OSX port would be lovely

Post by Sardtok »

I'm guessing you want that with CodeWarrior, right?
Take off every Zigg for great rapist.
Now, outgay that!
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

Hi I use a mac.

Recently I have been developing a RTS game in lua (Don't ask me if its fast enough, I don't know yet.). Incidentally created something like LOVE, though of course nowhere as feature complete and probably lower level (Haven't looked at LOVE api yet so I am not sure.).

Just found this a couple of weeks ago.

I downloaded the source but unfortunately I don't know make files (Betrays my experience at C at only 6 months :\ ). That also means I haven't managed to get it to compile. I don't have access to a linux or windows machine. (I wouldn't know how to develop on a windows machine though).

I'll spend more time on the week end to try to get this working. If I don't reply that means I gave up.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

I think I lost at level 3: "Making love_opengl ..."
Worked with the Linux version love source code

I am suspecting there is no "-lGL" in Mac OS X, just -framework OpenGL and -framework GLUT, so I need to use -framework SDL instead of -lSDL.
if I use -framework SDL I can't use -lSDLmain; it results in the error:
"/usr/bin/ld: Undefined symbols:
_SDL_main"

I need to compile an Objective-C code called "SDLMain.m". (That's what I did for my own project). But I suck at make files and I couldn't get it to compile with it. so I get:
"/usr/bin/ld: Undefined symbols:
_main"

I followed the compiler errors to get to where i got to:

Code: Select all

changed love.make
changed -llua to -framework lua 
added -framework Cocoa

change src/opengl/Image.cpp 
from #include <SDL_opengl.h> to #include <SDL/SDL_opengl.h>
moved #include <SDL/SDL_opengl.h> to header
changed texture to GLuint from unsigned int

moved #include "GLee.h" to before  #include <SDL/SDL_opengl.h>

changed love_opengl.cpp
line 212 changed buffers from int to GLint buffers;
line 213 changed samples from int to GLint samples;
line 220: casted buffers and samples back to int
line 663 int dst, src changed to GLint
line 675 changed int mode to GLint mode

changed TrueTypeFont.cpp
line 182 changed line to textures = (unsigned int *)(new GLuint[MAX_CHARS]);
line 200 changed line to glGenTextures(MAX_CHARS, (GLuint*)textures);
line 218 changed line to glDeleteTextures(MAX_CHARS, (const GLuint*)textures);

used darwinports to install physfs 1.0.1

changed love_opengl.make
removed "-shared"
changed -lGLU, -lGL to -frameowork GLUT
changed -llua5.1 to -framework Lua
added -framework OpenGL
changed -lSDL to -framework SDL
changed -lSDL_mixer to -framework SDL_mixer
My compiler (g++/gcc) doesn't seem to let int/unsigned and GLint/GLuint to be used interchangeably, you guys might want to investigate that.

EDIT: I use a macbook with mac os x.4 tiger, btw
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

I managed to compile everything by:
Editing SDLMain.m (I put it in src/opengl, random place, but wtev..) to comment out the line with "SDL_main"
In the rest of the makefiles, added -framework Lua -framework SDL -framework Cocoa src/opengl/SDLMain.m
and replaced their respective -lXXX thingies

Then I removed "-shared" option everywhere. That tag doesn't exist on mac os x.

However when I run love, it results in segmentation fault when loading the timer module.

I am going to try a couple more tricks.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

Code: Select all

This is LOVE 0.3.1 (Space Meat).

INIT love.timer [SDL]
INIT love.filesystem [PhysFS]
Loading of module failed. Failed loading liblove_opengl.dylib: dlopen(liblove_opengl.dylib, 2): Library not loaded: /sw/lib/libpng12.0.dylib
  Referenced from: /usr/local/lib/libIL.1.dylib
I want to ask, where does libpng come into this??? : / Why is it not loaded....
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

I reinstalled libpng and removed old copies.... yay!

I am going to download love again and do this 'neatly'.

I'll upload a .app INTEL ONLY binary that I am 90% sure only works on my computer. Someone else please test it.
http://appleide.sitesled.com/LOVE.zip
Attachments
love.png
love.png (52.32 KiB) Viewed 9789 times
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Mac OSX port would be lovely

Post by appleide »

EDIT: Hmm, actually, if we want to have a mac build with same source code as the linux and window builds the GLuint/ int thing is going to have to be fixed.

mac version src:
http://appleide.sitesled.com/lovesrc.zip

I editted all the make files and many source code files so its pretty messy. Need to clean it up.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests