Ubuntu open-source compiler Kart (supertuxkart) project

On the past few years in Linux-related (kernel and system) development found familiar with Git and related services can easily complete tasks and learning. On behalf of the vast extent GitHub open source, sharing ideas, this article as an introductory chapter with everyone understanding GitHub open source application scenarios herein, this example uses the open-source project on Github "supertuxkart"!
Figure 1 Project compiled interface
Figure 1 Project compiled interface

2 project run interface
2 project run interface

Figure 1 and Figure 2 we see the "supertuxkart" project to compile and run the interface, then carry the work we started the project!

First visit GiHub: https://github.com

FIG 3 GitHub main interface
FIG 3 GitHub main interface

GitHub we enter the main interface, where you can see the user login window, here briefly explain, do not need to log in. If we simply refer to or download the program (application) user, if you want to create or submit items you need to log (application) user, 3 with reference to FIG.
Examples here you'll only need to download the project.

Figure 4 GitHub project Search
Figure 4 GitHub project Search

We enter the edit box at the top right of the "supertuxkart", 4, and then click on "All GitHub" or press the Enter key.

Figure 5 GitHub project selection
Figure 5 GitHub project selection

Now we need to download selected items, refer to Figure 5, you can see there are many "supertuxkart" projects and the creation of different user modules (part belongs to the expansion modules, which can be selected according to the project download), to the right of the circle project you can see the position of the main written language project, five-pointed star represents the number of people concerned about the project.
Of course, we can also select projects according to the main language of the project, refer to the lower left side of the "Languages".

Here we need only source project, according to the written language and written mainly concern the total number of people we have chosen "supertuxkart / stk-code", its main language is written in C ++, the number concern about 2K.

Figure 6 GitHub project addresses Copy
Figure 6 GitHub project addresses Copy

We entered the "supertuxkart / stk-code" item, click on the lower right side of the "Clone or download" button in the pop-edit box Download the project, click on the right side of the notebook icon Download complete copy.

GitHub project is divided into two ways Https address or Git:
Https mode:
general resources as a public download, most of the project does not require authentication, you can download. If you need the authorization of projects using Git clone had authorized way to enter a user name and password. Https mode when the user is not logged in or do not need authorization to download the project more convenient.
Git way:
generally use this method when used to work, such as dynamic compilation buildroot downloaded items used in this way without entering user and password (generally used to compile the project using a command station). This approach is generally required in advance at the command line program to set a user name and password.

The following command-line program to start the download Open Source project ...

Figure 7 GitHub project source code download
Figure 7 GitHub project source code download

First, create a folder to store the project source code example creates a "supertuxkart" folder under / home / linux (user), and using the "git clone https://github.com/supertuxkart/stk-code.git " command to download the source code and wait for the project source code download is complete ...

First use Git Git commands friends need to install the tool, instructions sudo apt-get install git

supertuxkart projects also need to compile the relevant documents in the "stk-assets", including background music, background image, image processing and other documents, which do not exist in the source code requires a separate download, download author of several "stk-assets" on GitHub named related project and can not be used, and finally downloaded "supertuxkart" installation package and copy the necessary files to run the project.

supertuxkart-1.0-linux Download:
https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/1.0/supertuxkart-1.0-linux.tar.xz/download

"Supertuxkart" after the download is complete source code, create "stk-assets" Relevant documents:

8 Creating stk-assets folder
8 Creating stk-assets folder

  1. First, we download the source folder "stk-code" at the same level directory created "stk-assets" folder;
  2. Decompression "supertuxkart-1.0-linux.tar.xz" and project into the supertuxkart-1.0-linux / data folder;
  3. Copy library, models, music, sfx, textures, tracks to "stk-assets" file we just created folder, refer to the figure 9.

109 copies the relevant folder FIG.
109 copies the relevant folder FIG.

Create a "stk-assets" folder and copy the relevant folder This step is necessary (perhaps there is a better solution), then follow the prompts of compile-time, the "stk-code" did not let the project in the CMakeLists.txt check stk-assets-related information, even if the program can not be run by the compiler.
If you do not create stk-assets folder, the project will look for data file "stk-code" in the folder, if the data file "stk-code" in the folder to copy these files, source code will become more swollen to the modifications to the project submit or update an impact (which is certainly part of the code can not be submitted up).

Next also need to install openglrecorder
openglrecorder belongs to the video recording tools, prerequisites is "supertuxkart" project running, because there is no way to find the installation instructions, using GitHub also download and compile the project and install it.
openglrecorder Home: https://github.com/Benau/libopenglrecorder
Of course, this project can also be used to download the above GitHub, said the following under way to compile:

安装依赖库:
sudo apt-get install build-essential cmake libturbojpeg
libvpx-dev libogg-dev libvorbisenc2 libvorbis-dev
libpulse-dev pkg-config

Compile and install the project:
mkdir cmake_build
cd cmake_build
cmake ...
the make -j4
sudo the make install

Uses cmake compiled program, it automatically generates a makefile based on the project configuration, ideal for large-scale project build environment to build, here cmake_build can be named, he just used to store compiled files.

Compile the project:
the front of the preparatory work is completed, the following start compiling "supertuxkart" Source:
Compile way "openglrecorder" the same project, just do not need to compile and run "sudo make install" this step.

  1. Installation tools:
    sudo install libglew APT-dev-dev libxrandr libxext-dev-dev libwayland
    for libssl-dev

Alternatives (compile time if the following libraries are then prompted to install missing):
sudo install libenet APT-dev
sudo install OpenAL APT-dev
sudo install libpng12 APT-dev
sudo install libbluetooth APT-dev
sudo install libfreetype6 APT-dev
sudo APT install libharfbuzz- dev
the sudo APT-dev libfribidi the install
the sudo APT libcurl4 the install-dev-GnuTLS
the sudo APT-dev libsqlite3 the install
the sudo the install libhdf5 APT-Serial-dev
the sudo HDF5 the install APT-Tools

Here the basic project to be successfully compiled, should also be prompted to "NotololorEmoji.tty" related run-time error, paste the following solutions:

This case belongs to the font conversion issues, or to search the associated libraries on GitHub ..., noto-emoji Home: https://github.com/googlefonts/noto-emoji

Once downloaded into the noto-Emojj / font file folders copied NotoColorEmoji.ttf Alternatively stk-code / data / ttf NotoColorEmoji.ttf the file folder.

By this time groping found, supertuxkart project or individual problems exist, the follow-up to observe the situation on GitHub solve!

Published 87 original articles · won praise 195 · views 170 000 +

Guess you like

Origin blog.csdn.net/a29562268/article/details/93377081