Page 1 of 3
How do I Edit/Compile the Source Code?
Posted: Fri Oct 19, 2012 11:32 pm
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
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:00 am
by Robin
That page includes all the information necessary.
What operating system do you use?
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:03 am
by Lüv
Windows 64-bit
It does not tell you how to edit and compile, it just shows how to setup the binaries
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:05 am
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
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:06 am
by Robin
Do you have Visual Studio 2008 or 2010?
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:08 am
by Lüv
Robin wrote:Do you have Visual Studio 2008 or 2010?
I have Visual C++ 2010
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 12:10 am
by Robin
Can a Windows expert please take over?
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 10:47 am
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.
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 1:43 pm
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 ==========
Re: How do I Edit/Compile the Source Code?
Posted: Sat Oct 20, 2012 2:23 pm
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?