1 (edited by Deepfinder 2018-10-12 11:32:10)

Topic: [HowTo] Compile 0.7 on windows

Just a quick instruction to how to compile teeworlds 0.7 on windows with Visual Studio since there are some changes since 0.6.
I will not explain what you need for compiling at all, things like Visual Studio and python etc. should be clear. This guide is for those who already know how to compile 0.6. In short, it's all about downloading SDL and Freetype.

You need:
Teeworlds source: https://github.com/teeworlds/teeworlds/ … master.zip
Bam 0.5: https://github.com/matricks/bam/archive/v0.5.1.zip
SDL: https://buildbot.libsdl.org/sdl-builds/ … o-4174.zip (you may want to download the latest version)
Freetype: https://codeload.github.com/ubawurinna/ … zip/master

1) Download and extract the teeworlds source. Download and extract and compile bam.
In order to compile teeworlds, we will now need SDL and Freetype.
2) Download and extract SDL. You will find an "include" and "lib" folder there. Copy them into your teeworlds source folder at \teeworldsSource\other\sdl.
3) Now go to \teeworldsSource\other\sdl\lib\win32\ and copy "SDL2.lib" and "SDL2main.lib" into the root direction of your teeworlds folder (\teeworldsSource\).
4) Download and extract Freetype. Also here you will find an "include" and "win32" / "win64" folder. Copy them into your teeworlds source at \teeworldsSource\other\freetype.
5) Now go to \teeworldsSource\other\freetype\win32\ and copy "freetype.lib" into the root direction of your teeworlds folder (\teeworldsSource\).

Now we are ready to compile, although we are not finish.
6) First, the commands in bam.lua have changed. Available are "game", "client", "server", "content". Default is "game" and means server, client and content.
Compile what you want but at first I recommend to do "game" because this will create client, server and - most important - your "/data/" folder (but you can also create the data folder with "content").
7) Second, the place where the finish stuff comes out has changed. It's not the root direction like in 0.6 anymore, you will now find it at \teeworldsSource\build\x86.
8) To start your compiled client or server, you need SDL2.dll and freetype.dll. Copy them from \teeworldsSource\other\sdl\lib\win32 and \teeworldsSource\other\freetype\win32 into \teeworldsSource\build\x86.

Finish! Now you should be able to compile and start teeworlds.
The most annoying thing is to copy SDL and freetype into the right folders, but with the links above and this instruction I hope it's more easy for you.

I will be banned if I troll again ...

2 (edited by 2018-10-11 17:08:50)

Re: [HowTo] Compile 0.7 on windows

why dont they include it in source anymore?

Deepfinder wrote:

1) Download and extract the teeworlds source. Download and extract and compile bam.
In order to compile teeworlds, we will now need SDL and Freetype.
2) Download and extract SDL. You will find an "include" and "lib" folder there. Copy them into your teeworlds source folder at \teeworldsSource\other\sdl.
3) Now go to \teeworldsSource\other\sdl\lib\win32\ and copy "SDL2.lib" and "SDL2main.lib" into the root direction of your teeworlds folder (\teeworldsSource\).
4) Download and extract Freetype. Also here you will find an "include" and "win32" / "win64" folder. Copy them into your teeworlds source at \teeworldsSource\other\freetype.
5) Now go to \teeworldsSource\other\freetype\win32\ and copy "freetype.lib" into the root direction of your teeworlds folder (\teeworldsSource\).

i would do some steps differently


2) Download and extract SDL. You will find an "include" and "lib" folder there. Copy them into your teeworlds source folder at \teeworldsSource\other\sdl. and in "lib" rename the folders "win32" to "x86" and "win64" to "x64"

5) Now go to \teeworldsSource\other\freetype\ and copy "win32" / "win64" to a new folder named "lib" and rename the folders "win32" to "x86" and "win64" to "x64"

3

Re: [HowTo] Compile 0.7 on windows

thanks

4 (edited by Deepfinder 2018-10-12 11:42:44)

Re: [HowTo] Compile 0.7 on windows

ZombieToad wrote:

why dont they include it in source anymore?

I don't know. 0.7 is not mod friendly

ZombieToad wrote:

I would do some steps differently

2) Download and extract SDL. You will find an "include" and "lib" folder there. Copy them into your teeworlds source folder at \teeworldsSource\other\sdl. and in "lib" rename the folders "win32" to "x86" and "win64" to "x64"

5) Now go to \teeworldsSource\other\freetype\ and copy "win32" / "win64" to a new folder named "lib" and rename the folders "win32" to "x86" and "win64" to "x64"

Of course this looks better at the end, but I think rename the downloaded stuff could lead to confusion later. Note that there are different versions of SDL and freetype for Windows, one for Visual Studio and one for mingw. And then there is Linux.
This is only for Windows with visual studio

I will be banned if I troll again ...

5

Re: [HowTo] Compile 0.7 on windows

How does one actually compile 0.7 on windows? Are the binaries coming out soon?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

6 (edited by Deepfinder 2018-10-17 16:56:26)

Re: [HowTo] Compile 0.7 on windows

android272 wrote:

How does one actually compile 0.7 on windows? Are the binaries coming out soon?

What problems do you have with compiling Teeworlds 0.7? If you want to try 0.7, can also download my Bla-Client: https://www.teeworlds.com/forum/viewtopic.php?id=12549

I will be banned if I troll again ...

7

Re: [HowTo] Compile 0.7 on windows

android272 wrote:

How does one actually compile 0.7 on windows? Are the binaries coming out soon?

official 0.7.0-release

~~~~Simple

8

Re: [HowTo] Compile 0.7 on windows

DEXi wrote:
android272 wrote:

How does one actually compile 0.7 on windows? Are the binaries coming out soon?

official 0.7.0-release

YAY big_smile

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

9

Re: [HowTo] Compile 0.7 on windows

Can someone help me compile from source? I am getting the following error when I try to compile with ..\bam\bam.

c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lfreetype
collect2.exe: error: ld returned 1 exit status
bam: 'link build/x86/debug/teeworlds.exe' error 1
bam: error: a build step failed

It has something to do with freetype but I don't know what to do. I made sure to download freetype from the link above, copy "include" and "win32" into \teeworldsSource\other\freetype, and moved (cut paist) "freetype.lib" into the teeworlds root directory like it says.

Is there something else I am missing?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds