From d955a0efc498fcdf2d3a35d2939aeff6ef59cec3 Mon Sep 17 00:00:00 2001 From: athile Date: Mon, 30 Aug 2010 02:12:54 +0100 Subject: [PATCH 1/4] WIP Windows build --- .gitignore | 1 + CMakeLists.txt | 33 +++++++++++++++++++++++++- apps/openmw/mwworld/actionteleport.cpp | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b8383fd51..774478e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build *~ Doxygen +prebuilt \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index ca21824b6..352f3c950 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,34 @@ option(USE_MPG123 "use mpg123 + libsndfile for sound" ON) # We probably support older versions than this. cmake_minimum_required(VERSION 2.6) + +# +# Pre-built binaries being used? +# +IF(EXISTS "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") + message (STATUS "OpenMW pre-built binaries found. Attempting to use pre-built binaries.") + + SET(ENV{OGRE_HOME} "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") + + SET(ENV{BOOST_ROOT} "${CMAKE_SOURCE_DIR}/prebuilt/boost_1_42_0") + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) + set(ENV{BOOST_INCLUDEDIR} "${BOOST_ROOT}/include") + set(ENV{BOOST_LIBRARYDIR} "${BOOST_ROOT}/lib") + + set(ENV{FREETYPE_DIR} "${CMAKE_SOURCE_DIR}/prebuilt/freetype-2.3.5-1") + + set(USE_MPG123 OFF) + set(USE_AUDIERE ON) + set(AUDIERE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/include") + set(AUDIERE_LIBRARY "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/lib/audiere.lib") + + set(ENV{OPENALDIR} "${CMAKE_SOURCE_DIR}/prebuilt/OpenAL 1.1 SDK") + +ELSE() + message (STATUS "OpenMW pre-built binaries not found. Using standard locations.") +ENDIF() + # Add path for CMake scripts set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) @@ -166,6 +194,9 @@ if (WIN32) else (WIN32) set(PLATFORM_INCLUDE_DIR "") endif (WIN32) +if (MSVC10) +set(PLATFORM_INCLUDE_DIR "") +endif() # Dependencies @@ -180,10 +211,10 @@ include_directories("." ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/MyGUIEngine/include ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/OgrePlatform/include + ${OPENAL_INCLUDE_DIR} ${LIBDIR} ) - link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR}) add_subdirectory( extern/caelum ) diff --git a/apps/openmw/mwworld/actionteleport.cpp b/apps/openmw/mwworld/actionteleport.cpp index 4edc02c30..f757b70be 100644 --- a/apps/openmw/mwworld/actionteleport.cpp +++ b/apps/openmw/mwworld/actionteleport.cpp @@ -11,7 +11,7 @@ namespace MWWorld : mCellName (cellName), mPosition (position) {} - void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment) + void ActionTeleportPlayer::execute (Environment& environment) { environment.mWorld->changeCell (mCellName, mPosition); } From 72fbeb9b9a00db45df3748eca3806c1d1c1b053a Mon Sep 17 00:00:00 2001 From: athile Date: Mon, 30 Aug 2010 02:41:09 +0100 Subject: [PATCH 2/4] Mangle update --- libs/mangle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/mangle b/libs/mangle index 3324f6494..6ff6d7556 160000 --- a/libs/mangle +++ b/libs/mangle @@ -1 +1 @@ -Subproject commit 3324f6494c021e3dc69cd76ace5ff25a52e4bcce +Subproject commit 6ff6d7556c760bfb784249b63c5610e53f891a9e From 9e2129c4b3b68947b9b0727bc2650bbc1155e3e6 Mon Sep 17 00:00:00 2001 From: athile Date: Mon, 30 Aug 2010 10:34:13 +0100 Subject: [PATCH 3/4] WIP Windows build --- apps/openmw/CMakeLists.txt | 2 +- extern/mygui_3.0.1/OgrePlatform/CMakeLists.txt | 4 ++-- libs/mangle | 2 +- libs/platform/stdint.h | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index b5948aaea..c3ba0b22b 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -201,7 +201,7 @@ target_link_libraries(openmw ${SOUND_INPUT_LIBRARY} caelum MyGUIEngine - MyGUI.OgrePlatform + MyGUIOgrePlatform ) if (APPLE) diff --git a/extern/mygui_3.0.1/OgrePlatform/CMakeLists.txt b/extern/mygui_3.0.1/OgrePlatform/CMakeLists.txt index 38c5c714a..2fa38a242 100644 --- a/extern/mygui_3.0.1/OgrePlatform/CMakeLists.txt +++ b/extern/mygui_3.0.1/OgrePlatform/CMakeLists.txt @@ -4,6 +4,6 @@ include_directories( ${OGRE_INCLUDE_DIR} ) include(MyGUI.OgrePlatform.list) -add_library(MyGUI.OgrePlatform ${HEADER_FILES} ${SOURCE_FILES}) -target_link_libraries(MyGUI.OgrePlatform ${OGRE_LIBRARIES}) +add_library(MyGUIOgrePlatform ${HEADER_FILES} ${SOURCE_FILES}) +target_link_libraries(MyGUIOgrePlatform ${OGRE_LIBRARIES}) link_directories(${OGRE_LIB_DIR}) diff --git a/libs/mangle b/libs/mangle index 6ff6d7556..4a31f4e0f 160000 --- a/libs/mangle +++ b/libs/mangle @@ -1 +1 @@ -Subproject commit 6ff6d7556c760bfb784249b63c5610e53f891a9e +Subproject commit 4a31f4e0f874b6e0715b7c195a44f5a3975fdb7e diff --git a/libs/platform/stdint.h b/libs/platform/stdint.h index 499590da7..00af741b1 100644 --- a/libs/platform/stdint.h +++ b/libs/platform/stdint.h @@ -2,6 +2,12 @@ #ifndef _STDINT_WRAPPER_H #define _STDINT_WRAPPER_H +#if (_MSC_VER >= 1600) + +#include + +#else + #include // Pull the boost names into the global namespace for convenience @@ -11,3 +17,5 @@ using boost::int64_t; using boost::uint64_t; #endif + +#endif From 336fb1636c7fca44f6b1b371e16125b87bf27651 Mon Sep 17 00:00:00 2001 From: athile Date: Mon, 30 Aug 2010 11:19:45 +0100 Subject: [PATCH 4/4] Windows fixes --- CMakeLists.txt | 17 +++++++++-------- apps/openmw/mwgui/window_manager.cpp | 4 ++-- libs/mangle | 2 +- libs/openengine | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 352f3c950..beed45084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,25 +12,26 @@ cmake_minimum_required(VERSION 2.6) # # Pre-built binaries being used? # -IF(EXISTS "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") - message (STATUS "OpenMW pre-built binaries found. Attempting to use pre-built binaries.") +IF(EXISTS "${CMAKE_SOURCE_DIR}/prebuilt/vc100-mt-gd/ogre_1_7_1") + set(PREBUILT_DIR "${CMAKE_SOURCE_DIR}/prebuilt/vc100-mt-gd") + message (STATUS "OpenMW pre-built binaries found at ${PREBUILT_DIR}.") - SET(ENV{OGRE_HOME} "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") + SET(ENV{OGRE_HOME} "${PREBUILT_DIR}/ogre_1_7_1") - SET(ENV{BOOST_ROOT} "${CMAKE_SOURCE_DIR}/prebuilt/boost_1_42_0") + SET(ENV{BOOST_ROOT} "${PREBUILT_DIR}/boost_1_42_0") set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(ENV{BOOST_INCLUDEDIR} "${BOOST_ROOT}/include") set(ENV{BOOST_LIBRARYDIR} "${BOOST_ROOT}/lib") - set(ENV{FREETYPE_DIR} "${CMAKE_SOURCE_DIR}/prebuilt/freetype-2.3.5-1") + set(ENV{FREETYPE_DIR} "${PREBUILT_DIR}/freetype-2.3.5-1") set(USE_MPG123 OFF) set(USE_AUDIERE ON) - set(AUDIERE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/include") - set(AUDIERE_LIBRARY "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/lib/audiere.lib") + set(AUDIERE_INCLUDE_DIR "${PREBUILT_DIR}/audiere-1.9.4/include") + set(AUDIERE_LIBRARY "${PREBUILT_DIR}/audiere-1.9.4/lib/audiere.lib") - set(ENV{OPENALDIR} "${CMAKE_SOURCE_DIR}/prebuilt/OpenAL 1.1 SDK") + set(ENV{OPENALDIR} "${PREBUILT_DIR}/OpenAL 1.1 SDK") ELSE() message (STATUS "OpenMW pre-built binaries not found. Using standard locations.") diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index 726cd5bd8..74adfe206 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -13,8 +13,8 @@ WindowManager::WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment { // Get size info from the Gui object assert(gui); - int w = gui->getViewWidth(); - int h = gui->getViewHeight(); + int w = gui->getViewSize().width; + int h = gui->getViewSize().height; hud = new HUD(w,h); menu = new MainMenu(w,h); diff --git a/libs/mangle b/libs/mangle index 4a31f4e0f..2407f21c4 160000 --- a/libs/mangle +++ b/libs/mangle @@ -1 +1 @@ -Subproject commit 4a31f4e0f874b6e0715b7c195a44f5a3975fdb7e +Subproject commit 2407f21c47abe218b9347df0fc9e8e9aebc02e3f diff --git a/libs/openengine b/libs/openengine index 2e2f8e972..85cb75631 160000 --- a/libs/openengine +++ b/libs/openengine @@ -1 +1 @@ -Subproject commit 2e2f8e9725fd1a27a82d0ad5c6c0e296e715eb60 +Subproject commit 85cb75631b1efbde312e65937ad059754fb835b6