Page 1 of 1

Compiling for win and mac on linux

Posted: Thu Dec 13, 2012 10:42 pm
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

Re: Compiling for win and mac on linux

Posted: Fri Dec 14, 2012 12:52 am
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

Re: Compiling for win and mac on linux

Posted: Fri Dec 14, 2012 4:52 am
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/

Re: Compiling for win and mac on linux

Posted: Fri Dec 14, 2012 12:26 pm
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

Re: Compiling for win and mac on linux

Posted: Fri Dec 14, 2012 7:21 pm
by josefnpat
You can read about the info.plist on the wiki

And yes, that's what the scripts do!