[Scummvm-devel] MSVC9 -Project files

Norbert Lange lange at chello.at
Thu Apr 2 23:26:58 CEST 2009

>> > Cause they could use some work, and I did just that... like enabling
>> > Flac-support and moving the defines in a global settings file so you  
>> dont
>> > need to add/remove preprocessor directives like "USE_FLAC" for every
>> > engine/project, and did a similar thing for compiler+linker settings.
> Yes, they do need work. Thanks for your work, it's most welcome :)
> Please upload your patches to our patch tracker:
> https://sourceforge.net/tracker/?group_id=37116&atid=418822
> The reason why FLAC wasn't enabled was because I had loads of warnings
> when enabling it, and I didn't get around to fix them (I was busy with  
> other
> things).

I have tons of warnings each time when I compile the libraries themselfes,
I added them to the ScummVM-Project and thats what I gotta undo before
submitting anything. ScummVM itself compiles mostly fine, except some
overzealous warnings to use MS` "safe CRT Functions"

> Universal compiler+linker settings would be great too, just bear in mind  
> that
> there's one notable exception (the tinsel engine) where edit and continue
> doesn't work, because of the coroutine code used.

Yeah I already ran into that =).
What I meant with universal settings is having a own property-sheets for
settings (not just the same settings everywhere, but a single place to
change them for all Projects). Project-Specific settings inherit from
them, but you can override anything if you want to (like in the case of
tinsel). I created 3 such global files, hierarchically:

Release|Win32 (per Project Settings)
             |-----ScummVM_Release (Compiler/Linker Settings)
                             |--------ScummVM_Global (Preprocessor defines,
include directories, etc)

Debug|Win32 (per Project Settings)
             |-----ScummVM_Debug (Compiler/Linker Settings)
                             |--------ScummVM_Global (Preprocessor defines,
include directories, etc)

The only thing Im not sure about is, if older MSVC Versions support this
(and the batch-scripts certainly need to be adopted).

>> > Also, a question about the Programmstart, this is how its done  
>> currently
>> > on Win32:
>> >
>> > *) #define main as SDL_Main (is it just me or is this buttugly?)
>> > [SDL_Main.h#50]
>> > *) implement WinMain() to initialise SDL, then call main() (which is a
>> > macro to SDL_Main)
>> > *) setup linker for a console-app
>> > *) and then manually specify WinMain() as entrypoint?
> This is not ugly, it's the way to start an application with a console...

If I want to run an App on console I just write a single main() function,
everything else is ugly =)

>> >
>> > whats speaking against the simple way of just adding the needed  
>> couple of
>> > lines to initialise SDL in the normal main() routine instead?
>> >
>> > .
>> > #if defined (WIN32)
>> >        SDL_SetModuleHandle(GetModuleHandle(NULL));
>> > #endif
>> > .
> Will that add show the console window too? If yes, then this would be  
> much
> cleaner indeed :)

Yeah, console is there. As said, maybe some old MSVC-Versions had some
problems with this... thus I rather ask twice if theres a solid reason for
the way its done now.

Cheers, Norbert

More information about the Scummvm-devel mailing list