Page 1 of 2

Building Pioneer with code::blocks (Windows)

Posted: Sat Dec 21, 2013 4:01 pm
by Luomu
edit: updated instructions & links here: http://pioneerwiki.com/wiki/Building_with_Code::Blocks

Hey guys!

I don't have any version of Visual Studio installed any more so I had to get a code::blocks/mingw solution working. This might be useful to some of you.

First, install C::B. I have 13.12-RC1 right now.

Then, you'll need a compiler suite. I used TDM-GCC, 32-bit version.

Set up C::B to work with the compiler. Settings->Compiler, edit the default "GNU GCC compiler" configuration. The important settings are on the "Toolchain executables" tab. Set installation path to C:\TDM-GCC-32 (or wherever you installed it), the rest should be:
C compiler, mingw32-gcc.exe
C++ compiler, mingw32-g++.exe
Linker dynamic, mingw32-g++.exe
Linker static, ar.exe
Debugger, GDB/CDB
Resource compiler, windres.exe
Make program, mingw32-make.exe

Generating the C::B workspace. Check out my branch github.com/Luomu/pioneer/code-blocks. I made a Premake file to generate the projects, because maintaining individual project files is dull. Here's the premake4.exe I used: https://dl.dropboxusercontent.com/u/957 ... emake4.zip

Before generating the project, you'll need to gather some dependencies (SDL, LibPNG, vorbis...). I collected them in a package: https://dl.dropboxusercontent.com/u/957 ... b-deps.zip
Some come from the helpful http://mingw.pados.hu/, SDL from the project site and Assimp was built by me. If they don't work for you, you are on your own :) Extract them somewhere (let's say d:\dev\mingw32). You'll need the DLLs from bin/ in the game directory.

You may now generate the projects. In the project directory type
premake4.exe --thirdparty=D:/dev/mingw32 codeblocks
or just premake4 codeblocks, if you don't want to use the deps package and will set up the paths by yourself. You'll find Pioneer.workspace under build/.

That should be enough to build a working copy of Pioneer.

Re: Building Pioneer with code::blocks (Windows)

Posted: Sat Dec 21, 2013 4:49 pm
by FluffyFreak
Nice work dude :) Glad to see you around again too!

Re: Building Pioneer with code::blocks (Windows)

Posted: Sun Dec 22, 2013 2:04 pm
by Darkdesire
Hello,

i've tried your solution but when running premake4, it says script file not found (premake4.lua)

I've download all your package and installed them as you say.

Can you help me ?

Thank's

Re: Building Pioneer with code::blocks (Windows)

Posted: Sun Dec 22, 2013 5:18 pm
by Luomu
Darkdesire wrote:Hello,
i've tried your solution but when running premake4, it says script file not found (premake4.lua)
Did you git checkout my code-blocks branch? https://github.com/Luomu/pioneer/tree/code-blocks

It has the .lua file in the root directory + couple of small source code modifications to get the build working.

Re: Building Pioneer with code::blocks (Windows)

Posted: Mon Dec 23, 2013 10:49 am
by Darkdesire
Thank's Luomu,

i will try ASAP

Thank's for your help

Re: Building Pioneer with code::blocks (Windows)

Posted: Wed Jan 08, 2014 9:47 am
by FluffyFreak
I had to make a small change to your preamke.lua before it would generate the project files under Linux.
It won't yet build anything but I was bored waiting for a full rebuild on my main PC :D

It's on fluffyfreak:code-blocks

Re: Building Pioneer with code::blocks (Windows)

Posted: Wed Jan 08, 2014 3:00 pm
by Luomu
FluffyFreak wrote:I had to make a small change to your preamke.lua before it would generate the project files under Linux.
It won't yet build anything but I was bored waiting for a full rebuild on my main PC :D

It's on fluffyfreak:code-blocks
Thanks, I'm still testing more before making a PR out of this. I've already done a couple more improvements.

Re: Building Pioneer with code::blocks (Windows)

Posted: Thu Jan 30, 2014 2:46 am
by walterar
It supports to_string?

Re: Building Pioneer with code::blocks (Windows)

Posted: Fri Feb 21, 2014 12:18 pm
by walterar
Thanks! I probe this system in win7 now, this not compatible with C++11.

... error: 'to_string' is not a member of 'std'

Re: Building Pioneer with code::blocks (Windows)

Posted: Fri Feb 21, 2014 1:44 pm
by Luomu
Could be this old mingw bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015

I am going to make a wiki page with updated instructions + dependencies soon.