Hot File

Start Building libgdx from source

View: 234    Dowload: 0   Comment: 0   Post by: kulzxt  
Author: none   Category: Mobile applications   Fields: Game - Entertainment

0 point/0 review File has been tested

Before trying to build libgdx from source yourself, you'll have to install Eclipse and all other related software. We currently don't support development with other IDEs. In addition you'll have to install Ant and make sure its bin/ directory is in your PATH environment variable so that you can execute Ant on the command line.

Introduction

Before trying to build libgdx from source yourself, you'll have to install Eclipse and all other related software. We currently don't support development with other IDEs.

In addition you'll have to install Ant and make sure its bin/ directory is in your PATH environment variable so that you can execute Ant on the command line.

You can work with libgdx sources without ever having to touch the native C/C++ portions. For 99% of users that's all they need. For these contributors we provide the easy way to work with libgdx. For those hardcore 1%, you'll have to dive into building not only the Java sources, but also the native sources.

Easy Way

Libgdx's build system is based on Ant. Various Ant scripts are responsible for building different parts of libgdx.

The main build script is called build.xml and located in the root directory of the libgdx repository. It builds a full distribution of libgdx, including the core API, the back-ends, all extensions and the Javadocs. To build such a distribution, invoke the following in the shell:

ant -f fetch.xml
ant

This will first fetch the latest native libraries (compiled C/C++ code for all platforms) from the build server so you don't have to build them yourself. Next it will invoke the main build script to build all the Java parts.

The end result is a zip file called libgdx-version.zip and a folder called dist containing the expanded contents of the zip file, which will essentially be the same as the one you can get from the nightly build server, plus any modifications you made to the source.

The build.xml file has targets for every module. Each target configures a few properties (classpath, output directory, etc.) which are then send as input to the build-template.xml file. Thebuild-template.xml is then responsible for compiling the Java source code as well as the native source code. The later is done by invoking an Ant script called build.xml in the jni/ folder of the module. If you use the above method to compile the native builds will not be executed. See below for info on how to compile the native sources.

Hard Way

There are a couple of challenges involved in building libgdx's native source code:

  • C/C++ code can only be accessed from within Java via JNI.
  • We need to build for multiple platforms, Windows (32/64bit), Linux (32/64-bit), Mac OS X (32/64bit), Android(arm6/arm7) and iOS(i386/arm7)
  • The Mac OS X and iOS builds can only be executed on a Mac, insert mandatory Apple hate here.

We have a special solution called jnigen for building the libgdx native libraries. You can also look at how our entire Build infrastructure setup if you want to fully reproduce all the native builds in an automated way!

Start Building libgdx from source

Start Building libgdx from source Posted on 07-11-2016  Before trying to build libgdx from source yourself, you'll have to install Eclipse and all other related software. We currently don't support development with other IDEs. In addition you'll have to install Ant and make sure its bin/ directory is in your PATH environment variable so that you can execute Ant on the command line. 5/10 234

Comment:

To comment you must be logged in members.

Files with category

  • Start classes & configuration

    View: 134    Download: 0   Comment: 0   Author: none  

    Start classes & configuration

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    For each target platform, a starter class has to be written. This class instantiates a back-end specific Application implementation and the ApplicationListener that implements the application logic. The starter classes are platform dependent, let's...

  • Project setup Guide

    View: 305    Download: 0   Comment: 0   Author: none  

    Project setup Guide

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review

  • Using libgdx with intellij idea

    View: 261    Download: 0   Comment: 0   Author: none  

    Using libgdx with intellij idea

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    The newest, and easiest way to setup libgdx for use with IntelliJ IDEA is to use the gradle build system. A detailed tutorial can be read here

  • Start classes & configuration

    View: 245    Download: 0   Comment: 0   Author: none  

    Start classes & configuration

    Category: Mobile applications
    Fields: Game - Entertainment

    0/1 review
    For each target platform, a starter class has to be written. This class instantiates a back-end specificApplication implementation and the ApplicationListener that implements the application logic. The starter classes are platform dependent, let's...

  • Project setup, running and debugging

    View: 277    Download: 0   Comment: 0   Author: none  

    Project setup, running and debugging

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    Attention: this is extremely outdated and NOT supported anymore! Please use the Gradle-based setup instead Libgdx is very Eclipse centric due to its Android and HTML5/GWT back-ends. This article discusses how to setup libgdx projects for Eclipse....

  • The applications framework

    View: 245    Download: 0   Comment: 0   Author: none  

    The applications framework

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    At its core, libgdx consists of six interfaces that provide means to interact with the operating system. Each back-end implements these interfaces.

  • Start Building libgdx from source

    View: 234    Download: 0   Comment: 0   Author: none  

    Start Building libgdx from source

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    Before trying to build libgdx from source yourself, you'll have to install Eclipse and all other related software. We currently don't support development with other IDEs. In addition you'll have to install Ant and make sure its bin/ directory is...

  • Start Build Infrastructure Setup

    View: 295    Download: 0   Comment: 0   Author: none  

    Start Build Infrastructure Setup

    Category: Mobile applications
    Fields: Game - Entertainment

    0/0 review
    Our build infrastructure has the responsibility of building libgdx for all supported platforms (Windows, Linux, Mac OS X, Android, iOS, HTML). On top of the boring old Java code, we also need to compile the native code for each platform and...

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd