Building LÖVE - Windows

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Building LÖVE - Windows

Post by Nixola »

The Wiki says that the source contains the Visual Studio project files, but I can't find them, I literally looked inside each folder and they're not there. Where can I find them?
P.S: I'm trying to build LÖVE 0.8.0
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Building LÖVE - Windows

Post by Boolsheet »

It's in in 'platform/msvc2010'. How did you download the source, Mercurial or an archive? If it's the latter, what file exactly?
Shallow indentations.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Building LÖVE - Windows

Post by Nixola »

I downloaded it as an archive from the home page, I put in it both the SDKs ( https://love2d.org/sdk/ ) (I'm using Visual Studio 8, by the way) but there are only 3 folders inside msvc2008 and 2 folders and 3 DLLs inside msvc2010
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Building LÖVE - Windows

Post by Boolsheet »

You'll notice that the file name of the source download on the home page has the word 'linux' in it. This is a prepared package for Linux only. Use the way that the wiki describes to get the source code with the Visual Studio project files.
Nixola wrote:I'm using Visual Studio 8, by the way
I would hope not, because that's the 2005 one. ;)

The Visual Studio 2008 project files just got axed before 0.8.0. I think it was outdated anyway.
Shallow indentations.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Building LÖVE - Windows

Post by Nixola »

Boolsheet wrote:You'll notice that the file name of the source download on the home page has the word 'linux' in it. This is a prepared package for Linux only. Use the way that the wiki describes to get the source code with the Visual Studio project files.
Does it mean that I have to install Mercurial and download the source through it?
Boolsheet wrote:The Visual Studio 2008 project files just got axed before 0.8.0. I think it was outdated anyway.
So I wasted an hour downloading Visual Studio 2008, didn't I? (I couldn't find VS2010)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Building LÖVE - Windows

Post by Boolsheet »

The wiki says:
The wiki wrote:You can download the source code either by downloading an archive from one of the tags on the download page
If you go to "Downloads" and then "Tags" you see the version tags with a link to https://bitbucket.org/rude/love/get/0.8.0.zip.
Nixola wrote:So I wasted an hour downloading Visual Studio 2008, didn't I? (I couldn't find VS2010)
Err. You can use 2008 to set up the project, but you're not going to like the experience. :P

Edit: Oh hey, maybe it can open the 2010 project? Then again, that may fail horribly.

Btw.: http://www.microsoft.com/visualstudio/e ... 10-express
Shallow indentations.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Building LÖVE - Windows

Post by Nixola »

Ok, I downloaded VS2010, I downloaded the right source, I tried to compile the original source and it works, I try to compile the same source with a modified boot.lua.h and it doesn't work (Unable to run application properly (0xc000007b)). The only thing I did was copying the nogame function from 072's boot.lua and pasting it in 080's boot.lua, overriding it.

boot.lua.h:
boot.lua.h
(213.34 KiB) Downloaded 74 times
boot.lua without .h:
Attachments
boot.lua
(37.02 KiB) Downloaded 53 times
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Building LÖVE - Windows

Post by Boolsheet »

Looks like you didn't generate boot.lua.h correctly.

After you changed one of the scripts, use the Lua standalone with the auto.lua script to update the headers:

Code: Select all

lua.exe auto.lua boot graphics audio
Shallow indentations.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Building LÖVE - Windows

Post by Nixola »

Yay, it works! ^^
Thanks!
EDIT: I want Karma back!
EDIT again: What do I have to change in the source to link lua5.1.dll dynamically?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Building LÖVE - Windows

Post by Boolsheet »

You don't have to change the source, just link against the import library of a DLL instead of the static one.

And here is where the runtime library pain comes. I think all libraries of the older SDK use the static C/C++ runtime. A DLL will not be able to print to the standard streams of the executable if it uses the static runtime, something you obviously want with Lua. The solution is to rebuild every dependency and link against the dynamic runtime. I did this for the 0.8.1 SDK (it's called 0.8.1 because I expected 0.8.1 much sooner :P). There's probably one library still linking against the static runtime because I messed up something, but it's one that doesn't matter anyway in this case.
Shallow indentations.
Post Reply

Who is online

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