User Tools

Site Tools


Using Premake to create a Build Project to compile ORX from scratch

This article is no longer recommended, as Orx now provides a setup script which will automatically create build projects for all IDEs for your operating system. For more information: Cloning Orx from Github

If you wish to do this manually, continue with the article below.

This article is a short guide on building orx from scratch using an IDE of your choice (VisualStudio, Codelite, XCode etc) on an operating system of your choice (Windows, Linux, Mac, Android etc).

What is a build project?

When you clone a copy of the very latest orx, look in the \orx\code\build folder. In here you will see folders to Windows, Linux, Android etc. And in these folders, you'll find subfolders to VisualStudio2010, Codelite, CodeBlocks, XCode, jni, etc.

These are build projects. With previous releases of orx, there were several build projects for some IDEs but not all. Premake now builds these Projects for us, for your chosen operating system and editor.

Your build may not exist in these folders, but you can create it. Then you can build orx for your own project.

Creating your build

This article assumes that you are using the latest releases of orx (using the bitbucket repository).

Step 1: cd your way into the build output folder: cd orx\code\build

Step 2: run premake and specify the editor your want to create a build project for (in this case, windows codelite): ..\..\extern\premake\bin\windows\premake4 codelite

Your project for building orx from scratch will now be created.

Compiling orx from scratch

Step 1: Start up your IDE, eg (codelite) and load the orx workspace or solution in the build project you just made.

Step 2: You'll most likely want embedded versions of orx, so compile the “Embedded Dynamic Debug”, “Embedded Dynamic Profile” & “Embedded Dynamic Release” versions.

Prepare your own project to start writing a game

Step 1: Copy the tutorial folder as a basis for your own project.

Step 2: Copy the orx\code\lib\dynamic *.dll(s) into a lib subfolder in your project folder. lib is on the same folder level as bin & data.

Step 3: Copy the orx\code\bin\ *.exe(s) into the bin subfolder in your project folder. bin is on the same level as lib.

Step 4: Copy the entire orx\code\include folder into your project folder so that include is on the same level as lib and bin.

All operating systems, architectures, build projects

To get a list of all possible combinations, do a:

extern\premake\bin\windows\premake4 –help (dash dash help)

At the current time, the available oses are: OpenBSD, NetBSD, or FreeBSD Haiku Linux Apple Mac OS X Solaris Microsoft Windows

And the available build projects are: codeblocks codelite gmake vs2002 vs2003 vs2005 vs2008 vs2010 vs2012 vs2013 xcode3 xcode4

There's some interesting architectures there as well.

Tips for Linux

If you are building under Linux, you may possibly encounter this error while trying to compile

 /usr/bin/ld: cannot find -lsndfile

You require the libsndfile-devel package. For Fedora:

 yum install libsndfile-devel

… will set you straight. Similar command for other Linux flavours.

Further details

A further mention (xcode specific and premake) can be found here: Compiling and Building ORX

en/tutorials/community/sausage/using-premake-to-create-build-projects.txt · Last modified: 2018/02/14 04:46 (3 months ago) by iarwain