Xli is a modular and cross-platform app development framework for C++. It is being used to implement the Uno C++ runtime and core library among some other things.
Xli is officially supported on Android, iOS, OS X and Windows. The build system also implements support for Linux and Raspberry PI, but these are not regularly tested. Additionally we're using SDL2 as fallback, so any other platforms supported by SDL2 could be added with some tweaks here and there.
Header documentation can be generated using doxygen
.
Please see the Modules page for an overview of the functionality.
Questions and other feedback can be posted in the beta zone forum.
Xli uses CMake as its underlying build system for all platforms. If you are familiar with CMake you can use the provided CMakeLists.txt
and do your thing, or follow the instructions presented here for the supported platforms. Note: Some platforms (i.e. Linux) may require additional libraries to be installed on the system.
To clean up any old builds from the source tree, delete the directories build
and lib
.
- CMake
- Android NDK (
ndk-build
must be available in PATH) - Unix Shell
- Open terminal and
cd
to Xli directory - Execute
./build-android.sh
- This should produce .so files located here:
lib/android/armeabi-v7a
- This should produce .so files located here:
Debug binaries can be produced by replacing command in step 2 with ./build-android.sh --debug
.
Specific architectures can be built by providing the --archs=
option in step 2 (armeabi-v7a
).
List of available options can be shown using ./build-android.sh --help
.
Windows users need a way to execute unix shell scripts. This can be done using MSYS.
Uno users can use the Uno Native Build environment provided by Outracks, containing both CMake, MSYS and the Android SDK + NDK. Open start.bat
, type bash -li
to get an MSYS shell, then follow the instructions given above.
- CMake
- Xcode with most recent iOS SDK
- Xcode command line tools
- OS X (>= 10.7)
- Open terminal and
cd
to Xli directory - Execute
./build-iOS.sh
- This should produce static libraries located here:
lib/iOS/Debug-iphoneos/
lib/iOS/Debug-iphonesimulator/
lib/iOS/Release-iphoneos/
lib/iOS/Release-iphonesimulator/
- Generated Xcode projects located here:
build/iOS/OS/Xli.xcodeproj
build/iOS/SIMULATOR/Xli.xcodeproj
- This should produce static libraries located here:
Specific architectures can be built by providing the --archs=
option in step 2 (OS
, SIMULATOR
).
- CMake
- GNU make, C++ compiler, etc
- libcurl (with OpenSSL support)
- libfreetype
- libglew
- libjpeg
- libpng
- libsdl2
APT users can execute sudo apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev libsdl2-dev libglew-dev libcurl4-openssl-dev cmake g++
- Open terminal and
cd
to Xli directory - Execute
./build.sh
- This should produce .so files located here:
lib/linux/x86_32/
ORlib/linux/x86_64/
- This should produce .so files located here:
- Optional step:
sudo ./build.sh install
Debug binaries can be produced by replacing command in step 2 with ./build.sh --debug
.
List of available options can be shown using ./build.sh --help
.
- CMake
- Xcode
- Xcode command line tools
- OS X (>= 10.7)
- Open terminal and
cd
to Xli directory - Execute
./build.sh
- This should produce universal binaries located here:
lib/OSX/x86/
- This should produce universal binaries located here:
- Optional step:
sudo ./build.sh install
Debug binaries can be produced by replacing command in step 2 with ./build.sh --debug
.
List of available options can be shown using ./build.sh --help
.
Note: When building applications using Xcode, it would be useful to also build Xli using Xcode for better integration with debugger and such. This can be achieved using these alternative instructions:
- Open terminal and
cd
to Xli directory - Execute
./build.sh --platform=xcode
- This should produce universal binaries located here:
lib/OSX/x86/Debug/
lib/OSX/x86/Release/
- Generated Xcode project located here:
build/Xcode/Xli.xcodeproj
- This should produce universal binaries located here:
- CMake
- GNU make, C++ compiler, etc
- libcurl (with OpenSSL support)
- libfreetype
- libjpeg
- libpng
- libsdl2
APT users can execute sudo apt-get install -y libpng12-dev libjpeg-dev libfreetype6-dev libcurl4-openssl-dev cmake g++
SDL2 can be built and installed from source. To install from Mercurial, do this:
hg clone http://hg.libsdl.org/SDL
cd SDL
./configure
make -j 2
sudo make install
- Open terminal and
cd
to Xli directory - Execute
./build.sh
- This should produce .so files located here:
lib/linux/arm/
- This should produce .so files located here:
- Optional step:
sudo ./build.sh install
Debug binaries can be produced by replacing command in step 2 with ./build.sh --debug
.
List of available options can be shown using ./build.sh --help
.
- CMake (must be in PATH)
- Visual Studio 2013 (or any version down to 2010)
- Windows (>= Vista)
- Execute
build-vs2013.bat
- This should produce static libraries located here:
lib\vs2013\x86\Debug\
lib\vs2013\x86\Release\
lib\vs2013\x64\Debug\
lib\vs2013\x64\Release\
- Generated Visual Studio 2013 solutions located here:
build\vs2013\x64\Xli.sln
build\vs2013\x86\Xli.sln
- This should produce static libraries located here:
- Open CMake GUI
- Browse to Xli directory
- Configure using one of the Visual Studio generators
- Open the generated solution in Visual Studio
- Build
Use a text editor and copy the contents of vsconfig\autoexp.dat
and paste at the end of your <VisualStudioFolder>\Common7\Packages\Debugger\autoexp.dat
. Now Visual Studio should be able to more easily inspect instances of Xli types.