Building for Mac and Linux on Windows

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
mirage
Prole
Posts: 8
Joined: Thu Sep 01, 2011 7:59 pm

Building for Mac and Linux on Windows

Post by mirage »

Is it possible to build for Mac and Linux using Windows? If so, how?
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Building for Mac and Linux on Windows

Post by vrld »

(Since you did not mention what you want to build I'm assuming you want to compile the love binary for different platforms.)

Yes, in theory it's possible using a cross compiler. For windows, there is a GCC distribution called mingw, which should be able to cross-compile at least for linux.

In practice however, things tend to get really complicated and painful, because you not only have to compile the love binary, but also the libraries that love uses, which in turn use other libraries, which use yet other libraries ... you get the idea. The simplest solution might be to use a virtual machine (e.g. VirtualBox) to compile stuff using the OS you want to build for.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Building for Mac and Linux on Windows

Post by T-Bone »

If you, on the other hand, simply want to distribute your LÖVE game on Linux and Mac, that's much easier. For Mac, download the already prepared .app from love2d.org and put your .love-file in its proper location, and edit the plist. For Linux, it's probably easiest to just give the .love-file and tell Ubuntu-users in a readme.txt to run "sudo apt-get install love" first, and tell other Linux users to head over to love2d.org.

http://love2d.org/wiki/Game_Distribution contains plenty of good info, but it tends to assume you're sitting on the OS you're distributing to.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Building for Mac and Linux on Windows

Post by nevon »

T-Bone wrote:For Linux, it's probably easiest to just give the .love-file and tell Ubuntu-users in a readme.txt to run "sudo apt-get install love" first.
I would not recommend that, as Ubuntu currently ships with an ancient version of LÖVE. Better to write an install script that adds bartbes' ppa and pulls in LÖVE from there, and then installs the game itself.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Building for Mac and Linux on Windows

Post by BlackBulletIV »

nevon wrote:
T-Bone wrote:For Linux, it's probably easiest to just give the .love-file and tell Ubuntu-users in a readme.txt to run "sudo apt-get install love" first.
I would not recommend that, as Ubuntu currently ships with an ancient version of LÖVE. Better to write an install script that adds bartbes' ppa and pulls in LÖVE from there, and then installs the game itself.
Or just merge the .love file with the Linux executable (on Ubuntu it'll be located at /usr/bin/love).
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Building for Mac and Linux on Windows

Post by thelinx »

BlackBulletIV wrote: Or just merge the .love file with the Linux executable (on Ubuntu it'll be located at /usr/bin/love).
Which requires a bunch of libraries a user is not likely to have installed by default
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Building for Mac and Linux on Windows

Post by BlackBulletIV »

thelinx wrote:
BlackBulletIV wrote: Or just merge the .love file with the Linux executable (on Ubuntu it'll be located at /usr/bin/love).
Which requires a bunch of libraries a user is not likely to have installed by default
Oh really? That's not good. So I guess the install script option is the best way to go for Ubuntu/Linux?
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Building for Mac and Linux on Windows

Post by T-Bone »

nevon wrote:
T-Bone wrote:For Linux, it's probably easiest to just give the .love-file and tell Ubuntu-users in a readme.txt to run "sudo apt-get install love" first.
I would not recommend that, as Ubuntu currently ships with an ancient version of LÖVE. Better to write an install script that adds bartbes' ppa and pulls in LÖVE from there, and then installs the game itself.
Is 0.7.1 really that old? I use it for everything (didn't actually know I wasn't using 0.7.2). Never noted any incompatabilities (unless we're talking about 0.8.0, which isn't finished).

Install scripts are good too. There really should be a standard install script, at least for Ubuntu, on the wiki.

.deb-files (and rpm) is another possibility.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Building for Mac and Linux on Windows

Post by nevon »

T-Bone wrote:Is 0.7.1 really that old? I use it for everything (didn't actually know I wasn't using 0.7.2). Never noted any incompatabilities (unless we're talking about 0.8.0, which isn't finished).
A lot of dependencies were updated, fused games were fixed (they didn't work in 0.7.1), and a lot of other bug fixes: http://love2d.org/wiki/0.7.2

I was thinking of 0.5.0 though, which was in the repos in <=10.10, IIRC.
T-Bone wrote:Install scripts are good too. There really should be a standard install script, at least for Ubuntu, on the wiki.

.deb-files (and rpm) is another possibility.
I guess me and Bartbes' could share our solution.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Building for Mac and Linux on Windows

Post by T-Bone »

nevon wrote:
T-Bone wrote:Is 0.7.1 really that old? I use it for everything (didn't actually know I wasn't using 0.7.2). Never noted any incompatabilities (unless we're talking about 0.8.0, which isn't finished).
A lot of dependencies were updated, fused games were fixed (they didn't work in 0.7.1), and a lot of other bug fixes: http://love2d.org/wiki/0.7.2

I was thinking of 0.5.0 though, which was in the repos in <=10.10, IIRC.
T-Bone wrote:Install scripts are good too. There really should be a standard install script, at least for Ubuntu, on the wiki.

.deb-files (and rpm) is another possibility.
I guess me and Bartbes' could share our solution.
Please do!

Since Volley Brawl is in the Software Center, I guess you know how to make .debs? I'd really like to learn.
Post Reply

Who is online

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