Fix building LOOT as a native Linux application.

Not all Windows-specific code has equivalent Linux code, file path to
URL conversion is hacky, and only that LOOT launches correctly with no
game detected has been tested.
This commit is contained in:
Oliver Hamlet
2015-10-29 18:20:14 +00:00
parent f837e3a235
commit d874fbb52c
14 changed files with 377 additions and 148 deletions
+50
View File
@@ -0,0 +1,50 @@
# Build Instructions using GCC
Linux binaries can be built for LOOT, and these instructions are for doing so on
Ubuntu Desktop 14.04, though they may also apply to other versions and
distributions.
Most of the procedure for building the API, tests and metadata validator can be
found in the `.travis.yml` file, which is the configuration file for LOOT's
Travis CI instance. However, Travis instances have a few more libraries and
utilities by default than Ubuntu Desktop 14.04 does, and the procedure does not
cover building the GUI application, so these differences will be covered here.
Linux builds of the GUI application should be considered officially
**unsupported and unmaintained**, though contributions are welcome.
## Installing Missing Dependencies
To install Node.js (for building the HTML UI) and the libcurl and X11
development libraries (for libgit2 and the UI respectively), run the following:
```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
sudo apt-add-repository 'deb https://deb.nodesource.com/node_4.x precise main'
sudo apt-get update
sudo apt-get install nodejs npm libcurl4-openssl-dev libx11-dev
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g bower vulcanize@0.7.11
```
If you wish to build the GUI application, you must also manually download the
Chromium Embedded Framework binary archive, then extract it and run
```
mkdir build && cd build
cmake ..
make
```
from the extracted folder.
## Runtime Differences
Not all LOOT's features have been implemented for Linux builds. Issues labelled
`linux` on LOOT's issue tracker cover such missing features where they can be
implemented. Unavoidable platform differences are documented here:
* On Windows, LOOT can detect game installs using their Registry entries. On
Linux this is obviously not possible, so either game paths will have to be
entered manually in LOOT's settings dialog when it is run, or LOOT will need
to be installed beside a game's Data folder for that game to be detected.
-15
View File
@@ -69,21 +69,6 @@ Example CMake keys: `-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=build -DCMAKE_ARCHIVE_OUTP
LOOT uses a third-party CMake module to generate its build revision data, so first download the `GetGitRevisionDescription.cmake` and `GetGitRevisionDescription.cmake.in` files found in [this repository](https://github.com/rpavlik/cmake-modules) to the `build` subdirectory of the LOOT folder.
LOOT uses the following CMake variables to set build parameters:
Parameter | Values | Default |Description
----------|--------|---------|-----------
`BUILD_SHARED_LIBS` | `ON`, `OFF` | `OFF` | Whether or not to build a shared libloot.
`PROJECT_STATIC_RUNTIME` | `ON`, `OFF` | `ON` | Whether to link the C++ runtime statically or not. This also affects the Boost libraries used.
`PROJECT_ARCH` | `32`, `64` | `32` | Whether to build 32 or 64 bit LOOT binaries.
`CEF_ROOT` | path | `../../cef` | Path to the root of the Chromium Embedded Framework folder.
`LIBESPM_ROOT` | path | `../../libespm` | Path to the root of the libespm repository folder.
`LIBGIT2_ROOT` | path | `../../libgit2` | Path to the root of the libgit2 repository folder.
`LIBLOADORDER_ROOT` | path | `../../libloadorder` | Path to the root of the libloadorder repository folder.
`PSEUDOSEM_ROOT` | Path | `../../pseudosem` | Path to the root of the Pseudosem repository folder.
The default paths given in the table above are relative to LOOT's `CMakeLists.txt`.
1. Set CMake up so that it builds the binaries in the `build` subdirectory of the LOOT folder.
2. Define any necessary parameters.
3. Configure CMake, then generate a build system for Visual Studio 12.