Done with my moderately successful wxWidgets cleaning tool, I tried to build wxFRED on MSVC10. It didn't work. Compile-time errors, run-time errors, you name it. So I fixed it. Diff attached.
As far as I know, simply getting wxFRED to compile and run is farther than anyone else has gotten in the recent past, so well done. I'll need to take a closer look at your attached diff later. By the way, if you could attach .diff files as uncompressed files, rather than in a .zip archive, that would be appreciated.
Warning: it has taken a blunt axe and a bulldozer to fix it.
I suppose you have to start with getting
something working and then build up from there.
- Upgraded the project file from wx 2.8 to 2.9, since 2.8 doesn't work on MSVC10. Theoretically it should still compile under 2.8 as well, you'll only have to change the linked libraries in the project file.
Hmm, odd that 2.8 doesn't work on MSVC 2010. I've used 2.8.12 with VS2008 Professional, but I've never tried VS2010.
Yeah, upgrading to Unicode is a good move.
- Removed non-existing voicefilemanager files from the project
- Added ../../code to the include directories
Yup, these are changes I also had to make to get it to compile, although I couldn't get it to link. This was the VS2005 project running in VS2008.
- Removed non-functioning XML stuff from the project
The XML file is an
XRC file, an XML-based specification of wxFRED's GUI widgets (dialogs, buttons, etc) and their layout. It's analogous to MSVC's RC files for Windows GUI applications.
And possibly some more which I forgot already. Oh, and I only fixed Debug configuration - haven't touched Release (yet). And I haven't been able to test my changes in Linux, something's wrong with the linked wx libraries there (couldn't find wx/wxprec.h) and the FSO makefiles (i.e. autogen.sh, configure.ac, Makefile.am) are a little over my head, so I couldn't fix it. (On that note, wouldn't it be easier to have separate makefiles for wxFRED?)
I'd think that since wxFRED, like FRED 2 Open, is intimately tied with the FSO codebase, since they all use the mission data structures, separate autotools configuration scripts for wxFRED wouldn't be possible, but that's just a guess.
Now, what does it do? Nothing. When run, it's just an empty frame. I might have thrown out some functionality with the weird XML stuff, I'm aware of that. But at least it compiles and runs now, so that's an improvement.
The reason it's an empty frame is that it's missing the XRC file, as mentioned above. That said, a working project with an empty frame is indeed a better starting point than a non-working project with an XRC file.
One thing that will certainly help if you haven't done it yet is to build wxrc, which IIRC compiles the XRC file to a binary format that wxFRED can use. wxrc is in a separate MSVC project within the wxWidgets source tree. in 2.8.12, the wxrc project is in wxWidgets-2.8.12\utils\wxrc .
Thanks for looking into this.