as I tried to build OpenMW under windows (Seven / Visual Studio 10), I encountered several little issues but was able to fix them. I list them here and hope it could help:
- Dependencies in CMake:
* use flag to enable AUDIERE and disable LIBSNDFILE. I didn't try to alter CMakeFiles.txt but rather used the command line (ie cmake ..\OpenMW-src -G "Visual Studio 10" -DUSE_MPG123=OFF -DUSE_AUDIERE=ON ).
* Boost from Ogre 1.8 doesn't work (under windows at least), I had to use the separate full Boost installation.
- Source code
* patch: I have fixed several issues related to C++ conformance (VS refused to build without them) and some evil Macro not cleaned when debug build is chosen. There was also some mistake in functions declaration which were also blocking for VC10. Finally I have fixed env variables and some paths.
Sorry in advance for posting them here but I prefered as 1st post not putting files as attachment (can be refused sometimes by admin rules).
apps/openmw/mwgui/settingswindow.hpp
Code: Select all
@@ -14,14 +14,15 @@ namespace MWGui
{
public:
SettingsWindow(WindowManager& parWindowManager);
private:
- static const float sFovMin = 30;
- static const float sFovMax = 140;
- static const float sViewDistMin = 2000;
- static const float sViewDistMax = 5600;
+ //PATCH GVK 2012-06-03: VC10 refuses float const initializers
+ static int const sFovMin = 30;
+ static int const sFovMax = 140;
+ static int const sViewDistMin = 2000;
+ static int const sViewDistMax = 5600;
protected:
MyGUI::Button* mOkButton;
MyGUI::ScrollBar* mMenuTransparencySlider;
Code: Select all
@@ -39,12 +39,13 @@ class OgreFile : public audiere::File
{
return mStream->tell();
}
size_t refs;
- virtual void ref() { ++refs; }
- virtual void unref()
+ //PATCH GVK 2012-06-03 Fix call convention
+ ADR_METHOD(void) ref() { ++refs; }
+ ADR_METHOD(void) unref()
{
if(--refs == 0)
delete this;
}
Code: Select all
@@ -17,10 +17,13 @@
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Patch GVK 2012-06-03: Windows build support
+set(BULLET_ROOT $ENV{BULLET_ROOT})
+
macro(_FIND_BULLET_LIBRARY _var)
find_library(${_var}
NAMES
${ARGN}
PATHS
Code: Select all
@@ -33,11 +33,13 @@ NO_DEFAULT_PATH )
find_path ( MYGUI_PLATFORM_INCLUDE_DIRS
MyGUI_OgrePlatform.h
"${MYGUISDK}/Platforms/Ogre/OgrePlatform/include"
NO_DEFAULT_PATH )
-SET ( MYGUI_LIB_DIR ${MYGUISDK}/*/lib )
+# PATCH GVK 2012-06-03
+#SET ( MYGUI_LIB_DIR ${MYGUISDK}/*/lib )
+SET ( MYGUI_LIB_DIR ${MYGUISDK}/lib )
find_library ( MYGUI_LIBRARIES_REL NAMES
MyGUIEngine.lib
MyGUI.OgrePlatform.lib
HINTS
Code: Select all
@@ -1831,17 +1831,17 @@ void PmoveSingle (playerMove* const pmove)
// End Aedra-specific code
pml.hasWater = pmove->hasWater;
pml.isInterior = pmove->isInterior;
pml.waterHeight = pmove->waterHeight;
-#ifdef _DEBUG
- if (!pml.traceObj)
- __debugbreak();
-
- if (!pml.traceObj->incellptr)
- __debugbreak();
-#endif
+//#ifdef _DEBUG
+ //if (!pml.traceObj)
+ // __debugbreak();
+ //
+ //if (!pml.traceObj->incellptr)
+ // __debugbreak();
+//#endif
// determine the time
pml.msec = pmove->cmd.serverTime - pm->ps.commandTime;
if ( pml.msec < 1 )
pml.msec = 1;
Regards