Can the Code::Blocks distribution be relied upon?

Ask for help with ScummVM problems

Moderator: ScummVM Team

monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Can the Code::Blocks distribution be relied upon?

Post by monsieurouxx »

Hi!
The wiki does not mention Code::Blocks (only MinGW), and when I open dists/codeblocks/scummvm.workspace, I find that it was created for an older version of Code::Blocks.
Also, at Build time, it fails to find common/*.h (that's no big deal but I'm surprised it doesn't find it by itself).

So, I'm just wondering if it's safe using the Code::Blocks dist.

If it's alright, may I write a litle tutorial for the wiki?
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Re: Can the Code::Blocks distribution be relied upon?

Post by md5 »

monsieurouxx wrote:Hi!
The wiki does not mention Code::Blocks (only MinGW), and when I open dists/codeblocks/scummvm.workspace, I find that it was created for an older version of Code::Blocks.
Also, at Build time, it fails to find common/*.h (that's no big deal but I'm surprised it doesn't find it by itself).

So, I'm just wondering if it's safe using the Code::Blocks dist.

If it's alright, may I write a litle tutorial for the wiki?
There's a tool to auto generate the Code::Blocks project files inside /tools/create_project (though I think that the Code::Blocks functionality hasn't been tested).

Feel free to add a tutorial in the wiki :) Ask fingolfin or sev for a wiki account
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

There's something I don't understand : I've downloaded the latest stable version of the sources (not the nightly build).

However, when I build the projects, it complains that agi_v2.cpp is missing, the direct consequence beeing that the final linking fails because agi_v2.o does not exist.

What's going on?
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Re: Can the Code::Blocks distribution be relied upon?

Post by monsieurouxx »

md5 wrote: There's a tool to auto generate the Code::Blocks project files inside /tools/create_project (though I think that the Code::Blocks functionality hasn't been tested).
Are you sure??? I can only find a tool for MSVC.
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

Well I really don't understand what's going on, since I downloaded ScummVM 1.2.1 source .zip from http://prdownloads.sourceforge.net/scum ... p?download and still there seems plenty of files and/or class declarations missing. For example, where is Graphics::CoktelDecoder ? That's just one example amongst others.
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Re: Can the Code::Blocks distribution be relied upon?

Post by md5 »

monsieurouxx wrote:
md5 wrote: There's a tool to auto generate the Code::Blocks project files inside /tools/create_project (though I think that the Code::Blocks functionality hasn't been tested).
Are you sure??? I can only find a tool for MSVC.
Yes, it's in /trunk/tools/create_project. Pasting the help shown from the program:
Usage:
create_project.exe path\to\source [optional options]

Creates project files for the ScummVM source located at "path\to\source".
The project files will be created in the directory where tool is run from and
will include "path\to\source" for relative file paths, thus be sure that you
pass a relative file path like "..\..\trunk".

Additionally there are the following switches for changing various settings:

Project specific settings:
--codeblock build Code::Blocks project files
--msvc build Visual Studio project files
--file-prefix prefix allow overwriting of relative file prefix in the
MSVC project files. By default the prefix is the
"path\to\source" argument
--output-dir path overwrite path, where the project files are placed
By default this is ".", i.e. the current working
directory

MSVC specific settings:
--msvc-version version set the targeted MSVC version. Possible values:
8 stands for "Visual Studio 2005"
9 stands for "Visual Studio 2008"
10 stands for "Visual Studio 2010"
The default is "9", thus "Visual Studio 2008"
--build-events Run custom build events as part of the build
(default: false)

ScummVM engine settings:
--list-engines list all available engines and their default state
--enable-engine enable building of the engine with the name "engine"
--disable-engine disable building of the engine with the name "engine"
--enable-all-engines enable building of all engines
--disable-all-engines disable building of all engines

ScummVM optional feature settings:
--enable-name enable inclusion of the feature "name"
--disable-name disable inclusion of the feature "name"

There are the following features available:

state | name | description

enabled | libz | zlib (compression) support
enabled | mad | libmad (MP3) support
enabled | vorbis | Ogg Vorbis support
enabled | flac | FLAC support
enabled | png | libpng support
enabled | theora | Theora decoding support
disabled | mpeg2 | mpeg2 codec for cutscenes
enabled | scalers | Scalers
enabled | hqscalers | HQ scalers
enabled | 16bit | 16bit color support
enabled | mt32emu | integrated MT-32 emulator
enabled | nasm | IA-32 assembly support
enabled | opengl | OpenGL support
enabled | translation | Translation support
enabled | langdetect | System language detection support
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

What md5 writes is correct, but only applies to the current development branch.

For 1.2.x, there is indeed only create_msvc, and not the more general create_project tool that replaced it in the latest development code.
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

create_project exists only in the repository
Alright, that explains a lot.

What is your opinion on the "missing" classes and files in the 1.2.1 source code? It's probably me who's making a mistake, but I can't spot it.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

It just means that the codeblocks project files are outdated and missing tons of source files. E.g. the CoktelDecoder class -- so, just grep through the sources to find out which .cpp file it is in, and add that to the project. Rince and repeat till things compile :).
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

You could also compile the create_project tool from the trunk and let it recreate the project files for you
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

You're missing my point. The files themselves seem to be missing -- not only in the Code::Blocks project, but also in the file system.
However I've used the "search in file" feature of code::blocks and maybe it doesn't work the same way as MSVC's one. I'll search directly using Windows' search, to see if the files are really missing.
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Post by LordHoto »

monsieurouxx wrote:You're missing my point. The files themselves seem to be missing -- not only in the Code::Blocks project, but also in the file system.
However I've used the "search in file" feature of code::blocks and maybe it doesn't work the same way as MSVC's one. I'll search directly using Windows' search, to see if the files are really missing.
The source tarball of 1.2.1 definitly contains all the files required for building. It might very well be that the Code::Blocks project file itself contains references to some older paths were some files were placed in the past, but not these days anymore. This might mislead one to think they are missing.

I do not think anyone of the team used Code::Blocks in quite some time. I think peres did add these project files in the past, since he used Code::Blocks. The files we have in the source distro might be very specific to his Code::Blocks setup. It might be or not be that even the Code::Blocks files generated by create_project work only with a very specific Code::Blocks etc. setup.
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

LordHoto wrote: I do not think anyone of the team used Code::Blocks in quite some time.
What does one use when one does not want to use MSVC? Do you use Dev Cpp ?
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Most of us don't use Windows at all... :)
User avatar
clone2727
Retired
Posts: 1611
Joined: Fri Jun 09, 2006 8:23 pm
Location: NJ, USA

Post by clone2727 »

monsieurouxx wrote:What does one use when one does not want to use MSVC? Do you use Dev Cpp ?
MinGW
Post Reply