diff --git a/CMakeLists.txt b/CMakeLists.txt
index 204efce9a..538e6a2fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,6 @@ if (APPLE)
set(APP_BUNDLE_NAME "${CMAKE_PROJECT_NAME}.app")
set(APP_BUNDLE_DIR "${OpenMW_BINARY_DIR}/${APP_BUNDLE_NAME}")
-
- # using 10.6 sdk
- set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk")
endif (APPLE)
# Macros
@@ -146,6 +143,7 @@ endif (USE_MPG123)
# Platform specific
if (WIN32)
+ set(Boost_USE_STATIC_LIBS ON)
set(PLATFORM_INCLUDE_DIR "platform")
add_definitions(-DBOOST_ALL_NO_LIB)
else (WIN32)
@@ -163,7 +161,7 @@ endif (APPLE)
# Dependencies
-# Fix for not visible pthreads functions for linker with glibc 2.15
+# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
find_package (Threads)
endif()
@@ -184,6 +182,7 @@ ENDIF(WIN32)
ENDIF(OGRE_STATIC)
include_directories("."
${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre ${OGRE_INCLUDE_DIR}/OGRE ${OGRE_PLUGIN_INCLUDE_DIRS}
+ ${OGRE_Terrain_INCLUDE_DIR}
${OIS_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}
${PLATFORM_INCLUDE_DIR}
${MYGUI_INCLUDE_DIRS}
@@ -203,6 +202,7 @@ if(APPLE)
"Plugin_ParticleFX")
endif(APPLE)
+add_subdirectory( files/)
add_subdirectory( files/mygui )
# Specify build paths
@@ -258,7 +258,16 @@ endif (APPLE)
# Compiler settings
if (CMAKE_COMPILER_IS_GNUCC)
- add_definitions (-Wall -Wextra -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-reorder)
+ add_definitions (-Wall -Wextra -Wno-unused-parameter -Wno-reorder)
+
+ # Silence warnings in OGRE headers. Remove once OGRE got fixed!
+ add_definitions (-Wno-ignored-qualifiers)
+
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
+ if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
+ add_definitions (-Wno-unused-but-set-parameter)
+ endif("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
endif (CMAKE_COMPILER_IS_GNUCC)
if(DPKG_PROGRAM)
@@ -297,7 +306,7 @@ if(DPKG_PROGRAM)
Data files from the original game is required to run it.")
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
- SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW esmtool;Esmtool omwlauncher;OMWLauncher")
+ SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW esmtool;Esmtool omwlauncher;OMWLauncher mwiniimporter;MWiniImporter")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "nvidia-cg-toolkit (>= 2.1), libboost-filesystem1.46.1 (>= 1.46.1), libboost-program-options1.46.1 (>= 1.46.1), libboost-system1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
@@ -318,6 +327,7 @@ if(WIN32)
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
INSTALL(FILES ${files} DESTINATION ".")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
+ INSTALL(FILES "${OpenMW_SOURCE_DIR}/readme.txt" DESTINATION ".")
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS")
@@ -328,6 +338,7 @@ if(WIN32)
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINO})
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW;esmtool;Esmtool;omwlauncher;OpenMW Launcher")
+ set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/readme.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenMW_SOURCE_DIR}/GPL3.txt")
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
@@ -381,6 +392,11 @@ if (BUILD_LAUNCHER)
add_subdirectory( apps/launcher )
endif()
+option(BUILD_MWINIIMPORTER "build MWiniImporter inspector" ON)
+if (BUILD_MWINIIMPORTER)
+ add_subdirectory( apps/mwiniimporter )
+endif()
+
if (WIN32)
if (MSVC)
if (USE_DEBUG_CONSOLE)
@@ -470,6 +486,7 @@ if (APPLE)
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
+ install(FILES "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt
index fd736e011..ccefee1ee 100644
--- a/apps/launcher/CMakeLists.txt
+++ b/apps/launcher/CMakeLists.txt
@@ -95,5 +95,5 @@ else()
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launcher.qss")
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.cfg
- "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}launcher.cfg")
+ "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launcher.cfg")
endif()
diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp
index c96fc2c7b..c15274e74 100644
--- a/apps/launcher/datafilespage.cpp
+++ b/apps/launcher/datafilespage.cpp
@@ -225,7 +225,7 @@ void DataFilesPage::setupDataFiles()
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(tr("
Could not find the Data Files location
\
- The directory containing the Data Files was not found.
\
+ The directory containing the data files was not found.
\
Press \"Browse...\" to specify the location manually.
"));
QAbstractButton *dirSelectButton =
@@ -1057,16 +1057,8 @@ void DataFilesPage::writeConfig(QString profile)
return;
}
- // Prepare the OpenMW config
- QString config = QString::fromStdString((mCfgMgr.getLocalPath() / "openmw.cfg").string());
- QFile file(config);
-
- if (!file.exists()) {
- config = QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string());
- }
-
- // Open the config as a QFile
- file.setFileName(config);
+ // Open the OpenMW config as a QFile
+ QFile file(QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string()));
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
// File cannot be opened or created
diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp
index ef9cfa851..8bb618dd6 100644
--- a/apps/launcher/maindialog.cpp
+++ b/apps/launcher/maindialog.cpp
@@ -194,6 +194,7 @@ void MainDialog::play()
QDir dir(QCoreApplication::applicationDirPath());
QString game = dir.absoluteFilePath("openmw");
QFile file(game);
+ game = "\"" + game + "\"";
#else
QString game = "./openmw";
QFile file(game);
diff --git a/apps/mwiniimporter/CMakeLists.txt b/apps/mwiniimporter/CMakeLists.txt
new file mode 100644
index 000000000..2a8c0f5fe
--- /dev/null
+++ b/apps/mwiniimporter/CMakeLists.txt
@@ -0,0 +1,20 @@
+set(MWINIIMPORT
+ main.cpp
+ importer.cpp
+)
+
+set(MWINIIMPORT_HEADER
+ importer.hpp
+)
+
+source_group(launcher FILES ${MWINIIMPORT} ${MWINIIMPORT_HEADER})
+
+add_executable(mwiniimport
+ ${MWINIIMPORT}
+)
+
+target_link_libraries(mwiniimport
+ ${Boost_LIBRARIES}
+ components
+)
+
diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp
new file mode 100644
index 000000000..08b05f417
--- /dev/null
+++ b/apps/mwiniimporter/importer.cpp
@@ -0,0 +1,184 @@
+#include "importer.hpp"
+#include
+#include
+#include
+#include
+#include