diff --git a/Bitstream Vera License.txt b/Bitstream Vera License.txt
new file mode 100644
index 000000000..2b37cc1df
--- /dev/null
+++ b/Bitstream Vera License.txt
@@ -0,0 +1,123 @@
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+Copyright FAQ
+=============
+
+ 1. I don't understand the resale restriction... What gives?
+
+ Bitstream is giving away these fonts, but wishes to ensure its
+ competitors can't just drop the fonts as is into a font sale system
+ and sell them as is. It seems fair that if Bitstream can't make money
+ from the Bitstream Vera fonts, their competitors should not be able to
+ do so either. You can sell the fonts as part of any software package,
+ however.
+
+ 2. I want to package these fonts separately for distribution and
+ sale as part of a larger software package or system. Can I do so?
+
+ Yes. A RPM or Debian package is a "larger software package" to begin
+ with, and you aren't selling them independently by themselves.
+ See 1. above.
+
+ 3. Are derivative works allowed?
+ Yes!
+
+ 4. Can I change or add to the font(s)?
+ Yes, but you must change the name(s) of the font(s).
+
+ 5. Under what terms are derivative works allowed?
+
+ You must change the name(s) of the fonts. This is to ensure the
+ quality of the fonts, both to protect Bitstream and Gnome. We want to
+ ensure that if an application has opened a font specifically of these
+ names, it gets what it expects (though of course, using fontconfig,
+ substitutions could still could have occurred during font
+ opening). You must include the Bitstream copyright. Additional
+ copyrights can be added, as per copyright law. Happy Font Hacking!
+
+ 6. If I have improvements for Bitstream Vera, is it possible they might get
+ adopted in future versions?
+
+ Yes. The contract between the Gnome Foundation and Bitstream has
+ provisions for working with Bitstream to ensure quality additions to
+ the Bitstream Vera font family. Please contact us if you have such
+ additions. Note, that in general, we will want such additions for the
+ entire family, not just a single font, and that you'll have to keep
+ both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
+ glyphs to the font, they must be stylistically in keeping with Vera's
+ design. Vera cannot become a "ransom note" font. Jim Lyles will be
+ providing a document describing the design elements used in Vera, as a
+ guide and aid for people interested in contributing to Vera.
+
+ 7. I want to sell a software package that uses these fonts: Can I do so?
+
+ Sure. Bundle the fonts with your software and sell your software
+ with the fonts. That is the intent of the copyright.
+
+ 8. If applications have built the names "Bitstream Vera" into them,
+ can I override this somehow to use fonts of my choosing?
+
+ This depends on exact details of the software. Most open source
+ systems and software (e.g., Gnome, KDE, etc.) are now converting to
+ use fontconfig (see www.fontconfig.org) to handle font configuration,
+ selection and substitution; it has provisions for overriding font
+ names and subsituting alternatives. An example is provided by the
+ supplied local.conf file, which chooses the family Bitstream Vera for
+ "sans", "serif" and "monospace". Other software (e.g., the XFree86
+ core server) has other mechanisms for font substitution.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ba9a5f0b..c565cf930 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
@@ -27,11 +24,12 @@ set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VE
configure_file ("${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp")
+option(MYGUI_STATIC "Link static build of Mygui into the binaries" FALSE)
option(OGRE_STATIC "Link static build of Ogre and Ogre Plugins into the binaries" FALSE)
# Sound source selection
-option(USE_AUDIERE "use Audiere for sound" OFF)
option(USE_FFMPEG "use ffmpeg for sound" OFF)
+option(USE_AUDIERE "use audiere for sound" OFF)
option(USE_MPG123 "use mpg123 + libsndfile for sound" ON)
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
@@ -124,54 +122,41 @@ set(OENGINE_BULLET
${LIBDIR}/openengine/bullet/trace.cpp
)
-# Sound setup
-if (USE_AUDIERE)
- set(MANGLE_SOUND_OUTPUT
- ${LIBDIR}/mangle/sound/sources/audiere_source.cpp
- ${LIBDIR}/mangle/sound/sources/sample_reader.cpp
- ${LIBDIR}/mangle/stream/clients/audiere_file.cpp)
- find_package(Audiere REQUIRED)
- set(SOUND_INPUT_INCLUDES ${AUDIERE_INCLUDE_DIR})
- set(SOUND_INPUT_LIBRARY ${AUDIERE_LIBRARY})
- set(SOUND_DEFINE -DOPENMW_USE_AUDIERE)
-endif (USE_AUDIERE)
+set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_BULLET})
+source_group(libs\\openengine FILES ${OENGINE_ALL})
+
+set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL})
+set(OPENMW_LIBS_HEADER)
+# Sound setup
+set(SOUND_INPUT_INCLUDES "")
+set(SOUND_INPUT_LIBRARY "")
+set(SOUND_DEFINE "")
if (USE_FFMPEG)
- set(MANGLE_SOUND_OUTPUT
- ${LIBDIR}/mangle/sound/sources/ffmpeg_source.cpp)
find_package(FFMPEG REQUIRED)
- set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIR})
- set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES})
- set(SOUND_DEFINE -DOPENMW_USE_FFMPEG)
+ set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${FFMPEG_INCLUDE_DIR})
+ set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${FFMPEG_LIBRARIES})
+ set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_FFMPEG)
endif (USE_FFMPEG)
+if (USE_AUDIERE)
+ find_package(Audiere REQUIRED)
+ set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${AUDIERE_INCLUDE_DIR})
+ set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${AUDIERE_LIBRARY})
+ set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_AUDIERE)
+endif (USE_AUDIERE)
+
if (USE_MPG123)
- set(MANGLE_SOUND_OUTPUT
- ${LIBDIR}/mangle/sound/sources/mpg123_source.cpp
- ${LIBDIR}/mangle/sound/sources/libsndfile.cpp
- ${LIBDIR}/mangle/sound/sources/sample_reader.cpp)
find_package(MPG123 REQUIRED)
find_package(SNDFILE REQUIRED)
- set(SOUND_INPUT_INCLUDES ${MPG123_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})
- set(SOUND_INPUT_LIBRARY ${MPG123_LIBRARY} ${SNDFILE_LIBRARY})
- set(SOUND_DEFINE -DOPENMW_USE_MPG123)
+ set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${MPG123_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})
+ set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${MPG123_LIBRARY} ${SNDFILE_LIBRARY})
+ set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_MPG123)
endif (USE_MPG123)
-set(OENGINE_SOUND
- # Mangle and OEngine sound files are sort of intertwined, so put
- # them together here
- ${LIBDIR}/openengine/sound/sndmanager.cpp
- ${LIBDIR}/mangle/sound/outputs/openal_out.cpp
- ${MANGLE_SOUND_OUTPUT}
-)
-set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_SOUND} ${OENGINE_BULLET})
-source_group(libs\\openengine FILES ${OENGINE_ALL})
-
-set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL})
-set(OPENMW_LIBS_HEADER)
-
# Platform specific
if (WIN32)
+ set(Boost_USE_STATIC_LIBS ON)
set(PLATFORM_INCLUDE_DIR "platform")
add_definitions(-DBOOST_ALL_NO_LIB)
else (WIN32)
@@ -181,7 +166,6 @@ include_directories(${UUID_INCLUDE_DIR})
endif (WIN32)
if (MSVC10)
set(PLATFORM_INCLUDE_DIR "")
- add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
endif()
if (APPLE)
@@ -190,7 +174,13 @@ endif (APPLE)
# Dependencies
+# Fix for not visible pthreads functions for linker with glibc 2.15
+if (UNIX AND NOT APPLE)
+find_package (Threads)
+endif()
+
find_package(OGRE REQUIRED)
+find_package(MyGUI REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem program_options thread)
find_package(OIS REQUIRED)
find_package(OpenAL REQUIRED)
@@ -205,16 +195,17 @@ 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}
- ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/MyGUIEngine/include
- ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/OgrePlatform/include
+ ${MYGUI_INCLUDE_DIRS}
+ ${MYGUI_PLATFORM_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIR}
${UUID_INCLUDE_DIR}
${LIBDIR}
)
-link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR})
+link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR} ${MYGUI_LIB_DIR})
if(APPLE)
# List used Ogre plugins
@@ -224,14 +215,8 @@ if(APPLE)
"Plugin_ParticleFX")
endif(APPLE)
-add_subdirectory( extern/mygui_3.0.1 )
-
-# Make sure that certain libraries are used as static libraries
-# This is in effect turns off __declspec (dllexport) for windows
-# Each library will also need to be configured to build as a static lib
-
-# MyGUI: extern/mygui_3.0.0/
-add_definitions(-DMYGUI_STATIC)
+add_subdirectory( files/)
+add_subdirectory( files/mygui )
# Specify build paths
@@ -243,6 +228,9 @@ endif (APPLE)
# Other files
+configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg
+ "${OpenMW_BINARY_DIR}/settings-default.cfg")
+
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
"${OpenMW_BINARY_DIR}/openmw.cfg")
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
@@ -269,8 +257,14 @@ if (APPLE)
"${APP_BUNDLE_DIR}/Contents/Resources/OpenMW.icns" COPYONLY)
# prepare plugins
- if (${CMAKE_BUILD_TYPE} MATCHES "Release" OR
- ${CMAKE_BUILD_TYPE} MATCHES "RelWithDebugInfo")
+ if (${CMAKE_BUILD_TYPE} MATCHES "Release")
+ set(OPENMW_RELEASE_BUILD 1)
+ endif()
+ if (${CMAKE_BUILD_TYPE} MATCHES "RelWithDebugInfo")
+ set(OPENMW_RELEASE_BUILD 1)
+ endif()
+
+ if (${OPENMW_RELEASE_BUILD})
set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_REL})
else()
set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_DBG})
@@ -286,7 +280,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)
@@ -308,6 +311,7 @@ if(DPKG_PROGRAM)
INSTALL(FILES "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.png" DESTINATION "share/pixmaps/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
#Install global configuration files
+ INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "../etc/openmw/" RENAME "openmw.cfg" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
@@ -325,8 +329,8 @@ 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_DEBIAN_PACKAGE_DEPENDS "libogre-1.7.3 (>= 1.7.3), libbullet0 (>= 2.77), 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_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")
@@ -346,6 +350,10 @@ 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"
+ "${OpenMW_BINARY_DIR}/settings-default.cfg"
+ DESTINATION ".")
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS")
@@ -355,7 +363,12 @@ if(WIN32)
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
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_PACKAGE_EXECUTABLES "openmw;OpenMW;omwlauncher;OpenMW Launcher")
+ SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
+ SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+ Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Readme.lnk\\\"
+ ")
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 ".")
@@ -409,6 +422,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)
@@ -498,6 +516,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/OFL.txt b/OFL.txt
new file mode 100644
index 000000000..043e85e83
--- /dev/null
+++ b/OFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2010, 2011 Georg Duffner (http://www.georgduffner.at)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
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 054cbf141..c15274e74 100644
--- a/apps/launcher/datafilespage.cpp
+++ b/apps/launcher/datafilespage.cpp
@@ -222,10 +222,10 @@ void DataFilesPage::setupDataFiles()
QMessageBox msgBox;
msgBox.setWindowTitle("Error detecting Morrowind installation");
- msgBox.setIcon(QMessageBox::Critical);
+ 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 =
@@ -279,72 +279,79 @@ void DataFilesPage::setupDataFiles()
const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) {
- ESMReader fileReader;
- QStringList availableMasters; // Will contain all found masters
- fileReader.setEncoding(variables["encoding"].as());
- fileReader.open(iter->second.string());
+ try {
+ ESMReader fileReader;
+ QStringList availableMasters; // Will contain all found masters
+
+ fileReader.setEncoding(variables["encoding"].as());
+ fileReader.open(iter->second.string());
- // First we fill the availableMasters and the mMastersWidget
- ESMReader::MasterList mlist = fileReader.getMasters();
+ // First we fill the availableMasters and the mMastersWidget
+ ESMReader::MasterList mlist = fileReader.getMasters();
- for (unsigned int i = 0; i < mlist.size(); ++i) {
- const QString currentMaster = QString::fromStdString(mlist[i].name);
- availableMasters.append(currentMaster);
+ for (unsigned int i = 0; i < mlist.size(); ++i) {
+ const QString currentMaster = QString::fromStdString(mlist[i].name);
+ availableMasters.append(currentMaster);
- const QList itemList = mMastersWidget->findItems(currentMaster, Qt::MatchExactly);
+ const QList itemList = mMastersWidget->findItems(currentMaster, Qt::MatchExactly);
- if (itemList.isEmpty()) { // Master is not yet in the widget
- mMastersWidget->insertRow(i);
+ if (itemList.isEmpty()) { // Master is not yet in the widget
+ mMastersWidget->insertRow(i);
- QTableWidgetItem *item = new QTableWidgetItem(currentMaster);
- item->setForeground(Qt::red);
- item->setFlags(item->flags() & ~(Qt::ItemIsSelectable));
+ QTableWidgetItem *item = new QTableWidgetItem(currentMaster);
+ item->setForeground(Qt::red);
+ item->setFlags(item->flags() & ~(Qt::ItemIsSelectable));
- mMastersWidget->setItem(i, 0, item);
+ mMastersWidget->setItem(i, 0, item);
+ }
}
- }
- availableMasters.sort(); // Sort the masters alphabetically
+ availableMasters.sort(); // Sort the masters alphabetically
- // Now we put the current plugin in the mDataFilesModel under its masters
- QStandardItem *parent = new QStandardItem(availableMasters.join(","));
+ // Now we put the current plugin in the mDataFilesModel under its masters
+ QStandardItem *parent = new QStandardItem(availableMasters.join(","));
- QString fileName = QString::fromStdString(boost::filesystem::path (iter->second.filename()).string());
- QStandardItem *child = new QStandardItem(fileName);
+ QString fileName = QString::fromStdString(boost::filesystem::path (iter->second.filename()).string());
+ QStandardItem *child = new QStandardItem(fileName);
- // Tooltip information
- QString author = QString::fromStdString(fileReader.getAuthor());
- float version = fileReader.getFVer();
- QString description = QString::fromStdString(fileReader.getDesc());
+ // Tooltip information
+ QString author = QString::fromStdString(fileReader.getAuthor());
+ float version = fileReader.getFVer();
+ QString description = QString::fromStdString(fileReader.getDesc());
- // For the date created/modified
- QFileInfo fi(QString::fromStdString(iter->second.string()));
+ // For the date created/modified
+ QFileInfo fi(QString::fromStdString(iter->second.string()));
- QString toolTip= QString("Author: %1
\
- Version: %2
\
- Description:
\
- %3
\
- Created on: %4
\
- Last modified: %5")
- .arg(author)
- .arg(version)
- .arg(description)
- .arg(fi.created().toString(Qt::TextDate))
- .arg(fi.lastModified().toString(Qt::TextDate));
+ QString toolTip= QString("Author: %1
\
+ Version: %2
\
+ Description:
\
+ %3
\
+ Created on: %4
\
+ Last modified: %5")
+ .arg(author)
+ .arg(version)
+ .arg(description)
+ .arg(fi.created().toString(Qt::TextDate))
+ .arg(fi.lastModified().toString(Qt::TextDate));
- child->setToolTip(toolTip);
+ child->setToolTip(toolTip);
- const QList masterList = mDataFilesModel->findItems(availableMasters.join(","));
+ const QList masterList = mDataFilesModel->findItems(availableMasters.join(","));
- if (masterList.isEmpty()) { // Masters node not yet in the mDataFilesModel
- parent->appendRow(child);
- mDataFilesModel->appendRow(parent);
- } else {
- // Masters node exists, append current plugin
- foreach (QStandardItem *currentItem, masterList) {
- currentItem->appendRow(child);
+ if (masterList.isEmpty()) { // Masters node not yet in the mDataFilesModel
+ parent->appendRow(child);
+ mDataFilesModel->appendRow(parent);
+ } else {
+ // Masters node exists, append current plugin
+ foreach (QStandardItem *currentItem, masterList) {
+ currentItem->appendRow(child);
+ }
}
+
+ } catch(std::runtime_error &e) {
+ // An error occurred while reading the .esp
+ continue;
}
}
@@ -1050,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 49c0bd960..8bb618dd6 100644
--- a/apps/launcher/maindialog.cpp
+++ b/apps/launcher/maindialog.cpp
@@ -45,9 +45,28 @@ MainDialog::MainDialog()
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
setMinimumSize(QSize(575, 575));
+ // Install the stylesheet font
+ QFile file;
+ QFontDatabase fontDatabase;
+
+ const QStringList fonts = fontDatabase.families();
+
+ // Check if the font is installed
+ if (!fonts.contains("EB Garamond")) {
+
+ QString font = QString::fromStdString((mCfgMgr.getGlobalDataPath() / "resources/mygui/EBGaramond-Regular.ttf").string());
+ file.setFileName(font);
+
+ if (!file.exists()) {
+ font = QString::fromStdString((mCfgMgr.getLocalPath() / "resources/mygui/EBGaramond-Regular.ttf").string());
+ }
+
+ fontDatabase.addApplicationFont(font);
+ }
+
// Load the stylesheet
QString config = QString::fromStdString((mCfgMgr.getGlobalDataPath() / "resources/launcher.qss").string());
- QFile file(config);
+ file.setFileName(config);
if (!file.exists()) {
file.setFileName(QString::fromStdString((mCfgMgr.getLocalPath() / "launcher.qss").string()));
@@ -175,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/launcher/resources/images/openmw-header.png b/apps/launcher/resources/images/openmw-header.png
index a168d4d2a..a2ffab68b 100644
Binary files a/apps/launcher/resources/images/openmw-header.png and b/apps/launcher/resources/images/openmw-header.png differ
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..5503a7c1a
--- /dev/null
+++ b/apps/mwiniimporter/importer.cpp
@@ -0,0 +1,216 @@
+#include "importer.hpp"
+#include
+#include
+#include
+#include
+#include