Building Pioneer with code::blocks (Windows)

Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Building Pioneer with code::blocks (Windows)

Post 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.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

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

Post by FluffyFreak »

Nice work dude :) Glad to see you around again too!
Darkdesire
Posts: 16
Joined: Thu Nov 21, 2013 12:13 pm

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

Post 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
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

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

Post 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.
Darkdesire
Posts: 16
Joined: Thu Nov 21, 2013 12:13 pm

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

Post by Darkdesire »

Thank's Luomu,

i will try ASAP

Thank's for your help
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

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

Post 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
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

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

Post 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.
walterar
Posts: 95
Joined: Sat Sep 14, 2013 4:48 pm

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

Post by walterar »

It supports to_string?
walterar
Posts: 95
Joined: Sat Sep 14, 2013 4:48 pm

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

Post 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'
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

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

Post 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.
Post Reply