Documented build procedure, tidied it up.

I was building with mingw and mingw-w64 before, now only mingw-w64 is
needed.
This commit is contained in:
WrinklyNinja
2013-06-03 19:07:24 +01:00
parent 310d917d23
commit 8c6ca06eab
3 changed files with 79 additions and 34 deletions
+6 -5
View File
@@ -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 ()
+72 -28
View File
@@ -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++ : <rc>i686-w64-mingw32-windres <archiver>i686-w64-mingw32-ar <ranlib>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
@@ -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 ()