Polycode compilation (Linux)

Source: Internet
Author: User

Polycode compilation (Linux)

Polycode is now a relatively new cross-platform game library that supports win, Linux, Mac, and very attractive features. However, due to its newer features, there are very few documents.

I originally wanted to compile it in windows. I tried the result for a long time and never worked. Today I saw a help document compiled in Linux posted on the polycode website, so I decided to compile it in Linux first. It is easy to write help documents, but the compilation process is still quite troublesome. First, your computer needs to be able to access the Internet and many dependency packages need to be downloaded during the compilation process, next, you need to manually run Yum or apt for some packages. The following describes the process.

1. Install cmake version 2.8.8 or later. You can download and install it directly on the cmake homepage.

2. Install git. The installation process is also very simple. It is basically to download the installation package./configure, make, make install. It is best to download a new version

3. Go to/home/ptsf (my user directory, which will not be explained later) and download the polycode through git.CodeAfter the code is downloaded, enter the polycode directory.

 
Git clone https://Github.com/ivansafrin/polycode.git

By now, the Code preparation is complete and the entire project cannot be directly cmake. You need to compile all the dependent libraries first. Instead of using the system, the dependent libraries are all downloaded and compiled by cmake, and use the compiled library, so masters should not use their own yum for a long time. The following is the compilation process of dependencies.

1. log on to/home/ptsf/polycode/and edit cmakelist.txt to open several of the tags, saving you the need to enter the command.

Option (polycode_build_bindings"  Build polycode Lua bindings  "  On) option (polycode_build_modules  "  Build polycode modules  "  On) option (polycode_build_player  "  Build polycode standalone player  "  On) option (polycode_build_tools  "  Build polycode tools  " On) option (polycode_build_docs  "  Build polycode documentation  " Off)

2. Enter/home/ptsf/polycode/dependencies to create the folder as follows:

 
/Home/ptsf/polycode/dependencies/build/debug

3. Go to the DEBUG directory and start cmake and make.

 
Cmake-G"UNIX makefiles"-Dcmake_build_type =Debug../.. Make

During the creation process, we can see that the compilation process is basically smooth but there will be problems during Ogg compilation, as long as you enter the corresponding directory and translate it with your own configure, make and make install are also required, otherwise the library will not be found in some later Compilation

 
/Home/ptsf/polycode/dependencies/build/debug/oggvorbis/src/libogg
./Configuremakemake install

Now the debug library on which the dependency is compiled is complete, and the release library needs to be compiled below. The procedure is basically the same as above, but it needs to be compiled in the following folder

 
/Home/ptsf/polycode/dependencies/build/release

Compile the command (note the red release)

 
Cmake-G"UNIX makefiles"-Dcmake_build_type =Release../..

The release library must be compiled, otherwise it will not be able to pass through later.

 

Next, enter the polycode compilation path to start compilation. The process is similar to the dependent compilation. Before installation, install the SDL package and python, Python-ply, and freeglut are basically Yum or configure, make and make install. After that, go to the/home/ptsf/polycode directory and set the path as follows:

 
/Home/ptsf/polycode/build/debug

Go to the DEBUG directory, cmake, make

Cmake-G"UNIX makefiles"-Dcmake_build_type =Debug../.. Makemake polycodeluamake install

Create the release directory, cmake, make

 
/Home/ptsf/polycode/build/release
 
Cmake-G"UNIX makefiles"-Dcmake_build_type =Release../.. Makemake polycodeluamake install

Now the polycode compilation is complete. We need to install standalone and IDE first. If the installation is successful, we should simply paste the command to the/home/ptsf/polycode/directory/

CD standalonemkdir buildcd buildcmake-G"UNIX makefiles".. Make installcd ../..

 

 
Cd ide/build/Linuxmake

This completes the compilation, and other problems will depend on the RP value. Which of the following heroes is welcome to send the compilation process under Win? Thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.