Opened 16 years ago

Closed 15 years ago

Last modified 6 years ago

#9011 closed patch

Improvements for MSVC9 Project Files

Reported by: SF/nolange Owned by:
Priority: normal Component: Port: Win32
Version: Keywords:
Cc: Game:

Description

I improved the Files for MSVC9 (Visualstudio 2008), primary for easily adding include paths and changing other global Options. The only downside I see so far is that the script files to automatically create Projects for MSVC8,MSVC7 will need to be adapted... and I hope older Versions even are capable of using Property-Sheets. I`ll sum up what I did:

** Disabled Warnings:

Some warnings were disabled in the project-files, I moved all disabling into common/scummsys.h No sense IMHO to do this at different places. This unfortunatly means that all .cpp files have to include this Header at some point - I added it to mt32emu.h so that the mt32 Emulation compiles without errors.

** removed all implicitly defined Macros, like _DEBUG, NDEBUG, _CONSOLE. The IDE takes care of this.

** Use property sheets for common options.

I added a hierarchy of Property-Sheets, an undefined Setting will be inherited from the next Level, there are 3 Levels: Project -> ScummVM_<Configuration Name> -> ScummVM_Global

ScummVM_Global Intended for setting solution-specific settings, like: Include Paths for required libraries (SDL, zlib, ogg, mad, flac, ...), Preprocessor-Definitions (used by multiple projects, eg. USE_ZLIB, ..)

ScummVN_<Configuration Name> (means ScummVM_Release32, ScummVM_Debug32 so far): Set Solution-Wide Compiler/Linker options here.

This helps for having uniform and easily changeable compiler-options, and since Project-Files (for engines atleast) are now little more than a list of source-files they could be generated automatically more easily

** changed the Output Directories.

Now there will be just 1 Folder per Configuration (Debug/Release), alot tidier IMHO.

Ticket imported from: #2774908. Ticket imported from: patches/1116.

Attachments (1)

mvc9.patch (77.5 KB ) - added by SF/nolange 16 years ago.
Patch against trunk

Download all attachments as: .zip

Change History (10)

by SF/nolange, 16 years ago

Attachment: mvc9.patch added

Patch against trunk

comment:1 by fingolfin, 16 years ago

From what you describe, this seems like a nice cleanup. Some questions, though:

* We use several batch files (msvc9_to_msvc8.bat, msvc8_to_msvc7_71.bat, msvc8_to_msvc9.bat) to convert between MSVC9, 8 and 7 / 7.1. Is this still possible after applying your patch? If yes, good. If no, I would prefer to wait with this until we either have updated scripts that can handle it, or have a way to generate those files directly from our module.mk files (resp. switched to CMake).

* Why move all warnings to common/scummsys.h instead of moving all warnings into the project file? That way, you don't have to require all files to include that header. Any particular rationale behind this choice?

comment:2 by SF/nolange, 16 years ago

*) Yeah I know about those scripts and they surely need to be adapted. I could do that, but since I dont have older Versions of MSVC installed I cant test them at all. (The project-files arent back or forwards compatible, even if they are almost the same /= ) *) No rationale, rather the line of thought that the Header File should work for all MSVC Versions (even #6) and the (wrong) assumption that its included everywhere already to sort out various specififc compiler problems. Can easily move all warnings to the global Properties but that would only work for MSVC 7+.. dunno if MSVC allows disabling of warnings in the project-settings at all.

I should have older versions of MSVC somewhere, but I`m wary to install them side-by-side. Surely before the patch can be commited we need to test it on all versions. Whos using some MSVC-Versions on side of the ScummVM Team?

comment:3 by SF/nolange, 16 years ago

Well, bad news... digged through online documentations from older MSVC Versions

MSVC6 - only way to disable warnings is via pragmas, would mean atleast a few of these have to stay in common/scummsys.h

MSVC8 - Is the first Version supporting property-sheets (which allow easily modification of global settings).

Means easy conversion with text-replacement will only be possible between MSVC8 and MVSC9. If someone`s working on CMake or other Solutions I can offer the Project-Files as Template.

comment:4 by sev-, 15 years ago

Does it mean that we should reject this patch?

comment:5 by SF/nolange, 15 years ago

Yeah I guess so. Converting would be only possible between MSVC8 and MVSC9.

comment:6 by SF/nolange, 15 years ago

Resolution: wontfix
Status: newclosed

comment:7 by bluegr, 15 years ago

Resolution: wontfix

comment:8 by bluegr, 15 years ago

Changed the status to "accepted", as this patch has now been added to trunk - it fixes compilation issues when ENABLE_*defines are used and it simplifies configuration options a lot

comment:9 by digitall, 6 years ago

Component: Port: Win32
Note: See TracTickets for help on using tickets.