From 8c6ca06eabd27ed47efa5d4388ff30ab00b62d1c Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Mon, 3 Jun 2013 19:07:24 +0100 Subject: [PATCH] Documented build procedure, tidied it up. I was building with mingw and mingw-w64 before, now only mingw-w64 is needed. --- CMakeLists.txt | 11 +- README.md | 100 +++++++++++++----- ...2-toolchain.cmake => mingw-toolchain.cmake | 2 +- 3 files changed, 79 insertions(+), 34 deletions(-) rename mingw32-toolchain.cmake => mingw-toolchain.cmake (91%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0b9f010..e9103cc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ project (boss) set (BOSS_SRC "${CMAKE_SOURCE_DIR}/src/metadata.cpp" "${CMAKE_SOURCE_DIR}/src/game.cpp" "${CMAKE_SOURCE_DIR}/src/helpers.cpp" "${PROJECT_LIBS_DIR}/pugixml/src/pugixml.cpp") # Include source and library directories. -include_directories ("${PROJECT_LIBS_DIR}/alphanum" "${PROJECT_LIBS_DIR}/boost" "${PROJECT_LIBS_DIR}/yaml-cpp/include" "${CMAKE_SOURCE_DIR}/src" "${PROJECT_LIBS_DIR}/libloadorder/src" "${PROJECT_LIBS_DIR}/libespm" "${PROJECT_LIBS_DIR}/zlib" "${PROJECT_LIBS_DIR}/pugixml/src") +include_directories ("${PROJECT_LIBS_DIR}/alphanum" "${PROJECT_LIBS_DIR}/boost" "${PROJECT_LIBS_DIR}/yaml-cpp/include" "${CMAKE_SOURCE_DIR}/src" "${PROJECT_LIBS_DIR}/libloadorder/src" "${PROJECT_LIBS_DIR}/libespm" "${PROJECT_LIBS_DIR}/zlib" "${PROJECT_LIBS_DIR}/pugixml/src" "${PROJECT_LIBS_DIR}/wxWidgets/include") ############################## @@ -41,7 +41,8 @@ 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") +link_directories ("${PROJECT_LIBS_DIR}/wxWidgets/lib") # Settings when compiling and cross-compiling on Linux. IF (CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") @@ -52,9 +53,9 @@ IF (CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") set (CMAKE_MODULE_LINKER_FLAGS "-static-libstdc++ -static-libgcc") IF (CMAKE_SYSTEM_NAME MATCHES "Windows") - link_directories ("${PROJECT_LIBS_DIR}/boost/stage-mingw-${PROJECT_ARCH}/lib" "${PROJECT_LIBS_DIR}/wxWidgets/build-msw/lib") - include_directories ("${PROJECT_LIBS_DIR}/wxWidgets/build-msw/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9" "${PROJECT_LIBS_DIR}/wxWidgets/include") - set (BOSS_LIBS version wx_mswu_webview-2.9-i586-mingw32msvc wx_mswu_core-2.9-i586-mingw32msvc wx_baseu-2.9-i586-mingw32msvc wx_mswu_adv-2.9-i586-mingw32msvc wxpng-2.9-i586-mingw32msvc wxzlib-2.9-i586-mingw32msvc comctl32) + link_directories ("${PROJECT_LIBS_DIR}/boost/stage-mingw-${PROJECT_ARCH}/lib") + include_directories ("${PROJECT_LIBS_DIR}/wxWidgets/lib/wx/include/i686-w64-mingw32-msw-unicode-static-2.9") + set (BOSS_LIBS ${BOSS_LIBS} version wx_mswu_webview-2.9-i686-w64-mingw32 wx_mswu_core-2.9-i686-w64-mingw32 wx_baseu-2.9-i686-w64-mingw32 wx_mswu_adv-2.9-i686-w64-mingw32 wxpng-2.9-i686-w64-mingw32 wxzlib-2.9-i686-w64-mingw32 comctl32) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows") ENDIF () diff --git a/README.md b/README.md index d4758a0d..9e400145 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,78 @@ The other obvious solution is to cut down on the number of mods that need to be While that's being done, I might as well also make some improvements to other areas of BOSS. -## Install Structure +## Build Instructions + +BOSS uses [CMake](http://cmake.org) v2.8.9 or later for cross-platform building support, though it is developed on Linux and cross-compiled using Mingw, so its CMakeLists.txt might not produce correct results on Windows. + +BOSS requires the following libraries: + +* [Alphanum](http://www.davekoelle.com/files/alphanum.hpp) +* [Boost](http://www.boost.org) v1.53.0 or later. +* [Libespm](http://github.com/WrinklyNinja/libespm) +* [Libloadorder](http://github.com/WrinklyNinja/libloadorder) +* [PugiXML](http://code.google.com/p/pugixml/) v1.2 or later. +* [wxWidgets](http://www.wxwidgets.org) v2.9.4 or later. +* [yaml-cpp](http://code.google.com/p/yaml-cpp/) v0.5.1 or later. +* [zlib](http://zlib.net) v1.2.7 or later. + +BOSS expects all libraries' folders to be present alongside the BOSS repository folder that contains this readme, or otherwise installed such that the compiler and linker used can find them without suppling additional paths. + +### Building Boost (Linux) + +Starting from the Boost root folder, run the following: + +``` +./bootstrap.sh +echo "using gcc : 4.6.3 : i686-w64-mingw32-g++ : i686-w64-mingw32-windres i686-w64-mingw32-ar i686-w64-mingw32-ranlib ;" > tools/build/v2/user-config.jam +./b2 toolset=gcc-4.6.3 target-os=windows link=static runtime-link=static variant=release address-model=32 cxxflags=-fPIC --with-filesystem --with-locale --with-regex --with-program_options --with-system --stagedir=stage-mingw-32 +``` + +### Building wxWidgets (Linux) + +Starting from the wxWidgets root folder, run the following: + +``` +./configure --prefix=/usr/local/i686-w64-mingw32 --host=i686-w64-mingw32 --build=x64_86-linux --disable-shared +``` + +### Building zlib (Linux) + +Starting from the zlib root folder, run the following: + +``` +cmake . -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake +make +``` + +### Building yaml-cpp (Linux) + +Starting from the yaml-cpp root folder, run the following: + +``` +cmake .. -DCMAKE_C_FLAGS=-m32 -DPROJECT_ARCH=32 -DCMAKE_TOOLCHAIN_FILE=../BOSSv3/mingw-toolchain.cmake -DBOOST_ROOT=../boost +``` + +### Building BOSS (Linux) + +Starting from the BOSS root folder, run the following: + +``` +cd build +cmake .. -DPROJECT_LIBS_DIR=.. -DPROJECT_ARCH=32 -DPROJECT_LINK=STATIC -DCMAKE_TOOLCHAIN_FILE=mingw-toolchain.cmake +make +``` + +## Misc Notes + +Here is the full list of BOSS members at the end of 2012. Any of these who lose +their membership status should still be credited in the BOSS readme: + +Random007, Arthmoor, WrinklyNinja, PacificMorrowind, aellis, Vacuity, Gabba, +ZiggyX200, RiddlingLynx, AliTheLord, Tokc.D.K., Valda, Space Oden69, Televator, +Leandro Conde, Psymon, Loucifer, Torrello, Malonn, Skyline, Sharlikran, Red Eye, +iyumichan, Peste, Calen Ellefson, SilentSpike, Arkangel, zyp, v111, Chevenga, +rowynyew LOOT will be a self-contained installation that can be dropped anywhere. It will have an installer option that also installs some Start menu shortcuts and a Registry entry, but these will not be required for LOOT to function. @@ -41,30 +112,3 @@ Directory structure will be: report.html ...other game folders with same structure as Oblivion... ``` - - -## Required Libraries - -BOSS uses the following libraries: - -* Alphanum -* Boost -* Libespm -* Libloadorder -* PugiXML -* wxWidgets -* yaml-cpp - -Also uses [polyfill.js](https://github.com/inexorabletash/polyfill/blob/master/polyfill.js), [storage.js](https://github.com/inexorabletash/polyfill/blob/master/storage.js) and [DOM-shim](https://github.com/Raynos/DOM-shim/) for Internet Explorer 8 compatibility. - - -## Misc - -Here is the full list of BOSS members at the end of 2012. Any of these who lose -their membership status should still be credited in the BOSS readme: - -Random007, Arthmoor, WrinklyNinja, PacificMorrowind, aellis, Vacuity, Gabba, -ZiggyX200, RiddlingLynx, AliTheLord, Tokc.D.K., Valda, Space Oden69, Televator, -Leandro Conde, Psymon, Loucifer, Torrello, Malonn, Skyline, Sharlikran, Red Eye, -iyumichan, Peste, Calen Ellefson, SilentSpike, Arkangel, zyp, v111, Chevenga, -rowynyew diff --git a/mingw32-toolchain.cmake b/mingw-toolchain.cmake similarity index 91% rename from mingw32-toolchain.cmake rename to mingw-toolchain.cmake index f458f27c..53d35bf3 100644 --- a/mingw32-toolchain.cmake +++ b/mingw-toolchain.cmake @@ -4,7 +4,7 @@ set (CMAKE_SYSTEM_NAME Windows) IF (PROJECT_ARCH MATCHES "32") - set (MINGW i586-mingw32msvc) + set (MINGW i686-w64-mingw32) ELSE () set (MINGW x86_64-w64-mingw32) ENDIF ()