Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Compilation instructions for Ubuntu 12.04 32 bit
onager Offline
Junior Member

Posts: 5
Threads: 2
Joined: Mar 2020
Reputation: 0
#1
Compilation instructions for Ubuntu 12.04 32 bit

Hello,
I have prepared 
Compilation instructions fpr Penumbra: Overture on Ubuntu 12.04 32 bit.
Note that game still has issues with graphics on this OS (or may be it's just on my VirtualBox VM): shader settings above "very low" are not usable, zooming in when interacting with objects is broken, but otherwise game is playable (at least a few first levels, I did not play beyond that).
First and foremost, Kudos to:
  1. JKO for excellent compilation guide for Windows, which was the base of this instructions (link to JKO's guide)
  2. Commit by jorgeas80 which mentions particular commit of OALWrapper compatible with HPL1
First and foremost, let's create a root folder for our work somewhere in home directory (in this example "OvertureSource"). Inside it we will checkout repositories. Ubuntu 12.04 uses newer compiler than used originally, so some fixes are required to fix compilation errors, so I suggest to pull my forks that already have required fixes.
mkdir OvertureSource
cd OvertureSource
git clone git://github.com/Kristian-Popov/HPL1Engine.git
git clone git://github.com/FrictionalGames/OALWrapper.git
git clone git://github.com/Kristian-Popov/PenumbraOverture.git
Now we have to rewind OALWrapper back:

cd OALWrapper
git checkout ae59c6d7bd476d4d5c7e4a6cd3323a48ed1a6c9c
cd ..
Precompiled versions of Angelscript and Newton can be found in the attached archive. Unlike original dependencies archive, this has dependencies only for Linux, also only two libraries left, for the rest we will be using system libraries. Note that packaged version of Angelscript is not original one, instead this was compiled by g++ 4.5 (default one on this OS) and with AS_MAX_PORTABILITY option. This option means that code is not so dependent on compiler and good implementation of Angelscript (it was crashing at game start, probably because by default it messes with stack on low level). Instructions on how to compile Angelscript are below.
Download archive and unpack it to "dependencies" folder.
Now copy assets from your Penumbra: Overture folder to "redist" folder. I tried running game using assets from Windows and Linux versions, it worked in both cases, so I don't think it matters. You need to copy not only subfolders, but also files "materials.cfg" and "resources.cfg".
Now it's time to install a lot of packages:
sudo apt-get install libalut-dev libopenal-dev libvorbis-dev libsdl1.2-dev  libsdl-image1.2-dev libogg-dev libpng-dev nvidia-cg-toolkit glee-dev libtinyxml-dev mesa-common-dev libglu1-mesa-dev libgl-dev libgl1-mesa-dev libgl-dev libgles1-mesa-dev g++ cmake
This list includes most of used third-party libraries, gcc C++ compiler and CMake.

Let's compile!
mkdir PenumbraOverture-build
cd PenumbraOverture-build
cmake ../PenumbraOverture .
make

Optionally you can compile a few jobs in parallel, although I don't have any particular recommendations for number of jobs run simultaneously. You can try value N = <number of processor cores in system> - 1
make -j N

If everything went well, let's copy executable go to "redist" folder and run the game.

cp overture.bin ../redist/
cd ../redist/
./overture.bin

Logs and settings are stored at "~/.frictionalgames/Penumbra/Overture". Settings file is quite readable, so don't be too afraid to edit it manually.
Note that list of problems remains, you can check my other post for details.

Compilation instructions for Angelscript

We will be compiling version 2.7.1b, same as used with original release of Penumbra: Overture.
You can download all releases at Angelscript download page

After downloading unpack archive and go to "angelscript/projects/gnuc" subfolder, here you will find "makefile". Open it with any text editor and find a line "CXXFLAGS = -g -Wall".
Comment it (in case you want to go back to original compilation flags) and add a new line like this:
# CXXFLAGS = -g -Wall
CXXFLAGS = -g -Wall -DAS_MAX_PORTABILITY

Now start compilation by running "make" in the same folder.
Compiled library ("libangelscript.a") can be found at "<Angelscript root>/angelscript/lib". Copy it to "dependencies" subfolder.

Final file structure of "OvertureSource" folder should look like this:

OvertureSource
   dependencies
       include
           angelscript.h
           Newton.h
       lib
           linux
               libangelscript.a
               libNewton.a
   HPL1Engine (many files and folders inside)
   OALWrapper (many files and folders inside)
   PenumbraOverture (many files and folders inside)
   redist
       materials.cfg
       resources.cfg
       ...
   PenumbraOverture-build (build folder)

I hope this material was useful.
I may edit this post in future to improve or fix errors.


Attached Files
.gz   dependencies-Linux.tar.gz (Size: 1.47 MB / Downloads: 225)
(This post was last modified: 04-09-2020, 07:35 PM by onager.)
04-09-2020, 08:59 AM
Find
erolmatei Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2020
Reputation: 0
#2
RE: Compilation instructions for Ubuntu 12.04 32 bit

Hi, I was unaware of your guide and managed to get an almost fully working solution on a modern distro (Arch Linux). I also managed to use the most recent OALWrapper and fixed some compilation issues, however I am getting a crash on some specific ogg file loading, as I mentioned in another post.

Thank you for the guide, and shame on me for not reading it earlier.

EDIT: Oh lol I just saw the fixup for AngelScript. It was the culprit for me as well.
(This post was last modified: 05-23-2020, 12:20 PM by erolmatei.)
05-22-2020, 03:05 PM
Find
ced117 Offline
Member

Posts: 115
Threads: 1
Joined: Apr 2007
Reputation: 0
#3
RE: Compilation instructions for Ubuntu 12.04 32 bit

Hello,

Right, this is really useful.
Thank you onager :-)
05-22-2020, 03:08 PM
Website Find




Users browsing this thread: 1 Guest(s)