The reason for follow this tutorial can be varied. You may not want or be able to use the current options to install the game with pre-built packages (Ubuntu PPA, Flatpak or AppImage); or maybe you would like to try the latest changes to the code. Whatever your reason, here are the steps to build the game for these distributions, Ubuntu and Debian, and their derivatives:
-Step 1: Install the necessary requirements to build and run the game.
Speed Dreams needs quite a few dependencies/libraries to be built and run. To install them we are going to open a terminal and execute the following installation command:
The last three dependencies are required to build Trackeditor (openjdk-18-jre openjdk-18-jdk) and enable replays (libsqlite3-dev). In the case of the first ones, Java, in Debian it may be necessary to use openjdk-17-jre and openjdk-17-jdk
-Step 2: Download the source code. Here we have two options:
Option 1: If you want to compile the latest official source code, you must download it first. To do this you must go to the Speed Dreams repository in Sourceforge, in "Files", and download the source code packages of the latest version, 2.3.0:
Then you must create a folder called "speed-dreams-code": mkdir speed-dreams-code
Now we must extract the contents of the downloaded files within this folder following the order shown above, and overwriting the content whenever required.
Option 2: If you want to build the latest code in development (trunk) with the latest commits, you must download it with subversion. To install it previously, type the following command in a terminal:
This process will take a long time, so I recommend that you be patient.
-Step 3: Preparing and configuring the source code:
At this point we already have the source code that we are going to compile in the "speed-dreams-code" folder. Now we have to create a folder called "build" inside it. To do this:
cd speed-dreams-code
mkdir build
cd build
Now let's configure the build with cmake. We can do this in various ways. I am going to propose a few:
-Configure the build to activate the OpenSceneGraph Graphics engine and only the official content.
The last step to enjoy the game is simple. You just have to run this command in the terminal: make
Chances are, your PC allows for more than one processing thread, so taking advantage of them can save a lot of time. To do this you just have to use "make -jX", where X is the number of threads we want to use. For example, if our processor has 4 cores/threads you can use: make -j4
Once this process is finished, I hope that without errors, you can now run the game. To do this, navigate to "speed-dreams-code/build/games", and double click on "speed-dreams-2", or if you want, use the terminal "./speed-dreams-2".
-Step 5 (Optional): Installing the game in your OS.
As I put above, this step is optional, but if you want to do it, it is as simple as doing: sudo make install
When finished you will probably see the Speed Dreams launcher in the applications menu. If not, it will probably be enough to close the user session and reopen it. In case you want to run it in a terminal just type: speed-dreams-2
-Step 6 (Optional): Update the game to the last Development version:
For those of you who have used subversion to download the latest development version of the code, in case there are new commits and you want to build them, you just have to go to the "speed-dreams-code/build" folder, and inside it execute this command in terminal: svn udpate Then you will use the cmake command with the options you want and finally make again (and sudo make install again if you want to install it)
This tutorial is probably valid for other distributions. The difference will be in the way of installing the dependencies and libraries, so you can try. I would appreciate your answers. I hope this tutorial will be useful for you.
CHEERS!
Last edit: leillo1975 2024-10-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The reason for follow this tutorial can be varied. You may not want or be able to use the current options to install the game with pre-built packages (Ubuntu PPA, Flatpak or AppImage); or maybe you would like to try the latest changes to the code. Whatever your reason, here are the steps to build the game for these distributions, Ubuntu and Debian, and their derivatives:
-Step 1: Install the necessary requirements to build and run the game.
Speed Dreams needs quite a few dependencies/libraries to be built and run. To install them we are going to open a terminal and execute the following installation command:
sudo apt-get install build-essential cmake libplib-dev libogg-dev libenet-dev libexpat1-dev libpng-dev libjpeg8-dev libopenscenegraph-dev libsdl2-dev libplib1 libvorbis-dev libcurl4-gnutls-dev libopenal-dev gcc make perl libxmu-dev libsdl2-mixer-dev libtinygltf-dev libminizip-dev libcjson-dev openjdk-18-jre openjdk-18-jdk librhash-dev libsqlite3-devThe last three dependencies are required to build Trackeditor (openjdk-18-jre openjdk-18-jdk) and enable replays (libsqlite3-dev). In the case of the first ones, Java, in Debian it may be necessary to use openjdk-17-jre and openjdk-17-jdk
-Step 2: Download the source code. Here we have two options:
Option 1: If you want to compile the latest official source code, you must download it first. To do this you must go to the Speed Dreams repository in Sourceforge, in "Files", and download the source code packages of the latest version, 2.3.0:
Then you must create a folder called "speed-dreams-code":
mkdir speed-dreams-codeNow we must extract the contents of the downloaded files within this folder following the order shown above, and overwriting the content whenever required.
Option 2: If you want to build the latest code in development (trunk) with the latest commits, you must download it with subversion. To install it previously, type the following command in a terminal:
sudo apt install subversionThen you will download the latest source code:
svn checkout https://svn.code.sf.net/p/speed-dreams/code/trunk speed-dreams-codeThis process will take a long time, so I recommend that you be patient.
-Step 3: Preparing and configuring the source code:
At this point we already have the source code that we are going to compile in the "speed-dreams-code" folder. Now we have to create a folder called "build" inside it. To do this:
Now let's configure the build with cmake. We can do this in various ways. I am going to propose a few:
-Configure the build to activate the OpenSceneGraph Graphics engine and only the official content.
cmake -D OPTION_OSGGRAPH:BOOL=ON -D OPTION_OFFICIAL_ONLY:BOOL=ON ..-Configure the build to activate the OpenSceneGraph Graph engine and all content, including WIP and Development:
cmake -D OPTION_OSGGRAPH:BOOL=ON -D OPTION_OFFICIAL_ONLY:BOOL=OFF ..-Configure the build to activate the OpenSceneGraph Graph engine, all content, including WIP and Development, and activate replays :
cmake -D OPTION\_OSGGRAPH:BOOL=ON -D OPTION\_OFFICIAL\_ONLY:BOOL=OFF -D OPTION\_3RDPARTY\_SQLITE3:BOOL=ON ..-Step 4: Building the source code:
The last step to enjoy the game is simple. You just have to run this command in the terminal:
makeChances are, your PC allows for more than one processing thread, so taking advantage of them can save a lot of time. To do this you just have to use "make -jX", where X is the number of threads we want to use. For example, if our processor has 4 cores/threads you can use:
make -j4Once this process is finished, I hope that without errors, you can now run the game. To do this, navigate to "speed-dreams-code/build/games", and double click on "speed-dreams-2", or if you want, use the terminal "./speed-dreams-2".
-Step 5 (Optional): Installing the game in your OS.
As I put above, this step is optional, but if you want to do it, it is as simple as doing:
sudo make installWhen finished you will probably see the Speed Dreams launcher in the applications menu. If not, it will probably be enough to close the user session and reopen it.
In case you want to run it in a terminal just type:
speed-dreams-2-Step 6 (Optional): Update the game to the last Development version:
For those of you who have used subversion to download the latest development version of the code, in case there are new commits and you want to build them, you just have to go to the "speed-dreams-code/build" folder, and inside it execute this command in terminal:
svn udpateThen you will use the cmake command with the options you want and finally make again (and
sudo make installagain if you want to install it)This tutorial is probably valid for other distributions. The difference will be in the way of installing the dependencies and libraries, so you can try. I would appreciate your answers. I hope this tutorial will be useful for you.
CHEERS!
Last edit: leillo1975 2024-10-02