Class Notes
Class Notes
com/b/lX5Y3DwR/openapoc">
<img src="https://img.shields.io/badge/See%20our-Trello%20TO--DO%20list-blue.svg"
alt="See our Trello TO-DO list for more info">
</a>
<a href="https://www.transifex.com/x-com-apocalypse/apocalypse/">
<img src="https://img.shields.io/badge/Translate-Openapoc-blue.svg" alt="Translate
OpenApoc to your language">
</a>
<a href="https://github.com/OpenApoc/OpenApoc/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-red.svg" alt="OpenApoc MIT
license">
</a><br>
<a href="http://openapoc.org">
<img src="https://img.shields.io/badge/Visit%20our-forum-orange.svg" alt="Openapoc
forum">
</a>
<a href="http://webchat.freenode.net/?channels=openapoc">
<img src="https://img.shields.io/badge/IRC-devs%20chat-brightgreen.svg"
alt="Openapoc IRC chat">
</a>
<a href="https://discord.gg/d6DAHEb">
<img src="https://img.shields.io/discord/142798944970211328.svg?label=discord"
alt="Openapoc Discord">
</a>
<a href="https://fb.com/openapoc">
<img src="https://img.shields.io/badge/Join%20our-Facebook-blue.svg" alt="Openapoc
Facebook">
</a>
<a href="https://vk.com/openapoc">
<img src="https://img.shields.io/badge/Join%20our-Vkontakte-blue.svg" alt="Openapoc
Vkontakte">
</a>
</p>
## Table of Contents
* [Key Features](#key-features)
* [What's left to finish?](#whats-left)
* [Building](#building)
* [Building on Windows](#building-on-windows)
* [Building on Linux](#building-on-linux)
* [How to setup OpenApoc](#how-to-setup-openapoc)
* [Contact us](#contact-us)
## Key Features
That will be a game which has all of its main mechanics implemented. We still have
a long way to go, but that's a point at which you can really play Apocalypse in
OpenApoc and do everything you need.
## Building
* [SDL2](https://www.libsdl.org)
* [Boost](http://boost.org) - specifially the 'locale' library, used for
localisation, 'program-options' for settings management, and 'filesystem'.
* [Libunwind](https://nongnu.org/libunwind/download.html) - debug backtracing on
linux - not needed on windows.
The following libraries are also used, but are shipped as submodules in the
repository and directly included in the build, so you don't need to install these
dependencies to build or use openapoc.
```cmd
git submodule update --init --recursive
```
* All the other dependencies (Boost, SDL2) need to be supplied separately. Install
[Vcpkg](https://github.com/Microsoft/vcpkg) and run the following command:
```cmd
vcpkg install sdl2 boost-locale boost-program-options boost-uuid boost-crc
```
* Copy the original XCom:Apocalypse .iso file into the "data/" directory. This
could also be a directory containing all the extracted files from the CD, and it
should be named the same (IE the directory should be data/cd.iso/). This is used
during the build to extract some data tables.
* Open the Git directory in Visual Studio (if you don't have an Open Folder option,
generate a project from CMake).
* Visual Studio should automatically detect and configure CMake appropriately. To
add your Vcpkg dependencies, edit your CMake Settings file and add:
```json
"variables": [
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "<path to vcpkg>\\scripts\\buildsystems\\vcpkg.cmake"
}
]
```
* If you get errors, clear your cache from the CMake menu and generate again.
* Build (Release/Debug x86/x64 should all work). Release is recommended as Debug is
very slow.
* When running from the Visual Studio UI, the working directory is set to the root
of the project, so the data folder should already be in the right place. If you
want to run outside of Visual Studio, you need to copy the whole 'data' folder
(including the cd.iso file) into the folder openapoc.exe resides in.
```sh
sudo apt-get install libsdl2-dev cmake build-essential git libunwind8-dev libboost-
locale-dev libboost-filesystem-dev libboost-program-options-dev
```
```sh
urpmi "cmake(sdl2)" libstdc++-static-devel boost-devel boost unwind-devel task-c++-
devel cmake git
```
```sh
git submodule update --init --recursive
```
* Copy the cd.iso file to the 'data' directory under the repository root (Note -
despite dosbox having good linux support, the steam version of X-Com Apocalypse
will only install if Steam Play is enabled).
```sh
cp /path/to/cd.iso data/
```
```sh
cd /path/to/OpenApoc
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
```
* This cmake command will fail if we're missing a dependency, or your system is for
some other reason unable to build - if you have any issues please contact us (see
above for links).
* Build the project with the following command.
```sh
make -j4
```
* This should create a directory 'bin' under the build directory, with the
'OpenApoc' executable file. OpenApoc by default expects the data folder to be in
the current working directory, so running the executable from the root of the git
checkout should work.
```sh
./build/bin/OpenApoc
```
* This assumes that you have the file 'cd.iso' - a copy of the original X-Com
Apocalypse CD (This can be acquired from [Steam]
(http://store.steampowered.com/app/7660/) - this is _required_ to run)
* you need have all files in ISO file including MUSIC etc
* if it's in .iso format, rename it to "cd.iso"
* if it's not, copy all the contents into a folder and rename the folder to
"cd.iso"
* we also support the .cue / .bin files (which are used, for example, in the
gog.com version)
* you rename the .cue file "cd.iso", put it in the data/ folder, then put the
.bin file in the same folder
(without changing it's name - so for example the gog.com file remails "XCOM.BIN")
## Contact us