I decided to try a quick hack-and-slash port of fracplanet to a more recent version of Qt. Since I’m using a windows box I installed the Qt SDK for Windows. Also, downloaded and installed the version of MinGW from trolltech as part of the install. I installed Qt to C:\Devel\Qt\4.5.1 and MinGW to C:\Devel\Qt\MinGW
First step ran qt3to4 on fracplanet.pro, then qmake VERSION_NUMBER=0.4 fracplanet.pro, and make. I’m missing dependencies like boost so I didn’t expect this to get very far. It didn’t.
First problem was the VERSION_NUMBER=0.4. At line 32 in control_about.cpp their isn’t a automatic conversion from QChar to double. So next I did qmake VERSION_NUMBER=1 fracplanet.pro, and make.
Got to line 55 of control_about.cpp and had to change it to:
Did make again and now the boost problem. Since this was supposed to be a quick hack-and-slash I didn’t bother building boost. Found and installed Boost-1.34.1-mingw.exe into C:\Devel\Boost-1.34.1 and added the following directives to fracplanet.pro:
LIBS += -lboost_program_options-mt
INCLUDEPATH += C:\Devel\Boost-1.34.1\include
LIBPATH += C:\Devel\Boost-1.34.1\lib
LIBPATH += C:\Devel\MinGW\lib
Then redid qmake VERSION_NUMBER=1 fracplanet.pro, and make.
Next problem was a mission qhbuttongroup.h in control_render.h at line 27. Appears that the qhbuttongroup was rolled into qbuttongroup at some point. qt3to4 didn’t pick this one up so I mannually changed qhbuttongroup.h to q3buttongroup.h. Same in control_terrain.h.
Copied usage_text.h out of a previous build with cygwin to get around figuring out how to actually build the documentation.
Changed line 113 in fracplanet_main.cpp to
Added the following before the use of glDrawRangeElements in triangle_mesh_viewer_display.cpp
PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = NULL;
glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)wglGetProcAddress("glDrawRangeElements");
Then redid qmake VERSION_NUMBER=1 fracplanet.pro, and make. And the end result… A working copy of fracplanet built against Qt 4 compiled with MingW.
OK, technically it’s still Qt 3 since it uses Qt3Support. Also, has to be run from the command line at the moment. Might fix it up and package it later.