Fixed compile errors.

This commit is contained in:
WrinklyNinja
2013-07-22 20:44:47 +01:00
parent d8e16669be
commit 18802523bc
7 changed files with 20 additions and 9 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ ENDIF ()
link_directories ("${PROJECT_LIBS_DIR}/yaml-cpp/build")
link_directories ("${PROJECT_LIBS_DIR}/libloadorder/build")
link_directories ("${PROJECT_LIBS_DIR}/zlib")
link_directories ("${PROJECT_LIBS_DIR}/zlib/build")
link_directories ("${PROJECT_LIBS_DIR}/wxWidgets/lib")
# Settings when compiling and cross-compiling on Linux.
@@ -61,7 +61,7 @@ IF (CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows")
ENDIF ()
set (BOSS_LIBS ${BOSS_LIBS} zlibstatic loadorder yaml-cpp boost_log_setup boost_log boost_locale boost_thread_win32 boost_chrono boost_date_time boost_filesystem boost_system boost_regex)
set (BOSS_LIBS ${BOSS_LIBS} zlibstatic loadorder${PROJECT_ARCH} yaml-cpp boost_log_setup boost_log boost_locale boost_thread_win32 boost_chrono boost_date_time boost_filesystem boost_system boost_regex)
ENDIF ()
# Settings when compiling on Windows.
+5 -2
View File
@@ -84,14 +84,17 @@ echo "using gcc : 4.6.3 : i686-w64-mingw32-g++ : <rc>i686-w64-mingw32-windres <a
### zlib
```
cmake . -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake
mkdir build
cd build
cmake .. -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake
make
cp zconf.h ../zconf.h
```
### yaml-cpp
```
cmake .. -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake -DBOOST_ROOT=../boost
cmake . -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake -DBOOST_ROOT=../boost
```
### Libloadorder
+2 -1
View File
@@ -591,7 +591,8 @@ BOSS_API unsigned int boss_write_minimal_list (boss_db db, const char * const ou
<< YAML::Key << "plugins" << YAML::Value << temp
<< YAML::EndMap;
boss::ofstream out(boost::filesystem::path(outputFile));
boost::filesystem::path p(outputFile);
boss::ofstream out(p);
if (out.fail())
return boss_error_invalid_args;
out << yout.c_str();
+3 -2
View File
@@ -509,8 +509,9 @@ namespace boss {
YAML::Emitter yout;
yout.SetIndent(2);
yout << root;
boss::ofstream out(boost::filesystem::path(file));
boost::filesystem::path p(file);
boss::ofstream out(p);
out << yout.c_str();
out.close();
}
+1 -1
View File
@@ -257,7 +257,7 @@ namespace boss {
// Get data from file contents using libespm. Assumes libespm has already been initialised.
boost::filesystem::path filepath = game.DataPath() / n;
espm::File file(filepath.string(), game.espm_settings, false, headerOnly);
espm::File file(filepath, game.espm_settings, false, headerOnly);
isMaster = file.isMaster(game.espm_settings);
masters = file.getMasters();
+4
View File
@@ -20,6 +20,8 @@
along with BOSS. If not, see
<http://www.gnu.org/licenses/>.
*/
#ifndef __BOSS_STREAMS__
#define __BOSS_STREAMS__
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
@@ -29,3 +31,5 @@ namespace boss {
typedef boost::iostreams::stream< boost::iostreams::file_descriptor_source > ifstream;
typedef boost::iostreams::stream< boost::iostreams::file_descriptor > fstream;
}
#endif
+3 -1
View File
@@ -27,6 +27,7 @@
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
using namespace std;
@@ -650,7 +651,8 @@ void Editor::OnQuit(wxCommandEvent& event) {
<< YAML::Key << "plugins" << YAML::Value << _editedPlugins
<< YAML::EndMap;
boss::ofstream out(fs::path(_userlistPath));
boost::filesystem::path p(_userlistPath);
boss::ofstream out(p);
out << yout.c_str();
out.close();
}