Compiling for win and mac on linux

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Gallefray
Prole
Posts: 10
Joined: Tue Oct 16, 2012 8:11 pm

Compiling for win and mac on linux

Post by Gallefray »

Hi all, I don't know if this problem has been sorted in the forums before or not, but I'm short on time at the moment D:

Is there anyway to compile my .love into binary form for windows and mac, when I'm on linux.

I don't at the moment have access to my windows computer, and I don't have a mac, so is there anyway to do this?

I would have though that for windows I could just do the following:

Code: Select all

cp -u game.love love.exe lovegame.exe
Unfortunately my knowledge of the CLI is quite good but not good enough to know whether it would work.

:/

Thanks in advance.

Gallefray
My name is Aster, but this forum does not allow people to change their username. I have not participated in development communities since around 2015-ish. More information about me is available here.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Compiling for win and mac on linux

Post by Inny »

If you're building a .exe for windows from either mac or linux, you can use this command:

Code: Select all

cat love.exe mygame.love > mygame.exe
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Compiling for win and mac on linux

Post by josefnpat »

I wrote some scripts a while back, and came up with the following which I used for LD24.

These scripts build for windows, OSX and the love file.

Check out my build.sh and build_dep.sh from https://github.com/josefnpat/LD24/
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Gallefray
Prole
Posts: 10
Joined: Tue Oct 16, 2012 8:11 pm

Re: Compiling for win and mac on linux

Post by Gallefray »

Inny wrote:If you're building a .exe for windows from either mac or linux, you can use this command:

Code: Select all

cat love.exe mygame.love > mygame.exe
thanks! this will help loads ;)
josefnpat wrote:I wrote some scripts a while back, and came up with the following which I used for LD24.

These scripts build for windows, OSX and the love file.

Check out my build.sh and build_dep.sh from https://github.com/josefnpat/LD24/
From what I can understand:

Code: Select all

cp dev/build_data/love.app tmp/${NAME}_${GIT}.app -Rv
Creates a folder containing the contents of love.app

Code: Select all

cp ${NAME}_${GIT}.love tmp/${NAME}_${GIT}.app/Contents/Resources/
Copy's the .love into the folder of love.app

Code: Select all

patch tmp/${NAME}_${GIT}.app/Contents/Info.plist -i dev/build_data/osx.patch
patches the contents of osx.patch with Info.plist? I don't understand what and why this does that... :/

Code: Select all

zip -r ../${NAME}_macosx[$GIT].zip ${NAME}_${GIT}.app
obviously bundles it up into an application
My name is Aster, but this forum does not allow people to change their username. I have not participated in development communities since around 2015-ish. More information about me is available here.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Compiling for win and mac on linux

Post by josefnpat »

You can read about the info.plist on the wiki

And yes, that's what the scripts do!
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests