How do I Edit/Compile the Source Code?

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.
Lüv
Prole
Posts: 29
Joined: Fri Oct 19, 2012 11:24 pm
Location: Greenville, South Carolina

How do I Edit/Compile the Source Code?

Post by Lüv »

Hi, this is my first post and I have been using Love for about 2 weeks now. I decided I wanted to use the source code, so I went to https://love2d.org/wiki/Building_L%C3%96VE and followed the instructions but all it told me was how to setup the binaries. I did all that and now I want to know how to edit/compile the source code. So if you could give me a link or tell me what to do, that would be HIGHLY appreciated. Thank you in advance :awesome:
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How do I Edit/Compile the Source Code?

Post by Robin »

That page includes all the information necessary.

What operating system do you use?
Help us help you: attach a .love.
Lüv
Prole
Posts: 29
Joined: Fri Oct 19, 2012 11:24 pm
Location: Greenville, South Carolina

Re: How do I Edit/Compile the Source Code?

Post by Lüv »

Windows 64-bit

It does not tell you how to edit and compile, it just shows how to setup the binaries
Lüv
Prole
Posts: 29
Joined: Fri Oct 19, 2012 11:24 pm
Location: Greenville, South Carolina

Re: How do I Edit/Compile the Source Code?

Post by Lüv »

It even says in at the end :
Windows
The source code includes Visual Studio 2008 and 2010 project files. Extract the appropriate LÖVE SDK into the love directory and they should successfully yield a LÖVE binary.
That's the end, now all I yield is a LÖVE binary that I don't know what to do with
Last edited by Lüv on Sat Oct 20, 2012 12:07 am, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How do I Edit/Compile the Source Code?

Post by Robin »

Do you have Visual Studio 2008 or 2010?
Help us help you: attach a .love.
Lüv
Prole
Posts: 29
Joined: Fri Oct 19, 2012 11:24 pm
Location: Greenville, South Carolina

Re: How do I Edit/Compile the Source Code?

Post by Lüv »

Robin wrote:Do you have Visual Studio 2008 or 2010?
I have Visual C++ 2010
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How do I Edit/Compile the Source Code?

Post by Robin »

Can a Windows expert please take over?
Help us help you: attach a .love.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: How do I Edit/Compile the Source Code?

Post by Boolsheet »

The wiki page assumes that you're familiar with Visual Studio. I'm sure there are a great many resources on the internet that will give you an introduction to it.

You don't necessarily have to use Visual Studio to edit the code, but its debugging abilities can make things easier. After you opened the love.sln file you should have the solution explorer to the left where you can open the source files and then edit them on the right side. See attached image.

Once you've saved your changes, you can select "Build" -> "Build Solution" to start the compiling or "Debug" -> "Start Debugging" to make Visual Studio build and launch the new love.exe with a debugger attached.

The modified love.exe will be somewhere in the 'platform/msvc2010' directory. Either 'platform\msvc2010\Debug' or 'platform\msvc2010\Release' for the 0.8.0 project and somewhere in 'platform\msvc21010\bin' for the project in tip (the latest source code) depending on the build configuration.
Attachments
Visual Studio with LÖVE 0.8.0 project.
Visual Studio with LÖVE 0.8.0 project.
vss.png (44.97 KiB) Viewed 6173 times
Shallow indentations.
Lüv
Prole
Posts: 29
Joined: Fri Oct 19, 2012 11:24 pm
Location: Greenville, South Carolina

Re: How do I Edit/Compile the Source Code?

Post by Lüv »

Thankyou Boolsheet. But when I open the file under the output tab I recieve the following error
C:\Users\Christopher\Downloads\love\platform\msvc2010\love.vcxproj : warning : Platform 'x64' referenced in the project file 'love' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.

C:\Users\Christopher\Downloads\love\platform\msvc2010\liblove.vcxproj : warning : Platform 'x64' referenced in the project file 'liblove' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'.
And then when I attempt to build I get this error
------ Build started: Project: liblove, Configuration: Release Static Win32 ------
b64.cpp
delay.cpp
c:\users\christopher\downloads\love\src\modules\thread\sdl/threads.h(24): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
Exception.cpp
..\..\src\common\Exception.cpp(42): warning C4996: 'vsnprintf': This function or variable may be unsafe. Consider using vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(354) : see declaration of 'vsnprintf'
math.cpp
Matrix.cpp
Memoizer.cpp
Module.cpp
c:\users\christopher\downloads\love\src\common\runtime.h(29): fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
Object.cpp
Reference.cpp
c:\users\christopher\downloads\love\src\common\runtime.h(29): fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
runtime.cpp
c:\users\christopher\downloads\love\src\common\runtime.h(29): fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
utf8.cpp
Variant.cpp
C:\Users\Christopher\Downloads\love\src\common/runtime.h(29): fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
Vector.cpp
wrap_Data.cpp
c:\users\christopher\downloads\love\src\common\runtime.h(29): fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
------ Build started: Project: love, Configuration: Release Static Win32 ------
love.cpp
..\..\src\love.cpp(22): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: How do I Edit/Compile the Source Code?

Post by Boolsheet »

I don't know if they changed it, but you probably need the Windows SDK for the 64-bit compilers.

Which version of LÖVE are you trying to build and which LÖVE SDK are you using?
Shallow indentations.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests